diff --git a/dist/main.bundle.js b/dist/main.bundle.js index 5ad31741..4201432e 100644 --- a/dist/main.bundle.js +++ b/dist/main.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see main.bundle.js.LICENSE.txt */ -(()=>{var e={484(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.alert",i=`close${a}`,o=`closed${a}`;class l extends e{static get NAME(){return"alert"}close(){if(t.trigger(this._element,i).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),t.trigger(this._element,o),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=l.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}return r.enableDismissTrigger(l,"close"),n.defineJQueryPlugin(l),l}(r(11),r(956),r(248),r(35))},11(e,t,r){e.exports=function(e,t,r,n){"use strict";return class extends r{constructor(t,r){super(),(t=n.getElement(t))&&(this._element=t,this._config=this._getConfig(r),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),t.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){n.executeAfterTransition(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(t){return e.get(n.getElement(t),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}}(r(269),r(956),r(105),r(35))},960(e,t,r){e.exports=function(e,t,r){"use strict";const n='[data-bs-toggle="button"]';class a extends e{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=a.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}return t.on(document,"click.bs.button.data-api",n,e=>{e.preventDefault();const t=e.target.closest(n);a.getOrCreateInstance(t).toggle()}),r.defineJQueryPlugin(a),a}(r(11),r(956),r(35))},647(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.collapse",i=`show${a}`,o=`shown${a}`,l=`hide${a}`,s=`hidden${a}`,c=`click${a}.data-api`,u="show",d="collapse",f="collapsing",h=`:scope .${d} .${d}`,p='[data-bs-toggle="collapse"]',m={parent:null,toggle:!0},g={parent:"(null|element)",toggle:"boolean"};class v extends e{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=r.find(p);for(const e of n){const t=r.getSelectorFromElement(e),n=r.find(t).filter(e=>e===this._element);null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return m}static get DefaultType(){return g}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(e=>e!==this._element).map(e=>v.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(t.trigger(this._element,i).defaultPrevented)return;for(const t of e)t.hide();const r=this._getDimension();this._element.classList.remove(d),this._element.classList.add(f),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(f),this._element.classList.add(d,u),this._element.style[r]="",t.trigger(this._element,o)},this._element,!0),this._element.style[r]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(t.trigger(this._element,l).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,n.reflow(this._element),this._element.classList.add(f),this._element.classList.remove(d,u);for(const e of this._triggerArray){const t=r.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(f),this._element.classList.add(d),t.trigger(this._element,s)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(u)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=n.getElement(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(p);for(const t of e){const e=r.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=r.find(h,this._config.parent);return r.find(e,this._config.parent).filter(e=>!t.includes(e))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const r of e)r.classList.toggle("collapsed",!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const r=v.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===r[e])throw new TypeError(`No method named "${e}"`);r[e]()}})}}return t.on(document,c,p,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of r.getMultipleElementsFromSelector(this))v.getOrCreateInstance(e,{toggle:!1}).toggle()}),n.defineJQueryPlugin(v),v}(r(11),r(956),r(411),r(35))},269(e){e.exports=function(){"use strict";const e=new Map;return{set(t,r,n){e.has(t)||e.set(t,new Map);const a=e.get(t);a.has(r)||0===a.size?a.set(r,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(a.keys())[0]}.`)},get:(t,r)=>e.has(t)&&e.get(t).get(r)||null,remove(t,r){if(!e.has(t))return;const n=e.get(t);n.delete(r),0===n.size&&e.delete(t)}}}()},956(e,t,r){e.exports=function(e){"use strict";const t=/[^.]*(?=\..*)\.|.*/,r=/\..*/,n=/::\d+$/,a={};let i=1;const o={mouseenter:"mouseover",mouseleave:"mouseout"},l=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function s(e,t){return t&&`${t}::${i++}`||e.uidEvent||i++}function c(e){const t=s(e);return e.uidEvent=t,a[t]=a[t]||{},a[t]}function u(e,t,r=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===r)}function d(e,t,r){const n="string"==typeof t,a=n?r:t||r;let i=m(e);return l.has(i)||(i=e),[n,a,i]}function f(e,r,n,a,i){if("string"!=typeof r||!e)return;let[l,f,h]=d(r,n,a);if(r in o){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};f=e(f)}const p=c(e),m=p[h]||(p[h]={}),y=u(m,f,l?n:null);if(y)return void(y.oneOff=y.oneOff&&i);const x=s(f,r.replace(t,"")),b=l?function(e,t,r){return function n(a){const i=e.querySelectorAll(t);for(let{target:o}=a;o&&o!==this;o=o.parentNode)for(const l of i)if(l===o)return v(a,{delegateTarget:o}),n.oneOff&&g.off(e,a.type,t,r),r.apply(o,[a])}}(e,n,f):function(e,t){return function r(n){return v(n,{delegateTarget:e}),r.oneOff&&g.off(e,n.type,t),t.apply(e,[n])}}(e,f);b.delegationSelector=l?n:null,b.callable=f,b.oneOff=i,b.uidEvent=x,m[x]=b,e.addEventListener(h,b,l)}function h(e,t,r,n,a){const i=u(t[r],n,a);i&&(e.removeEventListener(r,i,Boolean(a)),delete t[r][i.uidEvent])}function p(e,t,r,n){const a=t[r]||{};for(const[i,o]of Object.entries(a))i.includes(n)&&h(e,t,r,o.callable,o.delegationSelector)}function m(e){return e=e.replace(r,""),o[e]||e}const g={on(e,t,r,n){f(e,t,r,n,!1)},one(e,t,r,n){f(e,t,r,n,!0)},off(e,t,r,a){if("string"!=typeof t||!e)return;const[i,o,l]=d(t,r,a),s=l!==t,u=c(e),f=u[l]||{},m=t.startsWith(".");if(void 0===o){if(m)for(const r of Object.keys(u))p(e,u,r,t.slice(1));for(const[r,a]of Object.entries(f)){const i=r.replace(n,"");s&&!t.includes(i)||h(e,u,l,a.callable,a.delegationSelector)}}else{if(!Object.keys(f).length)return;h(e,u,l,o,i?r:null)}},trigger(t,r,n){if("string"!=typeof r||!t)return null;const a=e.getjQuery();let i=null,o=!0,l=!0,s=!1;r!==m(r)&&a&&(i=a.Event(r,n),a(t).trigger(i),o=!i.isPropagationStopped(),l=!i.isImmediatePropagationStopped(),s=i.isDefaultPrevented());const c=v(new Event(r,{bubbles:o,cancelable:!0}),n);return s&&c.preventDefault(),l&&t.dispatchEvent(c),c.defaultPrevented&&i&&i.preventDefault(),c}};function v(e,t={}){for(const[r,n]of Object.entries(t))try{e[r]=n}catch(t){Object.defineProperty(e,r,{configurable:!0,get:()=>n})}return e}return g}(r(35))},333(e){e.exports=function(){"use strict";function e(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function t(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}return{setDataAttribute(e,r,n){e.setAttribute(`data-bs-${t(r)}`,n)},removeDataAttribute(e,r){e.removeAttribute(`data-bs-${t(r)}`)},getDataAttributes(t){if(!t)return{};const r={},n=Object.keys(t.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const a of n){let n=a.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),r[n]=e(t.dataset[a])}return r},getDataAttribute:(r,n)=>e(r.getAttribute(`data-bs-${t(n)}`))}}()},411(e,t,r){e.exports=function(e){"use strict";const t=t=>{let r=t.getAttribute("data-bs-target");if(!r||"#"===r){let e=t.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),r=e&&"#"!==e?e.trim():null}return r?r.split(",").map(t=>e.parseSelector(t)).join(","):null},r={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter(e=>e.matches(t)),parents(e,t){const r=[];let n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(t){const r=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(r,t).filter(t=>!e.isDisabled(t)&&e.isVisible(t))},getSelectorFromElement(e){const n=t(e);return n&&r.findOne(n)?n:null},getElementFromSelector(e){const n=t(e);return n?r.findOne(n):null},getMultipleElementsFromSelector(e){const n=t(e);return n?r.find(n):[]}};return r}(r(35))},635(e,t,r){e.exports=function(e,t,r,n,a,i,o,l){"use strict";const s=".bs.modal",c=`hide${s}`,u=`hidePrevented${s}`,d=`hidden${s}`,f=`show${s}`,h=`shown${s}`,p=`resize${s}`,m=`click.dismiss${s}`,g=`mousedown.dismiss${s}`,v=`keydown.dismiss${s}`,y=`click${s}.data-api`,x="modal-open",b="show",_="modal-static",w={backdrop:!0,focus:!0,keyboard:!0},T={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class k extends e{constructor(e,t){super(e,t),this._dialog=r.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new l,this._addEventListeners()}static get Default(){return w}static get DefaultType(){return T}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||t.trigger(this._element,f,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(x),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){this._isShown&&!this._isTransitioning&&(t.trigger(this._element,c).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(b),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){t.off(window,s),t.off(this._dialog,s),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new n({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new i({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=r.findOne(".modal-body",this._dialog);n&&(n.scrollTop=0),o.reflow(this._element),this._element.classList.add(b);this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,t.trigger(this._element,h,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){t.on(this._element,v,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),t.on(window,p,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),t.on(this._element,g,e=>{t.one(this._element,m,t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(x),this._resetAdjustments(),this._scrollBar.reset(),t.trigger(this._element,d)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(t.trigger(this._element,u).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;"hidden"===r||this._element.classList.contains(_)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(_),this._queueCallback(()=>{this._element.classList.remove(_),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){const e=o.isRTL()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!r&&e){const e=o.isRTL()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const r=k.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===r[e])throw new TypeError(`No method named "${e}"`);r[e](t)}})}}return t.on(document,y,'[data-bs-toggle="modal"]',function(e){const n=r.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),t.one(n,f,e=>{e.defaultPrevented||t.one(n,d,()=>{o.isVisible(this)&&this.focus()})});const a=r.findOne(".modal.show");a&&k.getInstance(a).hide(),k.getOrCreateInstance(n).toggle(this)}),a.enableDismissTrigger(k),o.defineJQueryPlugin(k),k}(r(11),r(956),r(411),r(877),r(248),r(936),r(35),r(673))},451(e,t,r){e.exports=function(e,t,r,n,a,i,o,l){"use strict";const s=".bs.offcanvas",c=".data-api",u=`load${s}${c}`,d="show",f="showing",h="hiding",p=".offcanvas.show",m=`show${s}`,g=`shown${s}`,v=`hide${s}`,y=`hidePrevented${s}`,x=`hidden${s}`,b=`resize${s}`,_=`click${s}${c}`,w=`keydown.dismiss${s}`,T={backdrop:!0,keyboard:!0,scroll:!1},k={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class M extends e{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return T}static get DefaultType(){return k}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(t.trigger(this._element,m,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new l).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(f);this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(d),this._element.classList.remove(f),t.trigger(this._element,g,{relatedTarget:e})},this._element,!0)}hide(){if(!this._isShown)return;if(t.trigger(this._element,v).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(h),this._backdrop.hide();this._queueCallback(()=>{this._element.classList.remove(d,h),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new l).reset(),t.trigger(this._element,x)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new n({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():t.trigger(this._element,y)}:null})}_initializeFocusTrap(){return new i({trapElement:this._element})}_addEventListeners(){t.on(this._element,w,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():t.trigger(this._element,y))})}static jQueryInterface(e){return this.each(function(){const t=M.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}return t.on(document,_,'[data-bs-toggle="offcanvas"]',function(e){const n=r.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),o.isDisabled(this))return;t.one(n,x,()=>{o.isVisible(this)&&this.focus()});const a=r.findOne(p);a&&a!==n&&M.getInstance(a).hide(),M.getOrCreateInstance(n).toggle(this)}),t.on(window,u,()=>{for(const e of r.find(p))M.getOrCreateInstance(e).show()}),t.on(window,b,()=>{for(const e of r.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&M.getOrCreateInstance(e).hide()}),a.enableDismissTrigger(M),o.defineJQueryPlugin(M),M}(r(11),r(956),r(411),r(877),r(248),r(936),r(35),r(673))},13(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.tab",i=`hide${a}`,o=`hidden${a}`,l=`show${a}`,s=`shown${a}`,c=`click${a}`,u=`keydown${a}`,d=`load${a}`,f="ArrowLeft",h="ArrowRight",p="ArrowUp",m="ArrowDown",g="Home",v="End",y="active",x="fade",b="show",_=".dropdown-toggle",w=`:not(${_})`,T='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',k=`.nav-link${w}, .list-group-item${w}, [role="tab"]${w}, ${T}`,M=`.${y}[data-bs-toggle="tab"], .${y}[data-bs-toggle="pill"], .${y}[data-bs-toggle="list"]`;class A extends e{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),t.on(this._element,u,e=>this._keydown(e)))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const r=this._getActiveElem(),n=r?t.trigger(r,i,{relatedTarget:e}):null;t.trigger(e,l,{relatedTarget:r}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(r,e),this._activate(e,r))}_activate(e,n){if(!e)return;e.classList.add(y),this._activate(r.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),t.trigger(e,s,{relatedTarget:n})):e.classList.add(b)},e,e.classList.contains(x))}_deactivate(e,n){if(!e)return;e.classList.remove(y),e.blur(),this._deactivate(r.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),t.trigger(e,o,{relatedTarget:n})):e.classList.remove(b)},e,e.classList.contains(x))}_keydown(e){if(![f,h,p,m,g,v].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(e=>!n.isDisabled(e));let r;if([g,v].includes(e.key))r=t[e.key===g?0:t.length-1];else{const a=[h,m].includes(e.key);r=n.getNextActiveElement(t,e.target,a,!0)}r&&(r.focus({preventScroll:!0}),A.getOrCreateInstance(r).show())}_getChildren(){return r.find(k,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=r.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const a=(e,a)=>{const i=r.findOne(e,n);i&&i.classList.toggle(a,t)};a(_,y),a(".dropdown-menu",b),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(y)}_getInnerElement(e){return e.matches(k)?e:r.findOne(k,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each(function(){const t=A.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}return t.on(document,c,T,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),n.isDisabled(this)||A.getOrCreateInstance(this).show()}),t.on(window,d,()=>{for(const e of r.find(M))A.getOrCreateInstance(e)}),n.defineJQueryPlugin(A),A}(r(11),r(956),r(411),r(35))},653(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.toast",i=`mouseover${a}`,o=`mouseout${a}`,l=`focusin${a}`,s=`focusout${a}`,c=`hide${a}`,u=`hidden${a}`,d=`show${a}`,f=`shown${a}`,h="hide",p="show",m="showing",g={animation:"boolean",autohide:"boolean",delay:"number"},v={animation:!0,autohide:!0,delay:5e3};class y extends e{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return v}static get DefaultType(){return g}static get NAME(){return"toast"}show(){if(t.trigger(this._element,d).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(h),n.reflow(this._element),this._element.classList.add(p,m),this._queueCallback(()=>{this._element.classList.remove(m),t.trigger(this._element,f),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown())return;if(t.trigger(this._element,c).defaultPrevented)return;this._element.classList.add(m),this._queueCallback(()=>{this._element.classList.add(h),this._element.classList.remove(m,p),t.trigger(this._element,u)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(p),super.dispose()}isShown(){return this._element.classList.contains(p)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){t.on(this._element,i,e=>this._onInteraction(e,!0)),t.on(this._element,o,e=>this._onInteraction(e,!1)),t.on(this._element,l,e=>this._onInteraction(e,!0)),t.on(this._element,s,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=y.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}})}}return r.enableDismissTrigger(y),n.defineJQueryPlugin(y),y}(r(11),r(956),r(248),r(35))},877(e,t,r){e.exports=function(e,t,r){"use strict";const n="backdrop",a="show",i=`mousedown.bs.${n}`,o={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},l={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};return class extends t{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return o}static get DefaultType(){return l}static get NAME(){return n}show(e){if(!this._config.isVisible)return void r.execute(e);this._append();const t=this._getElement();this._config.isAnimated&&r.reflow(t),t.classList.add(a),this._emulateAnimation(()=>{r.execute(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(a),this._emulateAnimation(()=>{this.dispose(),r.execute(e)})):r.execute(e)}dispose(){this._isAppended&&(e.off(this._element,i),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=r.getElement(e.rootElement),e}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),e.on(t,i,()=>{r.execute(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){r.executeAfterTransition(e,this._getElement(),this._config.isAnimated)}}}(r(956),r(105),r(35))},248(e,t,r){!function(e,t,r,n){"use strict";e.enableDismissTrigger=(e,a="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,o=e.NAME;t.on(document,i,`[data-bs-dismiss="${o}"]`,function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),n.isDisabled(this))return;const i=r.getElementFromSelector(this)||this.closest(`.${o}`);e.getOrCreateInstance(i)[a]()})},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t,r(956),r(411),r(35))},105(e,t,r){e.exports=function(e,t){"use strict";return class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(r,n){const a=t.isElement(n)?e.getDataAttribute(n,"config"):{};return{...this.constructor.Default,..."object"==typeof a?a:{},...t.isElement(n)?e.getDataAttributes(n):{},..."object"==typeof r?r:{}}}_typeCheckConfig(e,r=this.constructor.DefaultType){for(const[n,a]of Object.entries(r)){const r=e[n],i=t.isElement(r)?"element":t.toType(r);if(!new RegExp(a).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${a}".`)}}}}(r(333),r(35))},936(e,t,r){e.exports=function(e,t,r){"use strict";const n=".bs.focustrap",a=`focusin${n}`,i=`keydown.tab${n}`,o="backward",l={autofocus:!0,trapElement:null},s={autofocus:"boolean",trapElement:"element"};return class extends r{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return l}static get DefaultType(){return s}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),e.off(document,n),e.on(document,a,e=>this._handleFocusin(e)),e.on(document,i,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,e.off(document,n))}_handleFocusin(e){const{trapElement:r}=this._config;if(e.target===document||e.target===r||r.contains(e.target))return;const n=t.focusableChildren(r);0===n.length?r.focus():this._lastTabNavDirection===o?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?o:"forward")}}}(r(956),r(411),r(105))},35(e,t){!function(e){"use strict";const t="transitionend",r=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),n=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e);const n=Number.parseFloat(t),a=Number.parseFloat(r);return n||a?(t=t.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(r))):0},a=e=>{e.dispatchEvent(new Event(t))},i=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),o=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?o(e.parentNode):null},l=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,s=[],c=e=>{"loading"===document.readyState?(s.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of s)e()}),s.push(e)):e()},u=(e,t=[],r=e)=>"function"==typeof e?e.call(...t):r;e.defineJQueryPlugin=e=>{c(()=>{const t=l();if(t){const r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}})},e.execute=u,e.executeAfterTransition=(e,r,i=!0)=>{if(!i)return void u(e);const o=n(r)+5;let l=!1;const s=({target:n})=>{n===r&&(l=!0,r.removeEventListener(t,s),u(e))};r.addEventListener(t,s),setTimeout(()=>{l||a(r)},o)},e.findShadowRoot=o,e.getElement=e=>i(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(r(e)):null,e.getNextActiveElement=(e,t,r,n)=>{const a=e.length;let i=e.indexOf(t);return-1===i?!r&&n?e[a-1]:e[0]:(i+=r?1:-1,n&&(i=(i+a)%a),e[Math.max(0,Math.min(i,a-1))])},e.getTransitionDurationFromElement=n,e.getUID=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},e.getjQuery=l,e.isDisabled=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),e.isElement=i,e.isRTL=()=>"rtl"===document.documentElement.dir,e.isVisible=e=>{if(!i(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),r=e.closest("details:not([open])");if(!r)return t;if(r!==e){const t=e.closest("summary");if(t&&t.parentNode!==r)return!1;if(null===t)return!1}return t},e.noop=()=>{},e.onDOMContentLoaded=c,e.parseSelector=r,e.reflow=e=>{e.offsetHeight},e.toType=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),e.triggerTransitionEnd=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)},673(e,t,r){e.exports=function(e,t,r){"use strict";const n=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",a=".sticky-top",i="padding-right",o="margin-right";return class{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,i,t=>t+e),this._setElementAttributes(n,i,t=>t+e),this._setElementAttributes(a,o,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,i),this._resetElementAttributes(n,i),this._resetElementAttributes(a,o)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){const n=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const a=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${r(Number.parseFloat(a))}px`)})}_saveInitialAttribute(t,r){const n=t.style.getPropertyValue(r);n&&e.setDataAttribute(t,r,n)}_resetElementAttributes(t,r){this._applyManipulationCallback(t,t=>{const n=e.getDataAttribute(t,r);null!==n?(e.removeDataAttribute(t,r),t.style.setProperty(r,n)):t.style.removeProperty(r)})}_applyManipulationCallback(e,n){if(r.isElement(e))n(e);else for(const r of t.find(e,this._element))n(r)}}}(r(333),r(411),r(35))},575(e){var t,r;t="undefined"!=typeof self?self:this,r=()=>{"use strict";var e,t,r,n,a,i,o,l,s,c,u,d,f,h,p,m,g,v,y,x,b,_,w,T,k,M,A,E,S,C,L,O,D,I,P,N,R,F,z,B,j,H,q,Y,V,U,$,W,G,X,Z,J,K,Q,ee,te,re,ne,ae,ie,oe,le,se,ce,ue,de,fe,he,pe,me,ge,ve,ye,xe,be,_e,we,Te,ke,Me,Ae,Ee,Se,Ce,Le,Oe,De,Ie,Pe,Ne,Re,Fe,ze,Be,je,He,qe,Ye,Ve,Ue,$e,We,Ge,Xe,Ze,Je,Ke,Qe,et,tt,rt,nt,at,it,ot,lt,st,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,xt,bt,_t,wt,Tt,kt,Mt,At,Et,St,Ct,Lt,Ot,Dt,It,Pt,Nt,Rt,Ft,zt,Bt,jt,Ht,qt,Yt,Vt,Ut,$t,Wt,Gt,Xt,Zt,Jt,Kt,Qt,er,tr,rr,nr,ar,ir,or,lr,sr,cr,ur,dr,fr,hr,pr,mr,gr,vr,yr,xr,br,_r,wr,Tr,kr,Mr,Ar,Er,Sr,Cr,Lr,Or,Dr,Ir,Pr,Nr,Rr,Fr,zr,Br,jr,Hr,qr,Yr,Vr,Ur,$r,Wr,Gr,Xr,Zr,Jr,Kr,Qr,en,tn,rn,nn,an,on,ln,sn,cn,un,dn,fn,hn,pn,mn,gn,vn,yn,xn,bn,_n,wn,Tn,kn,Mn,An,En,Sn,Cn,Ln,On,Dn,In,Pn,Nn,Rn,Fn,zn,Bn,jn,Hn,qn,Yn,Vn,Un,$n,Wn,Gn,Xn,Zn,Jn,Kn,Qn,ea,ta,ra,na,aa,ia,oa,la,sa,ca,ua,da,fa,ha,pa,ma,ga,va,ya,xa,ba,_a,wa,Ta,ka,Ma,Aa,Ea,Sa,Ca,La,Oa,Da,Ia,Pa,Na,Ra,Fa,za,Ba,ja,Ha,qa,Ya,Va,Ua,$a,Wa,Ga,Xa,Za,Ja,Ka,Qa,ei,ti,ri,ni,ai,ii,oi,li,si,ci,ui,di,fi,hi,pi,mi,gi,vi,yi,xi,bi,_i,wi,Ti,ki,Mi,Ai,Ei,Si,Ci,Li,Oi,Di,Ii,Pi,Ni,Ri,Fi,zi,Bi,ji,Hi,qi,Yi,Vi,Ui,$i,Wi,Gi,Xi,Zi,Ji,Ki,Qi,eo,to,ro,no,ao,io,oo,lo,so,co,uo,fo,ho,po,mo,go,vo,yo,xo,bo,_o,wo,To,ko,Mo,Ao,Eo,So,Co,Lo,Oo=(e=Object.defineProperty,t=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,l=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&o(e,r,t[r]);if(n)for(var r of n(t))i.call(t,r)&&o(e,r,t[r]);return e},s=(e,n)=>t(e,r(n)),u=(c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))(e=>{e.version="3.4.0"}),d=c((e,t)=>{var r,n;r="Promise",(n="undefined"!=typeof window?window:e)[r]=n[r]||function(){var e,t,r,n=Object.prototype.toString,a="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(t){e=function(e,t,r){return e[t]=r,e}}function i(e,n){r.add(e,n),t||(t=a(r.drain))}function o(e){var t,r=typeof e;return null!=e&&("object"==r||"function"==r)&&(t=e.then),"function"==typeof t&&t}function l(){for(var e=0;e0&&i(l,r))}catch(e){u.call(new f(r),e)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&i(l,t))}function d(e,t,r,n){for(var a=0;a{(function(){var e={version:"3.8.2"},r=[].slice,n=function(e){return r.call(e)},a=self.document;function i(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(a)try{n(a.documentElement.childNodes)[0].nodeType}catch(e){n=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var l=this.Element.prototype,s=l.setAttribute,c=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,d=u.setProperty;l.setAttribute=function(e,t){s.call(this,e,t+"")},l.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){d.call(this,e,t+"",r)}}function f(e,t){return et?1:e>=t?0:NaN}function h(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function m(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}e.ascending=f,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},e.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},e.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=a=n;break}for(;++in&&(r=n),a=n){r=a=n;break}for(;++in&&(r=n),a1)return o/(s-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};var g=m(f);function v(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return f(e(t),r)}:e)},e.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var y=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function b(){this._=Object.create(null)}function _(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function w(e){return"\0"===(e+="")[0]?e.slice(1):e}function T(e){return _(e)in this._}function k(e){return(e=_(e))in this._&&delete this._[e]}function M(){var e=[];for(var t in this._)e.push(w(t));return e}function A(){var e=0;for(var t in this._)++e;return e}function E(){for(var e in this._)return!1;return!0}function S(){this._=Object.create(null)}function C(e){return e}function L(e,t,r){return function(){var n=r.apply(t,arguments);return n===t?e:n}}function O(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=D.length;rt;)a.push(n/i);else for(;(n=e+r*++o)=a.length)return r?r.call(n,i):t?i.sort(t):i;for(var s,c,u,d,f=-1,h=i.length,p=a[l++],m=new b;++f=a.length)return e;var r=[],n=i[t++];return e.forEach(function(e,n){r.push({key:e,values:l(n,t)})}),n?r.sort(function(e,t){return n(e.key,t.key)}):r}return n.map=function(e,t){return o(t,e,0)},n.entries=function(t){return l(o(e.map,t,0),0)},n.key=function(e){return a.push(e),n},n.sortKeys=function(e){return i[a.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new S;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(B,"\\$&")};var B=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,j={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function H(e){return j(e,U),e}var q=function(e,t){return t.querySelector(e)},Y=function(e,t){return t.querySelectorAll(e)},V=function(e,t){var r=e.matches||e[O(e,"matchesSelector")];return(V=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(q=function(e,t){return Sizzle(e,t)[0]||null},Y=Sizzle,V=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var U=e.selection.prototype=[];function $(e){return"function"==typeof e?e:function(){return q(e,this)}}function W(e){return"function"==typeof e?e:function(){return Y(e,this)}}U.select=function(e){var t,r,n,a,i=[];e=$(e);for(var o=-1,l=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),X.hasOwnProperty(r)?{space:X[r],local:e}:e}},U.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each(Z(r,t[r]));return this}return this.each(Z(t,r))},U.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=Q(e)).length,a=-1;if(t=r.classList){for(;++a=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},U.sort=function(e){e=se.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(t=t.slice(0,o));var s=he.get(t);function c(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return s&&(t=s,l=me),o?r?function(){var e=l(r,n(arguments));c.call(this),this.addEventListener(t,this[i]=e,e.$=a),e._=r}:c:r?I:function(){var r,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var a in this)if(r=a.match(n)){var i=this[a];this.removeEventListener(r[1],i,i.$),delete this[a]}}}e.selection.enter=ue,e.selection.enter.prototype=de,de.append=U.append,de.empty=U.empty,de.node=U.node,de.call=U.call,de.size=U.size,de.select=function(e){for(var t,r,n,a,i,o=[],l=-1,s=this.length;++l=t&&(t=a+1);!(o=l[t])&&++t1?Ae:e<-1?-Ae:Math.asin(e)}function Oe(e){return((e=Math.exp(e))+1/e)/2}var De=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],l=t[0],s=t[1],c=t[2],u=l-a,d=s-i,f=u*u+d*d;if(f<1e-12)n=Math.log(c/o)/De,r=function(e){return[a+e*u,i+e*d,o*Math.exp(De*e*n)]};else{var h=Math.sqrt(f),p=(c*c-o*o+4*f)/(2*o*2*h),m=(c*c-o*o-4*f)/(2*c*2*h),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/De,r=function(e){var t=e*n,r=Oe(g),l=o/(2*h)*(r*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(De*t+g)-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[a+l*u,i+l*d,o*r/Oe(De*t+g)]}}return r.duration=1e3*n,r},e.behavior.zoom=function(){var t,r,n,i,l,s,c,u,d,f={x:0,y:0,k:1},h=[960,500],p=Ne,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=z(w,"zoomstart","zoom","zoomend");function w(e){e.on(v,O).on(Pe+".zoom",I).on("dblclick.zoom",P).on(b,D)}function T(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function k(e){f.k=Math.max(p[0],Math.min(p[1],e))}function M(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function A(t,n,a,i){t.__chart__={x:f.x,y:f.y,k:f.k},k(Math.pow(2,i)),M(r=n,a),t=e.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function E(){c&&c.domain(s.range().map(function(e){return(e-f.x)/f.k}).map(s.invert)),d&&d.domain(u.range().map(function(e){return(e-f.y)/f.k}).map(u.invert))}function S(e){g++||e({type:"zoomstart"})}function C(e){E(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function L(e){--g||(e({type:"zoomend"}),r=null)}function O(){var t=this,r=_.of(t,arguments),n=0,a=e.select(o(t)).on(y,function(){n=1,M(e.mouse(t),i),C(r)}).on(x,function(){a.on(y,null).on(x,null),l(n),L(r)}),i=T(e.mouse(t)),l=ye(t);$a.call(t),S(r)}function D(){var t,r=this,n=_.of(r,arguments),a={},i=0,o=".zoom-"+e.event.changedTouches[0].identifier,s="touchmove"+o,c="touchend"+o,u=[],d=e.select(r),h=ye(r);function p(){var n=e.touches(r);return t=f.k,n.forEach(function(e){e.identifier in a&&(a[e.identifier]=T(e))}),n}function m(){var t=e.event.target;e.select(t).on(s,g).on(c,y),u.push(t);for(var n=e.event.changedTouches,o=0,d=n.length;o1){v=h[0];var x=h[1],b=v[0]-x[0],_=v[1]-x[1];i=b*b+_*_}}function g(){var o,s,c,u,d=e.touches(r);$a.call(r);for(var f=0,h=d.length;f360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new Qe(i(e+120),i(e),i(e-120))}function je(t,r,n){return this instanceof je?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof je?new je(t.h,t.c,t.l):function(e,t,r){return e>0?new je(Math.atan2(r,t)*Se,Math.sqrt(t*t+r*r),e):new je(NaN,NaN,e)}(t instanceof Ye?t.l:(t=ot((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new je(t,r,n)}ze.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,this.l/e)},ze.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,e*this.l)},ze.rgb=function(){return Be(this.h,this.s,this.l)},e.hcl=je;var He=je.prototype=new Re;function qe(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Ye(r,Math.cos(e*=Ee)*t,Math.sin(e)*t)}function Ye(e,t,r){return this instanceof Ye?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Ye?new Ye(e.l,e.a,e.b):e instanceof je?qe(e.h,e.c,e.l):ot((e=Qe(e)).r,e.g,e.b):new Ye(e,t,r)}He.brighter=function(e){return new je(this.h,this.c,Math.min(100,this.l+Ve*(arguments.length?e:1)))},He.darker=function(e){return new je(this.h,this.c,Math.max(0,this.l-Ve*(arguments.length?e:1)))},He.rgb=function(){return qe(this.h,this.c,this.l).rgb()},e.lab=Ye;var Ve=18,Ue=.95047,$e=1,We=1.08883,Ge=Ye.prototype=new Re;function Xe(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new Qe(Ke(3.2404542*(a=Ze(a)*Ue)-1.5371385*(n=Ze(n)*$e)-.4985314*(i=Ze(i)*We)),Ke(-.969266*a+1.8760108*n+.041556*i),Ke(.0556434*a-.2040259*n+1.0572252*i))}function Ze(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Je(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Ke(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Qe(e,t,r){return this instanceof Qe?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof Qe?new Qe(e.r,e.g,e.b):at(""+e,Qe,Be):new Qe(e,t,r)}function et(e){return new Qe(e>>16,e>>8&255,255&e)}function tt(e){return et(e)+""}Ge.brighter=function(e){return new Ye(Math.min(100,this.l+Ve*(arguments.length?e:1)),this.a,this.b)},Ge.darker=function(e){return new Ye(Math.max(0,this.l-Ve*(arguments.length?e:1)),this.a,this.b)},Ge.rgb=function(){return Xe(this.l,this.a,this.b)},e.rgb=Qe;var rt=Qe.prototype=new Re;function nt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function at(e,t,r){var n,a,i,o=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(st(a[0]),st(a[1]),st(a[2]))}return(i=ct.get(e))?t(i.r,i.g,i.b):(null!=e&&"#"===e.charAt(0)&&!isNaN(i=parseInt(e.slice(1),16))&&(4===e.length?(o=(3840&i)>>4,o|=o>>4,l=240&i,l|=l>>4,s=15&i,s|=s<<4):7===e.length&&(o=(16711680&i)>>16,l=(65280&i)>>8,s=255&i)),t(o,l,s))}function it(e,t,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),l=o-i,s=(o+i)/2;return l?(a=s<.5?l/(o+i):l/(2-o-i),n=e==o?(t-r)/l+(t0&&s<1?0:n),new Fe(n,a,s)}function ot(e,t,r){var n=Je((.4124564*(e=lt(e))+.3575761*(t=lt(t))+.1804375*(r=lt(r)))/Ue),a=Je((.2126729*e+.7151522*t+.072175*r)/$e);return Ye(116*a-16,500*(n-a),200*(a-Je((.0193339*e+.119192*t+.9503041*r)/We)))}function lt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function st(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}rt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=a.call(o,c)}catch(e){return void l.error.call(o,e)}l.load.call(o,e)}else l.error.call(o,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(t){var r=e.event;e.event=t;try{l.progress.call(o,c)}finally{e.event=r}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",o):r},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return a=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(n(arguments)))}}),o.send=function(e,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),c.open(e,t,!0),null!=r&&!("accept"in s)&&(s.accept=r+",*/*"),c.setRequestHeader)for(var i in s)c.setRequestHeader(i,s[i]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=a&&o.on("error",a).on("load",function(e){a(null,e)}),l.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},e.rebind(o,l,"on"),null==i?o:o.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(i))}ct.forEach(function(e,t){ct.set(e,et(t))}),e.functor=ut,e.xhr=dt(C),e.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=ft(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function l(t){return t.map(s).join(e)}function s(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,function(e,n){if(r)return r(e,n-1);var a=function(t){for(var r={},n=e.length,a=0;a=s)return o;if(a)return a=!1,i;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(gt),gt=setTimeout(xt,t)),mt=0):(mt=1,vt(xt))}function bt(){for(var e=Date.now(),t=ht;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function _t(){for(var e,t=ht,r=1/0;t;)t.c?(t.t1&&Ce(e[r[n-2]],e[r[n-1]],e[a])<=0;)--n;r[n++]=a}return r.slice(0,n)}function Mt(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){yt.apply(this,arguments)},e.timer.flush=function(){bt(),_t()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=wt,r=Tt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=ut(t),i=ut(r),o=e.length,l=[],s=[];for(n=0;n=0;--n)h.push(e[l[c[n]][2]]);for(n=+d;nwe)l=l.L;else{if(!((a=i-Yt(l,o))>we)){n>-we?(t=l.P,r=l):a>-we?(t=l,r=l.N):t=r=l;break}if(!l.R){t=l;break}l=l.R}var s=zt(e);if(Dt.insert(t,s),t||r){if(t===r)return Gt(t),r=zt(t.site),Dt.insert(s,r),s.edge=r.edge=Jt(t.site,s.site),Wt(t),void Wt(r);if(!r)return void(s.edge=Jt(t.site,s.site));Gt(t),Gt(r);var c=t.site,u=c.x,d=c.y,f=e.x-u,h=e.y-d,p=r.site,m=p.x-u,g=p.y-d,v=2*(f*g-h*m),y=f*f+h*h,x=m*m+g*g,b={x:(g*y-h*x)/v+u,y:(f*x-m*y)/v+d};Qt(r.edge,c,p,b),s.edge=Jt(c,e,null,b),r.edge=Jt(e,p,null,b),Wt(t),Wt(r)}}function qt(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var l=(r=o.site).x,s=r.y,c=s-t;if(!c)return l;var u=l-n,d=1/i-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-s+c/2+a-i/2)))/d+n:(n+l)/2}function Yt(e,t){var r=e.N;if(r)return qt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Vt(e){this.site=e,this.edges=[]}function Ut(e,t){return t.angle-e.angle}function $t(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Wt(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,l=a.y,s=n.x-o,c=n.y-l,u=i.x-o,d=2*(s*(g=i.y-l)-c*u);if(!(d>=-1e-12)){var f=s*s+c*c,h=u*u+g*g,p=(g*f-c*h)/d,m=(s*h-u*f)/d,g=m+l,v=Rt.pop()||new $t;v.arc=e,v.site=a,v.x=p+o,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,e.circle=v;for(var y=null,x=Pt._;x;)if(v.y=l)return;if(f>p){if(i){if(i.y>=c)return}else i={x:g,y:s};r={x:g,y:c}}else{if(i){if(i.y1)if(f>p){if(i){if(i.y>=c)return}else i={x:(s-a)/n,y:s};r={x:(c-a)/n,y:c}}else{if(i){if(i.y=l)return}else i={x:o,y:n*o+a};r={x:l,y:n*l+a}}else{if(i){if(i.x0)){if(i/=f,f<0){if(i0){if(i>d)return;i>u&&(u=i)}if(i=r-s,f||!(i<0)){if(i/=f,f<0){if(i>d)return;i>u&&(u=i)}else if(f>0){if(i0)){if(i/=h,h<0){if(i0){if(i>d)return;i>u&&(u=i)}if(i=n-c,h||!(i<0)){if(i/=h,h<0){if(i>d)return;i>u&&(u=i)}else if(h>0){if(i0&&(a.a={x:s+u*f,y:c+u*h}),d<1&&(a.b={x:s+d*f,y:c+d*h}),a}}}}}}(e[0][0],e[0][1],e[1][0],e[1][1]),a=r.length;a--;)(!Xt(t=r[a],e)||!n(t)||y(t.a.x-t.b.x)we||y(a-r)>we)&&(l.splice(o,0,new er(Kt(i.site,u,y(n-d)we?{x:d,y:y(t-d)we?{x:y(r-p)we?{x:f,y:y(t-f)we?{x:y(r-h)=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[l]}),t}function l(e){return e.map(function(e,t){return{x:Math.round(n(e,t)/we)*we,y:Math.round(a(e,t)/we)*we,i:t}})}return o.links=function(e){return or(l(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(e){var t=[];return or(l(e)).cells.forEach(function(r,n){for(var a,i=r.site,o=r.edges.sort(Ut),l=-1,s=o.length,c=o[s-1].edge,u=c.l===i?c.r:c.l;++li&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,s.push({i:o,x:mr(r,n)})),i=yr.lastIndex;return im&&(m=s.x),s.y>g&&(g=s.y),c.push(s.x),u.push(s.y);else for(d=0;dm&&(m=b),_>g&&(g=_),c.push(b),u.push(_)}var w=m-h,T=g-p;function k(e,t,r,n,a,i,o,l){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var s=e.x,c=e.y;if(null!=s)if(y(s-r)+y(c-n)<.01)M(e,t,r,n,a,i,o,l);else{var u=e.point;e.x=e.y=e.point=null,M(e,u,s,c,a,i,o,l),M(e,t,r,n,a,i,o,l)}else e.x=r,e.y=n,e.point=t}else M(e,t,r,n,a,i,o,l)}function M(e,t,r,n,a,i,o,l){var s=.5*(a+o),c=.5*(i+l),u=r>=s,d=n>=c,f=d<<1|u;e.leaf=!1,u?a=s:o=s,d?i=c:l=c,k(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,l)}w>T?g=p+w:m=h+T;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){k(A,e,+v(e,++d),+x(e,d),h,p,m,g)},visit:function(e){fr(e,A,h,p,m,g)},find:function(e){return function(e,t,r,n,a,i,o){var l,s=1/0;return function e(c,u,d,f,h){if(!(u>i||d>o||f=_)<<1|t>=b,T=w+4;w=0&&!(n=e.interpolators[a](t,r)););return n}function br(e,t){var r,n=[],a=[],i=e.length,o=t.length,l=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Cr(e){return 1-Math.cos(e*Ae)}function Lr(e){return Math.pow(2,10*(e-1))}function Or(e){return 1-Math.sqrt(1-e*e)}function Dr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Ir(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Pr(e){var t=[e.a,e.b],r=[e.c,e.d],n=Rr(t),a=Nr(t,r),i=Rr(function(e,t,r){return e[0]+=r*t[0],e[1]+=r*t[1],e}(r,t,-a))||0;t[0]*r[1]=0?e.slice(0,t):e,a=t>=0?e.slice(t+1):"in";return n=wr.get(n)||_r,function(e){return function(t){return t<=0?0:t>=1?1:e(t)}}((a=Tr.get(a)||C)(n.apply(null,r.call(arguments,1))))},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,a=t.c,i=t.l,o=r.h-n,l=r.c-a,s=r.l-i;return isNaN(l)&&(l=0,a=isNaN(a)?r.c:a),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return qe(n+o*e,a+l*e,i+s*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,a=t.s,i=t.l,o=r.h-n,l=r.s-a,s=r.l-i;return isNaN(l)&&(l=0,a=isNaN(a)?r.s:a),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Be(n+o*e,a+l*e,i+s*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,a=t.a,i=t.b,o=r.l-n,l=r.a-a,s=r.b-i;return function(e){return Xe(n+o*e,a+l*e,i+s*e)+""}},e.interpolateRound=Ir,e.transform=function(t){var r=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new Pr(t?t.matrix:Fr)})(t)},Pr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Fr={a:1,b:0,c:0,d:1,e:0,f:0};function zr(e){return e.length?e.pop()+",":""}function Br(t,r){var n=[],a=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:mr(e[0],t[0])},{i:a-2,x:mr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,n,a),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(zr(r)+"rotate(",null,")")-2,x:mr(e,t)})):t&&r.push(zr(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,a),function(e,t,r,n){e!==t?n.push({i:r.push(zr(r)+"skewX(",null,")")-2,x:mr(e,t)}):t&&r.push(zr(r)+"skewX("+t+")")}(t.skew,r.skew,n,a),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(zr(r)+"scale(",null,",",null,")");n.push({i:a-4,x:mr(e[0],t[0])},{i:a-2,x:mr(e[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(zr(r)+"scale("+t+")")}(t.scale,r.scale,n,a),t=r=null,function(e){for(var t,r=-1,i=a.length;++r0?n=e:(t.c=null,t.t=NaN,t=null,s.end({type:"end",alpha:n=0})):e>0&&(s.start({type:"start",alpha:n=e}),t=yt(l.tick)),l):n},l.start=function(){var e,t,r,n=v.length,s=y.length,u=c[0],p=c[1];for(e=0;e=0;)r.push(a[n])}function en(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(u=c[s]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return en(a,function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)}),l}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(Qr(e,function(e){e.children&&(e.value=0)}),en(e,function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)})),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,t,r,a){var i=e.children;if(e.x=t,e.y=e.depth*a,e.dx=r,e.dy=a,i&&(o=i.length)){var o,l,s,c=-1;for(r=e.value?r/e.value:0;++cl&&(l=n),o.push(n)}for(r=0;ra&&(n=r,a=t);return n}function mn(e){return e.reduce(gn,0)}function gn(e,t){return e+t[1]}function vn(e,t){return yn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function yn(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function xn(t){return[e.min(t),e.max(t)]}function bn(e,t){return e.value-t.value}function _n(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function wn(e,t){e._pack_next=t,t._pack_prev=e}function Tn(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function kn(e){if((t=e.children)&&(s=t.length)){var t,r,n,a,i,o,l,s,c=1/0,u=-1/0,d=1/0,f=-1/0;if(t.forEach(Mn),(r=t[0]).x=-r.r,r.y=0,x(r),s>1&&((n=t[1]).x=n.r,n.y=0,x(n),s>2))for(Sn(r,n,a=t[2]),x(a),_n(r,a),r._pack_prev=a,_n(a,n),n=r._pack_next,i=3;i0)for(o=-1;++o=d[0]&&s<=d[1]&&((l=c[e.bisect(f,s,1,p)-1]).y+=m,l.push(i[o]));return c}return i.value=function(e){return arguments.length?(r=e,i):r},i.range=function(e){return arguments.length?(n=ut(e),i):n},i.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return yn(t,e)}:ut(e),i):a},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(bn),n=0,a=[1,1];function i(e,i){var o=r.call(this,e,i),l=o[0],s=a[0],c=a[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(l.x=l.y=0,en(l,function(e){e.r=+u(e.value)}),en(l,kn),n){var d=n*(t?1:Math.max(2*l.r/s,2*l.r/c))/2;en(l,function(e){e.r+=d}),en(l,kn),en(l,function(e){e.r-=d})}return En(l,s/2,c/2,t?1:1/Math.max(2*l.r/s,2*l.r/c)),o}return i.size=function(e){return arguments.length?(a=e,i):a},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(e){return arguments.length?(n=+e,i):n},Kr(i,r)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Cn,n=[1,1],a=null;function i(e,i){var c=t.call(this,e,i),u=c[0],d=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var a,i=t.children,o=0,l=i.length;oh.x&&(h=e),e.depth>p.depth&&(p=e)});var m=r(f,h)/2-f.x,g=n[0]/(h.x+r(h,f)/2+m),v=n[1]/(p.depth||1);Qr(u,function(e){e.x=(e.x+m)*g,e.y=e.depth*v})}return c}function o(e){var t=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(t[0].z+t[t.length-1].z)/2;a?(e.z=a.z+r(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+r(e._,a._));e.parent.A=function(e,t,n){if(t){for(var a,i=e,o=e,l=t,s=i.parent.children[0],c=i.m,u=o.m,d=l.m,f=s.m;l=On(l),i=Ln(i),l&&i;)s=Ln(s),(o=On(o)).a=e,(a=l.z+d-i.z-c+r(l._,i._))>0&&(Dn(In(l,e,n),e,a),c+=a,u+=a),d+=l.m,c+=i.m,f+=s.m,u+=o.m;l&&!On(o)&&(o.t=l,o.m+=d-u),i&&!Ln(s)&&(s.t=i,s.m+=c-f,n=e)}return n}(e,a,e.parent.A||n[0])}function l(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e)?s:null,i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null==(n=e)?null:s,i):a?n:null},Kr(i,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Cn,n=[1,1],a=!1;function i(i,o){var l,s=t.call(this,i,o),c=s[0],u=0;en(c,function(t){var n=t.children;n&&n.length?(t.x=function(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}(n),t.y=function(t){return 1+e.max(t,function(e){return e.y})}(n)):(t.x=l?u+=r(t,l):0,t.y=0,l=t)});var d=Pn(c),f=Nn(c),h=d.x-r(d,f)/2,p=f.x+r(f,d)/2;return en(c,a?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-h)/(p-h)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),s}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e),i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null!=(n=e),i):a?n:null},Kr(i,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=Rn,l=!1,s="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,a=-1,i=e.length;++a0;)l.push(r=c[a-1]),l.area+=r.area,"squarify"!==s||(n=h(l,m))<=f?(c.pop(),f=n):(l.area-=l.pop().area,p(l,m,i,!1),m=Math.min(i.dx,i.dy),l.length=l.area=0,f=1/0);l.length&&(p(l,m,i,!0),l.length=l.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(u(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(p(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(f)}}function h(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,l=e.length;++oa&&(a=r));return t*=t,(n*=n)?Math.max(t*a*c/n,n/(t*i*c)):1/0}function p(e,t,r,a){var i,o=-1,l=e.length,s=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((a||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Vn:jn,s=n?Hr:jr;return a=o(e,t,s,r),i=o(t,e,s,xr),l}function l(e){return a(e)}return l.invert=function(e){return i(e)},l.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},l.range=function(e){return arguments.length?(t=e,o()):t},l.rangeRound=function(e){return l.range(e).interpolate(Ir)},l.clamp=function(e){return arguments.length?(n=e,o()):n},l.interpolate=function(e){return arguments.length?(r=e,o()):r},l.ticks=function(t){return Xn(e,t)},l.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},l.nice=function(t){return Wn(e,t),o()},l.copy=function(){return Un(e,t,r,n)},o()}function $n(t,r){return e.rebind(t,r,"range","rangeRound","interpolate","clamp")}function Wn(e,t){return Hn(e,qn(Gn(e,t)[2])),Hn(e,qn(Gn(e,t)[2])),e}function Gn(e,t){null==t&&(t=10);var r=zn(e),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),i=t/n*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function Xn(t,r){return e.range.apply(e,Gn(t,r))}function Zn(e,t,r,n){function a(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function i(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(a(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(a)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(a)),o):t},o.nice=function(){var t=Hn(n.map(a),r?Math:Jn);return e.domain(t),n=t.map(i),o},o.ticks=function(){var e=zn(n),o=[],l=e[0],s=e[1],c=Math.floor(a(l)),u=Math.ceil(a(s)),d=t%1?2:t;if(isFinite(u-c)){if(r){for(;c0;f--)o.push(i(c)*f);for(c=0;o[c]s;u--);o=o.slice(c,u)}return o},o.copy=function(){return Zn(e.copy(),t,r,n)},$n(o,e)}e.scale.linear=function(){return Un([0,1],[0,1],xr,!1)},e.scale.log=function(){return Zn(e.scale.linear().domain([0,1]),10,!0,[1,10])};var Jn={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Kn(e,t,r){var n=Qn(t),a=Qn(1/t);function i(t){return e(n(t))}return i.invert=function(t){return a(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),i):r},i.ticks=function(e){return Xn(r,e)},i.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},i.nice=function(e){return i.domain(Wn(r,e))},i.exponent=function(o){return arguments.length?(n=Qn(t=o),a=Qn(1/t),e.domain(r.map(n)),i):t},i.copy=function(){return Kn(e.copy(),t,r)},$n(i,e)}function Qn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ea(t,r){var n,a,i;function o(e){return a[((n.get(e)||("range"===r.t?n.set(e,t.push(e)):NaN))-1)%a.length]}function l(r,n){return e.range(t.length).map(function(e){return r+n*e})}return o.domain=function(e){if(!arguments.length)return t;t=[],n=new b;for(var a,i=-1,l=e.length;++i0?n[e-1]:t[0],ed?0:1;if(c=Me)return s(c,h)+(l?s(l,1-h):"")+"Z";var p,m,g,v,y,x,b,_,w,T,k,M,A=0,E=0,S=[];if((v=(+o.apply(this,arguments)||0)/2)&&(g=n===ua?Math.sqrt(l*l+c*c):+n.apply(this,arguments),h||(E*=-1),c&&(E=Le(g/c*Math.sin(v))),l&&(A=Le(g/l*Math.sin(v)))),c){y=c*Math.cos(u+E),x=c*Math.sin(u+E),b=c*Math.cos(d-E),_=c*Math.sin(d-E);var C=Math.abs(d-u-2*E)<=Te?0:1;if(E&&ga(y,x,b,_)===h^C){var L=(u+d)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(l){w=l*Math.cos(d-A),T=l*Math.sin(d-A),k=l*Math.cos(u+A),M=l*Math.sin(u+A);var O=Math.abs(u-d+2*A)<=Te?0:1;if(A&&ga(w,T,k,M)===1-h^O){var D=(u+d)/2;w=l*Math.cos(D),T=l*Math.sin(D),k=M=null}}else w=T=0;if(f>we&&(p=Math.min(Math.abs(c-l)/2,+r.apply(this,arguments)))>.001){m=l0?0:1}function va(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],l=(a?n:-n)/Math.sqrt(i*i+o*o),s=l*o,c=-l*i,u=e[0]+s,d=e[1]+c,f=t[0]+s,h=t[1]+c,p=(u+f)/2,m=(d+h)/2,g=f-u,v=h-d,y=g*g+v*v,x=r-n,b=u*h-f*d,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,T=(-b*g-v*_)/y,k=(b*v+g*_)/y,M=(-b*g+v*_)/y,A=w-p,E=T-m,S=k-p,C=M-m;return A*A+E*E>S*S+C*C&&(w=k,T=M),[[w-s,T-c],[w*r/x,T*r/x]]}function ya(){return!0}function xa(e){var t=wt,r=Tt,n=ya,a=_a,i=a.key,o=.7;function l(i){var l,s=[],c=[],u=-1,d=i.length,f=ut(t),h=ut(r);function p(){s.push("M",a(e(c),o))}for(;++u1&&a.push("H",n[0]),a.join("")},"step-before":Ta,"step-after":ka,basis:Ea,"basis-open":function(e){if(e.length<4)return _a(e);for(var t,r=[],n=-1,a=e.length,i=[0],o=[0];++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);for(r.push(Sa(Oa,i)+","+Sa(Oa,o)),--n;++n9&&(a=3*t/Math.sqrt(a),o[l]=a*r,o[l+1]=a*n);for(l=-1;++l<=s;)a=(e[Math.min(s,l+1)][0]-e[Math.max(0,l-1)][0])/(6*(1+o[l]*o[l])),i.push([a||0,o[l]*a||0]);return i}(e))}});function _a(e){return e.length>1?e.join("L"):e+"Z"}function wa(e){return e.join("L")+"Z"}function Ta(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t1){l=t[1],i=e[s],s++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1];for(var c=2;cTe)+",1 "+t}function s(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=ut(e),i):r},i.source=function(t){return arguments.length?(e=ut(t),i):e},i.target=function(e){return arguments.length?(t=ut(e),i):t},i.startAngle=function(e){return arguments.length?(n=ut(e),i):n},i.endAngle=function(e){return arguments.length?(a=ut(e),i):a},i},e.svg.diagonal=function(){var e=Ra,t=Fa,r=Ba;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,a),l=(i.y+o.y)/2,s=[i,{x:i.x,y:l},{x:o.x,y:l},o];return"M"+(s=s.map(r))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return n.source=function(t){return arguments.length?(e=ut(t),n):e},n.target=function(e){return arguments.length?(t=ut(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=Ba,n=t.projection;return t.projection=function(e){return arguments.length?n(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Ae;return[r*Math.cos(n),r*Math.sin(n)]}}(r=e)):r},t},e.svg.symbol=function(){var e=Ha,t=ja;function r(r,n){return(Ya.get(e.call(this,r,n))||qa)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=ut(t),r):e},r.size=function(e){return arguments.length?(t=ut(e),r):t},r};var Ya=e.map({circle:qa,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ua)),r=t*Ua;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Va),r=t*Va/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Va),r=t*Va/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=Ya.keys();var Va=Math.sqrt(3),Ua=Math.tan(30*Ee);U.transition=function(e){for(var t,r,n=Xa||++Ka,a=ti(e),i=[],o=Za||{time:Date.now(),ease:Sr,delay:0,duration:250},l=-1,s=this.length;++l0;)c[--f].call(e,o);if(i>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}d||(i=a.time,o=yt(function(e){var t=d.delay;if(o.t=t+i,t<=e)return f(e-t);o.c=f},0,i),d=u[n]={tween:new b,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}Ja.call=U.call,Ja.empty=U.empty,Ja.node=U.node,Ja.size=U.size,e.transition=function(t,r){return t&&t.transition?Xa?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Ja,Ja.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=$(e);for(var l=-1,s=this.length;++lrect,.s>rect").attr("width",l[1]-l[0])}function m(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var d,g,v=this,y=e.select(e.event.target),x=n.of(v,arguments),b=e.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&&a,T=!/^(e|w)$/.test(_)&&i,k=y.classed("extent"),M=ye(v),A=e.mouse(v),E=e.select(o(v)).on("keydown.brush",function(){32==e.event.keyCode&&(k||(d=null,A[0]-=l[1],A[1]-=s[1],k=2),R())}).on("keyup.brush",function(){32==e.event.keyCode&&2==k&&(A[0]+=l[1],A[1]+=s[1],k=0,R())});if(e.event.changedTouches?E.on("touchmove.brush",L).on("touchend.brush",D):E.on("mousemove.brush",L).on("mouseup.brush",D),b.interrupt().selectAll("*").interrupt(),k)A[0]=l[0]-A[0],A[1]=s[0]-A[1];else if(_){var S=+/w$/.test(_),C=+/^n/.test(_);g=[l[1-S]-A[0],s[1-C]-A[1]],A[0]=l[S],A[1]=s[C]}else e.event.altKey&&(d=A.slice());function L(){var t=e.mouse(v),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(e.event.altKey?(d||(d=[(l[0]+l[1])/2,(s[0]+s[1])/2]),A[0]=l[+(t[0]{var r,n;r=e,n=function(e){var t=new Date,r=new Date;function n(e,a,i,o){function l(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return l.floor=function(t){return e(t=new Date(+t)),t},l.ceil=function(t){return e(t=new Date(t-1)),a(t,1),e(t),t},l.round=function(e){var t=l(e),r=l.ceil(e);return e-t0))return o;do{o.push(i=new Date(+t)),a(t,n),e(t)}while(i=r)for(;e(r),!t(r);)r.setTime(r-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;a(e,-1),!t(e););else for(;--r>=0;)for(;a(e,1),!t(e););})},i&&(l.count=function(n,a){return t.setTime(+n),r.setTime(+a),e(t),e(r),Math.floor(i(t,r))},l.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?function(t){return o(t)%e===0}:function(t){return l.count(0,t)%e===0}):l:null}),l}var a=n(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?n(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):a:null};var i=a.range,o=1e3,l=6e4,s=36e5,c=864e5,u=6048e5,d=n(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*o)},function(e,t){return(t-e)/o},function(e){return e.getUTCSeconds()}),f=d.range,h=n(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o)},function(e,t){e.setTime(+e+t*l)},function(e,t){return(t-e)/l},function(e){return e.getMinutes()}),p=h.range,m=n(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o-e.getMinutes()*l)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getHours()}),g=m.range,v=n(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*l)/c},function(e){return e.getDate()-1}),y=v.range;function x(e){return n(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*l)/u})}var b=x(0),_=x(1),w=x(2),T=x(3),k=x(4),M=x(5),A=x(6),E=b.range,S=_.range,C=w.range,L=T.range,O=k.range,D=M.range,I=A.range,P=n(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),N=P.range,R=n(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});R.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)}):null};var F=R.range,z=n(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*l)},function(e,t){return(t-e)/l},function(e){return e.getUTCMinutes()}),B=z.range,j=n(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getUTCHours()}),H=j.range,q=n(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/c},function(e){return e.getUTCDate()-1}),Y=q.range;function V(e){return n(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/u})}var U=V(0),$=V(1),W=V(2),G=V(3),X=V(4),Z=V(5),J=V(6),K=U.range,Q=$.range,ee=W.range,te=G.range,re=X.range,ne=Z.range,ae=J.range,ie=n(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),oe=ie.range,le=n(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});le.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null};var se=le.range;e.timeDay=v,e.timeDays=y,e.timeFriday=M,e.timeFridays=D,e.timeHour=m,e.timeHours=g,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=h,e.timeMinutes=p,e.timeMonday=_,e.timeMondays=S,e.timeMonth=P,e.timeMonths=N,e.timeSaturday=A,e.timeSaturdays=I,e.timeSecond=d,e.timeSeconds=f,e.timeSunday=b,e.timeSundays=E,e.timeThursday=k,e.timeThursdays=O,e.timeTuesday=w,e.timeTuesdays=C,e.timeWednesday=T,e.timeWednesdays=L,e.timeWeek=b,e.timeWeeks=E,e.timeYear=R,e.timeYears=F,e.utcDay=q,e.utcDays=Y,e.utcFriday=Z,e.utcFridays=ne,e.utcHour=j,e.utcHours=H,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=z,e.utcMinutes=B,e.utcMonday=$,e.utcMondays=Q,e.utcMonth=ie,e.utcMonths=oe,e.utcSaturday=J,e.utcSaturdays=ae,e.utcSecond=d,e.utcSeconds=f,e.utcSunday=U,e.utcSundays=K,e.utcThursday=X,e.utcThursdays=re,e.utcTuesday=W,e.utcTuesdays=ee,e.utcWednesday=G,e.utcWednesdays=te,e.utcWeek=U,e.utcWeeks=K,e.utcYear=le,e.utcYears=se,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&void 0!==t?e:(r=r||self).d3=r.d3||{})}),p=c((e,t)=>{var r,n;r=e,n=function(e,t){function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function a(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function i(e){var i=e.dateTime,o=e.date,s=e.time,c=e.periods,u=e.days,d=e.shortDays,f=e.months,ye=e.shortMonths,xe=h(c),be=p(c),_e=h(u),we=p(u),Te=h(d),ke=p(d),Me=h(f),Ae=p(f),Ee=h(ye),Se=p(ye),Ce={a:function(e){return d[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ye[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:N,e:N,f:j,H:R,I:F,j:z,L:B,m:H,M:q,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ge,s:ve,S:Y,u:V,U,V:$,w:W,W:G,x:null,X:null,y:X,Y:Z,Z:J,"%":me},Le={a:function(e){return d[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ye[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:K,e:K,f:ne,H:Q,I:ee,j:te,L:re,m:ae,M:ie,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ge,s:ve,S:oe,u:le,U:se,V:ce,w:ue,W:de,x:null,X:null,y:fe,Y:he,Z:pe,"%":me},Oe={a:function(e,t,r){var n=Te.exec(t.slice(r));return n?(e.w=ke[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=_e.exec(t.slice(r));return n?(e.w=we[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Ee.exec(t.slice(r));return n?(e.m=Se[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Me.exec(t.slice(r));return n?(e.m=Ae[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,t,r){return Pe(e,i,t,r)},d:M,e:M,f:O,H:E,I:E,j:A,L,m:k,M:S,p:function(e,t,r){var n=xe.exec(t.slice(r));return n?(e.p=be[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:I,s:P,S:C,u:g,U:v,V:y,w:m,W:x,x:function(e,t,r){return Pe(e,o,t,r)},X:function(e,t,r){return Pe(e,s,t,r)},y:_,Y:b,Z:w,"%":D};function De(e,t){return function(r){var n,a,i,o=[],s=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in c||(c.w=1),"Z"in c?(s=(l=n(a(c.y,0,1))).getUTCDay(),l=s>4||0===s?t.utcMonday.ceil(l):t.utcMonday(l),l=t.utcDay.offset(l,7*(c.V-1)),c.y=l.getUTCFullYear(),c.m=l.getUTCMonth(),c.d=l.getUTCDate()+(c.w+6)%7):(s=(l=r(a(c.y,0,1))).getDay(),l=s>4||0===s?t.timeMonday.ceil(l):t.timeMonday(l),l=t.timeDay.offset(l,7*(c.V-1)),c.y=l.getFullYear(),c.m=l.getMonth(),c.d=l.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),s="Z"in c?n(a(c.y,0,1)).getUTCDay():r(a(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(s+5)%7:c.w+7*c.U-(s+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function Pe(e,t,r,n){for(var a,i,o=0,s=t.length,c=r.length;o=c)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=Oe[a in l?t.charAt(o++):a])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}return Ce.x=De(o,Ce),Ce.X=De(s,Ce),Ce.c=De(i,Ce),Le.x=De(o,Le),Le.X=De(s,Le),Le.c=De(i,Le),{format:function(e){var t=De(e+="",Ce);return t.toString=function(){return e},t},parse:function(e){var t=Ie(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=De(e+="",Le);return t.toString=function(){return e},t},utcParse:function(e){var t=Ie(e+="",!0);return t.toString=function(){return e},t}}}var o,l={"-":"",_:" ",0:"0"},s=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function d(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i68?1900:2e3),r+n[0].length):-1}function w(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function T(e,t,r){var n=s.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function k(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function M(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function A(e,t,r){var n=s.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function E(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function S(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function C(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function L(e,t,r){var n=s.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function O(e,t,r){var n=s.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function D(e,t,r){var n=c.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function I(e,t,r){var n=s.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function P(e,t,r){var n=s.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function N(e,t){return d(e.getDate(),t,2)}function R(e,t){return d(e.getHours(),t,2)}function F(e,t){return d(e.getHours()%12||12,t,2)}function z(e,r){return d(1+t.timeDay.count(t.timeYear(e),e),r,3)}function B(e,t){return d(e.getMilliseconds(),t,3)}function j(e,t){return B(e,t)+"000"}function H(e,t){return d(e.getMonth()+1,t,2)}function q(e,t){return d(e.getMinutes(),t,2)}function Y(e,t){return d(e.getSeconds(),t,2)}function V(e){var t=e.getDay();return 0===t?7:t}function U(e,r){return d(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function $(e,r){var n=e.getDay();return e=n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e),d(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function W(e){return e.getDay()}function G(e,r){return d(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return d(e.getFullYear()%100,t,2)}function Z(e,t){return d(e.getFullYear()%1e4,t,4)}function J(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+d(t/60|0,"0",2)+d(t%60,"0",2)}function K(e,t){return d(e.getUTCDate(),t,2)}function Q(e,t){return d(e.getUTCHours(),t,2)}function ee(e,t){return d(e.getUTCHours()%12||12,t,2)}function te(e,r){return d(1+t.utcDay.count(t.utcYear(e),e),r,3)}function re(e,t){return d(e.getUTCMilliseconds(),t,3)}function ne(e,t){return re(e,t)+"000"}function ae(e,t){return d(e.getUTCMonth()+1,t,2)}function ie(e,t){return d(e.getUTCMinutes(),t,2)}function oe(e,t){return d(e.getUTCSeconds(),t,2)}function le(e){var t=e.getUTCDay();return 0===t?7:t}function se(e,r){return d(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ce(e,r){var n=e.getUTCDay();return e=n>=4||0===n?t.utcThursday(e):t.utcThursday.ceil(e),d(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ue(e){return e.getUTCDay()}function de(e,r){return d(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function fe(e,t){return d(e.getUTCFullYear()%100,t,2)}function he(e,t){return d(e.getUTCFullYear()%1e4,t,4)}function pe(){return"+0000"}function me(){return"%"}function ge(e){return+e}function ve(e){return Math.floor(+e/1e3)}function ye(t){return o=i(t),e.timeFormat=o.format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}ye({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var xe="%Y-%m-%dT%H:%M:%S.%LZ",be=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(xe),_e=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(xe);e.isoFormat=be,e.isoParse=_e,e.timeFormatDefaultLocale=ye,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&void 0!==t?n(e,h()):n((r=r||self).d3=r.d3||{},r.d3)}),m=c((e,t)=>{var r,n;r=e,n=function(e){function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var n,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(e){if(!(t=a.exec(e)))throw new Error("invalid format: "+e);var t;return new o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function o(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,r){var n=t(e,r);if(!n)return e+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}i.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var s={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,r){var a=t(e,r);if(!a)return e+"";var i=a[0],o=a[1],l=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return l===s?i:l>s?i+new Array(l-s+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+t(e,Math.max(0,r+l-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var u,d=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function h(e){var t=void 0===e.grouping||void 0===e.thousands?c:function(e,t){return function(r,n){for(var a=r.length,i=[],o=0,l=e[0],s=0;a>0&&l>0&&(s+l+1>n&&(l=Math.max(1,n-s)),i.push(r.substring(a-=l,a+l)),!((s+=l+1)>n));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}}(d.call(e.grouping,Number),e.thousands+""),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",l=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(d.call(e.numerals,String)),h=void 0===e.percent?"%":e.percent+"",p=void 0===e.minus?"-":e.minus+"",m=void 0===e.nan?"NaN":e.nan+"";function g(e){var r=(e=i(e)).fill,c=e.align,d=e.sign,g=e.symbol,v=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):s[w]||(void 0===b&&(b=12),_=!0,w="g"),(v||"0"===r&&"="===c)&&(v=!0,r="0",c="=");var T="$"===g?a:"#"===g&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===g?o:/[%p]/.test(w)?h:"",M=s[w],A=/[defgprs%]/.test(w);function E(e){var a,i,o,s=T,h=k;if("c"===w)h=M(e)+h,e="";else{var g=(e=+e)<0||1/e<0;if(e=isNaN(e)?m:M(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,a=-1;n0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==d&&(g=!1),s=(g?"("===d?d:p:"-"===d||"("===d?"":d)+s,h=("s"===w?f[8+n/3]:"")+h+(g&&"("===d?")":""),A)for(a=-1,i=e.length;++a(o=e.charCodeAt(a))||o>57){h=(46===o?l+e.slice(a+1):e.slice(a))+h,e=e.slice(0,a);break}}x&&!v&&(e=t(e,1/0));var E=s.length+e.length+h.length,S=E>1)+s+e+h+S.slice(E);break;default:e=S+s+e+h}return u(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),E.toString=function(){return e+""},E}return{format:g,formatPrefix:function(e,t){var n=g(((e=i(e)).type="f",e)),a=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),o=Math.pow(10,-a),l=f[8+a/3];return function(e){return n(o*e)+l}}}}function p(t){return u=h(t),e.format=u.format,e.formatPrefix=u.formatPrefix,u}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=o,e.formatDefaultLocale=p,e.formatLocale=h,e.formatSpecifier=i,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,r(t)-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&void 0!==t?e:(r="undefined"!=typeof globalThis?globalThis:r||self).d3=r.d3||{})}),g=c((e,t)=>{t.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}}),v=c((e,t)=>{var r=g();t.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0===(e=+e)&&r(n))return!1}else if("number"!==t)return!1;return e-e<1}}),y=c((e,t)=>{t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}}),x=c((e,t)=>{var r,n;r=e,n=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256),n=0;n<64;n++)r[t.charCodeAt(n)]=n;e.decode=function(e){var t,n,a,i,o,l=.75*e.length,s=e.length,c=0;"="===e[e.length-1]&&(l--,"="===e[e.length-2]&&l--);var u=new ArrayBuffer(l),d=new Uint8Array(u);for(t=0;t>4,d[c++]=(15&a)<<4|i>>2,d[c++]=(3&i)<<6|63&o;return u},e.encode=function(e){var r,n=new Uint8Array(e),a=n.length,i="";for(r=0;r>2],i+=t[(3&n[r])<<4|n[r+1]>>4],i+=t[(15&n[r+1])<<2|n[r+2]>>6],i+=t[63&n[r+2]];return a%3==2?i=i.substring(0,i.length-1)+"=":a%3==1&&(i=i.substring(0,i.length-2)+"=="),i},Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&void 0!==t?e:(r="undefined"!=typeof globalThis?globalThis:r||self)["base64-arraybuffer"]={})}),b=c((e,t)=>{t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}}),_=c(e=>{var t=x().decode,r=b(),n=Array.isArray,a=ArrayBuffer,i=DataView;function o(e){return a.isView(e)&&!(e instanceof i)}function l(e){return n(e)||o(e)}e.isTypedArray=o,e.isArrayOrTypedArray=l,e.isArray1D=function(e){return!l(e[0])},e.ensureArray=function(e,t){return n(e)||(e=[]),e.length=t,e};var s={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function c(e){return e.constructor===ArrayBuffer}function u(e,t,r){if(l(e)){if(l(e[0])){for(var n=r,a=0;a{var r=v(),n=_().isArrayOrTypedArray;function a(e,t){return function(r){var i,o,l,s,c,u=e;for(s=0;s{var r=w(),n=/^\w*$/;t.exports=function(e,t,a,i){a=a||"name",i=i||"value";var o,l,s,c={};t&&t.length?(s=r(e,t),l=s.get()):l=e,t=t||"";var u={};if(l)for(o=0;o2)return c[t]=2|c[t],f.set(e,null);if(d){for(o=t;o{var r=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,n=/^[^\.\[\]]+$/;t.exports=function(e,t){for(;t;){var a=e.match(r);if(a)e=a[1];else{if(!e.match(n))throw new Error("bad relativeAttr call:"+[e,t]);e=""}if("^"!==t.charAt(0))break;t=t.slice(1)}return e&&"["!==t.charAt(0)?e+"."+t:e+t}}),M=c((e,t)=>{var r=v();t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}}),A=c((e,t)=>{var r=_().isArrayOrTypedArray,n=b();t.exports=function e(t,a){for(var i in a){var o=a[i],l=t[i];if(l!==o)if("_"===i.charAt(0)||"function"==typeof o){if(i in t)continue;t[i]=o}else if(r(o)&&r(l)&&n(o[0])){if("customdata"===i||"ids"===i)continue;for(var s=Math.min(o.length,l.length),c=0;c{t.exports={mod:function(e,t){var r=e%t;return r<0?r+t:r},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}}),S=c((e,t)=>{!function(e){var r=/^\s+/,n=/\s+$/,a=0,i=e.round,o=e.min,l=e.max,s=e.random;function c(t,s){if(s=s||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,s);var u=function(t){var a={r:0,g:0,b:0},i=1,s=null,c=null,u=null,d=!1,f=!1;return"string"==typeof t&&(t=function(e){e=e.replace(r,"").replace(n,"").toLowerCase();var t,a=!1;if(E[e])e=E[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=j.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=j.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=j.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=j.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=j.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=j.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=j.hex8.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:R(t[4]),format:a?"name":"hex8"}:(t=j.hex6.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:a?"name":"hex"}:(t=j.hex4.exec(e))?{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:R(t[4]+""+t[4]),format:a?"name":"hex8"}:!!(t=j.hex3.exec(e))&&{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:a?"name":"hex"}}(t)),"object"==typeof t&&(H(t.r)&&H(t.g)&&H(t.b)?(a=function(e,t,r){return{r:255*L(e,255),g:255*L(t,255),b:255*L(r,255)}}(t.r,t.g,t.b),d=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):H(t.h)&&H(t.s)&&H(t.v)?(s=P(t.s),c=P(t.v),a=function(t,r,n){t=6*L(t,360),r=L(r,100),n=L(n,100);var a=e.floor(t),i=t-a,o=n*(1-r),l=n*(1-i*r),s=n*(1-(1-i)*r),c=a%6;return{r:255*[n,l,o,o,s,n][c],g:255*[s,n,n,l,o,o][c],b:255*[o,o,s,n,n,l][c]}}(t.h,s,c),d=!0,f="hsv"):H(t.h)&&H(t.s)&&H(t.l)&&(s=P(t.s),u=P(t.l),a=function(e,t,r){var n,a,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=L(e,360),t=L(t,100),r=L(r,100),0===t)n=a=i=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;n=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(t.h,s,u),d=!0,f="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=C(i),{ok:d,format:t.format||f,r:o(255,l(a.r,0)),g:o(255,l(a.g,0)),b:o(255,l(a.b,0)),a:i}}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=s.format||u.format,this._gradientType=s.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=u.ok,this._tc_id=a++}function u(e,t,r){e=L(e,255),t=L(t,255),r=L(r,255);var n,a,i=l(e,t,r),s=o(e,t,r),c=(i+s)/2;if(i==s)n=a=0;else{var u=i-s;switch(a=c>.5?u/(2-i-s):u/(i+s),i){case e:n=(t-r)/u+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(c(n));return i}function A(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(c({h:n,s:a,v:i})),i=(i+l)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,r,n,a=this.toRgb();return t=a.r/255,r=a.g/255,n=a.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=u(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var o=[I(i(e).toString(16)),I(i(t).toString(16)),I(i(r).toString(16)),I(N(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*L(this._r,255))+"%",g:i(100*L(this._g,255))+"%",b:i(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%)":"rgba("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=c(e);r="#"+h(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:P(e[n]));e=r}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:s(),g:s(),b:s()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),a=c(t).toRgb(),i=r/100;return c({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},c.readability=function(t,r){var n=c(t),a=c(r);return(e.max(n.getLuminance(),a.getLuminance())+.05)/(e.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,a,i=c.readability(e,t);switch(a=!1,n=function(e){var t,r;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(r=(e.size||"small").toLowerCase())&&"large"!==r&&(r="small"),{level:t,size:r}}(r),n.level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},c.mostReadable=function(e,t,r){var n,a,i,o,l=null,s=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;us&&(s=n,l=c(t[u]));return c.isReadable(e,l,{level:i,size:o})||!a?l:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var E=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},S=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(E);function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function L(t,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(r,l(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function O(e){return o(1,l(0,e))}function D(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function N(t){return e.round(255*parseFloat(t)).toString(16)}function R(e){return D(e)/255}var F,z,B,j=(z="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",B="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+B),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+B),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+B),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function H(e){return!!j.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=c:window.tinycolor=c}(Math)}),C=c(e=>{var t=b(),r=Array.isArray;function n(e,a,i,o){var l,s,c,u,d,f,h,p=e[0],m=e.length;if(2===m&&r(p)&&r(e[1])&&0===p.length){if(h=function(e,t){var r,n;for(r=0;r{t.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;void 0===n&&(n=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:a,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}}),O=c((e,t)=>{t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}),D=c((e,t)=>{var r=O(),n=L(),a=n({editType:"none"});a.family.dflt=r.HOVERFONT,a.size.dflt=r.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,grouptitlefont:n({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}),I=c((e,t)=>{var r=L(),n=D().hoverlabel,a=C().extendFlat;t.exports={hoverlabel:{bgcolor:a({},n.bgcolor,{arrayOk:!0}),bordercolor:a({},n.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:a({},n.align,{arrayOk:!0}),namelength:a({},n.namelength,{arrayOk:!0}),showarrow:a({},n.showarrow),editType:"none"}}}),P=c((e,t)=>{var r=L(),n=I();t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:r({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:n.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}),N=c((e,t)=>{var r=S(),n={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},a=n.RdBu;function i(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var n=0;n{e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11}),F=c((e,t)=>{var r=S(),n=v(),a=_().isTypedArray,i=t.exports={},o=R();i.defaults=o.defaults;var l=i.defaultLine=o.defaultLine;i.lightLine=o.lightLine;var s=i.background=o.background;function c(e){if(n(e)||"string"!=typeof e)return e;var t=e.trim();if("rgb"!==t.slice(0,3))return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var a=r[1].trim().split(/\s*[\s,]\s*/),i="a"===t.charAt(3)&&4===a.length;if(!i&&3!==a.length)return e;for(var o=0;o=0)))return e;if(3===o)a[o]>1&&(a[o]=1);else if(a[o]>=1)return e}var l=Math.round(255*a[0])+", "+Math.round(255*a[1])+", "+Math.round(255*a[2]);return i?"rgba("+l+", "+a[3]+")":"rgb("+l+")"}i.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},i.rgb=function(e){return i.tinyRGB(r(e))},i.opacity=function(e){return e?r(e).getAlpha():0},i.addOpacity=function(e,t){var n=r(e).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+t+")"},i.combine=function(e,t){var n=r(e).toRgb();if(1===n.a)return r(e).toRgbString();var a=r(t||s).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-n.a)+n.r*n.a,g:i.g*(1-n.a)+n.g*n.a,b:i.b*(1-n.a)+n.b*n.a};return r(o).toRgbString()},i.interpolate=function(e,t,n){var a=r(e).toRgb(),i=r(t).toRgb(),o={r:n*a.r+(1-n)*i.r,g:n*a.g+(1-n)*i.g,b:n*a.b+(1-n)*i.b};return r(o).toRgbString()},i.contrast=function(e,t,n){var a=r(e);return 1!==a.getAlpha()&&(a=r(i.combine(e,s))),(a.isDark()?t?a.lighten(t):s:n?a.darken(n):l).toString()},i.stroke=function(e,t){var n=r(t);e.style({stroke:i.tinyRGB(n),"stroke-opacity":n.getAlpha()})},i.fill=function(e,t){var n=r(t);e.style({fill:i.tinyRGB(n),"fill-opacity":n.getAlpha()})},i.clean=function(e){if(e&&"object"==typeof e){var t,r,n,o,l=Object.keys(e);for(t=0;t{t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}),B=c(e=>{e.counter=function(e,t,r,n){var a=(t||"")+(r?"":"$"),i=!1===n?"":"^";return"xy"===e?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+a)}}),j=c(e=>{var t=v(),r=S(),n=C().extendFlat,a=P(),i=N(),o=F(),l=z().DESELECTDIM,s=w(),c=B().counter,u=E().modHalf,d=_().isArrayOrTypedArray,f=_().isTypedArraySpec,h=_().decodeTypedArraySpec;function p(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&d(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var a={},i=a,o={set:function(e){i=e}};return n.coerceFunction(t,o,a,r),i!==a}e.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(d(e)?e:f(e)?h(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;n!0===e||!1===e;a(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,r,n,a){f(e)&&(e=h(e)),!t(e)||void 0!==a.min&&ea.max?r.set(n):r.set(+e)}},integer:{coerceFunction:function(e,r,n,a){-1===(a.extras||[]).indexOf(e)?(f(e)&&(e=h(e)),e%1||!t(e)||void 0!==a.min&&ea.max?r.set(n):r.set(+e)):r.set(e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,n){f(e)&&(e=h(e)),r(e).isValid()?t.set(e):t.set(n)}},colorlist:{coerceFunction:function(e,t,n){Array.isArray(e)&&e.length&&e.every(function(e){return r(e).isValid()})?t.set(e):t.set(n)}},colorscale:{coerceFunction:function(e,t,r){t.set(i.get(e,r))}},angle:{coerceFunction:function(e,r,n){f(e)&&(e=h(e)),"auto"===e?r.set("auto"):t(e)?r.set(u(+e,360)):r.set(n)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||c(r);let i=e=>"string"==typeof e&&a.test(e);i(e)||n.arrayOk&&d(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!c(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"==typeof e){for(var a=e.split("+"),i=0;i{var r={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},n={};!function e(t,r){for(var n in t){var a=t[n];a.valType?r[n]=a.dflt:(r[n]||(r[n]={}),e(a,r[n]))}}(r,n),t.exports={configAttributes:r,dfltConfig:n}}),q=c((e,t)=>{var r=f(),n=v(),a=[];t.exports=function(e,t){if(-1===a.indexOf(e)){a.push(e);var i=1e3;n(t)?i=t:"long"===t&&(i=3e3);var o=r.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(a).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(e){var n=r.select(this);n.append("button").classed("notifier-close",!0).html("×").on("click",function(){n.transition().call(l)});for(var a=n.append("p"),o=e.split(//g),s=0;s{var r=H().dfltConfig,n=q(),a=t.exports={};a.log=function(){var e;if(r.logging>1){var t=["LOG:"];for(e=0;e1){var a=[];for(e=0;e"),"long")}},a.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var a=[];for(e=0;e"),"stick")}},a.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var a=[];for(e=0;e"),"stick")}}}),V=c((e,t)=>{t.exports=function(){}}),U=c((e,t)=>{t.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;n{t.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),W=c((e,t)=>{t.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}}),G=c((e,t)=>{t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}}),X=c((e,t)=>{t.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),Z=c((e,t)=>{t.exports=function(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}}),J=c((e,t)=>{t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*l-n*o,x=r*s-a*o,b=r*c-i*o,_=n*s-a*l,w=n*c-i*l,T=a*c-i*s,k=u*m-d*p,M=u*g-f*p,A=u*v-h*p,E=d*g-f*m,S=d*v-h*m,C=f*v-h*g,L=y*C-x*S+b*E+_*A-w*M+T*k;return L?(L=1/L,e[0]=(l*C-s*S+c*E)*L,e[1]=(a*S-n*C-i*E)*L,e[2]=(m*T-g*w+v*_)*L,e[3]=(f*w-d*T-h*_)*L,e[4]=(s*A-o*C-c*M)*L,e[5]=(r*C-a*A+i*M)*L,e[6]=(g*b-p*T-v*x)*L,e[7]=(u*T-f*b+h*x)*L,e[8]=(o*S-l*A+c*k)*L,e[9]=(n*A-r*S-i*k)*L,e[10]=(p*w-m*b+v*y)*L,e[11]=(d*b-u*w-h*y)*L,e[12]=(l*M-o*E-s*k)*L,e[13]=(r*E-n*M+a*k)*L,e[14]=(m*x-p*_-g*y)*L,e[15]=(u*_-d*x+f*y)*L,e):null}}),K=c((e,t)=>{t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15];return e[0]=l*(f*v-h*g)-d*(s*v-c*g)+m*(s*h-c*f),e[1]=-(n*(f*v-h*g)-d*(a*v-i*g)+m*(a*h-i*f)),e[2]=n*(s*v-c*g)-l*(a*v-i*g)+m*(a*c-i*s),e[3]=-(n*(s*h-c*f)-l*(a*h-i*f)+d*(a*c-i*s)),e[4]=-(o*(f*v-h*g)-u*(s*v-c*g)+p*(s*h-c*f)),e[5]=r*(f*v-h*g)-u*(a*v-i*g)+p*(a*h-i*f),e[6]=-(r*(s*v-c*g)-o*(a*v-i*g)+p*(a*c-i*s)),e[7]=r*(s*h-c*f)-o*(a*h-i*f)+u*(a*c-i*s),e[8]=o*(d*v-h*m)-u*(l*v-c*m)+p*(l*h-c*d),e[9]=-(r*(d*v-h*m)-u*(n*v-i*m)+p*(n*h-i*d)),e[10]=r*(l*v-c*m)-o*(n*v-i*m)+p*(n*c-i*l),e[11]=-(r*(l*h-c*d)-o*(n*h-i*d)+u*(n*c-i*l)),e[12]=-(o*(d*g-f*m)-u*(l*g-s*m)+p*(l*f-s*d)),e[13]=r*(d*g-f*m)-u*(n*g-a*m)+p*(n*f-a*d),e[14]=-(r*(l*g-s*m)-o*(n*g-a*m)+p*(n*s-a*l)),e[15]=r*(l*f-s*d)-o*(n*f-a*d)+u*(n*s-a*l),e}}),Q=c((e,t)=>{t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],c=e[8],u=e[9],d=e[10],f=e[11],h=e[12],p=e[13],m=e[14],g=e[15];return(t*o-r*i)*(d*g-f*m)-(t*l-n*i)*(u*g-f*p)+(t*s-a*i)*(u*m-d*p)+(r*l-n*o)*(c*g-f*h)-(r*s-a*o)*(c*m-d*h)+(n*s-a*l)*(c*p-u*h)}}),ee=c((e,t)=>{t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*l+_*d+w*m,e[1]=x*a+b*s+_*f+w*g,e[2]=x*i+b*c+_*h+w*v,e[3]=x*o+b*u+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*l+_*d+w*m,e[5]=x*a+b*s+_*f+w*g,e[6]=x*i+b*c+_*h+w*v,e[7]=x*o+b*u+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*l+_*d+w*m,e[9]=x*a+b*s+_*f+w*g,e[10]=x*i+b*c+_*h+w*v,e[11]=x*o+b*u+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*l+_*d+w*m,e[13]=x*a+b*s+_*f+w*g,e[14]=x*i+b*c+_*h+w*v,e[15]=x*o+b*u+_*p+w*y,e}}),te=c((e,t)=>{t.exports=function(e,t,r){var n,a,i,o,l,s,c,u,d,f,h,p,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*m+l*g+d*v+t[12],e[13]=a*m+s*g+f*v+t[13],e[14]=i*m+c*g+h*v+t[14],e[15]=o*m+u*g+p*v+t[15]),e}}),re=c((e,t)=>{t.exports=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}}),ne=c((e,t)=>{t.exports=function(e,t,r,n){var a,i,o,l,s,c,u,d,f,h,p,m,g,v,y,x,b,_,w,T,k,M,A,E,S=n[0],C=n[1],L=n[2],O=Math.sqrt(S*S+C*C+L*L);return Math.abs(O)<1e-6?null:(S*=O=1/O,C*=O,L*=O,a=Math.sin(r),o=1-(i=Math.cos(r)),l=t[0],s=t[1],c=t[2],u=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=t[8],g=t[9],v=t[10],y=t[11],x=S*S*o+i,b=C*S*o+L*a,_=L*S*o-C*a,w=S*C*o-L*a,T=C*C*o+i,k=L*C*o+S*a,M=S*L*o+C*a,A=C*L*o-S*a,E=L*L*o+i,e[0]=l*x+d*b+m*_,e[1]=s*x+f*b+g*_,e[2]=c*x+h*b+v*_,e[3]=u*x+p*b+y*_,e[4]=l*w+d*T+m*k,e[5]=s*w+f*T+g*k,e[6]=c*w+h*T+v*k,e[7]=u*w+p*T+y*k,e[8]=l*M+d*A+m*E,e[9]=s*M+f*A+g*E,e[10]=c*M+h*A+v*E,e[11]=u*M+p*A+y*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}}),ae=c((e,t)=>{t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],l=t[6],s=t[7],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+c*n,e[5]=o*a+u*n,e[6]=l*a+d*n,e[7]=s*a+f*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=d*a-l*n,e[11]=f*a-s*n,e}}),ie=c((e,t)=>{t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-c*n,e[1]=o*a-u*n,e[2]=l*a-d*n,e[3]=s*a-f*n,e[8]=i*n+c*a,e[9]=o*n+u*a,e[10]=l*n+d*a,e[11]=s*n+f*a,e}}),oe=c((e,t)=>{t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+c*n,e[1]=o*a+u*n,e[2]=l*a+d*n,e[3]=s*a+f*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=d*a-l*n,e[7]=f*a-s*n,e}}),le=c((e,t)=>{t.exports=function(e,t,r){var n,a,i,o=r[0],l=r[1],s=r[2],c=Math.sqrt(o*o+l*l+s*s);return Math.abs(c)<1e-6?null:(o*=c=1/c,l*=c,s*=c,n=Math.sin(t),i=1-(a=Math.cos(t)),e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}}),se=c((e,t)=>{t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=n+n,s=a+a,c=i+i,u=n*l,d=n*s,f=n*c,h=a*s,p=a*c,m=i*c,g=o*l,v=o*s,y=o*c;return e[0]=1-(h+m),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=f+v,e[9]=p-g,e[10]=1-(u+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}}),ce=c((e,t)=>{t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),ue=c((e,t)=>{t.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}}),de=c((e,t)=>{t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),fe=c((e,t)=>{t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),he=c((e,t)=>{t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),pe=c((e,t)=>{t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,l=n+n,s=a+a,c=r*o,u=n*o,d=n*l,f=a*o,h=a*l,p=a*s,m=i*o,g=i*l,v=i*s;return e[0]=1-d-p,e[1]=u+v,e[2]=f-g,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=h+m,e[7]=0,e[8]=f+g,e[9]=h-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),me=c((e,t)=>{t.exports=function(e,t,r,n,a,i,o){var l=1/(r-t),s=1/(a-n),c=1/(i-o);return e[0]=2*i*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(r+t)*l,e[9]=(a+n)*s,e[10]=(o+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*c,e[15]=0,e}}),ge=c((e,t)=>{t.exports=function(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}}),ve=c((e,t)=>{t.exports=function(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+l),c=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-l)*s*.5,e[9]=(a-i)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}}),ye=c((e,t)=>{t.exports=function(e,t,r,n,a,i,o){var l=1/(t-r),s=1/(n-a),c=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*l,e[13]=(a+n)*s,e[14]=(o+i)*c,e[15]=1,e}}),xe=c((e,t)=>{var r=X();t.exports=function(e,t,n,a){var i,o,l,s,c,u,d,f,h,p,m=t[0],g=t[1],v=t[2],y=a[0],x=a[1],b=a[2],_=n[0],w=n[1],T=n[2];return Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-T)<1e-6?r(e):(d=m-_,f=g-w,h=v-T,i=x*(h*=p=1/Math.sqrt(d*d+f*f+h*h))-b*(f*=p),o=b*(d*=p)-y*h,l=y*f-x*d,(p=Math.sqrt(i*i+o*o+l*l))?(i*=p=1/p,o*=p,l*=p):(i=0,o=0,l=0),s=f*l-h*o,c=h*i-d*l,u=d*o-f*i,(p=Math.sqrt(s*s+c*c+u*u))?(s*=p=1/p,c*=p,u*=p):(s=0,c=0,u=0),e[0]=i,e[1]=s,e[2]=d,e[3]=0,e[4]=o,e[5]=c,e[6]=f,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*m+o*g+l*v),e[13]=-(s*m+c*g+u*v),e[14]=-(d*m+f*g+h*v),e[15]=1,e)}}),be=c((e,t)=>{t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}}),_e=c((e,t)=>{t.exports={create:$(),clone:W(),copy:G(),identity:X(),transpose:Z(),invert:J(),adjoint:K(),determinant:Q(),multiply:ee(),translate:te(),scale:re(),rotate:ne(),rotateX:ae(),rotateY:ie(),rotateZ:oe(),fromRotation:le(),fromRotationTranslation:se(),fromScaling:ce(),fromTranslation:ue(),fromXRotation:de(),fromYRotation:fe(),fromZRotation:he(),fromQuat:pe(),frustum:me(),perspective:ge(),perspectiveFromFieldOfView:ve(),ortho:ye(),lookAt:xe(),str:be()}}),we=c(e=>{var t=_e();e.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{var r=f(),n=Y(),a=we(),i=_e();function o(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function l(e,t,r){var a="plotly.js-style-"+e,i=document.getElementById(a);if(!i||!i.matches(".no-inline-styles")){i||((i=document.createElement("style")).setAttribute("id",a),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var o=i.sheet;o?o.insertRule?o.insertRule(t+"{"+r+"}",0):o.addRule?o.addRule(t,r,0):n.warn("addStyleRule failed"):n.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function s(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(e){return+e})}function c(e){for(var t=[];u(e);)t.push(e),e=e.parentNode,"function"==typeof ShadowRoot&&e instanceof ShadowRoot&&(e=e.host);return t}function u(e){return e&&(e instanceof Element||e instanceof HTMLElement)}t.exports={getGraphDiv:function(e){var t;if("string"==typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null==e)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=r.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:o,addStyleRule:function(e,t){l("global",e,t)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&o(r)},setStyleOnHover:function(e,t,r,n,a,i){var o=n.split(":"),l=a.split(":"),s="data-btn-style-event-added";i||(i=document),i.querySelectorAll(e).forEach(function(e){e.getAttribute(s)||(e.addEventListener("mouseenter",function(){var e=this.querySelector(r);e&&(e.style[o[0]]=o[1])}),e.addEventListener("mouseleave",function(){var e=this.querySelector(r);e&&(t&&this.matches(t)?e.style[o[0]]=o[1]:e.style[l[0]]=l[1])}),e.setAttribute(s,!0))})},getFullTransformMatrix:function(e){var t=c(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(e){var t=s(e);if(t){var n=a.convertCssMatrix(t);r=i.multiply(r,r,n)}}),r},getElementTransformMatrix:s,getElementAndAncestors:c,equalDomRects:function(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}}}),ke=c((e,t)=>{t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}}),Me=c((e,t)=>{var r=C().extendFlat,n=b(),a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},i={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},o=a.flags.slice().concat(["fullReplot"]),l=i.flags.slice().concat("layoutReplot");function s(e){for(var t={},r=0;r{e.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}}),Ee=c((e,t)=>{t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}}),Se=c(e=>{var{DATE_FORMAT_LINK:t,FORMAT_LINK:r}=Ee(),n=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");e.templateFormatStringDescription=function({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',r,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',t,"for details on the date formatting syntax.",n].join(" ")},e.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>l({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>l({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e}),e.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})}),Ce=c((e,t)=>{function r(e,t){return t?t.d2l(e):e}function n(e,t){return t?t.l2d(e):e}function a(e){return e.x0shift||0}function i(e){return e.x1shift||0}function o(e){return e.y0shift||0}function l(e){return e.y1shift||0}function s(e,t){return r(e.x1,t)+i(e)-r(e.x0,t)-a(e)}function c(e,t,n){return r(e.y1,n)+l(e)-r(e.y0,n)-o(e)}t.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:c(e,0,r)/s(e,t)},dx:s,dy:c,width:function(e,t){return Math.abs(s(e,t))},height:function(e,t,r){return Math.abs(c(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(s(e,t),2)+Math.pow(c(e,0,r),2))},xcenter:function(e,t){return n((r(e.x1,t)+i(e)+r(e.x0,t)+a(e))/2,t)},ycenter:function(e,t,a){return n((r(e.y1,a)+l(e)+r(e.y0,a)+o(e))/2,a)},simpleXVariables:["x0","x1","y0","y1","dy","height","ycenter"],simpleYVariables:["x0","x1","y0","y1","dx","width","xcenter"]}}),Le=c((e,t)=>{var r=Me().overrideAll,n=P(),a=L(),i=Ae().dash,o=C().extendFlat,{shapeTexttemplateAttrs:l,templatefallbackAttrs:s}=Se(),c=Ce();t.exports=r({newshape:{visible:o({},n.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:o({},n.legend,{}),legendgroup:o({},n.legendgroup,{}),legendgrouptitle:{text:o({},n.legendgrouptitle.text,{}),font:a({})},legendrank:o({},n.legendrank,{}),legendwidth:o({},n.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:o({},i,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:o({},n.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),texttemplatefallback:s({editType:"arraydraw"}),font:a({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}),Oe=c((e,t)=>{var r=Ae().dash,n=C().extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:n({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}),De=c((e,t)=>{t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}}),Ie=c((e,t)=>{var r=L(),n=ke(),a=R(),i=Le(),o=Oe(),l=De(),s=C().extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=a.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:s(l({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:i.newshape,activeshape:i.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:s({},n.transition,{editType:"none"})}}),Pe=c(()=>{!function(){if(!document.getElementById("a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0")){var e=document.createElement("style");e.id="a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0",e.textContent=".maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}",document.head.appendChild(e)}}()}),Ne=c(e=>{var t=Y(),r=V(),n=U(),a=b(),i=Te().addStyleRule,o=C(),l=P(),s=Ie(),c=o.extendFlat,u=o.extendDeepAll;function d(r){var n=r.name,a=r.categories,o=r.meta;if(e.modules[n])t.log("Type "+n+" already registered");else{e.subplotsRegistry[r.basePlotModule.name]||function(r){var n=r.name;if(e.subplotsRegistry[n])t.log("Plot type "+n+" already registered.");else for(var a in m(r),e.subplotsRegistry[n]=r,e.componentsRegistry)v(a,r.name)}(r.basePlotModule);for(var l={},s=0;s{var t,r,n=p().timeFormat,a=v(),i=Y(),o=E().mod,l=y(),s=l.BADNUM,c=l.ONEDAY,u=l.ONEHOUR,d=l.ONEMIN,f=l.ONESEC,h=l.EPOCHJD,m=Ne(),g=p().utcFormat,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,_=(new Date).getFullYear()-70;function w(e){return e&&m.componentsRegistry.calendars&&"string"==typeof e&&"gregorian"!==e}function T(e,t){return String(e+Math.pow(10,t)).slice(1)}e.dateTick0=function(t,r){var n=function(e,t){return w(e)?t?m.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:m.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var a=e.dateTime2ms(n,t);return a+=c*(r-1),e.ms2DateTime(a,0,t)},e.dfltRange=function(e){return w(e)?m.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},e.isJSDate=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},e.dateTime2ms=function(n,a){if(e.isJSDate(n)){var i=n.getTimezoneOffset()*d,l=(n.getUTCMinutes()-n.getMinutes())*d+(n.getUTCSeconds()-n.getSeconds())*f+(n.getUTCMilliseconds()-n.getMilliseconds());if(l){var p=3*d;i=i-p/2+o(l-i+p/2,p)}return(n=Number(n)-i)>=t&&n<=r?n:s}if("string"!=typeof n&&"number"!=typeof n)return s;n=String(n);var g=w(a),v=n.charAt(0);g&&("G"===v||"g"===v)&&(n=n.slice(1),a="");var y=g&&"chinese"===a.slice(0,7),T=n.match(y?b:x);if(!T)return s;var k=T[1],M=T[3]||"1",A=Number(T[5]||1),E=Number(T[7]||0),S=Number(T[9]||0),C=Number(T[11]||0);if(g){if(2===k.length)return s;var L;k=Number(k);try{var O=m.getComponentMethod("calendars","getCal")(a);if(y){var D="i"===M.charAt(M.length-1);M=parseInt(M,10),L=O.newDate(k,O.toMonthIndex(k,M,D),A)}else L=O.newDate(k,Number(M),A)}catch(e){return s}return L?(L.toJD()-h)*c+E*u+S*d+C*f:s}k=2===k.length?(Number(k)+2e3-_)%100+_:Number(k),M-=1;var I=new Date(Date.UTC(2e3,M,A,E,S));return I.setUTCFullYear(k),I.getUTCMonth()!==M||I.getUTCDate()!==A?s:I.getTime()+C*f},t=e.MIN_MS=e.dateTime2ms("-9999"),r=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==s};var k=90*c,M=3*u,A=5*d;function S(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+T(t,2)+":"+T(r,2),(n||a)&&(e+=":"+T(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+T(a,i)}return e}e.ms2DateTime=function(e,n,a){if("number"!=typeof e||!(e>=t&&e<=r))return s;n||(n=0);var i,l,p,v,y,x,b=Math.floor(10*o(e+.05,1)),_=Math.round(e-b/10);if(w(a)){var T=Math.floor(_/c)+h,E=Math.floor(o(e,c));try{i=m.getComponentMethod("calendars","getCal")(a).fromJD(T).formatDate("yyyy-mm-dd")}catch(e){i=g("G%Y-%m-%d")(new Date(_))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.slice(1);else for(;i.length<10;)i="0"+i;l=n=t+c&&e<=r-c))return s;var a=Math.floor(10*o(e+.05,1)),i=new Date(Math.round(e-a/10));return S(n("%Y-%m-%d")(i),i.getHours(),i.getMinutes(),i.getSeconds(),10*i.getUTCMilliseconds()+a)},e.cleanDate=function(t,r,n){if(t===s)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(w(n))return i.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return i.error("unrecognized date",t),r;return t};var C=/%\d?f/g,L=/%h/g,O={1:"1",2:"1",3:"2",4:"2"};function D(e,t,r,n){e=e.replace(C,function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).slice(2).replace(/0+$/,"")||"0"});var a=new Date(Math.floor(t+.05));if(e=e.replace(L,function(){return O[r("%q")(a)]}),w(n))try{e=m.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var I=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(e,t,r,n,i,l){if(i=w(i)&&i,!t)if("y"===r)t=l.year;else if("m"===r)t=l.month;else{if("d"!==r)return function(e,t){var r=o(e+.05,c),n=T(Math.floor(r/u),2)+":"+T(o(Math.floor(r/d),60),2);if("M"!==t){a(t)||(t=0);var i=(100+Math.min(o(e/f,60),I[t])).toFixed(t).slice(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(e,r)+"\n"+D(l.dayMonthYear,e,n,i);t=l.dayMonth+"\n"+l.year}return D(t,e,n,i)};var P=3*c;e.incrementMonth=function(e,t,r){r=w(r)&&r;var n=o(e,c);if(e=Math.round(e-n),r)try{var a=Math.round(e/c)+h,l=m.getComponentMethod("calendars","getCal")(r),s=l.fromJD(a);return t%12?l.add(s,t,"m"):l.add(s,t/12,"y"),(s.toJD()-h)*c+n}catch(t){i.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+P);return u.setUTCMonth(u.getUTCMonth()+t)+n-P},e.findExactDates=function(e,t){for(var r,n,i=0,o=0,l=0,s=0,u=w(t)&&m.getComponentMethod("calendars","getCal")(t),d=0;d{t.exports=function(e){return e}}),ze=c(e=>{var t=v(),r=Y(),n=Fe(),a=y().BADNUM,i=1e-9;function o(e,t){return et}function c(e,t){return e>=t}e.findBin=function(e,n,a){if(t(n.start))return a?Math.ceil((e-n.start)/n.size-i)-1:Math.floor((e-n.start)/n.size+i);var u,d,f=0,h=n.length,p=0,m=h>1?(n[h-1]-n[0])/(h-1):1;for(d=m>=0?a?o:l:a?c:s,e+=m*i*(a?-1:1)*(m>=0?1:-1);f90&&r.log("Long binary search..."),f-1},e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===a;r--);for(var i,o=n[r]-n[0]||1,l=o/(r||1)/1e4,s=[],c=0;c<=r;c++){var u=n[c],d=u-i;void 0===i?(s.push(u),i=u):d>l&&(o=Math.min(o,d),s.push(u),i=u)}return{vals:s,minDiff:o}},e.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},e.findIndexOfMin=function(e,t){t=t||n;for(var r,a=1/0,i=0;i{t.exports=function(e){return Object.keys(e).sort()}}),je=c(e=>{var t=v(),r=_().isArrayOrTypedArray;e.aggNums=function(n,a,i,o){var l,s;if((!o||o>i.length)&&(o=i.length),t(a)||(a=!1),r(i[0])){for(s=new Array(o),l=0;le.length-1)return e[e.length-1];var n=r%1;return n*e[Math.ceil(r)]+(1-n)*e[Math.floor(r)]}}),He=c((e,t)=>{var r=E(),n=r.mod,a=r.modHalf,i=Math.PI,o=2*i;function l(e){return Math.abs(e[1]-e[0])>o-1e-14}function s(e,t){return a(t-e,o)}function c(e,t){if(l(t))return!0;var r,a;t[0](a=n(a,o))&&(a+=o);var i=n(e,o),s=i+o;return i>=r&&i<=a||s>=r&&s<=a}function u(e,t,r,n,a,s,c){a=a||0,s=s||0;var u,d,f,h,p,m=l([r,n]);function g(e,t){return[e*Math.cos(t)+a,s-e*Math.sin(t)]}m?(u=0,d=i,f=o):r=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return u(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return u(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return u(e,t,r,n,a,i,1)}}}),qe=c(e=>{e.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},e.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},e.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},e.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}}),Ye=c(e=>{var t,r,n,a=E().mod;function i(e,t,r,n,a,i,o,l){var s=r-e,c=a-e,u=o-a,d=n-t,f=i-t,h=l-i,p=s*h-u*d;if(0===p)return null;var m=(c*h-u*f)/p,g=(c*d-s*f)/p;return g<0||g>1||m<0||m>1?null:{x:e+s*m,y:t+d*m}}function o(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,l=a-t;return o*o+l*l}var s=n*t-a*e;return s*s/r}e.segmentsIntersect=i,e.segmentDistance=function(e,t,r,n,a,l,s,c){if(i(e,t,r,n,a,l,s,c))return 0;var u=r-e,d=n-t,f=s-a,h=c-l,p=u*u+d*d,m=f*f+h*h,g=Math.min(o(u,d,p,a-e,l-t),o(u,d,p,s-e,c-t),o(f,h,m,e-a,t-l),o(f,h,m,r-a,n-l));return Math.sqrt(g)},e.getTextLocation=function(e,i,o,l){if((e!==r||l!==n)&&(t={},r=e,n=l),t[o])return t[o];var s=e.getPointAtLength(a(o-l/2,i)),c=e.getPointAtLength(a(o+l/2,i)),u=Math.atan((c.y-s.y)/(c.x-s.x)),d=e.getPointAtLength(a(o,i)),f={x:(4*d.x+s.x+c.x)/6,y:(4*d.y+s.y+c.y)/6,theta:u};return t[o]=f,f},e.clearLocationCache=function(){r=null},e.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,l=t.top,s=t.bottom,c=0,u=e.getTotalLength(),d=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(a=r);var c=r.xo?r.x-o:0,d=r.ys?r.y-s:0;return Math.sqrt(c*c+d*d)}for(var h=f(c);h;){if((c+=h+r)>d)return;h=f(c)}for(h=f(d);h;){if(c>(d-=h+r))return;h=f(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},e.findPointOnPath=function(e,t,r,n){for(var a,i,o,l=(n=n||{}).pathLength||e.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(l)[r]?-1:1,d=0,f=0,h=l;d0?h=a:f=a,d++}return i}}),Ve=c(e=>{var t={};function r(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}e.throttle=function(e,n,a){var i=t[e],o=Date.now();if(!i){for(var l in t)t[l].tsi.ts+n?s():i.timer=setTimeout(function(){s(),i.timer=null},n)},e.done=function(e){var r=t[e];return r&&r.timer?new Promise(function(e){var t=r.onDone;r.onDone=function(){t&&t(),e(),r.onDone=null}}):Promise.resolve()},e.clear=function(n){if(n)r(t[n]),delete t[n];else for(var a in t)e.clear(a)}}),Ue=c((e,t)=>{t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}}),$e=c((e,t)=>{t.exports=i,t.exports.isMobile=i,t.exports.default=i;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,a=/android|ipad|playbook|silk/i;function i(e){e||(e={});let t=e.ua;if(!t&&"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let i=r.test(t)&&!n.test(t)||!!e.tablet&&a.test(t);return!i&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(i=!0),i}}),We=c((e,t)=>{var r=v(),n=$e();t.exports=function(e){var t,a;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:("undefined"!=typeof navigator&&(a=navigator.userAgent),a&&a.headers&&"string"==typeof a.headers["user-agent"]&&(a=a.headers["user-agent"]),t=a),"string"!=typeof t)return!0;var i=n({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!i)for(var o=t.split(" "),l=1;l-1;s--){var c=o[s];if("Version/"===c.slice(0,8)){var u=c.slice(8).split(".")[0];if(r(u)&&(u=+u),u>=13)return!0}}return i}}),Ge=c((e,t)=>{var r=f();t.exports=function(e,t,n){var a=e.selectAll("g."+n.replace(/\s/g,".")).data(t,function(e){return e[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(e){e[0][i]=r.select(this)}),a}}),Xe=c((e,t)=>{var r=Ne();t.exports=function(e,t){for(var n=e._context.locale,a=0;a<2;a++){for(var i=e._context.locales,o=0;o<2;o++){var l=(i[n]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=r.localeRegistry}var c=n.split("-")[0];if(c===n)break;n=c}return t}}),Ze=c((e,t)=>{t.exports=function(e){for(var t={},r=[],n=0,a=0;a{function r(e){return!0===e.visible}function n(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}t.exports=function(e){for(var t=(l=e,Array.isArray(l)&&Array.isArray(l[0])&&l[0][0]&&l[0][0].trace?n:r),a=[],i=0;i{t.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,a=String(n).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}}),Qe=c((e,t)=>{var r=v(),n=y().BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return"string"==typeof e&&(e=e.replace(a,"")),r(e)?Number(e):n}}),et=c((e,t)=>{var r=f(),n=p().utcFormat,a=m().format,i=v(),o=y(),c=o.FP_SAFE,u=-c,d=o.BADNUM,h=t.exports={};h.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var g={};h.warnBadFormat=function(e){var t=String(e);g[t]||(g[t]=1,h.warn('encountered bad format: "'+t+'"'))},h.noFormat=function(e){return String(e)},h.numberFormat=function(e){var t;try{t=a(h.adjustFormat(e))}catch(t){return h.warnBadFormat(e),h.noFormat}return t},h.nestedProperty=w(),h.keyedContainer=T(),h.relativeAttr=k(),h.isPlainObject=b(),h.toLogRange=M(),h.relinkPrivateKeys=A();var x=_();h.isArrayBuffer=x.isArrayBuffer,h.isTypedArray=x.isTypedArray,h.isArrayOrTypedArray=x.isArrayOrTypedArray,h.isArray1D=x.isArray1D,h.ensureArray=x.ensureArray,h.concat=x.concat,h.maxRowLength=x.maxRowLength,h.minRowLength=x.minRowLength;var S=E();h.mod=S.mod,h.modHalf=S.modHalf;var L=j();h.valObjectMeta=L.valObjectMeta,h.coerce=L.coerce,h.coerce2=L.coerce2,h.coerceFont=L.coerceFont,h.coercePattern=L.coercePattern,h.coerceHoverinfo=L.coerceHoverinfo,h.coerceSelectionMarkerOpacity=L.coerceSelectionMarkerOpacity,h.validate=L.validate;var O=Re();h.dateTime2ms=O.dateTime2ms,h.isDateTime=O.isDateTime,h.ms2DateTime=O.ms2DateTime,h.ms2DateTimeLocal=O.ms2DateTimeLocal,h.cleanDate=O.cleanDate,h.isJSDate=O.isJSDate,h.formatDate=O.formatDate,h.incrementMonth=O.incrementMonth,h.dateTick0=O.dateTick0,h.dfltRange=O.dfltRange,h.findExactDates=O.findExactDates,h.MIN_MS=O.MIN_MS,h.MAX_MS=O.MAX_MS;var D=ze();h.findBin=D.findBin,h.sorterAsc=D.sorterAsc,h.sorterDes=D.sorterDes,h.distinctVals=D.distinctVals,h.roundUp=D.roundUp,h.sort=D.sort,h.findIndexOfMin=D.findIndexOfMin,h.sortObjectKeys=Be();var I=je();h.aggNums=I.aggNums,h.len=I.len,h.mean=I.mean,h.geometricMean=I.geometricMean,h.median=I.median,h.midRange=I.midRange,h.variance=I.variance,h.stdev=I.stdev,h.interp=I.interp;var P=we();h.init2dArray=P.init2dArray,h.transposeRagged=P.transposeRagged,h.dot=P.dot,h.translationMatrix=P.translationMatrix,h.rotationMatrix=P.rotationMatrix,h.rotationXYMatrix=P.rotationXYMatrix,h.apply3DTransform=P.apply3DTransform,h.apply2DTransform=P.apply2DTransform,h.apply2DTransform2=P.apply2DTransform2,h.convertCssMatrix=P.convertCssMatrix,h.inverseTransformMatrix=P.inverseTransformMatrix;var N=He();h.deg2rad=N.deg2rad,h.rad2deg=N.rad2deg,h.angleDelta=N.angleDelta,h.angleDist=N.angleDist,h.isFullCircle=N.isFullCircle,h.isAngleInsideSector=N.isAngleInsideSector,h.isPtInsideSector=N.isPtInsideSector,h.pathArc=N.pathArc,h.pathSector=N.pathSector,h.pathAnnulus=N.pathAnnulus;var R=qe();h.isLeftAnchor=R.isLeftAnchor,h.isCenterAnchor=R.isCenterAnchor,h.isRightAnchor=R.isRightAnchor,h.isTopAnchor=R.isTopAnchor,h.isMiddleAnchor=R.isMiddleAnchor,h.isBottomAnchor=R.isBottomAnchor;var F=Ye();h.segmentsIntersect=F.segmentsIntersect,h.segmentDistance=F.segmentDistance,h.getTextLocation=F.getTextLocation,h.clearLocationCache=F.clearLocationCache,h.getVisibleSegment=F.getVisibleSegment,h.findPointOnPath=F.findPointOnPath;var z=C();h.extendFlat=z.extendFlat,h.extendDeep=z.extendDeep,h.extendDeepAll=z.extendDeepAll,h.extendDeepNoArrays=z.extendDeepNoArrays;var H=Y();h.log=H.log,h.warn=H.warn,h.error=H.error;var $=B();h.counterRegex=$.counter;var W=Ve();h.throttle=W.throttle,h.throttleDone=W.done,h.clearThrottle=W.clear;var G=Te();function X(e){var t={};for(var r in e)for(var n=e[r],a=0;ac||e=t)&&i(e)&&e>=0&&e%1==0},h.noop=V(),h.identity=Fe(),h.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},h.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},h.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,r)?a>10?(h.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},h.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},h.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,l=2*o,s=2*t-1,c=new Array(s),u=new Array(o);for(r=0;r=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*c[n];u[r]=i}return u},h.syncOrAsync=function(e,t,r){var n;function a(){return h.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a);return r&&r(t)},h.stripTrailingSlash=function(e){return"/"===e.slice(-1)?e.slice(0,-1):e},h.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n0?t:0})},h.fillArray=function(e,t,r,n){if(n=n||h.identity,h.isArrayOrTypedArray(e))for(var a=0;aK.test(window.navigator.userAgent);var Q=/Firefox\/(\d+)\.\d+/;h.getFirefoxVersion=function(){var e=Q.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},h.isD3Selection=function(e){return e instanceof r.selection},h.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i},h.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i},h.objectFromPath=function(e,t){for(var r,n=e.split("."),a=r={},i=0;i1?a+o[1]:"";if(i&&(o.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ne=/^\w*$/;h.templateString=function(e,t){var r={};return e.replace(h.TEMPLATE_STRING_REGEX,function(e,n){var a;return ne.test(n)?a=t[n]:(r[n]=r[n]||h.nestedProperty(t,n).get,a=r[n](!0)),void 0!==a?a:""})};var ae={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=e=>ce(s(l({},e),{opts:ae}));var ie={max:10,count:0,name:"texttemplate"};h.texttemplateString=e=>ce(s(l({},e),{opts:ie}));var oe=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,le={max:10,count:0,name:"texttemplate",parseMultDiv:!0};h.texttemplateStringForShapes=e=>ce(s(l({},e),{opts:le}));var se=/^[:|\|]/;function ce({data:e=[],locale:t,fallback:r,labels:a={},opts:i,template:o}){return o.replace(h.TEMPLATE_STRING_REGEX,(o,l,s)=>{let c=["xother","yother"].includes(l),u=["_xother","_yother"].includes(l),d=["_xother_","_yother_"].includes(l),f=["xother_","yother_"].includes(l),p=c||u||f||d;(u||d)&&(l=l.substring(1)),(f||d)&&(l=l.substring(0,l.length-1));let m,g=null,v=null;if(i.parseMultDiv){var y=function(e){var t=e.match(oe);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(l);l=y.key,g=y.op,v=y.number}if(p){if(void 0===a[l])return"";m=a[l]}else for(let t of e)if(t){if(t.hasOwnProperty(l)){m=t[l];break}if(ne.test(l)||(m=h.nestedProperty(t,l).get(!0)),void 0!==m)break}if(void 0===m){let{count:e,max:t,name:n}=i,a=!1===r?o:r;return e=48&&o<=57,c=l>=48&&l<=57;if(s&&(n=10*n+o-48),c&&(a=10*a+l-48),!s||!c){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var ue=2e9;h.seedPseudoRandom=function(){ue=2e9},h.pseudoRandom=function(){var e=ue;return ue=(69069*ue+1)%4294967296,Math.abs(ue-e)<429496729?h.pseudoRandom():ue/4294967296},h.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=h.extractOption(e,t,"htx","hovertext");if(h.isValidTextValue(a))return n(a);var i=h.extractOption(e,t,"tx","text");return h.isValidTextValue(i)?n(i):void 0},h.isValidTextValue=function(e){return e||0===e},h.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,h.strTranslate(a-c*(r+o),i-c*(n+l))+h.strScale(c)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},h.setTransormAndDisplay=function(e,t){e.attr("transform",h.getTextTransform(t)),e.style("display",t.scale?null:"none")},h.ensureUniformFontSize=function(e,t){var r=h.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},h.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},h.bigFont=function(e){return Math.round(1.2*e)};var de=h.getFirefoxVersion(),fe=null!==de&&de<86;h.getPositionFromD3Event=function(){return fe?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}}),tt=c(()=>{var e,t,r=et(),n={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(t in n)e=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),r.addStyleRule(e,n[t])}),rt=c((e,t)=>{t.exports=!0}),nt=c((e,t)=>{var r,n=rt();r="function"==typeof window.matchMedia?!window.matchMedia("(hover: none)").matches:n,t.exports=r}),at=c((e,t)=>{var r,n="object"==typeof Reflect?Reflect:null,a=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise(function(r,n){function a(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,a)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var l=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var a,i,o;if(s(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(a=c(e))>0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,function(e){console&&console.warn&&console.warn(e)}(l)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=d.bind(n);return a.listener=r,n.wrapFn=a,a}function h(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)a(s,this,t);else{var c=s.length,u=m(s,c);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}),it=c((e,t)=>{var r=at().EventEmitter,n={init:function(e){if(e._ev instanceof r)return e;var t=new r,n=new r;return e._ev=t,e._internalEv=n,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=n.on.bind(n),e._internalOnce=n.once.bind(n),e._removeInternalListener=n.removeListener.bind(n),e._removeAllInternalListeners=n.removeAllListeners.bind(n),e.emit=function(e,r){t.emit(e,r),n.emit(e,r)},"function"==typeof e.addEventListener&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n=e._ev;if(n){var a=n._events[t];if(a){var i;for(a=Array.isArray(a)?a:[a],i=0;i{var r=et(),n=H().dfltConfig,a={add:function(e,t,r,a,i){var o,l;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},l=e.undoQueue.index,e.autoplay?e.undoQueue.inSequence||(e.autoplay=!1):(!e.undoQueue.sequence||e.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(l,e.undoQueue.queue.length-l,o),e.undoQueue.index+=1):o=e.undoQueue.queue[l-1],e.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(t),o.undo.args.unshift(r),o.redo.calls.push(a),o.redo.args.push(i)),e.undoQueue.queue.length>n.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r{t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}),st=c(e=>{var t=Ne(),r=et(),n=P(),a=Ie(),i=lt(),o=ke(),l=H().configAttributes,s=Me(),c=r.extendDeepAll,u=r.isPlainObject,d=r.isArrayOrTypedArray,f=r.nestedProperty,h=r.valObjectMeta,p="_isSubplotObj",m="_isLinkedToArray",g="_deprecated",v=[p,m,"_arrayAttrRegexps",g];function y(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(x(t[r]))r++;else if(r=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!x(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function x(e){return e===Math.round(e)&&e>=0}function b(){var e,r,n={};for(e in c(n,a),t.subplotsRegistry)if((r=t.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(r.attr))for(var i=0;i{var t=et(),r=P(),n="templateitemname",a={name:{valType:"string",editType:"none"}};function i(e){return e&&"string"==typeof e}function o(e){var r=e.length-1;return"s"!==e.charAt(r)&&t.warn("bad argument to arrayDefaultKey: "+e),e.slice(0,-1)+"defaults"}a[n]={valType:"string",editType:"calc"},e.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=a.name,t[n]=a[n],t},e.traceTemplater=function(e){var n,a,i={};for(n in e)a=e[n],Array.isArray(a)&&a.length&&(i[n]=0);return{newTrace:function(o){var l={type:n=t.coerce(o,{},r,"type"),_template:null};if(n in i){a=e[n];var s=i[n]%a.length;i[n]++,l._template=a[s]}return l}}},e.newContainer=function(e,r,n){var a=e._template,i=a&&(a[r]||n&&a[n]);return t.isPlainObject(i)||(i=null),e[r]={_template:i}},e.arrayTemplater=function(e,t,r){var a=e._template,l=a&&a[o(t)],s=a&&a[t];(!Array.isArray(s)||!s.length)&&(s=[]);var c={};return{newItem:function(e){var t={name:e.name,_input:e},a=t[n]=e[n];if(!i(a))return t._template=l,t;for(var o=0;o=i&&(a._input||{})._templateitemname;l&&(o=i);var s,c=r+"["+o+"]";function u(){s={},l&&(s[c]={},s[c][n]=l)}function d(e,r){l?t.nestedProperty(s[c],e).set(r):s[c+"."+e]=r}function f(){var e=s;return u(),e}return u(),{modifyBase:function(e,t){s[e]=t},modifyItem:d,getUpdateObj:f,applyUpdate:function(r,n){r&&d(r,n);var a=f();for(var i in a)t.nestedProperty(e,i).set(a[i])}}}}),ut=c((e,t)=>{var r=B().counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}),dt=c(e=>{var t=Ne(),r=ut();function n(e,t){if(t&&t.length)for(var r=0;rn?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)},e.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},e.isLinked=function(e,t){return n(t,e._axisMatchGroups)||n(t,e._axisConstraintGroups)}}),ft=c((e,t)=>{t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}}),ht=c((e,t)=>{t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}),pt=c(e=>{var t=Ne();ut().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,r,n){var a=t.subplotsRegistry[r];if(!a)return[];for(var i=a.attr,o=[],l=0;l{var t=Ne(),r=et();function n(e,t,n){var a,i,o,l=!1;if("data"===t.type)a=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;a=e._fullLayout}return i=r.nestedProperty(a,t.prop).get(),(o=n[t.type]=n[t.type]||{}).hasOwnProperty(t.prop)&&o[t.prop]!==i&&(l=!0),o[t.prop]=i,{changed:l,value:i}}function a(e,t){var n=[],a=t[0],i={};if("string"==typeof a)i[a]=t[1];else{if(!r.isPlainObject(a))return n;i=a}return o(i,function(e,t,r){n.push({type:"layout",prop:e,value:r})},"",0),n}function i(e,t){var n,a,i,l,s=[];if(a=t[0],i=t[1],n=t[2],l={},"string"==typeof a)l[a]=i;else{if(!r.isPlainObject(a))return s;l=a,void 0===n&&(n=i)}return void 0===n&&(n=null),o(l,function(t,r,a){var i,o;if(Array.isArray(a)){o=a.slice();var l=Math.min(o.length,e.data.length);n&&(l=Math.min(l,n.length)),i=[];for(var c=0;c0?".":"")+i;r.isPlainObject(l)?o(l,t,s,a+1):t(s,i,l)}})}e.manageCommandObserver=function(t,a,i,o){var l={},s=!0;a&&a._commandObserver&&(l=a._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,i,l.lookupTable);if(a&&a._commandObserver){if(c)return l;if(a._commandObserver.remove)return a._commandObserver.remove(),a._commandObserver=null,l}if(c){n(t,c,l.cache),l.check=function(){if(s){var e=n(t,c,l.cache);return e.changed&&o&&void 0!==l.lookupTable[e.value]&&(l.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:l.lookupTable[e.value]})).then(l.enable,l.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d{var r=f(),n=p().timeFormatLocale,a=m().formatLocale,i=v(),o=x(),l=Ne(),s=st(),c=ct(),u=et(),d=F(),h=y().BADNUM,g=dt(),b=ft().clearOutline,_=ht(),w=ke(),T=lt(),k=pt().getModuleCalcData,M=u.relinkPrivateKeys,A=u._,E=t.exports={};u.extendFlat(E,l),E.attributes=P(),E.attributes.type.values=E.allTypes,E.fontAttrs=L(),E.layoutAttributes=Ie();var S=mt();E.executeAPICommand=S.executeAPICommand,E.computeAPICommandBindings=S.computeAPICommandBindings,E.manageCommandObserver=S.manageCommandObserver,E.hasSimpleAPICommandBindings=S.hasSimpleAPICommandBindings,E.redrawText=function(e){return e=u.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(l.getComponentMethod("annotations","draw")(e),l.getComponentMethod("legend","draw")(e),l.getComponentMethod("colorbar","draw")(e),t(E.previousPromises(e)))},300)})},E.resize=function(e){e=u.getGraphDiv(e);var t,r=new Promise(function(r,n){(!e||u.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=r,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||u.isHidden(e))r(e);else{delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,l.call("relayout",e,{autosize:!0}).then(function(){e.changed=t,e._resolveResize===r&&(delete e._resolveResize,r(e))})}},100)});return t&&t(r),r},E.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})},E.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,n=u.ensureSingle(t._paper,"text","js-plot-link-container",function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each(function(){var e=r.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)})}),a=n.node(),i={y:t._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),n.attr(i);var o=n.select(".js-link-to-tool"),l=n.select(".js-link-spacer"),s=n.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" »");if(e._context.sendData)r.on("click",function(){E.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},E.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var n=r.select(e).append("div").attr("id","hiddenform").style("display","none"),a=n.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=E.graphJson(e,!1,"keepdata"),a.node().submit(),n.remove(),e.emit("plotly_afterexport"),!1}};var C=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],O=["year","month","dayMonth","dayMonthYear"];function D(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,a={};function i(e){for(var r=!0,i=0;i1&&I.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o15&&I.length>15&&0===s.shapes.length&&0===s.images.length,E.linkSubplots(f,s,d,i),E.cleanPlot(f,s,d,i);var B=!(!i._has||!i._has("cartesian")),j=!(!s._has||!s._has("cartesian"));B&&!j?i._bgLayer.remove():j&&!B&&(s._shouldCreateBgLayer=!0),i._zoomlayer&&!e._dragging&&b({_fullLayout:i}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a0){var d=1-2*l;n=Math.round(d*n),a=Math.round(d*a)}}var f=E.layoutAttributes.width.min,h=E.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-a)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),E.sanitizeMargins(r)},E.supplyLayoutModuleDefaults=function(e,t,r,n){var a,i,o,s=l.componentsRegistry,c=t._basePlotModules,d=l.subplotsRegistry.cartesian;for(a in s)(o=s[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in c.length||c.push(d),t._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(i=0;i1&&(r.l/=v,r.r/=v)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,w=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:w,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!n._replotting)return E.doAutoMargin(e)}},E.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),R(t);var a=t._size,o=t.margin,s={t:0,b:0,l:0,r:0},c=u.extendFlat({},a),d=o.l,f=o.r,h=o.t,p=o.b,m=t._pushmargin,v=t._pushmarginIds,y=t.minreducedwidth,x=t.minreducedheight;if(!1!==o.autoexpand){for(var b in m)v[b]||delete m[b];var _=e._fullLayout._reservedMargin;for(var w in _)for(var T in _[w]){var k=_[w][T];s[T]=Math.max(s[T],k)}for(var M in m.base={l:{val:0,size:d},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:p}},s){var A=0;for(var S in m)"base"!==S&&i(m[S][M].size)&&(A=m[S][M].size>A?m[S][M].size:A);var C=Math.max(0,o[M]-A);s[M]=Math.max(0,s[M]-C)}for(var L in m){var O=m[L].l||{},D=m[L].b||{},I=O.val,P=O.size,N=D.val,F=D.size,z=r-s.r-s.l,B=n-s.t-s.b;for(var j in m){if(i(P)&&m[j].r){var H=m[j].r.val,q=m[j].r.size;if(H>I){var Y=(P*H+(q-z)*I)/(H-I),V=(q*(1-I)+(P-z)*(1-H))/(H-I);Y+V>d+f&&(d=Y,f=V)}}if(i(F)&&m[j].t){var U=m[j].t.val,$=m[j].t.size;if(U>N){var W=(F*U+($-B)*N)/(U-N),G=($*(1-N)+(F-B)*(1-U))/(U-N);W+G>p+h&&(p=W,h=G)}}}}}var X=u.constrain(r-o.l-o.r,2,y),Z=u.constrain(n-o.t-o.b,2,x),J=Math.max(0,r-X),K=Math.max(0,n-Z);if(J){var Q=(d+f)/J;Q>1&&(d/=Q,f/=Q)}if(K){var ee=(p+h)/K;ee>1&&(p/=ee,h/=ee)}if(a.l=Math.round(d)+s.l,a.r=Math.round(f)+s.r,a.t=Math.round(h)+s.t,a.b=Math.round(p)+s.b,a.p=Math.round(o.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(E.didMarginChange(c,a)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=g.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(v).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return l.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var i=0,o=0;function s(){return i++,function(){o++,!n&&o===i&&function(t){e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return l.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(t))}(a)}}r.runFn(s),setTimeout(s())})}],i=u.syncOrAsync(a,e);return(!i||!i.then)&&(i=Promise.resolve()),i.then(function(){return e})}E.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},E.graphJson=function(e,t,r,n,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&E.supplyDefaults(e);var l=a?e._fullData:e.data,s=a?e._fullLayout:e.layout,c=(e._transitionData||{})._frames;function d(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,a={};return Object.keys(e).sort().forEach(function(i){if(-1===["_","["].indexOf(i.charAt(0))){if("function"==typeof e[i])return void(t&&(a[i]="_function"));if("keepdata"===r){if("src"===i.slice(-3))return}else if("keepstream"===r){if("string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0)return;a[i]=d(e[i],t)}}),a}var i=Array.isArray(e),l=u.isTypedArray(e);if((i||l)&&e.dtype&&e.shape){var s=e.bdata;return d({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(s)?o.encode(s):s},t)}return i?e.map(function(e){return d(e,t)}):l?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var f={data:(l||[]).map(function(e){var r=d(e);return t&&delete r.fit,r})};if(!t&&(f.layout=d(s),a)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return c&&(f.frames=d(c)),i&&(f.config=d(e._context,!0)),"object"===n?f:JSON.stringify(f)},E.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;i--)if(l[i].enabled){r._indexToPoints=l[i]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}(!Array.isArray(o)||!o[0])&&(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,f[t]=o}}for(H(o,c,d),a=0;a{e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}}),yt=c((e,t)=>{t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}}),xt=c(e=>{var t=f(),r=et(),n=r.strTranslate,a=vt(),i=yt().LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(f,m,A){var E=f.text(),L=!f.attr("data-notex")&&m&&m._context.typesetMath&&"undefined"!=typeof MathJax&&E.match(o),O=t.select(f.node().parentNode);if(!O.empty()){var D=f.attr("class")?f.attr("class").split(" ")[0]:"text";return D+="-math",O.selectAll("svg."+D).remove(),O.selectAll("g."+D+"-group").remove(),f.style("display",null).attr({"data-unformatted":E,"data-math":"N"}),L?(m&&m._promises||[]).push(new Promise(function(e){f.style("display","none");var a=parseInt(f.node().style.fontSize,10),i={fontSize:a};!function(e,n,a){var i=parseInt((MathJax.version||"").split(".")[0]);if(2===i||3===i){var o,u,d,f,h=function(){var a="math-output-"+r.randstr({},64);f=t.select("body").append("div").attr({id:a}).style({visibility:"hidden",position:"absolute","font-size":n.fontSize+"px"}).text(function(e){return e.replace(l,"\\lt ").replace(s,"\\gt ")}(e));var o=f.node();return 2===i?MathJax.Hub.Typeset(o):MathJax.typeset([o])},p=function(){var n=f.select(2===i?".MathJax_SVG":".MathJax"),o=!n.empty()&&f.select("svg").node();if(o){var l,s=o.getBoundingClientRect();l=2===i?t.select("body").select("#MathJax_SVG_glyphs"):n.select("defs"),a(n,l,s)}else r.log("There was an error in the tex syntax.",e),a();f.remove()};2===i?MathJax.Hub.Queue(function(){return u=r.extendDeepAll({},MathJax.Hub.config),d=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:c},displayAlign:"left"})},function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},h,p,function(){if("SVG"!==o)return MathJax.Hub.setRenderer(o)},function(){return void 0!==d&&(MathJax.Hub.processSectionDelay=d),MathJax.Hub.Config(u)}):3===i&&(u=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c,"svg"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),p(),"svg"!==o&&(MathJax.config.startup.output=o),MathJax.config=u}))}else r.warn("No MathJax version:",MathJax.version)}(L[2],i,function(t,r,i){O.selectAll("svg."+D).remove(),O.selectAll("g."+D+"-group").remove();var o=t&&t.select("svg");if(!o||!o.node())return I(),void e();var l=O.append("g").classed(D+"-group",!0).attr({"pointer-events":"none","data-unformatted":E,"data-math":"Y"});l.node().appendChild(o.node()),r&&r.node()&&o.node().insertBefore(r.node().cloneNode(!0),o.node().firstChild);var s=i.width,c=i.height;o.attr({class:D,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var u=f.node().style.fill||"black",d=o.select("g");d.attr({fill:u,stroke:u});var h=d.node().getBoundingClientRect(),p=h.width,m=h.height;(p>s||m>c)&&(o.style("overflow","hidden"),p=(h=o.node().getBoundingClientRect()).width,m=h.height);var g=+f.attr("x"),v=+f.attr("y"),y=-(a||f.node().getBoundingClientRect().height)/4;if("y"===D[0])l.attr({transform:"rotate("+[-90,g,v]+")"+n(-p/2,y-m/2)});else if("l"===D[0])v=y-m/2;else if("a"===D[0]&&0!==D.indexOf("atitle"))g=0,v=y;else{var x=f.attr("text-anchor");g-=p*("middle"===x?.5:"end"===x?1:0),v=v+y-m/2}o.attr({x:g,y:v}),A&&A.call(f,l),e(l)})})):I(),f}function I(){O.empty()||(D=f.attr("class")+"-math",O.select("svg."+D).remove()),f.text("").style("white-space","pre");var n=function(e,n){n=n.replace(g," ");var o,l=!1,s=[],c=-1;function f(){c++;var r=document.createElementNS(a.svg,"tspan");t.select(r).attr({class:"line",dy:c*i+"em"}),e.appendChild(r),o=r;var n=s;if(s=[{node:r}],n.length>1)for(var l=1;l doesnt match end tag <"+e+">. Pretending it did match.",n),o=s[s.length-1].node}else r.log("Ignoring unexpected end tag .",n)}x.test(n)?f():(o=e,s=[{node:e}]);for(var L=n.split(v),O=0;O|>|>)/g,c=[["$","$"],["\\(","\\)"]],u={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},d={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},p="​",m=["http:","https:","mailto:","",void 0,":"],g=e.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;e.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&S(n)}var M=/(^|;)\s*color:/;e.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a=e.split(v),i=[],o="",l=0,s=0;s3?i.push(c.slice(0,Math.max(0,h-3))+"..."):i.push(c.slice(0,h));break}o=""}}return i.join("")};var A={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function S(e){return e.replace(E,function(e,t){var r;return r="#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):A[t],r||e})}function C(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var a=r.protocol,i=n.protocol;return-1!==m.indexOf(a)&&-1!==m.indexOf(i)?t:""}function L(e,t,n){var a,i,o,l=n.horizontalAlign,s=n.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return i="bottom"===s?function(){return c.bottom-a.height}:"middle"===s?function(){return c.top+(c.height-a.height)/2}:function(){return c.top},o="right"===l?function(){return c.right-a.width}:"center"===l?function(){return c.left+(c.width-a.width)/2}:function(){return c.left},function(){a=this.node().getBoundingClientRect();var e=o()-u.left,t=i()-u.top,l=n.gd||{};if(n.gd){l._fullLayout._calcInverseTransform(l);var s=r.apply3DTransform(l._fullLayout._invTransform)(e,t);e=s[0],t=s[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}e.convertEntities=S,e.sanitizeHTML=function(e){e=e.replace(g," ");for(var r=document.createElement("p"),n=r,a=[],i=e.split(v),o=0;o{var r=f(),n=S(),a=v(),i=et(),o=F(),l=N().isValid,s=["showscale","autocolorscale","colorscale","reversescale","colorbar"],c=["min","max","mid","auto"];function u(e){var t,r,n,a=e._colorAx,i=a||e,o={};for(r=0;r=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function p(e,t){t=t||{};for(var i=e.domain,l=e.range,s=l.length,c=new Array(s),u=0;u{var r=Ee(),n=r.FORMAT_LINK,a=r.DATE_FORMAT_LINK;function i(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+n+"."].join(" ")}function o(e,t){return i(e,t)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?i:o)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:i,descriptionWithDates:o}}),wt=c((e,t)=>{var r=L(),n=R(),a=Ae().dash,i=C().extendFlat,o=ct().templatedArray,l=(Se().templateFormatStringDescription,_t().descriptionWithDates),s=y().ONEDAY,c=ut(),u=c.HOUR_PATTERN,d=c.WEEKDAY_PATTERN,f={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},h=i({},f,{values:f.values.slice().concat(["sync"])});function p(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var m={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"data_array",editType:"ticks"},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function b(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function _(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var w={valType:"color",dflt:n.defaultLine,editType:"ticks"},T={valType:"color",dflt:n.lightLine,editType:"ticks"};function k(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var M=i({},a,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:n.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:r({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"calc"},rangebreaks:o("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[d,u,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:s},editType:"calc"}),tickmode:h,nticks:p(),tick0:m,dtick:g,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:v,ticktext:{valType:"data_array",editType:"ticks"},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:b(),tickwidth:_(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:i({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:r({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:o("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:n.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:T,gridwidth:k(),griddash:M,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:n.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:n.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot"},minor:{tickmode:f,nticks:p("minor"),tick0:m,dtick:g,tickvals:v,ticks:x,ticklen:b("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:T,gridwidth:k("minor"),griddash:M,showgrid:A,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),Tt=c((e,t)=>{var r=wt(),n=L(),a=C().extendFlat,i=Me().overrideAll;t.exports=i({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:r.linecolor,outlinewidth:r.linewidth,bordercolor:r.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:a({},r.ticks,{dflt:""}),ticklabeloverflow:a({},r.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:n({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,title:{text:{valType:"string"},font:n({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}),kt=c((e,t)=>{var r=Tt(),n=B().counter,a=Be(),i=N().scales;function o(e){return"`"+e+"`"}a(i),t.exports=function(e,t){e=e||"";var a,l=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t&&t.onlyIfNumerical,"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===l,u="string"==typeof t.colorscaleDflt?i[t.colorscaleDflt]:null,d=t.editTypeOverride||"",f=e?e+".":"";"colorAttr"in t?(a=t.colorAttr,t.colorAttr):o(f+(a={z:"z",c:"color"}[l]));var h=l+"auto",p=l+"min",m=l+"max",g=l+"mid",v=(o(f+h),o(f+p),o(f+m),{});v[p]=v[m]=void 0;var y={};y[h]=!1;var x={};return"color"===a&&(x.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},x[p]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=r),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:n("coloraxis"),dflt:null,editType:"calc"}),x}}),Mt=c((e,t)=>{var r=C().extendFlat,n=kt(),a=N().scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:a.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:a.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:a.RdBu,editType:"calc"}},coloraxis:r({_isSubplotObj:!0,editType:"calc"},n("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}),At=c((e,t)=>{var r=et();t.exports=function(e){return r.isPlainObject(e.colorbar)}}),Et=c(e=>{var t=v(),r=et(),n=y(),a=n.ONEDAY,i=n.ONEWEEK;e.dtick=function(e,r){var n="log"===r,i="date"===r,o="category"===r,l=i?a:1;if(!e)return l;if(t(e))return(e=Number(e))<=0?l:o?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if("string"!=typeof e||!i&&!n)return l;var s=e.charAt(0),c=e.slice(1);return(c=t(c)?Number(c):0)<=0||!(i&&"M"===s&&c===Math.round(c)||n&&"L"===s||n&&"D"===s&&(1===c||2===c))?l:e},e.tick0=function(e,n,a,o){return"date"===n?r.cleanDate(e,r.dateTick0(a,o%i===0?1:0)):"D1"!==o&&"D2"!==o?t(e)?Number(e):0:void 0}}),St=c((e,t)=>{var r=Et(),n=et().isArrayOrTypedArray,a=_().isTypedArraySpec,i=_().decodeTypedArraySpec;t.exports=function(e,t,o,l,s){s||(s={});var c=s.isMinor,u=c?e.minor||{}:e,d=c?t.minor:t,f=c?"minor.":"";function h(e){var t=u[e];return a(t)&&(t=i(t)),void 0!==t?t:(d._template||{})[e]}var p=h("tick0"),m=h("dtick"),g=h("tickvals"),v=o(f+"tickmode",n(g)?"array":m?"linear":"auto");if("auto"===v||"sync"===v)o(f+"nticks");else if("linear"===v){var y=d.dtick=r.dtick(m,l);d.tick0=r.tick0(p,l,t.calendar,y)}else"multicategory"!==l&&(void 0===o(f+"tickvals")?d.tickmode="auto":c||o("ticktext"))}}),Ct=c((e,t)=>{var r=et(),n=wt();t.exports=function(e,t,a,i){var o=i.isMinor,l=o?e.minor||{}:e,s=o?t.minor:t,c=o?n.minor:n,u=o?"minor.":"",d=r.coerce2(l,s,c,"ticklen",o?.6*(t.ticklen||5):void 0),f=r.coerce2(l,s,c,"tickwidth",o?t.tickwidth||1:void 0),h=r.coerce2(l,s,c,"tickcolor",(o?t.tickcolor:void 0)||s.color);a(u+"ticks",!o&&i.outerTicks||d||f||h?"outside":"")||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}}),Lt=c((e,t)=>{t.exports=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter(function(t){return void 0!==e[t]});if(t.every(function(r){return e[r]===e[t[0]]})||1===t.length)return e[t[0]]}}),Ot=c((e,t)=>{var r=et(),n=ct();t.exports=function(e,t,a){var i,o,l=a.name,s=a.inclusionAttr||"visible",c=t[l],u=r.isArrayOrTypedArray(e[l])?e[l]:[],d=t[l]=[],f=n.arrayTemplater(t,l,s);for(i=0;i{var r=et(),n=F().contrast,a=wt(),i=Lt(),o=Ot();function l(e,t){function n(n,i){return r.coerce(e,t,a.tickformatstops,n,i)}n("enabled")&&(n("dtickrange"),n("value"))}t.exports=function(e,t,s,c,u){u||(u={});var d=s("labelalias");r.isPlainObject(d)||delete t.labelalias;var f=i(e);if(s("showticklabels")){u.noTicklabelshift||s("ticklabelshift"),u.noTicklabelstandoff||s("ticklabelstandoff");var h=u.font||{},p=t.color,m=-1!==(t.ticklabelposition||"").indexOf("inside")?n(u.bgColor):p&&p!==a.color.dflt?p:h.color;if(r.coerceFont(s,"tickfont",h,{overrideDflt:{color:m}}),!u.noTicklabelstep&&"multicategory"!==c&&"log"!==c&&s("ticklabelstep"),!u.noAng){var g=s("tickangle");!u.noAutotickangles&&"auto"===g&&s("autotickangles")}if("category"!==c){var v=s("tickformat");o(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),t.tickformatstops.length||delete t.tickformatstops,!u.noExp&&!v&&"date"!==c&&(s("showexponent",f),s("exponentformat"),s("minexponent"),s("separatethousands"))}!u.noMinorloglabels&&"log"===c&&s("minorloglabels")}}}),It=c((e,t)=>{var r=Lt();t.exports=function(e,t,n,a,i){i||(i={});var o=i.tickSuffixDflt,l=r(e);n("tickprefix")&&n("showtickprefix",l),n("ticksuffix",o)&&n("showticksuffix",l)}}),Pt=c((e,t)=>{var r=et(),n=ct(),a=St(),i=Ct(),o=Dt(),l=It(),s=Tt();t.exports=function(e,t,c){var u=n.newContainer(t,"colorbar"),d=e.colorbar||{};function f(e,t){return r.coerce(d,u,s,e,t)}var h=c.margin||{t:0,b:0,l:0,r:0},p=c.width-h.l-h.r,m=c.height-h.t-h.b,g="v"===f("orientation"),v=f("thicknessmode");f("thickness","fraction"===v?30/(g?p:m):30);var y=f("lenmode");f("len","fraction"===y?1:g?m:p);var x,b,_,w="paper"===f("yref"),T="paper"===f("xref"),k="left";g?(_="middle",k=T?"left":"right",x=T?1.02:1,b=.5):(_=w?"bottom":"top",k="center",x=.5,b=w?1.02:1),r.coerce(d,u,{x:{valType:"number",min:T?-2:0,max:T?3:1,dflt:x}},"x"),r.coerce(d,u,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:b}},"y"),f("xanchor",k),f("xpad"),f("yanchor",_),f("ypad"),r.noneOrAll(d,u,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var M=r.coerce(d,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",-1!==M.indexOf("inside")?"hide past domain":"hide past div"),a(d,u,f,"linear");var A=c.font,E={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:A};-1!==M.indexOf("inside")&&(E.bgColor="black"),l(d,u,f,"linear",E),o(d,u,f,"linear",E),i(d,u,f,"linear",E),f("title.text",c._dfltTitle.colorbar);var S=u.showticklabels?u.tickfont:A,C=r.extendFlat({},A,{family:S.family,size:r.bigFont(S.size)});r.coerceFont(f,"title.font",C),f("title.side",g?"top":"right")}}),Nt=c((e,t)=>{var r=v(),n=et(),a=At(),i=Pt(),o=N().isValid,l=Ne().traceIs;function s(e,t){var r=t.slice(0,t.length-1);return t?n.nestedProperty(e,r).get()||{}:e}t.exports=function e(t,c,u,d,f){var h=f.prefix,p=f.cLetter,m="_module"in c,g=s(t,h),v=s(c,h),y=s(c._template||{},h)||{},x=function(){return delete t.coloraxis,delete c.coloraxis,e(t,c,u,d,f)};if(m){var b=u._colorAxes||{},_=d(h+"coloraxis");if(_){var w=l(c,"contour")&&n.nestedProperty(c,"contours.coloring").get()||"heatmap",T=b[_];return void(T?(T[2].push(x),T[0]!==w&&(T[0]=!1,n.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,c,[x]])}}var k=g[p+"min"],M=g[p+"max"],A=r(k)&&r(M)&&k{var r=et(),n=ct(),a=Mt(),i=Nt();t.exports=function(e,t){function o(n,i){return r.coerce(e,t,a,n,i)}o("colorscale.sequential"),o("colorscale.sequentialminus"),o("colorscale.diverging");var l,s,c=t._colorAxes;function u(e,t){return r.coerce(l,s,a.coloraxis,e,t)}for(var d in c){var f=c[d];if(f[0])l=e[d]||{},(s=n.newContainer(t,d,"coloraxis"))._name=d,i(l,s,t,u,{prefix:"",cLetter:"c"});else{for(var h=0;h{var r=et(),n=bt().hasColorscale,a=bt().extractOpts;t.exports=function(e,t){function i(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,n){var o=n.container?r.nestedProperty(e,n.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var l=a(o),s=l.auto;(s||void 0===l.min)&&i(o,n.min),(s||void 0===l.max)&&i(o,n.max),l.autocolorscale&&i(o,"colorscale")}}for(var l=0;l{var r=v(),n=et(),a=bt().extractOpts;t.exports=function(e,t,i){var o,l=e._fullLayout,s=i.vals,c=i.containerStr,u=c?n.nestedProperty(t,c).get():t,d=a(u),f=!1!==d.auto,h=d.min,p=d.max,m=d.mid,g=function(){return n.aggNums(Math.min,null,s)},v=function(){return n.aggNums(Math.max,null,s)};void 0===h?h=g():f&&(h=u._colorAx&&r(h)?Math.min(h,g()):g()),void 0===p?p=v():f&&(p=u._colorAx&&r(p)?Math.max(p,v()):v()),f&&void 0!==m&&(p-m>m-h?h=m-(p-m):p-m=0?l.colorscale.sequential:l.colorscale.sequentialminus,d._sync("colorscale",o))}}),Bt=c((e,t)=>{var r=N(),n=bt();t.exports={moduleType:"component",name:"colorscale",attributes:kt(),layoutAttributes:Mt(),supplyLayoutDefaults:Rt(),handleDefaults:Nt(),crossTraceDefaults:Ft(),calc:zt(),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:n.hasColorscale,extractOpts:n.extractOpts,extractScale:n.extractScale,flipScale:n.flipScale,makeColorScaleFunc:n.makeColorScaleFunc,makeColorScaleFuncFromTrace:n.makeColorScaleFuncFromTrace}}),jt=c((e,t)=>{var r=et(),n=_().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return r.isPlainObject(t)&&(r.isArrayOrTypedArray(t.size)||n(t.size))}}}),Ht=c((e,t)=>{var r=v();t.exports=function(e,t){t||(t=2);var n=e.marker,a=n.sizeref||1,i=n.sizemin||0,o="area"===n.sizemode?function(e){return Math.sqrt(e/a)}:function(e){return e/a};return function(e){var n=o(e/t);return r(n)&&n>0?Math.max(n,i):0}}}),qt=c(e=>{var t=et();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],a=t.yaxes||[],i=0;i=0&&r.index{t.exports=function(e){var t=[];return e.replace(n,function(e,n,i){var o=n.toLowerCase();for(i=function(e){var t=e.match(a);return t?t.map(Number):[]}(i),"m"==o&&i.length>2&&(t.push([n].concat(i.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(i.length==r[o])return i.unshift(n),t.push(i);if(i.length{var r,n,a,i,o=Yt(),l=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},s="M0,0Z",c=Math.sqrt(2),u=Math.sqrt(3),d=Math.PI,f=Math.cos,h=Math.sin;function p(e){return null===e}function m(e,t,l){if(!(e&&e%360!=0||t))return l;if(a===e&&i===t&&r===l)return n;function s(e,r){var n=f(e),a=h(e),i=r[0],o=r[1]+(t||0);return[i*n-o*a,i*a+o*n]}a=e,i=t,r=l;for(var c=e/180*d,u=0,p=0,m=o(l),g="",v=0;v{var r=f(),n=et(),a=n.numberFormat,i=v(),o=S(),l=Ne(),s=F(),c=Bt(),u=n.strTranslate,d=xt(),h=vt(),p=yt().LINE_SPACING,m=z().DESELECTDIM,g=jt(),y=Ht(),x=qt().appendArrayPointValue,b=t.exports={};function _(e){return"none"===e?void 0:e}b.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,l=t.family,c=t.shadow,u=t.lineposition,f=t.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(s.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",_(function(e){return w[e]}(f))),c&&e.style("text-shadow","auto"===c?d.makeTextShadow(s.contrast(i)):_(c)),u&&e.style("text-decoration-line",_(function(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(u)))};var w={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function T(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=b.getPatternAttr,l=a&&(o(a.shape,0,"")||o(a.path,0,""));if(l){var c=o(a.bgcolor,0,null),u=o(a.fgcolor,0,null),d=a.fgopacity,f=o(a.size,0,8),h=o(a.solidity,0,.3),p=t.uid;b.pattern(e,"point",r,p,l,f,h,void 0,a.fillmode,c,u,d)}else if(i&&"none"!==i.type){var m,g,v=i.type,y="scatterfill-"+t.uid;n&&(y="legendfill-"+t.uid),n||void 0===i.start&&void 0===i.stop?("horizontal"===v&&(v+="reversed"),e.call(b.gradient,r,y,v,i.colorscale,"fill")):("horizontal"===v?(m={x:i.start,y:0},g={x:i.stop,y:0}):"vertical"===v&&(m={x:0,y:i.start},g={x:0,y:i.stop}),m.x=t._xA.c2p(void 0===m.x?t._extremes.x.min[0].val:m.x,!0),m.y=t._yA.c2p(void 0===m.y?t._extremes.y.min[0].val:m.y,!0),g.x=t._xA.c2p(void 0===g.x?t._extremes.x.max[0].val:g.x,!0),g.y=t._yA.c2p(void 0===g.y?t._extremes.y.max[0].val:g.y,!0),e.call(L,r,y,"linear",i.colorscale,"fill",m,g,!0,!1))}else t.fillcolor&&e.call(s.fill,t.fillcolor)}b.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},b.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},b.setRect=function(e,t,r,n,a){e.call(b.setPosition,t,r).call(b.setSize,n,a)},b.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),o=n.c2p(e.y);return!!(i(a)&&i(o)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",o):t.attr("transform",u(a,o)),!0)},b.translatePoints=function(e,t,n){e.each(function(e){var a=r.select(this);b.translatePoint(e,a,t,n)})},b.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},b.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var n=t.xaxis,a=t.yaxis;e.each(function(t){var i=t[0].trace,o=i.xcalendar,s=i.ycalendar,c=l.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each(function(e){b.hideOutsideRangePoint(e,r.select(this),n,a,o,s)})})}},b.crispRound=function(e,t,r){return t&&i(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},b.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";s.stroke(t,n||i.color),b.dashLine(t,l,o)},b.lineGroupStyle=function(e,t,n,a){e.style("fill","none").each(function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";r.select(this).call(s.stroke,n||i.color).call(b.dashLine,l,o)})},b.dashLine=function(e,t,r){r=+r||0,t=b.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},b.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},b.singleFillStyle=function(e,t){var n=r.select(e.node());T(e,((n.data()[0]||[])[0]||{}).trace||{},t,!1)},b.fillGroupStyle=function(e,t,n){e.style("stroke-width",0).each(function(e){var a=r.select(this);e[0].trace&&T(a,e[0].trace,t,n)})};var k=Vt();b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(k).forEach(function(e){var t=k[e],r=t.n;b.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),b.symbolNames[r]=e,b.symbolFuncs[r]=t.f,b.symbolBackOffs[r]=t.backoff||0,t.needLine&&(b.symbolNeedLines[r]=!0),t.noDot?b.symbolNoDot[r]=!0:b.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(b.symbolNoFill[r]=!0)});var M=b.symbolNames.length;function A(e,t,r,n){var a=e%100;return b.symbolFuncs[a](t,r,n)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(e){if(i(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=b.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=M||e>=400?0:Math.floor(Math.max(e,0))};var E=a("~f"),C={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function L(e,t,a,i,l,c,u,d,f,h){var p,m=l.length;"linear"===i?p={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:d.x,y2:d.y,gradientUnits:f?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===i&&(p={node:"radialGradient",reversed:h});for(var g=new Array(m),v=0;v=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):void 0===e.mo?l.opacity:e.mo),a.ms2mrc){var u;u="various"===e.ms||"various"===l.size?3:a.ms2mrc(e.ms),e.mrc=u,a.selectedSizeFn&&(u=e.mrc=a.selectedSizeFn(e));var d=b.symbolNumber(e.mx||l.symbol)||0;e.om=d%200>=100;var f=le(e,r),h=Z(e,r);t.attr("d",A(d,u,f,h))}var p,m,g,v=!1;if(e.so)g=c.outlierwidth,m=c.outliercolor,p=l.outliercolor;else{var y=(c||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in e?e.mlcc=a.lineScale(e.mlc):n.isArrayOrTypedArray(c.color)?s.defaultLine:c.color,n.isArrayOrTypedArray(l.color)&&(p=s.defaultLine,v=!0),p="mc"in e?e.mcc=a.markerScale(e.mc):l.color||l.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(p=a.selectedColorFn(e))}let x=e.mld||(c||{}).dash;if(x&&b.dashLine(t,x,g),e.om)t.call(s.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var _=l.gradient,w=e.mgt;w?v=!0:w=_&&_.type,n.isArrayOrTypedArray(w)&&(w=w[0],C[w]||(w=0));var T=l.pattern,k=b.getPatternAttr,M=T&&(k(T.shape,e.i,"")||k(T.path,e.i,""));if(w&&"none"!==w){var E=e.mgc;E?v=!0:E=_.color;var S=r.uid;v&&(S+="-"+e.i),b.gradient(t,i,S,w,[[0,E],[1,p]],"fill")}else if(M){var L=!1,O=T.fgcolor;!O&&o&&o.color&&(O=o.color,L=!0);var D=k(O,e.i,o&&o.color||null),I=k(T.bgcolor,e.i,null),P=T.fgopacity,N=k(T.size,e.i,8),R=k(T.solidity,e.i,.3);L=L||e.mcc||n.isArrayOrTypedArray(T.shape)||n.isArrayOrTypedArray(T.path)||n.isArrayOrTypedArray(T.bgcolor)||n.isArrayOrTypedArray(T.fgcolor)||n.isArrayOrTypedArray(T.size)||n.isArrayOrTypedArray(T.solidity);var F=r.uid;L&&(F+="-"+e.i),b.pattern(t,"point",i,F,M,N,R,e.mcc,T.fillmode,I,D,P)}else n.isArrayOrTypedArray(p)?s.fill(t,p[e.i]):s.fill(t,p);g&&s.stroke(t,m)}},b.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=b.tryColorscale(r,""),t.lineScale=b.tryColorscale(r,"line"),l.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?y(e):function(){return(r.size||6)/2}),e.selectedpoints&&n.extendFlat(t,b.makeSelectedPointStyleFns(e)),t},b.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},a=e.unselected||{},i=e.marker||{},o=r.marker||{},s=a.marker||{},c=i.opacity,u=o.opacity,d=s.opacity,f=void 0!==u,h=void 0!==d;(n.isArrayOrTypedArray(c)||f||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?f?u:t:h?d:m*t});var p=i.color,g=o.color,v=s.color;(g||v)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?g||t:v||t});var y=i.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?_?x/2:t:w?b/2:t}),t},b.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,c=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?c||t:u||(c?t:s.addOpacity(t,m))},t},b.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=b.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];n.selectedOpacityFn&&i.push(function(e,t){e.style("opacity",n.selectedOpacityFn(t))}),n.selectedColorFn&&i.push(function(e,t){s.fill(e,n.selectedColorFn(t))}),n.selectedSizeFn&&i.push(function(e,r){var i=r.mx||a.symbol||0,o=n.selectedSizeFn(r);e.attr("d",A(b.symbolNumber(i),o,le(r,t),Z(r,t))),r.mrc2=o}),i.length&&e.each(function(e){for(var t=r.select(this),n=0;n0?r:0}function R(e,t,r){return r&&(e=V(e)),t?j(e[1]):B(e[0])}function B(e){var t=r.round(e,2);return O=t,t}function j(e){var t=r.round(e,2);return D=t,t}function H(e,t,r,n){var a=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],l=r[1]-t[1],s=Math.pow(a*a+i*i,.25),c=Math.pow(o*o+l*l,.25),u=(c*c*a-s*s*o)*n,d=(c*c*i-s*s*l)*n,f=3*c*(s+c),h=3*s*(s+c);return[[B(t[0]+(f&&u/f)),j(t[1]+(f&&d/f))],[B(t[0]-(h&&u/h)),j(t[1]-(h&&d/h))]]}b.textPointStyle=function(e,t,a){if(e.size()){var i;if(t.selectedpoints){var o=b.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=a._fullLayout;e.each(function(e){var o=r.select(this),c=l?n.extractOption(e,t,"txt","texttemplate"):n.extractOption(e,t,"tx","text");if(c||0===c){if(l){var u=t._module.formatLabels,f=u?u(e,t,s):{},h={};x(h,t,e.i),c=n.texttemplateString({data:[h,e,t._meta],fallback:t.texttemplatefallback,labels:f,locale:s._d3locale,template:c})}var p=e.tp||t.textposition,m=N(e,t),g=i?i(e):e.tc||t.textfont.color;o.call(b.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:m,color:g}).text(c).call(d.convertToTspans,a).call(P,p,m,e.mrc)}else o.remove()})}},b.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=b.makeSelectedTextStyleFns(t);e.each(function(e){var a=r.select(this),i=n.selectedTextColorFn(e),o=e.tp||t.textposition,c=N(e,t);s.fill(a,i);var u=l.traceIs(t,"bar-like");P(a,o,c,e.mrc2||e.mrc,u)})}},b.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r=c||w>=d&&w<=c)&&(T<=f&&T>=u||T>=f&&T<=u)&&(e=[w,T])}return e}b.steps=function(e){var t=q[e]||Y;return function(e){for(var r="M"+B(e[0][0])+","+j(e[0][1]),n=e.length,a=1;a=1e4&&(b.savedBBoxes={},U=0),a&&(b.savedBBoxes[a]=g),U++,n.extendFlat({},g)},b.setClipUrl=function(e,t,r){e.attr("clip-path",W(t,r))},b.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+t[0]||0,y:+t[1]||0}},b.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=u(t,r)).trim(),e[a]("transform",i),i},b.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+t[0]||1,y:+t[1]||1}},b.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+r+")").trim(),e[a]("transform",i),i};var G=/\s*sc.*/;b.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each(function(){var e=(this.getAttribute("transform")||"").replace(G,"");e=(e+=n).trim(),this.setAttribute("transform",e)})}};var X=/translate\([^)]*\)\s*$/;function Z(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}b.setTextPointsScale=function(e,t,n){e&&e.each(function(){var e,a=r.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(X);e=1===t&&1===n?[]:[u(o,l),"scale("+t+","+n+")",u(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}})},b.getMarkerStandoff=Z;var J,K,Q,ee,te,re,ne=Math.atan2,ae=Math.cos,ie=Math.sin;function oe(e,t){var r=t[0],n=t[1];return[r*ae(e)-n*ie(e),r*ie(e)+n*ae(e)]}function le(e,t){var r=e.ma;void 0===r&&(!(r=t.marker.angle)||n.isArrayOrTypedArray(r))&&(r=0);var a,o,l=t.marker.angleref;if("previous"===l||"north"===l){if(t._geo){var s=t._geo.project(e.lonlat);a=s[0],o=s[1]}else{var c=t._xA,u=t._yA;if(!c||!u)return 90;a=c.c2p(e.x),o=u.c2p(e.y)}if(t._geo){var d,f=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([f,h+1e-5]),m=t._geo.project([f+1e-5,h]),g=ne(m[1]-o,m[0]-a),v=ne(p[1]-o,p[0]-a);if("north"===l)d=r/180*Math.PI;else if("previous"===l){var y=f/180*Math.PI,x=h/180*Math.PI,b=J/180*Math.PI,_=K/180*Math.PI,w=b-y,T=ae(_)*ie(w),k=ie(_)*ae(x)-ae(_)*ie(x)*ae(w);d=-ne(T,k)-Math.PI,J=f,K=h}var M=oe(g,[ae(d),0]),A=oe(v,[ie(d),0]);r=ne(M[1]+A[1],M[0]+A[0])/Math.PI*180,"previous"===l&&(re!==t.uid||e.i!==te+1)&&(r=null)}if("previous"===l&&!t._geo)if(re===t.uid&&e.i===te+1&&i(a)&&i(o)){var E=a-Q,S=o-ee,C=t.line&&t.line.shape||"",L=C.slice(C.length-1);"h"===L&&(S=0),"v"===L&&(E=0),r+=ne(S,E)/Math.PI*180+90}else r=null}return Q=a,ee=o,te=e.i,re=t.uid,r}b.getMarkerAngle=le}),$t=c((e,t)=>{var r=f(),n=v(),a=gt(),i=Ne(),o=et(),l=o.strTranslate,s=Ut(),c=F(),u=xt(),d=z(),h=yt().OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(e,t,f){var m,g=e._fullLayout,v=f.propContainer,y=f.propName,x=f.placeholder,b=f.traceIndex,_=f.avoid||{},w=f.attributes,T=f.transform,k=f.containerGroup,M=1,A=v.title,E=(A&&A.text?A.text:"").trim(),S=!1,C=A&&A.font?A.font:{},L=C.family,O=C.size,D=C.color,I=C.weight,P=C.style,N=C.variant,R=C.textcase,F=C.lineposition,z=C.shadow,B=!!f.subtitlePropName,j=f.subtitlePlaceholder,H=(v.title||{}).subtitle||{text:"",font:{}},q=(H.text||"").trim(),Y=!1,V=1,U=H.font,$=U.family,W=U.size,G=U.color,X=U.weight,Z=U.style,J=U.variant,K=U.textcase,Q=U.lineposition,ee=U.shadow;"title.text"===y?m="titleText":-1!==y.indexOf("axis")?m="axisTitleText":-1!==y.indexOf("colorbar")&&(m="colorbarTitleText");var te=e._context.edits[m];function re(e,t){return void 0!==e&&void 0!==t&&e.replace(p," % ")===t.replace(p," % ")}""===E?M=0:re(E,x)&&(te||(E=""),M=.2,S=!0),B&&(""===q?V=0:re(q,j)&&(te||(q=""),V=.2,Y=!0)),f._meta?E=o.templateString(E,f._meta):g._meta&&(E=o.templateString(E,g._meta));var ne,ae=E||q||te;k||(k=o.ensureSingle(g._infolayer,"g","g-"+t),ne=g._hColorbarMoveTitle);var ie=k.selectAll("text."+t).data(ae?[0]:[]);ie.enter().append("text"),ie.text(E).attr("class",t),ie.exit().remove();var oe=null,le=t+"-subtitle",se=q||te;if(B&&((oe=k.selectAll("text."+le).data(se?[0]:[])).enter().append("text"),oe.text(q).attr("class",le),oe.exit().remove()),!ae)return k;function ce(e,t){o.syncOrAsync([ue,de],{title:e,subtitle:t})}function ue(n){var i,d=n.title,f=n.subtitle;if(!T&&ne&&(T={}),T?(i="",T.rotate&&(i+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||ne)&&(i+=l(0,(T.offset||0)-(ne||0)))):i=null,d.attr("transform",i),d.style("opacity",M*c.opacity(D)).call(s.font,{color:c.rgb(D),size:r.round(O,2),family:L,weight:I,style:P,variant:N,textcase:R,shadow:z,lineposition:F}).attr(w).call(u.convertToTspans,e,function(e){if(e){var t=r.select(e.node().parentNode).select("."+le);if(!t.empty()){var n=e.node().getBBox();if(n.height){var a=n.y+n.height+1.6*W;t.attr("y",a)}}}}),f&&!f.empty()){var h=k.select("."+t+"-math-group"),p=d.node().getBBox(),m=h.node()?h.node().getBBox():void 0,g=m?m.y+m.height+1.6*W:p.y+p.height+1.6*W,v=o.extendFlat({},w,{y:g});f.attr("transform",i),f.style("opacity",V*c.opacity(G)).call(s.font,{color:c.rgb(G),size:r.round(W,2),family:$,weight:X,style:Z,variant:J,textcase:K,shadow:ee,lineposition:Q}).attr(v).call(u.convertToTspans,e)}return a.previousPromises(e)}function de(t){var a=t.title,i=r.select(a.node().parentNode);if(_&&_.selection&&_.side&&E){i.attr("transform",null);var c=h[_.side],u="left"===_.side||"top"===_.side?-1:1,d=n(_.pad)?_.pad:2,f=s.bBox(i.node()),p={t:0,b:0,l:0,r:0},m=e._fullLayout._reservedMargin;for(var y in m)for(var x in m[y]){var b=m[y][x];p[x]=Math.max(p[x],b)}var w={left:p.l,top:p.t,right:g.width-p.r,bottom:g.height-p.b},T=_.maxShift||u*(w[_.side]-f[_.side]),k=0;if(T<0)k=T;else{var M=_.offsetLeft||0,A=_.offsetTop||0;f.left-=M,f.right-=M,f.top-=A,f.bottom-=A,_.selection.each(function(){var e=s.bBox(this);o.bBoxIntersect(f,e,d)&&(k=Math.max(k,u*(e[_.side]-f[c])+d))}),k=Math.min(T,k),v._titleScoot=Math.abs(k)}if(k>0||T<0){var S={left:[-k,0],right:[k,0],top:[0,-k],bottom:[0,k]}[_.side];i.attr("transform",l(S[0],S[1]))}}}function fe(e,t){e.text(t).on("mouseover.opacity",function(){r.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)})}if(ie.call(ce,oe),te&&(E?ie.on(".opacity",null):(fe(ie,x),S=!0),ie.call(u.makeEditable,{gd:e}).on("edit",function(t){void 0!==b?i.call("_guiRestyle",e,y,t,b):i.call("_guiRelayout",e,y,t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ce)}).on("input",function(e){this.text(e||" ").call(u.positionText,w.x,w.y)}),B)){if(B&&!E){var he=ie.node().getBBox(),pe=he.y+he.height+1.6*W;oe.attr("y",pe)}q?oe.on(".opacity",null):(fe(oe,j),Y=!0),oe.call(u.makeEditable,{gd:e}).on("edit",function(t){i.call("_guiRelayout",e,"title.subtitle.text",t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ce)}).on("input",function(e){this.text(e||" ").call(u.positionText,oe.attr("x"),oe.attr("y"))})}return ie.classed("js-placeholder",S),oe&&!oe.empty()&&oe.classed("js-placeholder",Y),k},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}}),Wt=c((e,t)=>{var r=f(),n=p().utcFormat,a=et(),i=a.numberFormat,o=v(),l=a.cleanNumber,s=a.ms2DateTime,c=a.dateTime2ms,u=a.ensureNumber,d=a.isArrayOrTypedArray,h=y(),m=h.FP_SAFE,g=h.BADNUM,x=h.LOG_CLIP,b=h.ONEWEEK,_=h.ONEDAY,w=h.ONEHOUR,T=h.ONEMIN,k=h.ONESEC,M=dt(),A=ut(),E=A.HOUR_PATTERN,S=A.WEEKDAY_PATTERN;function C(e){return Math.pow(10,e)}function L(e){return null!=e}t.exports=function(e,t){t=t||{};var f=e._id||"x",h=f.charAt(0);function p(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*x*Math.abs(n-a))}return g}function v(t,r,n,i){if((i||{}).msUTC&&o(t))return+t;var l=c(t,n||e.calendar);if(l===g){if(!o(t))return g;t=+t;var s=Math.floor(10*a.mod(t+.05,1)),u=Math.round(t-s/10);l=c(new Date(u))+s/10}return l}function y(t,r,n){return s(t,r,n||e.calendar)}function O(t){return e._categories[Math.round(t)]}function D(t){if(L(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return g}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function P(e){var t=I(e);return void 0!==t?t:o(e)?+e:void 0}function N(e){return o(e)?+e:I(e)}function R(e,t,n){return r.round(n+t*e,2)}function F(e,t,r){return(e-r)/t}var z=function(t){return o(t)?R(t,e._m,e._b):g},B=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var j="y"===h;z=function(t){if(!o(t))return g;var r=e._rangebreaks.length;if(!r)return R(t,e._m,e._b);var n=j;e.range[0]>e.range[1]&&(n=!n);for(var a=n?-1:1,i=a*t,l=0,s=0;su)){l=i<(c+u)/2?s:s+1;break}l=s+1}var d=e._B[l]||0;return isFinite(d)?R(t,e._m2,d):0},B=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,a=0;ae._rangebreaks[a].pmax&&(n=a+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?p:u,e.l2c="log"===e.type?C:u,e.l2p=z,e.p2l=B,e.c2p="log"===e.type?function(e,t){return z(p(e,t))}:z,e.p2c="log"===e.type?function(e){return C(B(e))}:B,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=B,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return p(l(e),t)},e.r2d=e.r2c=function(e){return C(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=u,e.c2r=p,e.l2d=C,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return C(B(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=B,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=a.identity,e.d2c=e.r2c=e.d2l=e.r2l=v,e.c2d=e.c2r=e.l2d=e.l2r=y,e.d2p=e.r2p=function(t,r,n){return e.l2p(v(t,0,n))},e.p2d=e.p2r=function(e,t,r){return y(B(e),t,r)},e.cleanPos=function(t){return a.cleanDate(t,g,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=D,e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=P,e.r2c=function(t){var r=N(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=N,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=P,e.r2c=function(t){var r=P(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=u,e.r2l=P,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(r){var n,i,o=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var s in l)if(s!==f){var c=t[M.id2name(s)];o=o.concat(c._traceIndices)}var u=[[0,{}],[0,{}]],p=[];for(n=0;ns[1]&&(i[l?0:1]=n),i[0]===i[1]){var c=e.l2r(r),u=e.l2r(n);if(void 0!==r){var d=c+1;void 0!==n&&(d=Math.min(d,u)),i[l?1:0]=d}if(void 0!==n){var f=u+1;void 0!==r&&(f=Math.max(f,c)),i[l?0:1]=f}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,i,l=a.nestedProperty(e,t).get();if(i=(i="date"===e.type?a.dfltRange(e.calendar):"y"===h?A.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||A.DFLTRANGEX).slice(),("tozero"===e.rangemode||"nonnegative"===e.rangemode)&&(i[0]=0),l&&2===l.length){var s=null===l[0],c=null===l[1];for("date"===e.type&&!e.autorange&&(l[0]=a.cleanDate(l[0],g,e.calendar),l[1]=a.cleanDate(l[1],g,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!a.isDateTime(l[n],e.calendar)){e[t]=i;break}if(e.r2l(l[0])===e.r2l(l[1])){var u=a.constrain(e.r2l(l[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);l[0]=e.l2r(u-1e3),l[1]=e.l2r(u+1e3);break}}else{if(!o(l[n])){if(s||c||!o(l[1-n])){e[t]=i;break}l[n]=l[1-n]*(n?10:.1)}if(l[n]<-m?l[n]=-m:l[n]>m&&(l[n]=m),l[0]===l[1]){var d=Math.max(1,Math.abs(1e-6*l[0]));l[0]-=d,l[1]+=d}}}else a.nestedProperty(e,t).set(i)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=M.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,c=e.r2l(e[i][0],o),u=e.r2l(e[i][1],o),d="y"===h;if(d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(l=0;lu&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(d?u:c)),l=0;li&&(i+=7,oi&&(i+=24,o=n&&o=n&&t=l.min&&(el.max&&(l.max=n),i=!1)}i&&c.push({min:e,max:n})}};for(n=0;n{var r=v(),n=et(),a=y().BADNUM,i=n.isArrayOrTypedArray,o=n.isDateTime,l=n.cleanNumber,s=Math.round;function c(e,t){return t?r(e):"number"==typeof e}function u(e){return Math.max(1,(e-1)/1e3)}t.exports=function(e,t,n){var d,f=e,h=n.noMultiCategory;if(i(f)&&!f.length)return"-";if(!h&&i((d=f)[0])&&i(d[1]))return"multicategory";if(h&&Array.isArray(f[0])){for(var p=[],m=0;m2*l}(f,t))return"date";var v="strict"!==n.autotypenumbers;return function(e,t){for(var r=e.length,n=u(r),i=0,o=0,c={},d=0;d2*i}(f,v)?"category":function(e,t){for(var r=e.length,n=0;n{var r=f(),n=v(),a=et(),i=y().FP_SAFE,o=Ne(),l=Ut(),s=dt(),c=s.getFromId,u=s.isLinked;function d(e,t){var r,n,i=[],o=e._fullLayout,l=p(o,t,0),s=p(o,t,1),c=g(e,t),u=c.min,d=c.max;if(0===u.length||0===d.length)return a.simpleMap(t.range,t.r2l);var f=u[0].val,m=d[0].val;for(r=1;r0&&((k=L-l(b)-s(_))>O?M/k>D&&(w=b,T=_,D=M/k):M/L>D&&(w={val:b.val,nopad:1},T={val:_.val,nopad:1},D=M/L));if(f===m){var I=f-1,P=f+1;if(S)if(0===f)i=[0,1];else{var N=(f>0?d:u).reduce(function(e,t){return Math.max(e,s(t))},0),R=f/(1-Math.min(.5,N/L));i=f>0?[0,R]:[R,0]}else i=C?[Math.max(0,I),Math.max(1,P)]:[I,P]}else S?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):C&&(w.val-D*l(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),D=(T.val-w.val-h(t,b.val,_.val))/(L-l(w)-s(T)),i=[w.val-D*l(w),T.val+D*s(T)];return i=A(i,t),t.limitRange&&t.limitRange(),y&&i.reverse(),a.simpleMap(i,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),E=M((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!T){if(f=1/0,h=-1/0,_)for(a=0;a0&&(f=o),o>h&&o-i&&(f=o),o>h&&o=D;a--)O(a);return{min:p,max:m,opts:r}},concatExtremes:g};var m=3;function g(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,u=[],d=[];function f(e,t){for(n=0;n=r&&(c.extrapad||!o)){l=!1;break}a(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(s,1),s--)}if(l){var u=i&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function w(e){return n(e)&&Math.abs(e)=t}function M(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))=c&&(o=c,r=c),l<=c&&(l=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&M(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&M(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&M(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&M(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}}),Zt=c((e,t)=>{var r=f(),n=v(),a=gt(),i=Ne(),o=et(),l=o.strTranslate,s=xt(),c=$t(),u=F(),d=Ut(),h=wt(),p=Et(),m=(ut(),y()),g=m.ONEMAXYEAR,x=m.ONEAVGYEAR,b=m.ONEMINYEAR,_=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,T=m.ONEMINQUARTER,k=m.ONEMAXMONTH,M=m.ONEAVGMONTH,A=m.ONEMINMONTH,E=m.ONEWEEK,S=m.ONEDAY,C=S/2,L=m.ONEHOUR,O=m.ONEMIN,D=m.ONESEC,I=m.ONEMILLI,P=m.ONEMICROSEC,N=m.MINUS_SIGN,R=m.BADNUM,z={K:"zeroline"},B={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},H={K:"tick",L:"path"},q={K:"tick",L:"text"},Y={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},V=yt(),U=V.MID_SHIFT,$=V.CAP_SHIFT,W=V.LINE_SPACING,G=V.OPPOSITE_SIDE,X=t.exports={};X.setConvert=Wt();var Z=Gt(),J=dt(),K=J.idSort,Q=J.isLinked;X.id2name=J.id2name,X.name2id=J.name2id,X.cleanId=J.cleanId,X.list=J.list,X.listIds=J.listIds,X.getFromId=J.getFromId,X.getFromTrace=J.getFromTrace;var ee=Xt();function te(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}X.getAutoRange=ee.getAutoRange,X.findExtremes=ee.findExtremes,X.coerceRef=function(e,t,r,n,a,i){var l=n.charAt(n.length-1),s=r._fullLayout._subplots[l+"axis"],c=n+"ref",u={};return a||(a=s[0]||("string"==typeof i?i:i[0])),i||(i=a),s=s.concat(s.map(function(e){return e+" domain"})),u[c]={valType:"enumerated",values:s.concat(i?"string"==typeof i?[i]:i:[]),dflt:a},o.coerce(e,t,u,c)},X.coerceRefArray=function(e,t,r,n,a,i,l){let s=n.charAt(n.length-1);var c=r._fullLayout._subplots[s+"axis"];let u=n+"ref";var d=e[u];a||(a=c[0]||("string"==typeof i?i:i[0])),c=(c=c.concat(c.map(e=>e+" domain"))).concat(i||[]),d.length>l?(o.warn("Array attribute "+u+" has more entries than expected, truncating to "+l),d=d.slice(0,l)):d.lengthn&&f2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},X.saveRangeInitial=function(e,t){for(var r=X.list(e,"",!0),n=!1,a=0;a.3*f||u(a)||u(i))){var h=r.dtick/2;e+=e+h.8){var l=Number(r.slice(1));i.exactYears>.8&&l%12==0?e=X.tickIncrement(e,"M6","reverse")+1.5*S:i.exactMonths>.8?e=X.tickIncrement(e,"M1","reverse")+15.5*S:e-=C;var s=X.tickIncrement(e,r);if(s<=n)return s}return e}(y,e,v,c,i)),g=y;g<=u;)g=X.tickIncrement(g,v,!1,i);return{start:t.c2r(y,0,i),end:t.c2r(g,0,i),size:v,_dataSpan:u-c}},X.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var a,i=t.dtick&&n(t._tmin);if(i){var l=X.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,.99*l+.01*t._tmin]}else{var s=o.simpleMap(t.range,t.r2l);a=[s[0],.8*s[0]+.2*s[1]]}if(e.range=o.simpleMap(a,t.l2r),e._isMinor=!0,X.prepTicks(e,r),i){var c=n(t.dtick),u=n(e.dtick),d=c?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);c&&u?ie(d,f)?d===2*E&&f===2*S&&(e.dtick=E):d===2*E&&f===3*S?e.dtick=E:d!==E||(t._input.minor||{}).nticks?oe(d/f,2.5)?e.dtick=d/2:e.dtick=d:e.dtick=S:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":ie(d,f)?d>=12&&2===f&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ie(d,f)||(e.dtick=oe(d/f,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},X.prepTicks=function(e,t){var r=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var a,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(a=e.tickfont?o.bigFont(e.tickfont.size||12):15,i=e._length/a):(a="y"===e._id.charAt(0)?40:80,i=o.constrain(e._length/a,4,9)+1),"radialaxis"===e._name&&(i*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,X.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(n(e.dtick)||"M"!==e.dtick.charAt(0))}var a=r(),i=X.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=L,o&&!a&&e.dticke.range[1],c=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],u=o.simpleMap(e.range,e.r2l,void 0,void 0,t),d=u[1]=(z?0:1);B--){var j=!B;B?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var H=B?e:o.extendFlat({},e,e.minor);if(j?X.prepMinorTicks(H,e,t):X.prepTicks(H,t),"array"!==H.tickmode)if("sync"!==H.tickmode){var q=te(u),Y=q[0],V=q[1],U=n(H.dtick),$="log"===r&&!(U||"L"===H.dtick.charAt(0)),W=X.tickFirst(H,t);if(B){if(e._tmin=W,W=V:K<=V;K=X.tickIncrement(K,Q,d,a)){if(B&&G++,H.rangebreaks&&!d){if(K=h)break}if(y.length>p||K===J)break;J=K;var ee={value:K};B?($&&K!==(0|K)&&(ee.simpleLabel=!0),i>1&&G%i&&(ee.skipLabel=!0),y.push(ee)):(ee.minor=!0,N.push(ee))}}else y=[],m=ce(e);else B?(y=[],m=ue(e,!j)):(N=[],v=ue(e,!j))}var re;if(!N||N.length<2?c=!1:function(e,t){return/%f/.test(t)?e>=P:/%L/.test(t)?e>=I:/%[SX]/.test(t)?e>=D:/%M/.test(t)?e>=O:/%[HI]/.test(t)?e>=L:/%p/.test(t)?e>=C:/%[Aadejuwx]/.test(t)?e>=S:/%[UVW]/.test(t)?e>=E:/%[Bbm]/.test(t)?e>=A:/%[q]/.test(t)?e>=T:!/%[Yy]/.test(t)||e>=b}((N[1].value-N[0].value)*(s?-1:1),e.tickformat)||(c=!1),c){var ne=y.concat(N);l&&y.length&&(ne=ne.slice(1)),(ne=ne.sort(function(e,t){return e.value-t.value}).filter(function(e,t,r){return 0===t||e.value!==r[t-1].value})).map(function(e,t){return void 0!==e.minor||e.skipLabel?null:t}).filter(function(e){return null!==e}).forEach(function(e){c.map(function(t){var r=e+t;r>=0&&r0?(i=n-1,o=n):(i=n,o=n);var l,s=e[i].value,c=e[o].value,u=Math.abs(c-s),d=r||u,f=0;d>=b?f=u>=b&&u<=g?u:x:r===w&&d>=T?f=u>=T&&u<=_?u:w:d>=A?f=u>=A&&u<=k?u:M:r===E&&d>=E?f=E:d>=S?f=S:r===C&&d>=C?f=C:r===L&&d>=L&&(f=L),f>=u&&(f=u,l=!0);var h=a+f;if(t.rangebreaks&&f>0){for(var p=0,m=0;m<84;m++){var v=(m+.5)/84;t.maskBreaks(a*(1-v)+v*h)!==R&&p++}(f*=p/84)||(e[n].drop=!0),l&&u>E&&(f=u)}(f>0||0===n)&&(e[n].periodX=a+f/2)}}(F,e,e._definedDelta),e.rangebreaks){var he="y"===e._id.charAt(0),pe=1;"auto"===e.tickmode&&(pe=e.tickfont?e.tickfont.size:12);var me=NaN;for(re=y.length-1;re>-1;re--)if(y[re].drop)y.splice(re,1);else{y[re].value=qe(y[re].value,e);var ge=e.c2p(y[re].value);(he?me>ge-pe:meh||nh&&(r.periodX=h),n10||"01-01"!==a.slice(5)?e._tickround="d":e._tickround=+t.slice(1)%12==0?"y":"m";else if(t>=S&&i<=10||t>=15*S)e._tickround="d";else if(t>=O&&i<=16||t>=L)e._tickround="M";else if(t>=D&&i<=19||t>=O)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(n(t)||"L"===t.charAt(0)){var l=e.range.map(e.r2d||Number);n(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(l[0]),Math.abs(l[1])),c=Math.floor(Math.log(s)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(Te(e.exponentformat)&&"SI extended"!==e.exponentformat&&!ke(c)||Te(e.exponentformat)&&"SI extended"===e.exponentformat&&!Me(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function be(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}X.autoTicks=function(e,t,r){var a;function i(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=o.dateTick0(e.calendar,0);var l=2*t;if(l>x)t/=x,a=i(10),e.dtick="M"+12*ye(t,a,de);else if(l>M)t/=M,e.dtick="M"+ye(t,1,fe);else if(l>S){if(e.dtick=ye(t,S,e._hasDayOfWeekBreaks?[1,2,7,14]:pe),!r){var s=X.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(s)?e.tick0=o.dateTick0(e.calendar,2):e.tick0=o.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else l>L?e.dtick=ye(t,L,fe):l>O?e.dtick=ye(t,O,he):l>D?e.dtick=ye(t,D,he):(a=i(10),e.dtick=ye(t,a,de))}else if("log"===e.type){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var d=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/d,a=i(10),e.dtick="L"+ye(t,a,de)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):He(e)?(e.tick0=0,a=1,e.dtick=ye(t,a,ve)):(e.tick0=0,a=i(10),e.dtick=ye(t,a,de));if(0===e.dtick&&(e.dtick=1),!n(e.dtick)&&"string"!=typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},X.tickIncrement=function(e,t,a,i){var l=a?-1:1;if(n(t))return o.increment(e,l*t);var s=t.charAt(0),c=l*Number(t.slice(1));if("M"===s)return o.incrementMonth(e,c,i);if("L"===s)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===s){var u="D2"===t?ge:me,d=e+.01*l,f=o.roundUp(o.mod(d,1),u,a);return Math.floor(d)+Math.log(r.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},X.tickFirst=function(e,t){var a=e.r2l||Number,i=o.simpleMap(e.range,a,void 0,void 0,t),l=i[1]=0&&r<=e._length?t:null};if(s&&o.isArrayOrTypedArray(e.ticktext)){var h=o.simpleMap(e.range,e.r2l),p=(Math.abs(h[1]-h[0])-(e._lBreaks||0))/1e4;for(i=0;i ")}else e._prevDateHead=s,c+="
"+s;t.text=c}(e,l,r,c):"log"===u?function(e,t,r,a,i){var l=e.dtick,s=t.x,c=e.tickformat,u="string"==typeof l&&l.charAt(0);if("never"===i&&(i=""),a&&"L"!==u&&(l="L3",u="L"),c||"L"===u)t.text=Ae(Math.pow(10,s),e,i,a);else if(n(l)||"D"===u&&("complete"===e.minorloglabels||o.mod(s+.01,1)<.1)){"complete"===e.minorloglabels&&!(o.mod(s+.01,1)<.1)&&(t.fontSize*=.75);var d=Math.pow(10,s).toExponential(0).split("e"),f=+d[1],h=Math.abs(f),p=e.exponentformat;"power"===p||Te(p)&&"SI extended"!==p&&ke(f)||Te(p)&&"SI extended"===p&&Me(f)?(t.text=d[0],h>0&&(t.text+="x10"),"1x10"===t.text&&(t.text="10"),0!==f&&1!==f&&(t.text+=""+(f>0?"":N)+h+""),t.fontSize*=1.25):("e"===p||"E"===p)&&h>2?t.text=d[0]+p+(f>0?"+":N)+h:(t.text=Ae(Math.pow(10,s),e,"","fakehover"),"D1"===l&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(l);t.text="none"===e.minorloglabels?"":String(Math.round(Math.pow(10,o.mod(s,1)))),t.fontSize*=.75}if("D1"===e.dtick){var m=String(t.text).charAt(0);("0"===m||"1"===m)&&("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,l,0,c,g):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,l):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,l,r):He(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=Ae(t.x,e,a,n);else{var i=t.x/180;if(0===i)t.text="0";else{var l=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(l[1]>=100)t.text=Ae(o.deg2rad(t.x),e,a,n);else{var s=t.x<0;1===l[1]?1===l[0]?t.text="π":t.text=l[0]+"π":t.text=["",l[0],"","⁄","",l[1],"","π"].join(""),s&&(t.text=N+t.text)}}}}(e,l,r,c,g):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=Ae(t.x,e,a,n)}(e,l,0,c,g),a||(e.tickprefix&&!m(e.showtickprefix)&&(l.text=e.tickprefix+l.text),e.ticksuffix&&!m(e.showticksuffix)&&(l.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(l.text)){var v=e.labelalias[l.text];"string"==typeof v&&(l.text=v)}return("boundaries"===e.tickson||e.showdividers)&&(l.xbnd=[f(l.x-.5),f(l.x+e.dtick-.5)]),l},X.hoverLabelText=function(e,t,r){r&&(e=o.extendFlat({},e,{hoverformat:r}));var n=o.isArrayOrTypedArray(t)?t[0]:t,a=o.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==a&&a!==n)return X.hoverLabelText(e,n,r)+" - "+X.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,l=X.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":N+l:l};var _e=["f","p","n","μ","m","","k","M","G","T"],we=["q","r","y","z","a",..._e,"P","E","Z","Y","R","Q"],Te=e=>["SI","SI extended","B"].includes(e);function ke(e){return e>14||e<-15}function Me(e){return e>32||e<-30}function Ae(e,t,r,a){var i=e<0,l=t._tickround,s=r||t.exponentformat||"B",c=t._tickexponent,u=X.getTickFormat(t),d=t.separatethousands;if(a){var f={exponentformat:s,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:n(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};xe(f),l=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,N);var h,p=Math.pow(10,-l)/2;if("none"===s&&(c=0),(e=Math.abs(e))"+h+"":"B"===s&&9===c?e+="B":Te(s)&&(e+="SI extended"===s?we[c/3+10]:_e[c/3+5])),i?N+e:e}function Ee(e,t){if(e){var r=Object.keys(Y).reduce(function(e,r){return-1!==t.indexOf(r)&&Y[r].forEach(function(t){e[t]=1}),e},{});Object.keys(e).forEach(function(t){r[t]||(1===t.length?e[t]=0:delete e[t])})}}function Se(e,t){for(var r=[],n={},a=0;a1&&r=a.min&&e=n(e))}function l(e,t){var r=null===t[0],n=null===t[1],a=i(e,t[0])>=0,o=i(e,t[1])<=0;return(r||a)&&(n||o)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&a.unshift(a.splice(n,1).shift())}});var l={false:{left:0,right:0}};return o.syncOrAsync(a.map(function(t){return function(){if(t){var n=X.getFromId(e,t);r||(r={}),r.axShifts=l,r.overlayingShiftedAx=i;var a=X.drawOne(e,n,r);return n._shiftPusher&&Ue(n,n._fullDepth||0,l,!0),n._r=n.range.slice(),n._rl=o.simpleMap(n._r,n.r2l),a}}}))},X.drawOne=function(e,t,r){var n,l,f,h=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,v=g.charAt(0),y=X.counterLetter(g),x=m._plots[t._mainSubplot],b="above traces"===t.zerolinelayer;if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var _=t.linewidth/2||0;"inside"===t.ticks&&(_+=t.ticklen),Ue(t,_,h,!0),Ue(t,t.shift||0,h,!1)}(!0!==r.skipTitle||void 0===t._shift)&&(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,h));var w=x[v+"axislayer"],T=t._mainLinePosition,k=T+=t._shift,M=t._mainMirrorPosition,A=t._vals=X.calcTicks(t),E=[t.mirror,k,M].join("_");for(n=0;n0?r.bottom-u:0,d))));var f=0,h=0;if(t._shiftPusher&&(f=Math.max(d,r.height>0?"l"===s?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[v]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===s&&(h+=Oe(t))),t._fullDepth=Math.max(f,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===v){if("b"===s?n[s]=t._depth:(n[s]=t._depth=Math.max(r.width>0?u-r.top:0,d),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===s?(t._depth=Math.max(r.height>0?u-r.left:0,d),n[s]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,d),n[s]=t._depth+g,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[y]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==m._dfltTitle[v]&&(n[s]+=Oe(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((o={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(o[c]+=d),!0===t.mirror||"ticks"===t.mirror?o[y]=t._anchorAxis.domain[p[1]]:("all"===t.mirror||"allticks"===t.mirror)&&(o[y]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}fe&&(l=i.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(Ee(n,t.automargin),Ee(o,t.automargin)),a.autoMargin(e,Pe(t),n),a.autoMargin(e,Re(t),o),a.autoMargin(e,Fe(t),l)}),o.syncOrAsync(ue)}}function he(e){var r=g+(e||"tick");return S[r]||(S[r]=function(e,t,r){var n,a,i,o;if(e._selections[t].size())n=1/0,a=-1/0,i=1/0,o=-1/0,e._selections[t].each(function(){var e=Ie(this);if("none"!==e.node().style.display){var t=d.bBox(e.node().parentNode);n=Math.min(n,t.top),a=Math.max(a,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}});else{var l=X.makeLabelFns(e,r);n=a=l.yFn({dx:0,dy:0,fontSize:0}),i=o=l.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:a,left:i,right:o,height:a-n,width:o-i}}(t,r,k)),S[r]}},X.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],a=e.side===n?1:-1,i=[-1,1,a,-a];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(i=i.map(function(e){return-e})),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},X.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},X.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(e){return-1!==t.indexOf(e)},a=n("top"),i=n("left"),o=n("right"),l=n("bottom"),s=n("inside"),c="boundaries"!==r&&(l||i||a||o);if(!c&&!s)return[0,0];var u=e.side,d=c?(e.tickwidth||0)/2:0,f=3,h=e.tickfont?e.tickfont.size:12;return(l||a)&&(d+=h*$,f+=(e.linewidth||0)/2),(i||o)&&(d+=(e.linewidth||0)/2,f+=3),s&&"top"===u&&(f-=h*(1-$)),(i||a)&&(d=-d),("bottom"===u||"right"===u)&&(f=-f),[c?d:0,s?f:0]}(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,a=t[0],i=t[1],o=e.range[0]>e.range[1],s=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside"),c=!s;if(r&&(r*=o?-1:1),n){var u=e.side;n*=s&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===e._id.charAt(0)?function(t){return l(a+e._offset+e.l2p(Ce(t))+r,i+n)}:function(t){return l(i+n,a+e._offset+e.l2p(Ce(t))+r)}},X.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=void 0!==n.len?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+l*r)+"v"+i*r:"M"+(t+l*r)+",0h"+i*r},X.makeLabelFns=function(e,t,r){var a=e.ticklabelposition||"",i=e.tickson||"",l=function(e){return-1!==a.indexOf(e)},s=l("top"),c=l("left"),u=l("right"),d=l("bottom"),f="boundaries"!==i&&(d||c||s||u),h=l("inside"),p="inside"===a&&"inside"===e.ticks||!h&&"outside"===e.ticks&&"boundaries"!==i,m=0,g=0,v=p?e.ticklen:0;if(h?v*=-1:f&&(v=0),p&&(m+=v,r)){var y=o.deg2rad(r);m=v*Math.cos(y)+1,g=v*Math.sin(y)}e.showticklabels&&(p||e.showline)&&(m+=.2*e.tickfont.size);var x,b,_,w,T,k={labelStandoff:m+=(e.linewidth||1)/2*(h?-1:1),labelShift:g},M=0,A=e.side,E=e._id.charAt(0),S=e.tickangle;if("x"===E)w=(T=!h&&"bottom"===A||h&&"top"===A)?1:-1,h&&(w*=-1),x=g*w,b=t+m*w,_=T?1:-.2,90===Math.abs(S)&&(h?_+=U:_=-90===S&&"bottom"===A?$:90===S&&"top"===A?U:.5,M=U/2*(S/90)),k.xFn=function(e){return e.dx+x+M*e.fontSize},k.yFn=function(e){return e.dy+b+e.fontSize*_},k.anchorFn=function(e,t){if(f){if(c)return"end";if(u)return"start"}return n(t)&&0!==t&&180!==t?t*w<0!==h?"end":"start":"middle"},k.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==h?-n:0};else if("y"===E){if(w=(T=!h&&"left"===A||h&&"right"===A)?1:-1,h&&(w*=-1),x=m,b=g*w,_=0,!h&&90===Math.abs(S)&&(_=-90===S&&"left"===A||90===S&&"right"===A?$:.5),h){var C=n(S)?+S:0;if(0!==C){var L=o.deg2rad(C);M=Math.abs(Math.sin(L))*$*w,_=0}}k.xFn=function(e){return e.dx+t-(x+e.fontSize*_)*w+M*e.fontSize},k.yFn=function(e){return e.dy+b+e.fontSize*U},k.anchorFn=function(e,t){return n(t)&&90===Math.abs(t)?"middle":T?"end":"start"},k.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return k},X.drawTicks=function(e,t,n){n=n||{};var a=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?n.vals.filter(function(e){return e.minor&&!e.noTick}):[]).concat(t.ticks?n.vals.filter(function(e){return!e.minor&&!e.noTick}):[]),o=n.layer.selectAll("path."+a).data(i,Le);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==n.crisp).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(r){return d.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",n.path).style("display",null),Ve(t,[H]),o.attr("transform",n.transFn)},X.drawGrid=function(e,t,n){if(n=n||{},"sync"!==t.tickmode){var a=t._id+"grid",i=t.minor&&t.minor.showgrid,o=i?n.vals.filter(function(e){return e.minor}):[],l=t.showgrid?n.vals.filter(function(e){return!e.minor}):[],s=n.counterAxis;if(s&&X.shouldShowZeroLine(e,t,s))for(var c="array"===t.tickmode,f=0;f=0;v--){var y=v?m:g;if(y){var x=y.selectAll("path."+a).data(v?l:o,Le);x.exit().remove(),x.enter().append("path").classed(a,1).classed("crisp",!1!==n.crisp),x.attr("transform",n.transFn).attr("d",n.path).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(e){return d.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(e){return(e.minor?p:t._gw)+"px"}).style("display",null),"function"==typeof n.path&&x.attr("d",n.path)}}Ve(t,[B,j])}},X.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=X.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each(function(){r.layer.selectAll("path").sort(function(e,t){return K(e.id,t.id)})}),i.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Ve(t,[z])},X.drawLabels=function(e,t,a){a=a||{};var i=e._fullLayout,c=t._id,u="above traces"===t.zerolinelayer,f=a.cls||c+"tick",h=a.vals.filter(function(e){return e.text}),p=a.labelFns,m=a.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[f],v=a.layer.selectAll("g."+f).data(t.showticklabels?h:[],Le),y=[];function x(e,i){e.each(function(e){var o=r.select(this),c=o.select(".text-math-group"),u=p.anchorFn(e,i),f=a.transFn.call(o.node(),e)+(n(i)&&0!=+i?" rotate("+i+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),h=s.lineCount(o),m=W*e.fontSize,g=p.heightFn(e,n(i)?+i:0,(h-1)*m);if(g&&(f+=l(0,g)),c.empty()){var v=o.select("text");v.attr({transform:f,"text-anchor":u}),v.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=d.bBox(c.node()).width*{end:-.5,start:.5}[u];c.attr("transform",f+l(y,0))}})}v.enter().append("g").classed(f,1).append("text").attr("text-anchor","middle").each(function(t){var n=r.select(this),a=e._promises.length;n.call(s.positionText,p.xFn(t),p.yFn(t)).call(d.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(s.convertToTspans,e),e._promises[a]?y.push(e._promises.pop().then(function(){x(n,m)})):x(n,m)}),Ve(t,[q]),v.exit().remove(),a.repositionOnUpdate&&v.each(function(e){r.select(this).select("text").call(s.positionText,p.xFn(e),p.yFn(e))}),t._adjustTickLabelsOverflow=function(){var n=t.ticklabeloverflow;if(n&&"allow"!==n){var a=-1!==n.indexOf("hide"),l="x"===t._id.charAt(0),s=0,c=l?e._fullLayout.width:e._fullLayout.height;if(-1!==n.indexOf("domain")){var u=o.simpleMap(t.range,t.r2l);s=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var f=Math.min(s,c),h=Math.max(s,c),p=t.side,m=1/0,g=-1/0;for(var y in v.each(function(e){var n=r.select(this);if(n.select(".text-math-group").empty()){var i=d.bBox(n.node()),o=0;l?(i.right>h||i.lefth||i.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+n._id]?s.style("display","none"):"tick"===e.K&&!a&&"none"!==s.node().style.display&&s.style("display",null)})})})})},x(v,g+1?g:m);var b=null;t._selections&&(t._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];t.automargin&&i._redrawFromAutoMarginCount&&90===g?(b=g,_.push(function(){x(v,g)})):_.push(function(){if(x(v,m),h.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=t.autotickangles[0];var e,r=0,n=[],i=1;v.each(function(e){r=Math.max(r,e.fontSize);var a=t.l2p(e.x),o=Ie(this),l=d.bBox(o.node());i=Math.max(i,s.lineCount(o)),n.push({top:0,bottom:10,height:10,left:a-l.width/2,right:a+l.width/2+2,width:l.width+2})});var l=("boundaries"===t.tickson||t.showdividers)&&!a.secondary,c=h.length,u=Math.abs((h[c-1].x-h[0].x)*t._m)/(c-1),f=l?u/2:u,p=l?t.ticklen:1.25*r*i,g=f/Math.sqrt(Math.pow(f,2)+Math.pow(p,2)),y=t.autotickangles.map(function(e){return e*Math.PI/180}),_=y.find(function(e){return Math.abs(Math.cos(e))<=g});void 0===_&&(_=y.reduce(function(e,t){return Math.abs(Math.cos(e))R*N&&(D=N,C[S]=L[S]=I[S])}var F=Math.abs(D-O);F-M>0?M*=1+M/(F-=M):M=0,"y"!==t._id.charAt(0)&&(M=-M),C[E]=T.p2r(T.r2p(L[E])+A*M),"min"===T.autorange||"max reversed"===T.autorange?(C[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):("max"===T.autorange||"min reversed"===T.autorange)&&(C[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[T._name+".range"]=C}var Y=o.syncOrAsync(_);return Y&&Y.then&&e._promises.push(Y),Y},X.getPxPosition=function(e,t){var r,n=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===a?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===a&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===i||"left"===i?r._offset:"bottom"===i||"right"===i?r._offset+r._length:void 0},X.shouldShowZeroLine=function(e,t,r){var n=o.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===R)&&(De(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(a){var i=e._fullLayout,o=t._id.charAt(0),l=X.counterLetter(t._id),s=t._offset+(Math.abs(n[0])1)for(n=1;n{t.exports=function(e,t,r){var n,a;if(r){var i="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[i?1:0],a=r[i?0:1]}var o=e("autorangeoptions.minallowed",null===a?n:void 0),l=e("autorangeoptions.maxallowed",null===n?a:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===l&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}}),Kt=c((e,t)=>{var r=Jt();t.exports=function(e,t,n,a){var i=t._template||{},o=t.type||i.type||"-";n("minallowed"),n("maxallowed");var l,s=n("range");s||!a.noInsiderange&&"log"!==o&&((l=n("insiderange"))&&(null===l[0]||null===l[1])&&(t.insiderange=!1,l=void 0),l&&(s=n("range",l)));var c,u=t.getAutorangeDflt(s,a),d=n("autorange",u);s&&(null===s[0]&&null===s[1]||(null===s[0]||null===s[1])&&("reversed"===d||!0===d)||null!==s[0]&&("min"===d||"max reversed"===d)||null!==s[1]&&("max"===d||"min reversed"===d))&&(s=void 0,delete t.range,t.autorange=!0,c=!0),c||(d=n("autorange",u=t.getAutorangeDflt(s,a))),d&&(r(n,d,s),("linear"===o||"-"===o)&&n("rangemode")),t.cleanRange()}}),Qt=c((e,t)=>{var r={left:0,top:0};t.exports=function(e,t,n){t=t||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var a=e.clientX||0,i=e.clientY||0,o=function(e){return e===window||e===document||e===document.body?r:e.getBoundingClientRect()}(t);return n[0]=a-o.left,n[1]=i-o.top,n}}),er=c((e,t)=>{var r=rt();t.exports=r&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()}),tr=c((e,t)=>{t.exports=function(e,t,r,n,a){var i=(e-r)/(n-r),o=i+t/(n-r),l=(i+o)/2;return"left"===a||"bottom"===a?i:"center"===a||"middle"===a?l:"right"===a||"top"===a?o:i<2/3-l?i:o>4/3-l?o:l}}),rr=c((e,t)=>{var r=et(),n=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,a,i){return e="left"===a?0:"center"===a?1:"right"===a?2:r.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:r.constrain(Math.floor(3*t),0,2),n[t][e]}}),nr=c((e,t)=>{var r=it(),n=Ve(),a=Te().getGraphDiv,i=O(),o=t.exports={};o.wrapped=function(e,t,r){(e=a(e))._fullLayout&&n.clear(e._fullLayout._uid+i.HOVERID),o.raw(e,t,r)},o.raw=function(e,t){var n=e._fullLayout,a=e._hoverdata;t||(t={}),(!t.target||e._dragged||!1!==r.triggerHandler(e,"plotly_beforehover",t))&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}}),ar=c((e,t)=>{var r=Qt(),n=nt(),a=er(),i=et().removeElement,o=ut(),l=t.exports={};l.align=tr(),l.getCursor=rr();var s=nr();function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function u(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=s.wrapped,l.unhoverRaw=s.raw,l.init=function(e){var t,r,s,d,f,h,p,m,g=e.gd,v=1,y=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)y&&(v=Math.max(v-1,1)),g._dragged?e.doneFn&&e.doneFn():(h.target===p?r=h:(r={target:p,srcElement:p,toElement:p},Object.keys(h).concat(Object.keys(h.__proto__)).forEach(e=>{var t=h[e];!r[e]&&"function"!=typeof t&&(r[e]=t)})),e.clickFn&&e.clickFn(v,r),m||p.dispatchEvent(new MouseEvent("click",t))),g._dragging=!1,g._dragged=!1):g._dragged=!1}},l.coverSlip=c}),ir=c((e,t)=>{t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach(function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)}),t&&e.classed("cursor-"+t,!0)}}),or=c((e,t)=>{var r=ir(),n="data-savedcursor";t.exports=function(e,t){var a=e.attr(n);if(t){if(!a){for(var i=(e.attr("class")||"").split(" "),o=0;o{var r=L(),n=R();t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:r({editType:"legend"}),grouptitlefont:r({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:r({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}),sr=c(e=>{e.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},e.isVertical=function(e){return"h"!==e.orientation},e.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")},e.getId=function(e){return e._id||"legend"}}),cr=c((e,t)=>{var r=Ne(),n=et(),a=ct(),i=P(),o=lr(),l=Ie(),s=sr();function c(e,t,c,u,d){var f=t[e]||{},h=a.newContainer(c,e);function p(e,t){return n.coerce(f,h,o,e,t)}var m=n.coerceFont(p,"font",c.font);if(p("bgcolor",c.paper_bgcolor),p("bordercolor"),p("visible")){var g,v=function(e,t){var r=g._input,a=g;return n.coerce(r,a,i,e,t)},y=c.font||{},x=n.coerceFont(p,"grouptitlefont",y,{overrideDflt:{size:Math.round(1.1*y.size)}}),b=0,_=!1,w="normal",T=(c.shapes||[]).filter(function(e){return e.showlegend});u.filter(R).forEach(function(t){t.visible&&b++;for(var r=0;rt.legend.length)for(var n=t.legend.length;n("legend"===e?1:0));if(!1===E&&(c[e]=void 0),(!1!==E||f.uirevision)&&(p("uirevision",c.uirevision),!1!==E)){p("borderwidth");var S,C,L,O="h"===p("orientation"),D="paper"===p("yref"),I="paper"===p("xref"),P="left";if(O?(S=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?D?(C=1.1,L="bottom"):(C=1,L="top"):D?(C=-.1,L="top"):(C=0,L="bottom")):(C=1,L="auto",I?S=1.02:(S=1,P="right")),n.coerce(f,h,{x:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:S}},"x"),n.coerce(f,h,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:C}},"y"),p("traceorder",w),s.isGrouped(c[e])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",P),p("yanchor",L),p("maxheight"),p("valign"),n.noneOrAll(f,h,["x","y"]),p("title.text")){p("title.side",O?"left":"top");var N=n.extendFlat({},m,{size:n.bigFont(m.size)});n.coerceFont(p,"title.font",N);let e=d>1;p("titleclick",!!e&&"toggle"),p("titledoubleclick",!!e&&"toggleothers")}}}function R(e){return r.traceIs(e,"pie-like")&&null!=e._length&&(Array.isArray(e.legend)||Array.isArray(e.showlegend))}}t.exports=function(e,t,r){var a,i=r.slice(),o=t.shapes;if(o)for(a=0;a{var t=Ne(),r=et(),n=r.pushUnique,a=sr(),i=!0;e.handleItemClick=function(e,a,o,l){var s=a._fullLayout;if(!a._dragged&&!a._editing){var c=e.data()[0][0];if(!c.groupTitle||!c.noClick){var u=o.groupclick;"toggle"===l&&"toggleothers"===o.itemdoubleclick&&i&&a.data&&a._context.showTips&&(r.notifier(r._(a,"Double-click on legend to isolate one trace"),"long"),i=!1);var d="togglegroup"===u,f=s.hiddenlabels?s.hiddenlabels.slice():[],h=a._fullData,p=(s.shapes||[]).filter(function(e){return e.showlegend}),m=h.concat(p),g=c.trace;g._isShape&&(g=g._fullInput);var v,y,x,b,_,w=g.legendgroup,T={},k=[],M=[],A=[],E=(s.shapes||[]).map(function(e){return e._input}),S=!1,C=g.legend,L=g._fullInput;if(L&&L._isShape||!t.traceIs(g,"pie-like")){var O,D=w&&w.length,I=[];if(D)for(v=0;v{t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}),fr=c((e,t)=>{var r=Ne(),n=sr();t.exports=function(e,t,a){var i,o,l=t._inHover,s=n.isGrouped(t),c=n.isReversed(t),u={},d=[],f=!1,h={},p=0,m=0;function g(e,r,i){if(!1!==t.visible&&(!a||e===t._id))if(""!==r&&n.isGrouped(t))-1===d.indexOf(r)?(d.push(r),f=!0,u[r]=[i]):u[r].push(i);else{var o="~~i"+p;d.push(o),u[o]=[i],p++}}for(i=0;iC&&(S=C)}A[i][0]._groupMinRank=S,A[i][0]._preGroupSort=i}var L=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(A.forEach(function(e,t){e[0]._preGroupSort=t}),A.sort(function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort}),i=0;i{var t=et();function r(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}e.formatPiePercent=function(e,n){var a=r((100*e).toPrecision(3));return t.numSeparate(a,n)+"%"},e.formatPieValue=function(e,n){var a=r(e.toPrecision(10));return t.numSeparate(a,n)},e.getFirstFilled=function(e,r){if(t.isArrayOrTypedArray(e))for(var n=0;n{var r=Ut(),n=F();t.exports=function(e,t,a,i){var o=a.marker.pattern;o&&o.shape?r.pointStyle(e,a,i,t):n.fill(e,t.color)}}),mr=c((e,t)=>{var r=F(),n=hr().castOption,a=pr();t.exports=function(e,t,i,o){var l=i.marker.line,s=n(l.color,t.pts)||r.defaultLine,c=n(l.width,t.pts)||0;e.call(a,t,i,o).style("stroke-width",c).call(r.stroke,s)}}),gr=c((e,t)=>{var r=f(),n=Ne(),a=et(),i=a.strTranslate,o=Ut(),l=F(),s=bt().extractOpts,c=jt(),u=mr(),d=hr().castOption,h=dr();function p(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function m(e){var t=e[0].trace,r=t.contours,n=c.hasLines(t),a=c.hasMarkers(t),i=t.visible&&t.fill&&"none"!==t.fill,o=!1,l=!1;if(r){var s=r.coloring;"lines"===s?o=!0:n="none"===s||"heatmap"===s||r.showlines,"constraint"===r.type?i="="!==r._operation:("fill"===s||"heatmap"===s)&&(l=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:n||o,anyFill:i||l}}function g(e,t,r){return e&&a.isArrayOrTypedArray(e)?t:e>r?r:e}t.exports=function(e,t,f){var v=t._fullLayout;f||(f=v.legend);var y="constant"===f.itemsizing,x=f.itemwidth,b=(x+2*h.itemGap)/2,_=i(b,0),w=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return y?n:Math.min(a,r)};function T(e,a,i){var c=e[0].trace,u=c.marker||{},d=u.line||{},h=u.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=i?c.visible&&c.type===i:n.traceIs(c,"bar"),m=r.select(a).select("g.legendpoints").selectAll("path.legend"+i).data(p?[e]:[]);m.enter().append("path").classed("legend"+i,!0).attr("d",h).attr("transform",_),m.exit().remove(),m.each(function(e){var n=r.select(this),a=e[0],i=w(a.mlw,u.line,5,2);n.style("stroke-width",i+"px");var h=a.mcc;if(!f._inHover&&"mc"in a){var p=s(u),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),h=o.tryColorscale(u,"")(m)}var v=h||a.mc||u.color,y=u.pattern,x=o.getPatternAttr,b=y&&(x(y.shape,0,"")||x(y.path,0,""));if(b){var _=x(y.bgcolor,0,null),T=x(y.fgcolor,0,null),k=y.fgopacity,M=g(y.size,8,10),A=g(y.solidity,.5,1),E="legend-"+c.uid;n.call(o.pattern,"legend",t,E,b,M,A,h,y.fillmode,_,T,k)}else n.call(l.fill,v);i&&l.stroke(n,a.mlc||d.color)})}function k(e,i,o){var l=e[0],s=l.trace,c=o?s.visible&&s.type===o:n.traceIs(s,o),f=r.select(i).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(f.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),f.exit().remove(),f.size()){var h=s.marker||{},p=w(d(h.line.width,l.pts),h.line,5,2),m="pieLike",g=a.minExtend(s,{marker:{line:{width:p}}},m),v=a.minExtend(l,{trace:g},m);u(f,v,g,t)}}e.each(function(e){var t=r.select(this),n=a.ensureSingle(t,"g","layers");n.style("opacity",e[0].trace.opacity);var o=f.indentation,l=f.valign,s=e[0].lineHeight,c=e[0].height;if("middle"===l&&0===o||!s||!c)n.attr("transform",null);else{var u={top:1,bottom:-1}[l]*(.5*(s-c+3))||0,d=f.indentation;n.attr("transform",i(d,u))}n.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),n.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=n.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)}).each(function(e){var n,i=e[0].trace,c=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":c=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymapbox":case"densitymap":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":c=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],n=!1;break;case"streamtube":c=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],n=!1;break;case"surface":c=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],n=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each(function(e,c){var u,d=r.select(this),f=s(i),h=f.colorscale,m=f.reversescale;if(h){if(!n){var g=h.length;u=0===c?h[m?g-1:0][1]:1===c?h[m?0:g-1][1]:h[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[c]||v[0]:v}d.attr("d",e[0]),u?d.call(l.fill,u):d.call(function(e){if(e.size()){var r="legendfill-"+i.uid;o.gradient(e,t,r,p(m,"radial"===n),h,"fill")}})})}).each(function(e){var t=e[0].trace,n="waterfall"===t.type;if(e[0]._distinct&&n){var a=e[0].trace[e[0].dir].marker;return e[0].mc=a.color,e[0].mlw=a.line.width,e[0].mlc=a.line.color,T(e,this,"waterfall")}var i=[];t.visible&&n&&(i=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(i);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each(function(e){var n=r.select(this),a=t[e[0]].marker,i=w(void 0,a.line,5,2);n.attr("d",e[1]).style("stroke-width",i+"px").call(l.fill,a.color),i&&n.call(l.stroke,a.line.color)})}).each(function(e){T(e,this,"funnel")}).each(function(e){T(e,this)}).each(function(e){var i=e[0].trace,s=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(i.visible&&n.traceIs(i,"box-violin")?[e]:[]);s.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),s.exit().remove(),s.each(function(){var e=r.select(this);if("all"!==i.boxpoints&&"all"!==i.points||0!==l.opacity(i.fillcolor)||0!==l.opacity((i.line||{}).color)){var n=w(void 0,i.line,5,2);e.style("stroke-width",n+"px").call(l.fill,i.fillcolor),n&&l.stroke(e,i.line.color)}else{var c=a.minExtend(i,{marker:{size:y?12:a.constrain(i.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});s.call(o.pointStyle,c,t)}})}).each(function(e){k(e,this,"funnelarea")}).each(function(e){k(e,this,"pie")}).each(function(e){var n,i,l=m(e),u=l.showFill,d=l.showLine,f=l.showGradientLine,h=l.showGradientFill,g=l.anyFill,v=l.anyLine,y=e[0],b=y.trace,_=s(b),T=_.colorscale,k=_.reversescale,M=c.hasMarkers(b)||!g?"M5,0":v?"M5,-2":"M5,-3",A=r.select(this),E=A.select(".legendfill").selectAll("path").data(u||h?[e]:[]);if(E.enter().append("path").classed("js-fill",!0),E.exit().remove(),E.attr("d",M+"h"+x+"v6h-"+x+"z").call(function(e){if(e.size())if(u)o.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;o.gradient(e,t,r,p(k),T,"fill")}}),d||f){var S=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:S}}),n=[a.minExtend(y,{trace:i})]}var C=A.select(".legendlines").selectAll("path").data(d||f?[n]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",M+(f?"l"+x+",0.0001":"h"+x)).call(d?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;o.lineGroupStyle(e),o.gradient(e,t,r,p(k),T,"stroke")}})}).each(function(e){var n,i,l=m(e),s=l.anyFill,u=l.anyLine,d=l.showLine,f=l.showMarker,h=e[0],p=h.trace,g=!f&&!u&&!s&&c.hasText(p);function v(e,t,r,n){var i=a.nestedProperty(p,e).get(),o=a.isArrayOrTypedArray(i)&&t?t(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(f||g||d){var b={},w={};if(f){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",a.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",a.mean,[0,5],2),b.mld=p._isShape?"solid":v("marker.line.dash",x),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=v("marker.size",a.mean,[2,16],12);b.ms=T,w.marker.size=T}d&&(w.line={width:v("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x),b.tw=v("textfont.weight",x),b.ty=v("textfont.style",x),b.tv=v("textfont.variant",x),b.tC=v("textfont.textcase",x),b.tE=v("textfont.lineposition",x),b.tS=v("textfont.shadow",x)),n=[a.minExtend(h,b)],(i=a.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var k=r.select(this).select("g.legendpoints"),M=k.selectAll("path.scatterpts").data(f?n:[]);M.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),M.exit().remove(),M.call(o.pointStyle,i,t),f&&(n[0].mrc=3);var A=k.selectAll("g.pointtext").data(g?n:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),A.exit().remove(),A.selectAll("text").call(o.textPointStyle,i,t)}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",_).style("stroke-miterlimit",1),n.exit().remove(),n.each(function(e,n){var a=r.select(this),i=t[n?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(l.fill,i.fillcolor),o&&l.stroke(a,i.line.color)})}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",_).style("stroke-miterlimit",1),n.exit().remove(),n.each(function(e,n){var a=r.select(this),i=t[n?"increasing":"decreasing"],s=w(void 0,i.line,5,2);a.style("fill","none").call(o.dashLine,i.line.dash,s),s&&l.stroke(a,i.line.color)})})}}),vr=c((e,t)=>{var r=f(),n=et(),a=gt(),i=Ne(),o=it(),l=ar(),s=Ut(),c=F(),u=xt(),d=ur().handleItemClick,h=ur().handleTitleClick,p=dr(),m=yt(),g=m.LINE_SPACING,v=m.FROM_TL,y=m.FROM_BR,x=fr(),b=gr(),_=sr(),w=/^legend[0-9]*$/;function T(e,t){var d,f,m=t||{},w=e._fullLayout,T=_.getId(m),E=m._inHover;if(E?(f=m.layer,d="hover"):(f=w._infolayer,d=T),f){var D;if(d+=w._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),E){if(!m.entries)return;D=x(m.entries,m)}else{for(var I=(e.calcdata||[]).slice(),P=w.shapes,N=0;N1)}var z=w.hiddenlabels||[];if(!(E||w.showlegend&&D.length))return f.selectAll("."+T).remove(),w._topdefs.select("#"+d).remove(),a.autoMargin(e,T);var B=n.ensureSingle(f,"g",T,function(e){E||e.attr("pointer-events","all")}),j=n.ensureSingleById(w._topdefs,"clipPath",d,function(e){e.append("rect")}),H=n.ensureSingle(B,"rect","bg",function(e){e.attr("shape-rendering","crispEdges")});H.call(c.stroke,m.bordercolor).call(c.fill,m.bgcolor).style("stroke-width",m.borderwidth+"px");var q,Y=n.ensureSingle(B,"g","scrollbox"),V=m.title;m._titleWidth=0,m._titleHeight=0,V.text?((q=n.ensureSingle(Y,"text",T+"titletext")).attr("text-anchor","start").call(s.font,V.font).text(V.text),C(q,Y,e,m,1),!E&&(m.titleclick||m.titledoubleclick)&&function(e,t,a,l){if(t._fullData.some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(l):t===l)&&i.traceIs(e,"pie-like")}))return;let s=t._context.doubleClickDelay;var u,d=1;let f=n.ensureSingle(e,"rect",l+"titletoggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(f.on("mousedown",function(){(u=(new Date).getTime())-t._legendMouseDownTimes&&(d=Math.max(d-1,1));let e={event:r.event,legendId:l,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(1===d&&a.titleclick){if(!1===o.triggerHandler(t,"plotly_legendtitleclick",e))return;a._titleClickTimeout=setTimeout(function(){t._fullLayout&&h(t,a,a.titleclick)},s)}else 2===d&&(a._titleClickTimeout&&clearTimeout(a._titleClickTimeout),t._legendMouseDownTime=0,!1!==o.triggerHandler(t,"plotly_legendtitledoubleclick",e)&&a.titledoubleclick&&h(t,a,a.titledoubleclick))}))}(Y,e,m,T)):(Y.selectAll("."+T+"titletext").remove(),Y.selectAll("."+T+"titletoggle").remove());var U=n.ensureSingle(B,"rect","scrollbar",function(e){e.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)}),$=Y.selectAll("g.groups").data(D);$.enter().append("g").attr("class","groups"),$.exit().remove();var W=$.selectAll("g.traces").data(n.identity);W.enter().append("g").attr("class","traces"),W.exit().remove(),W.style("opacity",function(t){let r=t[0],n=r.trace;if(r.groupTitle){let t=n.legendgroup,r=(w.shapes||[]).filter(function(e){return e.showlegend});return e._fullData.concat(r).some(function(e){return e.legendgroup===t&&(e.legend||"legend")===T&&!0===e.visible})?1:.5}return i.traceIs(n,"pie-like")?-1!==z.indexOf(t[0].label)?.5:1:"legendonly"===n.visible?.5:1}).each(function(){r.select(this).call(A,e,m)}).call(b,e,m).each(function(t){E||t[0].groupTitle&&"toggleitem"===m.groupclick||r.select(this).call(S,e,T)}),n.syncOrAsync([a.previousPromises,function(){return function(e,t,n,a,i){var o=e._fullLayout,l=_.getId(a);a||(a=o[l]);var c=o._size,d=_.isVertical(a),f=_.isGrouped(a),h="fraction"===a.entrywidthmode,m=a.borderwidth,v=2*m,y=p.itemGap,x=a.indentation+a.itemwidth+2*y,b=2*(m+y),w=O(a),T=a.y<0||0===a.y&&"top"===w,M=a.y>1||1===a.y&&"bottom"===w,A=a.tracegroupgap,E={};let{orientation:S,yref:C}=a,{maxheight:D}=a,I=T||M||"v"!==S||"paper"!==C;D||(D=I?.5:1);let P=I?o.height:c.h;a._maxHeight=Math.max(D>1?D:D*P,30);var N=0;a._width=0,a._height=0;var R=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(a);if(d)n.each(function(e){var t=e[0].height;s.setTranslate(this,m+R[0],m+R[1]+a._height+t/2+y),a._height+=t,a._width=Math.max(a._width,e[0].width)}),N=x+a._width,a._width+=y+x+v,a._height+=b,f&&(t.each(function(e,t){s.setTranslate(this,0,t*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var F=L(a),z=a.x<0||0===a.x&&"right"===F,B=a.x>1||1===a.x&&"left"===F,j=M||T,H=o.width/2;a._maxWidth=Math.max(z?j&&"left"===F?c.l+c.w:H:B?j&&"right"===F?c.r+c.w:H:c.w,2*x);var q=0,Y=0;n.each(function(e){var t=k(e,a,x);q=Math.max(q,t),Y+=t}),N=null;var V=0;if(f){var U=0,$=0,W=0;t.each(function(){var e=0,t=0;r.select(this).selectAll("g.traces").each(function(r){var n=k(r,a,x),i=r[0].height;s.setTranslate(this,R[0],R[1]+m+y+i/2+t),t+=i,e=Math.max(e,n),E[r[0].trace.legendgroup]=e});var n=e+y;$>0&&n+m+$>a._maxWidth?(V=Math.max(V,$),$=0,W+=U+A,U=t):U=Math.max(U,t),s.setTranslate(this,$,W),$+=n}),a._width=Math.max(V,$)+m,a._height=W+U+b}else{var G=n.size(),X=Y+v+(G-1)*y=a._maxWidth&&(V=Math.max(V,Q),J=0,K+=Z,a._height+=Z,Z=0),s.setTranslate(this,R[0]+m+J,R[1]+m+K+t/2+y),Q=J+r+y,J+=n,Z=Math.max(Z,t)}),X?(a._width=J+v,a._height=Z+b):(a._width=Math.max(V,Q)+v,a._height+=Z+b)}}a._width=Math.ceil(Math.max(a._width+R[0],a._titleWidth+2*(m+p.titlePad))),a._height=Math.ceil(Math.max(a._height+R[1],a._titleHeight+2*(m+p.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var ee=e._context.edits,te=ee.legendText||ee.legendPosition;n.each(function(e){var t=r.select(this).select("."+l+"toggle"),n=e[0].height,i=e[0].trace.legendgroup,o=k(e,a,x);f&&""!==i&&(o=E[i]);var c=te?x:N||o;!d&&!h&&(c+=y/2),s.setRect(t,0,-n/2,c,n)});var re=i.select("."+l+"titletext");re.node()&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*g,a=0,i=e.node(),o=s.bBox(i).width;"top center"===t.title.side?a=.5*(t._width-2*r-2*p.titlePad-o):"top right"===t.title.side&&(a=t._width-2*r-2*p.titlePad-o),u.positionText(e,r+p.titlePad+a,r+n)}}(re,a,m);var ne=i.select("."+l+"titletoggle");if(ne.size()&&re.node()){var ae=re.attr("x")||0,ie=p.titlePad;s.setRect(ne,ae-ie,m,a._titleWidth+2*ie,a._titleHeight+2*ie)}}(e,$,W,m,Y)},function(){var t,o,c,u,h=w._size,g=m.borderwidth,x="paper"===m.xref,b="paper"===m.yref;if(V.text){let t=(w.shapes||[]).filter(function(e){return e.showlegend}),r=e._fullData.concat(t).some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(T):t===T)&&!0===e.visible});q.style("opacity",r?1:.5)}if(!E){var _,k;_=x?h.l+h.w*m.x-v[L(m)]*m._width:w.width*m.x-v[L(m)]*m._width,k=b?h.t+h.h*(1-m.y)-v[O(m)]*m._effHeight:w.height*(1-m.y)-v[O(m)]*m._effHeight;var A=function(e,t,r,n){var i=e._fullLayout,o=i[t],l=L(o),s=O(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var d=o.y<.5?"b":"t",f=o.x<.5?"l":"r",h={r:i.width-r,l:r+o._width,b:i.height-n,t:n+o._effHeight};if(c&&u)return a.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*v[l],r:o._width*y[l],b:o._effHeight*y[s],t:o._effHeight*v[s]});c?e._fullLayout._reservedMargin[t][d]=h[d]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][d]=h[d]}(e,T,_,k);if(A)return;if(w.margin.autoexpand){var S=_,C=k;_=x?n.constrain(_,0,w.width-m._width):S,k=b?n.constrain(k,0,w.height-m._effHeight):C,_!==S&&n.log("Constrain "+T+".x to make legend fit inside graph"),k!==C&&n.log("Constrain "+T+".y to make legend fit inside graph")}s.setTranslate(B,_,k)}if(U.on(".drag",null),B.on("wheel",null),E||m._height<=m._maxHeight||e._context.staticPlot){var D=m._effHeight;E&&(D=m._height),H.attr({width:m._width-g,height:D-g,x:g/2,y:g/2}),s.setTranslate(Y,0,0),j.select("rect").attr({width:m._width-2*g,height:D-2*g,x:g,y:g}),s.setClipUrl(Y,d,e),s.setRect(U,0,0,0,0),delete m._scrollY}else{var I=Math.max(p.scrollBarMinHeight,m._effHeight*m._effHeight/m._height),P=m._effHeight-I-2*p.scrollBarMargin,N=m._height-m._effHeight,R=P/N,F=Math.min(m._scrollY||0,N);H.attr({width:m._width-2*g+p.scrollBarWidth+p.scrollBarMargin,height:m._effHeight-g,x:g/2,y:g/2}),j.select("rect").attr({width:m._width-2*g+p.scrollBarWidth+p.scrollBarMargin,height:m._effHeight-2*g,x:g,y:g+F}),s.setClipUrl(Y,d,e),Z(F,I,R),B.on("wheel",function(){Z(F=n.constrain(m._scrollY+r.event.deltaY/N*P,0,N),I,R),0!==F&&F!==N&&r.event.preventDefault()});var z,$,W,G=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;z="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,W=F}).on("drag",function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||($="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,F=function(e,t,r){var a=(r-t)/R+e;return n.constrain(a,0,N)}(W,z,$),Z(F,I,R))});U.call(G);var X=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(z=e.changedTouches[0].clientY,W=F)}).on("drag",function(){var e=r.event.sourceEvent;"touchmove"===e.type&&($=e.changedTouches[0].clientY,F=function(e,t,r){var a=(t-r)/R+e;return n.constrain(a,0,N)}(W,z,$),Z(F,I,R))});Y.call(X)}function Z(t,r,n){m._scrollY=e._fullLayout[T]._scrollY=t,s.setTranslate(Y,0,-t),s.setRect(U,m._width,p.scrollBarMargin+t*n,p.scrollBarWidth,r),j.select("rect").attr("y",g+t)}e._context.edits.legendPosition&&(B.classed("cursor-move",!0),l.init({element:B.node(),gd:e,prepFn:function(e){if(e.target!==U.node()){var t=s.getTranslate(B);c=t.x,u=t.y}},moveFn:function(e,r){if(void 0!==c&&void 0!==u){var n=c+e,a=u+r;s.setTranslate(B,n,a),t=l.align(n,m._width,h.l,h.l+h.w,m.xanchor),o=l.align(a+m._height,-m._height,h.t+h.h,h.t,m.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==o){var r={};r[T+".x"]=t,r[T+".y"]=o,i.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=f.selectAll("g.traces").filter(function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom});n.size()>0&&M(e,m,n,t,r)}}))}],e)}}function k(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===i?t._maxWidth*o:r+(o||a)}function M(e,t,r,n,a){var l=e._fullLayout,s=r.data()[0][0].trace,c=t.itemclick,u=t.itemdoubleclick,f={event:a,node:r.node(),curveNumber:s.index,expandedIndex:s.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:l};s._group&&(f.group=s._group),i.traceIs(s,"pie-like")&&(f.label=r.datum()[0].label);var h=o.triggerHandler(e,"plotly_legendclick",f);if(1===n){if(!1===h)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&c&&d(r,e,t,c)},e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==o.triggerHandler(e,"plotly_legenddoubleclick",f)&&!1!==h&&u&&d(r,e,t,u))}function A(e,t,r){var a,o,l=_.getId(r),c=e.data()[0][0],d=c.trace,f=i.traceIs(d,"pie-like"),h=!r._inHover&&t._context.edits.legendText&&!f,m=r._maxNameLength;c.groupTitle?(a=c.groupTitle.text,o=c.groupTitle.font):(o=r.font,r.entries?a=c.text:(a=f?c.label:d.name,d._meta&&(a=n.templateString(a,d._meta))));var g=n.ensureSingle(e,"text",l+"text");g.attr("text-anchor","start").call(s.font,o).text(h?E(a,m):a);var v=r.indentation+r.itemwidth+2*p.itemGap;u.positionText(g,v,0),h?g.call(u.makeEditable,{gd:t,text:a}).call(C,e,t,r).on("edit",function(n){this.text(E(n,m)).call(C,e,t,r);var a=c.trace._fullInput||{},o={};return o.name=n,a._isShape?i.call("_guiRelayout",t,"shapes["+d.index+"].name",o.name):i.call("_guiRestyle",t,o,d.index)}):C(g,e,t,r)}function E(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function S(e,t,a){var i,o=t._context.doubleClickDelay,l=1,s=n.ensureSingle(e,"rect",a+"toggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(s.on("mousedown",function(){(i=(new Date).getTime())-t._legendMouseDownTimeo&&(l=Math.max(l-1,1)),M(t,n,e,l,r.event)}}))}function C(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),u.convertToTspans(e,r,function(){!function(e,t,r,n){var a=e.data()[0][0],i=a&&a.trace.showlegend;if(Array.isArray(i)&&(i=!1!==i[a.i]),r._inHover||!a||i){var o=e.select("g[class*=math-group]"),l=o.node(),c=_.getId(r);r||(r=t._fullLayout[c]);var d,f,h=r.borderwidth,m=(1===n?r.title.font:a.groupTitle?a.groupTitle.font:r.font).size*g;if(l){var v=s.bBox(l);d=v.height,f=v.width,1===n?s.setTranslate(o,h,h+.75*d):s.setTranslate(o,0,.25*d)}else{var y="."+c+(1===n?"title":"")+"text",x=e.select(y),b=u.lineCount(x),w=x.node();if(d=m*b,f=w?s.bBox(w).width:0,1===n)"left"===r.title.side&&(f+=2*p.itemGap),u.positionText(x,h+p.titlePad,h+m);else{var T=2*p.itemGap+r.indentation+r.itemwidth;a.groupTitle&&(T=p.itemGap,f-=r.indentation+r.itemwidth),u.positionText(x,T,-m*((b-1)/2-.3))}}1===n?(r._titleWidth=f,r._titleHeight=d):(a.lineHeight=m,a.height=Math.max(d,16)+3,a.width=f)}else e.remove()}(t,r,n,a)})}function L(e){return n.isRightAnchor(e)?"right":n.isCenterAnchor(e)?"center":"left"}function O(e){return n.isBottomAnchor(e)?"bottom":n.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){if(t)T(e,t);else{var n=e._fullLayout,a=n._legends;n._infolayer.selectAll('[class^="legend"]').each(function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===a.indexOf(t)&&e.remove()});for(var i=0;i{var t=f(),r=v(),n=S(),a=et(),i=a.pushUnique,o=a.strTranslate,l=a.strRotate,s=it(),c=xt(),u=or(),d=Ut(),h=F(),p=ar(),m=Zt(),g=ut().zindexSeparator,y=Ne(),x=qt(),b=O(),_=cr(),w=vr(),T=b.YANGLE,k=Math.PI*T/180,M=1/Math.sin(k),A=Math.cos(k),E=Math.sin(k),C=b.HOVERARROWSIZE,L=b.HOVERTEXTPAD,D={box:!0,ohlc:!0,violin:!0,candlestick:!0},I={scatter:!0,scattergl:!0,splom:!0};function P(e,t){return e.distance-t.distance}function N(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}e.hover=function(e,n,o,l){e=a.getGraphDiv(e);var c=n.target;a.throttle(e._fullLayout._uid+b.HOVERID,b.HOVERMINTIME,function(){!function(e,n,o,l,c){o||(o="xy"),"string"==typeof o&&(o=o.split(g)[0]);var d,f,v,b=Array.isArray(o)?o:[o],_=e._fullLayout,w=_.hoversubplots,T=_._plots||[],k=T[o],A=_._has("cartesian"),E=n.hovermode||_.hovermode,S="x"===(E||"").charAt(0),L="y"===(E||"").charAt(0);if(A&&(S||L)&&"axis"===w)for(var O=b.length,R=0;RZ[0]._length||_e<0||_e>J[0]._length)return p.unhoverRaw(e,n)}else be="xpx"in n?n.xpx:Z[0]._length/2,_e="ypx"in n?n.ypx:J[0]._length/2;if(n.pointerX=be+Z[0]._offset,n.pointerY=_e+J[0]._offset,ne="xval"in n?x.flat(b,n.xval):x.p2c(Z,be),ae="yval"in n?x.flat(b,n.yval):x.p2c(J,_e),!r(ne[0])||!r(ae[0]))return a.warn("Fx.hover failed",n,e),p.unhoverRaw(e,n)}var Me=1/0;function Ae(t,i){for(oe=0;oeme&&(ge.splice(0,me),Me=ge[0].distance),A&&0!==re&&0===ge.length){pe.distance=re,pe.index=!1;var u=se._module.hoverPoints(pe,fe,he,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter(function(e){return e.spikeDistance<=re})),u&&u.length){var d,f=u.filter(function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap});if(f.length){var p=f[0];r(p.x0)&&r(p.y0)&&(d=Se(p),(!ye.vLinePoint||ye.vLinePoint.spikeDistance>d.spikeDistance)&&(ye.vLinePoint=d))}var m=u.filter(function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap});if(m.length){var g=m[0];r(g.x0)&&r(g.y0)&&(d=Se(g),(!ye.hLinePoint||ye.hLinePoint.spikeDistance>d.spikeDistance)&&(ye.hLinePoint=d))}}}}}function Ee(e,t,r){for(var n,a=null,i=1/0,o=0;oe.trace.index===ze.trace.index):[ze]).length;Ae($("x",ze,_),$("y",ze,_));var je,He=[],qe={},Ye=0,Ve=function(e){var t=D[e.trace.type]?N(e):e.trace.index;if(qe[t]){var r=qe[t]-1,n=He[r];r>0&&Math.abs(e.distance)Be-1;je--)Ve(ge[je]);ge=He,De()}var Ue=e._hoverdata,$e=[],We=W(e),Ge=G(e);for(let e of ge){var Xe=x.makeEventData(e,e.trace,e.cd);if(!1!==e.hovertemplate){var Ze=!1;e.cd[e.index]&&e.cd[e.index].ht&&(Ze=e.cd[e.index].ht),e.hovertemplate=Ze||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var Je=e.x0+e.xa._offset,Ke=e.x1+e.xa._offset,Qe=e.y0+e.ya._offset,et=e.y1+e.ya._offset,tt=Math.min(Je,Ke),rt=Math.max(Je,Ke),nt=Math.min(Qe,et),at=Math.max(Qe,et);Xe.bbox={x0:tt+Ge,x1:rt+Ge,y0:nt+We,y1:at+We}}e.eventData=[Xe],$e.push(Xe)}e._hoverdata=$e;var it="y"===E&&(ve.length>1||ge.length>1)||"closest"===E&&xe&&ge.length>1,ot=h.combine(_.plot_bgcolor||h.background,_.paper_bgcolor),lt=z(ge,{gd:e,hovermode:E,rotateLabels:it,bgColor:ot,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),st=lt.hoverLabels;if(x.isUnifiedHover(E)||(function(e,t,r,n){var a,i,o,l,s,c,u,d=t?"xa":"ya",f=t?"ya":"xa",h=0,p=1,m=e.size(),g=new Array(m),v=0,y=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function k(e){var t=e[0],r=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,i>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=i;a=!1}if(!(o<.01)){if(i<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=o;a=!1}if(a){var n=0;for(l=0;lt.pmax&&n++;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos>t.pmax-1&&(c.del=!0,n--);for(l=0;l=0;s--)e[s].dp-=o;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}for(e.each(function(e){var n=e[d],a=e[f],i="x"===n._id.charAt(0),o=n.range;0===v&&o&&o[0]>o[1]!==i&&(p=-1);var l=0,s=i?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,h=j(e,t),m=e.anchor,k="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(i?T(h.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(i?T(e.by):w(e.bx));else if(i)u=(c=e.crossPos+T(C+h.y)-T(e.by/2-C))+T(e.by);else{var A=w(k*C+h.x),E=A+w(k*e.bx);c=e.crossPos+Math.min(A,E),u=e.crossPos+Math.max(A,E)}i?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===a.side?(l=a._mainLinePosition,s=r.width):s=a._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(u,x)-Math.max(c,y)>1&&("top"===a.side?(l=a._mainLinePosition,s=r.height):s=a._mainLinePosition)}g[v++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?M:1)/2,pmin:l,pmax:s}]}),g.sort(function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)});!a&&h<=m;){for(h++,a=!0,l=0;l.01){for(s=E.length-1;s>=0;s--)E[s].dp+=i;for(A.push.apply(A,E),g.splice(l+1,1),u=0,s=A.length-1;s>=0;s--)u+=A[s].dp;for(o=u/A.length,s=A.length-1;s>=0;s--)A[s].dp-=o;a=!1}else l++}g.forEach(k)}for(l=g.length-1;l>=0;l--){var O=g[l];for(s=O.length-1;s>=0;s--){var D=O[s],I=D.datum;I.offset=D.dp,I.del=D.del}}}(st,it,_,lt.commonLabelBoundingBox),H(st,it,_._invScaleX,_._invScaleY)),c&&c.tagName){var ct=y.getComponentMethod("annotations","hasClickToShow")(e,$e);u(t.select(c),ct?"pointer":"")}!c||l||!function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers)||a.binNumber!==i.binNumber)return!0}return!1}(e,0,Ue)||(Ue&&e.emit("plotly_unhover",{event:n,points:Ue}),e.emit("plotly_hover",{event:n,points:e._hoverdata,xaxes:Z,yaxes:J,xvals:ne,yvals:ae}))}(e,n,o,l,c)})},e.loneHover=function(e,r){var n=!0;Array.isArray(e)||(n=!1,e=[e]);var a=r.gd,i=W(a),o=G(a),l=!1,s=z(e.map(function(e){var t=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(t,n),d=Math.max(t,n),f=Math.min(l,s),p=Math.max(l,s),m=e.trace;if(y.traceIs(m,"gl3d")){var g=a._fullLayout[m.scene]._scene.container,v=g.offsetLeft,x=g.offsetTop;u+=v,d+=v,f+=x,p+=x}c.bbox={x0:u+o,x1:d+o,y0:f+i,y1:p+i},r.inOut_bbox&&r.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}}),{gd:a,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||h.background,container:t.select(r.container),outerContainer:r.outerContainer||r.container}).hoverLabels,c=0,u=0;return s.sort(function(e,t){return e.y0-t.y0}).each(function(e,t){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function z(e,r){var n=r.gd,i=n._fullLayout,s=r.hovermode,u=r.rotateLabels,f=r.bgColor,p=r.container,m=r.outerContainer,g=r.commonLabelOpts||{};if(0===e.length)return[[]];var v=r.fontFamily||b.HOVERFONT,k=r.fontSize||b.HOVERFONTSIZE,M=r.fontWeight||i.font.weight,A=r.fontStyle||i.font.style,E=r.fontVariant||i.font.variant,S=r.fontTextcase||i.font.textcase,O=r.fontLineposition||i.font.lineposition,D=r.fontShadow||i.font.shadow,I=e[0],P=I.xa,R=I.ya,F=s.charAt(0),z=F+"Label",j=I[z];if(void 0===j&&"multicategory"===P.type)for(var H=0;Hi.width-T&&(N=i.width-T),r.attr("d","M"+(x-N)+",0L"+(x-N+C)+","+w+C+"H"+T+"v"+w+(2*L+_.height)+"H"+-T+"V"+w+C+"H"+(x-N-C)+"Z"),x=N,Q.minX=x-T,Q.maxX=x+T,"top"===P.side?(Q.minY=b-(2*L+_.height),Q.maxY=b-L):(Q.minY=b+L,Q.maxY=b+(2*L+_.height))}else{var F,z,B;"right"===R.side?(F="start",z=1,B="",x=P._offset+P._length):(F="end",z=-1,B="-",x=P._offset),b=R._offset+(I.y0+I.y1)/2,l.attr("text-anchor",F),r.attr("d","M0,0L"+B+C+","+C+"V"+(L+_.height/2)+"h"+B+(2*L+_.width)+"V-"+(L+_.height/2)+"H"+B+C+"V-"+C+"Z"),Q.minY=b-(L+_.height/2),Q.maxY=b+(L+_.height/2),"right"===R.side?(Q.minX=x+C,Q.maxX=x+C+(2*L+_.width)):(Q.minX=x-C-(2*L+_.width),Q.maxX=x-C);var H,q=_.height/2,V=Y-_.top-q,U="clip"+i._uid+"commonlabel"+R._id;if(x<_.width+2*L+C){H="M-"+(C+L)+"-"+q+"h-"+(_.width-L)+"V"+q+"h"+(_.width-L)+"Z";var $=_.width-x+L;c.positionText(l,$,V),"end"===F&&l.selectAll("tspan").each(function(){var e=t.select(this),r=d.tester.append("text").text(e.text()).call(d.font,y),a=X(n,r.node());Math.round(a.width)"none"!==e.hoverinfo);if(0===t.length)return[];var ee=i.hoverlabel,te=ee.font,re=t[0],ne=(("x unified"===s?re.xa:re.ya).unifiedhovertitle||{}).text,ae={showlegend:!0,legend:{title:{text:ne?a.hovertemplateString({data:"x unified"===s?[{xa:re.xa,x:re.xVal}]:[{ya:re.ya,y:re.yVal}],fallback:re.trace.hovertemplatefallback,locale:i._d3locale,template:ne}):j,font:te},font:te,bgcolor:ee.bgcolor,bordercolor:ee.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},ie={font:te};_(ae,ie,n._fullData);var oe=ie.legend;oe.entries=[];for(var le=0;le=0?me:ge+xe=0?ge:Ee+xe=0?he:pe+be=0?pe:Se+be=0,"top"!==e.idealAlign&&J||!K?J?(z+=q/2,e.anchor="start"):e.anchor="middle":(z-=q/2,e.anchor="end"),e.crossPos=z;else{if(e.pos=z,J=F+H/2+Q<=V,K=F-H/2-Q>=0,"left"!==e.idealAlign&&J||!K)if(J)F+=H/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,te=F+ee-V,re=F-ee;te>0&&(F-=te),re<0&&(F+=-re)}else F-=H/2,e.anchor="end";e.crossPos=F}w.attr("text-anchor",e.anchor),P&&I.attr("text-anchor",e.anchor),r.attr("transform",o(F,z)+(u?l(T):""))}),{hoverLabels:Ce,commonLabelBoundingBox:Q}}function B(e,t,r,n,i,o){var l,s,c="",u="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=a.templateString(e.name,e.trace._meta)),c=U(e.name,e.nameLength));var d=r.charAt(0),f="x"===d?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(u+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(u+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(u+=(u?"z: ":"")+e.zLabel)):t&&e[d+"Label"]===i?u=e[f+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(u=e.yLabel):u=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",(e.text||0===e.text)&&!Array.isArray(e.text)&&(u+=(u?"
":"")+e.text),void 0!==e.extraText&&(u+=(u?"
":"")+e.extraText),o&&""===u&&!e.hovertemplate&&(""===c&&o.remove(),u=c),null!=(s=null==(l=e.trace)?void 0:l.hoverlabel)&&s.split&&(e.hovertemplate="");let{hovertemplate:h=!1}=e;if(h){let t=e.hovertemplateLabels||e;e[d+"Label"]!==i&&(t[d+"other"]=t[d+"Val"],t[d+"otherLabel"]=t[d+"Label"]),u=(u=a.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:n._d3locale,template:h})).replace(R,(t,r)=>(c=U(r,e.nameLength),""))}return[u,c]}function j(e,t){var r=0,n=e.offset;return t&&(n*=-E,r=e.offset*A),{x:r,y:n}}function H(e,r,n,a){var i=function(e){return e*n},o=function(e){return e*a};e.each(function(e){var n=t.select(this);if(e.del)return n.remove();var a,l=n.select("text.nums"),s=e.anchor,u="end"===s?-1:1,f=function(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(C+L),n=r+t*(e.txwidth+L);return"middle"===e.anchor&&(r-=e.tx2width/2,n+=e.txwidth/2+L),{alignShift:t,textShiftX:r,text2ShiftX:n}}(e),h=j(e,r),p=h.x,m=h.y,g="middle"===s,v=!("hoverlabel"in e.trace)||e.trace.hoverlabel.showarrow;a=g?"M-"+i(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":v?"M0,0L"+i(u*C+p)+","+o(C+m)+"v"+o(e.by/2-C)+"h"+i(u*e.bx)+"v-"+o(e.by)+"H"+i(u*C+p)+"V"+o(m-C)+"Z":"M"+i(u*C+p)+","+o(m-e.by/2)+"h"+i(u*e.bx)+"v"+o(e.by)+"h"+i(-u*e.bx)+"Z",n.select("path").attr("d",a);var y=p+f.textShiftX,x=m+e.ty0-e.by/2+L,b=e.textAlign||"auto";"auto"!==b&&("left"===b&&"start"!==s?(l.attr("text-anchor","start"),y=g?-e.bx/2-e.tx2width/2+L:-e.bx-L):"right"===b&&"end"!==s&&(l.attr("text-anchor","end"),y=g?e.bx/2-e.tx2width/2-L:e.bx+L)),l.call(c.positionText,i(y),o(x)),e.tx2width&&(n.select("text.name").call(c.positionText,i(f.text2ShiftX+f.alignShift*L+p),o(m+e.ty0-e.by/2+L)),n.select("rect").call(d.setRect,i(f.text2ShiftX+(f.alignShift-1)*e.tx2width/2+p),o(m-e.by/2-1),i(e.tx2width),o(e.by+2)))})}function q(e,t){var n=e.index,i=e.trace||{},o=e.cd[0],l=e.cd[n]||{};function s(e){return e||r(e)&&0===e}var c=Array.isArray(n)?function(e,t){var r=a.castOption(o,n,e);return s(r)?r:a.extractOption({},i,"",t)}:function(e,t){return a.extractOption(l,i,e,t)};function u(t,r,n){var a=c(r,n);s(a)&&(e[t]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===i.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=a.constrain(e.x0,0,e.xa._length),e.x1=a.constrain(e.x1,0,e.xa._length),e.y0=a.constrain(e.y0,0,e.ya._length),e.y1=a.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:m.hoverLabelText(e.xa,e.xLabelVal,i.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:m.hoverLabelText(e.ya,e.yLabelVal,i.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var d=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+d,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var f=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+f,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function Y(e,t,r){var a,i,o=r.container,l=r.fullLayout,s=l._size,c=r.event,u=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||u){var p=h.combine(l.plot_bgcolor,l.paper_bgcolor);if(u){var g,v,y=t.hLinePoint;a=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(g=c.pointerX,v=c.pointerY):(g=a._offset+y.x,v=i._offset+y.y);var x,b,_=n.readability(y.color,p)<1.5?h.contrast(p):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,M=m.getPxPosition(e,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=M,b=g),-1!==w.indexOf("across")){var A=i._counterDomainMin,E=i._counterDomainMax;"free"===i.anchor&&(A=Math.min(A,i.position),E=Math.max(E,i.position)),x=s.l+A*s.w,b=s.l+E*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T,stroke:k,"stroke-dasharray":d.dashStyle(i.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:M+("right"!==i.side?T:-T),cy:v,r:T,fill:k}).classed("spikeline",!0)}if(f){var S,C,L=t.vLinePoint;a=L&&L.xa,i=L&&L.ya,"cursor"===a.spikesnap?(S=c.pointerX,C=c.pointerY):(S=a._offset+L.x,C=i._offset+L.y);var O,D,I=n.readability(L.color,p)<1.5?h.contrast(p):L.color,P=a.spikemode,N=a.spikethickness,R=a.spikecolor||I,F=m.getPxPosition(e,a);if(-1!==P.indexOf("toaxis")||-1!==P.indexOf("across")){if(-1!==P.indexOf("toaxis")&&(O=F,D=C),-1!==P.indexOf("across")){var z=a._counterDomainMin,B=a._counterDomainMax;"free"===a.anchor&&(z=Math.min(z,a.position),B=Math.max(B,a.position)),O=s.t+(1-B)*s.h,D=s.t+(1-z)*s.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:D,"stroke-width":N,stroke:R,"stroke-dasharray":d.dashStyle(a.spikedash,N)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:D,"stroke-width":N+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==P.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==a.side?N:-N),r:N,fill:R}).classed("spikeline",!0)}}}function V(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function U(e,t){return c.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function $(e,t,r){var n=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===n.type||"multicategory"===n.type)a=n._categoriesMap[a];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var l=t.cd[t.index],s=l[e+"Start"];void 0===s&&(s=l[e]);var c=l[e+"End"];void 0===c&&(c=l[e]);var u=c-s;"end"===o?a+=u:"middle"===o&&(a+=u/2)}a=n.d2c(a)}return i&&i.t&&i.t.posLetter===n._id&&("group"===r.boxmode||"group"===r.violinmode)&&(a+=i.t.dPos),a}var W=e=>e.offsetTop+e.clientTop,G=e=>e.offsetLeft+e.clientLeft;function X(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,o=n.top,l=i+n.width,s=o+n.height,c=a.apply3DTransform(r._invTransform)(i,o),u=a.apply3DTransform(r._invTransform)(l,s),d=c[0],f=c[1],h=u[0],p=u[1];return{x:d,y:f,width:h-d,height:p-f,top:Math.min(f,p),left:Math.min(d,h),right:Math.max(d,h),bottom:Math.max(f,p)}}}),xr=c((e,t)=>{var r=et(),n=F(),a=qt().isUnifiedHover;t.exports=function(e,t,i,o){o=o||{};var l=t.legend;function s(e){o.font[e]||(o.font[e]=l?t.legend.font[e]:t.font[e])}t&&a(t.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),s("weight"),s("style"),s("variant"),l?(o.bgcolor||(o.bgcolor=n.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),i("hoverlabel.bgcolor",o.bgcolor),i("hoverlabel.bordercolor",o.bordercolor),i("hoverlabel.namelength",o.namelength),i("hoverlabel.showarrow",o.showarrow),r.coerceFont(i,"hoverlabel.font",o.font),i("hoverlabel.align",o.align)}}),br=c((e,t)=>{var r=et(),n=xr(),a=D();t.exports=function(e,t){n(e,t,function(n,i){return r.coerce(e,t,a,n,i)})}}),_r=c((e,t)=>{var r=et(),n=I(),a=xr();t.exports=function(e,t,i,o){var l=r.extendFlat({},o.hoverlabel);t.hovertemplate&&(l.namelength=-1),a(e,t,function(a,i){return r.coerce(e,t,n,a,i)},l)}}),wr=c((e,t)=>{var r=et(),n=D();t.exports=function(e,t){function a(a,i){return void 0!==t[a]?t[a]:r.coerce(e,t,n,a,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}}),Tr=c((e,t)=>{var r=et(),n=D(),a=wr(),i=xr();t.exports=function(e,t){function o(a,i){return r.coerce(e,t,n,a,i)}a(e,t)&&(o("hoverdistance"),o("spikedistance")),"select"===o("dragmode")&&o("selectdirection");var l=t._has("mapbox"),s=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s||c)&&1===u||(l||s)&&c&&2===u)&&(t.dragmode="pan"),i(e,t,o),r.coerceFont(o,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}),kr=c((e,t)=>{var r=et(),n=Ne();function a(e,t,n,a){a=a||r.identity,Array.isArray(e)&&(t[0][n]=a(e))}t.exports=function(e){var t=e.calcdata,i=e._fullLayout;function o(e){return function(t){return r.coerceHoverinfo({hoverinfo:t},{_module:e._module},i)}}for(var l=0;l{var r=Ne(),n=yr().hover;t.exports=function(e,t,a){var i=r.getComponentMethod("annotations","onClick")(e,e._hoverdata);function o(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==a&&n(e,t,a,!0),e._hoverdata&&t&&t.target&&(i&&i.then?i.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}}),Ar=c((e,t)=>{var r=f(),n=et(),a=ar(),i=qt(),o=D(),l=yr();t.exports={moduleType:"component",name:"fx",constants:O(),schema:{layout:o},attributes:I(),layoutAttributes:o,supplyLayoutGlobalDefaults:br(),supplyDefaults:_r(),supplyLayoutDefaults:Tr(),calc:kr(),getDistanceFunction:i.getDistanceFunction,getClosest:i.getClosest,inbox:i.inbox,quadrature:i.quadrature,appendArrayPointValue:i.appendArrayPointValue,castHoverOption:function(e,t,r){return n.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return n.castOption(e,r,"hoverinfo",function(r){return n.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)})},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=n.isD3Selection(e)?e:r.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:Mr()}}),Er=c(e=>{e.selectMode=function(e){return"lasso"===e||"select"===e},e.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},e.openMode=function(e){return"drawline"===e||"drawopenpath"===e},e.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},e.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}}),Sr=c((e,t)=>{t.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(e){e.regl&&e.regl.clear({color:!0,depth:!0})})}}),Cr=c((e,t)=>{t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}),Lr=c((e,t)=>{t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}),Or=c((e,t)=>{var r=et().strTranslate;function n(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:n,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return n(e,r[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}}),Dr=c(e=>{var t=Yt(),r=Lr(),n=r.CIRCLE_SIDES,a=r.SQRT2,i=Or(),o=i.p2r,l=i.r2p,s=[0,3,4,5,6,1,2],c=[0,3,4,1,2];function u(e,t){return Math.abs(e-t)<=1e-6}function d(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&u{var r=dt(),n=Er(),a=n.drawMode,i=n.openMode,o=Lr(),l=o.i000,s=o.i090,c=o.i180,u=o.i270,d=o.cos45,f=o.sin45,h=Or(),p=h.p2r,m=h.r2p,g=ft().clearOutline,v=Dr(),y=v.readPaths,x=v.writePaths,b=v.ellipseOver,_=v.fixDatesForPaths;function w(e,t,r){var n,a=e[0][0],o=t.gd,h=a.getAttribute("d"),g=o._fullLayout.newshape,v=t.plotinfo,w=t.isActiveShape,T=v.xaxis,k=v.yaxis,M=!!v.domain||!v.xaxis,A=!!v.domain||!v.yaxis,E=i(r),S=y(h,o,v,w),C={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:M?"paper":T._id,yref:A?"paper":k._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(E||(C.fillcolor=g.fillcolor,C.fillrule=g.fillrule),1===S.length&&(n=S[0]),n&&5===n.length&&"drawrect"===r)C.type="rect",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[2][1],C.y1=n[2][2];else if(n&&"drawline"===r)C.type="line",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[1][1],C.y1=n[1][2];else if(n&&"drawcircle"===r){C.type="circle";var L=n[l][1],O=n[s][1],D=n[c][1],I=n[u][1],P=n[l][2],N=n[s][2],R=n[c][2],F=n[u][2],z=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),B=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);z&&(L=m(v.xaxis,L),O=m(v.xaxis,O),D=m(v.xaxis,D),I=m(v.xaxis,I)),B&&(P=m(v.yaxis,P),N=m(v.yaxis,N),R=m(v.yaxis,R),F=m(v.yaxis,F));var j=(O+I)/2,H=(P+R)/2,q=b({x0:j,y0:H,x1:j+(I-O+D-L)/2*d,y1:H+(F-N+R-P)/2*f});z&&(q.x0=p(v.xaxis,q.x0),q.x1=p(v.xaxis,q.x1)),B&&(q.y0=p(v.yaxis,q.y0),q.y1=p(v.yaxis,q.y1)),C.x0=q.x0,C.y0=q.y0,C.x1=q.x1,C.y1=q.y1}else C.type="path",T&&k&&_(S,T,k),C.path=x(S),n=null;return C}t.exports={newShapes:function(e,t){if(e.length&&e[0][0]){var n=t.gd,i=t.isActiveShape,o=t.dragmode,l=(n.layout||{}).shapes||[];if(!a(o)&&void 0!==i){var s=n._fullLayout._activeShapeIndex;if(s{var r=Er().selectMode,n=ft().clearOutline,a=Dr(),i=a.readPaths,o=a.writePaths,l=a.fixDatesForPaths;t.exports=function(e,t){if(e.length){var a=e[0][0];if(a){var s=a.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,d=t.plotinfo,f=d.xaxis,h=d.yaxis,p=t.isActiveSelection,m=t.dragmode,g=(c.layout||{}).selections||[];if(!r(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v{t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}),Rr=c(e=>{var t=Nr(),r=et(),n=Zt();function a(e,t){var r=0;return(t=t||0)&&e&&("category"===e.type||"multicategory"===e.type)&&(r=(e.r2p(1)-e.r2p(0))*t),r}e.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},e.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},e.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},e.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},e.extractPathCoords=function(e,n,a){var i=[];return e.match(t.segmentRE).forEach(function(e){var o=n[e.charAt(0)].drawn;if(void 0!==o){var l=e.slice(1).match(t.paramRE);if(l&&!(l.length{let r=t.charAt(0);return e+(void 0!==i[r].drawn?1:0)},0)},e.getDataToPixel=function(t,r,n,i,o){var l,s=t._fullLayout._size;if(r)if("domain"===o)l=function(e){return r._length*(i?1-e:e)+r._offset};else{var c=e.shapePositionToRange(r);l=function(e){var t=a(r,n);return r._offset+r.r2p(c(e,!0))+t},"date"===r.type&&(l=e.decodeDate(l))}else l=i?function(e){return s.t+s.h*(1-e)}:function(e){return s.l+s.w*e};return l},e.getPixelToData=function(t,r,n,a){var i,o=t._fullLayout._size;if(r)if("domain"===a)i=function(e){var t=(e-r._offset)/r._length;return n?1-t:t};else{var l=e.rangeToShapePosition(r);i=function(e){return l(r.p2r(e-r._offset))}}else i=n?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return i},e.roundPositionForSharpStrokeRendering=function(e,t){var r=1===Math.round(t%2),n=Math.round(e);return r?n+.5:n},e.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},e.getPathString=function(i,o){let l=o.type,s=n.getRefType(o.xref),c=n.getRefType(o.yref),u=i._fullLayout._size;var d,f,h,p,m,g,v,y,x,b,_,w;function T(t,r,n,a){var i;if(t)if("domain"===r)i=a?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let r=e.shapePositionToRange(t);i=function(e){return t._offset+t.r2p(r(e,!0))},"path"===n&&"date"===t.type&&(i=e.decodeDate(i))}else i=a?function(e){return u.t+u.h*(1-e)}:function(e){return u.l+u.w*e};return i}if("array"===s?(v=[],d=o.xref.map(function(e){return n.getFromId(i,e)}),v=o.xref.map(function(e,t){return T(d[t],n.getRefType(e),l,!1)})):v=T(d=n.getFromId(i,o.xref),s,l,!1),"array"===c?(y=[],f=o.yref.map(function(e){return n.getFromId(i,e)}),y=o.yref.map(function(e,t){return T(f[t],n.getRefType(e),l,!0)})):y=T(f=n.getFromId(i,o.yref),c,l,!0),"path"===l)return function(e,n,a){let i=e.path,o=e.xsizemode,l=e.ysizemode,s=e.xanchor,c=e.yanchor,u=Array.isArray(e.xref),d=Array.isArray(e.yref);var f=0,h=0;return i.replace(t.segmentRE,function(e){var i=0,p=e.charAt(0),m=t.paramIsX[p],g=t.paramIsY[p],v=t.numParams[p];let y=void 0!==m.drawn,x=void 0!==g.drawn,b=u?n[f]:n,_=d?a[h]:a;var w=e.slice(1).replace(t.paramRE,function(e){return m[i]?e="pixel"===o?b(s)+Number(e):b(e):g[i]&&(e="pixel"===l?_(c)-Number(e):_(e)),++i>v&&(e="X"),e});return i>v&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+e)),y&&f++,x&&h++,p+w})}(o,v,y);if("array"===s)h=a(d[0],o.x0shift),p=a(d[1],o.x1shift),x=v[0](o.x0)+h,b=v[1](o.x1)+p;else if(h=a(d,o.x0shift),p=a(d,o.x1shift),"pixel"===o.xsizemode){let e=v(o.xanchor);x=e+o.x0+h,b=e+o.x1+p}else x=v(o.x0)+h,b=v(o.x1)+p;if("array"===c)m=a(f[0],o.y0shift),g=a(f[1],o.y1shift),_=y[0](o.y0)+m,w=y[1](o.y1)+g;else if(m=a(f,o.y0shift),g=a(f,o.y1shift),"pixel"===o.ysizemode){let e=y(o.yanchor);_=e-o.y0+m,w=e-o.y1+g}else _=y(o.y0)+m,w=y(o.y1)+g;if("line"===l)return"M"+x+","+_+"L"+b+","+w;if("rect"===l)return"M"+x+","+_+"H"+b+"V"+w+"H"+x+"Z";var k=(x+b)/2,M=(_+w)/2,A=Math.abs(k-x),E=Math.abs(M-_),S="A"+A+","+E,C=k+A+","+M;return"M"+C+S+" 0 1,1 "+k+","+(M-E)+S+" 0 0,1 "+C+"Z"}}),Fr=c((e,t)=>{var r=et(),n=Zt(),a=xt(),i=Ut(),o=Dr().readPaths,l=Rr(),s=l.getPathString,c=Ce(),u=yt().FROM_TL;t.exports=function(e,t,d,f){if(f.selectAll(".shape-label").remove(),d.label.text||d.label.texttemplate){var h;if(d.label.texttemplate){var p={};if("path"!==d.type){var m=n.getFromId(e,d.xref),g=n.getFromId(e,d.yref);let t=Array.isArray(d.xref),r=Array.isArray(d.yref);for(var v in c){var y="function"==typeof c[v],x=!t||c.simpleXVariables.includes(v),b=!r||c.simpleYVariables.includes(v);if(y&&x&&b){var _=c[v](d,m,g);void 0!==_&&(p[v]=_)}}}h=r.texttemplateStringForShapes({data:[p],fallback:d.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:d.label.texttemplate})}else h=d.label.text;var w,T,k,M,A={"data-index":t},E=d.label.font,S=f.append("g").attr(A).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(h);if(d.path){var C=s(e,d),L=o(C,e);w=1/0,k=1/0,T=-1/0,M=-1/0;for(var O=0;O=e?t-n:n-t,-180/Math.PI*Math.atan2(a,i)}(w,k,T,M):0),S.call(function(t){return t.call(i.font,E).attr({}),a.convertToTspans(t,e),t});var z=function(e,t,r,n,a,i,o){var l,s,c,d,f=a.label.textposition,h=a.label.textangle,p=a.label.padding,m=a.type,g=Math.PI/180*i,v=Math.sin(g),y=Math.cos(g),x=a.label.xanchor,b=a.label.yanchor;if("line"===m){"start"===f?(l=e,s=t):"end"===f?(l=r,s=n):(l=(e+r)/2,s=(t+n)/2),"auto"===x&&(x="start"===f?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r{var r=et().strTranslate,n=ar(),a=Er(),i=a.drawMode,o=a.selectMode,l=Ne(),s=F(),c=Lr(),u=c.i000,d=c.i090,f=c.i180,h=c.i270,p=ft().clearOutlineControllers,m=Dr(),g=m.pointsOnRectangle,v=m.pointsOnEllipse,y=m.writePaths,x=Ir().newShapes,b=Ir().createShapeObj,_=Pr(),w=Fr();function T(e,t){var r,n,a,i=e[t][1],o=e[t][2],l=e.length;return n=e[r=(t+1)%l][1],a=e[r][2],n===i&&a===o&&(n=e[r=(t+2)%l][1],a=e[r][2]),[r,n,a]}t.exports=function e(t,a,c,m){m||(m=0);var k=c.gd;function M(){e(t,a,c,m++),(v(t[0])||c.hasText)&&A({redrawing:!0})}function A(e){var t={};void 0!==c.isActiveShape&&(c.isActiveShape=!1,t=x(a,c)),void 0!==c.isActiveSelection&&(c.isActiveSelection=!1,t=_(a,c),k._fullLayout._reselect=!0),Object.keys(t).length&&l.call((e||{}).redrawing?"relayout":"_guiRelayout",k,t)}var E,S,C,L,O,D=k._fullLayout._zoomlayer,I=c.dragmode,P=i(I),N=o(I);if((P||N)&&(k._fullLayout._outlining=!0),p(k),a.attr("d",y(t)),m||!c.isActiveShape&&!c.isActiveSelection||(O=function(e,t){for(var r=0;r1&&(2!==e.length||"Z"!==e[1][0])&&(0===L&&(e[0][0]="M"),t[C]=e,M(),A())}}()}}function q(e,r){(function(e,r){if(t.length)for(var n=0;n{var r=f(),n=Ne(),a=et(),i=Zt(),o=Dr().readPaths,l=zr(),s=Fr(),c=ft().clearOutlineControllers,u=F(),d=Ut(),h=ct().arrayEditor,p=ar(),m=ir(),g=Nr(),v=Rr(),y=v.getPathString;function x(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove(),t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;a_?(A=h,L="y0",E=_,O="y1"):(A=_,L="y1",E=h,O="y0"),re(r),ie(c,o),function(e,t,r){var n=t.xref,a=t.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),s="";"paper"!==n&&!o.autorange&&(s+=n),"paper"!==a&&!l.autorange&&(s+=a),d.setClipUrl(e,s?"clip"+r._fullLayout._uid+s:null,r)}(t,o,e),te.moveFn="move"===N?ne:ae,te.altKey=r.altKey)},doneFn:function(){b(e)||(m(t),oe(c),T(t,e,o),n.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){b(e)||oe(c)}};function re(r){if(b(e))N=null;else if(z)N="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=te.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!B&&a>10&&i>10&&!r.shiftKey?p.getCursor(o/a,1-l/i):"move";m(t,s),N=s.split("-")[0]}}function ne(r,n){if("path"===o.type){var a=function(e){return e},i=a,u=a;R?j("xanchor",o.xanchor=K(w+r)):(i=function(e){return K(Z(e)+r)},q&&"date"===q.type&&(i=v.encodeDate(i))),F?j("yanchor",o.yanchor=Q(M+n)):(u=function(e){return Q(J(e)+n)},V&&"date"===V.type&&(u=v.encodeDate(u))),j("path",o.path=k(P,i,u))}else R?j("xanchor",o.xanchor=K(w+r)):(j("x0",o.x0=K(f+r)),j("x1",o.x1=K(x+r))),F?j("yanchor",o.yanchor=Q(M+n)):(j("y0",o.y0=Q(h+n)),j("y1",o.y1=Q(_+n)));t.attr("d",y(e,o)),ie(c,o),s(e,l,o,H)}function ae(r,n){if(B){var a=function(e){return e},i=a,u=a;R?j("xanchor",o.xanchor=K(w+r)):(i=function(e){return K(Z(e)+r)},q&&"date"===q.type&&(i=v.encodeDate(i))),F?j("yanchor",o.yanchor=Q(M+n)):(u=function(e){return Q(J(e)+n)},V&&"date"===V.type&&(u=v.encodeDate(u))),j("path",o.path=k(P,i,u))}else if(z){if("resize-over-start-point"===N){var d=f+r,p=F?h-n:h+n;j("x0",o.x0=R?d:K(d)),j("y0",o.y0=F?p:Q(p))}else if("resize-over-end-point"===N){var m=x+r,g=F?_-n:_+n;j("x1",o.x1=R?m:K(m)),j("y1",o.y1=F?g:Q(g))}}else{var b=function(e){return-1!==N.indexOf(e)},T=b("n"),Y=b("s"),U=b("w"),$=b("e"),W=T?A+n:A,G=Y?E+n:E,X=U?S+r:S,ee=$?C+r:C;F&&(T&&(W=A-n),Y&&(G=E-n)),(!F&&G-W>10||F&&W-G>10)&&(j(L,o[L]=F?W:Q(W)),j(O,o[O]=F?G:Q(G))),ee-X>10&&(j(D,o[D]=R?X:K(X)),j(I,o[I]=R?ee:K(ee)))}t.attr("d",y(e,o)),ie(c,o),s(e,l,o,H)}function ie(e,t){(R||F)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=Z(R?t.xanchor:a.midRange(r?[t.x0,t.x1]:v.extractPathCoords(t.path,g.paramIsX))),o=J(F?t.yanchor:a.midRange(r?[t.y0,t.y1]:v.extractPathCoords(t.path,g.paramIsY)));if(i=v.roundPositionForSharpStrokeRendering(i,1),o=v.roundPositionForSharpStrokeRendering(o,1),R&&F){var l="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(R){var s="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",s)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function oe(e){e.selectAll(".visual-cue").remove()}p.init(te),ee.node().onmousemove=re}(e,F,f,t,c,N):!0===f.editable&&F.style("pointer-events",I||u.opacity(C)*S<=.5?"stroke":"all");F.node().addEventListener("click",function(){return function(e,t){if(_(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void M(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=M,x(e)}}}(e,F)})}"above"===f.layer?E(e._fullLayout._shapeUpperLayer):f.xref.includes("paper")||f.yref.includes("paper")?E(e._fullLayout._shapeLowerLayer):"between"!==f.layer||A?w._hadPlotinfo?E((w.mainplotinfo||w).shapelayer):E(e._fullLayout._shapeLowerLayer):E(w.shapelayerBetween)}function T(e,t,r){let n=r.xref,o=r.yref;if(Array.isArray(n)||Array.isArray(o)){let l="clip"+t._fullLayout._uid+"shape"+r._index,s=function(e,t,r){let n=e._fullLayout._size;function a(t,r){let a=(Array.isArray(t)?t:[t]).map(t=>i.getFromId(e,t)).filter(Boolean);if(!a.length)return r?[n.t,n.t+n.h]:[n.l,n.l+n.w];let o=a.map(function(e){return e._offset}),l=a.map(function(e){return e._offset+e._length});return[Math.min(...o),Math.max(...l)]}let o=a(t,!1),l=a(r,!0);return{x:o[0],y:l[0],width:o[1]-o[0],height:l[1]-l[0]}}(t,n,o);a.ensureSingleById(t._fullLayout._clips,"clipPath",l,function(e){e.append("rect")}).select("rect").attr(s),d.setClipUrl(e,l,t)}else{let r=(n+o).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");d.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}}function k(e,t,r){return e.replace(g.segmentRE,function(e){var n=0,a=e.charAt(0),i=g.paramIsX[a],o=g.paramIsY[a],l=g.numParams[a];return a+e.slice(1).replace(g.paramRE,function(e){return n>=l||(i[n]?e=t(e):o[n]&&(e=r(e)),n++),e})})}function M(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{var r=Ne(),n=gt(),a=dt(),i=Cr(),o=Br().eraseActiveShape,l=et(),s=l._,c=t.exports={};function u(e,t){var n,i,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=a.list(e,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===l){var h,p="in"===s?.5:2,m=(1+p)/2,g=(1-p)/2;for(i=0;i{var r=jr(),n=Object.keys(r),a=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],i=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(a),o=[];n.forEach(function(e){!function(e){if(-1===i.indexOf(e._cat||e.name)){var t=e.name,r=(e._cat||e.name).toLowerCase();-1===o.indexOf(t)&&o.push(t),-1===o.indexOf(r)&&o.push(r)}}(r[e])}),o.sort(),t.exports={DRAW_MODES:a,backButtons:i,foreButtons:o}}),qr=c((e,t)=>{Hr(),t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}),Yr=c((e,t)=>{var r=et(),n=F(),a=ct(),i=qr();t.exports=function(e,t){var o=e.modebar||{},l=a.newContainer(t,"modebar");function s(e,t){return r.coerce(o,l,i,e,t)}s("orientation"),s("bgcolor",n.addOpacity(t.paper_bgcolor,.5));var c=n.contrast(n.rgb(t.modebar.bgcolor));s("color",n.addOpacity(c,.3)),s("activecolor",n.addOpacity(c,.7)),s("uirevision",t.uirevision),s("add"),s("remove")}}),Vr=c((e,t)=>{var r=f(),n=v(),a=et(),i=Cr(),o=u().version,l=new DOMParser;function s(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=s.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this.element.setAttribute("role","toolbar"),this._uid=i,this.element.className="modebar modebar--custom","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=n.modebar,l="#"+i+" .modebar-group";document.querySelectorAll(l).forEach(function(e){e.style.backgroundColor=o.bgcolor});var s=!this.hasButtons(t),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||c||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var d=this.getLogo();r.watermark&&(d.className=d.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(d,this.element.childNodes[0]):this.element.appendChild(d),this.hasLogo=!0}this.updateActiveButton(),a.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+o.activecolor,"fill: "+o.color,this.element)},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(e){var r=t.createGroup();e.forEach(function(e){var n=e.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var a=t.createButton(e);t.buttonElements.push(a),r.appendChild(a)}),t.element.appendChild(r)})},c.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e},c.createButton=function(e){var t=this,n=document.createElement("button");n.setAttribute("type","button"),n.setAttribute("rel","tooltip"),n.className="modebar-btn";var a=e.title;void 0===a?a=e.name:"function"==typeof a&&(a=a(this.graphInfo)),(a||0===a)&&(n.setAttribute("data-title",a),n.setAttribute("aria-label",a)),void 0!==e.attr&&n.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),n.setAttribute("data-val",o)),"function"!=typeof e.click)throw new Error("must provide button 'click' function in button config");n.addEventListener("click",function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)}),n.setAttribute("data-toggle",e.toggle||!1),e.toggle&&r.select(n).classed("active",!0);var l=e.icon;return"function"==typeof l?n.appendChild(l()):n.appendChild(this.createIcon(l||i.question)),n.setAttribute("data-gravity",e.gravity||"n"),n},c.createIcon=function(e){var t,r=n(e.height)?Number(e.height):e.ascent-e.descent,a="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(a,"svg")).setAttribute("viewBox",[0,0,e.width,r].join(" ")),t.setAttribute("class","icon");var i=document.createElementNS(a,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):void 0!==e.ascent&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(i)}return e.svg&&(t=l.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,n=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(e){var i=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),l="true"===e.getAttribute("data-toggle"),s=r.select(e),c=function(e,r){var n=t.modebar,a=e.querySelector(".icon path");a&&(r||e.matches(":hover")?a.style.fill=n.activecolor:a.style.fill=n.color)};if(l){if(o===n){var u=!s.classed("active");s.classed("active",u),c(e,u)}}else{var d=null===o?o:a.nestedProperty(t,o).get();s.classed("active",d===i),c(e,d===i)}})},c.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{var r=dt(),n=jt(),a=Ne(),i=qt().isUnifiedHover,o=Vr(),l=jr(),s=Hr().DRAW_MODES,c=et().extendDeep;t.exports=function(e){var t=e._fullLayout,u=e._context,d=t._modeBar;if(u.displayModeBar||u.watermark){if(!Array.isArray(u.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(u.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var f,h=u.modeBarButtons;f=Array.isArray(h)&&h.length?function(e){for(var t=c([],e),r=0;r1?(D=["toggleHover"],I=["resetViews"]):v?(O=["zoomInGeo","zoomOutGeo"],D=["hoverClosestGeo"],I=["resetGeo"]):g?(D=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(O=["zoomInMapbox","zoomOutMapbox"],D=["toggleHover"],I=["resetViewMapbox"]):w?(O=["zoomInMap","zoomOutMap"],D=["toggleHover"],I=["resetViewMap"]):y?D=["hoverClosestPie"]:M?(D=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):D=["toggleHover"],m&&D.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;t{t.exports={moduleType:"component",name:"modebar",layoutAttributes:qr(),supplyLayoutDefaults:Yr(),manage:Ur()}}),Wr=c((e,t)=>{var r=yt().FROM_BL;t.exports=function(e,t,n){void 0===n&&(n=r[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*n;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)],e.setScale()}}),Gr=c(e=>{var t=et(),r=Xt(),n=dt().id2name,a=wt(),i=Wr(),o=Wt(),l=y().ALMOST_EQUAL,s=yt().FROM_BL;function c(e,r,i){var o=i.axIds,l=i.layoutOut,s=i.hasImage,c=l._axisConstraintGroups,h=l._axisMatchGroups,p=r._id,m=p.charAt(0),g=((l._splomAxes||{})[m]||{})[p]||{},v=r._id,y="x"===v.charAt(0);function x(n,i){return t.coerce(e,r,a,n,i)}r._matchGroup=null,r._constraintGroup=null,x("constrain",s?"domain":"range"),t.coerce(e,r,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var b,_,w=r.type,T=[];for(b=0;bn?a.slice(n):i.slice(r))+o:a+i+e*t:o}function p(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;ol*x)||T)for(a=0;aI&&FO&&(O=F);f/=(O-L)/(2*D),L=c.l2r(L),O=c.l2r(O),c.range=c._input.range=E{var t=f(),r=Ne(),n=gt(),a=et(),i=xt(),o=Sr(),l=F(),s=Ut(),c=$t(),u=$r(),d=Zt(),h=yt(),p=Gr(),m=p.enforce,g=p.clean,v=Xt().doAutoRange,y="start",x=ut().zindexSeparator;function b(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function _(r){var i,o,c,f,p,m,g=r._fullLayout,v=g._size,y=v.p,_=d.list(r,"",!0);if(g._paperdiv.style({width:r._context.responsive&&g.autosize&&!r._context._hasZeroWidth&&!r.layout.width?"100%":g.width+"px",height:r._context.responsive&&g.autosize&&!r._context._hasZeroHeight&&!r.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(s.setSize,g.width,g.height),r._context.setBackground(r,g.paper_bgcolor),e.drawMainTitle(r),u.manage(r),!g._has("cartesian"))return n.previousPromises(r);function T(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-y-n:t._offset+t._length+y+n:v.t+v.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+y+n:t._offset-y-n:v.l+v.w*(e.position||0)+n%1}for(i=0;i<_.length;i++){var M=(f=_[i])._anchorAxis;f._linepositions={},f._lw=s.crispRound(r,f.linewidth,1),f._mainLinePosition=T(f,M,f.side),f._mainMirrorPosition=f.mirror&&M?T(f,M,h.OPPOSITE_SIDE[f.side]):null}var A=[],E=[],S=[],C=1===l.opacity(g.paper_bgcolor)&&1===l.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(o in g._plots)if((c=g._plots[o]).mainplot)c.bg&&c.bg.remove(),c.bg=void 0;else{var L=c.xaxis.domain,O=c.yaxis.domain,D=c.plotgroup;if(b(L,O,S)&&-1===o.indexOf(x)){var I=D.node(),P=c.bg=a.ensureSingle(D,"rect","bg");I.insertBefore(P.node(),I.childNodes[0]),E.push(o)}else D.select("rect.bg").remove(),S.push([L,O]),C||(A.push(o),E.push(o))}var N,R,F,z,B,j,H,q,Y,V,U,$,W,G=g._bgLayer.selectAll(".bg").data(A);for(G.enter().append("rect").classed("bg",!0),G.exit().remove(),G.each(function(e){g._plots[e].bg=t.select(this)}),i=0;i.5?"t":"b",o=e._fullLayout.margin[i],l=0;return"paper"===t.yref?l=r+t.pad.t+t.pad.b:"container"===t.yref&&(l=function(e,t,r,n,a){var i=0;return"middle"===r&&(i+=a/2),"t"===e?("top"===r&&(i+=a),i+=n-t*n):("bottom"===r&&(i+=a),i+=t*n),i}(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),l>o?l:0}(e,r,m);if(g>0){(function(e,t,r,i){var o="title.automargin",l=e._fullLayout.title,s=l.y>.5?"t":"b",c={x:l.x,y:l.y,t:0,b:0},u={};"paper"===l.yref&&function(e,t,r,n,i){var o="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,l=a.isTopAnchor(t)?n:n-i,s="b"===r?o-l:l;return!(a.isTopAnchor(t)&&"t"===r||a.isBottomAnchor(t)&&"b"===r)&&s{var r=Dr().readPaths,n=zr(),a=ft().clearOutlineControllers,i=F(),o=Ut(),l=ct().arrayEditor,s=Rr(),c=s.getPathString;function u(e){var t=e._fullLayout;for(var r in a(e),t._selectionLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;k--){var M=a.append("path").attr(g).style("opacity",k?.1:v).call(i.stroke,x).call(i.fill,y).call(o.dashLine,k?"solid":_,k?4+b:b);if(h(M,e,f),w){var A=l(e.layout,"selections",f);M.style({cursor:"move"});var E={element:M.node(),plotinfo:m,gd:e,editHelpers:A,isActiveSelection:!0},S=r(s,e);n(S,M,E)}else M.style("pointer-events",k?"all":"none");T[k]=M}var C=T[0];T[1].node().addEventListener("click",function(){return function(e,t){if(d(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void p(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=p,u(e)}}}(e,C)})}(e._fullLayout._selectionLayer)}function h(e,t,r){var n=r.xref+r.yref;o.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function p(e){d(e)&&e._fullLayout._activeSelectionIndex>=0&&(a(e),delete e._fullLayout._activeSelectionIndex,u(e))}t.exports={draw:u,drawOne:f,activateLastSelection:function(e){if(d(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=p,u(e)}}}}),Jr=c((e,t)=>{t.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}}),Kr=c((e,t)=>{t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var a=r[0],i=r[1],o=n[0],l=n[1],s=t[0];return(o-a)*(t[1]-i)-(l-i)*(s-a)>=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],l=n[1]-r[1],s=o*i+a*l;return!(s-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-a>e&&(i-c)*(a-u)/(o-u)+c-n>e&&(l=!l),i=c,o=u}return l}};return t}}),Qr=c((e,t)=>{t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(null===t||t===e.root)},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;null!==a;){if(r(a))return t.prev=a.prev,t.next=a,a.prev.next=t,void(a.prev=t);n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}),en=c((e,t)=>{var r=Qr();t.exports=function(e,t,n){function a(e,t){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:null,below:null},otherFill:null}}function i(e,t,r){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var o=r.create();function l(e,r){o.insertBefore(e,function(n){var a=function(e,r,n,a,i,o){var l=t.pointsCompare(r,i);return 0!==l?l:t.pointsSame(n,o)?0:e!==a?e?1:-1:t.pointAboveOrOnLine(n,a?i:o,a?o:i)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt);return a<0})}function s(e,t){var n=function(e,t){var n=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return l(n,e.end),n}(e,t);return function(e,t,n){var a=r.node({isStart:!1,pt:t.end,seg:t,primary:n,other:e,status:null});e.other=a,l(a,e.pt)}(n,e,t),n}function c(e,t){var r=i(t,e.seg.end,e.seg);return function(e,t){n&&n.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,l(e.other,e.pt)}(e,t),s(r,e.primary)}function u(a,i){var l=r.create();function s(e){return l.findTransition(function(r){var n=function(e,r){var n=e.seg.start,a=e.seg.end,i=r.seg.start,o=r.seg.end;return t.pointsCollinear(n,i,o)?t.pointsCollinear(a,i,o)||t.pointAboveOrOnLine(a,i,o)?1:-1:t.pointAboveOrOnLine(n,i,o)?1:-1}(e,r.ev);return n>0})}function u(e,r){var a=e.seg,i=r.seg,o=a.start,l=a.end,s=i.start,u=i.end;n&&n.checkIntersection(a,i);var d=t.linesIntersect(o,l,s,u);if(!1===d){if(!t.pointsCollinear(o,l,s)||t.pointsSame(o,u)||t.pointsSame(l,s))return!1;var f=t.pointsSame(o,s),h=t.pointsSame(l,u);if(f&&h)return r;var p=!f&&t.pointBetween(o,s,u),m=!h&&t.pointBetween(l,s,u);if(f)return m?c(r,l):c(e,u),r;p&&(h||(m?c(r,l):c(e,u)),c(r,o))}else 0===d.alongA&&(-1===d.alongB?c(e,s):0===d.alongB?c(e,d.pt):1===d.alongB&&c(e,u)),0===d.alongB&&(-1===d.alongA?c(r,o):0===d.alongA?c(r,d.pt):1===d.alongA&&c(r,l));return!1}for(var d=[];!o.isEmpty();){var f=o.getHead();if(n&&n.vert(f.pt[0]),f.isStart){let t=function(){if(p){var e=u(f,p);if(e)return e}return!!m&&u(f,m)};n&&n.segmentNew(f.seg,f.primary);var h=s(f),p=h.before?h.before.ev:null,m=h.after?h.after.ev:null;n&&n.tempStatus(f.seg,!!p&&p.seg,!!m&&m.seg);var g,v=t();if(v&&(e?(g=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(v.seg.myFill.above=!v.seg.myFill.above):v.seg.otherFill=f.seg.myFill,n&&n.segmentUpdate(v.seg),f.other.remove(),f.remove()),o.getHead()!==f){n&&n.rewind(f.seg);continue}if(e)g=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=m?m.seg.myFill.above:a,f.seg.myFill.above=g?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill){var y;y=m?f.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:f.primary?i:a,f.seg.otherFill={above:y,below:y}}n&&n.status(f.seg,!!p&&p.seg,!!m&&m.seg),f.other.status=h.insert(r.node({ev:f}))}else{var x=f.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(l.exists(x.prev)&&l.exists(x.next)&&u(x.prev.ev,x.next.ev),n&&n.statusRemove(x.ev.seg),x.remove(),!f.primary){var b=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=b}d.push(f.seg)}o.getHead().remove()}return n&&n.done(),d}return e?{addRegion:function(e){for(var r,n=e[e.length-1],i=0;i{t.exports=function(e,t,r){var n=[],a=[];return e.forEach(function(e){var i=e.start,o=e.end;if(t.pointsSame(i,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(e);for(var l={index:0,matches_head:!1,matches_pt1:!1},s={index:0,matches_head:!1,matches_pt1:!1},c=l,u=0;u{function r(e,t,r){var n=[];return e.forEach(function(e){var a=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[a]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[a],below:2===t[a]},otherFill:null})}),r&&r.selected(n),n}var n={union:function(e,t){return r(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return r(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return r(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return r(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return r(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};t.exports=n}),nn=c((e,t)=>{var r={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a{var r,n=Jr(),a=Kr(),i=en(),o=tn(),l=rn(),s=nn(),c=!1,u=a();function d(e,t,n){var a=r.segments(e),i=r.segments(t),o=n(r.combine(a,i));return r.polygon(o)}r={buildLog:function(e){return!0===e?c=n():!1===e&&(c=!1),!1!==c&&c.list},epsilon:function(e){return u.epsilon(e)},segments:function(e){var t=i(!0,u,c);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:i(!1,u,c).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,c),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,c),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,c),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,c),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,c),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:o(e.segments,u,c),inverted:e.inverted}},polygonFromGeoJSON:function(e){return s.toPolygon(r,e)},polygonToGeoJSON:function(e){return s.fromPolygon(r,u,e)},union:function(e,t){return d(e,t,r.selectUnion)},intersect:function(e,t){return d(e,t,r.selectIntersect)},difference:function(e,t){return d(e,t,r.selectDifference)},differenceRev:function(e,t){return d(e,t,r.selectDifferenceRev)},xor:function(e,t){return d(e,t,r.selectXor)}},"object"==typeof window&&(window.PolyBool=r),t.exports=r}),on=c((e,t)=>{t.exports=function(e,t,r,n){var a=e[0],i=e[1],o=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var l=n-r,s=0,c=l-1;si!=h>i&&a<(f-u)*(i-d)/(h-d)+u&&(o=!o)}return o}}),ln=c((e,t)=>{var r=we().dot,n=y().BADNUM,a=t.exports={};a.tester=function(e){var t,r=e.slice(),a=r[0][0],i=a,o=r[0][1],l=o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),t=1;ti||c===n||cl||t&&s(e))}:function(e,t){var s=e[0],c=e[1];if(s===n||si||c===n||cl)return!1;var u,d,f,h,p,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(d,g)||c>Math.max(f,v)))if(cu||Math.abs(r(o,f))>a)return!0;return!1},a.filter=function(e,t){var r=[e[0]],n=0,i=0;function o(o){e.push(o);var l=r.length,s=n;r.splice(i+1);for(var c=s+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}}),sn=c((e,t)=>{t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}),cn=c((e,t)=>{var r=an(),n=on(),a=Ne(),i=Ut().dashStyle,o=F(),l=Ar(),s=qt().makeEventData,c=Er(),u=c.freeMode,d=c.rectMode,f=c.drawMode,h=c.openMode,p=c.selectMode,m=Rr(),g=Nr(),v=zr(),y=ft().clearOutline,x=Dr(),b=x.handleEllipse,_=x.readPaths,w=Ir().newShapes,T=Pr(),k=Zr().activateLastSelection,M=et(),A=M.sorterAsc,E=ln(),S=Ve(),C=dt().getFromId,L=Sr(),O=Xr().redrawReglTraces,D=sn(),I=D.MINSELECT,P=E.filter,N=E.tester,R=Or(),z=R.p2r,B=R.axValue,j=R.getTransform;function H(e){return void 0!==e.subplot}function q(e,t,r,n,a,i,o){var l,s,c,u,d,f,p,m,g,y=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(y)){$(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n0?function(e,t){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a1||(n+=t.selectedpoints.length)>1))return!1;return 1===n}(l)&&(f=J(_))){for(o&&o.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(e){return e._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,l=f(r),s=p(r);if(l||s){var c,u,d=o.selectAll(".select-outline-"+n.id);d&&i._fullLayout._outlining&&(l&&(c=w(d,e)),c&&a.call("_guiRelayout",i,{shapes:c}),s&&!H(e)&&(u=T(d,e)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:u}).then(function(){t&&k(i)})),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function G(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var a,i,o,l=[],s=t.map(G),c=r.map(G);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function K(e,t,r){var n,i;for(n=0;n-1&&t;if(!i&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ce(te);ue([C(e,ne,"x"),C(e,he,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&de(e,Q),h._reselect=!1}if(!i&&h._deselect){var me=h._deselect;(function(e,t,r){for(var n=0;n=0)k._fullLayout._deactivateShape(k);else if(!x){var r=A.clickmode;S.done(Ae).then(function(){if(S.clear(Ae),2===e){for(be.remove(),J=0;J-1&&q(t,k,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&de(k,void 0);l.click(k,t,O.id)}).catch(M.error)}},n.doneFn=function(){ke.remove(),S.done(Ae).then(function(){S.clear(Ae),!E&&Z&&n.selectionDefs&&(Z.subtract=xe,n.selectionDefs.push(Z),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,G)),(E||x)&&W(n,E),n.doneFnCompleted&&n.doneFnCompleted(Ee),_&&de(k,ie)}).catch(M.error)}},clearOutline:y,clearSelectionsCache:W,selectOnClick:q}}),un=c((e,t)=>{t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}),dn=c((e,t)=>{t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}}),fn=c((e,t)=>{var r=un(),n=L(),a=ut(),i=ct().templatedArray;dn(),t.exports=i("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:n({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:n({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}),hn=c((e,t)=>{t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}),pn=c((e,t)=>{t.exports=function(e){return{valType:"color",editType:"style",anim:!0}}}),mn=c((e,t)=>{var r=_t().axisHoverFormat,{hovertemplateAttrs:n,texttemplateAttrs:a,templatefallbackAttrs:i}=Se(),o=kt(),l=L(),s=Ae().dash,c=Ae().pattern,u=Ut(),d=hn(),f=C().extendFlat,h=pn();t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:r("x"),yhoverformat:r("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:a(),texttemplatefallback:i({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:n({},{keys:d.eventDataKeys}),hovertemplatefallback:i(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:f({},s,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:h(!0),fillgradient:f({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:f({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:f({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:f({},s,{arrayOk:!0}),editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:l({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}),gn=c((e,t)=>{var r=fn(),n=mn().line,a=Ae().dash,i=C().extendFlat,o=Me().overrideAll,l=ct().templatedArray;dn(),t.exports=o(l("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:i({},r.xref,{}),yref:i({},r.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:n.color,width:i({},n.width,{min:1,dflt:1}),dash:i({},a,{dflt:"dot"})}}),"arraydraw","from-root")}),vn=c((e,t)=>{var r=et(),n=Zt(),a=Ot(),i=gn(),o=Rr();function l(e,t,a){function l(n,a){return r.coerce(e,t,i,n,a)}var s=l("path"),c="path"!==l("type",s?"path":"rect");c&&delete t.path,l("opacity"),l("line.color"),l("line.width"),l("line.dash");for(var u=["x","y"],d=0;d<2;d++){var f,h,p,m=u[d],g={_fullLayout:a},v=n.coerceRef(e,t,g,m);if((f=n.getFromId(g,v))._selectionIndices.push(t._index),p=o.rangeToShapePosition(f),h=o.shapePositionToRange(f),c){var y=m+"0",x=m+"1",b=e[y],_=e[x];e[y]=h(e[y],!0),e[x]=h(e[x],!0),n.coercePosition(t,g,l,v,y),n.coercePosition(t,g,l,v,x);var w=t[y],T=t[x];void 0!==w&&void 0!==T&&(t[y]=p(w),t[x]=p(T),e[y]=b,e[x]=_)}}c&&r.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){a(e,t,{name:"selections",handleItemDefaults:l});for(var r=t.selections,n=0;n{t.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}}),xn=c((e,t)=>{var r=Ne(),n=et(),a=dt();t.exports=function(e){return function(t,i){var o=t[e];if(Array.isArray(o))for(var l=r.subplotsRegistry.cartesian,s=l.idRegex,c=i._subplots,u=c.xaxis,d=c.yaxis,f=c.cartesian,h=i._has("cartesian"),p=0;p{var r=Zr(),n=cn();t.exports={moduleType:"component",name:"selections",layoutAttributes:gn(),supplyLayoutDefaults:vn(),supplyDrawNewSelectionDefaults:yn(),includeBasePlot:xn()("selections"),draw:r.draw,drawOne:r.drawOne,reselect:n.reselect,prepSelect:n.prepSelect,clearOutline:n.clearOutline,clearSelectionsCache:n.clearSelectionsCache,selectOnClick:n.selectOnClick}}),_n=c((e,t)=>{var r=f(),n=et(),a=n.numberFormat,i=S(),o=er(),l=Ne(),s=n.strTranslate,c=xt(),u=F(),d=Ut(),h=Ar(),p=Zt(),m=ir(),g=ar(),v=Er(),y=v.selectingOrDrawing,x=v.freeMode,b=yt().FROM_TL,_=Sr(),w=Xr().redrawReglTraces,T=gt(),k=dt().getFromId,M=bn().prepSelect,A=bn().clearOutline,E=bn().selectOnClick,C=Wr(),L=ut(),O=L.MINDRAG,D=L.MINZOOM,I=!0;function P(e,t,r,a){var i=n.ensureSingle(e.draglayer,t,r,function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)});return i.call(m,a),i.node()}function N(e,t,n,a,i,o,l){var s=P(e,"rect",t,n);return r.select(s).call(d.setRect,a,i,o,l),s}function R(e,t){for(var r=0;r=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function H(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",s(r,n)).attr("d",a+"Z")}function q(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",s(t,r)).attr("d","M0,0Z")}function Y(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),V(e,t,a,i)}function V(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function U(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function $(e){I&&e.data&&e._context.showTips&&(n.notifier(n._(e,"Double-click to zoom back out"),"long"),I=!1)}function W(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,D)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function G(e,t,r,a,i){for(var o,l,s,c,u=!1,d={},f={},h=(i||{}).xaHash,p=(i||{}).yaHash,m=0;m=0)o._fullLayout._deactivateShape(o);else{var s=o._fullLayout.clickmode;if(U(o),2===n&&!ve&&function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];ae&&(r=r.concat(V)),ie&&(r=r.concat(J)),ne.xaxes&&(r=r.concat(ne.xaxes)),ne.yaxes&&(r=r.concat(ne.yaxes));var n,a,i={};if("reset+autosize"===t)for(t="autosize",a=0;a-1&&E(i,o,V,J,t.id,Oe),s.indexOf("event")>-1&&h.click(o,i,t.id);else if(1===n&&ve){var u=m?I:S,d="s"===m||"w"===v?0:1,f=u._name+".range["+d+"]",p=function(e,t){var r,n=e.range[t],i=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(u,d),g="left",y="middle";if(u.fixedrange)return;m?(y="n"===m?"top":"bottom","right"===u.side&&(g="right")):"e"===v&&(g="right"),o._context.showAxisRangeEntryBoxes&&r.select(be).call(c.makeEditable,{gd:o,immediate:!0,background:o._fullLayout.paper_bgcolor,text:String(p),fill:u.tickfont?u.tickfont.color:"#444",horizontalAlign:g,verticalAlign:y}).on("edit",function(e){var t=u.d2r(e);void 0!==t&&l.call("_guiRelayout",o,f,t)})}}}function Pe(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),a=Math.max(0,Math.min(te,pe*r+we)),i=Math.abs(n-_e),o=Math.abs(a-we);function l(){Ee="",Te.r=Te.l,Te.t=Te.b,Ce.attr("d","M0,0Z")}if(Te.l=Math.min(_e,n),Te.r=Math.max(_e,n),Te.t=Math.min(we,a),Te.b=Math.max(we,a),re.isSubplotConstrained)i>D||o>D?(Ee="xy",i/ee>o/te?(o=i*te/ee,we>a?Te.t=we-o:Te.b=we+o):(i=o*ee/te,_e>n?Te.l=_e-i:Te.r=_e+i),Ce.attr("d",W(Te))):l();else if(ne.isSubplotConstrained)if(i>D||o>D){Ee="xy";var s=Math.min(Te.l/ee,(te-Te.b)/te),c=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=s*ee,Te.r=c*ee,Te.b=(1-s)*te,Te.t=(1-c)*te,Ce.attr("d",W(Te))}else l();else!ie||o0){var u;if(ne.isSubplotConstrained||!ae&&1===ie.length){for(u=0;u1&&(void 0!==i.maxallowed&&le===(i.range[0]1&&(void 0!==o.maxallowed&&se===(o.range[0]{var t=f(),r=Ar(),n=ar(),a=ir(),i=_n().makeDragBox,o=ut().DRAGGERSIZE;e.initInteractions=function(a){var l=a._fullLayout;if(a._context.staticPlot)t.select(a).selectAll(".drag").remove();else if(l._has("cartesian")||l._has("splom")){Object.keys(l._plots||{}).sort(function(e,t){if((l._plots[e].mainplot&&!0)===(l._plots[t].mainplot&&!0)){var r=e.split("y"),n=t.split("y");return r[0]===n[0]?Number(r[1]||1)-Number(n[1]||1):Number(r[0]||1)-Number(n[0]||1)}return l._plots[e].mainplot?1:-1}).forEach(function(e){var t=l._plots[e],s=t.xaxis,c=t.yaxis;if(!t.mainplot){var u=i(a,t,s._offset,c._offset,s._length,c._length,"ns","ew");u.onmousemove=function(t){a._fullLayout._rehover=function(){a._fullLayout._hoversubplot===e&&a._fullLayout._plots[e]&&r.hover(a,t,e)},r.hover(a,t,e),a._fullLayout._lasthover=u,a._fullLayout._hoversubplot=e},u.onmouseout=function(e){a._dragging||(a._fullLayout._hoversubplot=null,n.unhover(a,e))},a._context.showAxisDragHandles&&(i(a,t,s._offset-o,c._offset-o,o,o,"n","w"),i(a,t,s._offset+s._length,c._offset-o,o,o,"n","e"),i(a,t,s._offset-o,c._offset+c._length,o,o,"s","w"),i(a,t,s._offset+s._length,c._offset+c._length,o,o,"s","e"))}if(a._context.showAxisDragHandles){if(e===s._mainSubplot){var d=s._mainLinePosition;"top"===s.side&&(d-=o),i(a,t,s._offset+.1*s._length,d,.8*s._length,o,"","ew"),i(a,t,s._offset,d,.1*s._length,o,"","w"),i(a,t,s._offset+.9*s._length,d,.1*s._length,o,"","e")}if(e===c._mainSubplot){var f=c._mainLinePosition;"right"!==c.side&&(f-=o),i(a,t,f,c._offset+.1*c._length,o,.8*c._length,"ns",""),i(a,t,f,c._offset+.9*c._length,o,.1*c._length,"s",""),i(a,t,f,c._offset,o,.1*c._length,"n","")}}});var s=l._hoverlayer.node();s.onmousemove=function(e){e.target=a._fullLayout._lasthover,r.hover(a,e,l._hoversubplot)},s.onclick=function(e){e.target=a._fullLayout._lasthover,r.click(a,e)},s.onmousedown=function(e){a._fullLayout._lasthover.onmousedown(e)},e.updateFx(a)}},e.updateFx=function(e){var t=e._fullLayout,r="pan"===t.dragmode?"move":"crosshair";a(t._draggers,r)}}),Tn=c((e,t)=>{var r=Ne();t.exports=function(e){for(var t,n,a=r.layoutArrayContainers,i=r.layoutArrayRegexes,o=e.split("[")[0],l=0;l{var t=b(),r=V(),n=Y(),a=ze().sorterAsc,i=Ne();e.containerArrayMatch=Tn();var o=e.isAddVal=function(e){return"add"===e||t(e)},l=e.isRemoveVal=function(e){return null===e||"remove"===e};e.applyContainerArrayChanges=function(e,t,s,c,u){var d=t.astr,f=i.getComponentMethod(d,"supplyLayoutDefaults"),h=i.getComponentMethod(d,"draw"),p=i.getComponentMethod(d,"drawOne"),m=c.replot||c.recalc||f===r||h===r,g=e.layout,v=e._fullLayout;if(s[""]){Object.keys(s).length>1&&n.warn("Full array edits are incompatible with other edits",d);var y=s[""][""];if(l(y))t.set(null);else{if(!Array.isArray(y))return n.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!m&&(f(g,v),h(e),!0)}var x,b,_,w,T,k,M,A,E=Object.keys(s).map(Number).sort(a),S=t.get(),C=S||[],L=u(v,d).get(),O=[],D=-1,I=C.length;for(x=0;xC.length-(M?0:1))n.warn("index out of range",d,_);else if(void 0!==k)T.length>1&&n.warn("Insertion & removal are incompatible with edits to the same index.",d,_),l(k)?O.push(_):M?("add"===k&&(k={}),C.splice(_,0,k),L&&L.splice(_,0,{})):n.warn("Unrecognized full object edit value",d,_,k),-1===D&&(D=_);else for(b=0;b=0;x--)C.splice(O[x],1),L&&L.splice(O[x],1);if(C.length?S||t.set(C):t.set(null),m)return!1;if(f(g,v),p!==r){var P;if(-1===D)P=E;else{for(I=Math.max(C.length,I),P=[],x=0;x=D);x++)P.push(_);for(x=D;x{var t=v(),r=Ne(),n=et(),a=gt(),i=dt(),o=F(),l=i.cleanId,s=i.getFromTrace,c=r.traceIs,u=["x","y","z"];function d(e,t,r=!1){var n=e[t],a=t.charAt(0);r&&Array.isArray(n)||n&&"paper"!==n&&(e[t]=l(n,a,!0))}function f(e){if(!n.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,("string"==typeof t||"number"==typeof t)&&String(t)}function h(e,t,r,n){if(r&&!n)return e;if(n&&!r||!e.trim())return t;if(!t.trim())return e;var a,i=Math.min(e.length,t.length);for(a=0;a0&&n.log("Clearing previous rejected promises from queue."),e._promises=[]},e.cleanLayout=function(t){var r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var i=(a.subplotsRegistry.cartesian||{}).attrRegex,s=((a.subplotsRegistry.polar||{}).attrRegex,(a.subplotsRegistry.ternary||{}).attrRegex,(a.subplotsRegistry.gl3d||{}).attrRegex,Object.keys(t));for(r=0;r3?(x.x=1.02,x.xanchor="left"):x.x<-2&&(x.x=-.02,x.xanchor="right"),x.y>3?(x.y=1.02,x.yanchor="bottom"):x.y<-2&&(x.y=-.02,x.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),o.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var i=0;i0)return e.slice(0,t)}e.hasParent=function(e,t){for(var r=y(t);r;){if(r in e)return!0;r=y(r)}return!1},e.clearAxisTypes=function(e,t,r){for(var a=0;a{let r=(...e)=>e.every(e=>n.isPlainObject(e))||e.every(e=>Array.isArray(e));if([e,t].every(e=>Array.isArray(e))){if(e.length!==t.length)return!1;for(let n=0;nn.isPlainObject(e))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let a=e[n],i=t[n];if(!(a===i||r(a,i)&&x(a,i)))return!1}return!0}return!1};e.collectionsAreEqual=x}),An=c(e=>{var t=f(),r=v(),n=nt(),a=et(),i=a.nestedProperty,o=it(),l=ot(),s=Ne(),c=st(),u=gt(),d=Zt(),h=Kt(),p=wt(),m=Ut(),g=F(),y=wn().initInteractions,x=vt(),b=bn().clearOutline,_=H().dfltConfig,w=kn(),T=Mn(),k=Xr(),M=Me(),A=ut().AX_NAME_PATTERN,E=0;function S(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function C(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){a.error(e)}}function L(e,t){C(e,g.combine(t,"white"))}function O(e,r){if(!e._context){e._context=a.extendDeep({},_);var i=t.select("base");e._context._baseUrl=i.size()&&i.attr("href")?window.location.href.split("#")[0]:""}var o,l,s,c=e._context;if(r){for(l=Object.keys(r),o=0;o=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function P(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),I(e,t,"currentIndices"),void 0!==r&&!Array.isArray(r)&&(r=[r]),void 0!==r&&I(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function N(e,t,n,o,l){!function(e,t,r,n){var i=a.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var o in I(e,r,"indices"),t){if(!Array.isArray(t[o])||t[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==t[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}(e,t,n,o);for(var s=function(e,t,n,o){var l,s,c,u,d,f=a.isPlainObject(o),h=[];for(var p in Array.isArray(n)||(n=[n]),n=D(n,e.data.length-1),t)for(var m=0;m0&&"string"!=typeof I.parts[N];)N--;var R=I.parts[N],F=I.parts[N-1]+"."+R,z=I.parts.slice(0,N).join("."),H=i(e.layout,z).get(),q=i(u,z).get(),Y=I.get();if(void 0!==P){k[D]=P,E[D]="reverse"===R?P:B(Y);var V=c.getLayoutValObject(u,I.parts);if(V&&V.impliedEdits&&null!==P)for(var U in V.impliedEdits)S(a.relativeAttr(D,U),V.impliedEdits[U]);if(-1!==["width","height"].indexOf(D))if(P){S("autosize",null);var $="height"===D?"width":"height";S($,u[$])}else u[D]=e._initialAutoSize[D];else if("autosize"===D)S("width",P?null:u.width),S("height",P?null:u.height);else if(F.match(W))O(F),i(u,z+"._inputRange").set(null);else if(F.match(G)){O(F),i(u,z+"._inputRange").set(null);var Z=i(u,z).get();Z._inputDomain&&(Z._input.domain=Z._inputDomain.slice())}else F.match(X)&&i(u,z+"._inputDomain").set(null);if("type"===R){C=H;var K="linear"===q.type&&"log"===P,Q="log"===q.type&&"linear"===P;if(K||Q){if(C&&C.range)if(q.autorange)K&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var ee=C.range[0],te=C.range[1];K?(ee<=0&&te<=0&&S(z+".autorange",!0),ee<=0?ee=te/1e6:te<=0&&(te=ee/1e6),S(z+".range[0]",Math.log(ee)/Math.LN10),S(z+".range[1]",Math.log(te)/Math.LN10)):(S(z+".range[0]",Math.pow(10,ee)),S(z+".range[1]",Math.pow(10,te)))}else S(z+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete u[I.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(e,q,P,S),s.getComponentMethod("images","convertCoords")(e,q,P,S)}else S(z+".autorange",!0),S(z+".range",null);i(u,z+"._inputRange").set(null)}else if(R.match(A)){var re=i(u,D).get(),ne=(P||{}).type;(!ne||"-"===ne)&&(ne="linear"),s.getComponentMethod("annotations","convertCoords")(e,re,ne,S),s.getComponentMethod("images","convertCoords")(e,re,ne,S)}var ae=w.containerArrayMatch(D);if(ae){r=ae.array,n=ae.index;var ie=ae.property,oe=V||{editType:"calc"};""!==n&&""===ie&&(w.isAddVal(P)?E[D]=null:w.isRemoveVal(P)?E[D]=(i(l,r).get()||[])[n]:a.warn("unrecognized full object value",t)),M.update(_,oe),v[r]||(v[r]={});var le=v[r][n];le||(le=v[r][n]={}),le[ie]=P,delete t[D]}else"reverse"===R?(H.range?H.range.reverse():(S(z+".autorange",!0),H.range=[1,0]),q.autorange?_.calc=!0:_.plot=!0):("dragmode"===D&&(!1===P&&!1!==Y||!1!==P&&!1===Y)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===D&&("lasso"===P||"select"===P)&&"lasso"!==Y&&"select"!==Y?_.plot=!0:V?M.update(_,V):_.calc=!0,I.set(P))}}for(r in v)w.applyContainerArrayChanges(e,h(l,r),v[r],_,h)||(_.plot=!0);for(var se in L){var ce=(C=d.getFromId(e,se))&&C._constraintGroup;if(ce)for(var ue in _.calc=!0,ce)L[ue]||(d.getFromId(e,ue)._constraintShrinkable=!0)}(J(e)||t.height||t.width)&&(_.plot=!0);var de=u.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=i(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ae(e,t){for(var r=0;r=i.length?i[0]:i[e]:i}function s(e){return Array.isArray(o)?e>=o.length?o[0]:o[e]:o}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise(function(o,d){var f=0;function h(e){return Array.isArray(i)?f>=i.length?e.transitionOpts=i[f]:e.transitionOpts=i[0]:e.transitionOpts=i,f++,e}var p,m,g=[],v=null==t,y=Array.isArray(t);if(v||y||!a.isPlainObject(t)){if(v||-1!==["string","number"].indexOf(typeof t))for(p=0;p0&&__)&&w.push(m);g=w}}g.length>0?function(t){if(0!==t.length){for(var a=0;an._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,u.transition(e,t.frame.data,t.frame.layout,T.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then(function(){t.onComplete&&t.onComplete()}),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};t()}()}}(g):(e.emit("plotly_animated"),o())})},e.addFrames=function(e,t,r){if(e=a.getGraphDiv(e),null==t)return Promise.resolve();if(!a.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,o,s,c=e._transitionData._frames,d=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var f=c.length+2*t.length,h=[],p={};for(n=t.length-1;n>=0;n--)if(a.isPlainObject(t[n])){var m=t[n].name,g=(d[m]||p[m]||{}).name,v=t[n].name,y=d[g]||p[g];g&&v&&"number"==typeof v&&y&&E<5&&(E++,a.warn('addFrames: overwriting frame "'+(d[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===E&&a.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},h.push({frame:u.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}h.sort(function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"==typeof(i=h[n].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;d[i.name="frame "+e._transitionData._counter++];);if(d[i.name]){for(o=0;o=0;r--)n=t[r],o.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var c=u.modifyFrames,d=u.modifyFrames,f=[e,s],h=[e,o];return l&&l.add(e,c,f,d,h),u.modifyFrames(e,o)},e.addTraces=function t(r,n,i){r=a.getGraphDiv(r);var o,s,c=[],u=e.deleteTraces,d=t,f=[r,c],h=[r,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r[e,t._ev.listeners(e)]);d=e.newPlot(t,r,n,o).then(()=>{for(let[e,r]of a)r.forEach(r=>t.on(e,r));return e.react(t,r,n,o)})}else{t.data=r||[],T.cleanData(t.data),t.layout=n||{},T.cleanLayout(t.layout),function(e,t,r,n){var o,l,s,c,u,d,f,h,p,m,g=n._preGUI,v=[],y={},x={};for(o in g){if(u=re(o,ee)){if(p=u.head,m=u.tail,l=u.attr||p+".uirevision",(c=(s=i(n,l).get())&&ne(l,t))&&c===s){if(null===(d=g[o])&&(d=void 0),oe(h=(f=i(t,o)).get(),d)){void 0===h&&"autorange"===m&&v.push(p),f.set(B(i(n,o).get()));continue}if("autorange"===m||"range["===m.slice(0,6)){var b=g[p+".range[0]"],_=g[p+".range[1]"],w=g[p+".autorange"];if(w||null===w&&null===b&&null===_){if(!(p in y)){var T=i(t,p).get();y[p]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(y[p]){f.set(B(i(n,o).get()));continue}}}}}else a.warn("unrecognized GUI edit: "+o);delete g[o],u&&"range["===u.tail.slice(0,6)&&(x[u.head]=1)}for(var k=0;k(m||t.emit("plotly_react",{config:o,data:r,layout:n}),t))},e.redraw=function(t){if(t=a.getGraphDiv(t),!a.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);return T.cleanData(t.data),T.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then(function(){return t.emit("plotly_redraw"),t})},e.relayout=V,e.restyle=z,e.setPlotConfig=function(e){return a.extendFlat(_,e)},e.update=K,e._guiRelayout=Q(V),e._guiRestyle=Q(z),e._guiUpdate=Q(K),e._storeDirectGUIEdit=function(e,t,r){for(var n in r)q(n,i(e,n).get(),r[n],t)}}),En=c(e=>{var t=Ne();e.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod("colorbar","draw")(e)}},e.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},e.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var r=window.URL||window.webkitURL;e.createObjectURL=function(e){return r.createObjectURL(e)},e.revokeObjectURL=function(e){return r.revokeObjectURL(e)},e.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a{var r=f(),n=(et(),Ut()),a=F(),i=(vt(),/"/g),o="TOBESTRIPPED",l=new RegExp('("'+o+")|("+o+'")',"g");t.exports=function(e,t,s){var c,u=e._fullLayout,d=u._paper,f=u._toppaper,h=u.width,p=u.height;d.insert("rect",":first-child").call(n.setRect,0,0,h,p).call(a.fill,u.paper_bgcolor);var m=u._basePlotModules||[];for(c=0;c")?"":t.html(e).text()});return t.remove(),n}(b),(b=b.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(l,"'")}}),Cn=c((e,t)=>{var r=et(),n=at().EventEmitter,a=En();t.exports=function(e){var t=e.emitter||new n,i=new Promise(function(n,i){var o,l,s=window.Image,c=e.svg,u=e.format||"png",d=e.canvas,f=e.scale||1,h=e.width||300,p=e.height||150,m=f*h,g=f*p,v=d.getContext("2d",{willReadFrequently:!0}),y=new s;"svg"===u||r.isSafari()?l=a.encodeSVG(c):(o=a.createBlob(c,"svg"),l=a.createObjectURL(o)),d.width=m,d.height=g,y.onload=function(){var r;switch(o=null,a.revokeObjectURL(l),"svg"!==u&&v.drawImage(y,0,0,m,g),u){case"jpeg":r=d.toDataURL("image/jpeg");break;case"png":r=d.toDataURL("image/png");break;case"webp":r=d.toDataURL("image/webp");break;case"svg":r=l;break;default:var s="Image format is not jpeg, png, svg or webp.";if(i(new Error(s)),!e.promise)return t.emit("error",s)}n(r),e.promise||t.emit("success",r)},y.onerror=function(r){if(o=null,a.revokeObjectURL(l),i(r),!e.promise)return t.emit("error",r)},y.src=l});return e.promise?i:t}}),Ln=c((e,t)=>{var r=v(),n=An(),a=gt(),i=et(),o=En(),l=Sn(),s=Cn(),c=u().version,d={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var u,f,h,p;function m(e){return!(e in t)||i.validate(t[e],d[e])}if(t=t||{},i.isPlainObject(e)?(u=e.data||[],f=e.layout||{},h=e.config||{},p={}):(e=i.getGraphDiv(e),u=i.extendDeep([],e.data),f=i.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+i.join2(d.format.values,", "," or ")+".");var g={};function v(e,r){return i.coerce(t,g,d,e,r)}var y=v("format"),x=v("width"),b=v("height"),_=v("scale"),w=v("setBackground"),T=v("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var M=i.extendFlat({},f);x?M.width=x:null===t.width&&r(p.width)&&(M.width=p.width),b?M.height=b:null===t.height&&r(p.height)&&(M.height=p.height);var A=i.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),E=o.getRedrawFunc(k);function S(){return new Promise(function(e){setTimeout(e,o.getDelay(k._fullLayout))})}function C(){return new Promise(function(e,t){var r=l(k,y,_),u=k._fullLayout.width,d=k._fullLayout.height;function f(){n.purge(k),document.body.removeChild(k)}if("full-json"===y){var h=a.graphJson(k,!1,"keepdata","object",!0,!0);return h.version=c,h=JSON.stringify(h),f(),e(T?h:o.encodeJSON(h))}if(f(),"svg"===y)return e(T?r:o.encodeSVG(r));var p=document.createElement("canvas");p.id=i.randstr(),s({format:y,width:u,height:d,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)})}return new Promise(function(e,t){n.newPlot(k,u,M,A).then(E).then(S).then(C).then(function(t){e(function(e){return T?e.replace(o.IMAGE_URL_PREFIX,""):e}(t))}).catch(function(e){t(e)})})}}),On=c((e,t)=>{var r=et(),n=gt(),a=st(),i=H().dfltConfig,o=r.isPlainObject,l=Array.isArray,s=r.isArrayOrTypedArray;function c(e,t,n,a,i,u){u=u||[];for(var d=Object.keys(e),m=0;mx.length&&a.push(f("unused",i,v.concat(x.length)));var M,A,E,S,C,L=x.length,O=Array.isArray(k);if(O&&(L=Math.min(L,k.length)),2===b.dimensions)for(A=0;Ax[A].length&&a.push(f("unused",i,v.concat(A,x[A].length)));var D=x[A].length;for(M=0;M<(O?Math.min(D,k[A].length):D);M++)E=O?k[A][M]:k,S=y[A][M],C=x[A][M],r.validate(S,E)?C!==S&&C!==+S&&a.push(f("dynamic",i,v.concat(A,M),S,C)):a.push(f("value",i,v.concat(A,M),S))}else a.push(f("array",i,v.concat(A),y[A]));else for(A=0;A1&&h.push(f("object","layout"))),n.supplyDefaults(p);for(var m=p._fullData,g=s.length,v=0;v{var r=et(),n=En();t.exports=function(e,t,a){var i=document.createElement("a"),o="download"in i;return new Promise(function(l,s){var c,u;if(o)return c=n.createBlob(e,a),u=n.createObjectURL(c),i.href=u,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),n.revokeObjectURL(u),c=null,l(t);if(r.isSafari()){var d="svg"===a?",":";base64,";return n.octetStream(d+encodeURIComponent(e)),l(t)}s(new Error("download error"))})}}),In=c((e,t)=>{var r=et(),n=Ln(),a=Dn();En(),t.exports=function(e,t){var i;return r.isPlainObject(e)||(i=r.getGraphDiv(e)),(t=t||{}).format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(r,o){i&&i._snapshotInProgress&&o(new Error("Snapshotting already in progress.")),i&&(i._snapshotInProgress=!0);var l=n(e,t),s=t.filename||e.fn||"newplot";s+="."+t.format.replace("-","."),l.then(function(e){return i&&(i._snapshotInProgress=!1),a(e,s,t.format)}).then(function(e){r(e)}).catch(function(e){i&&(i._snapshotInProgress=!1),o(e)})})}}),Pn=c(e=>{var t=et(),r=t.isPlainObject,n=st(),a=gt(),i=P(),o=ct(),l=H().dfltConfig;function s(e,n){e=t.extendDeep({},e);var a,i,l=Object.keys(e).sort();function u(t,n,a){if(r(n)&&r(t))s(t,n);else if(Array.isArray(n)&&Array.isArray(t)){var l=o.arrayTemplater({_template:e},a);for(i=0;iT?d.push({code:"unused",traceType:y,templateCount:w,dataCount:T}):T>w&&d.push({code:"reused",traceType:y,templateCount:w,dataCount:T})}}else d.push({code:"data"});if(function e(t,n){for(var a in t)if("_"!==a.charAt(0)){var i=t[a],o=h(t,a,n);r(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&d.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&p(i)&&e(i,o)}}({data:g,layout:f},""),d.length)return d.map(m)}}),Nn=c(e=>{var t=An();e._doPlot=t._doPlot,e.newPlot=t.newPlot,e.restyle=t.restyle,e.relayout=t.relayout,e.redraw=t.redraw,e.update=t.update,e._guiRestyle=t._guiRestyle,e._guiRelayout=t._guiRelayout,e._guiUpdate=t._guiUpdate,e._storeDirectGUIEdit=t._storeDirectGUIEdit,e.react=t.react,e.extendTraces=t.extendTraces,e.prependTraces=t.prependTraces,e.addTraces=t.addTraces,e.deleteTraces=t.deleteTraces,e.moveTraces=t.moveTraces,e.purge=t.purge,e.addFrames=t.addFrames,e.deleteFrames=t.deleteFrames,e.animate=t.animate,e.setPlotConfig=t.setPlotConfig;var r=Te().getGraphDiv,n=Br().eraseActiveShape;e.deleteActiveShape=function(e){return n(r(e))},e.toImage=Ln(),e.validate=On(),e.downloadImage=In();var a=Pn();e.makeTemplate=a.makeTemplate,e.validateTemplate=a.validateTemplate}),Rn=c((e,t)=>{var r=et(),n=Ne();t.exports=function(e,t,a,i){var o,l=i("x"),s=i("y");if(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a),l){var c=r.minRowLength(l);s?o=Math.min(c,r.minRowLength(s)):(o=c,i("y0"),i("dy"))}else{if(!s)return 0;o=r.minRowLength(s),i("x0"),i("dx")}return t._length=o,o}}),Fn=c((e,t)=>{var r=et().dateTick0,n=y().ONEWEEK;function a(e,t){return r(t,e%n===0?1:0)}t.exports=function(e,t,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,t.xcalendar)),n("xperiodalignment"))}if(i.y){var l=n("yperiod");l&&(n("yperiod0",a(l,t.ycalendar)),n("yperiodalignment"))}}}),zn=c((e,t)=>{var r=["orientation","groupnorm","stackgaps"];t.exports=function(e,t,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var c=s[o],u=!1;c?c.traces.push(t):(c=s[o]={traceIndices:[],traces:[t]},u=!0);for(var d={orientation:t.x&&!t.y?"h":"v"},f=0;f{var r=F(),n=bt().hasColorscale,a=Nt(),i=jt();t.exports=function(e,t,o,l,s,c={}){var u=i.isBubble(e),d=(e.line||{}).color;d&&(o=d),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),c.noAngle||(s("marker.angle"),c.noAngleRef||s("marker.angleref"),c.noStandOff||s("marker.standoff")),s("marker.color",o),n(e,"marker")&&a(e,t,l,s,{prefix:"marker.",cLetter:"c"}),c.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),c.noLine||(s("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?r.background:r.defaultLine),n(e,"marker.line")&&a(e,t,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",u?1:0),c.noLineDash||s("marker.line.dash")),u&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),c.gradient&&"none"!==s("marker.gradient.type")&&s("marker.gradient.color")}}),jn=c((e,t)=>{var r=et().isArrayOrTypedArray,n=bt().hasColorscale,a=Nt();t.exports=function(e,t,i,o,l,s){s||(s={});var c=(e.marker||{}).color;c&&c._inputArray&&(c=c._inputArray),l("line.color",i),n(e,"line")?a(e,t,o,l,{prefix:"line.",cLetter:"c"}):l("line.color",!r(c)&&c||i),l("line.width"),s.noDash||l("line.dash"),s.backoff&&l("line.backoff")}}),Hn=c((e,t)=>{t.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}}),qn=c((e,t)=>{var r=et();t.exports=function(e,t,n,a,i){i=i||{},a("textposition"),r.coerceFont(a,"textfont",i.font||n.font,i),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}}),Yn=c((e,t)=>{var r=F(),n=et().isArrayOrTypedArray;t.exports=function(e,t,a,i,o){o||(o={});var l,s=!1;if(t.marker){var c=t.marker.color,u=(t.marker.line||{}).color;c&&!n(c)?s=c:u&&!n(u)&&(s=u)}if(o.moduleHasFillgradient&&"none"!==i("fillgradient.type")){i("fillgradient.start"),i("fillgradient.stop");var d=i("fillgradient.colorscale");d&&(l=function(e){for(var t=r.interpolate(e[0][1],e[1][1],.5),n=2;n{var r=et(),n=Ne(),a=mn(),i=hn(),o=jt(),l=Rn(),s=Fn(),c=zn(),u=Bn(),d=jn(),f=Hn(),h=qn(),p=Yn(),m=et().coercePattern;t.exports=function(e,t,g,v){function y(n,i){return r.coerce(e,t,a,n,i)}var x=l(e,t,v,y);if(x||(t.visible=!1),t.visible){s(e,t,v,y),y("xhoverformat"),y("yhoverformat"),y("zorder");var b=c(e,t,v,y);"group"===v.scattermode&&void 0===t.orientation&&y("orientation","v");var _=!b&&x{var r=Gr().getAxisGroup;t.exports=function(e,t,n,a,i){var o=t.orientation,l=t[{v:"x",h:"y"}[o]+"axis"],s=r(n,l)+o,c=n._alignmentOpts||{},u=a("alignmentgroup"),d=c[s];d||(d=c[s]={});var f=d[u];f?f.traces.push(t):f=d[u]={traces:[t],alignmentIndex:Object.keys(d).length,offsetGroups:{}};var h=a("offsetgroup")||"",p=f.offsetGroups,m=p[h];t._offsetIndex=0,("group"!==i||h)&&(m||(m=p[h]={offsetIndex:Object.keys(p).length}),t._offsetIndex=m.offsetIndex)}}),$n=c((e,t)=>{var r=et(),n=Un(),a=mn();t.exports=function(e,t){var i,o,l,s=t.scattermode;function c(e){return r.coerce(o._input,o,a,e)}if("group"===t.scattermode)for(l=0;l=0;f--){var h=e[f];if("scatter"===h.type&&h.xaxis===u.xaxis&&h.yaxis===u.yaxis){h.opacity=void 0;break}}}}}}),Wn=c((e,t)=>{var r=et(),n=ht();t.exports=function(e,t){var a,i="group"===t.barmode;"group"===t.scattermode&&(a=i?t.bargap:.2,r.coerce(e,t,n,"scattergap",a))}}),Gn=c((e,t)=>{var r=v(),n=et(),a=n.dateTime2ms,i=n.incrementMonth,o=y().ONEAVGMONTH;t.exports=function(e,t,n,l){if("date"!==t.type)return{vals:l};var s=e[n+"periodalignment"];if(!s)return{vals:l};var c,u=e[n+"period"];if(r(u)){if((u=+u)<=0)return{vals:l}}else if("string"==typeof u&&"M"===u.charAt(0)){var d=+u.substring(1);if(!(d>0&&Math.round(d)===d))return{vals:l};c=d}for(var f=t.calendar,h="start"===s,p="end"===s,m=e[n+"period0"],g=a(m,f)||0,v=[],y=[],x=[],b=l.length,_=0;_M;)k=i(k,-c,f);for(;k<=M;)k=i(k,c,f);T=i(k,-c,f)}else{for(k=g+(w=Math.round((M-g)/u))*u;k>M;)k-=u;for(;k<=M;)k+=u;T=k-u}v[_]=h?T:p?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}}),Xn=c((e,t)=>{var r=bt().hasColorscale,n=zt(),a=jt();t.exports=function(e,t){a.hasLines(t)&&r(t,"line")&&n(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),a.hasMarkers(t)&&(r(t,"marker")&&n(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&n(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}),Zn=c((e,t)=>{var r=et();t.exports=function(e,t){for(var n=0;n{var r=et();t.exports=function(e,t){r.isArrayOrTypedArray(t.selectedpoints)&&r.tagSelected(e,t)}}),Kn=c((e,t)=>{var r=v(),n=et(),a=Zt(),i=Gn(),o=y().BADNUM,l=jt(),s=Xn(),c=Zn(),u=Jn();function d(e,t,r,n,i,o,s){var c=t._length,u=e._fullLayout,d=r._id,f=n._id,h=u._firstScatter[p(t)]===t.uid,g=(m(t,u,r,n)||{}).orientation,v=t.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};s&&(y.ppad=x.ppad=s);var b=c<2||i[0]!==i[c-1]||o[0]!==o[c-1];b&&("tozerox"===v||"tonextx"===v&&(h||"h"===g))?y.tozero=!0:!(t.error_y||{}).visible&&("tonexty"===v||"tozeroy"===v||!l.hasMarkers(t)&&!l.hasText(t))&&(y.padded=!1,y.ppad=0),b&&("tozeroy"===v||"tonexty"===v&&(h||"v"===g))?x.tozero=!0:("tonextx"===v||"tozerox"===v)&&(x.padded=!1),d&&(t._extremes[d]=a.findExtremes(r,i,y)),f&&(t._extremes[f]=a.findExtremes(n,o,x))}function f(e,t){if(l.hasMarkers(e)){var r,i=e.marker,o=1.6*(e.marker.sizeref||1);if(r="area"===e.marker.sizemode?function(e){return Math.max(Math.sqrt((e||0)/o),3)}:function(e){return Math.max((e||0)/o,3)},n.isArrayOrTypedArray(i.size)){var s={type:"linear"};a.setConvert(s);for(var c=s.makeCalcdata(e.marker,"size"),u=new Array(t),d=0;dp&&L[v].gap;)v--;for(x=L[v].s,g=L.length-1;g>v;g--)L[g].s=x;for(;p{t.exports=n;var r=et().distinctVals;function n(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var n=1/0,a=t.posAxis._id.charAt(0),i=[],o=0;o{t.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}),ta=c((e,t)=>{var r=v(),{isArrayOrTypedArray:n}=et(),{BADNUM:a}=y(),i=Ne(),o=Zt(),{getAxisGroup:l}=Gr(),s=Qn(),{TEXTPAD:c}=ea(),{LINE_SPACING:u}=yt(),{BR_TAG_ALL:d}=xt();function f(e,t,i,l,c){if(l.length){var u,d,f,m;switch(function(e,t){var a,i;for(a=0;ad+c||!r(u))}for(var h=0;ha(e))):a(e.text);let i=e.outsidetextfont.size*u*r+c;return{ppadplus:t.some(e=>e.s<0)?i:0,ppadminus:t.some(e=>e.s>=0)?i:0}}return{ppadplus:void 0,ppadminus:void 0}}function w(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,o=e._fullData,l=e.calcdata,s=[],c=[],u=0;u{var r=Kn(),n=ta().setGroupPositions;function a(e,t,r,n,a,i,o){a[n]=!0;var l={i:null,gap:!0,s:0};if(l[o]=r,e.splice(t,0,l),t&&r===e[t-1][o]){var s=e[t-1];l.s=s.s,l.i=s.i,l.gap=s.gap}else i&&(l.s=function(e,t,r,n){var a=e[t-1],i=e[t+1];return i?a?a.s+(i.s-a.s)*(r-a[n])/(i[n]-a[n]):i.s:a.s}(e,t,r,o));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}t.exports=function(e,t){"group"===e._fullLayout.scattermode&&function(e,t){for(var r=t.xaxis,a=t.yaxis,i=e._fullLayout,o=e._fullData,l=e.calcdata,s=[],c=[],u=0;uE[d]&&d{var r=Ut(),n=y(),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,l=i-.5,s=et(),c=s.segmentsIntersect,u=s.constrain,d=hn();t.exports=function(e,t){var n,i,f,h,p,m,g,v,y,x,b,_,w,T,k,M,A,E,S=t.trace||{},C=t.xaxis,L=t.yaxis,O="log"===C.type,D="log"===L.type,I=C._length,P=L._length,N=t.backoff,R=S.marker,F=t.connectGaps,z=t.baseTolerance,B=t.shape,j="linear"===B,H=S.fill&&"none"!==S.fill,q=[],Y=d.minTolerance,V=e.length,U=new Array(V),$=0;function W(r){var n=e[r];if(!n)return!1;var i=t.linearized?C.l2p(n.x):C.c2p(n.x),s=t.linearized?L.l2p(n.y):L.c2p(n.y);if(i===a){if(O&&(i=C.c2p(n.x,!0)),i===a)return!1;D&&s===a&&(i*=Math.abs(C._m*P*(C._m>0?o:l)/(L._m*I*(L._m>0?o:l)))),i*=1e3}if(s===a){if(D&&(s=L.c2p(n.y,!0)),s===a)return!1;s*=1e3}return[i,s]}function G(e,t,r,n){var a=r-e,i=n-t,o=.5-e,l=.5-t,s=a*a+i*i,c=a*o+i*l;if(c>0&&coe||e[1]se)return[u(e[0],ie,oe),u(e[1],le,se)]}function de(e,t){if(e[0]===t[0]&&(e[0]===ie||e[0]===oe)||e[1]===t[1]&&(e[1]===le||e[1]===se))return!0}function fe(e,t,r){return function(n,a){var i=ue(n),o=ue(a),l=[];if(i&&o&&de(i,o))return l;i&&l.push(i),o&&l.push(o);var c=2*s.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);return c&&((i&&o?c>0==i[e]>o[e]?i:o:i||o)[e]+=c),l}}function he(e){var t=e[0],r=e[1],n=t===U[$-1][0],a=r===U[$-1][1];if(!n||!a)if($>1){var i=t===U[$-2][0],o=r===U[$-2][1];n&&(t===ie||t===oe)&&i?o?$--:U[$-1]=e:a&&(r===le||r===se)&&o?i?$--:U[$-1]=e:U[$++]=e}else U[$++]=e}function pe(e){U[$-1][0]!==e[0]&&U[$-1][1]!==e[1]&&he([Q,ee]),he(e),te=null,Q=ee=0}"linear"===B||"spline"===B?ne=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ce[a],o=c(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&Z(o,e)oe?oe:0,K=t[1]se?se:0,J||K){if($)if(te){var r=ne(te,t);r.length>1&&(pe(r[0]),U[$++]=r[1])}else re=ne(U[$-1],t)[0],U[$++]=re;else U[$++]=[J||t[0],K||t[1]];var a=U[$-1];J&&K&&(a[0]!==J||a[1]!==K)?(te&&(Q!==J&&ee!==K?he(Q&&ee?function(e,t){var r=t[0]-e[0],n=(t[1]-e[1])/r;return(e[1]*t[0]-t[1]*e[0])/r>0?[n>0?ie:oe,se]:[n>0?oe:ie,le]}(te,t):[Q||J,ee||K]):Q&&ee&&he([Q,ee])),he([J,K])):Q-J&&ee-K&&he([J||Q,K||ee]),te=t,Q=J,ee=K}else te&&pe(ne(te,t)[0]),U[$++]=t}for(n=0;nX(m,ve))break;f=m,(w=y[0]*v[0]+y[1]*v[1])>b?(b=w,h=m,g=!1):w<_&&(_=w,p=m,g=!0)}if(g?(ge(h),f!==p&&ge(p)):(p!==i&&ge(p),f!==h&&ge(h)),ge(f),n>=e.length||!m)break;ge(m),i=m}}else ge(h)}te&&he([Q||te[0],ee||te[1]]),q.push(U.slice(0,$))}var ye=B.slice(B.length-1);if(N&&"h"!==ye&&"v"!==ye){for(var xe=!1,be=-1,_e=[],we=0;we{var r={tonextx:1,tonexty:1,tonext:1};t.exports=function(e,t,n){var a,i,o,l,s,c={},u=!1,d=-1,f=0,h=-1;for(i=0;i=0?s=h:(s=h=f,f++),s{var r=f(),n=Ne(),a=et(),i=a.ensureSingle,o=a.identity,l=Ut(),s=jt(),c=na(),u=aa(),d=ln().tester;function h(e,t,u,f,h,p,m){var g,v=e._context.staticPlot;!function(e,t,n,i,o){var l=n.xaxis,c=n.yaxis,u=r.extent(a.simpleMap(l.range,l.r2c)),d=r.extent(a.simpleMap(c.range,c.r2c)),f=i[0].trace;if(s.hasMarkers(f)){var h=f.marker.maxdisplayed;if(0!==h){var p=i.filter(function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]}),m=Math.ceil(p.length/h),g=0;o.forEach(function(e,r){var n=e[0].trace;s.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return y?e.transition():e}var b=u.xaxis,_=u.yaxis,w=f[0].trace,T=w.line,k=r.select(p),M=i(k,"g","errorbars"),A=i(k,"g","lines"),E=i(k,"g","points"),S=i(k,"g","text");if(n.getComponentMethod("errorbars","plot")(e,M,u,m),!0===w.visible){x(k).style("opacity",w.opacity);var C,L,O,D,I=w.fill.charAt(w.fill.length-1);"x"!==I&&"y"!==I&&(I=""),"y"===I?(O=1,D=_.c2p(0,!0)):"x"===I&&(O=0,D=b.c2p(0,!0)),f[0][u.isRangePlot?"nodeRangePlot3":"node3"]=k;var P="",N=[],R=w._prevtrace,F=null,z=null;R&&(P=R._prevRevpath||"",L=R._nextFill,N=R._ownPolygons,F=R._fillsegments,z=R._fillElement);var B,j,H,q,Y,V,U,$,W="",G="",X=[];w._polygons=[];var Z=[],J=[],K=a.noop;if(C=w._ownFill,s.hasLines(w)||"none"!==w.fill){L&&L.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(H=l.steps(T.shape),q=l.steps(T.shape.split("").reverse().join(""))):H=q="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),T.smoothing):l.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},Y=function(e){return q(e.reverse())},J=c(f,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill}),Z=new Array(J.length);var Q=0;for(g=0;g0,g=u(e,t,n);(d=a.selectAll("g.trace").data(g,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace scatter trace"+e[0].trace.uid}).style("stroke-miterlimit",2),d.order(),function(e,t,n){t.each(function(t){var a=i(r.select(this),"g","fills");l.setClipUrl(a,n.layerClipId,e);var s=t[0].trace;s._ownFill=null,s._nextFill=null;var c=[];s._ownfill&&c.push("_ownFill"),s._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,o);u.enter().append("g"),u.exit().remove(),u.order().each(function(e){s[e]=i(r.select(this),"path","js-fill")})})}(e,d,t),m?(c&&(f=c()),r.transition().duration(s.duration).ease(s.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()}).each(function(){a.selectAll("g.trace").each(function(r,n){h(e,n,t,r,g,this,s)})})):d.each(function(r,n){h(e,n,t,r,g,this,s)}),p&&d.exit().remove(),a.selectAll("path:not([d])").remove()}}),oa=c((e,t)=>{t.exports={container:"marker",min:"cmin",max:"cmax"}}),la=c((e,t)=>{var r=Zt();t.exports=function(e,t,n){var a={},i={_fullLayout:n},o=r.getFromTrace(i,t,"x"),l=r.getFromTrace(i,t,"y"),s=e.orig_x;void 0===s&&(s=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),a.xLabel=r.tickText(o,o.c2l(s),!0).text,a.yLabel=r.tickText(l,l.c2l(c),!0).text,a}}),sa=c((e,t)=>{var r=f(),n=Ut(),a=Ne();function i(e,t,r){n.pointStyle(e.selectAll("path.point"),t,r)}function o(e,t,r){n.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",function(e){return e[0].trace.opacity}),t.selectAll("g.points").each(function(t){i(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.text").each(function(t){o(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.trace path.js-line").call(n.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(n.fillGroupStyle,e,!1),a.getComponentMethod("errorbars","style")(t)},stylePoints:i,styleText:o,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?(n.selectedPointStyle(r.selectAll("path.point"),a),n.selectedTextStyle(r.selectAll("text"),a)):(i(r,a,e),o(r,a,e))}}}),ca=c((e,t)=>{var r=F(),n=jt();t.exports=function(e,t){var a,i;if("lines"===e.mode)return(a=e.line.color)&&r.opacity(a)?a:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var o=t.mcc||(e.marker||{}).color,l=t.mlcc||((e.marker||{}).line||{}).color;return(i=o&&r.opacity(o)?o:l&&r.opacity(l)&&(t.mlw||((e.marker||{}).line||{}).width)?l:"")?r.opacity(i)<.3?r.addOpacity(i,.3):i:(a=(e.line||{}).color)&&r.opacity(a)&&n.hasLines(e)&&e.line.width?a:e.fillcolor}}),ua=c((e,t)=>{var r=et(),n=Ar(),a=Ne(),i=ca(),o=F(),l=r.fillText;t.exports=function(e,t,s,c){var u=e.cd,d=u[0].trace,f=e.xa,h=e.ya,p=f.c2p(t),m=h.c2p(s),g=[p,m],v=d.hoveron||"",y=-1!==d.mode.indexOf("markers")?3:.5,x=!!d.xperiodalignment,b=!!d.yperiodalignment;if(-1!==v.indexOf("points")){var _=function(e){var t=Math.max(y,e.mrc||0),r=f.c2p(e.x)-p,n=h.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-y/t)},w=n.getDistanceFunction(c,function(e){if(x){var t=f.c2p(e.xStart),r=f.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(f.c2p(e.x)-p);return i=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(h.c2p(e.y)-m);return ir!=(c=a[n][1])>=r&&(o=a[n-1][0],l=a[n][0],c-s&&(i=o+(l-o)*(r-s)/(c-s),d=Math.min(d,i),p=Math.max(p,i)));return{x0:d=Math.max(d,0),x1:p=Math.min(p,f._length),y0:r,y1:r}}(d._polygons);null===D&&(D={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var I=o.defaultLine;return o.opacity(d.fillcolor)?I=d.fillcolor:o.opacity((d.line||{}).color)&&(I=d.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:D.x0,x1:D.x1,y0:D.y0,y1:D.y1,color:I,hovertemplate:!1}),delete e.index,d.text&&!r.isArrayOrTypedArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}),da=c((e,t)=>{var r=jt();t.exports=function(e,t){var n,a,i,o,l=e.cd,s=e.xaxis,c=e.yaxis,u=[],d=l[0].trace;if(!r.hasMarkers(d)&&!r.hasText(d))return[];if(!1===t)for(n=0;n{t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}),ha=c((e,t)=>{var r=Ne().traceIs,n=Gt();function a(e){return{v:"x",h:"y"}[e.orientation||"v"]}function i(e,t){var n=a(e),i=r(e,"box-violin"),o=r(e._fullInput||{},"candlestick");return i&&!o&&t===n&&void 0===e[n]&&void 0===e[n+"0"]}t.exports=function(e,t,o,l){o("autotypenumbers",l.autotypenumbersDflt),"-"===o("type",(l.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var o,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var c=function(e,t,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(i(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,l,s);if(c){if("histogram"===c.type&&s==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=s+"calendar",d=c[u],f={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0),f.autotypenumbers=e.autotypenumbers,i(c,s)){var h=a(c),p=[];for(o=0;o{var r=_().isTypedArraySpec;t.exports=function(e,t,n,a){if("category"===t.type){var i,o=e.categoryarray,l=Array.isArray(o)&&o.length>0||r(o);l&&(i="array");var s,c=n("categoryorder",i);"array"===c&&(s=n("categoryarray")),!l&&"array"===c&&(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=s.slice():(s=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n{var r=S().mix,n=R(),a=et();t.exports=function(e,t,i,o){var l=(o=o||{}).dfltColor;function s(r,n){return a.coerce2(e,t,o.attributes,r,n)}var c=s("linecolor",l),u=s("linewidth");i("showline",o.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var d=s("gridcolor",r(l,o.bgColor,o.blend||n.lightFraction).toRgbString()),f=s("gridwidth"),h=s("griddash");if(i("showgrid",o.showGrid||!!d||!!f||!!h)||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var p=s("minor.gridcolor",r(t.gridcolor,o.bgColor,67).toRgbString()),m=s("minor.gridwidth",t.gridwidth||1),g=s("minor.griddash",t.griddash||"solid");i("minor.showgrid",!!p||!!m||!!g)||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){s("zerolinelayer");var v=s("zerolinecolor",l),y=s("zerolinewidth");i("zeroline",o.showGrid||!!v||!!y)||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}),ga=c((e,t)=>{var r=v(),n=Ne(),a=et(),i=ct(),o=Ot(),l=wt(),s=St(),c=Ct(),u=Dt(),d=It(),f=pa(),h=ma(),p=Kt(),m=Wt(),g=ut().WEEKDAY_PATTERN,y=ut().HOUR_PATTERN;function x(e,t,n){function i(r,n){return a.coerce(e,t,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,c,u="";if(2===o.length)for(s=0;s<2;s++)if(c=_(o[s])){u=g;break}var d=i("pattern",u);if(d===g)for(s=0;s<2;s++)(c=_(o[s]))&&(t.bounds[s]=o[s]=c-1);if(d)for(s=0;s<2;s++)switch(c=o[s],d){case g:if(!r(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[s]=o[s]=c;break;case y:if(!r(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[s]=o[s]=c}if(!1===n.autorange){var f=n.range;if(f[0]f[1])return void(t.enabled=!1)}else if(o[0]>f[0]&&o[1]{var r=v(),n=et();t.exports=function(e,t,a,i){var o,l,s,c,u,d,f=i.counterAxes||[],h=i.overlayableAxes||[],p=i.letter,m=i.grid,g=i.overlayingDomain;m&&(l=m._domains[p][m._axisMap[t._id]],o=m._anchors[t._id],l&&(s=m[p+"side"].split(" ")[0],c=m.domain[p]["right"===s||"top"===s?1:0])),l=l||[0,1],o=o||(r(e.position)?"free":f[0]||"free"),s=s||("x"===p?"bottom":"left"),c=c||0,u=0,d=!1;var v=n.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(f),dflt:o}},"anchor"),y=n.coerce(e,t,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:s}},"side");"free"===v&&("y"===p&&(a("autoshift")&&(c="left"===y?g[0]:g[1],d=!t.automargin||t.automargin,u="left"===y?-3:3),a("shift",u)),a("position",c)),a("automargin",d);var x=!1;if(h.length&&(x=n.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(h),dflt:!1}},"overlaying")),!x){var b=a("domain",l);b[0]>b[1]-1/4096&&(t.domain=l),n.noneOrAll(e.domain,t.domain,l),"sync"===t.tickmode&&(t.tickmode="auto")}return a("layer"),t}}),ya=c((e,t)=>{var r=et(),n=F(),a=qt().isUnifiedHover,i=wr(),o=ct(),l=Ie(),s=wt(),c=ha(),u=ga(),d=Gr(),f=va(),h=dt(),p=h.id2name,m=h.name2id,g=ut().AX_ID_PATTERN,v=Ne(),y=v.traceIs,x=v.getComponentMethod;function b(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,v){var _,w,T=t.autotypenumbers,k={},M={},A={},E={},S={},C={},L={},O={},D={},I={};for(_=0;_{var r=f(),n=Ne(),a=et(),i=Ut(),o=Zt();t.exports=function(e,t,l,s){var c=e._fullLayout;if(0!==t.length){var u;s&&(u=s());var d,f,h,p=r.ease(l.easing);return e._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(h),h=null,function(){for(var r={},a=0;al.duration?(function(){for(var r={},a=0;a rect").call(i.setTranslate,0,0).call(i.setScale,1,1),e.plot.call(i.setTranslate,t._offset,r._offset).call(i.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(i.setPointGroupScale,1,1),n.selectAll(".textpoint").call(i.setTextPointsScale,1,1),n.call(i.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,l=n.xaxis,s=n.yaxis,c=l._length,u=s._length,d=!!t.xr1,f=!!t.yr1,h=[];if(d){var p=a.simpleMap(t.xr0,l.r2l),m=a.simpleMap(t.xr1,l.r2l),g=p[1]-p[0],v=m[1]-m[0];h[0]=(p[0]*(1-r)+r*m[0]-p[0])/(p[1]-p[0])*c,h[2]=c*(1-r+r*v/g),l.range[0]=l.l2r(p[0]*(1-r)+r*m[0]),l.range[1]=l.l2r(p[1]*(1-r)+r*m[1])}else h[0]=0,h[2]=c;if(f){var y=a.simpleMap(t.yr0,s.r2l),x=a.simpleMap(t.yr1,s.r2l),b=y[1]-y[0],_=x[1]-x[0];h[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*_/b),s.range[0]=l.l2r(y[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(y[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=u;o.drawOne(e,l,{skipTitle:!0}),o.drawOne(e,s,{skipTitle:!0}),o.redrawComponents(e,[l._id,s._id]);var w=d?c/h[2]:1,T=f?u/h[3]:1,k=d?h[0]:0,M=f?h[1]:0,A=d?h[0]/h[2]*c:0,E=f?h[1]/h[3]*u:0,S=l._offset-A,C=s._offset-E;n.clipRect.call(i.setTranslate,k,M).call(i.setScale,1/w,1/T),n.plot.call(i.setTranslate,S,C).call(i.setScale,w,T),i.setPointGroupScale(n.zoomScalePts,1/w,1/T),i.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}o.redrawComponents(e)}}),ba=c(e=>{var t=f(),r=Ne(),n=et(),a=gt(),i=Ut(),o=pt().getModuleCalcData,l=dt(),s=ut(),c=vt(),u=n.ensureSingle;function d(e,t,r){return n.ensureSingle(e,t,r,function(e){e.datum(r)})}var h=s.zindexSeparator;function p(e,n,a,l,c){for(var u,d,f,h=s.traceLayerClasses,p=e._fullLayout,m=p._zindices,g=p._modules,v=[],y=[],x=0;x1,m=t.mainplotinfo;if(!t.mainplot||p)if(f)t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.xaxislayer=u(n,"g","xaxislayer-above"),t.yaxislayer=u(n,"g","yaxislayer-above");else{if(!i){var g=u(n,"g","layer-subplot");t.shapelayer=u(g,"g","shapelayer"),t.imagelayer=u(g,"g","imagelayer"),m&&p?(t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer):(t.minorGridlayer=u(n,"g","minor-gridlayer"),t.gridlayer=u(n,"g","gridlayer"),t.zerolinelayer=u(n,"g","zerolinelayer"));var v=u(n,"g","layer-between");t.shapelayerBetween=u(v,"g","shapelayer"),t.imagelayerBetween=u(v,"g","imagelayer"),u(n,"path","xlines-below"),u(n,"path","ylines-below"),t.overlinesBelow=u(n,"g","overlines-below"),u(n,"g","xaxislayer-below"),u(n,"g","yaxislayer-below"),t.overaxesBelow=u(n,"g","overaxes-below")}t.overplot=u(n,"g","overplot"),t.plot=u(t.overplot,"g",a),t.zerolinelayerAbove=m&&p?m.zerolinelayerAbove:u(n,"g","zerolinelayer-above"),i||(t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.overlinesAbove=u(n,"g","overlines-above"),u(n,"g","xaxislayer-above"),u(n,"g","yaxislayer-above"),t.overaxesAbove=u(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+o),t.ylines=n.select(".ylines-"+c),t.xaxislayer=n.select(".xaxislayer-"+o),t.yaxislayer=n.select(".yaxislayer-"+c))}else{var y=m.plotgroup,x=a+"-x",b=a+"-y";t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer,t.zerolinelayerAbove=m.zerolinelayerAbove,u(m.overlinesBelow,"path",x),u(m.overlinesBelow,"path",b),u(m.overaxesBelow,"g",x),u(m.overaxesBelow,"g",b),t.plot=u(m.overplot,"g",a),u(m.overlinesAbove,"path",x),u(m.overlinesAbove,"path",b),u(m.overaxesAbove,"g",x),u(m.overaxesAbove,"g",b),t.xlines=y.select(".overlines-"+o).select("."+x),t.ylines=y.select(".overlines-"+c).select("."+b),t.xaxislayer=y.select(".overaxes-"+o).select("."+x),t.yaxislayer=y.select(".overaxes-"+c).select("."+b)}i||(f||(d(t.minorGridlayer,"g",t.xaxis._id),d(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(e){return e[0]}).sort(l.idSort),d(t.gridlayer,"g",t.xaxis._id),d(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(e){return e[0]}).sort(l.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function g(e,r){if(e){var n={};for(var a in e.each(function(e){var a=e[0];t.select(this).remove(),v(a,r),n[a]=!0}),r._plots)for(var i=r._plots[a].overlays||[],o=0;o0){var g=m.id;if(-1!==g.indexOf(h))continue;g+=h+(u+1),m=n.extendFlat({},m,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var v,y=[],x=0;x1&&(w+=h+_),b.push(n+w),r=0;r{var r=jt();t.exports={hasLines:r.hasLines,hasMarkers:r.hasMarkers,hasText:r.hasText,isBubble:r.isBubble,attributes:mn(),layoutAttributes:ht(),supplyDefaults:Vn(),crossTraceDefaults:$n(),supplyLayoutDefaults:Wn(),calc:Kn().calc,crossTraceCalc:ra(),arraysToCalcdata:Zn(),plot:ia(),colorbar:oa(),formatLabels:la(),style:sa().style,styleOnSelect:sa().styleOnSelect,hoverPoints:ua(),selectPoints:da(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:ba(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}),wa=c((e,t)=>{var r=f(),n=F(),a=un(),i=et(),o=i.strScale,l=i.strRotate,s=i.strTranslate;t.exports=function(e,t,i){var c,u,d,f,h=e.node(),p=a[i.arrowhead||0],m=a[i.startarrowhead||0],g=(i.arrowwidth||1)*(i.arrowsize||1),v=(i.arrowwidth||1)*(i.startarrowsize||1),y=t.indexOf("start")>=0,x=t.indexOf("end")>=0,b=p.backoff*g+i.standoff,_=m.backoff*v+i.startstandoff;if("line"===h.nodeName){c={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=c.x-u.x,T=c.y-u.y;if(f=(d=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void P();if(b){if(b*b>w*w+T*T)return void P();var k=b*Math.cos(d),M=b*Math.sin(d);u.x+=k,u.y+=M,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void P();var A=_*Math.cos(d),E=_*Math.sin(d);c.x-=A,c.y-=E,e.attr({x1:c.x,y1:c.y})}}else if("path"===h.nodeName){var S=h.getTotalLength(),C="";if(S{var r=f(),n=Ne(),a=gt(),i=et(),o=i.strTranslate,l=Zt(),s=F(),c=Ut(),u=Ar(),d=xt(),h=ir(),p=ar(),m=ct().arrayEditor,g=wa();function v(e,t){var r=e._fullLayout.annotations[t]||{},n=l.getFromId(e,r.xref),a=l.getFromId(e,r.yref);n&&n.setScale(),a&&a.setScale(),x(e,r,t,!1,n,a)}function y(e,t,r,n,a){var i=a[r],o=a[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(o),u=s?n.h:n.w;return e?c?i+(s?-t:t)/e._length:e.p2r(e.r2p(i)+t):i+(s?-t:t)/u}function x(e,t,a,f,v,x){var b,_,w=e._fullLayout,T=e._fullLayout._size,k=e._context.edits;f?(b="annotation-"+f,_=f+".annotations"):(b="annotation",_="annotations");var M=m(e.layout,_,t),A=M.modifyBase,E=M.modifyItem,S=M.getUpdateObj;w._infolayer.selectAll("."+b+'[data-index="'+a+'"]').remove();var C="clip"+w._uid+"_ann"+a;if(t._input&&!1!==t.visible){var L={x:{},y:{}},O=+t.textangle||0,D=w._infolayer.append("g").classed(b,!0).attr("data-index",String(a)).style("opacity",t.opacity),I=D.append("g").classed("annotation-text-g",!0),P=k[t.showarrow?"annotationTail":"annotationPosition"],N=t.captureevents||k.annotationText||P,R=I.append("g").style("pointer-events",N?"all":null).call(h,"pointer").on("click",function(){e._dragging=!1,e.emit("plotly_clickannotation",$(r.event))});t.hovertext&&R.on("mouseover",function(){var r=t.hoverlabel,n=r.font,a=this.getBoundingClientRect(),i=e.getBoundingClientRect();u.loneHover({x0:a.left-i.left,x1:a.right-i.left,y:(a.top+a.bottom)/2-i.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontShadow:n.fontShadow,fontLineposition:n.fontLineposition,fontTextcase:n.fontTextcase},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:e})}).on("mouseout",function(){u.loneUnhover(w._hoverlayer.node())});var F=t.borderwidth,z=t.borderpad,B=F+z,j=R.append("rect").attr("class","bg").style("stroke-width",F+"px").call(s.stroke,t.bordercolor).call(s.fill,t.bgcolor),H=t.width||t.height,q=w._topclips.selectAll("#"+C).data(H?[0]:[]);q.enter().append("clipPath").classed("annclip",!0).attr("id",C).append("rect"),q.exit().remove();var Y=t.font,V=w._meta?i.templateString(t.text,w._meta):t.text,U=R.append("text").classed("annotation-text",!0).text(V);k.annotationText?U.call(d.makeEditable,{delegate:R,gd:e}).call(W).on("edit",function(r){t.text=r,this.call(W),E("text",r),v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0),n.call("_guiRelayout",e,S())}):U.call(W)}else r.selectAll("#"+C).remove();function $(e){var r={index:a,annotation:t._input,fullAnnotation:t,event:e};return f&&(r.subplotId=f),r}function W(r){return r.call(c.font,Y).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),d.convertToTspans(r,e,G),r}function G(){var r=U.selectAll("a");1===r.size()&&r.text()===U.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(j.node());var a=R.select(".annotation-text-math-group"),u=!a.empty(),m=c.bBox((u?a:U).node()),b=m.width,_=m.height,M=t.width||b,N=t.height||_,z=Math.round(M+2*B),Y=Math.round(N+2*B);function V(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var W=!1,G=["x","y"],X=0;X1)&&(ne===re?((he=ae.r2fraction(t["a"+te]))<0||he>1)&&(W=!0):W=!0),Z=ae._offset+ae.r2p(t[te]),Q=.5}else{var pe="domain"===fe;"x"===te?(K=t[te],Z=pe?ae._offset+ae._length*K:Z=T.l+T.w*K):(K=1-t[te],Z=pe?ae._offset+ae._length*K:Z=T.t+T.h*K),Q=t.showarrow?.5:K}if(t.showarrow){de.head=Z;var me=t["a"+te];if(ee=oe*V(.5,t.xanchor)-le*V(.5,t.yanchor),ne===re){var ge=l.getRefType(ne);"domain"===ge?("y"===te&&(me=1-me),de.tail=ae._offset+ae._length*me):"paper"===ge?"y"===te?(me=1-me,de.tail=T.t+T.h*me):de.tail=T.l+T.w*me:de.tail=ae._offset+ae.r2p(me),J=ee}else de.tail=Z+me,J=ee+me;de.text=de.tail+ee;var ve=w["x"===te?"width":"height"];if("paper"===re&&(de.head=i.constrain(de.head,1,ve-1)),"pixel"===ne){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ve;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ue,de.head+=ue}else J=ee=se*V(Q,ce),de.text=Z+ee;de.text+=ue,ee+=ue,J+=ue,t["_"+te+"padplus"]=se/2+J,t["_"+te+"padminus"]=se/2-J,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(W)R.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(M-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(N-_)*("middle"===t.valign?.5:1)),u)a.select("svg").attr({x:B+be-1,y:B+_e}).call(c.setClipUrl,H?C:null,e);else{var we=B+_e-m.top,Te=B+be-m.left;U.call(d.positionText,Te,we).call(c.setClipUrl,H?C:null,e)}q.select("rect").call(c.setRect,B,B,M,N),j.call(c.setRect,F/2,F/2,z-F,Y-F),R.call(c.setTranslate,Math.round(L.x.text-z/2),Math.round(L.y.text-Y/2)),I.attr({transform:"rotate("+O+","+L.x.text+","+L.y.text+")"});var ke,Me=function(r,a){D.selectAll(".annotation-arrow-g").remove();var l=L.x.head,u=L.y.head,d=L.x.tail+r,h=L.y.tail+a,m=L.x.text+r,b=L.y.text+a,_=i.rotationXYMatrix(O,m,b),w=i.apply2DTransform(_),M=i.apply2DTransform2(_),C=+j.attr("width"),P=+j.attr("height"),N=m-.5*C,F=N+C,z=b-.5*P,B=z+P,H=[[N,z,N,B],[N,B,F,B],[F,B,F,z],[F,z,N,z]].map(M);if(!H.reduce(function(e,t){return e^!!i.segmentsIntersect(l,u,l+1e6,u+1e6,t[0],t[1],t[2],t[3])},!1)){H.forEach(function(e){var t=i.segmentsIntersect(d,h,l,u,e[0],e[1],e[2],e[3]);t&&(d=t.x,h=t.y)});var q=t.arrowwidth,Y=t.arrowcolor,V=t.arrowside,U=D.append("g").style({opacity:s.opacity(Y)}).classed("annotation-arrow-g",!0),$=U.append("path").attr("d","M"+d+","+h+"L"+l+","+u).style("stroke-width",q+"px").call(s.stroke,s.rgb(Y));if(g($,V,t),k.annotationPosition&&$.node().parentNode&&!f){var W=l,G=u;if(t.standoff){var X=Math.sqrt(Math.pow(l-d,2)+Math.pow(u-h,2));W+=t.standoff*(d-l)/X,G+=t.standoff*(h-u)/X}var Z,J,K=U.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-W)+","+(h-G),transform:o(W,G)}).style("stroke-width",q+6+"px").call(s.stroke,"rgba(0,0,0,0)").call(s.fill,"rgba(0,0,0,0)");p.init({element:K.node(),gd:e,prepFn:function(){var e=c.getTranslate(R);Z=e.x,J=e.y,v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(Z,J),a=n[0]+e,i=n[1]+r;R.call(c.setTranslate,a,i),E("x",y(v,e,"x",T,t)),E("y",y(x,r,"y",T,t)),t.axref===t.xref&&E("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&E("ay",y(x,r,"ay",T,t)),U.attr("transform",o(e,r)),I.attr({transform:"rotate("+O+","+a+","+i+")"})},doneFn:function(){n.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&Me(0,0),P&&p.init({element:R.node(),gd:e,prepFn:function(){ke=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?E("ax",y(v,e,"ax",T,t)):E("ax",t.ax+e),t.ayref===t.yref?E("ay",y(x,r,"ay",T.w,t)):E("ay",t.ay+r),Me(e,r);else{if(f)return;var a,i;if(v)a=y(v,e,"x",T,t);else{var l=t._xsize/T.w,s=t.x+(t._xshift-t.xshift)/T.w-l/2;a=p.align(s+e/T.w,l,0,1,t.xanchor)}if(x)i=y(x,r,"y",T,t);else{var c=t._ysize/T.h,u=t.y-(t._yshift+t.yshift)/T.h-c/2;i=p.align(u-r/T.h,c,0,1,t.yanchor)}E("x",a),E("y",i),(!v||!x)&&(n=p.getCursor(v?.5:a,x?.5:i,t.xanchor,t.yanchor))}I.attr({transform:o(e,r)+ke}),h(R,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",$(n))},doneFn:function(){h(R),n.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r{var r=et(),n=Ne(),a=ct().arrayEditor;function i(e,t){var r,n,a,i,l,s,c,u=e._fullLayout.annotations,d=[],f=[],h=[],p=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var o,l,s=i(e,t),c=s.on,u=s.off.concat(s.explicitOff),d={},f=e._fullLayout.annotations;if(c.length||u.length){for(o=0;o{var r=et(),n=F();t.exports=function(e,t,a,i){i("opacity");var o=i("bgcolor"),l=i("bordercolor"),s=n.opacity(l);i("borderpad");var c=i("borderwidth"),u=i("showarrow");if(i("text",u?" ":a._dfltTitle.annotation),i("textangle"),r.coerceFont(i,"font",a.font),i("width"),i("align"),i("height")&&i("valign"),u){var d,f,h=i("arrowside");-1!==h.indexOf("end")&&(d=i("arrowhead"),f=i("arrowsize")),-1!==h.indexOf("start")&&(i("startarrowhead",d),i("startarrowsize",f)),i("arrowcolor",s?t.bordercolor:n.defaultLine),i("arrowwidth",2*(s&&c||1)),i("standoff"),i("startstandoff")}var p=i("hovertext"),m=a.hoverlabel||{};if(p){var g=i("hoverlabel.bgcolor",m.bgcolor||(n.opacity(o)?n.rgb(o):n.defaultLine)),v=i("hoverlabel.bordercolor",m.bordercolor||n.contrast(g)),y=r.extendFlat({},m.font);y.color||(y.color=v),r.coerceFont(i,"hoverlabel.font",y)}i("captureevents",!!p)}}),Aa=c((e,t)=>{var r=et(),n=Zt(),a=Ot(),i=Ma(),o=fn();function l(e,t,a){function l(n,a){return r.coerce(e,t,o,n,a)}var s=l("visible"),c=l("clicktoshow");if(s||c){i(e,t,a,l);for(var u=t.showarrow,d=["x","y"],f=[-10,-30],h={_fullLayout:a},p=0;p<2;p++){var m=d[p],g=n.coerceRef(e,t,h,m,"","paper");if("paper"!==g&&n.getFromId(h,g)._annIndices.push(t._index),n.coercePosition(t,h,l,g,m,.5),u){var v="a"+m,y=n.coerceRef(e,t,h,v,"pixel",["pixel","paper"]);"pixel"!==y&&y!==g&&(y=t[v]="pixel");var x="pixel"===y?f[p]:.4;n.coercePosition(t,h,l,y,v,x)}l(m+"anchor"),l(m+"shift")}if(r.noneOrAll(e,t,["x","y"]),u&&r.noneOrAll(e,t,["ax","ay"]),c){var b=l("xclick"),_=l("yclick");t._xclick=void 0===b?t.x:n.cleanPosition(b,h,t.xref),t._yclick=void 0===_?t.y:n.cleanPosition(_,h,t.yref)}}}t.exports=function(e,t){a(e,t,{name:"annotations",handleItemDefaults:l})}}),Ea=c((e,t)=>{var r=et(),n=Zt(),a=Ta().draw;function i(e){var t=e._fullLayout;r.filterVisible(t.annotations).forEach(function(t){var r=n.getFromId(e,t.xref),a=n.getFromId(e,t.yref),i=n.getRefType(t.xref),l=n.getRefType(t.yref);t._extremes={},"range"===i&&o(t,r),"range"===l&&o(t,a)})}function o(e,t){var r,a=t._id,i=a.charAt(0),o=e[i],l=e["a"+i],s=e[i+"ref"],c=e["a"+i+"ref"],u=e["_"+i+"padplus"],d=e["_"+i+"padminus"],f={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+f,m=h-f,g=3*e.startarrowsize*e.arrowwidth||0,v=g+f,y=g-f;if(c===s){var x=n.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:m}),b=n.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(u,v),ppadminus:Math.max(d,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=l?v+l:v,y=l?y-l:y,r=n.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(d,m,y)});e._extremes[a]=r}t.exports=function(e){var t=e._fullLayout;if(r.filterVisible(t.annotations).length&&e._fullData.length)return r.syncOrAsync([a,i],e)}}),Sa=c((e,t)=>{var r=v(),n=M();t.exports=function(e,t,a,i){t=t||{};var o="log"===a&&"linear"===t.type,l="linear"===a&&"log"===t.type;if(o||l)for(var s,c,u=e._fullLayout.annotations,d=t._id.charAt(0),f=0;f{var r=Ta(),n=ka();t.exports={moduleType:"component",name:"annotations",layoutAttributes:fn(),supplyLayoutDefaults:Aa(),includeBasePlot:xn()("annotations"),calcAutorange:Ea(),draw:r.draw,drawOne:r.drawOne,drawRaw:r.drawRaw,hasClickToShow:n.hasClickToShow,onClick:n.onClick,convertCoords:Sa()}}),La=c((e,t)=>{var r=fn(),n=Me().overrideAll,a=ct().templatedArray;t.exports=n(a("annotation",{visible:r.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:r.xanchor,xshift:r.xshift,yanchor:r.yanchor,yshift:r.yshift,text:r.text,textangle:r.textangle,font:r.font,width:r.width,height:r.height,opacity:r.opacity,align:r.align,valign:r.valign,bgcolor:r.bgcolor,bordercolor:r.bordercolor,borderpad:r.borderpad,borderwidth:r.borderwidth,showarrow:r.showarrow,arrowcolor:r.arrowcolor,arrowhead:r.arrowhead,startarrowhead:r.startarrowhead,arrowside:r.arrowside,arrowsize:r.arrowsize,startarrowsize:r.startarrowsize,arrowwidth:r.arrowwidth,standoff:r.standoff,startstandoff:r.startstandoff,hovertext:r.hovertext,hoverlabel:r.hoverlabel,captureevents:r.captureevents}),"calc","from-root")}),Oa=c((e,t)=>{var r=et(),n=Zt(),a=Ot(),i=Ma(),o=La();function l(e,t,a,l){function s(n,a){return r.coerce(e,t,o,n,a)}function c(e){var r=e+"axis",i={_fullLayout:{}};return i._fullLayout[r]=a[r],n.coercePosition(t,i,s,e,e,.5)}s("visible")&&(i(e,t,l.fullLayout,s),c("x"),c("y"),c("z"),r.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",s("xanchor"),s("yanchor"),s("xshift"),s("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",s("ax",-10),s("ay",-30),r.noneOrAll(e,t,["ax","ay"])))}t.exports=function(e,t,r){a(e,t,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}}),Da=c((e,t)=>{var r=et(),n=Zt();function a(e,t){var a=t.fullSceneLayout.domain,i=t.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},r.extendFlat(e._xa,o),n.setConvert(e._xa),e._xa._offset=i.l+a.x[0]*i.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*i.w*(a.x[1]-a.x[0])},e._ya={},r.extendFlat(e._ya,o),n.setConvert(e._ya),e._ya._offset=i.t+(1-a.y[1])*i.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*i.h*(a.y[1]-a.y[0])}}t.exports=function(e){for(var t=e.fullSceneLayout.annotations,r=0;r{function r(e,t){var r,n,a=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)a[n]+=e[4*r+n]*t[r];return a}t.exports=function(e,t){return r(e.projection,r(e.view,r(e.model,[t[0],t[1],t[2],1])))}}),Pa=c((e,t)=>{var r=Ta().drawRaw,n=Ia(),a=["x","y","z"];t.exports=function(e){for(var t=e.fullSceneLayout,i=e.dataScale,o=t.annotations,l=0;l1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=n(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*i[0],t.yaxis.r2l(s.y)*i[1],t.zaxis.r2l(s.z)*i[2]]),r(e.graphDiv,s,l,e.id,s._xa,s._ya))}}}),Na=c((e,t)=>{var r=Ne(),n=et();t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:La()}}},layoutAttributes:La(),handleDefaults:Oa(),includeBasePlot:function(e,t){var a=r.subplotsRegistry.gl3d;if(a)for(var i=a.attrRegex,o=Object.keys(e),l=0;l{ut();var r=L(),n=mn().line,a=Ae().dash,i=C().extendFlat,o=ct().templatedArray,l=(dn(),P()),s=fn(),{shapeTexttemplateAttrs:c,templatefallbackAttrs:u}=Se(),d=Ce();t.exports=o("shape",{visible:i({},l.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:i({},l.legend,{editType:"calc+arraydraw"}),legendgroup:i({},l.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:i({},l.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:r({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:i({},l.legendrank,{editType:"calc+arraydraw"}),legendwidth:i({},l.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:i({},s.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:i({},s.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:i({},n.color,{editType:"arraydraw"}),width:i({},n.width,{editType:"calc+arraydraw"}),dash:i({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:c({},{keys:Object.keys(d)}),texttemplatefallback:u({editType:"arraydraw"}),font:r({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})}),Fa=c((e,t)=>{var r=et(),n=Zt(),a=Ot(),i=Ra(),o=Rr();function l(e,t,a){function l(n,a){return r.coerce(e,t,i,n,a)}if(t._isShape=!0,!l("visible"))return;l("showlegend")&&(l("legend"),l("legendwidth"),l("legendgroup"),l("legendgrouptitle.text"),r.coerceFont(l,"legendgrouptitle.font"),l("legendrank"));var s=l("path"),c=l("type",s?"path":"rect"),u="path"!==c;u&&delete t.path,l("editable"),l("layer"),l("opacity"),l("fillcolor"),l("fillrule"),l("line.width")&&(l("line.color"),l("line.dash"));var d=l("xsizemode"),f=l("ysizemode");let h=[.25,.75],p=[0,10];["x","y"].forEach(i=>{var m,g,v,y,x=i+"anchor",b="x"===i?d:f,_={_fullLayout:a};let w=e[i+"ref"];if(Array.isArray(w)&&w.length>0){let r=o.countDefiningCoords(c,s,i);y=n.coerceRefArray(e,t,_,i,void 0,"paper",r),t["_"+i+"refArray"]=!0}else y=n.coerceRef(e,t,_,i,void 0,"paper");if(Array.isArray(y))y.forEach(function(e){"range"===n.getRefType(e)&&(m=n.getFromId(_,e))&&-1===m._shapeIndices.indexOf(t._index)&&m._shapeIndices.push(t._index)}),u&&[0,1].forEach(function(a){let s=y[a];"range"===n.getRefType(s)?(m=n.getFromId(_,s),g=o.shapePositionToRange(m),v=o.rangeToShapePosition(m),("category"===m.type||"multicategory"===m.type)&&l(i+a+"shift")):g=v=r.identity;let c=i+a,u=e[c];if(e[c]=g(e[c],!0),"pixel"===b?l(c,p[a]):n.coercePosition(t,_,l,s,c,h[a]),t[c]=v(t[c]),e[c]=u,0===a&&"pixel"===b){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,_,l,s,x,.25),t[x]=v(t[x]),e[x]=r}});else{if("range"===n.getRefType(y)?((m=n.getFromId(_,y))._shapeIndices.push(t._index),v=o.rangeToShapePosition(m),g=o.shapePositionToRange(m),u&&("category"===m.type||"multicategory"===m.type)&&(l(i+"0shift"),l(i+"1shift"))):g=v=r.identity,u){let r=i+"0",a=i+"1",o=e[r],s=e[a];e[r]=g(e[r],!0),e[a]=g(e[a],!0),"pixel"===b?(l(r,p[0]),l(a,p[1])):(n.coercePosition(t,_,l,y,r,h[0]),n.coercePosition(t,_,l,y,a,h[1])),t[r]=v(t[r]),t[a]=v(t[a]),e[r]=o,e[a]=s}if("pixel"===b){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,_,l,y,x,.25),t[x]=v(t[x]),e[x]=r}}}),u&&r.noneOrAll(e,t,["x0","x1","y0","y1"]);var m,g,v="line"===c;if(u&&(m=l("label.texttemplate"),l("label.texttemplatefallback")),m||(g=l("label.text")),g||m){l("label.textangle");var y=l("label.textposition",v?"middle":"middle center");l("label.xanchor"),l("label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(v,y)),l("label.padding"),r.coerceFont(l,"label.font",a.font)}}t.exports=function(e,t){a(e,t,{name:"shapes",handleItemDefaults:l})}}),za=c((e,t)=>{var r=F(),n=et();t.exports=function(e,t,a){if(a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),n.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity"),a("newshape.line.width")){var i=(e||{}).plot_bgcolor||"#FFF";a("newshape.line.color",r.contrast(i)),a("newshape.line.dash")}var o="drawline"===e.dragmode,l=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(a("newshape.label.texttemplatefallback"),l||s){a("newshape.label.textangle");var c=a("newshape.label.textposition",o?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(o,c)),a("newshape.label.padding"),n.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}}),Ba=c((e,t)=>{var r=et(),n=Zt(),a=Nr(),i=Rr();function o(e,t,r){let o=t[r+"ref"],l="x"===r?a.paramIsX:a.paramIsY;function s(e,t){"paper"===e||"domain"===n.getRefType(e)||(c[e]||(c[e]=[]),c[e].push(t))}let c={};if("path"===t.type&&t.path){let e=t.path.match(a.segmentRE)||[];for(var u=0,d=0;dr&&(s(o[u],n[r]),u++)}}else s(o[0],t[r+"0"]),s(o[1],t[r+"1"]);let f={};for(let t in c){let r=n.getFromId(e,t);if(r){var h="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;"date"===r.type&&(h=i.decodeDate(h)),f[r._id]=c[t].map(h)}}return f}function l(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function s(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,n,o,l,s){var c=e/2,u=s;if("pixel"===t){var d=l?i.extractPathCoords(l,s?a.paramIsY:a.paramIsX):[n,o],f=r.aggNums(Math.max,null,d),h=r.aggNums(Math.min,null,d),p=h<0?Math.abs(h)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?p:m,ppadminus:u?m:p}}return{ppad:c}}function u(e,t,r){var n,o,l="x"===e._id.charAt(0)?"x":"y",s="category"===e.type||"multicategory"===e.type,c=0,u=0,d=s?e.r2c:e.d2c;if("scaled"===t[l+"sizemode"]?(n=t[l+"0"],o=t[l+"1"],s&&(c=t[l+"0shift"],u=t[l+"1shift"])):(n=t[l+"anchor"],o=t[l+"anchor"]),void 0!==n)return[d(n)+c,d(o)+u];if(t.path){var f,h,p,m,g=1/0,v=-1/0,y=t.path.match(a.segmentRE);for("date"===e.type&&(d=i.decodeDate(d)),f=0;fv&&(v=m));if(v>=g)return[g,v]}}t.exports=function(e){var t=e._fullLayout,i=r.filterVisible(t.shapes);if(i.length&&e._fullData.length)for(var c=0;c{f=n.getFromId(e,t),d._extremes[f._id]=n.findExtremes(f,r,l(d))})}else"paper"!==d.xref&&"domain"!==p&&(h=u(f=n.getFromId(e,d.xref),d,a.paramIsX))&&(d._extremes[f._id]=n.findExtremes(f,h,l(d)));if("array"===m){let t=o(e,d,"y");Object.entries(t).forEach(([t,r])=>{f=n.getFromId(e,t),d._extremes[f._id]=n.findExtremes(f,r,s(d))})}else"paper"!==d.yref&&"domain"!==m&&(h=u(f=n.getFromId(e,d.yref),d,a.paramIsY))&&(d._extremes[f._id]=n.findExtremes(f,h,s(d)))}}}),ja=c((e,t)=>{var r=Br();t.exports={moduleType:"component",name:"shapes",layoutAttributes:Ra(),supplyLayoutDefaults:Fa(),supplyDrawNewShapeDefaults:za(),includeBasePlot:xn()("shapes"),calcAutorange:Ba(),draw:r.draw,drawOne:r.drawOne}}),Ha=c((e,t)=>{var r=ut(),n=ct().templatedArray;dn(),t.exports=n("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}),qa=c((e,t)=>{var r=et(),n=Zt(),a=Ot(),i=Ha();function o(e,t,a){function o(n,a){return r.coerce(e,t,i,n,a)}var l=o("source");if(!o("visible",!!l))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var s={_fullLayout:a},c=["x","y"],u=0;u<2;u++){var d=c[u],f=n.coerceRef(e,t,s,d,"paper",void 0);"paper"!==f&&n.getFromId(s,f)._imgIndices.push(t._index),n.coercePosition(t,s,o,f,d,0)}return t}t.exports=function(e,t){a(e,t,{name:"images",handleItemDefaults:o})}}),Ya=c((e,t)=>{var r=f(),n=Ut(),a=Zt(),i=dt(),o=vt();t.exports=function(e){var t,l,s=e._fullLayout,c=[],u={},d=[];for(l=0;l{var r=v(),n=M();t.exports=function(e,t,a,i){t=t||{};var o="log"===a&&"linear"===t.type,l="linear"===a&&"log"===t.type;if(o||l)for(var s,c,u=e._fullLayout.images,d=t._id.charAt(0),f=0;f{t.exports={moduleType:"component",name:"images",layoutAttributes:Ha(),supplyLayoutDefaults:qa(),includeBasePlot:xn()("images"),draw:Ya(),convertCoords:Va()}}),$a=c((e,t)=>{t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}}),Wa=c((e,t)=>{var r=L(),n=R(),a=C().extendFlat,i=Me().overrideAll,o=De(),l=ct().templatedArray,s=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=i(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(o({editType:"arraydraw"}),{}),font:r({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:n.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}),Ga=c((e,t)=>{var r=et(),n=Ot(),a=Wa(),i=$a().name,o=a.buttons;function l(e,t,i){function o(n,i){return r.coerce(e,t,a,n,i)}o("visible",n(e,t,{name:"buttons",handleItemDefaults:s}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",i.font),o("bgcolor",i.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function s(e,t){function n(n,a){return r.coerce(e,t,o,n,a)}n("visible","skip"===e.method||Array.isArray(e.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}t.exports=function(e,t){n(e,t,{name:i,handleItemDefaults:l})}}),Xa=c((e,t)=>{t.exports=o;var r=f(),n=F(),a=Ut(),i=et();function o(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(e,t,i){var l=this.gd._fullLayout,s=l.width,c=l.height;this.position=e;var u,d,f,h,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,y=this.position.direction,x="down"===y,b="left"===y,_="up"===y,w=m,T=v;!x&&!b&&!("right"===y)&&!_&&(this.position.direction="down",x=!0),x||_?(d=(u=p)+w,x?(f=g,T=(h=Math.min(f+T,c))-f):T=(h=g+T)-(f=Math.max(h-T,0))):(h=(f=g)+T,b?w=(d=p+w)-(u=Math.max(d-w,0)):(u=p,w=(d=Math.min(u+w,s))-u)),this._box={l:u,t:f,w,h:T};var k=m>w,M=o.barLength+2*o.barPad,A=o.barWidth+2*o.barPad,E=p,S=g+v;S+A>c&&(S=c-A);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(n.fill,o.barColor),k?(this.hbar=C.attr({rx:o.barRadius,ry:o.barRadius,x:E,y:S,width:M,height:A}),this._hbarXMin=E+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v>T,O=o.barWidth+2*o.barPad,D=o.barLength+2*o.barPad,I=p+m,P=g;I+O>s&&(I=s-O);var N=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(n.fill,o.barColor),L?(this.vbar=N.attr({rx:o.barRadius,ry:o.barRadius,x:I,y:P,width:O,height:D}),this._vbarYMin=P+D/2,this._vbarTranslateMax=T-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,z=L?d+O+.5:d+.5,B=f-.5,j=k?h+A+.5:h+.5,H=l._topdefs.selectAll("#"+R).data(k||L?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",R).append("rect"),k||L?(this._clipRect=H.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(z)-Math.floor(F),height:Math.ceil(j)-Math.floor(B)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||L){var q=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(q);var Y=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(Y),L&&this.vbar.on(".drag",null).call(Y)}this.setTranslate(t,i)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,a=n+this._hbarTranslateMax;e=(i.constrain(r.event.x,n,a)-n)/(a-n)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,l=o+this._vbarTranslateMax;t=(i.constrain(r.event.y,o,l)-o)/(l-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=i.constrain(e||0,0,r),t=i.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(a.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/r;this.hbar.call(a.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(a.setTranslate,e,t+l*this._vbarTranslateMax)}}}),Za=c((e,t)=>{var r=f(),n=gt(),a=F(),i=Ut(),o=et(),l=xt(),s=ct().arrayEditor,c=yt().LINE_SPACING,u=$a(),d=Xa();function h(e){return e._index}function p(e,t){return+e.attr(u.menuIndexAttrName)===t._index}function m(e,t,r,n,a,i,o,l){t.active=o,s(e.layout,u.name,t).applyUpdate("active",o),"buttons"===t.type?v(e,n,null,null,t):"dropdown"===t.type&&(a.attr(u.menuIndexAttrName,"-1"),g(e,n,a,i,t),l||v(e,n,a,i,t))}function g(e,t,r,n,a){var l=o.ensureSingle(t,"g",u.headerClassName,function(e){e.style("pointer-events","all")}),s=a._dims,c=a.active,d=a.buttons[c]||u.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:s.headerWidth,height:s.headerHeight};l.call(y,a,d,e).call(A,a,f,h),o.ensureSingle(t,"text",u.headerArrowClassName,function(e){e.attr("text-anchor","end").call(i.font,a.font).text(u.arrowSymbol[a.direction])}).attr({x:s.headerWidth-u.arrowOffsetX+a.pad.l,y:s.headerHeight/2+u.textOffsetY+a.pad.t}),l.on("click",function(){r.call(E,String(p(r,a)?-1:a._index)),v(e,t,r,n,a)}),l.on("mouseover",function(){l.call(w)}),l.on("mouseout",function(){l.call(T,a)}),i.setTranslate(t,s.lx,s.ly)}function v(e,t,a,i,l){a||(a=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(u.menuIndexAttrName)}(a)&&"buttons"!==l.type?[]:l.buttons,c="dropdown"===l.type?u.dropdownButtonClassName:u.buttonClassName,d=a.selectAll("g."+c).data(o.filterVisible(s)),f=d.enter().append("g").classed(c,!0),h=d.exit();"dropdown"===l.type?(f.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,g=0,v=l._dims,x=-1!==["up","down"].indexOf(l.direction);"dropdown"===l.type&&(x?g=v.headerHeight+u.gapButtonHeader:p=v.headerWidth+u.gapButtonHeader),"dropdown"===l.type&&"up"===l.direction&&(g=-u.gapButtonHeader+u.gapButton-v.openHeight),"dropdown"===l.type&&"left"===l.direction&&(p=-u.gapButtonHeader+u.gapButton-v.openWidth);var b={x:v.lx+p+l.pad.l,y:v.ly+g+l.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},k={l:b.x+l.borderwidth,t:b.y+l.borderwidth};d.each(function(o,s){var c=r.select(this);c.call(y,l,o,e).call(A,l,b),c.on("click",function(){r.event.defaultPrevented||(o.execute&&(o.args2&&l.active===s?(m(e,l,0,t,a,i,-1),n.executeAPICommand(e,o.method,o.args2)):(m(e,l,0,t,a,i,s),n.executeAPICommand(e,o.method,o.args))),e.emit("plotly_buttonclicked",{menu:l,button:o,active:l.active}))}),c.on("mouseover",function(){c.call(w)}),c.on("mouseout",function(){c.call(T,l),d.call(_,l)})}),d.call(_,l),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.direction=l.direction,i&&(d.size()?function(e,t,r,n,a,i){var o,l,s,c=a.direction,d="up"===c||"down"===c,f=a._dims,h=a.active;if(d)for(l=0,s=0;s0?[0]:[]);if(l.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),l.exit().each(function(){r.select(this).selectAll("g."+u.headerGroupClassName).each(i)}).remove(),0!==a.length){var s=l.selectAll("g."+u.headerGroupClassName).data(a,h);s.enter().append("g").classed(u.headerGroupClassName,!0);for(var c=o.ensureSingle(l,"g",u.dropdownButtonGroupClassName,function(e){e.style("pointer-events","all")}),f=0;f{var r=$a();t.exports={moduleType:"component",name:r.name,layoutAttributes:Wa(),supplyLayoutDefaults:Ga(),draw:Za()}}),Ka=c((e,t)=>{t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}}),Qa=c((e,t)=>{var r=L(),n=De(),a=C().extendDeepAll,i=Me().overrideAll,o=ke(),l=ct().templatedArray,s=Ka(),c=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=i(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(n({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:o.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:r({})},font:r({}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}),"arraydraw","from-root")}),ei=c((e,t)=>{var r=et(),n=Ot(),a=Qa(),i=Ka().name,o=a.steps;function l(e,t,i){function o(n,i){return r.coerce(e,t,a,n,i)}for(var l=n(e,t,{name:"steps",handleItemDefaults:s}),c=0,u=0;u{var r=f(),n=gt(),a=F(),i=Ut(),o=et(),l=o.strTranslate,s=xt(),c=ct().arrayEditor,u=Ka(),d=yt(),h=d.LINE_SPACING,p=d.FROM_TL,m=d.FROM_BR;function g(e){return u.autoMarginIdRoot+e._index}function v(e){return e._index}function y(e,t){var a=i.tester.selectAll("g."+u.labelGroupClass).data(t._visibleSteps);a.enter().append("g").classed(u.labelGroupClass,!0);var l=0,c=0;a.each(function(e){var n=_(r.select(this),{step:e},t).node();if(n){var a=i.bBox(n);c=Math.max(c,a.height),l=Math.max(l,a.width)}}),a.remove();var d=t._dims={};d.inputAreaWidth=Math.max(u.railWidth,u.gripHeight);var f=e._fullLayout._size;d.lx=f.l+f.w*t.x,d.ly=f.t+f.h*(1-t.y),"fraction"===t.lenmode?d.outerLength=Math.round(f.w*t.len):d.outerLength=t.len,d.inputAreaStart=0,d.inputAreaLength=Math.round(d.outerLength-t.pad.l-t.pad.r);var h=(d.inputAreaLength-2*u.stepInset)/(t._stepCount-1),v=l+u.labelPadding;if(d.labelStride=Math.max(1,Math.ceil(v/h)),d.labelHeight=c,d.currentValueMaxWidth=0,d.currentValueHeight=0,d.currentValueTotalHeight=0,d.currentValueMaxLines=1,t.currentvalue.visible){var y=i.tester.append("g");a.each(function(e){var r=x(y,t,e.label),n=r.node()&&i.bBox(r.node())||{width:0,height:0},a=s.lineCount(r);d.currentValueMaxWidth=Math.max(d.currentValueMaxWidth,Math.ceil(n.width)),d.currentValueHeight=Math.max(d.currentValueHeight,Math.ceil(n.height)),d.currentValueMaxLines=Math.max(d.currentValueMaxLines,a)}),d.currentValueTotalHeight=d.currentValueHeight+t.currentvalue.offset,y.remove()}d.height=d.currentValueTotalHeight+u.tickOffset+t.ticklen+u.labelOffset+d.labelHeight+t.pad.t+t.pad.b;var b="left";o.isRightAnchor(t)&&(d.lx-=d.outerLength,b="right"),o.isCenterAnchor(t)&&(d.lx-=d.outerLength/2,b="center");var w="top";o.isBottomAnchor(t)&&(d.ly-=d.height,w="bottom"),o.isMiddleAnchor(t)&&(d.ly-=d.height/2,w="middle"),d.outerLength=Math.ceil(d.outerLength),d.height=Math.ceil(d.height),d.lx=Math.round(d.lx),d.ly=Math.round(d.ly);var T={y:t.y,b:d.height*m[w],t:d.height*p[w]};"fraction"===t.lenmode?(T.l=0,T.xl=t.x-t.len*p[b],T.r=0,T.xr=t.x+t.len*m[b]):(T.x=t.x,T.l=d.outerLength*p[b],T.r=d.outerLength*m[b]),n.autoMargin(e,g(t),T)}function x(e,t,r){if(t.currentvalue.visible){var n,a,l=t._dims;switch(t.currentvalue.xanchor){case"right":n=l.inputAreaLength-u.currentValueInset-l.currentValueMaxWidth,a="left";break;case"center":n=.5*l.inputAreaLength,a="middle";break;default:n=u.currentValueInset,a="left"}var c=o.ensureSingle(e,"text",u.labelClass,function(e){e.attr({"text-anchor":a,"data-notex":1})}),d=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"==typeof r)d+=r;else{var f=t.steps[t.active].label,p=t._gd._fullLayout._meta;p&&(f=o.templateString(f,p)),d+=f}t.currentvalue.suffix&&(d+=t.currentvalue.suffix),c.call(i.font,t.currentvalue.font).text(d).call(s.convertToTspans,t._gd);var m=s.lineCount(c),g=(l.currentValueMaxLines+1-m)*t.currentvalue.font.size*h;return s.positionText(c,n,g),c}}function b(e,t,r){o.ensureSingle(e,"rect",u.gripRectClass,function(n){n.call(M,t,e,r).style("pointer-events","all")}).attr({width:u.gripWidth,height:u.gripHeight,rx:u.gripRadius,ry:u.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(e,t,r){var n=o.ensureSingle(e,"text",u.labelClass,function(e){e.attr({"text-anchor":"middle","data-notex":1})}),a=t.step.label,l=r._gd._fullLayout._meta;return l&&(a=o.templateString(a,l)),n.call(i.font,r.font).text(a).call(s.convertToTspans,r._gd),n}function w(e,t){var n=o.ensureSingle(e,"g",u.labelsClass),a=t._dims,l=n.selectAll("g."+u.labelGroupClass).data(a.labelSteps);l.enter().append("g").classed(u.labelGroupClass,!0),l.exit().remove(),l.each(function(e){var n=r.select(this);n.call(_,e,t),i.setTranslate(n,S(t,e.fraction),u.tickOffset+t.ticklen+t.font.size*h+u.labelOffset+a.currentValueTotalHeight)})}function T(e,t,r,n,a){var i=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[i]._index;o!==r.active&&k(e,t,r,o,!0,a)}function k(e,t,r,a,i,o){var l=r.active;r.active=a,c(e.layout,u.name,r).applyUpdate("active",a);var s=r.steps[r.active];t.call(E,r,o),t.call(x,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:l}),s&&s.method&&i&&(t._nextMethod?(t._nextMethod.step=s,t._nextMethod.doCallback=i,t._nextMethod.doTransition=o):(t._nextMethod={step:s,doCallback:i,doTransition:o},t._nextMethodRaf=window.requestAnimationFrame(function(){var r=t._nextMethod.step;r.method&&(r.execute&&n.executeAPICommand(e,r.method,r.args),t._nextMethod=null,t._nextMethodRaf=null)})))}function M(e,t,n){if(!t._context.staticPlot){var i=n.node(),o=r.select(t);e.on("mousedown",s),e.on("touchstart",s)}function l(){return n.data()[0]}function s(){var e=l();t.emit("plotly_sliderstart",{slider:e});var s=n.select("."+u.gripRectClass);r.event.stopPropagation(),r.event.preventDefault(),s.call(a.fill,e.activebgcolor);var c=C(e,r.mouse(i)[0]);function d(){var e=l(),a=C(e,r.mouse(i)[0]);T(t,n,e,a,!1)}function f(){var e=l();e._dragging=!1,s.call(a.fill,e.bgcolor),o.on("mouseup",null),o.on("mousemove",null),o.on("touchend",null),o.on("touchmove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})}T(t,n,e,c,!0),e._dragging=!0,o.on("mousemove",d),o.on("touchmove",d),o.on("mouseup",f),o.on("touchend",f)}}function A(e,t){var n=e.selectAll("rect."+u.tickRectClass).data(t._visibleSteps),o=t._dims;n.enter().append("rect").classed(u.tickRectClass,!0),n.exit().remove(),n.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),n.each(function(e,n){var l=n%o.labelStride===0,s=r.select(this);s.attr({height:l?t.ticklen:t.minorticklen}).call(a.fill,t.tickcolor),i.setTranslate(s,S(t,n/(t._stepCount-1))-.5*t.tickwidth,(l?u.tickOffset:u.minorTickOffset)+o.currentValueTotalHeight)})}function E(e,t,r){for(var n=e.select("rect."+u.gripRectClass),a=0,i=0;i0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",l(o-.5*u.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function C(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function L(e,t,r){var n=r._dims,l=o.ensureSingle(e,"rect",u.railTouchRectClass,function(n){n.call(M,t,e,r).style("pointer-events","all")});l.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),i.setTranslate(l,0,n.currentValueTotalHeight)}function O(e,t){var r=t._dims,n=r.inputAreaLength-2*u.railInset,l=o.ensureSingle(e,"rect",u.railRectClass);l.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,t.bordercolor).call(a.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),i.setTranslate(l,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._context.staticPlot,a=e._fullLayout,o=function(e,t){for(var r=e[u.name],n=[],a=0;a0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),n.autoMargin(e,g(t))}if(l.enter().append("g").classed(u.containerClassName,!0).style("cursor",t?null:"ew-resize"),l.exit().each(function(){r.select(this).selectAll("g."+u.groupClassName).each(s)}).remove(),0!==o.length){var c=l.selectAll("g."+u.groupClassName).data(o,v);c.enter().append("g").classed(u.groupClassName,!0),c.exit().each(s).remove();for(var d=0;d{var r=Ka();t.exports={moduleType:"component",name:r.name,layoutAttributes:Qa(),supplyLayoutDefaults:ei(),draw:ti()}}),ni=c((e,t)=>{var r=R();t.exports={bgcolor:{valType:"color",dflt:r.background,editType:"plot"},bordercolor:{valType:"color",dflt:r.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}),ai=c((e,t)=>{t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}),ii=c((e,t)=>{t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}),oi=c(e=>{var t=dt(),r=xt(),n=ii(),a=yt().LINE_SPACING,i=n.name;function o(e){var t=e&&e[i];return t&&t.visible}e.isVisible=o,e.makeData=function(e){for(var r=t.list({_fullLayout:e},"x",!0),n=e.margin,a=[],l=0;l{var r=et(),n=ct(),a=dt(),i=ni(),o=ai();t.exports=function(e,t,l){var s=e[l],c=t[l];if(s.rangeslider||t._requestRangeslider[c._id]){r.isPlainObject(s.rangeslider)||(s.rangeslider={});var u,d,f=s.rangeslider,h=n.newContainer(c,"rangeslider");if(_("visible")){_("bgcolor",t.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!c.isValidRange(f.range)),_("range");var p=t._subplots;if(p)for(var m=p.cartesian.filter(function(e){return e.slice(0,Math.max(0,e.indexOf("y")))===a.name2id(l)}).map(function(e){return e.slice(e.indexOf("y"),e.length)}),g=r.simpleMap(m,a.id2name),v=0;v{var r=dt().list,n=Xt().getAutoRange,a=ii();t.exports=function(e){for(var t=r(e,"x",!0),i=0;i{var r=f(),n=Ne(),a=gt(),i=et(),o=i.strTranslate,l=Ut(),s=F(),c=$t(),u=ba(),d=dt(),h=ar(),p=ir(),m=ii();function g(e){return"number"==typeof e.clientX?e.clientX:e.touches&&e.touches.length>0?e.touches[0].clientX:0}function v(e,t,r,n){var a=i.ensureSingle(e,"rect",m.bgClassName,function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),c=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,d=l.crispRound(t,n.borderwidth);a.attr({width:n._width+c,height:n._height+c,transform:o(u,u),"stroke-width":d}).call(s.stroke,n.bordercolor).call(s.fill,n.bgcolor)}function y(e,t,r,n){var a=t._fullLayout;i.ensureSingleById(a._topdefs,"clipPath",n._clipId,function(e){e.append("rect").attr({x:0,y:0})}).select("rect").attr({width:n._width,height:n._height})}function x(e,t,n,o){var s,c=t.calcdata,f=e.selectAll("g."+m.rangePlotClassName).data(n._subplotsWith,i.identity);f.enter().append("g").attr("class",function(e){return m.rangePlotClassName+" "+e}).call(l.setClipUrl,o._clipId,t),f.order(),f.exit().remove(),f.each(function(e,i){var l=r.select(this),f=0===i,h=d.getFromId(t,e,"y"),p=h._name,m=o[p],g={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:o.range.slice(),calendar:n.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};n.rangebreaks&&(g.layout.xaxis.rangebreaks=n.rangebreaks),g.layout[p]={type:h.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(g.layout[p].rangebreaks=h.rangebreaks),a.supplyDefaults(g);var v=g._fullLayout.xaxis,y=g._fullLayout[p];v.clearCalc(),v.setScale(),y.clearCalc(),y.setScale();var x={id:e,plotgroup:l,xaxis:v,yaxis:y,isRangePlot:!0};f?s=x:(x.mainplot="xy",x.mainplotinfo=s),u.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=z[r+1];else if(e=n.pmax)t=z[r+1];else if(ea._length||y+_<0)return;u=v+_,h=y+_;break;case s:if(b="col-resize",v+_>a._length)return;u=v+_,h=y;break;case c:if(b="col-resize",y+_<0)return;u=v,h=y+_;break;default:b="ew-resize",u=m,h=m+_}if(h{var r=et(),n=ni(),a=ai(),i=oi();t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:r.extendFlat({},n,{yaxis:a})}}},layoutAttributes:ni(),handleDefaults:li(),calcAutorange:si(),draw:ci(),isVisible:i.isVisible,makeData:i.makeData,autoMarginOpts:i.autoMarginOpts}}),di=c((e,t)=>{var r=L(),n=R(),a=(0,ct().templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:a,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:r({editType:"plot"}),bgcolor:{valType:"color",dflt:n.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}),fi=c((e,t)=>{t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}),hi=c((e,t)=>{var r=et(),n=F(),a=ct(),i=Ot(),o=di(),l=fi();function s(e,t,n,a){var i=a.calendar;function l(n,a){return r.coerce(e,t,o.buttons,n,a)}if(l("visible")){var s=l("step");"all"!==s&&(!i||"gregorian"===i||"month"!==s&&"year"!==s?l("stepmode"):t.stepmode="backward",l("count")),l("label")}}t.exports=function(e,t,c,u,d){var f=e.rangeselector||{},h=a.newContainer(t,"rangeselector");function p(e,t){return r.coerce(f,h,o,e,t)}if(p("visible",i(f,h,{name:"buttons",handleItemDefaults:s,calendar:d}).length>0)){var m=function(e,t,r){for(var n=r.filter(function(r){return t[r].anchor===e._id}),a=0,i=0;i{var r=h(),n=et().titleCase;t.exports=function(e,t){var a=e._name,i={};if("all"===t.step)i[a+".autorange"]=!0;else{var o=function(e,t){var a,i=e.range,o=new Date(e.r2l(i[1])),l=t.step,s=r["utc"+n(l)],c=t.count;switch(t.stepmode){case"backward":a=e.l2r(+s.offset(o,-c));break;case"todate":var u=s.offset(o,-c);a=e.l2r(+s.ceil(u))}return[a,i[1]]}(e,t);i[a+".range[0]"]=o[0],i[a+".range[1]"]=o[1]}return i}}),mi=c((e,t)=>{var r=f(),n=Ne(),a=gt(),i=F(),o=Ut(),l=et(),s=l.strTranslate,c=xt(),u=dt(),d=yt(),h=d.LINE_SPACING,p=d.FROM_TL,m=d.FROM_BR,g=fi(),v=pi();function y(e){return e._id}function x(e,t,r){var n=l.ensureSingle(e,"rect","selector-rect",function(e){e.attr("shape-rendering","crispEdges")});n.attr({rx:g.rx,ry:g.ry}),n.call(i.stroke,t.bordercolor).call(i.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,r)).style("stroke-width",t.borderwidth+"px")}function b(e,t,r,n){l.ensureSingle(e,"text","selector-text",function(e){e.attr("text-anchor","middle")}).call(o.font,t.font).text(function(e,t){return e.label?t?l.templateString(e.label,t):e.label:"all"===e.step?"all":e.count+e.step.charAt(0)}(r,n._fullLayout._meta)).call(function(e){c.convertToTspans(e,n)})}t.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=u.list(e,"x",!0),r=[],n=0;n{t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:di()}}},layoutAttributes:di(),handleDefaults:hi(),draw:mi()}}),vi=c(e=>{var t=C().extendFlat;e.attributes=function(e,r){r=r||{};var n={valType:"info_array",editType:(e=e||{}).editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},a=(e.name&&e.name,e.trace,r.description&&r.description,{x:t({},n,{}),y:t({},n,{}),editType:e.editType});return e.noGridCell||(a.row={valType:"integer",min:0,dflt:0,editType:e.editType},a.column={valType:"integer",min:0,dflt:0,editType:e.editType}),a},e.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var l=r("domain.column");void 0!==l&&(l{var r=et(),n=B().counter,a=vi().attributes,i=ut().idRegex,o=ct(),l={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[n("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[i.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[i.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:a({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function s(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function c(e,t,r,n,a,i){var o=t(e+"gap",r),l=t("domain."+e);t(e+"side",n);for(var s=new Array(a),c=l[0],u=(l[1]-c)/(a-o),d=u*(1-o),f=0;f1){f||h||p||"independent"===k("pattern")&&(f=!0),g._hasSubplotGrid=f;var x,b,_="top to bottom"===k("roworder"),w=f?.2:.1,T=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:c("x",k,w,x,y),y:c("y",k,T,b,v,_)}}else delete t.grid}function k(e,t){return r.coerce(n,g,l,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,c,d,f=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(p){var x=f.subplots||[];c=r.subplots=new Array(m);var b=1;for(n=0;n{t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}}),bi=c((e,t)=>{var r=v(),n=Ne(),a=et(),i=ct(),o=xi();t.exports=function(e,t,l,s){var c="error_"+s.axis,u=i.newContainer(t,c),d=e[c]||{};function f(e,t){return a.coerce(d,u,o,e,t)}if(!1!==f("visible",void 0!==d.array||void 0!==d.value||"sqrt"===d.type)){var h=f("type","array"in d?"data":"percent"),p=!0;"sqrt"!==h&&(p=f("symmetric",!(("data"===h?"arrayminus":"valueminus")in d))),"data"===h?(f("array"),f("traceref"),p||(f("arrayminus"),f("tracerefminus"))):("percent"===h||"constant"===h)&&(f("value"),p||f("valueminus"));var m="copy_"+s.inherit+"style";s.inherit&&(t["error_"+s.inherit]||{}).visible&&f(m,!(d.color||r(d.thickness)||r(d.width))),(!s.inherit||!u[m])&&(f("color",l),f("thickness"),f("width",n.traceIs(t,"gl3d")?0:4))}}}),_i=c((e,t)=>{function r(e,t){return"percent"===e?function(e){return Math.abs(e*t/100)}:"constant"===e?function(){return Math.abs(t)}:"sqrt"===e?function(e){return Math.sqrt(Math.abs(e))}:void 0}t.exports=function(e){var t=e.type,n=e.symmetric;if("data"===t){var a=e.array||[];if(n)return function(e,t){var r=+a[t];return[r,r]};var i=e.arrayminus||[];return function(e,t){var r=+a[t],n=+i[t];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=r(t,e.value),l=r(t,e.valueminus);return n||void 0===e.valueminus?function(e){var t=o(e);return[t,t]}:function(e){return[l(e),o(e)]}}}),wi=c((e,t)=>{var r=v(),n=Ne(),a=Zt(),i=et(),o=_i();function l(e,t,n,l){var s=t["error_"+l]||{},c=[];if(s.visible&&-1!==["linear","log"].indexOf(n.type)){for(var u=o(s),d=0;d{var r=f(),n=v(),a=Ut(),i=jt();t.exports=function(e,t,o,l){var s=o.xaxis,c=o.yaxis,u=l&&l.duration>0,d=e._context.staticPlot;t.each(function(t){var f,h=t[0].trace,p=h.error_x||{},m=h.error_y||{};h.ids&&(f=function(e){return e.id});var g=i.hasMarkers(h)&&h.marker.maxdisplayed>0;!m.visible&&!p.visible&&(t=[]);var v=r.select(this).selectAll("g.errorbar").data(t,f);if(v.exit().remove(),t.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var y=v.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(l.duration).style("opacity",1),a.setClipUrl(v,o.layerClipId,e),v.each(function(e){var t=r.select(this),a=function(e,t,r){var a={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(a.yh=r.c2p(e.yh),a.ys=r.c2p(e.ys),n(a.ys)||(a.noYS=!0,a.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(a.xh=t.c2p(e.xh),a.xs=t.c2p(e.xs),n(a.xs)||(a.noXS=!0,a.xs=t.c2p(e.xs,!0))),a}(e,s,c);if(!g||e.vis){var i,o=t.select("path.yerror");if(m.visible&&n(a.x)&&n(a.yh)&&n(a.ys)){var f=m.width;i="M"+(a.x-f)+","+a.yh+"h"+2*f+"m-"+f+",0V"+a.ys,a.noYS||(i+="m-"+f+",0h"+2*f),o.size()?u&&(o=o.transition().duration(l.duration).ease(l.easing)):o=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var h=t.select("path.xerror");if(p.visible&&n(a.y)&&n(a.xh)&&n(a.xs)){var v=(p.copy_ystyle?m:p).width;i="M"+a.xh+","+(a.y-v)+"v"+2*v+"m0,-"+v+"H"+a.xs,a.noXS||(i+="m0,-"+v+"v"+2*v),h.size()?u&&(h=h.transition().duration(l.duration).ease(l.easing)):h=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0),h.attr("d",i)}else h.remove()}})}})}}),ki=c((e,t)=>{var r=f(),n=F();t.exports=function(e){e.each(function(e){var t=e[0].trace,a=t.error_y||{},i=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(n.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(n.stroke,i.color)})}}),Mi=c((e,t)=>{var r=et(),n=Me().overrideAll,a=xi(),i={error_x:r.extendFlat({},a),error_y:r.extendFlat({},a)};delete i.error_x.copy_zstyle,delete i.error_y.copy_zstyle,delete i.error_y.copy_ystyle;var o={error_x:r.extendFlat({},a),error_y:r.extendFlat({},a),error_z:r.extendFlat({},a)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:i,bar:i,histogram:i,scatter3d:n(o,"calc","nested"),scattergl:n(i,"calc","nested")}},supplyDefaults:bi(),calc:wi(),makeComputeError:_i(),plot:Ti(),style:ki(),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}}),Ai=c((e,t)=>{t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}),Ei=c((e,t)=>{var r=f(),n=S(),a=gt(),i=Ne(),o=Zt(),l=ar(),s=et(),c=s.strTranslate,u=C().extendFlat,d=ir(),h=Ut(),p=F(),m=$t(),g=xt(),v=bt().flipScale,y=ga(),x=va(),b=wt(),_=yt(),w=_.LINE_SPACING,T=_.FROM_TL,k=_.FROM_BR,M=Ai().cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(e){var t,r,n,a,i=e._fullLayout,o=e.calcdata,l=[];function s(e){return u(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof a.calc?a.calc(e,n,t):(t._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,t._zrange=[r[a.min],r[a.max]])}for(var d=0;d0?n>=s:n<=s));a++)n>u&&n0?n>=s:n<=s));a++)n>r[0]&&n1){var he=Math.pow(10,Math.floor(Math.log(fe)/Math.LN10));ue*=he*s.roundUp(fe/he,[2,5,10]),(Math.abs($.start)/$.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ue}se.domain=l?[oe+D/z.h,oe+Q-D/z.h]:[oe+O/z.w,oe+Q-O/z.w],se.setScale(),e.attr("transform",c(Math.round(z.l),Math.round(z.t)));var pe,me=e.select("."+M.cbtitleunshift).attr("transform",c(-Math.round(z.l),-Math.round(z.t))),ge=se.ticklabelposition,ve=se.title.font.size,ye=e.select("."+M.cbaxis),xe=0,be=0;function _e(r,n){var a={propContainer:se,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},o="h"===r.charAt(0)?r.slice(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(i,r,u(a,n||{}))}return s.syncOrAsync([a.previousPromises,function(){var e,t;(l&&ce||!l&&!ce)&&("top"===q&&(e=O+z.l+ee*I,t=D+z.t+te*(1-oe-Q)+3+.75*ve),"bottom"===q&&(e=O+z.l+ee*I,t=D+z.t+te*(1-oe)-3-.25*ve),"right"===q&&(t=D+z.t+te*P+3+.75*ve,e=O+z.l+ee*oe),_e(se._id+"title",{attributes:{x:e,y:t,"text-anchor":l?"start":"middle"}}))},function(){if(!l&&!ce||l&&ce){var a,u=e.select("."+M.cbtitle),d=u.select("text"),f=[-A/2,A/2],p=u.select(".h"+se._id+"title-math-group").node(),m=15.6;if(d.node()&&(m=parseInt(d.node().style.fontSize,10)*w),p?(a=h.bBox(p),be=a.width,(xe=a.height)>m&&(f[1]-=(xe-m)/2)):d.node()&&!d.classed(M.jsPlaceholder)&&(a=h.bBox(d.node()),be=a.width,xe=a.height),l){if(xe){if(xe+=5,"top"===q)se.domain[1]-=xe/z.h,f[1]*=-1;else{se.domain[0]+=xe/z.h;var v=g.lineCount(d);f[1]+=(1-v)*m}u.attr("transform",c(f[0],f[1])),se.setScale()}}else be&&("right"===q&&(se.domain[0]+=(be+ve/2)/z.w),u.attr("transform",c(f[0],f[1])),se.setScale())}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",l?c(0,Math.round(z.h*(1-se.domain[1]))):c(Math.round(z.w*se.domain[0]),0)),ye.attr("transform",l?c(0,Math.round(-z.t)):c(Math.round(-z.l),0));var y=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(G);y.enter().append("rect").classed(M.cbfill,!0).attr("style",""),y.exit().remove();var x=Y.map(se.c2p).map(Math.round).sort(function(e,t){return e-t});y.each(function(e,a){var o=[0===a?Y[0]:(G[a]+G[a-1])/2,a===G.length-1?Y[1]:(G[a]+G[a+1])/2].map(se.c2p).map(Math.round);l&&(o[1]=s.constrain(o[1]+(o[1]>o[0])?1:-1,x[0],x[1]));var c=r.select(this).attr(l?"x":"y",re).attr(l?"y":"x",r.min(o)).attr(l?"width":"height",Math.max(Z,2)).attr(l?"height":"width",Math.max(r.max(o)-r.min(o),2));if(t._fillgradient)h.gradient(c,i,t._id,l?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=U(e).replace("e-","");c.attr("fill",n(u).toHexString())}});var b=e.select("."+M.cblines).selectAll("path."+M.cbline).data(j.color&&j.width?X:[]);b.enter().append("path").classed(M.cbline,!0),b.exit().remove(),b.each(function(e){var t=re,n=Math.round(se.c2p(e))+j.width/2%1;r.select(this).attr("d","M"+(l?t+","+n:n+","+t)+(l?"h":"v")+Z).call(h.lineGroupStyle,j.width,V(e),j.dash)}),ye.selectAll("g."+se._id+"tick,path").remove();var _=re+Z+(A||0)/2-("outside"===t.ticks?1:0),T=o.calcTicks(se),k=o.getTickSigns(se)[2];return o.drawTicks(i,se,{vals:"inside"===se.ticks?o.clipEnds(se,T):T,layer:ye,path:o.makeTickPath(se,_,k),transFn:o.makeTransTickFn(se)}),o.drawLabels(i,se,{vals:T,layer:ye,transFn:o.makeTransTickLabelFn(se),labelFns:o.makeLabelFns(se,_)})},function(){if(l&&!ce||!l&&ce){var e,n,a=se.position||0,o=se._offset+se._length/2;if("right"===q)n=o,e=z.l+ee*a+10+ve*(se.showticklabels?1:.5);else if(e=o,"bottom"===q&&(n=z.t+te*a+10+(-1===ge.indexOf("inside")?se.tickfont.size:0)+("inside"!==se.ticks&&t.ticklen||0)),"top"===q){var s=H.text.split("
").length;n=z.t+te*a+10-Z-w*ve*s}_e((l?"h":"v")+se._id+"title",{avoid:{selection:r.select(i).selectAll("g."+se._id+"tick"),side:q,offsetTop:l?0:z.t,offsetLeft:l?z.l:0,maxShift:l?F.width:F.height},attributes:{x:e,y:n,"text-anchor":"middle"},transform:{rotate:l?-90:0,offset:0}})}},a.previousPromises,function(){var r,o=Z+A/2;-1===ge.indexOf("inside")&&(r=h.bBox(ye.node()),o+=l?r.width:r.height),pe=me.select("text");var s=0,u=l&&"top"===q,m=!l&&"right"===q,g=0;if(pe.node()&&!pe.classed(M.jsPlaceholder)){var y,x=me.select(".h"+se._id+"title-math-group").node();x&&(l&&ce||!l&&!ce)?(s=(r=h.bBox(x)).width,y=r.height):(s=(r=h.bBox(me.node())).right-z.l-(l?re:le),y=r.bottom-z.t-(l?le:re),!l&&"top"===q&&(o+=r.height,g=r.height)),m&&(pe.attr("transform",c(s/2+ve/2,0)),s*=2),o=Math.max(o,l?s:y)}var b=2*(l?O:D)+o+E+A/2,w=0;!l&&H.text&&"bottom"===L&&P<=0&&(b+=w=b/2,g+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=g;var B=E+A,j=(l?re:le)-B/2-(l?O:0),Y=(l?le:re)-(l?K:D+g-w);e.select("."+M.cbbg).attr("x",j).attr("y",Y).attr(l?"width":"height",Math.max(b-w,2)).attr(l?"height":"width",Math.max(K+B,2)).call(p.fill,S).call(p.stroke,t.bordercolor).style("stroke-width",E);var V=m?Math.max(s-10,0):0;e.selectAll("."+M.cboutline).attr("x",(l?re:le+O)+V).attr("y",(l?le+D-K:re)+(u?xe:0)).attr(l?"width":"height",Math.max(Z,2)).attr(l?"height":"width",Math.max(K-(l?2*D+xe:2*O+V),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":A});var U=l?ne*b:0,$=l?0:(1-ae)*b-g;if(U=R?z.l-U:-U,$=N?z.t-$:-$,e.attr("transform",c(U,$)),!l&&(E||n(S).getAlpha()&&!n.equals(F.paper_bgcolor,S))){var W=ye.selectAll("text"),G=W[0].length,X=e.select("."+M.cbbg).node(),J=h.bBox(X),Q=h.getTranslate(e);W.each(function(e,t){var r=G-1;if(0===t||t===r){var n,a=h.bBox(this),i=h.getTranslate(this);if(t===r){var o=a.right+i.x;(n=J.right+Q.x+le-E-2+I-o)>0&&(n=0)}else if(0===t){var l=a.left+i.x;(n=J.left+Q.x+le+E+2-l)<0&&(n=0)}n&&(G<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ee={},te=T[C],ie=k[C],oe=T[L],ue=k[L],de=b-Z;l?("pixels"===f?(ee.y=P,ee.t=K*oe,ee.b=K*ue):(ee.t=ee.b=0,ee.yt=P+d*oe,ee.yb=P-d*ue),"pixels"===_?(ee.x=I,ee.l=b*te,ee.r=b*ie):(ee.l=de*te,ee.r=de*ie,ee.xl=I-v*te,ee.xr=I+v*ie)):("pixels"===f?(ee.x=I,ee.l=K*te,ee.r=K*ie):(ee.l=ee.r=0,ee.xl=I+d*te,ee.xr=I-d*ie),"pixels"===_?(ee.y=1-P,ee.t=b*oe,ee.b=b*ue):(ee.t=de*oe,ee.b=de*ue,ee.yt=P-v*oe,ee.yb=P+v*ue));var fe=t.y<.5?"b":"t",he=t.x<.5?"l":"r";i._fullLayout._reservedMargin[t._id]={};var be={r:F.width-j-U,l:j+ee.r,b:F.height-Y-$,t:Y+ee.b};R&&N?a.autoMargin(i,t._id,ee):R?i._fullLayout._reservedMargin[t._id][fe]=be[fe]:N||l?i._fullLayout._reservedMargin[t._id][he]=be[he]:i._fullLayout._reservedMargin[t._id][fe]=be[fe]}],i)}(f,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,o,s="v"===t.orientation,u=r._fullLayout._size;l.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,i){e.attr("transform",n+c(r,i)),a=l.align((s?t._uFrac:t._vFrac)+r/u.w,s?t._thickFrac:t._lenFrac,0,1,t.xanchor),o=l.align((s?t._vFrac:1-t._uFrac)-i/u.h,s?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=l.getCursor(a,o,t.xanchor,t.yanchor);d(e,f)},doneFn:function(){if(d(e),void 0!==a&&void 0!==o){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=o,void 0!==t._traceIndex?i.call("_guiRestyle",r,n,t._traceIndex):i.call("_guiRelayout",r,n)}}})}(f,t,e)}),t.exit().each(function(t){a.autoMargin(e,t._id)}).remove(),t.order()}}}),Si=c((e,t)=>{t.exports={moduleType:"component",name:"colorbar",attributes:Tt(),supplyDefaults:Pt(),draw:Ei().draw,hasColorbar:At()}}),Ci=c((e,t)=>{t.exports={moduleType:"component",name:"legend",layoutAttributes:lr(),supplyLayoutDefaults:cr(),draw:vr(),style:gr()}}),Li=c((e,t)=>{t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}),Oi=c((e,t)=>{t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}),Di=c((e,t)=>{var r=Ne(),n=et(),a=n.extendFlat,i=n.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function l(e){return["xaxis","yaxis","zaxis"].indexOf(e.slice(0,5))>-1}t.exports=function(e,t){var n,s=e.data,c=e.layout,u=i([],s),d=i({},c,o(t.tileClass)),f=e._context||{};if(t.width&&(d.width=t.width),t.height&&(d.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){d.annotations=[];var h=Object.keys(d);for(n=0;n{var r=at().EventEmitter,n=Ne(),a=et(),i=En(),o=Di(),l=Sn(),s=Cn();t.exports=function(e,t){var c=new r,u=o(e,{format:"png"}),d=u.gd;d.style.position="absolute",d.style.left="-5000px",document.body.appendChild(d);var f=i.getRedrawFunc(d);return n.call("_doPlot",d,u.data,u.layout,u.config).then(f).then(function(){var e=i.getDelay(d._fullLayout);setTimeout(function(){var e=l(d),r=document.createElement("canvas");r.id=a.randstr(),(c=s({format:t.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:r,emitter:c,svg:e})).clean=function(){d&&document.body.removeChild(d)}},e)}).catch(function(e){c.emit("error",e)}),c}}),Pi=c((e,t)=>{var r=En(),n={getDelay:r.getDelay,getRedrawFunc:r.getRedrawFunc,clone:Di(),toSVG:Sn(),svgToImg:Cn(),toImage:Ii(),downloadImage:In()};t.exports=n}),Ni=c(e=>{e.version=u().version,d(),tt();var t,r,n=Ne(),a=e.register=n.register,i=Nn(),o=Object.keys(i);for(r=0;r{t.exports=Ni()}),Fi=c((e,t)=>{var r=mn(),n=_t().axisHoverFormat,{hovertemplateAttrs:a,texttemplateAttrs:i,templatefallbackAttrs:o}=Se(),l=kt(),s=L(),c=ea(),u=Ae().pattern,d=C().extendFlat,f=s({editType:"calc",arrayOk:!0,colorEditType:"style"}),h=d({},r.marker.line.width,{dflt:0}),p=d({width:h,editType:"calc"},l("marker.line")),m=d({line:p,editType:"calc"},l("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:u,cornerradius:{valType:"any",editType:"calc"}});t.exports={x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:n("x"),yhoverformat:n("y"),text:r.text,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys}),texttemplatefallback:o({editType:"plot"}),hovertext:r.hovertext,hovertemplate:a({},{keys:c.eventDataKeys}),hovertemplatefallback:o(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:d({},f,{}),insidetextfont:d({},f,{}),outsidetextfont:d({},f,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:d({},r.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:m,offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,selected:{marker:{opacity:r.selected.marker.opacity,color:r.selected.marker.color,editType:"style"},textfont:r.selected.textfont,editType:"style"},unselected:{marker:{opacity:r.unselected.marker.opacity,color:r.unselected.marker.color,editType:"style"},textfont:r.unselected.textfont,editType:"style"},zorder:r.zorder}}),zi=c((e,t)=>{t.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}}),Bi=c((e,t)=>{var r=F(),n=bt().hasColorscale,a=Nt(),i=et().coercePattern;t.exports=function(e,t,o,l,s){var c=o("marker.color",l),u=n(e,"marker");u&&a(e,t,s,o,{prefix:"marker.",cLetter:"c"}),o("marker.line.color",r.defaultLine),n(e,"marker.line")&&a(e,t,s,o,{prefix:"marker.line.",cLetter:"c"}),o("marker.line.width"),o("marker.opacity"),i(o,"marker.pattern",c,u),o("selected.marker.color"),o("unselected.marker.color")}}),ji=c((e,t)=>{var r=v(),n=et(),a=F(),i=Ne(),o=Rn(),l=Fn(),s=Bi(),c=Un(),u=Fi(),d=n.coerceFont;function f(e){if(r(e)){if((e=+e)>=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function h(e,t,r,a,i,o){var l=!1!==(o=o||{}).moduleHasSelected,s=!1!==o.moduleHasUnselected,c=!1!==o.moduleHasConstrain,u=!1!==o.moduleHasCliponaxis,f=!1!==o.moduleHasTextangle,h=!1!==o.moduleHasInsideanchor,p=!!o.hasPathbar,m=Array.isArray(i)||"auto"===i,g=m||"inside"===i,v=m||"outside"===i;if(g||v){var y=d(a,"textfont",r.font),x=n.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(a,"insidetextfont",x),p){var _=n.extendFlat({},y);b&&delete _.color,d(a,"pathbar.textfont",_)}v&&d(a,"outsidetextfont",y),l&&a("selected.textfont.color"),s&&a("unselected.textfont.color"),c&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate"),a("texttemplatefallback")}g&&h&&a("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function d(r,a){return n.coerce(e,t,u,r,a)}if(o(e,t,c,d)){l(e,t,c,d),d("xhoverformat"),d("yhoverformat"),d("zorder"),d("orientation",t.x&&!t.y?"h":"v"),d("base"),d("offset"),d("width"),d("text"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback");var f=d("textposition");h(e,0,c,d,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s(e,t,d,r,c);var p=(t.marker.line||{}).color,m=i.getComponentMethod("errorbars","supplyDefaults");m(e,t,p||a.defaultLine,{axis:"y"}),m(e,t,p||a.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,d)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,a;function i(e,t){return n.coerce(a._input,a,u,e,t)}for(var o=0;o{var r=Ne(),n=Zt(),a=et(),i=zi(),o=ji().validateCornerradius;t.exports=function(e,t,l){function s(r,n){return a.coerce(e,t,i,r,n)}for(var c=!1,u=!1,d=!1,f={},h=s("barmode"),p="group"===h,m=0;m0&&!f[v]&&(d=!0),f[v]=!0),g.visible&&"histogram"===g.type&&"category"!==n.getFromId({_fullLayout:t},g["v"===g.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}if(c){"overlay"!==h&&s("barnorm"),s("bargap",u&&!d?0:.2),s("bargroupgap");var y=s("barcornerradius");t.barcornerradius=o(y)}else delete t.barmode}}),qi=c((e,t)=>{var r=et();t.exports=function(e,t){for(var n=0;n{var r=Zt(),n=Gn(),a=bt().hasColorscale,i=zt(),o=qi(),l=Jn();t.exports=function(e,t){var s,c,u,d,f,h,p=r.getFromId(e,t.xaxis||"x"),m=r.getFromId(e,t.yaxis||"y"),g={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(s=p.makeCalcdata(t,"x",g),u=m.makeCalcdata(t,"y"),d=n(t,m,"y",u),f=!!t.yperiodalignment,h="y"):(s=m.makeCalcdata(t,"y",g),u=p.makeCalcdata(t,"x"),d=n(t,p,"x",u),f=!!t.xperiodalignment,h="x"),c=d.vals;for(var v=Math.min(c.length,s.length),y=new Array(v),x=0;x{var r=f(),n=et();function a(e){return"_"+e+"Text_minsize"}t.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=a(e),i=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o{var t=v(),r=S(),n=et().isArrayOrTypedArray;e.coerceString=function(e,t,r){if("string"==typeof t){if(t||!e.noBlank)return t}else if(("number"==typeof t||!0===t)&&!e.strict)return String(t);return void 0!==r?r:e.dflt},e.coerceNumber=function(e,r,n){if(t(r)){r=+r;var a=e.min,i=e.max;if(!(void 0!==a&&ri))return r}return void 0!==n?n:e.dflt},e.coerceColor=function(e,t,n){return r(t).isValid()?t:void 0!==n?n:e.dflt},e.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},e.getValue=function(e,t){var r;return n(e)?t{var r=f(),n=F(),a=Ut(),i=et(),o=Ne(),l=Vi().resizeText,s=Fi(),c=s.textfont,u=s.insidetextfont,d=s.outsidetextfont,h=Ui();function p(e,t,r){a.pointStyle(e.selectAll("path"),t,r),m(e,t,r)}function m(e,t,n){e.selectAll("text").each(function(e){var o=r.select(this),l=i.ensureUniformFontSize(n,g(o,e,t,n));a.font(o,l)})}function g(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=_(t,r);i=y(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=x(r,t.i,a));return i}function v(e,t,r){return b(c,e.textfont,t,r)}function y(e,t,r,a){var i=v(e,t,r);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(i={color:n.contrast(a),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),b(u,e.insidetextfont,t,i)}function x(e,t,r){var n=v(e,t,r);return b(d,e.outsidetextfont,t,n)}function b(e,t,r,n){t=t||{};var a=h.getValue(t.family,r),i=h.getValue(t.size,r),o=h.getValue(t.color,r),l=h.getValue(t.weight,r),s=h.getValue(t.style,r),c=h.getValue(t.variant,r),u=h.getValue(t.textcase,r),d=h.getValue(t.lineposition,r),f=h.getValue(t.shadow,r);return{family:h.coerceString(e.family,a,n.family),size:h.coerceNumber(e.size,i,n.size),color:h.coerceColor(e.color,o,n.color),weight:h.coerceString(e.weight,l,n.weight),style:h.coerceString(e.style,s,n.style),variant:h.coerceString(e.variant,c,n.variant),textcase:h.coerceString(e.variant,u,n.textcase),lineposition:h.coerceString(e.variant,d,n.lineposition),shadow:h.coerceString(e.variant,f,n.shadow)}}function _(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}t.exports={style:function(e){var t=r.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");l(e,t,"bar");var n=t.size(),a=e._fullLayout;t.style("opacity",function(e){return e[0].trace.opacity}).each(function(e){("stack"===a.barmode&&n>1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(t){p(r.select(this),t[0].trace,e)}),o.getComponentMethod("errorbars","style")(t)},styleTextPoints:m,styleOnSelect:function(e,t,n){var l=t[0].trace;l.selectedpoints?function(e,t,n){a.selectedPointStyle(e.selectAll("path"),t),function(e,t,n){e.each(function(e){var o,l=r.select(this);if(e.selected){o=i.ensureUniformFontSize(n,g(l,e,t,n));var s=t.selected.textfont&&t.selected.textfont.color;s&&(o.color=s),a.font(l,o)}else a.selectedTextStyle(l,t)})}(e.selectAll("text"),t,n)}(n,l,e):(p(n,l,e),o.getComponentMethod("errorbars","style")(n))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}}),Wi=c((e,t)=>{var r=f(),n=v(),a=et(),i=xt(),o=F(),l=Ut(),s=Ne(),c=Zt().tickText,u=Vi(),d=u.recordMinTextSize,h=u.clearMinTextSize,p=$i(),m=Ui(),g=ea(),y=Fi(),x=y.text,b=y.textposition,_=qt().appendArrayPointValue,w=g.TEXTPAD;function T(e){return e.id}function k(e){return(e>0)-(e<0)}function M(e,t){return e0}function S(e,t,r,n,a){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(a?e>=r*(t/n):t>=n*(e/r)))}function C(e){return"auto"===e?0:e}function L(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function O(e,t,r,n,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,c=i.anchor,u="end"===c,d="start"===c,f=((i.leftToRight||0)+1)/2,h=1-f,p=i.hasB,m=i.r,g=i.overhead,v=a.width,y=a.height,x=Math.abs(t-e),b=Math.abs(n-r),_=x>2*w&&b>2*w?w:0;x-=2*_,b-=2*_;var T=C(s);"auto"===s&&!(v<=x&&y<=b)&&(v>x||y>b)&&(!(v>b||y>x)||vw){var S=function(e,t,r,n,a,i,o,l,s){var c,u,d,f,h=Math.max(0,Math.abs(t-e)-2*w),p=Math.max(0,Math.abs(n-r)-2*w),m=i-w,g=o?m-Math.sqrt(m*m-(m-o)*(m-o)):m,v=s?2*m:l?m-o:2*g,y=s?2*m:l?2*g:m-o;return a.y/a.x>=p/(h-v)?f=p/a.y:a.y/a.x<=(p-y)/h?f=h/a.x:!s&&l?(c=a.x*a.x+a.y*a.y/4,d=(h-m)*(h-m)+(p/2-m)*(p/2-m)-m*m,f=(-(u=-2*a.x*(h-m)-a.y*(p/2-m))+Math.sqrt(u*u-4*c*d))/(2*c)):s?(c=(a.x*a.x+a.y*a.y)/4,d=(h/2-m)*(h/2-m)+(p/2-m)*(p/2-m)-m*m,f=(-(u=-a.x*(h/2-m)-a.y*(p/2-m))+Math.sqrt(u*u-4*c*d))/(2*c)):(c=a.x*a.x/4+a.y*a.y,d=(h/2-m)*(h/2-m)+(p-m)*(p-m)-m*m,f=(-(u=-a.x*(h/2-m)-2*a.y*(p-m))+Math.sqrt(u*u-4*c*d))/(2*c)),{scale:f=Math.min(1,f),pad:l?Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(p-a.y*f)/2)*(m-(p-a.y*f)/2)))-o):Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(h-a.x*f)/2)*(m-(h-a.x*f)/2)))-o)}}(e,t,r,n,E,m,g,o,p);k=S.scale,A=S.pad}else k=1,l&&(k=Math.min(1,x/E.x,b/E.y)),A=0;var O=a.left*h+a.right*f,D=(a.top+a.bottom)/2,I=(e+w)*h+(t-w)*f,P=(r+n)/2,N=0,R=0;if(d||u){var F=(o?E.x:E.y)/2;m&&(u||p)&&(_+=A);var z=o?M(e,t):M(r,n);o?d?(I=e+z*_,N=-z*F):(I=t-z*_,N=z*F):d?(P=r+z*_,R=-z*F):(P=n-z*_,R=z*F)}return{textX:O,textY:D,targetX:I,targetY:P,anchorX:N,anchorY:R,scale:k,rotate:T}}t.exports={plot:function(e,t,u,f,g,v){var y=t.xaxis,D=t.yaxis,I=e._fullLayout,P=e._context.staticPlot;g||(g={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},h("bar",I));var N=a.makeTraceGroups(f,u,"trace bars").each(function(s){var u=r.select(this),f=s[0].trace,h=s[0].t,N="waterfall"===f.type,R="funnel"===f.type,F="histogram"===f.type,z="bar"===f.type,B=z||R,j=0;N&&f.connector.visible&&"between"===f.connector.mode&&(j=f.connector.line.width/2);var H="h"===f.orientation,q=E(g),Y=a.ensureSingle(u,"g","points"),V=function(e){if(e.ids)return T}(f),U=Y.selectAll("g.point").data(a.identity,V);U.enter().append("g").classed("point",!0),U.exit().remove(),U.each(function(u,T){var E,N,R=r.select(this),Y=function(e,t,r,n){var a=[],i=[],o=n?t:r,l=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=l.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=l.c2p(e.p1,!0),n?[a,i]:[i,a]}(u,y,D,H),V=Y[0][0],U=Y[0][1],$=Y[1][0],W=Y[1][1],G=0===(H?U-V:W-$);if(G&&B&&m.getLineWidth(f,u)&&(G=!1),G||(G=!(n(V)&&n(U)&&n($)&&n(W))),u.isBlank=G,G&&(H?U=V:W=$),j&&!G&&(H?(V-=M(V,U)*j,U+=M(V,U)*j):($-=M($,W)*j,W+=M($,W)*j)),"waterfall"===f.type){if(!G){var X=f[u.dir].marker;E=X.line.width,N=X.color}}else E=m.getLineWidth(f,u),N=u.mc||f.marker.color;function Z(e){var t=r.round(E/2%1,2);return 0===g.gap&&0===g.groupgap?r.round(Math.round(e)-t,2):e}var J=o.opacity(N)<1||E>.01?Z:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?Z(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(V=J(V,U,H),U=J(U,V,H),$=J($,W,!H),W=J(W,$,!H));var K,Q=H?y.c2p:D.c2p;K=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var ee,te,re=z||F?function(e,t){if(!e)return 0;var r,n=Math.abs(H?W-$:U-V),a=Math.abs(H?U-V:W-$),i=J(Math.abs(Q(K,!0)-Q(0,!0))),o=u.hasB?Math.min(n/2,a/2):Math.min(n/2,i);return r="%"===t?n*(Math.min(50,e)/100):e,J(Math.max(Math.min(r,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,ne="M"+V+","+$+"V"+W+"H"+U+"V"+$+"Z",ae=0;if(re&&u.s){var ie=0===k(u.s0)||k(u.s)===k(u.s0)?u.s1:u.s0;if((ae=J(u.hasB?0:Math.abs(Q(K,!0)-Q(ie,!0))))0?Math.sqrt(ae*(2*re-ae)):0,de=oe>0?Math.max:Math.min;ee="M"+V+","+$+"V"+(W-ce*le)+"H"+de(U-(re-ae)*oe,V)+"A "+re+","+re+" 0 0 "+se+" "+U+","+(W-re*le-ue)+"V"+($+re*le+ue)+"A "+re+","+re+" 0 0 "+se+" "+de(U-(re-ae)*oe,V)+","+($+ce*le)+"Z"}else if(u.hasB)ee="M"+(V+re*oe)+","+$+"A "+re+","+re+" 0 0 "+se+" "+V+","+($+re*le)+"V"+(W-re*le)+"A "+re+","+re+" 0 0 "+se+" "+(V+re*oe)+","+W+"H"+(U-re*oe)+"A "+re+","+re+" 0 0 "+se+" "+U+","+(W-re*le)+"V"+($+re*le)+"A "+re+","+re+" 0 0 "+se+" "+(U-re*oe)+","+$+"Z";else{var fe=(te=Math.abs(W-$)+ae)0?Math.sqrt(ae*(2*re-ae)):0,pe=le>0?Math.max:Math.min;ee="M"+(V+fe*oe)+","+$+"V"+pe(W-(re-ae)*le,$)+"A "+re+","+re+" 0 0 "+se+" "+(V+re*oe-he)+","+W+"H"+(U-re*oe+he)+"A "+re+","+re+" 0 0 "+se+" "+(U-fe*oe)+","+pe(W-(re-ae)*le,$)+"V"+$+"Z"}}else ee=ne}else ee=ne;var me=A(a.ensureSingle(R,"path"),I,g,v);if(me.style("vector-effect",P?"none":"non-scaling-stroke").attr("d",isNaN((U-V)*(W-$))||G&&e._context.staticPlot?"M0,0Z":ee).call(l.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&q){var ge=l.makePointStyleFns(f);l.singlePointStyle(u,me,f,ge,e)}(function(e,t,r,n,o,s,u,f,h,g,v,y,T){var k,E=t.xaxis,D=t.yaxis,I=e._fullLayout;function P(t,r,n){return a.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+k,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(i.convertToTspans,e)}var N=n[0].trace,R="h"===N.orientation,F=function(e,t,r,n,i){var o,l=t[0].trace;return o=l.texttemplate?function(e,t,r,n,i){var o=t[0].trace,l=a.castOption(o,r,"texttemplate");if(!l)return"";var s,u,d,f,h="histogram"===o.type,p="waterfall"===o.type,m="funnel"===o.type,g="h"===o.orientation;function v(e){return c(f,f.c2l(e),!0).text}g?(s="y",u=i,d="x",f=n):(s="x",u=n,d="y",f=i);var y=t[r],x={};x.label=y.p,x.labelLabel=x[s+"Label"]=function(e){return c(u,u.c2l(e),!0).text}(y.p);var b=a.castOption(o,y.i,"text");(0===b||b)&&(x.text=b),x.value=y.s,x.valueLabel=x[d+"Label"]=v(y.s);var w={};_(w,o,y.i),(h||void 0===w.x)&&(w.x=g?x.value:x.label),(h||void 0===w.y)&&(w.y=g?x.label:x.value),(h||void 0===w.xLabel)&&(w.xLabel=g?x.valueLabel:x.labelLabel),(h||void 0===w.yLabel)&&(w.yLabel=g?x.labelLabel:x.valueLabel),p&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial)),m&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var T=a.castOption(o,y.i,"customdata");return T&&(x.customdata=T),a.texttemplateString({data:[w,x,o._meta],fallback:o.texttemplatefallback,labels:x,locale:e._d3locale,template:l})}(e,t,r,n,i):l.textinfo?function(e,t,r,n){var i=e[0].trace,o="h"===i.orientation,l="waterfall"===i.type,s="funnel"===i.type;function u(e){return c(o?r:n,+e,!0).text}var d,f=i.textinfo,h=e[t],p=f.split("+"),m=[],g=function(e){return-1!==p.indexOf(e)};if(g("label")&&m.push(function(e){return c(o?n:r,e,!0).text}(e[t].p)),g("text")&&(0===(d=a.castOption(i,h.i,"text"))||d)&&m.push(d),l){var v=+h.rawS||h.s,y=h.v,x=y-v;g("initial")&&m.push(u(x)),g("delta")&&m.push(u(v)),g("final")&&m.push(u(y))}if(s){g("value")&&m.push(u(h.s));var b=0;g("percent initial")&&b++,g("percent previous")&&b++,g("percent total")&&b++;var _=b>1;g("percent initial")&&(d=a.formatPercent(h.begR),_&&(d+=" of initial"),m.push(d)),g("percent previous")&&(d=a.formatPercent(h.difR),_&&(d+=" of previous"),m.push(d)),g("percent total")&&(d=a.formatPercent(h.sumR),_&&(d+=" of total"),m.push(d))}return m.join("
")}(t,r,n,i):m.getValue(l.text,r),m.coerceString(x,o)}(I,n,o,E,D);k=function(e,t){var r=m.getValue(e.textposition,t);return m.coerceEnumerated(b,r)}(N,o);var z="stack"===y.mode||"relative"===y.mode,B=n[o],j=!z||B._outmost,H=B.hasB,q=g&&g-v>w;if(F&&"none"!==k&&(!B.isBlank&&s!==u&&f!==h||"auto"!==k&&"inside"!==k)){var Y=I.font,V=p.getBarColor(n[o],N),U=p.getInsideTextFont(N,o,Y,V),$=p.getOutsideTextFont(N,o,Y),W=N.insidetextanchor||"end",G=r.datum();R?"log"===E.type&&G.s0<=0&&(s=E.range[0]0&&K>0;ae=q?H?S(re-2*g,ne,J,K,R)||S(re,ne-2*g,J,K,R):R?S(re-(g-v),ne,J,K,R)||S(re,ne-2*(g-v),J,K,R):S(re,ne-(g-v),J,K,R)||S(re-2*(g-v),ne,J,K,R):S(re,ne,J,K,R),ie&&ae?k="inside":(k="outside",X.remove(),X=null)}else k="inside";if(!X){var oe=(X=P(r,F,Q=a.ensureUniformFontSize(e,"outside"===k?$:U))).attr("transform");if(X.attr("transform",""),J=(Z=l.bBox(X.node())).width,K=Z.height,X.attr("transform",oe),J<=0||K<=0)return void X.remove()}var le,se=N.textangle;"outside"===k?le=function(e,t,r,n,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,c=i.angle||0,u=a.width,d=a.height,f=Math.abs(t-e),h=Math.abs(n-r);o=l?h>2*w?w:0:f>2*w?w:0;var p=1;s&&(p=l?Math.min(1,h/d):Math.min(1,f/u));var m=C(c),g=L(a,m),v=(l?g.x:g.y)/2,y=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,_=(r+n)/2,T=0,k=0,A=l?M(t,e):M(r,n);return l?(b=t-A*o,T=A*v):(_=n+A*o,k=-A*v),{textX:y,textY:x,targetX:b,targetY:_,anchorX:T,anchorY:k,scale:p,rotate:m}}(s,u,f,h,Z,{isHorizontal:R,constrained:"both"===N.constraintext||"outside"===N.constraintext,angle:se}):le=O(s,u,f,h,Z,{isHorizontal:R,constrained:"both"===N.constraintext||"inside"===N.constraintext,angle:se,anchor:W,hasB:H,r:g,overhead:v}),le.fontSize=Q.size,d("histogram"===N.type?"bar":N.type,le,I),B.transform=le;var ce=A(X,I,y,T);a.setTransormAndDisplay(ce,le)}else r.select("text").remove()})(e,t,R,s,T,V,U,$,W,re,ae,g,v),t.layerClipId&&l.hideOutsideRangePoint(u,R.select("text"),y,D,f.xcalendar,f.ycalendar)});var $=!1===f.cliponaxis;l.setClipUrl(u,$?null:t.layerClipId,e)});s.getComponentMethod("errorbars","plot")(e,N,t,g)},toMoveInsideBar:O}}),Gi=c((e,t)=>{var r=Ar(),n=Ne(),a=F(),i=et().fillText,o=Ui().getLineWidth,l=Zt().hoverLabelText,s=y().BADNUM;function c(e,t,n,a,o){var c,u,d,f,h,p,m,g=e.cd,v=g[0].trace,y=g[0].t,x="closest"===a,b="waterfall"===v.type,_=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===v.orientation?(c=n,u=t,d="y",f="x",h=P,p=D):(c=t,u=n,d="x",f="y",p=P,h=D);var T=v[d+"period"],k=x||T;function M(e){return E(e,-1)}function A(e){return E(e,1)}function E(e,t){var r=e.w;return e[d]+t*r/2}function S(e){return e[d+"End"]-e[d+"Start"]}var C=x?M:T?function(e){return e.p-S(e)/2}:function(e){return Math.min(M(e),e.p-y.bardelta/2)},L=x?A:T?function(e){return e.p+S(e)/2}:function(e){return Math.max(A(e),e.p+y.bardelta/2)};function O(e,t,n){return o.finiteRange&&(n=0),r.inbox(e-c,t-c,n+Math.min(1,Math.abs(t-e)/m)-1)}function D(e){return O(C(e),L(e),_)}function I(e){var t=e[f];if(b){var r=Math.abs(e.rawS)||0;u>0?t+=r:u<0&&(t-=r)}return t}function P(e){var t=u,n=e.b,a=I(e);return r.inbox(n-t,a-t,_+(a-t)/(a-n)-1)}var N=e[d+"a"],R=e[f+"a"];m=Math.abs(N.r2c(N.range[1])-N.r2c(N.range[0]));var F,z,B,j,H=r.getDistanceFunction(a,h,p,function(e){return(h(e)+p(e))/2});if(r.getClosest(g,H,e),!1!==e.index&&g[e.index].p!==s){k||(C=function(e){return Math.min(M(e),e.p-y.bargroupwidth/2)},L=function(e){return Math.max(A(e),e.p+y.bargroupwidth/2)});var q=g[e.index],Y=v.base?q.b+q.s:q.s;e[f+"0"]=e[f+"1"]=R.c2p(q[f],!0),e[f+"LabelVal"]=Y;var V=y.extents[y.extents.round(q.p)];e[d+"0"]=N.c2p(x?C(q):V[0],!0),e[d+"1"]=N.c2p(x?L(q):V[1],!0);var U=void 0!==q.orig_p;return e[d+"LabelVal"]=U?q.orig_p:q.p,e.labelLabel=l(N,e[d+"LabelVal"],v[d+"hoverformat"]),e.valueLabel=l(R,e[f+"LabelVal"],v[f+"hoverformat"]),e.baseLabel=l(R,q.b,v[f+"hoverformat"]),e.spikeDistance=(z=u,B=(F=q).b,j=I(F),(r.inbox(B-z,j-z,w+(j-z)/(j-B)-1)+function(e){return O(M(e),A(e),w)}(q))/2),e[d+"Spike"]=N.c2p(q.p,!0),i(q,v,e),e.hovertemplate=v.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=o(e,t);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}t.exports={hoverPoints:function(e,t,r,a,i){var o=c(e,t,r,a,i);if(o){var l=o.cd,s=l[0].trace,d=l[o.index];return o.color=u(s,d),n.getComponentMethod("errorbars","hoverInfo")(d,s,o),[o]}},hoverOnBars:c,getTraceColor:u}}),Xi=c((e,t)=>{t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}),Zi=c((e,t)=>{function r(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),l=r.c2p(n?e.p0:e.s0,!0),s=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(l+s)/2]:n?[o,(l+s)/2]:[(i+o)/2,s]}t.exports=function(e,t){var n,a=e.cd,i=e.xaxis,o=e.yaxis,l=a[0].trace,s="funnel"===l.type,c="h"===l.orientation,u=[];if(!1===t)for(n=0;n{t.exports={attributes:Fi(),layoutAttributes:zi(),supplyDefaults:ji().supplyDefaults,crossTraceDefaults:ji().crossTraceDefaults,supplyLayoutDefaults:Hi(),calc:Yi(),crossTraceCalc:ta().crossTraceCalc,colorbar:oa(),arraysToCalcdata:qi(),plot:Wi().plot,style:$i().style,styleOnSelect:$i().styleOnSelect,hoverPoints:Gi().hoverPoints,eventData:Xi(),selectPoints:Zi(),moduleType:"trace",name:"bar",basePlotModule:ba(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}),Ki=c((e,t)=>{t.exports=Ji()}),Qi=c((e,t)=>{var r=P(),n=vi().attributes,a=L(),i=R(),{hovertemplateAttrs:o,texttemplateAttrs:l,templatefallbackAttrs:s}=Se(),c=C().extendFlat,u=Ae().pattern,d=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:i.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:s(),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:s({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},d,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},d,{}),outsidetextfont:c({},d,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:c({},r.showlegend,{arrayOk:!0}),legend:c({},r.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},d,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:n({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}),eo=c((e,t)=>{var r=v(),n=et(),a=Qi(),i=vi().defaults,o=ji().handleText,l=et().coercePattern;function s(e,t){var a=n.isArrayOrTypedArray(e),i=n.isArrayOrTypedArray(t),o=Math.min(a?e.length:1/0,i?t.length:1/0);if(isFinite(o)||(o=0),o&&i){for(var l,s=0;s0){l=!0;break}}l||(o=0)}return{hasLabels:a,hasValues:i,len:o}}function c(e,t,r,n,a){n("marker.line.width")&&n("marker.line.color",a?void 0:r.paper_bgcolor);var i=n("marker.colors");l(n,"marker.pattern",i),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:s,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,l){function u(r,i){return n.coerce(e,t,a,r,i)}var d=s(u("labels"),u("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),f){t._length=f,c(e,t,l,u,!0),u("scalegroup");var h,p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",n.isArrayOrTypedArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");o(e,t,l,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&u("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&u("insidetextorientation")}else"none"===h&&u("textposition","none");i(t,l,u);var v=u("hole");if(u("title.text")){var y=u("title.position",v?"middle center":"top center");!v&&"middle center"===y&&(t.title.position="top center"),n.coerceFont(u,"title.font",l.font)}u("sort"),u("direction"),u("rotation"),u("pull")}else t.visible=!1}}}),to=c((e,t)=>{t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),ro=c((e,t)=>{var r=et(),n=to();t.exports=function(e,t){function a(a,i){return r.coerce(e,t,n,a,i)}a("hiddenlabels"),a("piecolorway",t.colorway),a("extendpiecolors")}}),no=c((e,t)=>{var r=v(),n=S(),a=F(),i={};function o(e){return function(t,r){return!(!t||(t=n(t),!t.isValid()))&&(t=a.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t)}}function l(e,t){var r,a=JSON.stringify(e),i=t[a];if(!i){for(i=e.slice(),r=0;r=0}),("funnelarea"===t.type?v:t.sort)&&i.sort(function(e,t){return t.v-e.v}),i[0]&&(i[0].vTotal=g),i},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,o=n[r+"colorway"],s=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(o=l(o,i));for(var c=0,u=0;u{var r=qt().appendArrayMultiPointValues;t.exports=function(e,t){var n={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(n.pointNumber=n.i=e.pts[0]),r(n,t,e.pts),"funnelarea"===t.type&&(delete n.v,delete n.i),n}}),io=c((e,t)=>{var r=f(),n=gt(),a=Ar(),i=F(),o=Ut(),l=et(),s=l.strScale,c=l.strTranslate,u=xt(),d=Vi(),h=d.recordMinTextSize,p=d.clearMinTextSize,m=ea().TEXTPAD,g=hr(),v=ao(),y=et().isValidTextValue;function x(e,t,n){var i=n[0],o=i.cx,s=i.cy,c=i.trace,u="funnelarea"===c.type;"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1),e.on("mouseover",function(e){var n=t._fullLayout,d=t._fullData[c.index];if(!t._dragging&&!1!==n.hovermode){var f=d.hoverinfo;if(Array.isArray(f)&&(f=a.castHoverinfo({hoverinfo:[g.castOption(f,e.pts)],_module:c._module},n,0)),"all"===f&&(f="label+text+value+percent+name"),d.hovertemplate||"none"!==f&&"skip"!==f&&f){var h=e.rInscribed||0,p=o+e.pxmid[0]*(1-h),m=s+e.pxmid[1]*(1-h),y=n.separators,x=[];if(f&&-1!==f.indexOf("label")&&x.push(e.label),e.text=g.castOption(d.hovertext||d.text,e.pts),f&&-1!==f.indexOf("text")){var b=e.text;l.isValidTextValue(b)&&x.push(b)}e.value=e.v,e.valueLabel=g.formatPieValue(e.v,y),f&&-1!==f.indexOf("value")&&x.push(e.valueLabel),e.percent=e.v/i.vTotal,e.percentLabel=g.formatPiePercent(e.percent,y),f&&-1!==f.indexOf("percent")&&x.push(e.percentLabel);var _=d.hoverlabel,w=_.font,T=[];a.loneHover({trace:c,x0:p-h*i.r,x1:p+h*i.r,y:m,_x0:u?o+e.TL[0]:p-h*i.r,_x1:u?o+e.TR[0]:p+h*i.r,_y0:u?s+e.TL[1]:m-h*i.r,_y1:u?s+e.BL[1]:m+h*i.r,text:x.join("
"),name:d.hovertemplate||-1!==f.indexOf("name")?d.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,e.pts)||e.color,borderColor:g.castOption(_.bordercolor,e.pts),fontFamily:g.castOption(w.family,e.pts),fontSize:g.castOption(w.size,e.pts),fontColor:g.castOption(w.color,e.pts),nameLength:g.castOption(_.namelength,e.pts),textAlign:g.castOption(_.align,e.pts),hovertemplate:g.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[v(e,d)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[v(e,d)],event:r.event})}}),e.on("mouseout",function(e){var n=t._fullLayout,i=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[v(o,i)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(n._hoverlayer.node()),c._hasHoverLabel=!1)}),e.on("click",function(e){var n=t._fullLayout,i=t._fullData[c.index];t._dragging||!1===n.hovermode||(t._hoverdata=[v(e,i)],a.click(t,r.event))})}function b(e,t,r){var n=g.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=g.castOption(e._input.textfont.color,t.pts));var a=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,o=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size,l=g.castOption(e.insidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||r.weight,s=g.castOption(e.insidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||r.style,c=g.castOption(e.insidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||r.variant,u=g.castOption(e.insidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||r.textcase,d=g.castOption(e.insidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=g.castOption(e.insidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||i.contrast(t.color),family:a,size:o,weight:l,style:s,variant:c,textcase:u,lineposition:d,shadow:f}}function _(e,t){for(var r,n,a=0;at&&t>n||r=-4;g-=2)v(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)v(Math.PI*(g+1),"tan")}if(d||h){for(g=4;g>=-4;g-=2)v(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)v(Math.PI*(g+.5),"rad")}}if(l||p||d){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((i={scale:a*n*2/y,rCenter:1-a,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,i.scale>=1)return i;m.push(i)}(p||h)&&((i=T(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(i)),(p||f)&&((i=k(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(i));for(var x=0,b=0,_=0;_=1)break}return m[x]}function T(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.width/e.height,o=E(i,n,t,r);return{scale:2*o/e.height,rCenter:M(i,o/t),rotate:A(a)}}function k(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.height/e.width,o=E(i,n,t,r);return{scale:2*o/e.width,rCenter:M(i,o/t),rotate:A(a+Math.PI/2)}}function M(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function E(e,t,r,n){var a=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(a*a+.5)+a),n/(Math.sqrt(e*e+n/2)+e))}function S(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function C(e,t){var r=t.pxmid[0],n=t.pxmid[1],a=e.width/2,i=e.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function L(e,t){var r,n,a,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,a=D(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*e.r,l.ty-=e.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*e.r);var s=function(e,t){return e/(void 0===t?1:t)}(e.r,e.trace.aspectratio),c=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(c+=s,o.x-=(1+a)*s,l.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?c*=2:-1!==i.title.position.indexOf("right")&&(c+=s,o.x+=(1+a)*s,l.tx-=e.titleBox.width/2),r=c/e.titleBox.width,n=O(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:l.tx,ty:l.ty}}function O(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function D(e){var t,r=e.pull;if(!r)return 0;if(l.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],n=0;n1?u=(c=r.r)/a.aspectratio:c=(u=r.r)*a.aspectratio,s=(c*=(1+a.baseratio)/2)*u}o=Math.min(o,s/r.vTotal)}for(n=0;n")}if(o){var b=l.castOption(i,t.i,"texttemplate");if(b){var _={label:(n=t).label,value:n.v,valueLabel:g.formatPieValue(n.v,a.separators),percent:n.v/r.vTotal,percentLabel:g.formatPiePercent(n.v/r.vTotal,a.separators),color:n.color,text:n.text,customdata:l.castOption(i,n.i,"customdata")},w=g.getFirstFilled(i.text,t.pts);(y(w)||""===w)&&(_.text=w),t.text=l.texttemplateString({data:[_,i._meta],fallback:i.texttemplatefallback,labels:_,locale:e._fullLayout._d3locale,template:b})}else t.text=""}}function R(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}t.exports={plot:function(e,t){var a=e._context.staticPlot,d=e._fullLayout,f=d._size;p("pie",d),_(t,e),I(t,f);var m=l.makeTraceGroups(d._pielayer,t,"trace").each(function(t){var p=r.select(this),m=t[0],v=m.trace;(function(e){var t,r,n,a=e[0],i=a.r,o=a.trace,l=g.getRotationAngle(o.rotation),s=2*Math.PI/a.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;ta.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-o.hole,r.rInscribed=S(r,a))})(t),p.attr("stroke-linejoin","round"),p.each(function(){var y=r.select(this).selectAll("g.slice").data(t);y.enter().append("g").classed("slice",!0),y.exit().remove();var _=[[[],[]],[[],[]]],T=!1;y.each(function(n,i){if(n.hidden)r.select(this).selectAll("path,g").remove();else{n.pointNumber=n.i,n.curveNumber=v.index,_[n.pxmid[1]<0?0:1][n.pxmid[0]<0?0:1].push(n);var s=m.cx,c=m.cy,f=r.select(this),p=f.selectAll("path.surface").data([n]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":a?"none":"all"}),f.call(x,e,t),v.pull){var y=+g.castOption(v.pull,n.pts)||0;y>0&&(s+=y*n.pxmid[0],c+=y*n.pxmid[1])}n.cxFinal=s,n.cyFinal=c;var k=v.hole;if(n.v===m.vTotal){var M="M"+(s+n.px0[0])+","+(c+n.px0[1])+O(n.px0,n.pxmid,!0,1)+O(n.pxmid,n.px0,!0,1)+"Z";k?p.attr("d","M"+(s+k*n.px0[0])+","+(c+k*n.px0[1])+O(n.px0,n.pxmid,!1,k)+O(n.pxmid,n.px0,!1,k)+"Z"+M):p.attr("d",M)}else{var A=O(n.px0,n.px1,!0,1);if(k){var E=1-k;p.attr("d","M"+(s+k*n.px1[0])+","+(c+k*n.px1[1])+O(n.px1,n.px0,!1,k)+"l"+E*n.px0[0]+","+E*n.px0[1]+A+"Z")}else p.attr("d","M"+s+","+c+"l"+n.px0[0]+","+n.px0[1]+A+"Z")}N(e,n,m);var S=g.castOption(v.textposition,n.pts),L=f.selectAll("g.slicetext").data(n.text&&"none"!==S?[0]:[]);L.enter().append("g").classed("slicetext",!0),L.exit().remove(),L.each(function(){var a=l.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),f=l.ensureUniformFontSize(e,"outside"===S?function(e,t,r){return{color:g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||r.color,family:g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,size:g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size,weight:g.castOption(e.outsidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||r.weight,style:g.castOption(e.outsidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||r.style,variant:g.castOption(e.outsidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||r.variant,textcase:g.castOption(e.outsidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||r.textcase,lineposition:g.castOption(e.outsidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||r.lineposition,shadow:g.castOption(e.outsidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||r.shadow}}(v,n,d.font):b(v,n,d.font));a.text(n.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,f).call(u.convertToTspans,e);var p,y=o.bBox(a.node());if("outside"===S)p=C(y,n);else if(p=w(y,n,m),"auto"===S&&p.scale<1){var x=l.ensureUniformFontSize(e,v.outsidetextfont);a.call(o.font,x),p=C(y=o.bBox(a.node()),n)}var _=p.textPosAngle,k=void 0===_?n.pxmid:P(m.r,_);if(p.targetX=s+k[0]*p.rCenter+(p.x||0),p.targetY=c+k[1]*p.rCenter+(p.y||0),R(p,y),p.outside){var M=p.targetY;n.yLabelMin=M-y.height/2,n.yLabelMid=M,n.yLabelMax=M+y.height/2,n.labelExtraX=0,n.labelExtraY=0,T=!0}p.fontSize=f.size,h(v.type,p,d),t[i].transform=p,l.setTransormAndDisplay(a,p)})}function O(e,t,r,a){var i=a*(t[0]-e[0]),o=a*(t[1]-e[1]);return"a"+a*m.r+","+a*m.r+" 0 "+n.largeArc+(r?" 1 ":" 0 ")+i+","+o}});var k=r.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);if(k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each(function(){var t,n=l.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),a=v.title.text;v._meta&&(a=l.templateString(a,v._meta)),n.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,v.title.font).call(u.convertToTspans,e),t="middle center"===v.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(m):L(m,f),n.attr("transform",c(t.x,t.y)+s(Math.min(1,t.scale))+c(t.tx,t.ty))}),T&&function(e,t){var r,n,a,i,o,s,c,u,d,f,h,p,m;function v(e,t){return e.pxmid[1]-t.pxmid[1]}function y(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,r){r||(r={});var a,u,d,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?e.yLabelMin:e.yLabelMax,v=n?e.yLabelMax:e.yLabelMin,y=e.cyFinal+o(e.px0[1],e.px1[1]),x=p-m;if(x*c>0&&(e.labelExtraY=x),l.isArrayOrTypedArray(t.pull))for(u=0;u=(g.castOption(t.pull,d.pts)||0))&&((e.pxmid[1]-d.pxmid[1])*c>0?(x=d.cyFinal+o(d.px0[1],d.px1[1])-m-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(v+e.labelExtraY-y)*c>0&&(a=3*s*Math.abs(u-f.indexOf(e)),(h=d.cxFinal+i(d.px0[0],d.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(a=n?v:y,o=n?Math.max:Math.min,c=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,(u=e[n][r]).sort(a),d=e[1-n][r],f=d.concat(u),p=[],h=0;hMath.abs(d)?s+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(o+e.labelExtraX+c):s+="l"+e.labelExtraX+","+u+"v"+(d-u)+"h"+c}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;l.ensureSingle(n,"path","textline").call(i.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else n.select("path.textline").remove()})}(y,v),T&&v.automargin){var M=o.bBox(p.node()),A=v.domain,E=f.w*(A.x[1]-A.x[0]),S=f.h*(A.y[1]-A.y[0]),O=(.5*E-m.r)/f.w,D=(.5*S-m.r)/f.h;n.autoMargin(e,"pie."+v.uid+".automargin",{xl:A.x[0]-O,xr:A.x[1]+O,yb:A.y[0]-D,yt:A.y[1]+D,l:Math.max(m.cx-m.r-M.left,0),r:Math.max(M.right-(m.cx+m.r),0),b:Math.max(M.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-M.top,0),pad:5})}})});setTimeout(function(){m.selectAll("tspan").each(function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))})},0)},formatSliceLabel:N,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:L,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:R}}),oo=c((e,t)=>{var r=f(),n=mr(),a=Vi().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");a(e,t,"pie"),t.each(function(t){var a=t[0].trace,i=r.select(this);i.style({opacity:a.opacity}),i.selectAll("path.surface").each(function(t){r.select(this).call(n,t,a,e)})})}}),lo=c(e=>{var t=gt();e.name="pie",e.plot=function(r,n,a,i){t.plotBasePlot(e.name,r,n,a,i)},e.clean=function(r,n,a,i){t.cleanBasePlot(e.name,r,n,a,i)}}),so=c((e,t)=>{t.exports={attributes:Qi(),supplyDefaults:eo().supplyDefaults,supplyLayoutDefaults:ro(),layoutAttributes:to(),calc:no().calc,crossTraceCalc:no().crossTraceCalc,plot:io().plot,style:oo(),styleOne:mr(),moduleType:"trace",name:"pie",basePlotModule:lo(),categories:["pie-like","pie","showLegend"],meta:{}}}),co=c((e,t)=>{t.exports=so()}),uo=c((e,t)=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s{var r=uo();function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function a(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function i(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function o(){this.shortYearCutoff="+10"}function l(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(n.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),r(a.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(s.local.differentCalendars||s.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+i(Math.abs(this.year()),4)+"-"+i(this.month(),2)+"-"+i(this.day(),2)}}),r(o.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new a(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+i(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return("y"===r||"m"===r)&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=a-(s>2.5?4716:4715);return c<=0&&c--,this.newDate(c,s,l)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var s=t.exports=new n;s.cdate=a,s.baseCalendar=o,s.calendars.gregorian=l}),ho=c(()=>{var e=uo(),t=fo();e(t.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,r,n){if("string"!=typeof e&&(n=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var a=(n=n||{}).dayNamesShort||this.local.dayNamesShort,i=n.dayNames||this.local.dayNames,o=n.monthNumbers||this.local.monthNumbers,l=n.monthNamesShort||this.local.monthNamesShort,s=n.monthNames||this.local.monthNames,c=(n.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;x+n1}),u=function(e,t,r,n){var a=""+t;if(c(e,n))for(;a.length1},x=function(e,n){var a=y(e,n),i=[2,3,a?4:2,a?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),l=r.substring(M).match(o);if(!l)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=l[0].length,parseInt(l[0],10)},b=this,_=function(){if("function"==typeof s){y("m");var e=s.call(b,r.substring(M));return M+=e.length,e}return x("m")},w=function(e,n,a,i){for(var o=y(e,i)?a:n,l=0;l-1){h=1,p=m;for(var S=this.daysInMonth(f,h);p>S;S=this.daysInMonth(f,h))h++,p-=S}return d>-1?this.fromJD(d):this.newDate(f,h,p)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,l=o.exec(e);l;)t.add(parseInt(l[1],10),l[2]||"d"),l=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})}),po=c(()=>{var e=fo(),t=uo(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(i);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),o=""+this.toChineseMonth(n,a);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(n,a)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(o);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(l);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,r,n){var a=this.intercalaryMonth(t);if(n&&r!==a||r<1||r>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!n&&r<=a?r-1:r:r-1},toChineseMonth:function(t,r){t.year&&(r=(t=t.year()).month());var n=this.intercalaryMonth(t);if(r<0||r>(n?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?r>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(t,n,a){var i,o=this._validateYear(t,e.local.invalidyear),l=c[o-c[0]],s=l>>9&4095,u=l>>5&15,d=31&l;(i=r.newDate(s,u,d)).add(4-(i.dayOfWeek()||7),"d");var f=this.toJD(t,n,a)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,r){t.year&&(r=t.month(),t=t.year()),t=this._validateYear(t);var n=s[t-s[0]];if(r>(n>>13?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-r?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,a){var i=this._validate(t,l,a,e.local.invalidDate);t=this._validateYear(i.year()),n=i.month(),a=i.day();var o=this.isIntercalaryMonth(t,n),l=this.toChineseMonth(t,n),u=function(e,t,r,n){var a,i,o;if("object"==typeof e)i=e,a=t||{};else{var l;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,a=n):(l=!!n,a={}),i={year:e,month:t,day:r,isIntercalary:l}}o=i.day-1;var u,d=s[i.year-s[0]],f=d>>13;u=f&&(i.month>f||i.isIntercalary)?i.month:i.month-1;for(var h=0;h>9&4095,(p>>5&15)-1,(31&p)+o);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.getDate(),a}(t,l,a,o);return r.toJD(u.year,u.month,u.day)},fromJD:function(e){var t=r.fromJD(e),n=function(e,t,r){var n,a;if("object"==typeof e)n=e,a=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");n={year:e,month:t,day:r},a={}}var i=c[n.year-c[0]],o=n.year<<9|n.month<<5|n.day;a.year=o>=i?n.year:n.year-1,i=c[a.year-c[0]];var l,u=new Date(i>>9&4095,(i>>5&15)-1,31&i),d=new Date(n.year,n.month-1,n.day);l=Math.round((d-u)/864e5);var f,h=s[a.year-s[0]];for(f=0;f<13;f++){var p=h&1<<12-f?30:29;if(l>13;return!m||f{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return(t=r.year()+(r.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);return(t=a.year())<0&&t++,a.day()+30*(a.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),e.calendars.coptic=r}),go=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,r,n){return(this._validate(t,r,n,e.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(t,r,a){var i=this._validate(t,r,a,e.local.invalidDate);return{century:n[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);return t=a.year()+(a.year()<0?1:0),r=a.month(),(n=a.day())+(r>1?16:0)+(r>2?32*(r-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var n={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=r}),vo=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return(t=r.year()+(r.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);return(t=a.year())<0&&t++,a.day()+30*(a.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),e.calendars.ethiopian=r}),yo=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return n(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),12===r&&this.leapYear(t)||8===r&&5===n(this.daysInYear(t),10)?30:9===r&&3===n(this.daysInYear(t),10)?29:this.daysPerMonth[r-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);t=a.year(),r=a.month(),n=a.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+n+1;if(r<7){for(var l=7;l<=this.monthsInYear(t);l++)o+=this.daysInMonth(t,l);for(l=1;l=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.hebrew=r}),xo=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);return t=a.year(),r=a.month(),t=t<=0?t+1:t,(n=a.day())+Math.ceil(29.5*(r-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.islamic=r}),bo=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return(t=r.year()<0?r.year()+1:r.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);return t=a.year(),r=a.month(),n=a.day(),t<0&&t++,r<=2&&(t--,r+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+n-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),l=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,l)}}),e.calendars.julian=r}),_o=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}function a(e,t){return n(e-1,t)+1}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year();var r=Math.floor(t/400);return t%=400,t+=t<0?400:0,r+"."+Math.floor(t/20)+"."+t%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,r){return this._validate(t,r,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate).day()},weekDay:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),!0},extraInfo:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=n(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,n(t,20)]},_toTzolkin:function(e){return[a(20+(e-=this.jdEpoch),20),a(e+4,13)]},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),e.calendars.mayan=r}),wo=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var n=e.instance("gregorian");t(r.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return n.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,a){var i=this._validate(t,r,a,e.local.invalidMonth);(t=i.year())<0&&t++;for(var o=i.day(),l=1;l=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),e.calendars.nanakshahi=r}),To=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[t][n];return r},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[t][r]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);t=a.year(),r=a.month(),n=a.day();var i=e.instance(),o=0,l=r,s=t;this._createMissingCalendarData(t);var c=t-(l>9||9===l&&n>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(9!==r&&(o=n,l--);9!==l;)l<=0&&(l=12,s--),o+=this.NEPALI_CALENDAR_DATA[s][l],l--;return 9===r?(o+=n-this.NEPALI_CALENDAR_DATA[s][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var r=e.instance().fromJD(t),n=r.year(),a=r.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)++o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var c=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,a=r*(t+1);return n-Math.floor(n)>a-Math.floor(a)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return n(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,a){var i=this._validate(t,r,a,e.local.invalidDate);t=i.year(),r=i.month(),a=i.day();var o=0;if(t>0)for(var l=1;l0?t-1:t)+o+this.jdEpoch-1},fromJD:function(e){var t=475+((e=Math.floor(e)+.5)-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,n(r)?30:29)&&0===++r&&r++;var a=e-this.toJD(r,1,1)+1,i=a<=186?Math.ceil(a/31):Math.ceil((a-6)/30),o=e-this.toJD(r,i,1)+1;return this.newDate(r,i,o)}}),e.calendars.persian=r,e.calendars.jalali=r}),Mo=c(()=>{var e=fo(),t=uo(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(n.year()),r.leapYear(t)},weekOfYear:function(t,n,a){var i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(i.year()),r.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,a){var i=this._validate(t,n,a,e.local.invalidDate);return t=this._t2gYear(i.year()),r.toJD(t,i.month(),i.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),e.calendars.taiwan=n}),Ao=c(()=>{var e=fo(),t=uo(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(n.year()),r.leapYear(t)},weekOfYear:function(t,n,a){var i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(i.year()),r.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,a){var i=this._validate(t,n,a,e.local.invalidDate);return t=this._t2gYear(i.year()),r.toJD(t,i.month(),i.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),e.calendars.thai=n}),Eo=c(()=>{var e=fo(),t=uo();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return 355===this.daysInYear(r.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(t,r){for(var a=this._validate(t,r,this.minDay,e.local.invalidMonth).toJD()-24e5+.5,i=0,o=0;oa)return n[i]-n[i-1];i++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,a){var i=this._validate(t,r,a,e.local.invalidDate),o=12*(i.year()-1)+i.month()-15292;return i.day()+n[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,a=0;at);a++)r++;var i=r+15292,o=Math.floor((i-1)/12),l=o+1,s=i-12*o,c=t-n[r-1]+1;return this.newDate(l,s,c)},isValid:function(t,r,n){var a=e.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(t=null!=t.year?t.year:t)>=1276&&t<=1500),a},_validate:function(t,r,n,a){var i=e.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),e.calendars.ummalqura=r;var n=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}),So=c((e,t)=>{t.exports=fo(),ho(),po(),mo(),go(),vo(),yo(),xo(),bo(),_o(),wo(),To(),ko(),Mo(),Ao(),Eo()}),Co=c((e,t)=>{var r=So(),n=et(),a=y(),i=a.EPOCHJD,o=a.ONEDAY,l={valType:"enumerated",values:n.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},s=function(e,t,r,a){var i={};return i[r]=l,n.coerce(e,t,i,r,a)},c="##",u={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:c,w:c,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},d={};function f(e){var t=d[e];return t||(d[e]=r.instance(e))}function h(e){return n.extendFlat({},l,{description:e})}function p(e){return"Sets the calendar system to use with `"+e+"` date data."}var m={xcalendar:h(p("x"))},g=n.extendFlat({},m,{ycalendar:h(p("y"))}),v=n.extendFlat({},g,{zcalendar:h(p("z"))}),x=h(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:g,bar:g,box:g,heatmap:g,contour:g,histogram:g,histogram2d:g,histogram2dcontour:g,scatter3d:v,surface:v,mesh3d:v,scattergl:g,ohlc:m,candlestick:m},layout:{calendar:h(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}}},layoutAttributes:l,handleDefaults:s,handleTraceDefaults:function(e,t,r,n){for(var a=0;a{t.exports=Co()}),c((e,t)=>{var r=Ri();r.register([Ki(),co(),Lo()]),t.exports=r})());return window.Plotly=Oo,Oo},e.exports?e.exports=r():t.moduleName=r()},655(e){"use strict";const t=2147483647,r=36,n=/^xn--/,a=/[^\0-\x7F]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,s=String.fromCharCode;function c(e){throw new RangeError(o[e])}function u(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const a=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(i,".")).split("."),t).join(".");return n+a}function d(e){const t=[];let r=0;const n=e.length;for(;r=55296&&a<=56319&&r=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:r},h=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},p=function(e,t,n){let a=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;a+=r)e=l(e/35);return l(a+36*e/(e+38))},m=function(e){const n=[],a=e.length;let i=0,o=128,s=72,u=e.lastIndexOf("-");u<0&&(u=0);for(let t=0;t=128&&c("not-basic"),n.push(e.charCodeAt(t));for(let d=u>0?u+1:0;d=a&&c("invalid-input");const u=f(e.charCodeAt(d++));u>=r&&c("invalid-input"),u>l((t-i)/n)&&c("overflow"),i+=u*n;const h=o<=s?1:o>=s+26?26:o-s;if(ul(t/p)&&c("overflow"),n*=p}const h=n.length+1;s=p(i-u,h,0==u),l(i/h)>t-o&&c("overflow"),o+=l(i/h),i%=h,n.splice(i++,0,o)}return String.fromCodePoint(...n)},g=function(e){const n=[],a=(e=d(e)).length;let i=128,o=0,u=72;for(const t of e)t<128&&n.push(s(t));const f=n.length;let m=f;for(f&&n.push("-");m=i&&tl((t-o)/d)&&c("overflow"),o+=(a-i)*d,i=a;for(const a of e)if(at&&c("overflow"),a===i){let e=o;for(let t=r;;t+=r){const a=t<=u?1:t>=u+26?26:t-u;if(eString.fromCodePoint(...e)},decode:m,encode:g,toASCII:function(e){return u(e,function(e){return a.test(e)?"xn--"+g(e):e})},toUnicode:function(e){return u(e,function(e){return n.test(e)?m(e.slice(4).toLowerCase()):e})}};e.exports=v},312(e,t){var r,n;r=function(e){"use strict";var t=Object.assign||function(e){for(var t=1;tMath.abs(r[i][o])&&(o=l);for(var s=i;s=i;d--)r[d][u]-=r[d][i]*r[i][u]/r[i][i]}for(var f=n-1;f>=0;f--){for(var h=0,p=f+1;p=0;b--)x+=b>1?g[b]+"x^"+b+" + ":1===b?g[b]+"x + ":g[b];return{string:x,points:y,predict:v,equation:[].concat(r(g)).reverse(),r2:i(a(e,y),t.precision)}}};e.exports=Object.keys(o).reduce(function(e,r){return t({_round:i},e,(s=function(e,a){return o[r](e,t({},n,a))},(l=r)in(a={})?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a));var a,l,s},{})},void 0===(n=r.apply(t,[e]))||(e.exports=n)},255(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,n;(0,a.default)(e),"object"===i(t)?(r=t.min||0,n=t.max):(r=arguments[1],n=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&(void 0===n||o<=n)};var n,a=(n=r(399))&&n.__esModule?n:{default:n};function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}e.exports=t.default,e.exports.default=t.default},517(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,s.default)(t,u)).require_display_name||t.allow_display_name){var r=e.match(d);if(r){var c=r[1];if(e=e.replace(c,"").replace(/(^<|>$)/g,""),c.endsWith(" ")&&(c=c.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(t.split('"').length!==t.split('\\"').length)return!1}return!0}(c))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>254)return!1;var v=e.split("@"),y=v.pop(),x=y.toLowerCase();if(t.host_blacklist.length>0&&(0,a.default)(x,t.host_blacklist))return!1;if(t.host_whitelist.length>0&&!(0,a.default)(x,t.host_whitelist))return!1;var b=v.join("@");if(t.domain_specific_validation&&("gmail.com"===x||"googlemail.com"===x)){var _=(b=b.toLowerCase()).split("+")[0];if(!(0,i.default)(_.replace(/\./g,""),{min:6,max:30}))return!1;for(var w=_.split("."),T=0;T63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))})};var n=i(r(399)),a=i(r(610));function i(e){return e&&e.__esModule?e:{default:e}}var o={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},372(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.default)(t);var n=("object"===i(r)?r.version:arguments[1])||"";return n?"4"===n.toString()?s.test(t):"6"===n.toString()&&u.test(t):e(t,{version:4})||e(t,{version:6})};var n,a=(n=r(399))&&n.__esModule?n:{default:n};function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",l="(".concat(o,"[.]){3}").concat(o),s=new RegExp("^".concat(l,"$")),c="(?:[0-9a-fA-F]{1,4})",u=new RegExp("^("+"(?:".concat(c,":){7}(?:").concat(c,"|:)|")+"(?:".concat(c,":){6}(?:").concat(l,"|:").concat(c,"|:)|")+"(?:".concat(c,":){5}(?::").concat(l,"|(:").concat(c,"){1,2}|:)|")+"(?:".concat(c,":){4}(?:(:").concat(c,"){0,1}:").concat(l,"|(:").concat(c,"){1,3}|:)|")+"(?:".concat(c,":){3}(?:(:").concat(c,"){0,2}:").concat(l,"|(:").concat(c,"){1,4}|:)|")+"(?:".concat(c,":){2}(?:(:").concat(c,"){0,3}:").concat(l,"|(:").concat(c,"){1,5}|:)|")+"(?:".concat(c,":){1}(?:(:").concat(c,"){0,4}:").concat(l,"|(:").concat(c,"){1,6}|:)|")+"(?::((?::".concat(c,"){0,5}:").concat(l,"|(?::").concat(c,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");e.exports=t.default,e.exports.default=t.default},844(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,s.default)(t,d)).validate_length&&e.length>t.max_allowed_length)return!1;if(!t.allow_fragments&&(0,i.default)(e,"#"))return!1;if(!t.allow_query_components&&((0,i.default)(e,"?")||(0,i.default)(e,"&")))return!1;var r,c,h,p,m,g,v,y;v=e.split("#"),e=v.shift(),v=e.split("?");var x,b=(e=v.shift()).match(/^([a-z][a-z0-9+\-.]*):/i),_=!1,w=function(n){return _=!0,r=n.toLowerCase(),(!t.require_valid_protocol||-1!==t.protocols.indexOf(r))&&e.substring(b[0].length)};if(b){var T=b[1],k=e.substring(b[0].length);if("//"===k.slice(0,2)){if(!1===(e=w(T)))return!1}else{var M=k.indexOf("/"),A=-1===M?k:k.substring(0,M),E=A.indexOf("@");if(-1!==E){var S=A.substring(0,E),C=/^[a-zA-Z0-9\-_.%:]*$/.test(S),L=/%[0-9a-fA-F]{2}/.test(S);if(C&&!L){if(t.require_protocol)return!1}else if(!1===(e=w(T)))return!1}else if(/^[0-9]/.test(k)){if(t.require_protocol)return!1}else if(!1===(e=w(T)))return!1}}else if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!_&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(""===e)return!1;if(v=e.split("/"),""===(e=v.shift())&&!t.require_host)return!0;if((v=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===v[0])return!1;if((c=v.shift()).indexOf(":")>=0&&c.split(":").length>2)return!1;var O=function(e){if(Array.isArray(e))return e}(x=c.split(":"))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,a,i,o=[],l=!0,s=!1;try{for(a=(t=t.call(e)).next,!2;!(l=(r=a.call(t)).done)&&(o.push(r.value),2!==o.length);l=!0);}catch(e){s=!0,n=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(s)throw n}}return o}}(x)||function(e){if(e){if("string"==typeof e)return u(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,2):void 0}}(x)||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.")}(),D=O[0],I=O[1];if(""===D&&""===I)return!1}g=null,y=null;var P=(p=v.join("@")).match(f);if(P?(h="",y=P[1],g=P[2]||null):(h=(v=p.split(":")).shift(),v.length&&(g=v.join(":"))),null!==g&&g.length>0){if(m=parseInt(g,10),!/^[0-9]+$/.test(g)||m<=0||m>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?(0,a.default)(h,t.host_whitelist):""===h&&!t.require_host||!!((0,l.default)(h)||(0,o.default)(h,t)||y&&(0,l.default)(y,6))&&(h=h||y,!t.host_blacklist||!(0,a.default)(h,t.host_blacklist))};var n=c(r(399)),a=c(r(572)),i=c(r(636)),o=c(r(658)),l=c(r(372)),s=c(r(610));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(484),r(960),r(647),r(13);var e=r(635),t=r.n(e),n=r(451),a=r.n(n),i=r(653),o=r.n(i),l=r(575),s=r.n(l),c=r(312),u=r.n(c);class d{static seekWidth=2;isoList;constructor(e){const t={},r=Object.keys(e);for(const n of r){const r=e[n];for(const e of r)t[e]=n}this.isoList=t}seek(e,t=d.seekWidth){const r=Object.keys(this.isoList).filter(r=>!!r&&Math.abs(parseFloat(r)-e)<=t).map(e=>parseFloat(e));if(r.length){const t=r.reduce((t,r)=>Math.abs(r-e)e-t),this.calibratedBins=t,this.yAxis=r}energyToBin(){const e=this.peakList.length,t=this.calibratedBins.length,r=[];let n=0;for(let a=0;athis.peakList[n]&&(r.push(a),n++,n>=e));a++);return r}linearInterp(e,t,r,n,a){const i=(t-n)/(e-r);return(a-(t-i*e))/i}compute(){const e=this.energyToBin(),t={};for(const r in e){const n=e[r],a=this.peakList[r],i=a*f.resolutionLimit,o=a-i/2,l=this.yAxis[n]/2;let s=n,c=this.calibratedBins[s],u=this.yAxis[s];for(;c>o&&u>l;)s--,c=this.calibratedBins[s],u=this.yAxis[s];const d=a-this.linearInterp(c,u,this.calibratedBins[s+1],this.yAxis[s+1],l);if(f.fastMode){t[a]=2*d;continue}const h=a+i/2;let p=n,m=this.calibratedBins[p],g=this.yAxis[p];for(;ml;)p++,m=this.calibratedBins[p],g=this.yAxis[p];const v=this.linearInterp(m,g,this.calibratedBins[p-1],this.yAxis[p-1],l)-a;t[a]=d+v}return t}getResolution(){const e=this.compute(),t={};for(const[r,n]of Object.entries(e)){const e=parseFloat(r);t[e]=n/e}return t}}const h=e=>"object"==typeof e?null===e?"null":Array.isArray(e)?"array":"object":"number"==typeof e?Number.isFinite(e)?e%1==0?"integer":"number":Number.isNaN(e)?"not-a-number":"unknown-number":typeof e;function p(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function m(e){return"number"==typeof e&&Number.isFinite(e)&&e%1==0}const g=e=>e.$id?e.$id:e.id?e.id:void 0,v=(e,t)=>{if("object"!=typeof e||null===e)return;if(!t)return e;const r=g(e);if(r&&(r===t||"#"===r[0]&&r.substring(1)===t))return e;let n,a;if(Array.isArray(e))for(n=e.length;n--;)if(a=v(e[n],t),a)return a;if(p(e)){const r=Object.keys(e);for(n=r.length;n--;){const i=r[n];if(0!==i.indexOf("__$")&&(a=v(e[i],t),a))return a}}},y={INVALID_TYPE:"Expected type {0} but found type {1}",INVALID_FORMAT:"Object didn't pass validation for format {0}: {1}",ENUM_MISMATCH:"No enum match for: {0}",ENUM_CASE_MISMATCH:"Enum does not match case for: {0}",ANY_OF_MISSING:"Data does not match any schemas from 'anyOf'",ONE_OF_MISSING:"Data does not match any schemas from 'oneOf'",ONE_OF_MULTIPLE:"Data is valid against more than one schema from 'oneOf'",NOT_PASSED:"Data matches schema from 'not'",ARRAY_LENGTH_SHORT:"Array is too short ({0}), minimum {1}",ARRAY_LENGTH_LONG:"Array is too long ({0}), maximum {1}",ARRAY_UNIQUE:"Array items are not unique (indexes {0} and {1})",ARRAY_ADDITIONAL_ITEMS:"Additional items not allowed",MULTIPLE_OF:"Value {0} is not a multiple of {1}",MINIMUM:"Value {0} is less than minimum {1}",MINIMUM_EXCLUSIVE:"Value {0} is equal or less than exclusive minimum {1}",MAXIMUM:"Value {0} is greater than maximum {1}",MAXIMUM_EXCLUSIVE:"Value {0} is equal or greater than exclusive maximum {1}",OBJECT_PROPERTIES_MINIMUM:"Too few properties defined ({0}), minimum {1}",OBJECT_PROPERTIES_MAXIMUM:"Too many properties defined ({0}), maximum {1}",OBJECT_MISSING_REQUIRED_PROPERTY:"Missing required property: {0}",OBJECT_ADDITIONAL_PROPERTIES:"Additional properties not allowed: {0}",OBJECT_DEPENDENCY_KEY:"Dependency failed - key must exist: {0} (due to key: {1})",MIN_LENGTH:"String is too short ({0} chars), minimum {1}",MAX_LENGTH:"String is too long ({0} chars), maximum {1}",PATTERN:"String does not match pattern {0}: {1}",KEYWORD_TYPE_EXPECTED:"Keyword '{0}' is expected to be of type '{1}'",KEYWORD_UNDEFINED_STRICT:"Keyword '{0}' must be defined in strict mode",KEYWORD_UNEXPECTED:"Keyword '{0}' is not expected to appear in the schema",KEYWORD_MUST_BE:"Keyword '{0}' must be {1}",KEYWORD_DEPENDENCY:"Keyword '{0}' requires keyword '{1}'",KEYWORD_PATTERN:"Keyword '{0}' is not a valid RegExp pattern: {1}",KEYWORD_VALUE_TYPE:"Each element of keyword '{0}' array must be a '{1}'",UNKNOWN_FORMAT:"There is no validation function for format '{0}'",CUSTOM_MODE_FORCE_PROPERTIES:"{0} must define at least one property if present",REF_UNRESOLVED:"Reference has not been resolved during compilation: {0}",UNRESOLVABLE_REFERENCE:"Reference could not be resolved: {0}",SCHEMA_NOT_REACHABLE:"Validator was not able to read schema with uri: {0}",SCHEMA_TYPE_EXPECTED:"Schema is expected to be of type 'object'",SCHEMA_NOT_AN_OBJECT:"Schema is not an object: {0}",ASYNC_TIMEOUT:"{0} asynchronous task(s) have timed out after {1} ms",PARENT_SCHEMA_VALIDATION_FAILED:"Schema failed to validate against its parent schema, see inner errors for details.",REMOTE_NOT_VALID:"Remote reference didn't compile successfully: {0}",SCHEMA_IS_FALSE:'Boolean schema "false" is always invalid.',CONST:"Value does not match const: {0}",CONTAINS:"Array does not contain an item matching the schema",PROPERTY_NAMES:"Property name {0} does not match the propertyNames schema"};class x extends Error{name;details;constructor(e,t){super(e),this.name="z-schema validation error",this.details=t}}function b({message:e,details:t}){return new x(e||"",t)}const _=(e,t,r)=>{const n=(r=r||{}).caseInsensitiveComparison||!1;if(e===t)return!0;if(!0===n&&"string"==typeof e&&"string"==typeof t&&e.toUpperCase()===t.toUpperCase())return!0;let a,i;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(i=e.length,a=0;adecodeURIComponent(e).replace(/~[0-1]/g,e=>"~1"===e?"/":"~"),T=e=>Object.keys(e).sort(),k=(e,t)=>("string"==typeof t&&(t=t.split(".")),t.reduce((e,t)=>e&&void 0!==e[t]?e[t]:void 0,e)),M=Symbol.for("z-schema/json"),A=Symbol.for("z-schema/schema"),E=e=>{const t=e.indexOf("#");return-1===t?e:e.slice(0,t)},S=e=>/^(https?|file):\/\//.test(e);class C{asyncTasks=[];commonErrorMessage;errors=[];json;path=[];schemaPath=[];rootSchema;parentReport;options;reportOptions;validateOptions={};constructor(e,t,r){this.parentReport=e instanceof C?e:void 0,this.options=e instanceof C?e.options:e||{},e instanceof C?(this.reportOptions=t||{},this.validateOptions=r||e.validateOptions):(this.reportOptions={},this.validateOptions=t||{})}isValid(){if(this.asyncTasks.length>0)throw new Error("Async tasks pending, can't answer isValid");return 0===this.errors.length}addAsyncTask(e,t,r){this.asyncTasks.push([e,t,r])}getAncestor(e){if(this.parentReport)return this.parentReport.getSchemaId()===e?this.parentReport:this.parentReport.getAncestor(e)}processAsyncTasks(e,t){const r=e||2e3;let n=this.asyncTasks.length,a=n,i=!1;const o=()=>{setTimeout(()=>{const e=0===this.errors.length,r=e?void 0:b({details:this.errors});t(r,e)},0)},l=e=>t=>{i||(e(t),0===--n&&o())};if(0===n||this.errors.length>0&&this.options.breakOnFirstError)o();else{for(;a--;){const[e,t,r]=this.asyncTasks[a];e(...t,l(r))}setTimeout(()=>{n>0&&(i=!0,this.addError("ASYNC_TIMEOUT",[n,r]),t(b({details:this.errors}),!1))},r)}}getPath(e){let t=[];return this.parentReport&&(t=t.concat(this.parentReport.path)),t=t.concat(this.path),!0!==e?"#/"+t.map(function(e){return e=e.toString(),S(e)?"uri("+e+")":e.replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):t}getSchemaPath(){let e=[];return this.parentReport&&(e=e.concat(this.parentReport.schemaPath)),e=e.concat(this.schemaPath),e}getSchemaId(){if(!this.rootSchema)return;let e=[];for(this.parentReport&&(e=e.concat(this.parentReport.path)),e=e.concat(this.path);e.length>0;){const t=k(this.rootSchema,e);if(t&&t.id)return t.id;e.pop()}return this.rootSchema.id}hasError(e,t){let r=this.errors.length;for(;r--;)if(this.errors[r].code===e){let e=!0,n=this.errors[r].params.length;for(;n--;)this.errors[r].params[n]!==t[n]&&(e=!1);if(e)return e}return!1}addError(e,t,r,n,a){if(!e)throw new Error("No errorCode passed into addError()");this.addCustomError(e,y[e],t,r,n,a)}getJson(){return this.json?this.json:this.parentReport?this.parentReport.getJson():void 0}addCustomError(e,t,r,n,a,i){if("number"==typeof this.reportOptions.maxErrors&&this.errors.length>=this.reportOptions.maxErrors)return;if(!t)throw new Error("No errorMessage known for code "+e);let o=(r=r||[]).length;for(;o--;){const e=null===r[o]||p(r[o])?JSON.stringify(r[o]):r[o];t=t.replace("{"+o+"}",e.toString())}const l={code:e,params:r,message:t,path:this.getPath(this.options.reportPathAsArray),schemaPath:this.getSchemaPath(),schemaId:this.getSchemaId(),keyword:i};if(l[A]=a,l[M]=this.getJson(),a&&"string"==typeof a?l.description=a:a&&"object"==typeof a&&(a.title&&(l.title=a.title),a.description&&(l.description=a.description)),null!=n){for(Array.isArray(n)||(n=[n]),l.inner=[],o=n.length;o--;){const e=n[o];let t=e.errors.length;for(;t--;)l.inner.push(e.errors[t])}0===l.inner.length&&(l.inner=void 0)}Array.isArray(this.validateOptions.excludeErrors)&&this.validateOptions.excludeErrors.includes(e)||this.errors.push(l)}}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function O(e,t,r,n){L(e,r)&&Object.defineProperty(t,r,{value:n?n(e[r]):e[r],enumerable:!0,writable:!0,configurable:!0})}const D=e=>{if(null==e||"object"!=typeof e)return e;let t,r;if(Array.isArray(e))for(t=[],r=e.length;r--;)t[r]=e[r];else{t={};const r=Object.keys(e).sort();for(const n of r)O(e,t,n)}return t},I=e=>{let t=0;const r=new Map,n=[],a=e=>{if("object"!=typeof e||null===e)return e;let i,o;const l=r.get(e);if(void 0!==l)return n[l];if(r.set(e,t++),Array.isArray(e))for(i=[],n.push(i),o=e.length;o--;)i[o]=a(e[o]);else{i={},n.push(i);const t=Object.keys(e).sort();for(const r of t)O(e,i,r,a)}return i};return a(e)};class P{validator;static global_cache={};cache={};constructor(e){this.validator=e}static cacheSchemaByUri(e,t){const r=E(e);r&&(this.global_cache[r]=t)}cacheSchemaByUri(e,t){const r=E(e);r&&(this.cache[r]=t)}removeFromCacheByUri(e){const t=E(e);t&&delete this.cache[t]}checkCacheForUri(e){const t=E(e);return!!t&&null!=this.cache[t]}getSchema(e,t){return Array.isArray(t)?t.map(t=>this.getSchema(e,t)):"string"==typeof t?this.getSchemaByUri(e,t):I(t)}fromCache(e){let t=this.cache[e];return t?this.cache[e]:(t=P.global_cache[e],t?((!(r=t).id||!S(r.id)&&S(e))&&(r.id=e),I(r)):void 0);var r}getSchemaByUri(e,t,r){if(r&&!S(t)){let e=g(r);if(e&&S(e)||"string"!=typeof r.id||!S(r.id)||(e=r.id),e&&S(e)){const r=e.indexOf("#"),n=-1===r?e:e.slice(0,r);try{t=new URL(t,n).toString()}catch{}}}const n=E(t),a=(e=>{const t=e.indexOf("#");return-1===t?void 0:e.slice(t+1)})(t);let i=n?this.fromCache(n):r;if(!(i&&n&&S(n))||i.id&&S(i.id)||(i.id=n),i&&n&&i!==r){let r;e.path.push(n);const a=i.id?e.getAncestor(i.id):void 0;if(a)r=a;else{r=new C(e);const t=!i.id||!S(i.id);if(this.validator.sc.compileSchema(r,i,{noCache:t})){const e=this.validator.options;try{this.validator.options=i.__$validationOptions||this.validator.options,this.validator.sv.validateSchema(r,i)}finally{this.validator.options=e}}}const o=r.isValid();if(o||e.addError("REMOTE_NOT_VALID",[t],r),e.path.pop(),!o)return}if(i&&a){const e=a.split("/");for(let t=0,r=e.length;i&&t{let t;if("object"==typeof e){let r,n=Object.keys(e),a=n.length;for(;a--;)if(r=n[a],void 0===R[r])throw new Error("Unexpected option passed to constructor: "+r);for(n=Object.keys(R),a=n.length;a--;)r=n[a],void 0===e[r]&&(e[r]=D(R[r]));t=e}else t=D(R);return!0===t.strictMode&&(t.forceAdditional=!0,t.forceItems=!0,t.forceMaxLength=!0,t.forceProperties=!0,t.noExtraKeywords=!0,t.noTypeless=!0,t.noEmptyStrings=!0,t.noEmptyArrays=!0),t},z=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}'),B=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}'),j=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}'),H=(e,t,r)=>{const n=t;n.id||(n.id=e),r&&(n.__$validationOptions=F(r)),P.cacheSchemaByUri(e,n)};H("http://json-schema.org/draft-04/schema",z,{version:"none"}),H("http://json-schema.org/draft-06/schema",B,{version:"none"}),H("http://json-schema.org/draft-07/schema",j,{version:"none"});var q=r(517),Y=r(372),V=r(844);const U=(e,t,r)=>{if(t<1||t>12)return!1;const n=((e,t)=>{switch(t){case 2:return(e=>e%4==0&&(e%100!=0||e%400==0))(e)?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}})(e,t);return r>=1&&r<=n};var $=r(655);const W=/[\u3002\uff0e\uff61]/g,G=/[\u3002\uff0e\uff61]/,X=e=>{if(0===e.length||e.length>255)return null;if(e.startsWith(".")||e.endsWith("."))return null;const t=e.split(".");return t.some(e=>0===e.length||e.length>63)?null:t},Z=e=>/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(e),J=e=>/\p{Script=Greek}/u.test(e),K=e=>/\p{Script=Hebrew}/u.test(e),Q=e=>{if(!/^xn--/i.test(e))return e;try{return $.toUnicode(e.toLowerCase())}catch(e){return null}},ee=e=>{if(e.startsWith("-")||e.endsWith("-"))return!1;if(e.length>=4&&"-"===e[2]&&"-"===e[3]&&!/^xn--/i.test(e))return!1;if(/^\p{M}/u.test(e))return!1;if(/[\u302e\u302f\u0640\u07fa]/u.test(e))return!1;for(let t=0;t{const t=te.exec(e);if(null===t)return null;const r=parseInt(t[1],10),n=parseInt(t[2],10),a=parseInt(t[3],10);if(r>23||n>59||a>60)return null;let i=r,o=n;if("z"!==t[5].toLowerCase()){const e=/^([+-])([0-9]{2}):([0-9]{2})$/.exec(t[5]);if(null===e)return null;const a=e[1],l=parseInt(e[2],10),s=parseInt(e[3],10);if(l>23||s>59)return null;const c=((e,t,r,n,a)=>{const i=60*e+t,o=60*n+a,l=(("+"===r?i-o:i+o)%1440+1440)%1440;return{hour:Math.floor(l/60),minute:l%60}})(r,n,a,l,s);i=c.hour,o=c.minute}return 60!==a||23===i&&59===o?{hour:r,minute:n,second:a,utcHour:i,utcMinute:o}:null},ne=e=>"string"!=typeof e||(e=>{if(G.test(e)||/[^\x00-\x7F]/.test(e))return!1;if(Y.default(e,4))return!1;const t=X(e);if(null===t)return!1;for(const e of t){if(!Z(e))return!1;const t=Q(e);if(null===t||!ee(t))return!1}return!0})(e),ae=e=>"string"!=typeof e||V.default(e),ie={date:e=>{if("string"!=typeof e)return!0;const t=/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.exec(e);if(null===t)return!1;const r=parseInt(t[1],10),n=parseInt(t[2],10),a=parseInt(t[3],10);return U(r,n,a)},"date-time":e=>{if("string"!=typeof e)return!0;const t=e.toLowerCase().split("t");if(2!==t.length)return!1;const r=t[0],n=t[1],a=/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.exec(r);if(null===a)return!1;const i=parseInt(a[1],10),o=parseInt(a[2],10),l=parseInt(a[3],10);return!!U(i,o,l)&&null!==re(n)},email:e=>"string"!=typeof e||q.default(e,{require_tld:!0}),hostname:ne,"host-name":ne,ipv4:e=>"string"!=typeof e||Y.default(e,4),ipv6:e=>"string"!=typeof e||!e.includes("%")&&Y.default(e,6),regex:e=>{if("string"!=typeof e)return!0;try{return RegExp(e),!0}catch(e){return!1}},uri:function(e){if("string"!=typeof e)return!0;if(/[^\x00-\x7F]/.test(e))return!1;const t=e.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):\/\/([^/]*)/);if(t){const e=t[2],r=e.indexOf("@");if(r>0){const t=e.substring(0,r);if(t.includes("[")||t.includes("]"))return!1}}return/^[a-zA-Z][a-zA-Z0-9+.-]*:[^"\\<>^{}^`| ]*$/.test(e)},"strict-uri":ae,"uri-reference":e=>"string"!=typeof e||!/[^\x00-\x7F]/.test(e)&&/^([a-zA-Z][a-zA-Z0-9+.-]*:)?[^"\\<>^{}^`| ]*$/.test(e),"uri-template":e=>{if("string"!=typeof e)return!0;if(!/^([a-zA-Z][a-zA-Z0-9+.-]*:)?[^"\\<>^`| ]*$/.test(e))return!1;let t=!1;for(let r=0;r"string"!=typeof e||""===e||/^(?:\/(?:[^~]|~0|~1)*)+$/.test(e),"relative-json-pointer":e=>"string"!=typeof e||/^(?:0|[1-9]\d*)(?:#|(?:\/(?:[^~]|~0|~1)*)+)?$/.test(e),time:e=>"string"!=typeof e||null!==re(e),"idn-email":e=>"string"!=typeof e||/^[^\s@]+@[^\s@]+$/.test(e),"idn-hostname":e=>"string"!=typeof e||(e=>{const t=e.replace(W,"."),r=X(t);if(null===r)return!1;for(const e of r){const t=Q(e);if(null===t||!ee(t))return!1}return!0})(e),iri:e=>{if("string"!=typeof e)return!0;if(!/^[a-zA-Z][a-zA-Z0-9+.-]*:[^"\\<>^{}^`| ]*$/u.test(e))return!1;try{return new URL(e),!0}catch(e){return!1}},"iri-reference":e=>"string"!=typeof e||/^([a-zA-Z][a-zA-Z0-9+.-]*:)?[^"\\<>^{}^`| ]*$/u.test(e)},oe={};function le(e){const t={...ie,...oe,...e};return T(t).filter(e=>null!=t[e])}const se=(e,t)=>{let r,n;const a=e.length;for(r=0;re.length%4==0&&ce.test(e);function de(e){if(/\\[pP]{/.test(e)||/[\u{10000}-\u{10FFFF}]/u.test(e)||/\\uD[89AB][0-9A-Fa-f]{2}\\uD[CDEF][0-9A-Fa-f]{2}/.test(e))try{return{ok:!0,value:new RegExp(e,"u")}}catch(t){return{ok:!1,error:{pattern:e,message:t&&t.message?t.message:"Invalid regular expression"}}}else try{return{ok:!0,value:new RegExp(e)}}catch(t){return{ok:!1,error:{pattern:e,message:t&&t.message?t.message:"Invalid regular expression"}}}}function fe(e){const t=[];let r=0;const n=e.length;let a,i;for(;r=55296&&a<=56319&&r0&&!t.some(function(t){return e.includeErrors.includes(t)})},pe={id:()=>{},$ref:()=>{},$schema:()=>{},title:()=>{},description:()=>{},default:()=>{},multipleOf:function(e,t,r){if(he(this.validateOptions,["MULTIPLE_OF"]))return;if("number"!=typeof r)return;const n=r/t.multipleOf;(!Number.isFinite(n)||Math.abs(n-Math.round(n))>=1e-10)&&e.addError("MULTIPLE_OF",[r,t.multipleOf],void 0,t,"multipleOf")},maximum:function(e,t,r){he(this.validateOptions,["MAXIMUM","MAXIMUM_EXCLUSIVE"])||"number"==typeof r&&(!0!==t.exclusiveMaximum?r>t.maximum&&e.addError("MAXIMUM",[r,t.maximum],void 0,t,"maximum"):r>=t.maximum&&e.addError("MAXIMUM_EXCLUSIVE",[r,t.maximum],void 0,t,"maximum"))},exclusiveMaximum:function(e,t,r){if("number"==typeof t.exclusiveMaximum){if(he(this.validateOptions,["MAXIMUM_EXCLUSIVE"]))return;if("number"!=typeof r)return;r>=t.exclusiveMaximum&&e.addError("MAXIMUM_EXCLUSIVE",[r,t.exclusiveMaximum],void 0,t,"exclusiveMaximum")}},minimum:function(e,t,r){he(this.validateOptions,["MINIMUM","MINIMUM_EXCLUSIVE"])||"number"==typeof r&&(!0!==t.exclusiveMinimum?rt.maxLength&&e.addError("MAX_LENGTH",[r.length,t.maxLength],void 0,t,"maxLength")},minLength:function(e,t,r){he(this.validateOptions,["MIN_LENGTH"])||"string"==typeof r&&fe(r).lengtht.items.length&&e.addError("ARRAY_ADDITIONAL_ITEMS",void 0,void 0,t,"additionalItems")},items:function(){},maxItems:function(e,t,r){he(this.validateOptions,["ARRAY_LENGTH_LONG"])||Array.isArray(r)&&r.length>t.maxItems&&e.addError("ARRAY_LENGTH_LONG",[r.length,t.maxItems],void 0,t,"maxItems")},minItems:function(e,t,r){he(this.validateOptions,["ARRAY_LENGTH_SHORT"])||Array.isArray(r)&&r.lengtht.maxProperties&&e.addError("OBJECT_PROPERTIES_MAXIMUM",[n,t.maxProperties],void 0,t,"maxProperties")},minProperties:function(e,t,r){if(he(this.validateOptions,["OBJECT_PROPERTIES_MINIMUM"]))return;if(!p(r))return;const n=Object.keys(r).length;n{const r=[];let n=e.length;for(;n--;)-1===t.indexOf(e[n])&&r.push(e[n]);return r})(i,o);let s=l.length;for(;s--;){const e=de(l[s]);if(!e.ok)continue;const t=e.value;let r=i.length;for(;r--;)!0===t.test(i[r])&&i.splice(r,1)}if(i.length>0){if(Array.isArray(this.options.assumeAdditional)){let e=this.options.assumeAdditional.length;if(e)for(;e--;){const t=i.indexOf(this.options.assumeAdditional[e]);-1!==t&&i.splice(t,1)}}let r=i.length;if(r)for(;r--;)e.addError("OBJECT_ADDITIONAL_PROPERTIES",[i[r]],void 0,t,"properties")}}},dependencies:function(e,t,r){if(he(this.validateOptions,["OBJECT_DEPENDENCY_KEY"]))return;if(!p(r))return;const n=Object.keys(t.dependencies);let a=n.length;for(;a--;){const i=n[a];if(L(r,i)){const n=t.dependencies[i];if(Array.isArray(n)){let a=n.length;for(;a--;){const o=n[a];L(r,o)||e.addError("OBJECT_DEPENDENCY_KEY",[o,i],void 0,t,"dependencies")}}else ve.call(this,e,n,r)}}},enum:function(e,t,r){if(he(this.validateOptions,["ENUM_CASE_MISMATCH","ENUM_MISMATCH"]))return;let n=!1,a=!1,i=t.enum.length;for(;i--;){if(_(r,t.enum[i])){n=!0;break}_(r,t.enum[i],{caseInsensitiveComparison:!0})&&(a=!0)}if(!1===n){const n=a&&this.options.enumCaseInsensitiveComparison?"ENUM_CASE_MISMATCH":"ENUM_MISMATCH";e.addError(n,[JSON.stringify(r)],void 0,t,"enum")}},type:function(e,t,r){if(he(this.validateOptions,["INVALID_TYPE"]))return;const n=h(r);"string"==typeof t.type?n===t.type||"integer"===n&&"number"===t.type||e.addError("INVALID_TYPE",[t.type,n],void 0,t,"type"):-1!==t.type.indexOf(n)||"integer"===n&&-1!==t.type.indexOf("number")||e.addError("INVALID_TYPE",[JSON.stringify(t.type),n],void 0,t,"type")},allOf:function(e,t,r){let n=t.allOf.length;for(;n--;){const a=ve.call(this,e,t.allOf[n],r);if(this.options.breakOnFirstError&&!1===a)break}},anyOf:function(e,t,r){const n=[];let a=t.anyOf.length;for(;a--;){const i=new C(e);n.push(i),ve.call(this,i,t.anyOf[a],r)}const i=e.asyncTasks.length;for(const t of n)e.asyncTasks.push(...t.asyncTasks);if(e.asyncTasks.length>i){const r=D(e.path);e.addAsyncTask(e=>{setTimeout(()=>e(null),0)},[],()=>{const a=e.path;e.path=r;let i=!1;for(const e of n)if(0===e.errors.length){i=!0;break}!1===i&&e.addError("ANY_OF_MISSING",void 0,n,t,"anyOf"),e.path=a})}else{let r=!1;for(const e of n)if(0===e.errors.length){r=!0;break}!1===r&&e.addError("ANY_OF_MISSING",void 0,n,t,"anyOf")}},oneOf:function(e,t,r){const n=[];let a=t.oneOf.length;for(;a--;){const i=new C(e);n.push(i),ve.call(this,i,t.oneOf[a],r)}const i=e.asyncTasks.length;for(const t of n)e.asyncTasks.push(...t.asyncTasks);if(e.asyncTasks.length>i){const r=D(e.path);e.addAsyncTask(e=>{setTimeout(()=>e(null),0)},[],()=>{const a=e.path;e.path=r;let i=0;for(const e of n)0===e.errors.length&&i++;0===i?e.addError("ONE_OF_MISSING",void 0,n,t,"oneOf"):i>1&&e.addError("ONE_OF_MULTIPLE",void 0,void 0,t,"oneOf"),e.path=a})}else{let r=0;for(const e of n)0===e.errors.length&&r++;0===r?e.addError("ONE_OF_MISSING",void 0,n,t,"oneOf"):r>1&&e.addError("ONE_OF_MULTIPLE",void 0,void 0,t,"oneOf")}},not:function(e,t,r){const n=new C(e);!0===ve.call(this,n,t.not,r)&&e.addError("NOT_PASSED",void 0,void 0,t,"not")},if:function(e,t,r){if("draft-07"!==this.options.version)return;const n=t.if,a=t.then,i=t.else;if(void 0===n||void 0===a&&void 0===i)return;const o=new C(e);ve.call(this,o,n,r);const l=0===o.errors.length?a:i;void 0!==l&&ve.call(this,e,l,r)},then:function(){},else:function(){},definitions:function(){},format:function(e,t,r){var n;const a=(n=this.options,{...ie,...n?.strictUris?{uri:ae}:{},...oe,...n?.customFormats||{}})[t.format];if("function"==typeof a){if(he(this.validateOptions,["INVALID_FORMAT"]))return;if(e.hasError("INVALID_TYPE",[t.type,h(r)]))return;if(2===a.length){const n=D(e.path);e.addAsyncTask(a,[r],function(a){if(!0!==a){const a=e.path;e.path=n,e.addError("INVALID_FORMAT",[t.format,JSON.stringify(r)],void 0,t,"format"),e.path=a}})}else{const n=a.call(this,r);if(n instanceof Promise){const a=D(e.path),i=this.options.asyncTimeout||2e3;e.addAsyncTask(async e=>{try{const t=new Promise((e,t)=>{setTimeout(()=>t(new Error("Async timeout")),i)});e(await Promise.race([n,t]))}catch(t){if("Async timeout"===t.message)return;e(!1)}},[],function(n){if(!0!==n){const n=e.path;e.path=a,e.addError("INVALID_FORMAT",[t.format,JSON.stringify(r)],void 0,t,"format"),e.path=n}})}else!0!==n&&e.addError("INVALID_FORMAT",[t.format,JSON.stringify(r)],void 0,t,"format")}}else!0!==this.options.ignoreUnknownFormats&&e.addError("UNKNOWN_FORMAT",[t.format],void 0,t,"format")},contentEncoding:function(e,t,r){"draft-07"===this.options.version&&"string"==typeof r&&"base64"===t.contentEncoding&&(ue(r)||e.addError("INVALID_FORMAT",["contentEncoding:base64",JSON.stringify(r)],void 0,t,"contentEncoding"))},contentMediaType:function(e,t,r){if("draft-07"!==this.options.version)return;if("string"!=typeof r)return;if("application/json"!==t.contentMediaType)return;let n=r;if("base64"===t.contentEncoding){const a=(e=>{if(ue(e)){if("function"==typeof atob)try{return atob(e)}catch{return}if("undefined"!=typeof Buffer)try{return Buffer.from(e,"base64").toString("utf8")}catch{return}}})(r);if(void 0===a)return void e.addError("INVALID_FORMAT",["contentEncoding:base64",JSON.stringify(r)],void 0,t,"contentEncoding");n=a}try{JSON.parse(n)}catch{e.addError("INVALID_FORMAT",["contentMediaType:application/json",JSON.stringify(r)],void 0,t,"contentMediaType")}},$id:()=>{},const:function(e,t,r){const n=t.const;!1===_(r,n)&&e.addError("CONST",[JSON.stringify(n)],void 0,t,void 0)},contains:function(e,t,r){if(he(this.validateOptions,["CONTAINS"]))return;if(!Array.isArray(r))return;const n=t.contains;if(void 0===n)return;const a=[];let i=r.length;for(;i--;){const t=new C(e);a.push(t),ve.call(this,t,n,r[i])}const o=e.asyncTasks.length;for(const t of a)e.asyncTasks.push(...t.asyncTasks);const l=e.asyncTasks.length>o,s=()=>{let r=!1;for(const e of a)if(0===e.errors.length){r=!0;break}r||e.addError("CONTAINS",void 0,a,t,void 0)};if(l){const t=D(e.path);return void e.addAsyncTask(e=>{setTimeout(()=>e(null),0)},[],()=>{const r=e.path;e.path=t,s(),e.path=r})}s()},examples:()=>{},propertyNames:function(e,t,r){if(he(this.validateOptions,["PROPERTY_NAMES"]))return;if(!p(r))return;const n=t.propertyNames;if(void 0===n)return;const a=Object.keys(r),i=[];for(const t of a){const r=new C(e);i.push(r),ve.call(this,r,n,t)}const o=e.asyncTasks.length;for(const t of i)e.asyncTasks.push(...t.asyncTasks);const l=e.asyncTasks.length>o,s=()=>{for(let r=0;r0&&e.addError("PROPERTY_NAMES",[a[r]],i[r],t,void 0)};if(l){const t=D(e.path);return void e.addAsyncTask(e=>{setTimeout(()=>e(null),0)},[],()=>{const r=e.path;e.path=t,s(),e.path=r})}s()}},me=function(e,t,r){let n=r.length;if(Array.isArray(t.items))for(;n--;)n0;){if(!t.__$refResolved){e.addError("REF_UNRESOLVED",[t.$ref],void 0,t);break}if(t.__$refResolved===t)break;t=t.__$refResolved,n=Object.keys(t),r--}if(0===r)throw new Error("Circular dependency by $ref references!");e.schemaPath=[]}if(t.type&&(n.splice(n.indexOf("type"),1),e.schemaPath.push("type"),pe.type.call(this,e,t,r),e.schemaPath.pop(),e.errors.length&&this.options.breakOnFirstError))return!1;let i=n.length;for(;i--&&!(pe[n[i]]&&(pe[n[i]].call(this,e,t,r),e.errors.length&&this.options.breakOnFirstError)););return 0!==e.errors.length&&!1!==this.options.breakOnFirstError||(Array.isArray(r)?me.call(this,e,t,r):p(r)&&ge.call(this,e,t,r)),"function"==typeof this.options.customValidator&&this.options.customValidator.call(this,e,t,r),a&&(e.rootSchema=void 0),0===e.errors.length}let ye;function xe(){return ye}const be=["enum","const","default","examples"],_e=(e,t,r,n)=>{if(t=t||[],r=r||[],n=n||[],"object"!=typeof e||null===e)return t;const a="string"==typeof e.$ref&&void 0===e.__$refResolved;let i=!1;const o=0===r.length;let l,s=g(e);if("string"!=typeof e.id||!S(e.id)||s&&S(s)||(s=e.id),"string"==typeof s&&(o||!a)){const e=r.length>0?r[r.length-1]:void 0;r.push(Te(e,s)),i=!0}if(a&&t.push({ref:we(r[r.length-1],e.$ref),key:"$ref",obj:e,path:n.slice(0)}),"string"==typeof e.$schema&&void 0===e.__$schemaResolved&&t.push({ref:we(r[r.length-1],e.$schema),key:"$schema",obj:e,path:n.slice(0)}),Array.isArray(e))for(l=e.length;l--;)n.push(l),_e(e[l],t,r,n),n.pop();else{const a=Object.keys(e);for(l=a.length;l--;)0===a[l].indexOf("__$")||be.includes(a[l])||(n.push(a[l]),_e(e[a[l]],t,r,n),n.pop())}return i&&r.pop(),t},we=(e,t)=>{if(S(t))return t;const r=e??"";if("#"===t[0]){const e=r.indexOf("#");return(-1===e?r:r.slice(0,e))+t}if(!r)return t;const n=r.indexOf("#"),a=-1===n?r:r.slice(0,n);if(S(a))try{return new URL(t,a).toString()}catch{}let i=a;return i.endsWith("/")||(i=i.replace(/[^/]*$/,"")),i+t},Te=(e,t)=>{if(S(t))return t;const r=e??"";if("#"!==t[0]&&!t.includes("/")&&!t.includes(".")&&!t.includes("#")){const e=r.indexOf("#");return(-1===e?r:r.slice(0,e))+"#"+t}return we(e,t)};class ke{validator;constructor(e){this.validator=e}collectAndCacheIds(e){const t=(e=>{const t=[],r=["enum","const","default","examples"];return function e(n,a){if("object"!=typeof n||null==n)return;let i=!1;const o=g(n);if("string"==typeof o){let e=S(o)?"absolute":"relative";0===a.length&&(e="root");const r={id:o,type:e,obj:n};if("absolute"===e||"root"===e&&S(o))r.absoluteUri=o;else if("root"===e&&"string"==typeof n.id&&S(n.id)&&n.id!==o)r.absoluteUri=Te(n.id,o);else if("relative"===e&&(r.absoluteParent=a.filter(e=>"absolute"===e.type||"root"===e.type&&e.absoluteUri).slice(-1)[0],r.absoluteParent)){const e=r.absoluteParent.absoluteUri||r.absoluteParent.id;r.absoluteUri=e.split("/").slice(0,-1).concat(r.id).join("/")}t.push(r),a.push(r),i=!0}if(Array.isArray(n))for(const t of n)e(t,a);else for(const t of Object.keys(n))0===t.indexOf("__$")||r.includes(t)||e(n[t],a);i&&a.pop()}(e,[]),t})(e);for(const e of t)e.absoluteUri?this.validator.scache.cacheSchemaByUri(e.absoluteUri,e.obj):"root"===e.type&&this.validator.scache.cacheSchemaByUri(e.id,e.obj)}compileSchema(e,t,r){if(e.commonErrorMessage="SCHEMA_COMPILATION_FAILED","string"==typeof t){const r=this.validator.scache.getSchemaByUri(e,t);if(!r)return e.addError("SCHEMA_NOT_REACHABLE",[t]),!1;t=r}if(Array.isArray(t))return r?.noCache||t.forEach(e=>this.collectAndCacheIds(e)),this.compileArrayOfSchemas(e,t);if("boolean"==typeof t)return!0;if(r?.noCache||this.collectAndCacheIds(t),t.__$compiled&&t.id&&!1===this.validator.scache.checkCacheForUri(t.id)&&(t.__$compiled=void 0),t.__$compiled)return!0;t.$schema||"none"===this.validator.options.version||(t.$schema=this.validator.getDefaultSchemaId()),t.id&&"string"==typeof t.id&&!r?.noCache&&this.validator.scache.cacheSchemaByUri(t.id,t);let n=!1;e.rootSchema||(e.rootSchema=t,n=!0);const a=e.isValid();delete t.__$missingReferences;const i=_e(t);let o=i.length;for(;o--;){const r=i[o];let n=this.validator.scache.getSchemaByUri(e,r.ref,t);if(!n){const a=xe();if(a){const i=E(r.ref),o=a(i);if(o){o.id=i;const a=new C(e);this.compileSchema(a,o)?n=this.validator.scache.getSchemaByUri(e,r.ref,t):e.errors=e.errors.concat(a.errors)}}}if(!n){const n=e.hasError("REMOTE_NOT_VALID",[r.ref]),i=S(r.ref);let o=!1;const l=!0===this.validator.options.ignoreUnresolvableReferences;i&&(o=this.validator.scache.checkCacheForUri(r.ref)),n||l&&i||o||(e.path.push(...r.path),e.addError("UNRESOLVABLE_REFERENCE",[r.ref]),e.path=e.path.slice(0,-r.path.length),a&&(t.__$missingReferences=t.__$missingReferences||[],t.__$missingReferences.push(r)))}r.obj[`__${r.key}Resolved`]=n}const l=e.isValid();return l&&(t.__$compiled=!0),n&&(e.rootSchema=void 0),l}compileArrayOfSchemas(e,t){let r,n=0;do{let a=e.errors.length;for(;a--;)"UNRESOLVABLE_REFERENCE"===e.errors[a].code&&e.errors.splice(a,1);for(r=n,n=this.compileArrayOfSchemasLoop(e,t),a=t.length;a--;){const e=t[a];if(e.__$missingReferences){let r=e.__$missingReferences.length;for(;r--;){const n=e.__$missingReferences[r],a=t.find(e=>e.id===n.ref);a&&(n.obj[`__${n.key}Resolved`]=a,e.__$missingReferences.splice(r,1))}0===e.__$missingReferences.length&&delete e.__$missingReferences}}}while(n!==t.length&&n!==r);return e.isValid()}compileArrayOfSchemasLoop(e,t){let r=t.length,n=0;for(;r--;){const a=new C(e);this.compileSchema(a,t[r])&&n++,e.errors=e.errors.concat(a.errors)}return n}}const Me={$ref:function(e,t){"string"!=typeof t.$ref&&e.addError("KEYWORD_TYPE_EXPECTED",["$ref","string"],void 0,t,"$ref")},$schema:function(e,t){"string"!=typeof t.$schema&&e.addError("KEYWORD_TYPE_EXPECTED",["$schema","string"],void 0,t,"$schema")},multipleOf:function(e,t){"number"!=typeof t.multipleOf?e.addError("KEYWORD_TYPE_EXPECTED",["multipleOf","number"],void 0,t,"multipleOf"):t.multipleOf<=0&&e.addError("KEYWORD_MUST_BE",["multipleOf","strictly greater than 0"],void 0,t,"multipleOf")},maximum:function(e,t){"number"!=typeof t.maximum&&e.addError("KEYWORD_TYPE_EXPECTED",["maximum","number"],void 0,t,"maximum")},exclusiveMaximum:function(e,t){"draft-04"===e.options.version?"boolean"!=typeof t.exclusiveMaximum?e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMaximum","boolean"],void 0,t,"exclusiveMaximum"):void 0===t.maximum&&e.addError("KEYWORD_DEPENDENCY",["exclusiveMaximum","maximum"],void 0,t,"exclusiveMaximum"):"boolean"!=typeof t.exclusiveMaximum&&"number"!=typeof t.exclusiveMaximum&&e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMaximum",["boolean","number"]],void 0,t,"exclusiveMaximum")},minimum:function(e,t){"number"!=typeof t.minimum&&e.addError("KEYWORD_TYPE_EXPECTED",["minimum","number"],void 0,t,"minimum")},exclusiveMinimum:function(e,t){"draft-04"===e.options.version?"boolean"!=typeof t.exclusiveMinimum?e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMinimum","boolean"],void 0,t,"exclusiveMinimum"):void 0===t.minimum&&e.addError("KEYWORD_DEPENDENCY",["exclusiveMinimum","minimum"],void 0,t,"exclusiveMinimum"):"boolean"!=typeof t.exclusiveMinimum&&"number"!=typeof t.exclusiveMinimum&&e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMinimum",["boolean","number"]],void 0,t,"exclusiveMinimum")},maxLength:function(e,t){m(t.maxLength)?t.maxLength<0&&e.addError("KEYWORD_MUST_BE",["maxLength","greater than, or equal to 0"],void 0,t,"maxLength"):e.addError("KEYWORD_TYPE_EXPECTED",["maxLength","integer"],void 0,t,"maxLength")},minLength:function(e,t){m(t.minLength)?t.minLength<0&&e.addError("KEYWORD_MUST_BE",["minLength","greater than, or equal to 0"],void 0,t,"minLength"):e.addError("KEYWORD_TYPE_EXPECTED",["minLength","integer"],void 0,t,"minLength")},pattern:function(e,t){if("string"!=typeof t.pattern)e.addError("KEYWORD_TYPE_EXPECTED",["pattern","string"],void 0,t,"pattern");else{const r=de(t.pattern);r.ok||e.addError("KEYWORD_PATTERN",["pattern",t.pattern,r.error.message],void 0,t,"pattern")}},additionalItems:function(e,t){"boolean"==typeof t.additionalItems||p(t.additionalItems)?p(t.additionalItems)&&(e.path.push("additionalItems"),this.validateSchema(e,t.additionalItems),e.path.pop()):e.addError("KEYWORD_TYPE_EXPECTED",["additionalItems",["boolean","object"]],void 0,t,"additionalItems")},items:function(e,t){if(Array.isArray(t.items)){let r=t.items.length;for(;r--;)e.path.push("items"),e.path.push(r),this.validateSchema(e,t.items[r]),e.path.pop(),e.path.pop()}else p(t.items)||"draft-04"!==e.options.version&&"boolean"==typeof t.items?(e.path.push("items"),this.validateSchema(e,t.items),e.path.pop()):e.addError("KEYWORD_TYPE_EXPECTED",["items","draft-04"===e.options.version?["array","object"]:["array","object","boolean"]],void 0,t,"items");!0===this.options.forceAdditional&&void 0===t.additionalItems&&Array.isArray(t.items)&&e.addError("KEYWORD_UNDEFINED_STRICT",["additionalItems"],void 0,t,"additionalItems"),this.options.assumeAdditional&&void 0===t.additionalItems&&Array.isArray(t.items)&&(t.additionalItems=!1)},maxItems:function(e,t){"number"!=typeof t.maxItems?e.addError("KEYWORD_TYPE_EXPECTED",["maxItems","integer"],void 0,t,"maxItems"):t.maxItems<0&&e.addError("KEYWORD_MUST_BE",["maxItems","greater than, or equal to 0"],void 0,t,"maxItems")},minItems:function(e,t){m(t.minItems)?t.minItems<0&&e.addError("KEYWORD_MUST_BE",["minItems","greater than, or equal to 0"],void 0,t,"minItems"):e.addError("KEYWORD_TYPE_EXPECTED",["minItems","integer"],void 0,t,"minItems")},uniqueItems:function(e,t){"boolean"!=typeof t.uniqueItems&&e.addError("KEYWORD_TYPE_EXPECTED",["uniqueItems","boolean"],void 0,t,"uniqueItems")},maxProperties:function(e,t){m(t.maxProperties)?t.maxProperties<0&&e.addError("KEYWORD_MUST_BE",["maxProperties","greater than, or equal to 0"],void 0,t,"maxProperties"):e.addError("KEYWORD_TYPE_EXPECTED",["maxProperties","integer"],void 0,t,"maxProperties")},minProperties:function(e,t){m(t.minProperties)?t.minProperties<0&&e.addError("KEYWORD_MUST_BE",["minProperties","greater than, or equal to 0"],void 0,t,"minProperties"):e.addError("KEYWORD_TYPE_EXPECTED",["minProperties","integer"],void 0,t,"minProperties")},required:function(e,t){if(Array.isArray(t.required))if("draft-04"===e.options.version&&0===t.required.length)e.addError("KEYWORD_MUST_BE",["required","an array with at least one element"],void 0,t,"required");else{let r=t.required.length;for(;r--;)"string"!=typeof t.required[r]&&e.addError("KEYWORD_VALUE_TYPE",["required","string"],void 0,t,"required");!1===se(t.required)&&e.addError("KEYWORD_MUST_BE",["required","an array with unique items"],void 0,t,"required")}else e.addError("KEYWORD_TYPE_EXPECTED",["required","array"],void 0,t,"required")},additionalProperties:function(e,t){"boolean"==typeof t.additionalProperties||p(t.additionalProperties)?p(t.additionalProperties)&&(e.path.push("additionalProperties"),this.validateSchema(e,t.additionalProperties),e.path.pop()):e.addError("KEYWORD_TYPE_EXPECTED",["additionalProperties",["boolean","object"]],void 0,t,"additionalProperties")},properties:function(e,t){if(!p(t.properties))return void e.addError("KEYWORD_TYPE_EXPECTED",["properties","object"],void 0,t,"properties");const r=Object.keys(t.properties);let n=r.length;for(;n--;){const a=r[n],i=t.properties[a];e.path.push("properties"),e.path.push(a),this.validateSchema(e,i),e.path.pop(),e.path.pop()}!0===this.options.forceAdditional&&void 0===t.additionalProperties&&e.addError("KEYWORD_UNDEFINED_STRICT",["additionalProperties"],void 0,t,"additionalProperties"),this.options.assumeAdditional&&void 0===t.additionalProperties&&(t.additionalProperties=!1),!0===this.options.forceProperties&&0===r.length&&e.addError("CUSTOM_MODE_FORCE_PROPERTIES",["properties"],void 0,t,"properties")},patternProperties:function(e,t){if(!p(t.patternProperties))return void e.addError("KEYWORD_TYPE_EXPECTED",["patternProperties","object"],void 0,t,"patternProperties");const r=Object.keys(t.patternProperties);let n=r.length;for(;n--;){const a=r[n],i=t.patternProperties[a],o=de(a);o.ok||e.addError("KEYWORD_PATTERN",["patternProperties",a,o.error.message],void 0,t,"patternProperties"),e.path.push("patternProperties"),e.path.push(a),this.validateSchema(e,i),e.path.pop(),e.path.pop()}!0===this.options.forceProperties&&0===r.length&&e.addError("CUSTOM_MODE_FORCE_PROPERTIES",["patternProperties"],void 0,t,"patternProperties")},dependencies:function(e,t){if(p(t.dependencies)){const r=Object.keys(t.dependencies);let n=r.length;for(;n--;){const a=r[n],i=t.dependencies[a];if(p(i)||"draft-04"!==e.options.version&&"boolean"==typeof i)e.path.push("dependencies"),e.path.push(a),this.validateSchema(e,i),e.path.pop(),e.path.pop();else if(Array.isArray(i)){const r=i;let n=r.length;for("draft-04"===e.options.version&&0===n&&e.addError("KEYWORD_MUST_BE",["dependencies","not empty array"],void 0,t,"dependencies");n--;)"string"!=typeof r[n]&&e.addError("KEYWORD_VALUE_TYPE",["dependencies","string"],void 0,t,"dependencies");!1===se(r)&&e.addError("KEYWORD_MUST_BE",["dependencies","an array with unique items"],void 0,t,"dependencies")}else e.addError("KEYWORD_VALUE_TYPE",["dependencies","draft-04"===e.options.version?"object or array":"boolean, object or array"],void 0,t,"dependencies")}}else e.addError("KEYWORD_TYPE_EXPECTED",["dependencies","object"],void 0,t,"dependencies")},enum:function(e,t){!1===Array.isArray(t.enum)?e.addError("KEYWORD_TYPE_EXPECTED",["enum","array"],void 0,t,"enum"):0===t.enum.length?e.addError("KEYWORD_MUST_BE",["enum","an array with at least one element"],void 0,t,"enum"):!1===se(t.enum)&&e.addError("KEYWORD_MUST_BE",["enum","an array with unique elements"],void 0,t,"enum")},type:function(e,t){const r=["array","boolean","integer","number","null","object","string"],n=r.join(","),a=Array.isArray(t.type);if(Array.isArray(t.type)){let a=t.type.length;for(;a--;)-1===r.indexOf(t.type[a])&&e.addError("KEYWORD_TYPE_EXPECTED",["type",n],void 0,t,"type");!1===se(t.type)&&e.addError("KEYWORD_MUST_BE",["type","an object with unique properties"],void 0,t,"type")}else"string"==typeof t.type?-1===r.indexOf(t.type)&&e.addError("KEYWORD_TYPE_EXPECTED",["type",n],void 0,t,"type"):e.addError("KEYWORD_TYPE_EXPECTED",["type",["string","array"]],void 0,t,"type");!0===this.options.noEmptyStrings&&("string"===t.type||a&&-1!==t.type.indexOf("string"))&&void 0===t.minLength&&void 0===t.enum&&void 0===t.format&&(t.minLength=1),!0===this.options.noEmptyArrays&&("array"===t.type||a&&-1!==t.type.indexOf("array"))&&void 0===t.minItems&&(t.minItems=1),!0===this.options.forceProperties&&("object"===t.type||a&&-1!==t.type.indexOf("object"))&&void 0===t.properties&&void 0===t.patternProperties&&e.addError("KEYWORD_UNDEFINED_STRICT",["properties"],void 0,t,"properties"),!0===this.options.forceItems&&("array"===t.type||a&&-1!==t.type.indexOf("array"))&&void 0===t.items&&e.addError("KEYWORD_UNDEFINED_STRICT",["items"],void 0,t,"items"),!0===this.options.forceMinItems&&("array"===t.type||a&&-1!==t.type.indexOf("array"))&&void 0===t.minItems&&e.addError("KEYWORD_UNDEFINED_STRICT",["minItems"],void 0,t,"minItems"),!0===this.options.forceMaxItems&&("array"===t.type||a&&-1!==t.type.indexOf("array"))&&void 0===t.maxItems&&e.addError("KEYWORD_UNDEFINED_STRICT",["maxItems"],void 0,t,"maxItems"),!0===this.options.forceMinLength&&("string"===t.type||a&&-1!==t.type.indexOf("string"))&&void 0===t.minLength&&void 0===t.format&&void 0===t.enum&&void 0===t.pattern&&e.addError("KEYWORD_UNDEFINED_STRICT",["minLength"],void 0,t,"minLength"),!0===this.options.forceMaxLength&&("string"===t.type||a&&-1!==t.type.indexOf("string"))&&void 0===t.maxLength&&void 0===t.format&&void 0===t.enum&&void 0===t.pattern&&e.addError("KEYWORD_UNDEFINED_STRICT",["maxLength"],void 0,t,"maxLength")},allOf:function(e,t){if(!1===Array.isArray(t.allOf))e.addError("KEYWORD_TYPE_EXPECTED",["allOf","array"],void 0,t,"allOf");else if(0===t.allOf.length)e.addError("KEYWORD_MUST_BE",["allOf","an array with at least one element"],void 0,t,"allOf");else{let r=t.allOf.length;for(;r--;)e.path.push("allOf"),e.path.push(r),this.validateSchema(e,t.allOf[r]),e.path.pop(),e.path.pop()}},anyOf:function(e,t){if(!1===Array.isArray(t.anyOf))e.addError("KEYWORD_TYPE_EXPECTED",["anyOf","array"],void 0,t,"anyOf");else if(0===t.anyOf.length)e.addError("KEYWORD_MUST_BE",["anyOf","an array with at least one element"],void 0,t,"anyOf");else{let r=t.anyOf.length;for(;r--;)e.path.push("anyOf"),e.path.push(r),this.validateSchema(e,t.anyOf[r]),e.path.pop(),e.path.pop()}},oneOf:function(e,t){if(!1===Array.isArray(t.oneOf))e.addError("KEYWORD_TYPE_EXPECTED",["oneOf","array"],void 0,t,"oneOf");else if(0===t.oneOf.length)e.addError("KEYWORD_MUST_BE",["oneOf","an array with at least one element"],void 0,t,"oneOf");else{let r=t.oneOf.length;for(;r--;)e.path.push("oneOf"),e.path.push(r),this.validateSchema(e,t.oneOf[r]),e.path.pop(),e.path.pop()}},not:function(e,t){const r=t.not;("draft-04"===e.options.version?p(r):"boolean"==typeof r||p(r))?(e.path.push("not"),this.validateSchema(e,r),e.path.pop()):e.addError("KEYWORD_TYPE_EXPECTED",["not","draft-04"===e.options.version?"object":["boolean","object"]],void 0,t,"not")},if:function(e,t){if("draft-07"!==e.options.version)return;const r=t.if;"boolean"==typeof r||p(r)?(e.path.push("if"),this.validateSchema(e,r),e.path.pop()):e.addError("KEYWORD_TYPE_EXPECTED",["if",["boolean","object"]],void 0,t,"if")},then:function(e,t){if("draft-07"!==e.options.version)return;const r=t.then;"boolean"==typeof r||p(r)?(e.path.push("then"),this.validateSchema(e,r),e.path.pop()):e.addError("KEYWORD_TYPE_EXPECTED",["then",["boolean","object"]],void 0,t,"then")},else:function(e,t){if("draft-07"!==e.options.version)return;const r=t.else;"boolean"==typeof r||p(r)?(e.path.push("else"),this.validateSchema(e,r),e.path.pop()):e.addError("KEYWORD_TYPE_EXPECTED",["else",["boolean","object"]],void 0,t,"else")},definitions:function(e,t){if(p(t.definitions)){const r=Object.keys(t.definitions);let n=r.length;for(;n--;){const a=r[n],i=t.definitions[a];e.path.push("definitions"),e.path.push(a),this.validateSchema(e,i),e.path.pop(),e.path.pop()}}else e.addError("KEYWORD_TYPE_EXPECTED",["definitions","object"],void 0,t,"definitions")},format:function(e,t){var r;"string"!=typeof t.format?e.addError("KEYWORD_TYPE_EXPECTED",["format","string"],void 0,t,"format"):(r=t.format,le(this.options.customFormats).includes(r)||!0===this.options.ignoreUnknownFormats||e.addError("UNKNOWN_FORMAT",[t.format],void 0,t,"format"))},contentEncoding:function(e,t){"draft-07"===e.options.version&&"string"!=typeof t.contentEncoding&&e.addError("KEYWORD_TYPE_EXPECTED",["contentEncoding","string"],void 0,t,"contentEncoding")},contentMediaType:function(e,t){"draft-07"===e.options.version&&"string"!=typeof t.contentMediaType&&e.addError("KEYWORD_TYPE_EXPECTED",["contentMediaType","string"],void 0,t,"contentMediaType")},id:function(e,t){"string"!=typeof t.id&&e.addError("KEYWORD_TYPE_EXPECTED",["id","string"],void 0,t,"id")},title:function(e,t){"string"!=typeof t.title&&e.addError("KEYWORD_TYPE_EXPECTED",["title","string"],void 0,t,"title")},description:function(e,t){"string"!=typeof t.description&&e.addError("KEYWORD_TYPE_EXPECTED",["description","string"],void 0,t,"description")},default:function(){}};class Ae{validator;constructor(e){this.validator=e}get options(){return this.validator.options}validateArrayOfSchemas(e,t){let r=t.length;for(;r--;)this.validateSchema(e,t[r]);return e.isValid()}validateSchema(e,t){if(e.commonErrorMessage="SCHEMA_VALIDATION_FAILED",Array.isArray(t))return this.validateArrayOfSchemas(e,t);if("boolean"==typeof t)return!0;if(t.__$validated)return!0;const r=t.$schema&&g(t)!==t.$schema;if(r)if(t.__$schemaResolved&&t.__$schemaResolved!==t){const r=new C(e);!1===ve.call(this.validator,r,t.__$schemaResolved,t)&&e.addError("PARENT_SCHEMA_VALIDATION_FAILED",void 0,r,t,"$schema")}else!0!==this.validator.options.ignoreUnresolvableReferences&&e.addError("REF_UNRESOLVED",[t.$schema],void 0,t,"$schema");if(!0===this.validator.options.noTypeless){if(void 0!==t.type){let e=[];Array.isArray(t.anyOf)&&(e=e.concat(t.anyOf)),Array.isArray(t.oneOf)&&(e=e.concat(t.oneOf)),Array.isArray(t.allOf)&&(e=e.concat(t.allOf)),e.forEach(function(e){e.type||(e.type=t.type)})}void 0===t.enum&&void 0===t.type&&void 0===t.anyOf&&void 0===t.oneOf&&void 0===t.not&&void 0===t.$ref&&e.addError("KEYWORD_UNDEFINED_STRICT",["type"],void 0,t,"type")}const n=Object.keys(t);let a=n.length;for(;a--;){const i=n[a];0!==i.indexOf("__")&&(Object.prototype.hasOwnProperty.call(Me,i)?Me[i].call(this,e,t):r||!0===this.validator.options.noExtraKeywords&&e.addError("KEYWORD_UNEXPECTED",[i],void 0,t,void 0))}if(!0===this.validator.options.pedanticCheck){if(t.enum){const r=D(t);for(delete r.enum,delete r.default,e.path.push("enum"),a=t.enum.length;a--;)e.path.push(a),ve.call(this.validator,e,r,t.enum[a]),e.path.pop();e.path.pop()}t.default&&(e.path.push("default"),ve.call(this.validator,e,t,t.default),e.path.pop())}const i=e.isValid();return i&&(t.__$validated=!0),i}}class Ee{scache;sc;sv;validateOptions={};options;constructor(e){if(!e?.__called_from_factory__)throw new Error("do not use new ZSchema(), use ZSchema.create() instead");delete e.__called_from_factory__,this.scache=new P(this),this.sc=new ke(this),this.sv=new Ae(this),this.options=F(e)}getDefaultSchemaId(){return this.options.version&&"none"!==this.options.version?N[this.options.version]:N[R.version]}_validate(e,t,r,n){if("function"==typeof r&&(n=r,r={}),r||(r={}),this.validateOptions=r,"string"!=typeof t&&"boolean"!=typeof t&&!p(t)){const e=new Error("Invalid .validate call - schema must be a string or object but "+h(t)+" was passed!");if(n)return void setTimeout(function(){n(e,!1)},0);throw e}let a=!1;const i=new C(this.options,r);let o;if(i.json=e,"string"==typeof t){const e=t;if(o=this.scache.getSchema(i,e),!o){const t=new Error("Schema with id '"+e+"' wasn't found in the validator cache!");if(n)return void setTimeout(function(){n(t,!1)},0);throw t}}else o=this.scache.getSchema(i,t);let l=!1;a||(l=this.sc.compileSchema(i,o)),l||(a=!0);let s=!1;if(a||(s=this.sv.validateSchema(i,o)),s||(a=!0),r.schemaPath&&(i.rootSchema=o,o=k(o,r.schemaPath),!o)){const e=new Error("Schema path '"+r.schemaPath+"' wasn't found in the schema!");if(n)return void setTimeout(function(){n(e,!1)},0);throw e}if(a||ve.call(this,i,o,e),!n){if(i.asyncTasks.length>0)throw new Error("This validation has async tasks and cannot be done in sync mode, please provide callback argument.");if(!i.isValid())throw b({message:i.commonErrorMessage,details:i.errors});return!0}i.processAsyncTasks(this.options.asyncTimeout,n)}_validateSchema(e){if(Array.isArray(e)&&0===e.length)throw new Error(".compileSchema was called with an empty array");const t=new C(this.options);if(Array.isArray(e)){const r=this.scache.getSchema(t,e);this.sc.compileSchema(t,r)&&this.sv.validateSchema(t,r)}else{const r=this.scache.getSchema(t,e);this.sc.compileSchema(t,r)&&this.sv.validateSchema(t,r)}if(!t.isValid())throw b({message:t.commonErrorMessage,details:t.errors});return!0}registerFormat(e,t){this.options.customFormats||(this.options.customFormats={}),this.options.customFormats[e]=t}unregisterFormat(e){this.options.customFormats||(this.options.customFormats={}),this.options.customFormats[e]=null}getRegisteredFormats(){return T(this.options.customFormats||{}).filter(e=>null!=this.options.customFormats?.[e])}getSupportedFormats(){return le(this.options.customFormats)}setRemoteReference(e,t,r){let n;n="string"==typeof t?JSON.parse(t):I(t),n.id||(n.id=e),r&&(n.__$validationOptions=F(r)),this.scache.cacheSchemaByUri(e,n)}getMissingReferences(e){if(!e)return[];const t=e.details||[],r=[];return function e(t){for(const n of t)"UNRESOLVABLE_REFERENCE"!==n.code&&"SCHEMA_NOT_REACHABLE"!==n.code||r.push(n.params[0]),n.inner&&e(n.inner)}(t),r}getMissingRemoteReferences(e){const t=this.getMissingReferences(e),r=[];let n=t.length;for(;n--;){const e=E(t[n]);e&&-1===r.indexOf(e)&&r.push(e)}return r}getResolvedSchema(e){const t=new C(this.options),r=this.scache.getSchemaByUri(t,e);if(!r)return;const n=I(r),a=[],i=function(e){let t;const r=h(e);if(("object"===r||"array"===r)&&!e.___$visited){if(e.___$visited=!0,a.push(e),e.$ref&&e.__$refResolved){const r=e.__$refResolved,n=e;for(t in delete e.$ref,delete e.__$refResolved,r)O(r,n,t)}for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(0===t.indexOf("__$")?delete e[t]:i(e[t]))}};return i(n),a.forEach(function(e){delete e.___$visited}),n}}class Se extends Ee{constructor(e){super(e)}static registerFormat(e,t){return function(e,t){oe[e]=t}(e,t)}static unregisterFormat(e){return function(e){delete oe[e]}(e)}static getRegisteredFormats(){return T(oe)}static getDefaultOptions(){return I(R)}static setRemoteReference(e,t,r){let n;n="string"==typeof t?JSON.parse(t):I(t),n.id||(n.id=e),r&&(n.__$validationOptions=F(r)),P.cacheSchemaByUri(e,n)}static getSchemaReader(){return xe()}static setSchemaReader(e){return function(e){ye=e}(e)}static schemaSymbol=A;static jsonSymbol=M;static create(e={}){const t=e.async,r=e.safe;return delete e.async,delete e.safe,e.__called_from_factory__=!0,t&&r?new Oe(e):t?new Le(e):r?new Ce(e):new Se(e)}validate(e,t,r={}){return this._validate(e,t,r)}validateSafe(e,t,r){try{return this._validate(e,t,r??{}),{valid:!0}}catch(e){return{valid:!1,err:e}}}validateAsync(e,t,r){return new Promise((n,a)=>{try{this._validate(e,t,r||{},(e,t)=>e||!0!==t?a(e):n(t))}catch(e){a(e)}})}validateAsyncSafe(e,t,r){return new Promise(n=>{try{this._validate(e,t,r||{},(e,t)=>{n({valid:t,err:e})})}catch(e){n({valid:!1,err:e})}})}validateSchema(e){return this._validateSchema(e)}validateSchemaSafe(e){try{return this._validateSchema(e),{valid:!0}}catch(e){return{valid:!1,err:e}}}}class Ce extends Ee{constructor(e){super(e)}validate(e,t,r={}){try{return this._validate(e,t,r),{valid:!0}}catch(e){return{valid:!1,err:e}}}validateSchema(e){try{return this._validateSchema(e),{valid:!0}}catch(e){return{valid:!1,err:e}}}}class Le extends Ee{constructor(e){super(e)}validate(e,t,r={}){return new Promise((n,a)=>{try{this._validate(e,t,r,(e,t)=>e||!0!==t?a(e):n(t))}catch(e){a(e)}})}validateSchema(e){return this._validateSchema(e)}}class Oe extends Ee{constructor(e){super(e)}validate(e,t,r={}){return new Promise(n=>{try{this._validate(e,t,r,(e,t)=>{n({valid:t,err:e})})}catch(e){n({valid:!1,err:e})}})}validateSchema(e){try{return this._validateSchema(e),{valid:!0}}catch(e){return{valid:!1,err:e}}}}const De=Se;class Ie{#e=0;#t=1;#r=2;#n=3;#a=4;#i=5;#o=6;#l=7;#s=9;#c=10;#u=11;#d=12;#f=144;#h=0;#p=1;#m=2;#g=4;#v=8;#y=16;#x=32;#b=64;#_=1;#w=2;#T=3;#k=4;#M=0;#A=1;#E=2;#S=3;#C=this.#e;#L="vendor";#O=0;#D=1;#I=2;#P=3;#N={SIO:1,FT8U232AM:2,FT232BM:3,FT2232C:4,FT232RL:5,FT2232H:6,FT4232H:7,FT232H:8,FTX:9};#R={ftdi_sio_b300:0,ftdi_sio_b600:1,ftdi_sio_b1200:2,ftdi_sio_b2400:3,ftdi_sio_b4800:4,ftdi_sio_b9600:5,ftdi_sio_b19200:6,ftdi_sio_b38400:7,ftdi_sio_b57600:8,ftdi_sio_b115200:9};#F=this.#a;#z=0;#B=256;#j=512;#H=768;#q=1024;#Y=0;#V=2048;#U=4096;#$=16384;#W=this.#t;#G=1;#X=this.#G<<8|1;#Z=this.#G<<8;#J=2;#K=this.#J<<8|2;#Q=this.#J<<8;#ee=this.#r;#te=0;#re=256;#ne=512;#ae=1024;#ie=this.#c;#oe=this.#s;#le=this.#o;#se=this.#i;#ce=16;#ue=32;#de=64;#fe=128;#he=this.#u;#pe=0;#me=32;#ge=this.#d;#ve=this.#f;#ye=8;#xe=10;#be=16;#_e=32;#we=64;#Te=128;#ke=1;#Me=2;#Ae=4;#Ee=8;#Se=16;#Ce=32;#Le=64;#Oe=128;constructor(e,t){this.device=e,this.portConfiguration=t,this.interfaceNumber=0,this.endpointIn=0,this.endpointOut=0,this.modemStatusByte=0,this.lineStatusByte=0,this.packetsReceived=0}connect(e,t){this.onReceive=e,this.onReceiveError=t;let r=()=>{this.device.transferIn(this.endpointIn,64).then(e=>{let t=new Uint8Array(e.data.buffer);if(t[0]!=this.modemStatusByte&&(this.modemStatusByte=t[0]),t[1]!=this.lineStatusByte&&(this.lineStatusByte=t[1]),t.length>2){let e=new Uint8Array(t.length-2);for(let r=2;r{this.onReceiveError(e)})};return this.device.open().then(()=>{if(null===this.device.configuration)return this.device.selectConfiguration(1)}).then(()=>{this.device.configuration.interfaces.forEach(e=>{e.alternates.forEach(t=>{console.log(t),255==t.interfaceClass&&(this.interfaceNumber=e.interfaceNumber,t.endpoints.forEach(e=>{"out"==e.direction&&(this.endpointOut=e.endpointNumber),"in"==e.direction&&(this.endpointIn=e.endpointNumber)}))})})}).then(()=>this.device.claimInterface(this.interfaceNumber)).then(()=>this.device.selectAlternateInterface(this.interfaceNumber,0)).then(()=>{let e=this.portConfiguration.baudrate;this.device.controlTransferOut({requestType:"vendor",recipient:"device",request:this.#n,value:this.getBaudDivisor(e),index:this.getBaudBase()})}).then(()=>this.device.controlTransferIn({requestType:"vendor",recipient:"device",request:this.#ie,value:0,index:0},1)).then(e=>{if(this.device.latencyTimer=new Uint8Array(e.data.buffer)[0],1!=this.device.latencyTimer)return this.device.controlTransferOut({requestType:"vendor",recipient:"device",request:this.#oe,value:1,index:0})}).then(e=>this.device.latencyTimer=this.device.controlTransferIn({requestType:"vendor",recipient:"device",request:this.#ie,value:0,index:0},1)).then(e=>(this.device.latencyTimer=new Uint8Array(e.data.buffer)[0],console.log("Current Latency Timer: "),console.log(this.device.latencyTimer),r(),this.device))}DIV_ROUND_CLOSEST(e,t){return e-1>0||t-1>0||e>0==t>0?(e+t/2)/t:(e-t/2)/t}getBaudBase(){return 48e6}getBaudDivisor(e){let t=this.getBaudBase(),r=new Uint8Array(8);r=[0,3,2,4,1,5,6,7];let n=0,a=this.DIV_ROUND_CLOSEST(t,2*e);return n=a>>3,n|=r[7&a]<<14,1==n?n=0:16385==n&&(n=1),n}send(e){return this.device.transferOut(this.endpointOut,e)}disconnect(){this.device.close()}}class Pe{port;device;isOpen=!1;static deviceFilters=[{vendorId:1027}];constructor(e){this.device=e,console.info("WebUSB product name:",e.productName),console.info("WebUSB manufacturer name:",e.manufacturerName)}async sendString(e){const t=new TextEncoder;this.port?.send(t.encode(`${e}\n`))}buffer=new Uint8Array(102400);pos=0;async read(){if(0===this.pos)return await new Promise(e=>setTimeout(e,100)),new Uint8Array;const e=this.buffer.subarray(0,this.pos);return this.pos=0,e}serOptions={overridePortSettings:!0,baudrate:115200};async open(e){this.serOptions.baudrate=e,this.port=new Ie(this.device,this.serOptions),this.pos=0,this.port.connect(e=>{this.buffer.set(e,this.pos),this.pos+=e.length},e=>{console.error("Error receiving data! "+e),this.isOpen=!1}),this.isOpen=!0}async close(){this.isOpen&&(this.isOpen=!1,this.port?.disconnect())}isThisPort(e){return this.device===e}getInfo(){return this.device.productName??"Undefined"}getPort(){return this.device}}class Ne{port;isOpen=!1;constructor(e){this.port=e}isThisPort(e){return this.port===e}async sendString(e){if(!this.isOpen)return;if(!this.port?.writable)throw"Port is not writable!";const t=new TextEncoderStream,r=t.writable.getWriter(),n=t.readable.pipeTo(this.port.writable);r.write(e.trim()+"\n"),await r.close(),await n}reader;async read(){let e=new Uint8Array;if(!this.isOpen)return e;if(this.port.readable)try{this.reader=this.port.readable.getReader();const{value:t}=await this.reader.read();t&&(e=t)}finally{this.reader?.releaseLock(),this.reader=void 0}else await this.close();return e}serOptions={baudRate:9600};async open(e){this.serOptions.baudRate=e,await this.port.open(this.serOptions),this.isOpen=!0}async close(){this.isOpen&&(this.reader&&await(this.reader?.cancel()),await(this.port?.close()),this.isOpen=!1)}getInfo(){return`ID: 0x${this.port.getInfo().usbProductId?.toString(16).toUpperCase()}`}getPort(){return this.port}}class Re{port;recording=!1;closed;onlyConsole=!0;startTime=0;timeDone=0;static orderType="chron";static baudRate=9600;consoleMemory=1e3;consoleMemoryTotal=1e5;rawConsoleData="";rawData="";maxHistLength=5242880;maxLength=20;bufferPulseData=[];baseHist=[];static maxSize=2e5;static adcChannels=4096;static eolChar=";";constructor(e){this.port=e}isThisPort(e){return this.port.isThisPort(e)}async sendString(e){await this.port.sendString(e)}async showConsole(){this.recording||(this.port.isOpen||await this.port.open(Re.baudRate),this.recording=!0,this.onlyConsole=!0,this.closed=this.readUntilClosed())}async hideConsole(){if(this.recording&&this.onlyConsole){this.onlyConsole=!1,this.recording=!1;try{await this.port.close()}catch(e){console.warn("Nothing to disconnect.",e)}await this.closed}}async stopRecord(){if(this.recording){this.recording=!1,this.timeDone+=performance.now()-this.startTime;try{await this.port.close()}catch(e){console.warn("Nothing to disconnect.",e)}await this.closed}}async startRecord(e=!1){this.recording||(this.port.isOpen||await this.port.open(Re.baudRate),e||(this.flushData(),this.clearBaseHist(),this.timeDone=0),this.startTime=performance.now(),this.recording=!0,this.onlyConsole=!1,this.closed=this.readUntilClosed())}async readUntilClosed(){for(;this.port.isOpen&&this.recording;){const e=await this.port.read();e.length&&this.addRaw(e)}await this.port.close()}addRaw(e){const t=new TextDecoder("utf-8").decode(e);this.rawConsoleData+=t;const r=this.rawConsoleData.split("\n");if(r.pop(),(r.length>this.consoleMemory||this.rawConsoleData.length>this.consoleMemoryTotal)&&(this.rawConsoleData=this.rawConsoleData.replace(r[0]+"\n","")),!this.onlyConsole)if(this.bufferPulseData.length>Re.maxSize)console.warn("Warning: Serial buffer is saturating!");else if(this.rawData+=t,"chron"===Re.orderType){const e=this.rawData.split(Re.eolChar);if(e.pop(),e.shift(),e.length<=1)return void(this.rawData.length>this.maxLength&&(this.rawData=""));for(const t of e){this.rawData=this.rawData.replace(t+Re.eolChar,"");const e=t.trim();if(!e.length||e.length>=this.maxLength)continue;const r=parseInt(e);isNaN(r)||r<0||r>Re.adcChannels||this.bufferPulseData.push(r)}}else if("hist"===Re.orderType){const e=this.rawData.split("\n");if(e.pop(),!e.length)return void(this.rawData.length>this.maxHistLength&&(this.rawData=""));for(const t of e){this.rawData=this.rawData.replace(t+"\n","");const e=t.trim();if(!e.length||e.length>=this.maxHistLength)continue;const r=e.split(Re.eolChar);if(r.pop(),r.length!==Re.adcChannels)continue;const n=r.map(e=>{const t=parseInt(e);return isNaN(t)?0:t});if(!this.baseHist.length)return this.baseHist=n,void(this.startTime=performance.now());const a=n.map((e,t)=>e-this.baseHist[t]);this.bufferPulseData.length||(this.bufferPulseData=Array(Re.adcChannels).fill(0));for(const e in this.bufferPulseData)this.bufferPulseData[e]+=a[e];this.baseHist=n}}}flushData(){this.rawData="",this.bufferPulseData=[]}clearBaseHist(){this.baseHist=[]}flushRawData(){this.rawConsoleData=""}getRawData(){return this.rawConsoleData}getData(){const e=[...this.bufferPulseData];return this.bufferPulseData=[],e}getTime(){return this.recording?performance.now()-this.startTime+this.timeDone:this.timeDone}}const Fe={updateInstalled:{type:"info",icon:"fa-solid fa-cloud-arrow-down fa-beat animation-slow",header:"Installed Update",body:"An update has been found and installed. You must reload Gamma MCA for the changes to take effect.

You can also continue on this page without reloading for now."},fileError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"File Error",body:"Something went wrong, please reload and try again or report this issue."},settingError:{type:"danger",delay:4e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Settings Error",body:"Something went wrong when trying to change a settings value, please reload and try again or report this issue."},settingType:{type:"danger",delay:4e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Wrong Datatype",body:"A settings value cannot be changed because the input value datatype is not correct."},settingSuccess:{type:"success",delay:2e3,icon:"fas fa-check-circle fa-beat animation-slow",header:"Changed Setting",body:"A settings value has been changed successfully."},serialConnectError:{type:"danger",delay:8e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Serial Connection Error",body:"Could not connect to the serial device. Maybe the port is already in use?"},miscSerialError:{type:"danger",delay:8e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Serial Error",body:"Something went terribly wrong when trying to read from the serial port! Did you disconnect the device? Please try again."},serialDisconnect:{type:"info",delay:5e3,icon:"fas fa-info-circle fa-beat animation-slow",header:"Serial Disconnect",body:"A serial device was removed."},autoStop:{type:"info",icon:"fas fa-info-circle fa-beat animation-slow",header:"Recording Stopped",body:"Your set time-limit has run out. The recording has been automatically stopped. Changing this limit can be done in the settings."},dataError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"File Error",body:"Background and spectrum have a different number of channels. They must be same for this to work."},fileEmptyError:{type:"warning",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"No Data",body:"You are trying to export a file, but there is not data to export. Please try again when there is data to export."},smaError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"SMA Error",body:"SMA input is invalid. Input must be an integer!"},calibrationApplyError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Calibration Error",body:"Cannot calibrate. Need at least two calibration points with valid numbers!"},calibrationImportError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Calibration Import Error",body:"Something went wrong when importing the calibration. Please reload and try again or report this issue."},serialConnect:{type:"info",delay:5e3,icon:"fas fa-info-circle fa-beat animation-slow",header:"Serial Connect",body:"Detected a new serial device."},welcomeMessage:{type:"primary",icon:"fas fa-radiation fa-beat animation-slow",header:"Welcome!",body:'

Thank you for using Gamma MCA, please report any bugs or issues on GitHub/Issues.

If you\'re new to this, you can have a look at the trailer on Youtube.

Buy Me a Coffee at ko-fi.com'},saveMultipleAtOnce:{type:"warning",delay:8e3,icon:"fas fa-exclamation-triangle fa-shake",header:"File Save Error",body:"

You tried to save (overwrite) multiple files at once. This is not supported due to the risk of data loss.

If you want to combine and save data from different files, please use the Save As function.

"},saveFile:{type:"success",delay:3e3,icon:"fas fa-check-circle fa-beat animation-slow",header:"Saved File",body:"Successfully saved data to the file system."},reportError:{type:"warning",delay:5e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Missing Data",body:"Cannot generate a report since there is no data. Please try again when there is data to analyze."}};class ze{toastElement;toast;toastContainer;constructor(e){if(this.toastContainer=document.getElementById("toast-container"),!this.toastContainer)return void console.error("Toast container does not exist:",this.toastContainer);const t=Fe[e];if(!t)return void console.error("Not a valid notification:",e,t);const r=document.createElement("div");r.className=`toast text-bg-${t.type}`,r.setAttribute("role","alert"),r.setAttribute("aria-live","assertive"),r.setAttribute("aria-atomic","true"),t.delay?(r.setAttribute("data-bs-autohide","true"),r.setAttribute("data-bs-delay",t.delay.toString())):r.setAttribute("data-bs-autohide","false");const n=document.createElement("div");r.appendChild(n),n.className="toast-header",n.innerHTML=` ${t.header}${(new Date).toLocaleString()}`;const a=document.createElement("div");r.appendChild(a),a.className="toast-body",a.innerHTML=t.body,this.toastContainer.appendChild(r),this.toastElement=r,this.toastElement.addEventListener("hidden.bs.toast",()=>{this.toastElement&&this.toastElement.remove(),this.toastElement=void 0,this.toast=void 0}),this.toast=new(o())(r),this.toast.show()}}function Be(e,t,r=!1){("hidden"===document.visibilityState||r)&&new Notification(e,{lang:"en-US",badge:"/assets/notifications/badge.png",body:t,icon:"/assets/notifications/icon.png"})}function je(e){return JSON.parse(localStorage.getItem(e))}function He(){const e=je("theme");return"dark"===e||"light"===e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function qe(e="dark"){const t="dark"===e?"light":"dark",r=document.getElementsByClassName("border-mode");for(const n of r)n.classList.replace(`border-${e}`,`border-${t}`);const n=document.getElementsByClassName("border-theme");for(const r of n)r.classList.replace(`border-${e}`,`border-${t}`),r.classList.replace(`bg-${e}`,`bg-${t}`)}function Ye(e){"auto"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches?(document.documentElement.setAttribute("data-bs-theme","dark"),qe("dark")):(document.documentElement.setAttribute("data-bs-theme",e),qe(e))}function Ve(){const e=He();return Ye(e),e}const Ue=new class{data=[];background=[];dataCps=[];backgroundCps=[];dataTime=1e3;backgroundTime=1e3;getTotalCounts(e,t=0,r=this[e].length-1){const n=this[e];let a=0;if(t<0||t>=n.length||r<0||r>=n.length||t>r)return console.warn("Invalid sum range! Return default 0."),a;for(let e=t;e<=r;e++)a+=n[e];return a}addPulseData(e,t,r){this[e].length||(this[e]=Array(r).fill(0));for(const r of t)this[e][r]+=1}addHist(e,t){this[e].length||(this[e]=t);for(const r in t)this[e][r]+=t[r]}},$e=new class{plotDiv;type="default";xAxis="linear";yAxis="linear";linePlot=!1;downloadFormat="png";darkMode=!1;plotBgDark="#3f4448";plotBgLight="#ffffff";paperBgDark="#212529";paperBgLight="#ffffff";fontColorLight="#444444";fontColorDark="#dee2e6";gridColorLight="#eeeeee";gridColorDark="#515151";annoBgLight="rgba(255,255,255,0.4)";annoBgDark="rgba(0,0,0,0.4)";cpsSwitchLimit=1;evolutionPointLimit=1e4;sma=!1;smaLength=8;calibration={enabled:!1,imported:!1,points:{},coeff:{c1:0,c2:0}};cps=!1;enhanceEfficiency=!1;shapes=[];annotations=[];editableMode=!1;isotopeSeeker;peakConfig={enabled:!1,mode:void 0,thres:.008,lag:50,showFWHM:!0,newPeakStyle:!0,lines:[]};gaussSigma=2;customExportButton={name:"exportPlot",title:"Export plot as HTML",icon:s().Icons.disk,direction:"up",click:e=>{const t=JSON.parse(JSON.stringify(e.layout));t.images[0].source=new URL("/assets/logo.svg",window.location.origin).href;const r={x:1,y:0,opacity:.9,xref:"paper",yref:"paper",xanchor:"right",yanchor:"bottom",text:window.location.origin,showarrow:!1,font:{size:10}};t.annotations.push(r);const n=` \n \x3c!-- Gamma MCA Interactive Export Version 1.2 by NuclearPhoenix. https://spectrum.nuclearphoenix.xyz. --\x3e\n \n \n \n \n \n
\n \r\n \r\n \r\n \\\r\n `;\r\n\r\n const element = document.createElement('a');\r\n element.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(text)}`);\r\n element.setAttribute('download', 'gamma_mca_export.html');\r\n element.style.display = 'none';\r\n element.click();\r\n }};\r\n private customFullscreenButton = {\r\n name: 'fullscreen',\r\n title: 'Toggle Fullscreen',\r\n icon: Plotly.Icons.drawrect,\r\n direction: 'up',\r\n click: (plotElement: PlotlyHTMLElement) => {\r\n plotElement.classList.toggle('fullscreen');\r\n Plotly.update(plotElement, {}, {});\r\n }};\r\n gaussValues: GaussData = {\r\n dataArray: [],\r\n sigma: 0\r\n };\r\n\r\n /*\r\n Constructor\r\n */\r\n constructor(divId: string) {\r\n this.plotDiv = document.getElementById(divId);\r\n }\r\n /*\r\n Get An Array with Length == Data.length containing ascending numbers\r\n */\r\n private getXAxis(len: number, step: number = 1): number[] {\r\n const xArray: number[] = [];\r\n for (let i = 0; i < len; i += step) {\r\n xArray.push(i);\r\n }\r\n return xArray;\r\n }\r\n /*\r\n Delete calibration points and calibration coefficients\r\n */\r\n clearCalibration(): void {\r\n this.calibration.points = {};\r\n this.calibration.coeff = {\r\n c1: 0,\r\n c2: 0,\r\n };\r\n this.calibration.imported = false;\r\n }\r\n /*\r\n Compute the coefficients used for calibration\r\n */\r\n async computeCoefficients(): Promise {\r\n const data: DataPoint[] = [];\r\n\r\n for (const [bin, energy] of Object.entries(this.calibration.points)) {\r\n data.push([parseFloat(bin), energy]);\r\n }\r\n\r\n const result = regression.polynomial(data, { order: data.length - 1, precision: 10 });\r\n const terms = result.equation.reverse();\r\n \r\n for (let i = 0; i < data.length; i++) {\r\n this.calibration.coeff[`c${i+1}`] = terms[i];\r\n }\r\n }\r\n /*\r\n Get the calibrated x-axis using the values in this.calibration\r\n */\r\n getCalAxis(len: number): number[] {\r\n const calArray: number[] = [];\r\n\r\n for (let i = 0; i < len; i++) {\r\n let val = 0;\r\n\r\n for (let j = 0; j < Object.keys(this.calibration.coeff).length; j++) {\r\n const c = this.calibration.coeff[`c${j+1}`] ?? 0;\r\n val += c * i ** j;\r\n }\r\n\r\n calArray.push(val);\r\n }\r\n\r\n return calArray;\r\n }\r\n /*\r\n Get The Moving Average\r\n */\r\n private computeMovingAverage(target: number[], length = this.smaLength): number[] {\r\n const newData: number[] = Array(target.length);\r\n const half = Math.round(length/2);\r\n\r\n for (let i = 0; i < newData.length; i++) { // Compute the central moving average\r\n if (i >= half && i <= target.length - half - 1) { // Shortcut\r\n const remainderIndexFactor = length % 2;\r\n\r\n const addVal = target[i+half-remainderIndexFactor];\r\n const removeVal = target[i-half];\r\n\r\n newData[i] = newData[i - 1] + (addVal - removeVal) / length;\r\n continue; // Skip other computation.\r\n }\r\n\r\n let val = 0;\r\n let divider = 0;\r\n\r\n for (let j = 0; j < length; j++) { // Slightly asymetrical to the right with even numbers of smaLength\r\n if (j < half) {\r\n if ((i - j) >= 0) {\r\n val += target[i - j];\r\n divider++;\r\n }\r\n } else {\r\n if ((i - half+1 + j) < newData.length) {\r\n val += target[i - half+1 + j];\r\n divider++;\r\n }\r\n }\r\n }\r\n newData[i] = val / divider;\r\n }\r\n return newData;\r\n }\r\n /*\r\n Clear all lines placed by the peak finder\r\n */\r\n clearPeakFinder(): void {\r\n if (this.peakConfig.lines.length) {\r\n const lines = this.peakConfig.lines\r\n for (const line of lines) {\r\n this.toggleLine(line, '', false);\r\n }\r\n this.peakConfig.lines = [];\r\n }\r\n }\r\n /*\r\n Show any peaks that have been found by marking in the plot\r\n */\r\n private drawPeakFinder(xAxis: number[], peakArray: number[], heightAxis: number[]): void {\r\n for (let result of peakArray) {\r\n const resultBin = Math.round(result);\r\n const height = heightAxis[resultBin];\r\n if (this.calibration.enabled) result = xAxis[resultBin];\r\n\r\n if (height >= 0) {\r\n if (this.peakConfig.mode === 'energy') {\r\n this.toggleLine(result, Math.round(result).toString(), true, height);\r\n this.peakConfig.lines.push(result);\r\n } else if (this.peakConfig.mode === 'isotopes') { // Isotope Mode\r\n if (!this.isotopeSeeker) throw 'No isotope seeker found!';\r\n\r\n const { energy, name } = this.isotopeSeeker.seek(result/*, size*/);\r\n if (energy && name) {\r\n this.toggleLine(energy, name, true, height);\r\n this.peakConfig.lines.push(energy);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n /*\r\n Find peaks in the height data by using two different moving averages\r\n */\r\n peakFinder(heightData: number[]): number[] {\r\n this.clearPeakFinder();\r\n\r\n const blankXAxis = this.getXAxis(heightData.length);\r\n\r\n const longData = this.computeMovingAverage(heightData, this.peakConfig.lag);\r\n\r\n const maxVal = Math.max(...heightData);\r\n const peakLines: number[] = [];\r\n\r\n const shortLen = heightData.length;\r\n\r\n for (let i = 0; i < shortLen; i++) {\r\n if (heightData[i] - longData[i] > this.peakConfig.thres * maxVal) peakLines.push(blankXAxis[i]);\r\n }\r\n\r\n let values: number[] = [];\r\n peakLines.push(0);\r\n\r\n const peakLen = peakLines.length;\r\n\r\n const peakArray: number[] = [];\r\n\r\n for (let i = 0; i < peakLen; i++) {\r\n values.push(peakLines[i]);\r\n\r\n if (Math.abs(peakLines[i + 1] - peakLines[i]) > 2) { // Check if adjacent bins, i.e. one connected peak\r\n let result = 0;\r\n\r\n if (values.length === 1) {\r\n result = peakLines[i];\r\n } else {\r\n for (const val of values) {\r\n result += val;\r\n }\r\n result /= values.length;\r\n }\r\n\r\n peakArray.push(result);\r\n\r\n values = [];\r\n }\r\n }\r\n\r\n return peakArray;\r\n }\r\n /*\r\n Convenient Wrapper, could do more in the future\r\n */\r\n resetPlot(spectrumData: SpectrumData, cpsValues: number[] = []): void {\r\n if (this.type === 'calibration') this.plotCalibration(spectrumData, false); // Plot calibration chart\r\n if (this.type === 'evolution') this.plotEvolution(cpsValues, false); // Plot radiation evolution chart\r\n\r\n this.plotData(spectrumData, false); // Update the default spectrum plot\r\n }\r\n /*\r\n Convenient Wrapper, could do more in the future\r\n */\r\n updatePlot(spectrumData: SpectrumData, cpsValues: number[] = []): void {\r\n if (this.type === 'calibration') this.plotCalibration(spectrumData, true); // Plot calibration chart\r\n if (this.type === 'evolution') this.plotEvolution(cpsValues, true); // Plot radiation evolution chart\r\n\r\n this.plotData(spectrumData, true); // Update the default spectrum plot\r\n }\r\n /*\r\n Add a line\r\n */\r\n toggleLine(energy: number, name: string, enabled = true, height = -1): boolean {\r\n //name = name.replaceAll('-',''); // Remove - to save space\r\n const hovertext = energy.toFixed(2);\r\n\r\n if (enabled) {\r\n const newLine: ShapePlus = {\r\n type: 'line',\r\n xref: 'x',\r\n yref: 'paper',\r\n x0: energy,\r\n y0: 0,\r\n x1: energy,\r\n y1: 1,\r\n //fillcolor: 'black',\r\n line: {\r\n color: 'blue',\r\n width: 0.8,\r\n dash: 'dot'\r\n },\r\n opacity: 0.66\r\n };\r\n const newAnno: AnnoPlus = {\r\n x: this.xAxis === 'log' ? Math.log10(energy) : energy,\r\n y: 1,\r\n xref: 'x',\r\n yref: 'paper',\r\n text: name,\r\n showarrow: true,\r\n arrowcolor: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n arrowhead: 7,\r\n ax: 0,\r\n ay: -20,\r\n hovertext: hovertext,\r\n font: {\r\n size: 11,\r\n },\r\n };\r\n\r\n if (height >= 0 && this.peakConfig.newPeakStyle) {\r\n //newLine.yref = 'y';\r\n newLine.y0 = 0;\r\n //newLine.y1 = height;\r\n newLine.y1 = 0;\r\n newLine.line.width = 0;\r\n //newLine.line.width = 2;\r\n\r\n newAnno.y = (this.yAxis === 'log' ? Math.log10(height) : height) * 1.03;\r\n newAnno.yref = 'y';\r\n newAnno.arrowhead = 1;\r\n newAnno.arrowsize = 0.8;\r\n newAnno.ay = -40;\r\n newAnno.bgcolor = this.darkMode ? this.annoBgDark : this.annoBgLight;\r\n }\r\n\r\n // Check if the line or annotation already exists. If it exists, do not add it again!\r\n for (const shape of this.shapes) {\r\n if (shape.x0 === newLine.x0) return false;\r\n }\r\n\r\n for (const anno of this.annotations) {\r\n if (anno.hovertext === newAnno.hovertext) return false;\r\n }\r\n\r\n // Not a duplicate, add the line and annotation\r\n this.shapes.push(newLine);\r\n this.annotations.push(newAnno);\r\n } else {\r\n for (const i in this.shapes) {\r\n if (this.shapes[i].x0 === energy) this.shapes.splice(parseInt(i),1);\r\n }\r\n for (const i in this.annotations) {\r\n if (this.annotations[i].hovertext === hovertext) this.annotations.splice(parseInt(i),1);\r\n }\r\n }\r\n return true; // Return true if the line was added or removed, return false if it was already there (duplicate)\r\n }\r\n /*\r\n Clear annotations and shapes\r\n */\r\n clearAnnos(): void {\r\n this.shapes = [];\r\n this.annotations = [];\r\n }\r\n /*\r\n Switch between different chart types\r\n */\r\n setChartType(type: ChartType, dataObj: SpectrumData, cpsValues: number[] = []): void {\r\n this.type = type;\r\n\r\n switch (type) {\r\n case 'evolution': {\r\n this.plotEvolution(cpsValues, false)\r\n break;\r\n }\r\n case 'calibration': {\r\n this.plotCalibration(dataObj, false)\r\n break;\r\n }\r\n default: {\r\n this.plotData(dataObj, false);\r\n }\r\n }\r\n }\r\n /*\r\n Compute gaussValues for the Gaussian correlation filter\r\n */\r\n computeGaussValues(index: number, xMin: number, xMax: number): number[] {\r\n const gaussValues: number[] = [];\r\n for (let k = xMin; k < xMax; k++) {\r\n gaussValues.push(Math.exp(- k * k / (2 * index)));\r\n }\r\n\r\n let avg = 0;\r\n for (const value of gaussValues) {\r\n avg += value;\r\n }\r\n avg /= (xMax - xMin);\r\n\r\n let squaredSum = 0;\r\n for (const value of gaussValues) {\r\n squaredSum += (value - avg) * (value - avg);\r\n }\r\n\r\n for (const index in gaussValues) {\r\n gaussValues[index] = (gaussValues[index] - avg) / squaredSum;\r\n }\r\n\r\n return gaussValues;\r\n }\r\n /*\r\n Gaussian correlation filter using the PRA algorithm\r\n */\r\n private gaussianCorrel(data: number[], sigma = 2): number[] {\r\n const correlValues = Array(data.length);\r\n let computeNew = false;\r\n\r\n // Only compute values once, until other factors change\r\n if (data.length !== this.gaussValues.dataArray.length || sigma !== this.gaussValues.sigma) {\r\n this.gaussValues.dataArray = Array(data.length);\r\n this.gaussValues.sigma = sigma;\r\n computeNew = true;\r\n }\r\n\r\n for (let index = 0; index < data.length; index++) {\r\n const std = Math.sqrt(index);\r\n const xMin = - Math.round(sigma * std);\r\n const xMax = Math.round(sigma * std);\r\n\r\n if (computeNew) this.gaussValues.dataArray[index] = this.computeGaussValues(index, xMin, xMax);\r\n\r\n const gaussValues = this.gaussValues.dataArray[index];\r\n\r\n let resultVal = 0;\r\n\r\n for (let k = xMin; k < xMax; k++) {\r\n resultVal += data[index + k] * gaussValues[k - xMin];\r\n }\r\n\r\n const value = (resultVal && resultVal > 0 ) ? resultVal : 0;\r\n correlValues[index] = value;\r\n }\r\n\r\n const scalingFactor = .8 * Math.max(...data) / Math.max(...correlValues); // Scale GCF values depending on the spectrum data\r\n correlValues.forEach((value, index, array) => array[index] = value * scalingFactor);\r\n\r\n return correlValues;\r\n }\r\n /*\r\n Limit array size by decreasing resolution/number of points to boost performance of plot refreshs\r\n */\r\n private limitArraySize(originalArray: number[], targetSize: number): number[] {\r\n if (targetSize <= 1) {\r\n return originalArray; // The original array is small enough to be printed without reducing resolution\r\n }\r\n \r\n const resultArray: number[] = [];\r\n const originalSize = originalArray.length;\r\n \r\n for (let i = 0; i < originalSize; i += targetSize) {\r\n const chunk = originalArray.slice(i, i + targetSize);\r\n const average = chunk.reduce((sum, value) => sum + value, 0) / chunk.length;\r\n resultArray.push(average);\r\n }\r\n \r\n return resultArray;\r\n }\r\n /*\r\n Plot Radiation Evolution Chart\r\n */\r\n private plotEvolution(cpsValues: number[], update: boolean): void {\r\n if (!this.plotDiv) return; // No valid HTMLElement for the plot to show\r\n\r\n const targetSize = Math.ceil(cpsValues.length / this.evolutionPointLimit);\r\n const xAxis = this.getXAxis(cpsValues.length, targetSize);\r\n const yAxis = this.limitArraySize(cpsValues, targetSize);\r\n\r\n const trace: Trace = {\r\n name: 'Radiation Evolution',\r\n x: xAxis,\r\n y: yAxis,\r\n mode: 'lines',\r\n type: 'scatter',\r\n //fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'orangered',\r\n width: 1.5,\r\n shape: 'spline'\r\n }\r\n };\r\n\r\n const averageTrace: Trace = {\r\n name: 'Moving Average',\r\n x: xAxis,\r\n y: this.computeMovingAverage(yAxis),\r\n mode: 'lines',\r\n type: 'scatter',\r\n //fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'darkblue',\r\n width: 2,\r\n shape: 'spline'\r\n }\r\n };\r\n\r\n const layout: LayoutPlus = {\r\n uirevision: 1,\r\n autosize: true, // Needed for resizing on update\r\n title: {\r\n text: 'Radiation Evolution',\r\n },\r\n hovermode: 'x',\r\n legend: {\r\n orientation: 'h',\r\n y: -0.35\r\n },\r\n xaxis: {\r\n title: {\r\n text: 'Data Point [1]'\r\n },\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n rangeslider: {\r\n borderwidth: 1\r\n },\r\n showspikes: true, //Show spike line for X-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n ticksuffix: '',\r\n hoverformat: ',.2~f',\r\n exponentformat: 'none',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n yaxis: {\r\n title: {\r\n text: 'Counts Per Second [s-1]' \r\n },\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n showspikes: true, //Show spike line for Y-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n showticksuffix: 'last',\r\n ticksuffix: 'cps',\r\n //tickformat: '.02s',\r\n hoverformat: '.4~s',\r\n //showexponent: 'last',\r\n exponentformat: 'SI',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n plot_bgcolor: this.darkMode ? this.plotBgDark : this.plotBgLight,\r\n paper_bgcolor: this.darkMode ? this.paperBgDark : this.paperBgLight,\r\n font: {\r\n color: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n },\r\n margin: {\r\n l: 40,\r\n r: 40,\r\n b: 50,\r\n t: 55,\r\n //pad: 4,\r\n },\r\n images: [{\r\n x: 0.99,\r\n y: 0.99,\r\n opacity: 0.4,\r\n sizex: 0.15,\r\n sizey: 0.15,\r\n source: '/assets/logo.svg',\r\n xanchor: 'right',\r\n xref: 'paper',\r\n yanchor: 'top',\r\n yref: 'paper',\r\n }],\r\n annotations: []\r\n };\r\n\r\n const config: Partial = {\r\n responsive: true,\r\n scrollZoom: false,\r\n //displayModeBar: true,\r\n displaylogo: false,\r\n toImageButtonOptions: {\r\n format: this.downloadFormat,\r\n filename: 'gamma_mca_evolution',\r\n },\r\n editable: this.editableMode,\r\n modeBarButtons: [\r\n ['zoom2d'],\r\n ['zoomIn2d', 'zoomOut2d'],\r\n ['autoScale2d', 'resetScale2d'],\r\n ['toImage'],\r\n [this.customExportButton],\r\n [this.customFullscreenButton]\r\n ]\r\n };\r\n\r\n Plotly[update ? 'react' : 'newPlot'](this.plotDiv, [trace, averageTrace], layout, config);\r\n }\r\n /*\r\n Plot Calibration Chart\r\n */\r\n private plotCalibration(dataObj: SpectrumData, update: boolean): void {\r\n if (!this.plotDiv) return; // No valid HTMLElement for the plot to show\r\n\r\n let axisSize = dataObj.data.length;\r\n\r\n if (Object.keys(this.calibration.points).length) {\r\n const maxBin = Object.keys(this.calibration.points).reduce((max, c) => parseFloat(c) > parseFloat(max) ? c : max);\r\n axisSize = Math.max(dataObj.data.length, parseFloat(maxBin)) + 1;\r\n }\r\n\r\n const trace: Trace = {\r\n name: 'Calibration',\r\n x: this.getXAxis(axisSize),\r\n y: this.getCalAxis(axisSize),\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n type: 'scatter',\r\n fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'orangered',\r\n width: 1,\r\n }\r\n };\r\n\r\n const markersTrace: Trace = {\r\n name: 'Calibration Points',\r\n x: [],\r\n y: [],\r\n mode: 'text+markers',\r\n type: 'scatter',\r\n marker: {\r\n //symbol: 'cross-thin',\r\n size: 8,\r\n color: '#444444',\r\n //line: {\r\n // color: 'black',\r\n // width: 2\r\n //}\r\n },\r\n text: [],\r\n textposition: 'top center',\r\n };\r\n\r\n let index = 0;\r\n\r\n for (const [bin, energy] of Object.entries(this.calibration.points)) {\r\n markersTrace.x.push(parseFloat(bin));\r\n markersTrace.y.push(energy);\r\n markersTrace.text?.push(`Point ${index+1}`);\r\n index++;\r\n }\r\n\r\n const layout: LayoutPlus = {\r\n uirevision: 1,\r\n autosize: true, // Needed for resizing on update\r\n title: {\r\n text: 'Calibration', \r\n },\r\n hovermode: 'x',\r\n legend: {\r\n orientation: 'h',\r\n y: -0.35,\r\n },\r\n xaxis: {\r\n title: {\r\n text: 'Bin [1]'\r\n },\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n rangeslider: {\r\n borderwidth: 1\r\n },\r\n showspikes: true, //Show spike line for X-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n ticksuffix: '',\r\n hoverformat: ',.2~f',\r\n exponentformat: 'none',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n yaxis: {\r\n title: {\r\n text: 'Energy [keV]'\r\n },\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true, //'max',\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n //range: [0, null],\r\n showspikes: true, //Show spike line for Y-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n showticksuffix: 'last',\r\n ticksuffix: ' keV',\r\n showexponent: 'last',\r\n exponentformat: 'none',\r\n hoverformat: ',.2~f',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n plot_bgcolor: this.darkMode ? this.plotBgDark : this.plotBgLight,\r\n paper_bgcolor: this.darkMode ? this.paperBgDark : this.paperBgLight,\r\n font: {\r\n color: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n },\r\n margin: {\r\n l: 40,\r\n r: 40,\r\n b: 50,\r\n t: 55,\r\n //pad: 4,\r\n },\r\n images: [{\r\n x: 0.99,\r\n y: 0.99,\r\n opacity: 0.4,\r\n sizex: 0.15,\r\n sizey: 0.15,\r\n source: '/assets/logo.svg',\r\n xanchor: 'right',\r\n xref: 'paper',\r\n yanchor: 'top',\r\n yref: 'paper',\r\n }],\r\n annotations: []\r\n };\r\n\r\n const config: Partial = {\r\n responsive: true,\r\n scrollZoom: false,\r\n //displayModeBar: true,\r\n displaylogo: false,\r\n toImageButtonOptions: {\r\n format: this.downloadFormat,\r\n filename: 'gamma_mca_calibration',\r\n },\r\n editable: this.editableMode,\r\n modeBarButtons: [\r\n ['zoom2d'],\r\n ['zoomIn2d', 'zoomOut2d'],\r\n ['autoScale2d', 'resetScale2d'],\r\n ['toImage'],\r\n [this.customExportButton],\r\n [this.customFullscreenButton]\r\n ]\r\n };\r\n\r\n Plotly[update ? 'react' : 'newPlot'](this.plotDiv, [trace, markersTrace], layout, config);\r\n }\r\n /*\r\n Compute data for pulse height histogram with cps, sma, gauss filter and others\r\n */\r\n computePulseHeightData(dataObj: SpectrumData): Trace[] {\r\n const data: Trace[] = [];\r\n\r\n if (dataObj.data.length) {\r\n const trace: Trace = {\r\n name: 'Spectrum',\r\n stackgroup: 'data', // Stack line charts on top of each other\r\n\r\n x: this.getXAxis(dataObj.data.length),\r\n y: dataObj.data,\r\n type: 'scatter',\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n fill: this.linePlot ? 'none' : 'tonexty',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'orangered',\r\n width: 1,\r\n shape: this.linePlot ? 'linear' : 'hvh',\r\n }\r\n };\r\n\r\n if (this.cps) trace.y = dataObj.dataCps;\r\n data.push(trace);\r\n }\r\n\r\n /*\r\n Compute Background and Corrected Spectrum\r\n */\r\n if (dataObj.background.length) { //== dataObj.data.length)\r\n const bgTrace: Trace = {\r\n name: 'Background',\r\n stackgroup: 'data', // Stack line charts on top of each other\r\n\r\n x: this.getXAxis(dataObj.background.length),\r\n y: dataObj.background,\r\n type: 'scatter',\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n fill: this.linePlot ? 'none' : 'tonexty',\r\n //opacity: 1,\r\n line: {\r\n color: 'slategrey',\r\n width: 1,\r\n shape: this.linePlot ? 'linear' : 'hvh',\r\n }\r\n };\r\n\r\n if (this.cps) bgTrace.y = dataObj.backgroundCps;\r\n\r\n if (data.length) {\r\n const newData: number[] = []; // Compute the corrected data, i.e. data - background\r\n\r\n const dataLen = data[0].y.length;\r\n for (let i = 0; i < dataLen; i++) {\r\n newData.push(data[0].y[i] - bgTrace.y[i]);\r\n }\r\n\r\n data[0].y = newData;\r\n //data[0].fill = this.linePlot ? 'none' : 'tonexty'; //'tonextx'\r\n data[0].name = 'Net Spectrum';\r\n }\r\n\r\n //data.unshift(bgTrace);\r\n data.push(bgTrace);\r\n }\r\n\r\n /*\r\n Set Simple Moving Average\r\n */\r\n if (this.sma) { // SIMPLE MOVING AVERAGE. MAYBE PLOT IT AS DIFFERENT LINE?\r\n for (const element of data) {\r\n element.y = this.computeMovingAverage(element.y);\r\n }\r\n }\r\n\r\n /*\r\n Energy calibration enabled\r\n */\r\n if (this.calibration.enabled) {\r\n for (const element of data) {\r\n element.x = this.getCalAxis(element.x.length);\r\n }\r\n }\r\n\r\n /*\r\n Qualitative enhancement of detector efficiency\r\n */\r\n if (this.enhanceEfficiency) {\r\n for (const element of data) {\r\n const coeffArr: number[] = [];\r\n for (const value of element.x) {\r\n coeffArr.push(0.00002 * value ** 2 + 0.0045 * value + 0.22);\r\n }\r\n\r\n const newData: number[] = [];\r\n for (const index in element.y) {\r\n newData.push(element.y[index] * coeffArr[index]);\r\n }\r\n\r\n element.y = newData;\r\n }\r\n }\r\n\r\n /*\r\n Peak Detection Stuff\r\n */\r\n if (this.peakConfig.enabled && data.length) {\r\n // Gaussian Correlation Filter\r\n const gaussData = this.gaussianCorrel(data[0].y, this.gaussSigma);\r\n\r\n const eTrace: Trace = {\r\n name: 'Gaussian Correlation',\r\n //stackgroup: 'data', // Stack line charts on top of each other\r\n x: data[0].x,\r\n y: gaussData,\r\n //yaxis: 'y2',\r\n type: 'scatter',\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n //fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'black',\r\n width: 0.6,\r\n shape: this.linePlot ? 'linear' : 'hvh',\r\n },\r\n marker: {\r\n color: 'black',\r\n }\r\n };\r\n\r\n data.unshift(eTrace);\r\n }\r\n\r\n return data;\r\n }\r\n /*\r\n Plot All The Data\r\n */\r\n private plotData(dataObj: SpectrumData, update: boolean): void {\r\n if (!this.plotDiv) return; // No valid HTMLElement for the plot to show\r\n if (this.type !== 'default') return; // Ignore this if the calibration chart is currently shown\r\n\r\n /*\r\n All The Layout Stuff\r\n */\r\n const layout: LayoutPlus = {\r\n uirevision: 1,\r\n autosize: true, // Needed for resizing on update\r\n title: {\r\n text: 'Energy Spectrum',\r\n },\r\n hovermode: 'x',\r\n legend: {\r\n orientation: 'h',\r\n y: -0.35,\r\n },\r\n selectdirection: 'h',\r\n activeselection: {\r\n fillcolor: 'blue',\r\n opacity: 0.01\r\n },\r\n newselection: {\r\n line: {\r\n color: 'blue',\r\n width: 1,\r\n dash: 'solid'\r\n }\r\n },\r\n xaxis: {\r\n title: {\r\n text: 'Bin [1]'\r\n },\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n type: this.xAxis, // 'linear' or 'log'\r\n rangeslider: {\r\n borderwidth: 1\r\n },\r\n showspikes: true, //Show spike line for X-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n //nticks: 20,\r\n //tickformat: '.01f',\r\n hoverformat: ',.2~f',\r\n ticksuffix: '',\r\n exponentformat: 'none',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n yaxis: {\r\n title: {\r\n text: 'Counts [1]'\r\n },\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n fixedrange: false,\r\n type: this.yAxis, // 'linear' or 'log'\r\n //showspikes: true, //Show spike line for Y-axis\r\n //spikethickness: 1,\r\n //spikedash: 'solid',\r\n //spikecolor: 'blue',\r\n //spikemode: 'across',\r\n showticksuffix: 'last',\r\n ticksuffix: 'cts',\r\n //tickformat: '.02s',\r\n hoverformat: '.4~s',\r\n //showexponent: 'last',\r\n exponentformat: 'SI',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n /*\r\n yaxis2: {\r\n overlaying: 'y',\r\n side: 'right'\r\n },\r\n */\r\n plot_bgcolor: this.darkMode ? this.plotBgDark : this.plotBgLight,\r\n paper_bgcolor: this.darkMode ? this.paperBgDark : this.paperBgLight,\r\n font: {\r\n color: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n },\r\n margin: {\r\n l: 40,\r\n r: 40,\r\n b: 50,\r\n t: this.peakConfig.newPeakStyle ? 55 : 80,\r\n //autoexpand: true\r\n },\r\n images: [{\r\n x: 0.99,\r\n y: 0.99,\r\n opacity: 0.4,\r\n sizex: 0.15,\r\n sizey: 0.15,\r\n source: '/assets/logo.svg',\r\n xanchor: 'right',\r\n xref: 'paper',\r\n yanchor: 'top',\r\n yref: 'paper',\r\n }],\r\n shapes: [],\r\n annotations: [],\r\n //shapes: this.shapes,\r\n //annotations: JSON.parse(JSON.stringify(this.annotations)), // Copy array but do not reference\r\n };\r\n /*\r\n Set calibrated x-axis\r\n */\r\n if (this.calibration.enabled) {\r\n layout.xaxis.title.text = 'Energy [keV]';\r\n layout.xaxis.ticksuffix = ' keV';\r\n }\r\n\r\n const config: Partial = {\r\n responsive: true,\r\n scrollZoom: false,\r\n //displayModeBar: true,\r\n displaylogo: false,\r\n toImageButtonOptions: {\r\n format: this.downloadFormat,\r\n filename: 'gamma_mca_spectrum',\r\n },\r\n editable: this.editableMode,\r\n modeBarButtons: [\r\n ['select2d'],\r\n ['zoom2d'],\r\n ['zoomIn2d', 'zoomOut2d'],\r\n ['autoScale2d', 'resetScale2d'],\r\n ['toImage'],\r\n [this.customExportButton],\r\n [this.customFullscreenButton]\r\n ]\r\n };\r\n\r\n const data = this.computePulseHeightData(dataObj); // Get all trace data\r\n\r\n /*\r\n CPS enabled\r\n */\r\n if (this.cps) {\r\n if (data.length > 0) { // Check before, otherwise it will crash recordings instantly when they start!\r\n if (Math.max(...data[0].y) < this.cpsSwitchLimit) { // Less than 1 cps at max, switch to cpm\r\n for (const trace of data) {\r\n trace.y = trace.y.map(value => value * 60);\r\n }\r\n layout.yaxis.title.text = 'Counts Per Minute [60 s-1]';\r\n layout.yaxis.ticksuffix = 'cpm';\r\n } else { // Enough counts for cpm\r\n layout.yaxis.title.text = 'Counts Per Second [s-1]';\r\n layout.yaxis.ticksuffix = 'cps';\r\n }\r\n }\r\n }\r\n\r\n /*\r\n Peak Detection Stuff\r\n */\r\n if (this.peakConfig.enabled && data.length > 1) {\r\n const gaussDataX = data[0].x; // Gauss data will always be the first trace\r\n const gaussDataY = data[0].y;\r\n\r\n const peaks = this.peakFinder(gaussDataY);\r\n this.drawPeakFinder(gaussDataX, peaks, data[1].y);\r\n\r\n if (this.peakConfig.showFWHM) {\r\n const peakResolutions = new CalculateFWHM(this.peakConfig.lines, data[1].x, data[1].y).getResolution();\r\n \r\n for (const anno of this.annotations) {\r\n const fwhmValue = peakResolutions[anno.x];\r\n \r\n if (fwhmValue > 0 && fwhmValue < 0.9 * CalculateFWHM.resolutionLimit) anno.text += `
${(fwhmValue * 100).toFixed(1)}%`;\r\n }\r\n }\r\n }\r\n\r\n if (!this.peakConfig.enabled || !data.length || data.length >= 3) data.reverse(); // Change/Fix data order\r\n\r\n layout.shapes = this.shapes;\r\n layout.annotations = JSON.parse(JSON.stringify(this.annotations)); //layout.annotations.concat(JSON.parse(JSON.stringify(this.annotations))); // Copy array but do not reference\r\n\r\n if (this.calibration.enabled) {\r\n for (const anno of layout.annotations) {\r\n anno.hovertext += layout.xaxis.ticksuffix;\r\n }\r\n }\r\n\r\n //setTimeout(Plotly[update ? 'react' : 'newPlot'], 1, this.plotDiv, data, layout, config); // Make plot update async\r\n Plotly[update ? 'react' : 'newPlot'](this.plotDiv, data, layout, config);\r\n }\r\n}\r\n","export const whatIs = (what) => {\n if (typeof what === 'object') {\n if (what === null) {\n return 'null';\n }\n if (Array.isArray(what)) {\n return 'array';\n }\n return 'object'; // typeof what === 'object' && what === Object(what) && !Array.isArray(what);\n }\n if (typeof what === 'number') {\n if (Number.isFinite(what)) {\n if (what % 1 === 0) {\n return 'integer';\n }\n else {\n return 'number';\n }\n }\n if (Number.isNaN(what)) {\n return 'not-a-number';\n }\n return 'unknown-number';\n }\n return typeof what; // undefined, boolean, string, function\n};\nexport function isObject(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nexport function isInteger(value) {\n return typeof value === 'number' && Number.isFinite(value) && value % 1 === 0;\n}\n","import { isObject } from './utils/what-is.js';\nexport const getId = (schema) => {\n if (schema.$id) {\n return schema.$id;\n }\n if (schema.id) {\n return schema.id;\n }\n return undefined;\n};\nexport const findId = (schema, id) => {\n // process only arrays and objects\n if (typeof schema !== 'object' || schema === null) {\n return;\n }\n // no id means root so return itself\n if (!id) {\n return schema;\n }\n const schemaId = getId(schema);\n if (schemaId) {\n if (schemaId === id || (schemaId[0] === '#' && schemaId.substring(1) === id)) {\n return schema;\n }\n }\n let idx, result;\n if (Array.isArray(schema)) {\n idx = schema.length;\n while (idx--) {\n result = findId(schema[idx], id);\n if (result) {\n return result;\n }\n }\n }\n if (isObject(schema)) {\n const keys = Object.keys(schema);\n idx = keys.length;\n while (idx--) {\n const k = keys[idx];\n if (k.indexOf('__$') === 0) {\n continue;\n }\n result = findId(schema[k], id);\n if (result) {\n return result;\n }\n }\n }\n};\n","export const Errors = {\n INVALID_TYPE: 'Expected type {0} but found type {1}',\n INVALID_FORMAT: \"Object didn't pass validation for format {0}: {1}\",\n ENUM_MISMATCH: 'No enum match for: {0}',\n ENUM_CASE_MISMATCH: 'Enum does not match case for: {0}',\n ANY_OF_MISSING: \"Data does not match any schemas from 'anyOf'\",\n ONE_OF_MISSING: \"Data does not match any schemas from 'oneOf'\",\n ONE_OF_MULTIPLE: \"Data is valid against more than one schema from 'oneOf'\",\n NOT_PASSED: \"Data matches schema from 'not'\",\n // Array errors\n ARRAY_LENGTH_SHORT: 'Array is too short ({0}), minimum {1}',\n ARRAY_LENGTH_LONG: 'Array is too long ({0}), maximum {1}',\n ARRAY_UNIQUE: 'Array items are not unique (indexes {0} and {1})',\n ARRAY_ADDITIONAL_ITEMS: 'Additional items not allowed',\n // Numeric errors\n MULTIPLE_OF: 'Value {0} is not a multiple of {1}',\n MINIMUM: 'Value {0} is less than minimum {1}',\n MINIMUM_EXCLUSIVE: 'Value {0} is equal or less than exclusive minimum {1}',\n MAXIMUM: 'Value {0} is greater than maximum {1}',\n MAXIMUM_EXCLUSIVE: 'Value {0} is equal or greater than exclusive maximum {1}',\n // Object errors\n OBJECT_PROPERTIES_MINIMUM: 'Too few properties defined ({0}), minimum {1}',\n OBJECT_PROPERTIES_MAXIMUM: 'Too many properties defined ({0}), maximum {1}',\n OBJECT_MISSING_REQUIRED_PROPERTY: 'Missing required property: {0}',\n OBJECT_ADDITIONAL_PROPERTIES: 'Additional properties not allowed: {0}',\n OBJECT_DEPENDENCY_KEY: 'Dependency failed - key must exist: {0} (due to key: {1})',\n // String errors\n MIN_LENGTH: 'String is too short ({0} chars), minimum {1}',\n MAX_LENGTH: 'String is too long ({0} chars), maximum {1}',\n PATTERN: 'String does not match pattern {0}: {1}',\n // Schema validation errors\n KEYWORD_TYPE_EXPECTED: \"Keyword '{0}' is expected to be of type '{1}'\",\n KEYWORD_UNDEFINED_STRICT: \"Keyword '{0}' must be defined in strict mode\",\n KEYWORD_UNEXPECTED: \"Keyword '{0}' is not expected to appear in the schema\",\n KEYWORD_MUST_BE: \"Keyword '{0}' must be {1}\",\n KEYWORD_DEPENDENCY: \"Keyword '{0}' requires keyword '{1}'\",\n KEYWORD_PATTERN: \"Keyword '{0}' is not a valid RegExp pattern: {1}\",\n KEYWORD_VALUE_TYPE: \"Each element of keyword '{0}' array must be a '{1}'\",\n UNKNOWN_FORMAT: \"There is no validation function for format '{0}'\",\n CUSTOM_MODE_FORCE_PROPERTIES: '{0} must define at least one property if present',\n // Remote errors\n REF_UNRESOLVED: 'Reference has not been resolved during compilation: {0}',\n UNRESOLVABLE_REFERENCE: 'Reference could not be resolved: {0}',\n SCHEMA_NOT_REACHABLE: 'Validator was not able to read schema with uri: {0}',\n SCHEMA_TYPE_EXPECTED: \"Schema is expected to be of type 'object'\",\n SCHEMA_NOT_AN_OBJECT: 'Schema is not an object: {0}',\n ASYNC_TIMEOUT: '{0} asynchronous task(s) have timed out after {1} ms',\n PARENT_SCHEMA_VALIDATION_FAILED: 'Schema failed to validate against its parent schema, see inner errors for details.',\n REMOTE_NOT_VALID: \"Remote reference didn't compile successfully: {0}\",\n // Draft-06 errors\n SCHEMA_IS_FALSE: 'Boolean schema \"false\" is always invalid.',\n CONST: 'Value does not match const: {0}',\n CONTAINS: 'Array does not contain an item matching the schema',\n PROPERTY_NAMES: 'Property name {0} does not match the propertyNames schema',\n};\nexport class ValidateError extends Error {\n name;\n details;\n constructor(message, details) {\n super(message);\n this.name = 'z-schema validation error';\n this.details = details;\n }\n}\nexport function getValidateError({ message, details }) {\n return new ValidateError(message || '', details);\n}\n","import { isObject } from './what-is.js';\nexport const areEqual = (json1, json2, options) => {\n options = options || {};\n const caseInsensitiveComparison = options.caseInsensitiveComparison || false;\n // http://json-schema.org/latest/json-schema-core.html#rfc.section.3.6\n // Two JSON values are said to be equal if and only if:\n // both are nulls; or\n // both are booleans, and have the same value; or\n // both are strings, and have the same value; or\n // both are numbers, and have the same mathematical value; or\n if (json1 === json2) {\n return true;\n }\n if (caseInsensitiveComparison === true &&\n typeof json1 === 'string' &&\n typeof json2 === 'string' &&\n json1.toUpperCase() === json2.toUpperCase()) {\n return true;\n }\n let i, len;\n // both are arrays, and:\n if (Array.isArray(json1) && Array.isArray(json2)) {\n // have the same number of items; and\n if (json1.length !== json2.length) {\n return false;\n }\n // items at the same index are equal according to this definition; or\n len = json1.length;\n for (i = 0; i < len; i++) {\n if (!areEqual(json1[i], json2[i], { caseInsensitiveComparison: caseInsensitiveComparison })) {\n return false;\n }\n }\n return true;\n }\n // both are objects, and:\n if (isObject(json1) && isObject(json2)) {\n // have the same set of property names; and\n const keys1 = sortedKeys(json1);\n const keys2 = sortedKeys(json2);\n if (!areEqual(keys1, keys2, { caseInsensitiveComparison: caseInsensitiveComparison })) {\n return false;\n }\n // values for a same property name are equal according to this definition.\n len = keys1.length;\n for (i = 0; i < len; i++) {\n if (!areEqual(json1[keys1[i]], json2[keys1[i]], { caseInsensitiveComparison: caseInsensitiveComparison })) {\n return false;\n }\n }\n return true;\n }\n return false;\n};\nexport const decodeJSONPointer = (str) => {\n // http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07#section-3\n return decodeURIComponent(str).replace(/~[0-1]/g, (x) => (x === '~1' ? '/' : '~'));\n};\nexport const sortedKeys = (obj) => Object.keys(obj).sort();\nexport const get = (obj, path) => {\n if (typeof path === 'string') {\n path = path.split('.');\n }\n return path.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj);\n};\n","export const jsonSymbol = Symbol.for('z-schema/json');\nexport const schemaSymbol = Symbol.for('z-schema/schema');\n","export const getQueryPath = (uri) => {\n const io = uri.indexOf('#');\n const res = io === -1 ? undefined : uri.slice(io + 1);\n // WARN: do not slice slash, #/ means take root and go down from it\n // if (res && res[0] === \"/\") { res = res.slice(1); }\n return res;\n};\nexport const getRemotePath = (uri) => {\n const io = uri.indexOf('#');\n return io === -1 ? uri : uri.slice(0, io);\n};\nexport const isAbsoluteUri = (uri) => /^(https?|file):\\/\\//.test(uri);\nexport const isRelativeUri = (uri) => \n// relative URIs that end with a hash sign, issue #56\n/.+#/.test(uri);\n","import { Errors, getValidateError } from './errors.js';\nimport { get } from './utils/json.js';\nimport { jsonSymbol, schemaSymbol } from './utils/symbols.js';\nimport { isAbsoluteUri } from './utils/uri.js';\nimport { isObject } from './utils/what-is.js';\nexport class Report {\n asyncTasks = [];\n commonErrorMessage;\n errors = [];\n json;\n path = [];\n schemaPath = [];\n rootSchema;\n parentReport;\n options;\n reportOptions;\n validateOptions = {};\n constructor(parentOrOptions, reportOptionsOrValidate, validateOptions) {\n this.parentReport = parentOrOptions instanceof Report ? parentOrOptions : undefined;\n this.options = parentOrOptions instanceof Report ? parentOrOptions.options : parentOrOptions || {};\n if (parentOrOptions instanceof Report) {\n // subreport\n this.reportOptions = reportOptionsOrValidate || {};\n this.validateOptions = validateOptions || parentOrOptions.validateOptions;\n }\n else {\n // primary\n this.reportOptions = {};\n this.validateOptions = reportOptionsOrValidate || {};\n }\n }\n isValid() {\n if (this.asyncTasks.length > 0) {\n throw new Error(\"Async tasks pending, can't answer isValid\");\n }\n return this.errors.length === 0;\n }\n addAsyncTask(fn, args, asyncTaskResultProcessFn) {\n this.asyncTasks.push([fn, args, asyncTaskResultProcessFn]);\n }\n getAncestor(id) {\n if (!this.parentReport) {\n return undefined;\n }\n if (this.parentReport.getSchemaId() === id) {\n return this.parentReport;\n }\n return this.parentReport.getAncestor(id);\n }\n processAsyncTasks(timeout, callback) {\n const validationTimeout = timeout || 2000;\n let tasksCount = this.asyncTasks.length;\n let idx = tasksCount;\n let timedOut = false;\n const finish = () => {\n setTimeout(() => {\n const valid = this.errors.length === 0;\n const err = valid ? undefined : getValidateError({ details: this.errors });\n callback(err, valid);\n }, 0);\n };\n const respond = (asyncTaskResultProcessFn) => (asyncTaskResult) => {\n if (timedOut) {\n return;\n }\n asyncTaskResultProcessFn(asyncTaskResult);\n if (--tasksCount === 0) {\n finish();\n }\n };\n // finish if tasks are completed or there are any errors and breaking on first error was requested\n if (tasksCount === 0 || (this.errors.length > 0 && this.options.breakOnFirstError)) {\n finish();\n return;\n }\n while (idx--) {\n const [fn, fnArgs, processFn] = this.asyncTasks[idx];\n const respondCallback = respond(processFn);\n fn(...fnArgs, respondCallback);\n }\n setTimeout(() => {\n if (tasksCount > 0) {\n timedOut = true;\n this.addError('ASYNC_TIMEOUT', [tasksCount, validationTimeout]);\n callback(getValidateError({ details: this.errors }), false);\n }\n }, validationTimeout);\n }\n getPath(returnPathAsString) {\n let path = [];\n if (this.parentReport) {\n path = path.concat(this.parentReport.path);\n }\n path = path.concat(this.path);\n if (returnPathAsString !== true) {\n // Sanitize the path segments (http://tools.ietf.org/html/rfc6901#section-4)\n return ('#/' +\n path\n .map(function (segment) {\n segment = segment.toString();\n if (isAbsoluteUri(segment)) {\n return 'uri(' + segment + ')';\n }\n return segment.replace(/~/g, '~0').replace(/\\//g, '~1');\n })\n .join('/'));\n }\n return path;\n }\n getSchemaPath() {\n let schemaPath = [];\n if (this.parentReport) {\n schemaPath = schemaPath.concat(this.parentReport.schemaPath);\n }\n schemaPath = schemaPath.concat(this.schemaPath);\n return schemaPath;\n }\n getSchemaId() {\n if (!this.rootSchema) {\n return undefined;\n }\n // get the error path as an array\n let path = [];\n if (this.parentReport) {\n path = path.concat(this.parentReport.path);\n }\n path = path.concat(this.path);\n // try to find id in the error path\n while (path.length > 0) {\n const obj = get(this.rootSchema, path);\n if (obj && obj.id) {\n return obj.id;\n }\n path.pop();\n }\n // return id of the root\n return this.rootSchema.id;\n }\n hasError(errCode, errParams) {\n let idx = this.errors.length;\n while (idx--) {\n if (this.errors[idx].code === errCode) {\n // assume match\n let match = true;\n // check the params too\n let idx2 = this.errors[idx].params.length;\n while (idx2--) {\n if (this.errors[idx].params[idx2] !== errParams[idx2]) {\n match = false;\n }\n }\n // if match, return true\n if (match) {\n return match;\n }\n }\n }\n return false;\n }\n addError(errCode, errParams, subReports, schema, keyword) {\n if (!errCode) {\n throw new Error('No errorCode passed into addError()');\n }\n this.addCustomError(errCode, Errors[errCode], errParams, subReports, schema, keyword);\n }\n // this returns the root object being validated (the one passed into validator.validate)\n getJson() {\n if (this.json) {\n return this.json;\n }\n if (this.parentReport) {\n return this.parentReport.getJson();\n }\n return undefined;\n }\n addCustomError(errorCode, errorMessage, params, subReports, schema, keyword) {\n if (typeof this.reportOptions.maxErrors === 'number' && this.errors.length >= this.reportOptions.maxErrors) {\n return;\n }\n if (!errorMessage) {\n throw new Error('No errorMessage known for code ' + errorCode);\n }\n params = params || [];\n let idx = params.length;\n while (idx--) {\n const param = params[idx] === null || isObject(params[idx]) ? JSON.stringify(params[idx]) : params[idx];\n errorMessage = errorMessage.replace('{' + idx + '}', param.toString());\n }\n const err = {\n code: errorCode,\n params: params,\n message: errorMessage,\n path: this.getPath(this.options.reportPathAsArray),\n schemaPath: this.getSchemaPath(),\n schemaId: this.getSchemaId(),\n keyword: keyword,\n };\n // TODO v8: remove Symbol usage\n err[schemaSymbol] = schema;\n err[jsonSymbol] = this.getJson();\n if (schema && typeof schema === 'string') {\n err.description = schema;\n }\n else if (schema && typeof schema === 'object') {\n if (schema.title) {\n err.title = schema.title;\n }\n if (schema.description) {\n err.description = schema.description;\n }\n }\n if (subReports != null) {\n if (!Array.isArray(subReports)) {\n subReports = [subReports];\n }\n err.inner = [];\n idx = subReports.length;\n while (idx--) {\n const subReport = subReports[idx];\n let idx2 = subReport.errors.length;\n while (idx2--) {\n err.inner.push(subReport.errors[idx2]);\n }\n }\n if (err.inner.length === 0) {\n err.inner = undefined;\n }\n }\n // Check if this error code should be excluded\n if (Array.isArray(this.validateOptions.excludeErrors) && this.validateOptions.excludeErrors.includes(errorCode)) {\n return;\n }\n this.errors.push(err);\n }\n}\n","// Safe own-property check utility\n// Returns true if the object has the property as its own (not inherited)\nexport function hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\nexport function copyProp(from, to, key, fn) {\n if (hasOwn(from, key)) {\n Object.defineProperty(to, key, {\n value: fn ? fn(from[key]) : from[key],\n enumerable: true,\n writable: true,\n configurable: true,\n });\n }\n}\n","import { copyProp } from './properties.js';\nexport const shallowClone = (src) => {\n if (src == null || typeof src !== 'object') {\n return src;\n }\n let res;\n let idx;\n if (Array.isArray(src)) {\n res = [];\n idx = src.length;\n while (idx--) {\n res[idx] = src[idx];\n }\n }\n else {\n res = {};\n const keys = Object.keys(src).sort();\n for (const key of keys) {\n copyProp(src, res, key);\n }\n }\n return res;\n};\nexport const deepClone = (src) => {\n let vidx = 0;\n const visited = new Map();\n const cloned = [];\n const cloneDeepInner = (src) => {\n if (typeof src !== 'object' || src === null) {\n return src;\n }\n let res;\n let idx;\n const cidx = visited.get(src);\n if (cidx !== undefined) {\n return cloned[cidx];\n }\n visited.set(src, vidx++);\n if (Array.isArray(src)) {\n res = [];\n cloned.push(res);\n idx = src.length;\n while (idx--) {\n res[idx] = cloneDeepInner(src[idx]);\n }\n }\n else {\n res = {};\n cloned.push(res);\n const keys = Object.keys(src).sort();\n for (const key of keys) {\n copyProp(src, res, key, cloneDeepInner);\n }\n }\n return res;\n };\n return cloneDeepInner(src);\n};\n","import { findId, getId } from './json-schema.js';\nimport { Report } from './report.js';\nimport { deepClone } from './utils/clone.js';\nimport { decodeJSONPointer } from './utils/json.js';\nimport { getQueryPath, getRemotePath, isAbsoluteUri } from './utils/uri.js';\nexport class SchemaCache {\n validator;\n static global_cache = {};\n cache = {};\n constructor(validator) {\n this.validator = validator;\n }\n static cacheSchemaByUri(uri, schema) {\n const remotePath = getRemotePath(uri);\n if (remotePath) {\n this.global_cache[remotePath] = schema;\n }\n }\n cacheSchemaByUri(uri, schema) {\n const remotePath = getRemotePath(uri);\n if (remotePath) {\n this.cache[remotePath] = schema;\n }\n }\n removeFromCacheByUri(uri) {\n const remotePath = getRemotePath(uri);\n if (remotePath) {\n delete this.cache[remotePath];\n }\n }\n checkCacheForUri(uri) {\n const remotePath = getRemotePath(uri);\n return remotePath ? this.cache[remotePath] != null : false;\n }\n getSchema(report, refOrSchema) {\n if (Array.isArray(refOrSchema)) {\n return refOrSchema.map((i) => this.getSchema(report, i));\n }\n if (typeof refOrSchema === 'string') {\n // ref input\n return this.getSchemaByUri(report, refOrSchema);\n }\n // no caching done on this, but we need to return a clone so we can mutate it\n return deepClone(refOrSchema);\n }\n fromCache(path) {\n let found = this.cache[path];\n if (found) {\n return this.cache[path];\n }\n const asClone = (s) => {\n if (!s.id || (!isAbsoluteUri(s.id) && isAbsoluteUri(path))) {\n s.id = path;\n }\n return deepClone(s);\n };\n found = SchemaCache.global_cache[path];\n if (found) {\n return asClone(found);\n }\n return undefined;\n }\n getSchemaByUri(report, uri, root) {\n if (root && !isAbsoluteUri(uri)) {\n let rootId = getId(root);\n if ((!rootId || !isAbsoluteUri(rootId)) && typeof root.id === 'string' && isAbsoluteUri(root.id)) {\n rootId = root.id;\n }\n if (rootId && isAbsoluteUri(rootId)) {\n const hashIndex = rootId.indexOf('#');\n const rootBase = hashIndex === -1 ? rootId : rootId.slice(0, hashIndex);\n try {\n uri = new URL(uri, rootBase).toString();\n }\n catch {\n // keep original uri when URL construction fails\n }\n }\n }\n const remotePath = getRemotePath(uri);\n const queryPath = getQueryPath(uri);\n let result = remotePath ? this.fromCache(remotePath) : root;\n if (result && remotePath && isAbsoluteUri(remotePath) && (!result.id || !isAbsoluteUri(result.id))) {\n result.id = remotePath;\n }\n if (result && remotePath) {\n // we need to avoid compiling schemas in a recursive loop\n const compileRemote = result !== root;\n // now we need to compile and validate resolved schema (in case it's not already)\n if (compileRemote) {\n report.path.push(remotePath);\n let remoteReport;\n const anscestorReport = result.id ? report.getAncestor(result.id) : undefined;\n if (anscestorReport) {\n remoteReport = anscestorReport;\n }\n else {\n remoteReport = new Report(report);\n const noCache = result.id && isAbsoluteUri(result.id) ? false : true;\n if (this.validator.sc.compileSchema(remoteReport, result, { noCache })) {\n const savedOptions = this.validator.options;\n try {\n // If custom validationOptions were provided to setRemoteReference(),\n // use them instead of the default options\n this.validator.options = result.__$validationOptions || this.validator.options;\n this.validator.sv.validateSchema(remoteReport, result);\n }\n finally {\n this.validator.options = savedOptions;\n }\n }\n }\n const remoteReportIsValid = remoteReport.isValid();\n if (!remoteReportIsValid) {\n report.addError('REMOTE_NOT_VALID', [uri], remoteReport);\n }\n report.path.pop();\n if (!remoteReportIsValid) {\n return undefined;\n }\n }\n }\n if (result && queryPath) {\n const parts = queryPath.split('/');\n for (let idx = 0, lim = parts.length; result && idx < lim; idx++) {\n const key = decodeJSONPointer(parts[idx]);\n if (idx === 0) {\n // it's an id\n result = findId(result, key);\n }\n else {\n // it's a path behind id\n result = result[key];\n }\n }\n }\n return result;\n }\n}\n","export const CURRENT_DEFAULT_SCHEMA_VERSION = 'draft-07';\nexport const VERSION_SCHEMA_URL_MAPPING = {\n 'draft-04': 'http://json-schema.org/draft-04/schema#',\n 'draft-06': 'http://json-schema.org/draft-06/schema#',\n 'draft-07': 'http://json-schema.org/draft-07/schema#',\n};\n","import { CURRENT_DEFAULT_SCHEMA_VERSION } from './json-schema-versions.js';\nimport { shallowClone } from './utils/clone.js';\nexport const defaultOptions = {\n // default version to validate against\n version: CURRENT_DEFAULT_SCHEMA_VERSION,\n // default timeout for all async tasks\n asyncTimeout: 2000,\n // force additionalProperties and additionalItems to be defined on \"object\" and \"array\" types\n forceAdditional: false,\n // assume additionalProperties and additionalItems are defined as \"false\" where appropriate\n assumeAdditional: false,\n // do case insensitive comparison for enums\n enumCaseInsensitiveComparison: false,\n // force items to be defined on \"array\" types\n forceItems: false,\n // force minItems to be defined on \"array\" types\n forceMinItems: false,\n // force maxItems to be defined on \"array\" types\n forceMaxItems: false,\n // force minLength to be defined on \"string\" types\n forceMinLength: false,\n // force maxLength to be defined on \"string\" types\n forceMaxLength: false,\n // force properties or patternProperties to be defined on \"object\" types\n forceProperties: false,\n // ignore references that cannot be resolved (remote schemas) // TODO: make sure this is only for remote schemas, not local ones\n ignoreUnresolvableReferences: false,\n // disallow usage of keywords that this validator can't handle\n noExtraKeywords: false,\n // disallow usage of schema's without \"type\" defined\n noTypeless: false,\n // disallow zero length strings in validated objects\n noEmptyStrings: false,\n // disallow zero length arrays in validated objects\n noEmptyArrays: false,\n // forces \"uri\" format to be in fully rfc3986 compliant\n strictUris: false,\n // turn on some of the above\n strictMode: false,\n // report error paths as an array of path segments to get to the offending node\n reportPathAsArray: false,\n // stop validation as soon as an error is found\n breakOnFirstError: false,\n // check if schema follows best practices and common sense\n pedanticCheck: false,\n // ignore unknown formats (do not report them as an error)\n ignoreUnknownFormats: false,\n // function to be called on every schema\n customValidator: null,\n};\nexport const normalizeOptions = (options) => {\n let normalized;\n // options\n if (typeof options === 'object') {\n let keys = Object.keys(options);\n let idx = keys.length;\n let key;\n // check that the options are correctly configured\n while (idx--) {\n key = keys[idx];\n if (defaultOptions[key] === undefined) {\n throw new Error('Unexpected option passed to constructor: ' + key);\n }\n }\n // copy the default options into passed options\n keys = Object.keys(defaultOptions);\n idx = keys.length;\n while (idx--) {\n key = keys[idx];\n if (options[key] === undefined) {\n options[key] = shallowClone(defaultOptions[key]);\n }\n }\n normalized = options;\n }\n else {\n normalized = shallowClone(defaultOptions);\n }\n if (normalized.strictMode === true) {\n normalized.forceAdditional = true;\n normalized.forceItems = true;\n normalized.forceMaxLength = true;\n normalized.forceProperties = true;\n normalized.noExtraKeywords = true;\n normalized.noTypeless = true;\n normalized.noEmptyStrings = true;\n normalized.noEmptyArrays = true;\n }\n return normalized;\n};\n","import { SchemaCache } from './schema-cache.js';\nimport { normalizeOptions } from './z-schema-options.js';\nimport _Draft4Schema from './schemas/draft-04-schema.json' with { type: 'json' };\nimport _Draft6Schema from './schemas/draft-06-schema.json' with { type: 'json' };\nimport _Draft7Schema from './schemas/draft-07-schema.json' with { type: 'json' };\nconst Draft4Schema = _Draft4Schema;\nconst Draft6Schema = _Draft6Schema;\nconst Draft7Schema = _Draft7Schema;\nconst registerRemoteReference = (uri, schema, validationOptions) => {\n const preparedSchema = schema;\n if (!preparedSchema.id) {\n preparedSchema.id = uri;\n }\n if (validationOptions) {\n preparedSchema.__$validationOptions = normalizeOptions(validationOptions);\n }\n SchemaCache.cacheSchemaByUri(uri, preparedSchema);\n};\nregisterRemoteReference('http://json-schema.org/draft-04/schema', Draft4Schema, { version: 'none' });\nregisterRemoteReference('http://json-schema.org/draft-06/schema', Draft6Schema, { version: 'none' });\nregisterRemoteReference('http://json-schema.org/draft-07/schema', Draft7Schema, { version: 'none' });\n","const isLeapYear = (year) => year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\nconst getDaysInMonth = (year, month) => {\n switch (month) {\n case 2:\n return isLeapYear(year) ? 29 : 28;\n case 4:\n case 6:\n case 9:\n case 11:\n return 30;\n default:\n return 31;\n }\n};\nexport const isValidRfc3339Date = (year, month, day) => {\n if (month < 1 || month > 12) {\n return false;\n }\n const maxDay = getDaysInMonth(year, month);\n return day >= 1 && day <= maxDay;\n};\n","import punycode from 'punycode/punycode.js';\nimport isIPModule from 'validator/lib/isIP.js';\nconst IDN_SEPARATOR_REGEX = /[\\u3002\\uff0e\\uff61]/g;\nconst IDN_SEPARATOR_TEST_REGEX = /[\\u3002\\uff0e\\uff61]/;\nconst splitHostnameLabels = (hostname) => {\n if (hostname.length === 0 || hostname.length > 255) {\n return null;\n }\n if (hostname.startsWith('.') || hostname.endsWith('.')) {\n return null;\n }\n const labels = hostname.split('.');\n if (labels.some((label) => label.length === 0 || label.length > 63)) {\n return null;\n }\n return labels;\n};\nconst isAsciiHostnameLabel = (label) => /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(label);\nconst isGreek = (char) => /\\p{Script=Greek}/u.test(char);\nconst isHebrew = (char) => /\\p{Script=Hebrew}/u.test(char);\nconst hasCjkKanaOrHan = (input) => /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u.test(input);\nconst toUnicodeLabel = (label) => {\n if (!/^xn--/i.test(label)) {\n return label;\n }\n try {\n return punycode.toUnicode(label.toLowerCase());\n }\n catch (_e) {\n return null;\n }\n};\nconst isValidIdnUnicodeLabel = (label) => {\n if (label.startsWith('-') || label.endsWith('-')) {\n return false;\n }\n if (label.length >= 4 && label[2] === '-' && label[3] === '-' && !/^xn--/i.test(label)) {\n return false;\n }\n if (/^\\p{M}/u.test(label)) {\n return false;\n }\n if (/[\\u302e\\u302f\\u0640\\u07fa]/u.test(label)) {\n return false;\n }\n for (let idx = 0; idx < label.length; idx++) {\n const char = label[idx];\n if (char === '\\u00b7') {\n if (idx === 0 || idx === label.length - 1 || label[idx - 1] !== 'l' || label[idx + 1] !== 'l') {\n return false;\n }\n }\n if (char === '\\u0375') {\n if (idx === label.length - 1 || !isGreek(label[idx + 1])) {\n return false;\n }\n }\n if (char === '\\u05f3' || char === '\\u05f4') {\n if (idx === 0 || !isHebrew(label[idx - 1])) {\n return false;\n }\n }\n if (char === '\\u200d') {\n if (idx === 0 || label[idx - 1] !== '\\u094d') {\n return false;\n }\n }\n }\n if (label.includes('\\u30fb') && !hasCjkKanaOrHan(label.replace(/\\u30fb/g, ''))) {\n return false;\n }\n const hasArabicIndic = /[\\u0660-\\u0669]/.test(label);\n const hasExtendedArabicIndic = /[\\u06f0-\\u06f9]/.test(label);\n if (hasArabicIndic && hasExtendedArabicIndic) {\n return false;\n }\n return true;\n};\n/*\n http://json-schema.org/latest/json-schema-validation.html#anchor114\n A string instance is valid against this attribute if it is a valid\n representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].\n\n http://tools.ietf.org/html/rfc1034#section-3.5\n\n ::= any one of the ten digits 0 through 9\n var digit = /[0-9]/;\n\n ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case\n var letter = /[a-zA-Z]/;\n\n ::= | \n var letDig = /[0-9a-zA-Z]/;\n\n ::= | \"-\"\n var letDigHyp = /[-0-9a-zA-Z]/;\n\n ::= | \n var ldhStr = /[-0-9a-zA-Z]+/;\n\n