/*! For license information please see 8099.4838cb5caf85574b5c9d.js.LICENSE.txt */ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8b038e20-3570-4c32-be7a-0a9eba7c1d35",e._sentryDebugIdIdentifier="sentry-dbid-8b038e20-3570-4c32-be7a-0a9eba7c1d35")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"8b7b01b6c705cf50f8050ce0fb8fc6b58fe68567"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[8099],{79752:function(e,t,n){"use strict";n.d(t,{LB:function(){return Ve},y9:function(){return pt},g4:function(){return ne},Lg:function(){return se},uN:function(){return we},MA:function(){return ge},LO:function(){return ye},pE:function(){return A},ey:function(){return k},Ai:function(){return ct},VK:function(){return N},_8:function(){return C},hI:function(){return I},Cj:function(){return Je},O1:function(){return Ke},Zj:function(){return nt},VT:function(){return v},Dy:function(){return y}});var r=n(67294),i=n(73935),a=n(24285);const o={display:"none"};function s(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:o},n)}const l={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function c(e){let{id:t,announcement:n}=e;return r.createElement("div",{id:t,style:l,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const u=(0,r.createContext)(null);const d={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},h={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function f(e){let{announcements:t=h,container:n,hiddenTextDescribedById:o,screenReaderInstructions:l=d}=e;const{announce:f,announcement:p}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=(0,a.Ld)("DndLiveRegion"),[v,y]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{y(!0)}),[]),function(e){const t=(0,r.useContext)(u);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;f(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&f(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;f(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;f(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;f(t.onDragCancel({active:n,over:r}))}})),[f,t])),!v)return null;const m=r.createElement(r.Fragment,null,r.createElement(s,{id:o,value:l.draggable}),r.createElement(c,{id:g,announcement:p}));return n?(0,i.createPortal)(m,n):m}var p;function g(){}function v(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function y(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(p||(p={}));const m=Object.freeze({x:0,y:0});function b(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function _(e,t){const n=(0,a.DC)(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function w(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function S(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function C(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function O(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const A=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=O(t,t.left,t.top),a=[];for(const o of r){const{id:e}=o,t=n.get(e);if(t){const n=b(O(t),i);a.push({id:e,data:{droppableContainer:o,value:n}})}}return a.sort(x)},k=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=S(t),a=[];for(const o of r){const{id:e}=o,t=n.get(e);if(t){const n=S(t),r=i.reduce(((e,t,r)=>e+b(n[r],t)),0),s=Number((r/4).toFixed(4));a.push({id:e,data:{droppableContainer:o,value:s}})}}return a.sort(x)};function T(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const a of r){const{id:e}=a,r=n.get(e);if(r){const n=T(r,t);n>0&&i.push({id:e,data:{droppableContainer:a,value:n}})}}return i.sort(w)};function E(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:m}function R(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const P=R(1);function M(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const L={ignoreTransform:!1};function N(e,t){void 0===t&&(t=L);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,a.Jj)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=M(t);if(!r)return e;const{scaleX:i,scaleY:a,x:o,y:s}=r,l=e.left-o-(1-i)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:i,width:o,height:s,bottom:l,right:c}=n;return{top:r,left:i,width:o,height:s,bottom:l,right:c}}function F(e){return N(e,{ignoreTransform:!0})}function I(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if((0,a.qk)(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!(0,a.Re)(i)||(0,a.vZ)(i))return n;if(n.includes(i))return n;const o=(0,a.Jj)(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=(0,a.Jj)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"===typeof r&&n.test(r)}))}(i,o)&&n.push(i),function(e,t){return void 0===t&&(t=(0,a.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(i,o)?n:r(i.parentNode)}(e):n}function j(e){const[t]=I(e,1);return null!=t?t:null}function H(e){return a.Nq&&e?(0,a.FJ)(e)?e:(0,a.UG)(e)?(0,a.qk)(e)||e===(0,a.r3)(e).scrollingElement?window:(0,a.Re)(e)?e:null:null:null}function U(e){return(0,a.FJ)(e)?e.scrollX:e.scrollLeft}function Y(e){return(0,a.FJ)(e)?e.scrollY:e.scrollTop}function z(e){return{x:U(e),y:Y(e)}}var W;function X(e){return!(!a.Nq||!e)&&e===document.scrollingElement}function Z(e){const t={x:0,y:0},n=X(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(W||(W={}));const B={x:.2,y:.2};function G(e,t,n,r,i){let{top:a,left:o,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=B);const{isTop:c,isBottom:u,isLeft:d,isRight:h}=Z(e),f={x:0,y:0},p={x:0,y:0},g=t.height*i.y,v=t.width*i.x;return!c&&a<=t.top+g?(f.y=W.Backward,p.y=r*Math.abs((t.top+g-a)/g)):!u&&l>=t.bottom-g&&(f.y=W.Forward,p.y=r*Math.abs((t.bottom-g-l)/g)),!h&&s>=t.right-v?(f.x=W.Forward,p.x=r*Math.abs((t.right-v-s)/v)):!d&&o<=t.left+v&&(f.x=W.Backward,p.x=r*Math.abs((t.left+v-o)/v)),{direction:f,speed:p}}function V(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function q(e){return e.reduce(((e,t)=>(0,a.IH)(e,z(t))),m)}function $(e,t){if(void 0===t&&(t=N),!e)return;const{top:n,left:r,bottom:i,right:a}=t(e);j(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Q=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+U(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Y(t)),0)}]];class K{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=I(t),r=q(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,a,o]of Q)for(const e of a)Object.defineProperty(this,e,{get:()=>{const t=o(n),a=r[i]-t;return this.rect[e]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class J{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ee(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"===typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var te,ne;function re(e){e.preventDefault()}function ie(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(te||(te={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ne||(ne={}));const ae={start:[ne.Space,ne.Enter],cancel:[ne.Esc],end:[ne.Space,ne.Enter]},oe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ne.Right:return{...n,x:n.x+25};case ne.Left:return{...n,x:n.x-25};case ne.Down:return{...n,y:n.y+25};case ne.Up:return{...n,y:n.y-25}}};class se{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new J((0,a.r3)(t)),this.windowListeners=new J((0,a.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(te.Resize,this.handleCancel),this.windowListeners.add(te.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(te.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&$(n),t(m)}handleKeyDown(e){if((0,a.vd)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=ae,coordinateGetter:o=oe,scrollBehavior:s="smooth"}=r,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:m;this.referenceCoordinates||(this.referenceCoordinates=u);const d=o(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,a.$X)(d,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:a,isRight:o,isLeft:l,isBottom:c,maxScroll:u,minScroll:h}=Z(n),f=V(n),p={x:Math.min(i===ne.Right?f.right-f.width/2:f.right,Math.max(i===ne.Right?f.left:f.left+f.width/2,d.x)),y:Math.min(i===ne.Down?f.bottom-f.height/2:f.bottom,Math.max(i===ne.Down?f.top:f.top+f.height/2,d.y))},g=i===ne.Right&&!o||i===ne.Left&&!l,v=i===ne.Down&&!c||i===ne.Up&&!a;if(g&&p.x!==d.x){const e=n.scrollLeft+t.x,a=i===ne.Right&&e<=u.x||i===ne.Left&&e>=h.x;if(a&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=a?n.scrollLeft-e:i===ne.Right?n.scrollLeft-u.x:n.scrollLeft-h.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(v&&p.y!==d.y){const e=n.scrollTop+t.y,a=i===ne.Down&&e<=u.y||i===ne.Up&&e>=h.y;if(a&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=a?n.scrollTop-e:i===ne.Down?n.scrollTop-u.y:n.scrollTop-h.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,(0,a.IH)((0,a.$X)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function le(e){return Boolean(e&&"distance"in e)}function ce(e){return Boolean(e&&"delay"in e)}se.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ae,onActivation:i}=t,{active:a}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const t=a.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class ue{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,a.Jj)(e);return e instanceof t?e:(0,a.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:o}=i;this.props=e,this.events=t,this.document=(0,a.r3)(o),this.documentListeners=new J(this.document),this.listeners=new J(n),this.windowListeners=new J((0,a.Jj)(o)),this.initialCoordinates=null!=(r=(0,a.DC)(i))?r:m,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(te.Resize,this.handleCancel),this.windowListeners.add(te.DragStart,re),this.windowListeners.add(te.VisibilityChange,this.handleCancel),this.windowListeners.add(te.ContextMenu,re),this.documentListeners.add(te.Keydown,this.handleKeydown),t){if(le(t))return;if(ce(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(te.Click,ie,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(te.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:s}}=i;if(!r)return;const l=null!=(t=(0,a.DC)(e))?t:m,c=(0,a.$X)(r,l);if(!n&&s){if(ce(s))return ee(c,s.tolerance)?this.handleCancel():void 0;if(le(s))return null!=s.tolerance&&ee(c,s.tolerance)?this.handleCancel():ee(c,s.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===ne.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const de={move:{name:"pointermove"},end:{name:"pointerup"}};class he extends ue{constructor(e){const{event:t}=e,n=(0,a.r3)(t.target);super(e,de,n)}}he.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const fe={move:{name:"mousemove"},end:{name:"mouseup"}};var pe;!function(e){e[e.RightClick=2]="RightClick"}(pe||(pe={}));class ge extends ue{constructor(e){super(e,fe,(0,a.r3)(e.event.target))}}ge.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==pe.RightClick&&(null==r||r({event:n}),!0)}}];const ve={move:{name:"touchmove"},end:{name:"touchend"}};class ye extends ue{constructor(e){super(e,ve)}static setup(){return window.addEventListener(ve.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ve.move.name,e)};function e(){}}}var me,be;function _e(e){let{acceleration:t,activator:n=me.Pointer,canScroll:i,draggingRect:o,enabled:s,interval:l=5,order:c=be.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:h,delta:f,threshold:p}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,a.D9)(t);return(0,a.Gj)((e=>{if(n||!r||!e)return xe;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[W.Backward]:e.x[W.Backward]||-1===i.x,[W.Forward]:e.x[W.Forward]||1===i.x},y:{[W.Backward]:e.y[W.Backward]||-1===i.y,[W.Forward]:e.y[W.Forward]||1===i.y}}}),[n,t,r])}({delta:f,disabled:!s}),[v,y]=(0,a.Yz)(),m=(0,r.useRef)({x:0,y:0}),b=(0,r.useRef)({x:0,y:0}),_=(0,r.useMemo)((()=>{switch(n){case me.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case me.DraggableRect:return o}}),[n,o,u]),x=(0,r.useRef)(null),w=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=m.current.x*b.current.x,n=m.current.y*b.current.y;e.scrollBy(t,n)}),[]),S=(0,r.useMemo)((()=>c===be.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(s&&d.length&&_){for(const e of S){if(!1===(null==i?void 0:i(e)))continue;const n=d.indexOf(e),r=h[n];if(!r)continue;const{direction:a,speed:o}=G(e,r,_,t,p);for(const e of["x","y"])g[e][a[e]]||(o[e]=0,a[e]=0);if(o.x>0||o.y>0)return y(),x.current=e,v(w,l),m.current=o,void(b.current=a)}m.current={x:0,y:0},b.current={x:0,y:0},y()}else y()}),[t,w,i,y,s,l,JSON.stringify(_),JSON.stringify(g),v,d,S,h,JSON.stringify(p)])}ye.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(me||(me={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(be||(be={}));const xe={x:{[W.Backward]:!1,[W.Forward]:!1},y:{[W.Backward]:!1,[W.Forward]:!1}};var we,Se;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(we||(we={})),function(e){e.Optimized="optimized"}(Se||(Se={}));const Ce=new Map;function Oe(e,t){return(0,a.Gj)((n=>e?n||("function"===typeof t?t(e):e):null),[t,e])}function Ae(e){let{callback:t,disabled:n}=e;const i=(0,a.zX)(t),o=(0,r.useMemo)((()=>{if(n||"undefined"===typeof window||"undefined"===typeof window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)}),[n]);return(0,r.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}function ke(e){return new K(N(e),e)}function Te(e,t,n){void 0===t&&(t=ke);const[i,o]=(0,r.useReducer)((function(r){if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const a=t(e);if(JSON.stringify(r)===JSON.stringify(a))return r;return a}),null),s=function(e){let{callback:t,disabled:n}=e;const i=(0,a.zX)(t),o=(0,r.useMemo)((()=>{if(n||"undefined"===typeof window||"undefined"===typeof window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)}),[i,n]);return(0,r.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),l=Ae({callback:o});return(0,a.LI)((()=>{o(),e?(null==l||l.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==s||s.disconnect())}),[e]),i}const De=[];function Ee(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==m;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,a.$X)(e,n.current):m}function Re(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Pe=[];function Me(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,a.Re)(t)?t:e}const Le=[{sensor:he,options:{}},{sensor:se,options:{}}],Ne={current:{}},Fe={draggable:{measure:F},droppable:{measure:F,strategy:we.WhileDragging,frequency:Se.Optimized},dragOverlay:{measure:N}};class Ie extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const je={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ie,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Fe,measureDroppableContainers:g,windowRect:null,measuringScheduled:!1},He={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:g,draggableNodes:new Map,over:null,measureDroppableContainers:g},Ue=(0,r.createContext)(He),Ye=(0,r.createContext)(je);function ze(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ie}}}function We(e,t){switch(t.type){case p.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case p.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case p.DragEnd:case p.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case p.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ie(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case p.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const o=new Ie(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case p.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ie(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Xe(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:o}=(0,r.useContext)(Ue),s=(0,a.D9)(i),l=(0,a.D9)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!i&&s&&null!=l){if(!(0,a.vd)(s))return;if(document.activeElement===s.target)return;const e=o.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,a.so)(e);if(t){t.focus();break}}}))}}),[i,t,o,l,s]),null}function Ze(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Be=(0,r.createContext)({...m,scaleX:1,scaleY:1});var Ge;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ge||(Ge={}));const Ve=(0,r.memo)((function(e){var t,n,o,s;let{id:l,accessibility:c,autoScroll:d=!0,children:h,sensors:g=Le,collisionDetection:v=D,measuring:y,modifiers:b,..._}=e;const x=(0,r.useReducer)(We,void 0,ze),[w,S]=x,[O,A]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[k,T]=(0,r.useState)(Ge.Uninitialized),R=k===Ge.Initialized,{draggable:{active:M,nodes:L,translate:F},droppable:{containers:U}}=w,Y=M?L.get(M):null,W=(0,r.useRef)({initial:null,translated:null}),Z=(0,r.useMemo)((()=>{var e;return null!=M?{id:M,data:null!=(e=null==Y?void 0:Y.data)?e:Ne,rect:W}:null}),[M,Y]),B=(0,r.useRef)(null),[G,V]=(0,r.useState)(null),[$,Q]=(0,r.useState)(null),J=(0,a.Ey)(_,Object.values(_)),ee=(0,a.Ld)("DndDescribedBy",l),te=(0,r.useMemo)((()=>U.getEnabled()),[U]),ne=(re=y,(0,r.useMemo)((()=>({draggable:{...Fe.draggable,...null==re?void 0:re.draggable},droppable:{...Fe.droppable,...null==re?void 0:re.droppable},dragOverlay:{...Fe.dragOverlay,...null==re?void 0:re.dragOverlay}})),[null==re?void 0:re.draggable,null==re?void 0:re.droppable,null==re?void 0:re.dragOverlay]));var re;const{droppableRects:ie,measureDroppableContainers:ae,measuringScheduled:oe}=function(e,t){let{dragging:n,dependencies:i,config:o}=t;const[s,l]=(0,r.useState)(null),{frequency:c,measure:u,strategy:d}=o,h=(0,r.useRef)(e),f=function(){switch(d){case we.Always:return!1;case we.BeforeDragging:return n;default:return!n}}(),p=(0,a.Ey)(f),g=(0,r.useCallback)((function(e){void 0===e&&(e=[]),p.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),v=(0,r.useRef)(null),y=(0,a.Gj)((t=>{if(f&&!n)return Ce;if(!t||t===Ce||h.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new K(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,s,n,f,u]);return(0,r.useEffect)((()=>{h.current=e}),[e]),(0,r.useEffect)((()=>{f||g()}),[n,f]),(0,r.useEffect)((()=>{s&&s.length>0&&l(null)}),[JSON.stringify(s)]),(0,r.useEffect)((()=>{f||"number"!==typeof c||null!==v.current||(v.current=setTimeout((()=>{g(),v.current=null}),c))}),[c,f,g,...i]),{droppableRects:y,measureDroppableContainers:g,measuringScheduled:null!=s}}(te,{dragging:R,dependencies:[F.x,F.y],config:ne.droppable}),se=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,a.Gj)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(L,M),le=(0,r.useMemo)((()=>$?(0,a.DC)($):null),[$]),ce=function(){const e=!1===(null==G?void 0:G.autoScrollEnabled),t="object"===typeof d?!1===d.enabled:!1===d,n=R&&!e&&!t;if("object"===typeof d)return{...d,enabled:n};return{enabled:n}}(),ue=function(e,t){return Oe(e,t)}(se,ne.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:o=!0}=e;const s=(0,r.useRef)(!1),{x:l,y:c}="boolean"===typeof o?{x:o,y:o}:o;(0,a.LI)((()=>{if(!l&&!c||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=E(n(e),i);if(l||(r.x=0),c||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=j(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,l,c,i,n])}({activeNode:M?L.get(M):null,config:ce.layoutShiftCompensation,initialRect:ue,measure:ne.draggable.measure});const de=Te(se,ne.draggable.measure,ue),he=Te(se?se.parentElement:null),fe=(0,r.useRef)({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:ie,draggableNodes:L,draggingNode:null,draggingNodeRect:null,droppableContainers:U,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),pe=U.getNodeFor(null==(t=fe.current.over)?void 0:t.id),ge=function(e){let{measure:t}=e;const[n,i]=(0,r.useState)(null),o=Ae({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,a.Re)(n)){i((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),s=(0,r.useCallback)((e=>{const n=Me(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),i(n?t(n):null)}),[t,o]),[l,c]=(0,a.wm)(s);return(0,r.useMemo)((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}({measure:ne.dragOverlay.measure}),ve=null!=(n=ge.nodeRef.current)?n:se,ye=R?null!=(o=ge.rect)?o:de:null,me=Boolean(ge.nodeRef.current&&ge.rect),be=E(xe=me?null:de,Oe(xe));var xe;const Se=Re(ve?(0,a.Jj)(ve):null),ke=function(e){const t=(0,r.useRef)(e),n=(0,a.Gj)((n=>e?n&&n!==De&&e&&t.current&&e.parentNode===t.current.parentNode?n:I(e):De),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(R?null!=pe?pe:se:null),Ie=function(e,t){void 0===t&&(t=N);const[n]=e,i=Re(n?(0,a.Jj)(n):null),[o,s]=(0,r.useReducer)((function(){return e.length?e.map((e=>X(e)?i:new K(t(e),e))):Pe}),Pe),l=Ae({callback:s});return e.length>0&&o===Pe&&s(),(0,a.LI)((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),s())}),[e]),o}(ke),je=Ze(b,{transform:{x:F.x-be.x,y:F.y-be.y,scaleX:1,scaleY:1},activatorEvent:$,active:Z,activeNodeRect:de,containerNodeRect:he,draggingNodeRect:ye,over:fe.current.over,overlayNodeRect:ge.rect,scrollableAncestors:ke,scrollableAncestorRects:Ie,windowRect:Se}),He=le?(0,a.IH)(le,F):null,Ve=function(e){const[t,n]=(0,r.useState)(null),i=(0,r.useRef)(e),o=(0,r.useCallback)((e=>{const t=H(e.target);t&&n((e=>e?(e.set(t,z(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=i.current;if(e!==t){r(t);const a=e.map((e=>{const t=H(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,z(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),i.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=H(e);null==t||t.removeEventListener("scroll",o)}))}}),[o,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,a.IH)(e,t)),m):q(e):m),[e,t])}(ke),qe=Ee(Ve),$e=Ee(Ve,[de]),Qe=(0,a.IH)(je,qe),Ke=ye?P(ye,je):null,Je=Z&&Ke?v({active:Z,collisionRect:Ke,droppableRects:ie,droppableContainers:te,pointerCoordinates:He}):null,et=C(Je,"id"),[tt,nt]=(0,r.useState)(null),rt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(me?je:(0,a.IH)(je,$e),null!=(s=null==tt?void 0:tt.rect)?s:null,de),it=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==B.current)return;const a=L.get(B.current);if(!a)return;const o=e.nativeEvent,s=new n({active:B.current,activeNode:a,event:o,options:r,context:fe,onStart(e){const t=B.current;if(null==t)return;const n=L.get(t);if(!n)return;const{onDragStart:r}=J.current,a={active:{id:t,data:n.data,rect:W}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(a),T(Ge.Initializing),S({type:p.DragStart,initialCoordinates:e,active:t}),O({type:"onDragStart",event:a})}))},onMove(e){S({type:p.DragMove,coordinates:e})},onEnd:l(p.DragEnd),onCancel:l(p.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:a}=fe.current;let s=null;if(t&&a){const{cancelDrop:i}=J.current;if(s={activatorEvent:o,active:t,collisions:n,delta:a,over:r},e===p.DragEnd&&"function"===typeof i){await Promise.resolve(i(s))&&(e=p.DragCancel)}}B.current=null,(0,i.unstable_batchedUpdates)((()=>{S({type:e}),T(Ge.Uninitialized),nt(null),V(null),Q(null);const t=e===p.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=J.current[t];null==e||e(s),O({type:t,event:s})}}))}}(0,i.unstable_batchedUpdates)((()=>{V(s),Q(e.nativeEvent)}))}),[L]),at=(0,r.useCallback)(((e,t)=>(n,r)=>{const i=n.nativeEvent,a=L.get(r);if(null!==B.current||!a||i.dndKit||i.defaultPrevented)return;const o={active:a};!0===e(n,t.options,o)&&(i.dndKit={capturedBy:t.sensor},B.current=r,it(n,t))}),[L,it]),ot=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(g,at);!function(e){(0,r.useEffect)((()=>{if(!a.Nq)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),(0,a.LI)((()=>{de&&k===Ge.Initializing&&T(Ge.Initialized)}),[de,k]),(0,r.useEffect)((()=>{const{onDragMove:e}=J.current,{active:t,activatorEvent:n,collisions:r,over:a}=fe.current;if(!t||!n)return;const o={active:t,activatorEvent:n,collisions:r,delta:{x:Qe.x,y:Qe.y},over:a};(0,i.unstable_batchedUpdates)((()=>{null==e||e(o),O({type:"onDragMove",event:o})}))}),[Qe.x,Qe.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:a}=fe.current;if(!e||null==B.current||!t||!a)return;const{onDragOver:o}=J.current,s=r.get(et),l=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:a.x,y:a.y},over:l};(0,i.unstable_batchedUpdates)((()=>{nt(l),null==o||o(c),O({type:"onDragOver",event:c})}))}),[et]),(0,a.LI)((()=>{fe.current={activatorEvent:$,active:Z,activeNode:se,collisionRect:Ke,collisions:Je,droppableRects:ie,draggableNodes:L,draggingNode:ve,draggingNodeRect:ye,droppableContainers:U,over:tt,scrollableAncestors:ke,scrollAdjustedTranslate:Qe},W.current={initial:ye,translated:Ke}}),[Z,se,Je,Ke,L,ve,ye,ie,U,tt,ke,Qe]),_e({...ce,delta:F,draggingRect:Ke,pointerCoordinates:He,scrollableAncestors:ke,scrollableAncestorRects:Ie});const st=(0,r.useMemo)((()=>({active:Z,activeNode:se,activeNodeRect:de,activatorEvent:$,collisions:Je,containerNodeRect:he,dragOverlay:ge,draggableNodes:L,droppableContainers:U,droppableRects:ie,over:tt,measureDroppableContainers:ae,scrollableAncestors:ke,scrollableAncestorRects:Ie,measuringConfiguration:ne,measuringScheduled:oe,windowRect:Se})),[Z,se,de,$,Je,he,ge,L,U,ie,tt,ae,ke,Ie,ne,oe,Se]),lt=(0,r.useMemo)((()=>({activatorEvent:$,activators:ot,active:Z,activeNodeRect:de,ariaDescribedById:{draggable:ee},dispatch:S,draggableNodes:L,over:tt,measureDroppableContainers:ae})),[$,ot,Z,de,S,ee,L,tt,ae]);return r.createElement(u.Provider,{value:A},r.createElement(Ue.Provider,{value:lt},r.createElement(Ye.Provider,{value:st},r.createElement(Be.Provider,{value:rt},h)),r.createElement(Xe,{disabled:!1===(null==c?void 0:c.restoreFocus)})),r.createElement(f,{...c,hiddenTextDescribedById:ee}))})),qe=(0,r.createContext)(null),$e="button",Qe="Droppable";function Ke(e){let{id:t,data:n,disabled:i=!1,attributes:o}=e;const s=(0,a.Ld)(Qe),{activators:l,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:h,draggableNodes:f,over:p}=(0,r.useContext)(Ue),{role:g=$e,roleDescription:v="draggable",tabIndex:y=0}=null!=o?o:{},m=(null==u?void 0:u.id)===t,b=(0,r.useContext)(m?Be:qe),[_,x]=(0,a.wm)(),[w,S]=(0,a.wm)(),C=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e}),{})),[e,t])}(l,t),O=(0,a.Ey)(n);(0,a.LI)((()=>(f.set(t,{id:t,key:s,node:_,activatorNode:w,data:O}),()=>{const e=f.get(t);e&&e.key===s&&f.delete(t)})),[f,t]);return{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:y,"aria-disabled":i,"aria-pressed":!(!m||g!==$e)||void 0,"aria-roledescription":v,"aria-describedby":h.draggable})),[i,g,y,m,v,h.draggable]),isDragging:m,listeners:i?void 0:C,node:_,over:p,setNodeRef:x,setActivatorNodeRef:S,transform:b}}function Je(){return(0,r.useContext)(Ye)}const et="Droppable",tt={timeout:25};function nt(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:o}=e;const s=(0,a.Ld)(et),{active:l,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(Ue),h=(0,r.useRef)({disabled:n}),f=(0,r.useRef)(!1),g=(0,r.useRef)(null),v=(0,r.useRef)(null),{disabled:y,updateMeasurementsFor:m,timeout:b}={...tt,...o},_=(0,a.Ey)(null!=m?m:i),x=Ae({callback:(0,r.useCallback)((()=>{f.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{d(Array.isArray(_.current)?_.current:[_.current]),v.current=null}),b)):f.current=!0}),[b]),disabled:y||!l}),w=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),f.current=!1),e&&x.observe(e))}),[x]),[S,C]=(0,a.wm)(w),O=(0,a.Ey)(t);return(0,r.useEffect)((()=>{x&&S.current&&(x.disconnect(),f.current=!1,x.observe(S.current))}),[S,x]),(0,a.LI)((()=>(c({type:p.RegisterDroppable,element:{id:i,key:s,disabled:n,node:S,rect:g,data:O}}),()=>c({type:p.UnregisterDroppable,key:s,id:i}))),[i]),(0,r.useEffect)((()=>{n!==h.current.disabled&&(c({type:p.SetDroppableDisabled,id:i,key:s,disabled:n}),h.current.disabled=n)}),[i,s,n,c]),{active:l,rect:g,isOver:(null==u?void 0:u.id)===i,node:S,over:u,setNodeRef:C}}function rt(e){let{animation:t,children:n}=e;const[i,o]=(0,r.useState)(null),[s,l]=(0,r.useState)(null),c=(0,a.D9)(n);return n||i||!c||o(c),(0,a.LI)((()=>{if(!s)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then((()=>{o(null)})):o(null)}),[t,i,s]),r.createElement(r.Fragment,null,n,i?(0,r.cloneElement)(i,{ref:l}):null)}const it={x:0,y:0,scaleX:1,scaleY:1};function at(e){let{children:t}=e;return r.createElement(Ue.Provider,{value:He},r.createElement(Be.Provider,{value:it},t))}const ot={position:"fixed",touchAction:"none"},st=e=>(0,a.vd)(e)?"transform 250ms ease":void 0,lt=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:i,adjustScale:o,children:s,className:l,rect:c,style:u,transform:d,transition:h=st}=e;if(!c)return null;const f=o?d:{...d,scaleX:1,scaleY:1},p={...ot,width:c.width,height:c.height,top:c.top,left:c.left,transform:a.ux.Transform.toString(f),transformOrigin:o&&i?_(i,c):void 0,transition:"function"===typeof h?h(i):h,...u};return r.createElement(n,{className:l,style:p,ref:t},s)})),ct=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:a,className:o}=e;if(null!=a&&a.active)for(const[e,s]of Object.entries(a.active))void 0!==s&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,s));if(null!=a&&a.dragOverlay)for(const[e,s]of Object.entries(a.dragOverlay))void 0!==s&&r.node.style.setProperty(e,s);return null!=o&&o.active&&n.node.classList.add(o.active),null!=o&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(const[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=o&&o.active&&n.node.classList.remove(o.active)}},ut={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:a.ux.Transform.toString(t)},{transform:a.ux.Transform.toString(n)}]},sideEffects:ct({styles:{active:{opacity:"0"}}})};function dt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return(0,a.zX)(((e,o)=>{if(null===t)return;const s=n.get(e);if(!s)return;const l=s.node.current;if(!l)return;const c=Me(o);if(!c)return;const{transform:u}=(0,a.Jj)(o).getComputedStyle(o),d=M(u);if(!d)return;const h="function"===typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...ut,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...l}=e;if(!t)return;const c={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:1!==s.scaleX?a.rect.width*s.scaleX/o.rect.width:1,scaleY:1!==s.scaleY?a.rect.height*s.scaleY/o.rect.height:1},d={x:s.x-c.x,y:s.y-c.y,...u},h=i({...l,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[f]=h,p=h[h.length-1];if(JSON.stringify(f)===JSON.stringify(p))return;const g=null==r?void 0:r({active:a,dragOverlay:o,...l}),v=o.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{v.onfinish=()=>{null==g||g(),e()}}))}}(t);return $(l,i.draggable.measure),h({active:{id:e,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:o,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:d})}))}let ht=0;function ft(e){return(0,r.useMemo)((()=>{if(null!=e)return ht++,ht}),[e])}const pt=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:o,modifiers:s,wrapperElement:l="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:h,activeNodeRect:f,containerNodeRect:p,draggableNodes:g,droppableContainers:v,dragOverlay:y,over:m,measuringConfiguration:b,scrollableAncestors:_,scrollableAncestorRects:x,windowRect:w}=Je(),S=(0,r.useContext)(Be),C=ft(null==h?void 0:h.id),O=Ze(s,{activatorEvent:d,active:h,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:y.rect,over:m,overlayNodeRect:y.rect,scrollableAncestors:_,scrollableAncestorRects:x,transform:S,windowRect:w}),A=Oe(f),k=dt({config:i,draggableNodes:g,droppableContainers:v,measuringConfiguration:b}),T=A?y.setRef:void 0;return r.createElement(at,null,r.createElement(rt,{animation:k},h&&C?r.createElement(lt,{key:C,id:h.id,ref:T,as:l,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:A,style:{zIndex:u,...a},transform:O},n):null))}))},45587:function(e,t,n){"use strict";n.d(t,{Fo:function(){return p},PG:function(){return u},cP:function(){return v},is:function(){return C},nB:function(){return x}});var r=n(67294),i=n(79752),a=n(24285);function o(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t){return e.reduce(((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e}),Array(e.length))}function l(e){return null!==e&&e>=0}const c={scaleX:1,scaleY:1},u=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:i,overIndex:a,index:o}=e;const s=null!=(t=n[i])?t:r;if(!s)return null;const l=function(e,t,n){const r=e[t],i=e[t-1],a=e[t+1];if(!r||!i&&!a)return 0;if(ni&&o<=a?{x:-s.width-l,y:0,...c}:o=a?{x:s.width+l,y:0,...c}:{x:0,y:0,...c}};const d=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const a=o(t,r,n),s=t[i],l=a[i];return l&&s?{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}:null};const h="Sortable",f=r.createContext({activeIndex:-1,containerId:h,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:d,disabled:{draggable:!1,droppable:!1}});function p(e){let{children:t,id:n,items:o,strategy:l=d,disabled:c=!1}=e;const{active:u,dragOverlay:p,droppableRects:g,over:v,measureDroppableContainers:y}=(0,i.Cj)(),m=(0,a.Ld)(h,n),b=Boolean(null!==p.rect),_=(0,r.useMemo)((()=>o.map((e=>"object"===typeof e&&"id"in e?e.id:e))),[o]),x=null!=u,w=u?_.indexOf(u.id):-1,S=v?_.indexOf(v.id):-1,C=(0,r.useRef)(_),O=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{O&&x&&y(_)}),[O,_,x,y]),(0,r.useEffect)((()=>{C.current=_}),[_]);const T=(0,r.useMemo)((()=>({activeIndex:w,containerId:m,disabled:k,disableTransforms:A,items:_,overIndex:S,useDragOverlay:b,sortedRects:s(_,g),strategy:l})),[w,m,k.draggable,k.droppable,A,_,S,g,b,l]);return r.createElement(f.Provider,{value:T},t)}const g=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return o(n,r,i).indexOf(t)},v=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r)&&((s===a||i!==o)&&(!!n||o!==i&&t===l))},y={duration:200,easing:"ease"},m="transform",b=a.ux.Transition.toString({property:m,duration:0,easing:"linear"}),_={roleDescription:"sortable"};function x(e){let{animateLayoutChanges:t=v,attributes:n,disabled:o,data:s,getNewIndex:c=g,id:u,strategy:d,resizeObserverConfig:h,transition:p=y}=e;const{items:x,containerId:w,activeIndex:S,disabled:C,disableTransforms:O,sortedRects:A,overIndex:k,useDragOverlay:T,strategy:D}=(0,r.useContext)(f),E=function(e,t){var n,r;if("boolean"===typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(o,C),R=x.indexOf(u),P=(0,r.useMemo)((()=>({sortable:{containerId:w,index:R,items:x},...s})),[w,s,R,x]),M=(0,r.useMemo)((()=>x.slice(x.indexOf(u))),[x,u]),{rect:L,node:N,isOver:F,setNodeRef:I}=(0,i.Zj)({id:u,data:P,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:M,...h}}),{active:j,activatorEvent:H,activeNodeRect:U,attributes:Y,setNodeRef:z,listeners:W,isDragging:X,over:Z,setActivatorNodeRef:B,transform:G}=(0,i.O1)({id:u,data:P,attributes:{..._,...n},disabled:E.draggable}),V=(0,a.HB)(I,z),q=Boolean(j),$=q&&!O&&l(S)&&l(k),Q=!T&&X,K=Q&&$?G:null,J=$?null!=K?K:(null!=d?d:D)({rects:A,activeNodeRect:U,activeIndex:S,overIndex:k,index:R}):null,ee=l(S)&&l(k)?c({id:u,items:x,activeIndex:S,overIndex:k}):R,te=null==j?void 0:j.id,ne=(0,r.useRef)({activeId:te,items:x,newIndex:ee,containerId:w}),re=x!==ne.current.items,ie=t({active:j,containerId:w,isDragging:X,isSorting:q,id:u,index:R,items:x,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:p,wasDragging:null!=ne.current.activeId}),ae=function(e){let{disabled:t,index:n,node:o,rect:s}=e;const[l,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,a.LI)((()=>{if(!t&&n!==u.current&&o.current){const e=s.current;if(e){const t=(0,i.VK)(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)}),[t,n,o,s]),(0,r.useEffect)((()=>{l&&c(null)}),[l]),l}({disabled:!ie,index:R,node:N,rect:L});return(0,r.useEffect)((()=>{q&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),w!==ne.current.containerId&&(ne.current.containerId=w),x!==ne.current.items&&(ne.current.items=x)}),[q,ee,w,x]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:j,activeIndex:S,attributes:Y,data:P,rect:L,index:R,newIndex:ee,items:x,isOver:F,isSorting:q,isDragging:X,listeners:W,node:N,overIndex:k,over:Z,setNodeRef:V,setActivatorNodeRef:B,setDroppableNodeRef:I,setDraggableNodeRef:z,transform:null!=ae?ae:J,transition:function(){if(ae||re&&ne.current.newIndex===R)return b;if(Q&&!(0,a.vd)(H)||!p)return;if(q||ie)return a.ux.Transition.toString({...p,property:m});return}()}}function w(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"===typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const S=[i.g4.Down,i.g4.Right,i.g4.Up,i.g4.Left],C=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:l,scrollableAncestors:c}}=t;if(S.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];s.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case i.g4.Down:r.topa.top&&t.push(n);break;case i.g4.Left:r.left>a.left&&t.push(n);break;case i.g4.Right:r.left1&&(d=u[1].id),null!=d){const e=s.get(n.id),t=s.get(d),l=t?o.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&l&&e&&t){const n=(0,i.hI)(u).some(((e,t)=>c[t]!==e)),o=O(e,t),s=function(e,t){if(!w(e)||!w(t))return!1;if(!O(e,t))return!1;return e.data.current.sortable.indexe=>{t.forEach((t=>t(e)))}),t)}const a="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function o(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function l(e){var t,n;return e?o(e)?e:s(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=l(e);return e instanceof t}function u(e){return!o(e)&&e instanceof l(e).HTMLElement}function d(e){return e instanceof l(e).SVGElement}function h(e){return e?o(e)?e.document:s(e)?c(e)?e:u(e)?e.ownerDocument:document:document:document}const f=a?r.useLayoutEffect:r.useEffect;function p(e){const t=(0,r.useRef)(e);return f((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function v(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return f((()=>{n.current!==e&&(n.current=e)}),t),n}function y(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function m(e){const t=p(e),n=(0,r.useRef)(null),i=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,i]}function b(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let _={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==_[e]?0:_[e]+1;return _[e]=n,e+"-"+n}),[e,t])}function w(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{const r=Object.entries(n);for(const[i,a]of r){const n=t[i];null!=n&&(t[i]=n+e*a)}return t}),{...t})}}const S=w(1),C=w(-1);function O(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function A(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=l(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const k=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[k.Translate.toString(e),k.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),T="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function D(e){return e.matches(T)?e:e.querySelector(T)}},33877:function(e,t,n){"use strict";const r=n(67294).createContext(null);t.Z=r},6890:function(e,t,n){"use strict";n.d(t,{Z:function(){return he}});var r={};n.r(r),n.d(r,{a11yNotify:function(){return te},addFilter:function(){return H},clearFilters:function(){return Y},removeFilter:function(){return z},reset:function(){return W},setCurrent:function(){return X},setFilter:function(){return Z},setResultsPerPage:function(){return B},setSearchTerm:function(){return G},setSort:function(){return V},trackAutocompleteClickThrough:function(){return U},trackAutocompleteSuggestionClickThrough:function(){return ne},trackClickThrough:function(){return q}});var i=n(67294),a=n(87462),o=n(78273),s=n(38776);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function u(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function d(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function h(e,t,n,r){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),i.state=t):(void 0===(i=(0,a.Z)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,o.Z)(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function f(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,i):n.push(i),p({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=h(e,t,g(),x.location);u.confirmTransitionTo(i,r,n,(function(e){e&&(x.entries[x.index]=i,p({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=x.index+e;return t>=0&&t{const r=t[n];return r&&(e[n]=r),e}),{})}(C.parse(e))}stateToUrl(e){return`${function(e){return C.stringify(function({searchTerm:e,current:t,filters:n,resultsPerPage:r,sortDirection:i,sortField:a,sortList:o}){const s={};return t>1&&(s.current=t),e&&(s.q=e),r&&(s.size=r),n&&n.length>0&&(s.filters=n),o&&o.length>0?s.sort=o:a&&(s["sort-field"]=a,s["sort-direction"]=i),s}(e))}(e)}`}getStateFromURL(){return this.routingOptions.urlToState(this.routingOptions.readUrl())}pushStateToURL(e,{replaceUrl:t=!1}={}){const n=this.routingOptions.stateToUrl(e);this.lastPushSearchString=n,this.routingOptions.writeUrl(n,{replaceUrl:t})}onURLStateChange(e){this.unlisten=this.routingOptions.routeChangeHandler((t=>{`?${this.lastPushSearchString}`!==t&&(this.lastPushSearchString="",e(this.routingOptions.urlToState(t)))}).bind(this))}routeChangeHandler(e){return this.history.listen((t=>{e(t.search)}))}tearDown(){this.unlisten()}}class L{constructor(){this.requestSequence=0,this.lastCompleted=0}next(){return++this.requestSequence}isOldRequest(e){return e{e.apply(null,r)}),t)};return r.cancel=()=>{n&&(clearTimeout(n),n=null)},r}class F{constructor(){this.debounceCache={}}runWithDebounce(e,t,n,...r){if(!e)return n(...r);const i=`${t}|${e.toString()}`;let a=this.debounceCache[i];a||(this.debounceCache[i]=N(n,e),a=this.debounceCache[i]),a(...r)}cancelByName(e){Object.entries(this.debounceCache).filter((([t])=>t.startsWith(`${e}|`))).forEach((([e,t])=>t.cancel()))}}F.debounce=(e,t)=>N(t,e);var I=F,j=n(70008);function H(e,t,n="all"){this.debug&&console.log("Search UI: Action","addFilter",...arguments);const{filters:r}=this.state,i=r.find((t=>t.field===e&&t.type===n))||null,a=r.filter((t=>t.field!==e||t.type!==n))||[],o=(null===i||void 0===i?void 0:i.values)||[],s=o.find((e=>(0,j.doFilterValuesMatch)(e,t)))?o:o.concat(t);this._updateSearchResults({current:1,filters:[...a,{field:e,values:s,type:n}]});this.events.emit({type:"FacetFilterSelected",field:e,value:(0,j.serialiseFilter)(s),query:this.state.searchTerm})}function U(e,t=[]){this.debug&&console.log("Search UI: Action","trackAutocompleteClickThrough",...arguments);const{autocompletedResultsRequestId:n,searchTerm:r,autocompletedResults:i,current:a,resultsPerPage:o,totalResults:s,filters:l}=this.state,c=i.findIndex((t=>t._meta.id===e)),u=i[c],d=this.events;d.autocompleteResultClick({query:r,documentId:e,requestId:n,tags:t,result:u,resultIndex:c}),d.emit({type:"ResultSelected",documentId:e,query:r,position:c,origin:"autocomplete",tags:t,totalResults:s,filters:l,currentPage:a,resultsPerPage:o})}function Y(e=[]){this.debug&&console.log("Search UI: Action","clearFilters",...arguments);const{filters:t}=this.state,n=t.filter((t=>{const n=t.field;return e.includes(n)}));this._updateSearchResults({current:1,filters:n})}function z(e,t,n){this.debug&&console.log("Search UI: Action","removeFilter",...arguments);const{filters:r}=this.state;let i=r;i=!t&&n?r.filter((t=>!(t.field===e&&t.type===n))):t?(0,j.removeSingleFilterValue)(r,e,t,n):r.filter((t=>t.field!==e)),this._updateSearchResults({current:1,filters:i});this.events.emit({type:"FacetFilterRemoved",field:e,value:t&&(0,j.serialiseFilter)([t]),query:this.state.searchTerm})}function W(){this.debug&&console.log("Search UI: Action","reset",...arguments),this._setState(this.startingState),this.trackUrlState&&this.URLManager.pushStateToURL(this.state)}function X(e){this.debug&&console.log("Search UI: Action","setCurrent",...arguments),this._updateSearchResults({current:e})}function Z(e,t,n="all"){this.debug&&console.log("Search UI: Action","setFilter",...arguments);let{filters:r}=this.state;r=r.filter((t=>t.field!==e||t.type!==n)),this._updateSearchResults({current:1,filters:[...r,{field:e,values:[t],type:n}]});this.events.emit({type:"FacetFilterSelected",field:e,value:t&&(0,j.serialiseFilter)([t]),query:this.state.searchTerm})}function B(e){this.debug&&console.log("Search UI: Action","setResultsPerPage",...arguments),this._updateSearchResults({current:1,resultsPerPage:e})}function G(e,{autocompleteMinimumCharacters:t=0,autocompleteResults:n=!1,autocompleteSuggestions:r=!1,shouldClearFilters:i=!0,refresh:a=!0,debounce:o=0}={}){this.debug&&console.log("Search UI: Action","setSearchTerm",...arguments),this._setState({searchTerm:e}),a&&this.debounceManager.runWithDebounce(o,"_updateSearchResults",this._updateSearchResults,Object.assign({current:1},i&&{filters:[]})),(n||r)&&e.length>=t&&this.debounceManager.runWithDebounce(o,"_updateAutocomplete",this._updateAutocomplete,e,{autocompleteResults:n,autocompleteSuggestions:r})}function V(e,t){this.debug&&console.log("Search UI: Action","setSort",...arguments);const n={current:1,sortList:null,sortField:null,sortDirection:null};Array.isArray(e)?n.sortList=e:(n.sortField=e,n.sortDirection=t),this._updateSearchResults(n)}function q(e,t=[]){this.debug&&console.log("Search UI: Action","trackClickThrough",...arguments);const{requestId:n,searchTerm:r,results:i,current:a,resultsPerPage:o,totalResults:s,filters:l}=this.state,c=i.findIndex((t=>t._meta.id===e)),u=i[c],d=this.events;this.events.resultClick({query:r,documentId:e,requestId:n,tags:t,result:u,page:a,resultsPerPage:o,resultIndexOnPage:c}),d.emit({type:"ResultSelected",documentId:e,query:r,origin:"results",position:c,tags:t,totalResults:s,filters:l,currentPage:a,resultsPerPage:o})}const $="search-ui-screen-reader-notifications",Q="undefined"!==typeof document,K=()=>{if(!Q)return null;let e=document.getElementById($);return e||(e=document.createElement("div"),e.id=$,e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.style.position="absolute",e.style.width="1px",e.style.height="1px",e.style.margin="-1px",e.style.padding="0",e.style.border="0",e.style.overflow="hidden",e.style.clip="rect(0 0 0 0)",document.body.appendChild(e),e)},J=e=>{const t=K();t&&(t.textContent=e)},ee={searchResults:({start:e,end:t,totalResults:n,searchTerm:r})=>{let i=`Showing ${e} to ${t} results out of ${n}`;return r&&(i+=`, searching for "${r}".`),i}};function te(e,t){if(!this.hasA11yNotifications)return;const n=this.a11yNotificationMessages[e];if(!n){const t=`Could not find corresponding message function in a11yNotificationMessages: "${e}"`;return void console.warn("Action","a11yNotify",t)}const r=n(t);J(r),this.debug&&console.log("Search UI: Action","a11yNotify",{messageFunc:e,messageArgs:t,message:r})}function ne(e,t,n=[]){this.debug&&console.log("Search UI: Action","trackAutocompleteSuggestionClickThrough",...arguments);const{searchTerm:r}=this.state;this.events.emit({type:"AutocompleteSuggestionSelected",position:t,query:r,tags:n,suggestion:e})}function re(e,t,n){if(n){if(t){const r=t[e].bind(t);return(...e)=>n(...e,r)}return n}return t&&t[e]?t[e].bind(t):()=>{throw`No ${e} handler provided and no Connector provided. You must configure one or the other.`}}var ie=class{constructor({apiConnector:e,onSearch:t,onAutocomplete:n,onResultClick:r,onAutocompleteResultClick:i,plugins:a=[]}={}){this.search=re("onSearch",e,t),this.autocomplete=re("onAutocomplete",e,n),this.resultClick=re("onResultClick",e,r),this.autocompleteResultClick=re("onAutocompleteResultClick",e,i),this.plugins=a}emit(e){this.plugins.forEach((t=>{t.subscribe(e)}))}};var ae=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i(t[r]&&"function"===typeof t[r]&&!t[r]({filters:n})||(e[r]=i),e)),{})}var ce=class{constructor({apiConnector:e,autocompleteQuery:t={},plugins:n=[],debug:i,initialState:a,onSearch:o,onAutocomplete:s,onResultClick:l,onAutocompleteResultClick:c,searchQuery:u={},trackUrlState:d=!0,routingOptions:h={},urlPushDebounceLength:f=500,hasA11yNotifications:p=!1,a11yNotificationMessages:g={},alwaysSearchOnInitialLoad:v=!1}){let y;this.state=se,this._updateAutocomplete=(e,{autocompleteResults:t,autocompleteSuggestions:n}={})=>{const r=this.autocompleteRequestSequencer.next(),i=Object.assign(Object.assign({},t&&{results:this.autocompleteQuery.results||{}}),n&&{suggestions:this.autocompleteQuery.suggestions||{}});return this.events.autocomplete({searchTerm:e},i).then((e=>{this.autocompleteRequestSequencer.isOldRequest(r)||(this.autocompleteRequestSequencer.completed(r),this._setState(e))}))},this._updateSearchResults=(e,{skipPushToUrl:t=!1,replaceUrl:n=!1}={})=>{const{current:r,filters:i,resultsPerPage:a,searchTerm:o,sortDirection:s,sortField:l,sortList:c}=Object.assign(Object.assign({},this.state),e);this.debounceManager.cancelByName("_updateSearchResults"),this._setState({current:r,error:"",filters:i,resultsPerPage:a,searchTerm:o,sortDirection:s,sortField:l,sortList:c}),this._makeSearchRequest({skipPushToUrl:t,replaceUrl:n})},this._makeSearchRequest=I.debounce(0,(({skipPushToUrl:e,replaceUrl:t})=>{const{current:n,filters:r,resultsPerPage:i,searchTerm:a,sortDirection:o,sortField:s,sortList:l}=this.state;this._setState({isLoading:!0});const c=this.searchRequestSequencer.next(),u=this.searchQuery,{conditionalFacets:d}=u,h=ae(u,["conditionalFacets"]),f=Object.assign(Object.assign({},h),{facets:le(this.searchQuery.facets,d,r)}),p=Object.assign(Object.assign({},oe(this.state)),{filters:(0,j.mergeFilters)(r,this.searchQuery.filters)});return this.events.search(p,f).then((u=>{if(this.searchRequestSequencer.isOldRequest(c))return;this.searchRequestSequencer.completed(c);const{totalResults:d}=u;this.events.emit({type:"SearchQuery",filters:this.state.filters,query:this.state.searchTerm,currentPage:p.current,resultsPerPage:p.resultsPerPage,totalResults:d});const h=0===d?0:(n-1)*i+1,f=d{var t;"Invalid credentials"!==e.message?this._setState({error:`An unexpected error occurred: ${e.message}`}):this._setState(Object.assign({},(null===(t=this.apiConnector)||void 0===t?void 0:t.state)&&Object.assign({},this.apiConnector.state)))}))})),this.actions=Object.entries(r).reduce(((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:n.bind(this)})),{}),this.actions=Object.assign(Object.assign({},this.actions),(null===e||void 0===e?void 0:e.actions)&&Object.assign({},e.actions)),Object.assign(this,this.actions),this.events=new ie({apiConnector:e,onSearch:o,onAutocomplete:s,onResultClick:l,onAutocompleteResultClick:c,plugins:n}),this.debug=i,this.debug&&(console.warn("Search UI Debugging is enabled. This should be turned off in production deployments."),"undefined"!==typeof window&&(window.searchUI=this)),this.autocompleteRequestSequencer=new L,this.searchRequestSequencer=new L,this.debounceManager=new I,this.autocompleteQuery=t,this.searchQuery=u,this.subscriptions=[],this.trackUrlState=d,this.urlPushDebounceLength=f,this.alwaysSearchOnInitialLoad=v,this.apiConnector=e,d?(this.URLManager=new M(h),y=this.URLManager.getStateFromURL(),this.URLManager.onURLStateChange((e=>{this._updateSearchResults(Object.assign(Object.assign({},se),e),{skipPushToUrl:!0})}))):y={},this.hasA11yNotifications=p,this.hasA11yNotifications&&K(),this.a11yNotificationMessages=Object.assign(Object.assign({},ee),g),this.startingState=Object.assign(Object.assign({},this.state),a);const m=oe(Object.assign(Object.assign({},this.startingState),y));this.state=Object.assign(Object.assign(Object.assign({},this.state),(null===e||void 0===e?void 0:e.state)&&Object.assign({},e.state)),m),(m.searchTerm||m.filters.length>0||this.alwaysSearchOnInitialLoad)&&this._updateSearchResults(m,{replaceUrl:!0})}_setState(e){const t=Object.assign(Object.assign({},this.state),e);this.debug&&console.log("Search UI: State Update",e,t),this.state=t,this.subscriptions.forEach((e=>e(t)))}setSearchQuery(e){this.searchQuery=e,this._updateSearchResults({})}setAutocompleteQuery(e){this.autocompleteQuery=e}subscribeToStateChanges(e){this.subscriptions.push(e)}unsubscribeToStateChanges(e){this.subscriptions=this.subscriptions.filter((t=>t!==e))}tearDown(){this.subscriptions=[],this.URLManager&&this.URLManager.tearDown(),this.debounceManager.cancelByName("pushStateToURL")}getActions(){return this.actions}getState(){return Object.assign({},this.state)}},ue=n(33877);var de={moreFilters:({visibleOptionsCount:e,showingAll:t})=>{let n=t?"All ":"";return n+=`${e} options shown.`,n}};var he=({children:e,config:t,driver:n})=>{const[r,a]=(0,i.useState)(null);if((0,i.useEffect)((()=>{const e=n||new ce(Object.assign(Object.assign({},t),{a11yNotificationMessages:Object.assign(Object.assign({},de),t.a11yNotificationMessages)}));return a(e),()=>{e.tearDown()}}),[]),(0,i.useEffect)((()=>{r&&r.setSearchQuery(t.searchQuery)}),[t.searchQuery]),(0,i.useEffect)((()=>{r&&r.setAutocompleteQuery(t.autocompleteQuery)}),[t.autocompleteQuery]),!r)return null;const o={driver:r};return i.createElement(ue.Z.Provider,{value:o},e)}},50483:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(67294),i=n(33877),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{this.mounted&&this.setState((n=>o(Object.assign(Object.assign({},n),t),e,this.props)))},this.mounted=!1,this.state=Object.assign({},o(function(e){return Object.assign(Object.assign({},e.driver.getState()),e.driver.getActions())}(n),e,t))}componentDidMount(){this.mounted=!0,this.context.driver.subscribeToStateChanges(this.subscription)}componentWillUnmount(){this.mounted=!1,this.context.driver.unsubscribeToStateChanges(this.subscription)}render(){const e=a(this.props,[]);return r.createElement(t,Object.assign({},this.state,e))}}return n.contextType=i.Z,n}},l=n(45697),c=n.n(l);function u({mapContextToProps:e,children:t}){const n=s(e)((e=>t(e)));return r.createElement(n,null)}u.propTypes={mapContextToProps:c().func,children:c().func.isRequired};var d=u},64787:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(70008);const i=Object.assign({},r);var a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{if("value"==t.type)return t.sort&&console.warn("search-ui-site-search-connector: Site Search does not support 'sort' on facets"),t.size&&console.warn("search-ui-site-search-connector: Site Search does not support 'size' on facets"),[e,t];console.warn(`search-ui-site-search-connector: Dropping ${e} facet, only value facets are supported in Site Search`)})).filter((e=>e)).map((([e])=>e));return t.length?t:void 0}(t.facets),l=function(e){if(e&&0!==Object.keys(e).length)return e.reduce(((e,t)=>{const n=t.field,r=t.values;if(e[n])return console.warn("search-ui-site-search-connector: More than one filter found for a single field"),e;if(t.type&&"all"!==t.type&&"any"!==t.type)return console.warn(`search-ui-site-search-connector: Unsupported filter type "${t.type}" found, only "all" and "any" are currently supported`),e;if(void 0!==r.find((e=>"object"===typeof e))){if(r.length>1)return console.warn("search-ui-site-search-connector: Cannot apply more than 1 none-value filters to a single field"),e;const t=r[0];if(i.isFilterValueRange(t)){const{name:r}=t,i=a(t,["name"]);return e[n]=Object.assign({type:"range"},i),e}return e}return e[n]=Object.assign(Object.assign({},"any"===t.type?{}:{type:"and"}),{values:r}),e}),{})}(void 0!==t.filters?t.filters:e.filters),c=void 0!==t.current?t.current:e.current,u=void 0!==t.resultsPerPage?t.resultsPerPage:e.resultsPerPage,d=void 0!==t.sortDirection?t.sortDirection:e.sortDirection,h=void 0!==t.sortField?t.sortField:e.sortField,f=void 0!==t.sortList?t.sortList:e.sortList,[p,g]=(v=t.result_fields)?[Object.keys(v),Object.entries(v).reduce(((e,[t,n])=>n.snippet?Object.assign(Object.assign({},e),{[t]:n.snippet}):e),{})]:[];var v;const y=(m=t.search_fields)?Object.keys(m):[];var m;const b=e.searchTerm;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u&&{per_page:u}),c&&{page:c}),d&&{sort_direction:{[n]:d}}),h&&{sort_field:{[n]:h}}),f&&{sort_list:{[n]:f}}),l&&{filters:{[n]:l}}),s&&{facets:{[n]:s}}),p&&{fetch_fields:{[n]:p}}),g&&{highlight_fields:{[n]:g}}),y&&!!y.length&&{search_fields:{[n]:y}}),{q:b})}var s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);iObject.assign(Object.assign({},e),{[t]:n});function c(e,t){const n=function(e,t){return e[t].map((e=>{const{highlight:t,sort:n}=e,r=s(e,["highlight","sort"]),i=Object.entries(r).filter((([e])=>!e.startsWith("_"))).map((([e,t])=>{return[e,(n=t,{raw:n})];var n})).reduce(l,{});return Object.entries(t).forEach((([e,t])=>{i[e].snippet=t})),i}))}(e.records,t),r=e.info[t].num_pages,i=e.info[t].total_result_count,a=(o=e.info[t]).facets?Object.entries(o.facets).map((([e,t])=>[e,[{field:e,data:Object.entries(t).map((([e,t])=>({value:e,count:t}))),type:"value"}]])).reduce(l,{}):{};var o;return Object.assign({rawResponse:e,results:n,totalPages:r,totalResults:i,requestId:""},Object.keys(a).length>0&&{facets:a})}var u=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};function d(e,t,n,r){return u(this,void 0,void 0,(function*(){const i=new Headers({"Content-Type":"application/json"}),a=yield fetch(`https://search-api.swiftype.com/api/v1/public/${n}`,{method:t,headers:i,body:JSON.stringify(Object.assign({engine_key:e},r)),credentials:"include"});let o;try{o=yield a.json()}catch(s){}if(a.status>=200&&a.status<300)return o;{const e=o&&o.errors&&Object.entries(o.errors).length>0?JSON.stringify(o.errors):a.status;throw new Error(`${e}`)}}))}var h=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};function f(e,t,n){const r=Object.entries(Object.assign({engine_key:e},n)).map((([e,t])=>`${e}=${encodeURIComponent(t)}`)).join("&");return fetch(`https://search-api.swiftype.com/api/v1/public/${t}?${r}`,{method:"GET",credentials:"include"})}var p=class{constructor({documentType:e,engineKey:t,beforeSearchCall:n=((e,t)=>t(e)),beforeAutocompleteResultsCall:r=((e,t)=>t(e))}){this.documentType=e,this.engineKey=t,this.beforeSearchCall=n,this.beforeAutocompleteResultsCall=r,this.request=d.bind(this,t),this._get=f.bind(this,t)}onResultClick({query:e,documentId:t,tags:n}){n&&n.length>0&&console.warn("search-ui-site-search-connector: Site Search does not support tags on click"),this._get("analytics/pc",{t:(new Date).getTime(),q:e,doc_id:t})}onAutocompleteResultClick({query:e,documentId:t,tags:n}){n&&console.warn("search-ui-site-search-connector: Site Search does not support tags on autocompleteClick"),this._get("analytics/pas",{t:(new Date).getTime(),q:e,doc_id:t})}onSearch(e,t){const n=o(e,t,this.documentType);return this.beforeSearchCall(n,(e=>this.request("POST","engines/search.json",e).then((e=>c(e,this.documentType)))))}onAutocomplete({searchTerm:e},t){return h(this,void 0,void 0,(function*(){if(t.results){const n=o({searchTerm:e},t.results,this.documentType);return this.beforeAutocompleteResultsCall(n,(e=>this.request("POST","engines/suggest.json",e).then((e=>({autocompletedResults:c(e,this.documentType).results})))))}t.suggestions&&console.warn("search-ui-site-search-connector: Site Search does support query suggestions on autocomplete")}))}}},70008:function(e,t,n){"use strict";n.r(t),n.d(t,{doFilterValuesMatch:function(){return c},findFilterValues:function(){return o},isFilterValueRange:function(){return d},markSelectedFacetValuesFromFilters:function(){return l},mergeFilters:function(){return u},removeSingleFilterValue:function(){return s},serialiseFilter:function(){return h}});var r=n(78081),i=n.n(r),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);ie.field===t&&e.type===n));return r?r.values:[]}function s(e,t,n,r){return e.reduce(((e,i)=>{const{field:o,values:s,type:l}=i,u=a(i,["field","values","type"]);if(o===t&&(!r||l===r)){const t=s.filter((e=>!c(e,n)));return t.length>0?e.concat(Object.assign({field:o,values:t,type:l},u)):e}return e.concat(i)}),[])}function l(e,t,n,r){const i=e.data,a=o(t,n,r)||[];return Object.assign(Object.assign({},e),{data:i.map((e=>Object.assign(Object.assign({},e),{selected:a.some((t=>c(t,e.value)))})))})}function c(e,t){return!!(e&&e.name&&t&&t.name&&e.name===t.name)||i()(e,t,{strict:!0})}function u(e,t){return t?t.reduce(((e,t)=>e.find((e=>e.type===t.type&&e.field===t.field))?e:[...e,t]),e):e}function d(e){return"object"===typeof e&&void 0!==e.name}const h=e=>e.reduce(((e,t)=>(d(t)?e.push(t.name):e.push(t.toString()),e)),[]).join(",")},78081:function(e,t,n){var r=n(82215),i=n(82584),a=n(20609),o=n(98420),s=n(20738),l=n(18923),c=Date.prototype.getTime;function u(e,t,n){var f=n||{};return!!(f.strict?a(e,t):e===t)||(!e||!t||"object"!==typeof e&&"object"!==typeof t?f.strict?a(e,t):e==t:function(e,t,n){var a,f;if(typeof e!==typeof t)return!1;if(d(e)||d(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e)!==i(t))return!1;var p=o(e),g=o(t);if(p!==g)return!1;if(p||g)return e.source===t.source&&s(e)===s(t);if(l(e)&&l(t))return c.call(e)===c.call(t);var v=h(e),y=h(t);if(v!==y)return!1;if(v||y){if(e.length!==t.length)return!1;for(a=0;a=0;a--)if(m[a]!=b[a])return!1;for(a=m.length-1;a>=0;a--)if(!u(e[f=m[a]],t[f],n))return!1;return!0}(e,t,f))}function d(e){return null===e||void 0===e}function h(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&("function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0]))}e.exports=u},21782:function(e,t,n){"use strict";var r=n(82215),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=n(31044)(),c=s&&l,u=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!==typeof(i=r)||"[object Function]"!==a.call(i)||!r())return;var i;c?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},d=function(e,t){var n=arguments.length>2?arguments[2]:{},a=r(t);i&&(a=o.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=s?a.slice(0,s.index):a,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(s=o.exec(a))&&d=0;--a){var o,s=e[a];if("[]"===s&&n.parseArrays)o=[].concat(i);else{o=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[])[u]=i:"__proto__"!==c&&(o[c]=i):o={0:i}}i=o}return i}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?o.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:o.comma,decoder:"function"===typeof e.decoder?e.decoder:o.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n,c={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=u.split(t.delimiter,d),f=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(v=a(v)?[v]:v),i.call(c,g)?c[g]=r.combine(c[g],v):c[g]=v}return c}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),f=0;f0?C.join(",")||null:void 0}];else if(l(h))D=h;else{var R=Object.keys(C);D=g?R.sort(g):R}for(var P=o&&l(C)&&1===C.length?n+"[]":n,M=0;M0?x+_:""}},74872:function(e,t,n){"use strict";var r=n(34474),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=o[u]:u<2048?l+=o[192|u>>6]+o[128|63&u]:u<55296||u>=57344?l+=o[224|u>>12]+o[128|u>>6&63]+o[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=o[240|u>>18]+o[128|u>>12&63]+o[128|u>>6&63]+o[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r6)switch((0,a.uO)(e,t+1)){case 109:if(45!==(0,a.uO)(e,t+4))break;case 102:return(0,a.gx)(e,/(.+:)(.+)-([^]+)/,"$1"+o.G$+"$2-$3$1"+o.uj+(108==(0,a.uO)(e,t+3)?"$3":"$2-$3"))+e;case 115:return~(0,a.Cw)(e,"stretch")?g((0,a.gx)(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==(0,a.uO)(e,t+1))break;case 6444:switch((0,a.uO)(e,(0,a.to)(e)-3-(~(0,a.Cw)(e,"!important")&&10))){case 107:return(0,a.gx)(e,":",":"+o.G$)+e;case 101:return(0,a.gx)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o.G$+(45===(0,a.uO)(e,14)?"inline-":"")+"box$3$1"+o.G$+"$2$3$1"+o.MS+"$2box$3")+e}break;case 5936:switch((0,a.uO)(e,t+11)){case 114:return o.G$+e+o.MS+(0,a.gx)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return o.G$+e+o.MS+(0,a.gx)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return o.G$+e+o.MS+(0,a.gx)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o.G$+e+o.MS+e+e}return e}var v=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case o.h5:e.return=g(e.value,e.length);break;case o.lK:return(0,s.q)([(0,i.JG)(e,{value:(0,a.gx)(e.value,"@","@"+o.G$)})],r);case o.Fr:if(e.length)return(0,a.$e)(e.props,(function(t){switch((0,a.EQ)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,s.q)([(0,i.JG)(e,{props:[(0,a.gx)(t,/:(read-\w+)/,":"+o.uj+"$1")]})],r);case"::placeholder":return(0,s.q)([(0,i.JG)(e,{props:[(0,a.gx)(t,/:(plac\w+)/,":"+o.G$+"input-$1")]}),(0,i.JG)(e,{props:[(0,a.gx)(t,/:(plac\w+)/,":"+o.uj+"$1")]}),(0,i.JG)(e,{props:[(0,a.gx)(t,/:(plac\w+)/,o.MS+"input-$1")]})],r)}return""}))}}],y=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||v;var a,o,u={},d=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:v}},b=!!i.useInsertionEffect&&i.useInsertionEffect,_=b||function(e){return e()},x=(b||r.useLayoutEffect,{}.hasOwnProperty),w=r.createContext("undefined"!==typeof HTMLElement?(0,a.Z)({key:"css"}):null);w.Provider;var S=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(w);return e(t,i,n)}))};var C=r.createContext({});var O="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",A=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return o(t,n,r),_((function(){return function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,n,r)})),null};var k=S((function(e,t,n){var i=e.css;"string"===typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var a=e[O],o=[i],s="";"string"===typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var l=m(o,void 0,r.useContext(C));s+=t.key+"-"+l.name;var c={};for(var u in e)x.call(e,u)&&"css"!==u&&u!==O&&(c[u]=e[u]);return c.ref=n,c.className=s,r.createElement(r.Fragment,null,r.createElement(A,{cache:t,serialized:l,isStringTag:"string"===typeof a}),r.createElement(a,c))})),T=(n(8679),function(e,t){var n=arguments;if(null==t||!x.call(t,"css"))return r.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=k,a[1]=function(e,t){var n={};for(var r in t)x.call(t,r)&&(n[r]=t[r]);return n[O]=e,n}(e,t);for(var o=2;of)&&(H=(z=z.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],00?"in "+i:i+" ago":i};function a(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var o={date:a({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:a({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:a({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},l=function(e,t,n,r){return s[e]};function c(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=null!==n&&void 0!==n&&n.width?String(n.width):i;r=e.formattingValues[a]||e.formattingValues[i]}else{var o=e.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var u={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:c({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:c({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:c({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:c({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:c({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function d(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o,s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(h.matchPattern);if(!n)return null;var r=n[0],i=e.match(h.parsePattern);if(!i)return null;var a=h.valueCallback?h.valueCallback(i[0]):i[0];return{value:a=t.valueCallback?t.valueCallback(a):a,rest:e.slice(r.length)}}),era:d({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:d({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:d({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},p={code:"en-US",formatDistance:i,formatLong:o,formatRelative:l,localize:u,match:f,options:{weekStartsOn:0,firstWeekContainsDate:1}}},84314:function(e,t,n){"use strict";n.d(t,{j:function(){return i}});var r={};function i(){return r}},97621:function(e,t){"use strict";var n=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},r=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},i={p:r,P:function(e,t){var i,a=e.match(/(P+)(p+)?/)||[],o=a[1],s=a[2];if(!s)return n(e,t);switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",n(o,t)).replace("{{time}}",r(s,t))}};t.Z=i},24262:function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,{Z:function(){return r}})},49702:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(19013),i=n(66979),a=n(7032),o=n(13882);var s=6048e5;function l(e){(0,o.Z)(1,arguments);var t=(0,r.default)(e),n=(0,i.Z)(t).getTime()-function(e){(0,o.Z)(1,arguments);var t=(0,a.Z)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,i.Z)(n)}(t).getTime();return Math.round(n/s)+1}},7032:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),i=n(13882),a=n(66979);function o(e){(0,i.Z)(1,arguments);var t=(0,r.default)(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var s=(0,a.Z)(o),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var c=(0,a.Z)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},23324:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(19013),i=n(59025),a=n(7651),o=n(13882),s=n(83946),l=n(84314);var c=6048e5;function u(e,t){(0,o.Z)(1,arguments);var n=(0,r.default)(e),u=(0,i.Z)(n,t).getTime()-function(e,t){var n,r,c,u,d,h,f,p;(0,o.Z)(1,arguments);var g=(0,l.j)(),v=(0,s.Z)(null!==(n=null!==(r=null!==(c=null!==(u=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==u?u:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==c?c:g.firstWeekContainsDate)&&void 0!==r?r:null===(f=g.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1),y=(0,a.Z)(e,t),m=new Date(0);return m.setUTCFullYear(y,0,v),m.setUTCHours(0,0,0,0),(0,i.Z)(m,t)}(n,t).getTime();return Math.round(u/c)+1}},7651:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(19013),i=n(13882),a=n(59025),o=n(83946),s=n(84314);function l(e,t){var n,l,c,u,d,h,f,p;(0,i.Z)(1,arguments);var g=(0,r.default)(e),v=g.getUTCFullYear(),y=(0,s.j)(),m=(0,o.Z)(null!==(n=null!==(l=null!==(c=null!==(u=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==u?u:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==c?c:y.firstWeekContainsDate)&&void 0!==l?l:null===(f=y.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(v+1,0,m),b.setUTCHours(0,0,0,0);var _=(0,a.Z)(b,t),x=new Date(0);x.setUTCFullYear(v,0,m),x.setUTCHours(0,0,0,0);var w=(0,a.Z)(x,t);return g.getTime()>=_.getTime()?v+1:g.getTime()>=w.getTime()?v:v-1}},5267:function(e,t,n){"use strict";n.d(t,{Do:function(){return o},Iu:function(){return a},qp:function(){return s}});var r=["D","DD"],i=["YY","YYYY"];function a(e){return-1!==r.indexOf(e)}function o(e){return-1!==i.indexOf(e)}function s(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},13882:function(e,t,n){"use strict";function r(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:function(){return r}})},66979:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),a=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}},59025:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(19013),i=n(13882),a=n(83946),o=n(84314);function s(e,t){var n,s,l,c,u,d,h,f;(0,i.Z)(1,arguments);var p=(0,o.j)(),g=(0,a.Z)(null!==(n=null!==(s=null!==(l=null!==(c=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==c?c:null===t||void 0===t||null===(u=t.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==l?l:p.weekStartsOn)&&void 0!==s?s:null===(h=p.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=(0,r.default)(e),y=v.getUTCDay(),m=(y0?n:1-n;return d("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):d(n+1,2)},d:function(e,t){return d(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return d(e.getUTCHours()%12||12,t.length)},H:function(e,t){return d(e.getUTCHours(),t.length)},m:function(e,t){return d(e.getUTCMinutes(),t.length)},s:function(e,t){return d(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return d(Math.floor(r*Math.pow(10,n-3)),t.length)}},f="midnight",p="noon",g="morning",v="afternoon",y="evening",m="night",b={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return h.y(e,t)},Y:function(e,t,n,r){var i=(0,u.Z)(e,r),a=i>0?i:1-i;return"YY"===t?d(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):d(a,t.length)},R:function(e,t){return d((0,l.Z)(e),t.length)},u:function(e,t){return d(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return d(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return h.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=(0,c.Z)(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):d(i,t.length)},I:function(e,t,n){var r=(0,s.Z)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):d(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):h.d(e,t)},D:function(e,t,n){var r=function(e){(0,o.Z)(1,arguments);var t=(0,a.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):d(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return d(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return d(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return d(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?p:0===i?f:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?y:i>=12?v:i>=4?g:m,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return h.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):h.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):h.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):h.s(e,t)},S:function(e,t){return h.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return x(i);case"XXXX":case"XX":return w(i);default:return w(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return x(i);case"xxxx":case"xx":return w(i);default:return w(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_(i,":");default:return"GMT"+w(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_(i,":");default:return"GMT"+w(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return d(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return d((r._originalDate||e).getTime(),t.length)}};function _(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=t||"";return n+String(i)+o+d(a,2)}function x(e,t){return e%60===0?(e>0?"-":"+")+d(Math.abs(e)/60,2):w(e,t)}function w(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+d(Math.floor(i/60),2)+n+d(i%60,2)}var S=b,C=n(97621),O=n(24262),A=n(5267),k=n(83946),T=n(84314),D=n(8958),E=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,P=/^'([^]*?)'?$/,M=/''/g,L=/[a-zA-Z]/;function N(e,t,n){var s,l,c,u,d,h,f,p,g,v,y,m,b,_,x,w,N,F;(0,o.Z)(2,arguments);var I=String(t),j=(0,T.j)(),H=null!==(s=null!==(l=null===n||void 0===n?void 0:n.locale)&&void 0!==l?l:j.locale)&&void 0!==s?s:D.Z,U=(0,k.Z)(null!==(c=null!==(u=null!==(d=null!==(h=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==h?h:null===n||void 0===n||null===(f=n.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==d?d:j.firstWeekContainsDate)&&void 0!==u?u:null===(g=j.locale)||void 0===g||null===(v=g.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==c?c:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Y=(0,k.Z)(null!==(y=null!==(m=null!==(b=null!==(_=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==_?_:null===n||void 0===n||null===(x=n.locale)||void 0===x||null===(w=x.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==b?b:j.weekStartsOn)&&void 0!==m?m:null===(N=j.locale)||void 0===N||null===(F=N.options)||void 0===F?void 0:F.weekStartsOn)&&void 0!==y?y:0);if(!(Y>=0&&Y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!H.localize)throw new RangeError("locale must contain localize property");if(!H.formatLong)throw new RangeError("locale must contain formatLong property");var z=(0,a.default)(e);if(!(0,r.default)(z))throw new RangeError("Invalid time value");var W=(0,O.Z)(z),X=(0,i.Z)(z,W),Z={firstWeekContainsDate:U,weekStartsOn:Y,locale:H,_originalDate:z};return I.match(R).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,C.Z[t])(e,H.formatLong):e})).join("").match(E).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(P);if(!t)return e;return t[1].replace(M,"'")}(r);var a=S[i];if(a)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,A.Do)(r)||(0,A.qp)(r,t,String(e)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,A.Iu)(r)||(0,A.qp)(r,t,String(e)),a(X,r,H.localize,Z);if(i.match(L))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}},71381:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(71002),i=n(13882);function a(e){return(0,i.Z)(1,arguments),e instanceof Date||"object"===(0,r.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}},12274:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(71381),i=n(19013),a=n(13882);function o(e){if((0,a.Z)(1,arguments),!(0,r.default)(e)&&"number"!==typeof e)return!1;var t=(0,i.default)(e);return!isNaN(Number(t))}},91218:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51820),i=n(13882),a=n(83946);function o(e,t){(0,i.Z)(2,arguments);var n=(0,a.Z)(t);return(0,r.Z)(e,-n)}},19013:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(71002),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},44020:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(a){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],i(n),i(r))}function a(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(n)||[],r=1;r=u/4){for(var v=p;v>=f;v--){var m=y[v],b=Math.log(m/e)/Math.log(t/e)*n,_={v:m};null===g||Math.abs(b-g.pixel_coord)>=d?g={tickValue:m,pixel_coord:b}:_.label="",h.push(_)}h.reverse()}}if(0===h.length){var x,w;i("labelsKMG2")?(x=[1,2,4,8,16,32,64,128,256],w=16):(x=[1,2,5,10,20,50,100],w=10);var S,C,O,A=Math.ceil(n/d),k=Math.abs(t-e)/A,T=Math.floor(Math.log(k)/Math.log(w)),D=Math.pow(w,T);for(l=0;ld));l++);for(C>O&&(S*=-1),s=0;s<=u;s++)c=C+s*S,h.push({v:c})}}var E=i("axisLabelFormatter");for(s=0;s=0?_(e,t,o,r,i):[]},s={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29},l=0,c=1,u=2,d=3,h=4,f=5,p=6,g=7,v=[];v[s.MILLISECONDLY]={datefield:p,step:1,spacing:1},v[s.TWO_MILLISECONDLY]={datefield:p,step:2,spacing:2},v[s.FIVE_MILLISECONDLY]={datefield:p,step:5,spacing:5},v[s.TEN_MILLISECONDLY]={datefield:p,step:10,spacing:10},v[s.FIFTY_MILLISECONDLY]={datefield:p,step:50,spacing:50},v[s.HUNDRED_MILLISECONDLY]={datefield:p,step:100,spacing:100},v[s.FIVE_HUNDRED_MILLISECONDLY]={datefield:p,step:500,spacing:500},v[s.SECONDLY]={datefield:f,step:1,spacing:1e3},v[s.TWO_SECONDLY]={datefield:f,step:2,spacing:2e3},v[s.FIVE_SECONDLY]={datefield:f,step:5,spacing:5e3},v[s.TEN_SECONDLY]={datefield:f,step:10,spacing:1e4},v[s.THIRTY_SECONDLY]={datefield:f,step:30,spacing:3e4},v[s.MINUTELY]={datefield:h,step:1,spacing:6e4},v[s.TWO_MINUTELY]={datefield:h,step:2,spacing:12e4},v[s.FIVE_MINUTELY]={datefield:h,step:5,spacing:3e5},v[s.TEN_MINUTELY]={datefield:h,step:10,spacing:6e5},v[s.THIRTY_MINUTELY]={datefield:h,step:30,spacing:18e5},v[s.HOURLY]={datefield:d,step:1,spacing:36e5},v[s.TWO_HOURLY]={datefield:d,step:2,spacing:72e5},v[s.SIX_HOURLY]={datefield:d,step:6,spacing:216e5},v[s.DAILY]={datefield:u,step:1,spacing:864e5},v[s.TWO_DAILY]={datefield:u,step:2,spacing:1728e5},v[s.WEEKLY]={datefield:u,step:7,spacing:6048e5},v[s.MONTHLY]={datefield:c,step:1,spacing:2629746e3},v[s.QUARTERLY]={datefield:c,step:3,spacing:7889238e3},v[s.BIANNUAL]={datefield:c,step:6,spacing:15778476e3},v[s.ANNUAL]={datefield:l,step:1,spacing:31556952e3},v[s.DECADAL]={datefield:l,step:10,spacing:31556952e4},v[s.CENTENNIAL]={datefield:l,step:100,spacing:31556952e5};var y=function(){for(var e=[],t=-39;t<=39;t++)for(var n=Math.pow(10,t),r=1;r<=9;r++){var i=n*r;e.push(i)}return e}(),m=function(e,t,n,r){for(var i=r("pixelsPerLabel"),a=0;a=i)return a}return-1},b=function(e,t,n){var r=v[n].spacing;return Math.round(1*(t-e)/r)},_=function(e,t,n,i,a){var o=i("axisLabelFormatter"),y=i("labelsUTC")?r.DateAccessorsUTC:r.DateAccessorsLocal,m=v[n].datefield,b=v[n].step,_=v[n].spacing,x=new Date(e),w=[];w[l]=y.getFullYear(x),w[c]=y.getMonth(x),w[u]=y.getDate(x),w[d]=y.getHours(x),w[h]=y.getMinutes(x),w[f]=y.getSeconds(x),w[p]=y.getMilliseconds(x);var S=w[m]%b;n==s.WEEKLY&&(S=y.getDay(x)),w[m]-=S;for(var C=m+1;C=s.DAILY||y.getHours(A)%b===0)&&O.push({v:k,label:o.call(a,A,n,i,a)}),w[m]+=b,k=(A=y.makeDate.apply(null,w)).getTime();return O}},72247:function(e,t,n){"use strict";n.r(t),n.d(t,{Circles:function(){return Q},DASHED_LINE:function(){return u},DOTTED_LINE:function(){return c},DOT_DASH_LINE:function(){return d},DateAccessorsLocal:function(){return T},DateAccessorsUTC:function(){return D},HORIZONTAL:function(){return h},Iterator:function(){return Z},LN_TEN:function(){return o},LOG_SCALE:function(){return a},VERTICAL:function(){return f},addEvent:function(){return g},binarySearch:function(){return M},cancelEvent:function(){return y},clone:function(){return z},createCanvas:function(){return W},createIterator:function(){return B},dateAxisLabelFormatter:function(){return ve},dateParser:function(){return L},dateStrToMillis:function(){return N},dateString_:function(){return R},dateValueFormatter:function(){return ye},detectLineDelimiter:function(){return K},dragGetX_:function(){return w},dragGetY_:function(){return S},findPos:function(){return b},floatFormat:function(){return A},getContext:function(){return p},getContextPixelRatio:function(){return X},hmsString_:function(){return E},hsvToRGB:function(){return m},isArrayLike:function(){return U},isCanvasSupported:function(){return ae},isDateLike:function(){return Y},isNodeContainedBy:function(){return J},isOK:function(){return C},isPixelChangingOptionList:function(){return $},isValidPoint:function(){return O},log10:function(){return s},logRangeFraction:function(){return l},numberAxisLabelFormatter:function(){return pe},numberValueFormatter:function(){return fe},pageX:function(){return _},pageY:function(){return x},parseFloat_:function(){return oe},pow:function(){return ee},removeEvent:function(){return v},repeatAndCleanup:function(){return V},requestAnimFrame:function(){return G},round_:function(){return P},setupDOMready_:function(){return xe},toRGB_:function(){return ie},type:function(){return i},typeArrayLike:function(){return H},update:function(){return F},updateDeep:function(){return j},zeropad:function(){return k}});var r=n(74321);function i(e){return null===e?"null":typeof e}var a=10,o=Math.log(a),s=function(e){return Math.log(e)/o},l=function(e,t,n){var r=s(e),i=r+n*(s(t)-r);return Math.pow(a,i)},c=[2,2],u=[7,3],d=[7,2,2,2],h=1,f=2,p=function(e){return e.getContext("2d")},g=function(e,t,n){e.addEventListener(t,n,!1)};function v(e,t,n){e.removeEventListener(t,n,!1)}function y(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1}function m(e,t,n){var r,i,a;if(0===t)r=n,i=n,a=n;else{var o=Math.floor(6*e),s=6*e-o,l=n*(1-t),c=n*(1-t*s),u=n*(1-t*(1-s));switch(o){case 1:r=c,i=n,a=l;break;case 2:r=l,i=n,a=u;break;case 3:r=l,i=c,a=n;break;case 4:r=u,i=l,a=n;break;case 5:r=n,i=l,a=c;break;case 6:case 0:r=n,i=u,a=l}}return"rgb("+(r=Math.floor(255*r+.5))+","+(i=Math.floor(255*i+.5))+","+(a=Math.floor(255*a+.5))+")"}function b(e){var t=e.getBoundingClientRect(),n=window,r=document.documentElement;return{x:t.left+(n.pageXOffset||r.scrollLeft),y:t.top+(n.pageYOffset||r.scrollTop)}}function _(e){return!e.pageX||e.pageX<0?0:e.pageX}function x(e){return!e.pageY||e.pageY<0?0:e.pageY}function w(e,t){return _(e)-t.px}function S(e,t){return x(e)-t.py}function C(e){return!!e&&!isNaN(e)}function O(e,t){return!!e&&(null!==e.yval&&(null!==e.x&&void 0!==e.x&&(null!==e.y&&void 0!==e.y&&!(isNaN(e.x)||!t&&isNaN(e.y)))))}function A(e,t){var n=Math.min(Math.max(1,t||2),21);return Math.abs(e)<.001&&0!==e?e.toExponential(n-1):e.toPrecision(n)}function k(e){return e<10?"0"+e:""+e}var T={getFullYear:e=>e.getFullYear(),getMonth:e=>e.getMonth(),getDate:e=>e.getDate(),getHours:e=>e.getHours(),getMinutes:e=>e.getMinutes(),getSeconds:e=>e.getSeconds(),getMilliseconds:e=>e.getMilliseconds(),getDay:e=>e.getDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(e,t,n,r,i,a,o)}},D={getFullYear:e=>e.getUTCFullYear(),getMonth:e=>e.getUTCMonth(),getDate:e=>e.getUTCDate(),getHours:e=>e.getUTCHours(),getMinutes:e=>e.getUTCMinutes(),getSeconds:e=>e.getUTCSeconds(),getMilliseconds:e=>e.getUTCMilliseconds(),getDay:e=>e.getUTCDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(Date.UTC(e,t,n,r,i,a,o))}};function E(e,t,n,r){var i=k(e)+":"+k(t);if(n&&(i+=":"+k(n),r)){var a=""+r;i+="."+("000"+a).substring(a.length)}return i}function R(e,t){var n=t?D:T,r=new Date(e),i=n.getFullYear(r),a=n.getMonth(r),o=n.getDate(r),s=n.getHours(r),l=n.getMinutes(r),c=n.getSeconds(r),u=n.getMilliseconds(r),d=""+i+"/"+k(a+1)+"/"+k(o);return 3600*s+60*l+c+.001*u&&(d+=" "+E(s,l,c,u)),d}function P(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function M(e,t,n,r,i){if(null!==r&&void 0!==r&&null!==i&&void 0!==i||(r=0,i=t.length-1),r>i)return-1;null!==n&&void 0!==n||(n=0);var a,o=function(e){return e>=0&&ee?n>0&&o(a=s-1)&&t[a]e?s:M(e,t,n,s+1,i):-1}function L(e){var t,n;if((-1==e.search("-")||-1!=e.search("T")||-1!=e.search("Z"))&&(n=N(e))&&!isNaN(n))return n;if(-1!=e.search("-")){for(t=e.replace("-","/","g");-1!=t.search("-");)t=t.replace("-","/");n=N(t)}else n=N(e);return n&&!isNaN(n)||console.error("Couldn't parse "+e+" as a date"),n}function N(e){return new Date(e).getTime()}function F(e,t){if("undefined"!=typeof t&&null!==t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var I="undefined"!==typeof Node&&null!==Node&&"object"===typeof Node?function(e){return e instanceof Node}:function(e){return"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName};function j(e,t){if("undefined"!=typeof t&&null!==t)for(var n in t)if(t.hasOwnProperty(n)){const r=t[n];null===r?e[n]=null:U(r)?e[n]=r.slice():I(r)?e[n]=r:"object"==typeof r?("object"==typeof e[n]&&null!==e[n]||(e[n]={}),j(e[n],r)):e[n]=r}return e}function H(e){if(null===e)return"null";const t=typeof e;return("object"===t||"function"===t&&"function"===typeof e.item)&&"number"===typeof e.length&&3!==e.nodeType&&4!==e.nodeType?"array":t}function U(e){const t=typeof e;return null!==e&&("object"===t||"function"===t&&"function"===typeof e.item)&&"number"===typeof e.length&&3!==e.nodeType&&4!==e.nodeType}function Y(e){return null!==e&&"object"===typeof e&&"function"===typeof e.getTime}function z(e){for(var t=[],n=0;n=t||G.call(window,(function(){var t=(new Date).getTime()-o;i=a;var c=(a=Math.floor(t/n))-i;a+c>s||a>=s?(e(s),r()):(0!==c&&e(a),l())}))}()}else r()}var q={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0};function $(e,t){var n={};if(e)for(var r=1;r=l){for(u=d.length;u>0;)if(c=ee(l,u),--u,s>=c)return s/c>=Math.pow(10,i)?e.toExponential(r):P(e/c,r)+d[u]}else if(s<1){for(u=0;u=1););return s*c=Math.pow(10,i)||s=r.He.DECADAL)return""+a;if(t>=r.He.MONTHLY)return ge[o]+" "+a;if(0===3600*l+60*c+u+.001*d||t>=r.He.DAILY)return k(s)+" "+ge[o];if(tr.He.MINUTELY?E(l,c,u,0):E(l,c,u,d)}function ye(e,t){return R(e,t("labelsUTC"))}var me=[],be=!1;function _e(e){return"function"===typeof e&&e(),!0}function xe(e){if("undefined"!==typeof document){const t=function(){if(!be){be=!0,e.onDOMready=_e,document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1);for(let e=0;e=0&&r<1&&this.xticks.push({pos:r,label:n,has_tick:a});for(this.yticks=[],e=0;e0&&r<=1&&this.yticks.push({axis:e,pos:r,label:n,has_tick:a})},i.prototype._evaluateAnnotations=function(){var e,t={};for(e=0;e=2,v=e.drawingContext;v.save(),g&&v.setLineDash&&v.setLineDash(i);var y=o._drawSeries(e,p,n,l,a,d,u,t);o._drawPointsOnLine(e,y,s,t,l),g&&v.setLineDash&&v.setLineDash([]),v.restore()},o._drawSeries=function(e,t,n,r,i,a,o,s){var l,c,u=null,d=null,h=null,f=[],p=!0,g=e.drawingContext;g.beginPath(),g.strokeStyle=s,g.lineWidth=n;for(var v=t.array_,y=t.end_,m=t.predicate_,b=t.start_;b0;n--)if(2==(s=t[n])[0]){var r=t[n-1];r[1]==s[1]&&r[2]==s[2]&&t.splice(n,1)}for(n=0;n2&&!e){var i=0;2==t[0][0]&&i++;var a=null,o=null;for(n=i;nt[o][2]&&(o=n)}}var c=t[a],u=t[o];t.splice(i,t.length-i),ao?(t.push(u),t.push(c)):t.push(c)}}}(n);for(var a=0,o=t.length;a1||s-n>1),n=s);t.push([e,i,o])};return{moveTo:function(e,t){o(2,e,t)},lineTo:function(e,t){o(1,e,t)},stroke:function(){a(!0),e.stroke()},fill:function(){a(!0),e.fill()},beginPath:function(){a(!0),e.beginPath()},closePath:function(){a(!0),e.closePath()},_count:function(){return i}}},o._fillPlotter=function(e){if(!e.singleSeriesName&&0===e.seriesIndex){for(var t=e.dygraph,n=t.getLabels().slice(1),i=n.length;i>=0;i--)t.visibility()[i]||n.splice(i,1);var a=function(){for(var e=0;e=0;i--){var a=r[i];e.lineTo(a[0],a[1])}},v=d-1;v>=0;v--){var y=e.drawingContext,m=n[v];if(t.getBooleanOption("fillGraph",m)){var b=t.getNumericOption("fillAlpha",m),_=t.getBooleanOption("stepPlot",m),x=f[v],w=t.axisPropertiesForSeries(m),S=1+w.minyval*w.yscale;S<0?S=0:S>1&&(S=1),S=c.h*S+c.y;var C,O=u[v],A=r.createIterator(O,0,O.length,o._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",m))),k=NaN,T=[-1,-1],D=r.toRGB_(x),E="rgba("+D.r+","+D.g+","+D.b+","+b+")";y.fillStyle=E,y.beginPath();var R,P=!0;(O.length>2*t.width_||Q.FORCE_FAST_PROXY)&&(y=o._fastCanvasProxy(y));for(var M,L=[];A.hasNext;)if(M=A.next(),r.isOK(M.y)||_){if(h){if(!P&&R==M.xval)continue;var N;P=!1,R=M.xval,N=void 0===(s=p[M.canvasx])?S:l?s[0]:s,C=[M.canvasy,N],_?-1===T[0]?p[M.canvasx]=[M.canvasy,S]:p[M.canvasx]=[M.canvasy,T[0]]:p[M.canvasx]=M.canvasy}else C=isNaN(M.canvasy)&&_?[c.y+c.h,S]:[M.canvasy,S];isNaN(k)?(y.moveTo(M.canvasx,C[1]),y.lineTo(M.canvasx,C[0])):(_?(y.lineTo(M.canvasx,T[0]),y.lineTo(M.canvasx,C[0])):y.lineTo(M.canvasx,C[0]),h&&(L.push([k,T[1]]),l&&s?L.push([M.canvasx,s[1]]):L.push([M.canvasx,C[1]]))),T=C,k=M.canvasx}else g(y,k,T[1],L),L=[],k=NaN,null===M.y_stacked||isNaN(M.y_stacked)||(p[M.canvasx]=c.h*M.y_stacked+c.y);l=_,C&&M&&(g(y,M.canvasx,C[1],L),L=[]),y.fill()}}}};var s=o,l=n(74321),c={maybeTreatMouseOpAsClick:function(e,t,n){n.dragEndX=r.dragGetX_(e,n),n.dragEndY=r.dragGetY_(e,n);var i=Math.abs(n.dragEndX-n.dragStartX),a=Math.abs(n.dragEndY-n.dragStartY);i<2&&a<2&&void 0!==t.lastx_&&null!==t.lastx_&&c.treatMouseOpAsClick(t,e,n),n.regionWidth=i,n.regionHeight=a},startPan:function(e,t,n){var i,a;n.isPanning=!0;var o=t.xAxisRange();if(t.getOptionForAxis("logscale","x")?(n.initialLeftmostDate=r.log10(o[0]),n.dateRange=r.log10(o[1])-r.log10(o[0])):(n.initialLeftmostDate=o[0],n.dateRange=o[1]-o[0]),n.xUnitsPerPixel=n.dateRange/(t.plotter_.area.w-1),t.getNumericOption("panEdgeFraction")){var s=t.width_*t.getNumericOption("panEdgeFraction"),l=t.xAxisExtremes(),c=t.toDomXCoord(l[0])-s,u=t.toDomXCoord(l[1])+s,d=t.toDataXCoord(c),h=t.toDataXCoord(u);n.boundedDates=[d,h];var f=[],p=t.height_*t.getNumericOption("panEdgeFraction");for(i=0;in.boundedDates[1]&&(a=(i-=a-n.boundedDates[1])+n.dateRange),t.getOptionForAxis("logscale","x")?t.dateWindow_=[Math.pow(r.LOG_SCALE,i),Math.pow(r.LOG_SCALE,a)]:t.dateWindow_=[i,a],n.is2DPan)for(var o=n.dragEndY-n.dragStartY,s=0;s=10&&n.dragDirection==r.HORIZONTAL){var a=Math.min(n.dragStartX,n.dragEndX),o=Math.max(n.dragStartX,n.dragEndX);(a=Math.max(a,i.x))<(o=Math.min(o,i.x+i.w))&&t.doZoomX_(a,o),n.cancelNextDblclick=!0}else if(n.regionHeight>=10&&n.dragDirection==r.VERTICAL){var s=Math.min(n.dragStartY,n.dragEndY),l=Math.max(n.dragStartY,n.dragEndY);(s=Math.max(s,i.y))<(l=Math.min(l,i.y+i.h))&&t.doZoomY_(s,l),n.cancelNextDblclick=!0}n.dragStartX=null,n.dragStartY=null},c.startTouch=function(e,t,n){e.preventDefault(),e.touches.length>1&&(n.startTimeForDoubleTapMs=null);for(var r=[],i=0;i=2){n.initialPinchCenter={pageX:.5*(r[0].pageX+r[1].pageX),pageY:.5*(r[0].pageY+r[1].pageY),dataX:.5*(r[0].dataX+r[1].dataX),dataY:.5*(r[0].dataY+r[1].dataY)};var s=180/Math.PI*Math.atan2(n.initialPinchCenter.pageY-r[0].pageY,r[0].pageX-n.initialPinchCenter.pageX);(s=Math.abs(s))>90&&(s=90-s),n.touchDirections={x:s<67.5,y:s>22.5}}n.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}},c.moveTouch=function(e,t,n){n.startTimeForDoubleTapMs=null;var r,i=[];for(r=0;r=2){var p=c[1].pageX-u.pageX;s=(i[1].pageX-o.pageX)/p;var g=c[1].pageY-u.pageY;l=(i[1].pageY-o.pageY)/g}s=Math.min(8,Math.max(.125,s)),l=Math.min(8,Math.max(.125,l));var v=!1;if(n.touchDirections.x){var y=u.dataX-d.dataX/s;t.dateWindow_=[y+(n.initialRange.x[0]-u.dataX)/s,y+(n.initialRange.x[1]-u.dataX)/s],v=!0}if(n.touchDirections.y)for(r=0;r<1;r++){var m=t.axes_[r];if(t.attributes_.getForAxis("logscale",r));else{y=u.dataY-d.dataY/l;m.valueRange=[y+(n.initialRange.y[0]-u.dataY)/l,y+(n.initialRange.y[1]-u.dataY)/l],v=!0}}if(t.drawGraph_(!1),v&&i.length>1&&t.getFunctionOption("zoomCallback")){var b=t.xAxisRange();t.getFunctionOption("zoomCallback").call(t,b[0],b[1],t.yAxisRanges())}},c.endTouch=function(e,t,n){if(0!==e.touches.length)c.startTouch(e,t,n);else if(1==e.changedTouches.length){var r=(new Date).getTime(),i=e.changedTouches[0];n.startTimeForDoubleTapMs&&r-n.startTimeForDoubleTapMs<500&&n.doubleTapX&&Math.abs(n.doubleTapX-i.screenX)<50&&n.doubleTapY&&Math.abs(n.doubleTapY-i.screenY)<50?t.resetZoom():(n.startTimeForDoubleTapMs=r,n.doubleTapX=i.screenX,n.doubleTapY=i.screenY)}};var u=function(e,t,n){return en?e-n:0};c.defaultModel={mousedown:function(e,t,n){if(!e.button||2!=e.button){n.initializeMouseDown(e,t,n),e.altKey||e.shiftKey?c.startPan(e,t,n):c.startZoom(e,t,n);var i=function(e){if(n.isZooming){var i=function(e,t){var n=r.findPos(t.canvas_),i={left:n.x,right:n.x+t.canvas_.offsetWidth,top:n.y,bottom:n.y+t.canvas_.offsetHeight},a={x:r.pageX(e),y:r.pageY(e)},o=u(a.x,i.left,i.right),s=u(a.y,i.top,i.bottom);return Math.max(o,s)}(e,t);i<100?c.moveZoom(e,t,n):null!==n.dragEndX&&(n.dragEndX=null,n.dragEndY=null,t.clearZoomRect_())}else n.isPanning&&c.movePan(e,t,n)},a=function(e){n.isZooming?null!==n.dragEndX?c.endZoom(e,t,n):c.maybeTreatMouseOpAsClick(e,t,n):n.isPanning&&c.endPan(e,t,n),r.removeEvent(document,"mousemove",i),r.removeEvent(document,"mouseup",a),n.destroy()};t.addAndTrackEvent(document,"mousemove",i),t.addAndTrackEvent(document,"mouseup",a)}},willDestroyContextMyself:!0,touchstart:function(e,t,n){c.startTouch(e,t,n)},touchmove:function(e,t,n){c.moveTouch(e,t,n)},touchend:function(e,t,n){c.endTouch(e,t,n)},dblclick:function(e,t,n){if(n.cancelNextDblclick)n.cancelNextDblclick=!1;else{var r={canvasx:n.dragEndX,canvasy:n.dragEndY,cancelable:!0};t.cascadeEvents_("dblclick",r)||e.altKey||e.shiftKey||t.resetZoom()}}},c.nonInteractiveModel_={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n)},mouseup:c.maybeTreatMouseOpAsClick},c.dragIsPanInteractionModel={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n),c.startPan(e,t,n)},mousemove:function(e,t,n){n.isPanning&&c.movePan(e,t,n)},mouseup:function(e,t,n){n.isPanning&&c.endPan(e,t,n)}};var d=c,h={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:"rgb(255, 255, 255)",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:"white",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:",",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:"all",hideOverlayOnMouseOut:!0,resizable:"no",legend:"onmouseover",legendFollowOffsetX:50,legendFollowOffsetY:-50,stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:"black",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:"rgb(128,128,128)",interactionModel:d.defaultModel,animatedZooms:!1,animateBackgroundFade:!0,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:"#808FAB",rangeSelectorPlotFillGradientColor:"white",rangeSelectorPlotFillColor:"#A7B1C4",rangeSelectorBackgroundStrokeColor:"gray",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:"black",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[s._fillPlotter,s._errorPlotter,s._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:r.dateAxisLabelFormatter,valueFormatter:r.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:l.cc},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:r.numberValueFormatter,axisLabelFormatter:r.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:l.Dv},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:r.numberValueFormatter,axisLabelFormatter:r.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:l.Dv}}},f=function(e){this.dygraph_=e,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get("highlightSeriesOpts")||{},this.reparseSeries()};f.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},f.axisToIndex_=function(e){if("string"==typeof e){if(f.AXIS_STRING_MAPPINGS_.hasOwnProperty(e))return f.AXIS_STRING_MAPPINGS_[e];throw"Unknown axis : "+e}if("number"==typeof e){if(0===e||1===e)return e;throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(e)throw"Unknown axis : "+e;return 0},f.prototype.reparseSeries=function(){var e=this.get("labels");if(e){this.labels_=e.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};for(var t=this.user_.series||{},n=0;n1&&r.update(this.yAxes_[1].options,s.y2||{}),r.update(this.xAxis_.options,s.x||{})}},f.prototype.get=function(e){var t=this.getGlobalUser_(e);return null!==t?t:this.getGlobalDefault_(e)},f.prototype.getGlobalUser_=function(e){return this.user_.hasOwnProperty(e)?this.user_[e]:null},f.prototype.getGlobalDefault_=function(e){return this.global_.hasOwnProperty(e)?this.global_[e]:h.hasOwnProperty(e)?h[e]:null},f.prototype.getForAxis=function(e,t){var n,r;if("number"==typeof t)r=0===(n=t)?"y":"y2";else{if("y1"==t&&(t="y"),"y"==t)n=0;else if("y2"==t)n=1;else{if("x"!=t)throw"Unknown axis "+t;n=-1}r=t}var i=-1==n?this.xAxis_:this.yAxes_[n];if(i){var a=i.options;if(a.hasOwnProperty(e))return a[e]}if("x"!==t||"logscale"!==e){var o=this.getGlobalUser_(e);if(null!==o)return o}var s=h.axes[r];return s.hasOwnProperty(e)?s[e]:this.getGlobalDefault_(e)},f.prototype.getForSeries=function(e,t){if(t===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(e))return this.highlightSeries_[e];if(!this.series_.hasOwnProperty(t))throw"Unknown series: "+t;var n=this.series_[t],r=n.options;return r.hasOwnProperty(e)?r[e]:this.getForAxis(e,n.yAxis)},f.prototype.numAxes=function(){return this.yAxes_.length},f.prototype.axisForSeries=function(e){return this.series_[e].yAxis},f.prototype.axisOptions=function(e){return this.yAxes_[e].options},f.prototype.seriesForAxis=function(e){return this.yAxes_[e].series},f.prototype.seriesNames=function(){return this.labels_};var p=f;function g(){this.tarps=[]}g.prototype.cover=function(){for(var e=document.getElementsByTagName("iframe"),t=0;ta)&&(a=r),(null===i||rr&&(l=r),ca)&&(a=c),(null===i||l=0){var d=e[r-t];null===d[1]||isNaN(d[1])||(a-=d[2][0],s-=d[1],o-=d[2][1],l-=1)}u[r]=l?[e[r][0],1*s/l,[1*a/l,1*o/l]]:[e[r][0],null,[null,null]]}return u};var k=A,T=function(){};(T.prototype=new x).extractSeries=function(e,t,n){var r,i,a,o,s,l=[];const c=n.get("labels")[t],u=n.getForSeries("logscale",c);for(var d=0;d=0&&(a-=e[r-t][2][0],o-=e[r-t][2][1]);var s=e[r][0],l=o?a/o:0;i[r]=[s,100*l]}return i};var D=T,E=function(){};(E.prototype=new S).extractSeries=function(e,t,n){var r,i,a,o,s,l,c,u=[];const d=n.get("labels")[t],h=n.getForSeries("logscale",d),f=n.getForSeries("sigma",d);for(var p=0;p=0&&(d-=e[r-t][2][2],h-=e[r-t][2][3]);var p=e[r][0],g=h?d/h:0;if(s)if(h){var v=g<0?0:g,y=h,m=o*Math.sqrt(v*(1-v)/y+o*o/(4*y*y)),b=1+o*o/h;l=(v+o*o/(2*h)-m)/b,c=(v+o*o/(2*h)+m)/b,i[r]=[p,v*f,[l*f,c*f]]}else i[r]=[p,0,[0,0]];else u=h?o*Math.sqrt(g*(1-g)/h):1,i[r]=[p,f*g,[f*(g-u),f*(g+u)]]}return i};var R=E,P=function(){this.annotations_=[]};P.prototype.toString=function(){return"Annotations Plugin"},P.prototype.activate=function(e){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}},P.prototype.detachLabels=function(){for(var e=0;ea.x+a.w||l.canvasya.y+a.h)){var c=l.annotation,u=6;c.hasOwnProperty("tickHeight")&&(u=c.tickHeight);var d=document.createElement("div");d.style.fontSize=t.getOption("axisLabelFontSize")+"px";var h="dygraph-annotation";c.hasOwnProperty("icon")||(h+=" dygraphDefaultAnnotation dygraph-default-annotation"),c.hasOwnProperty("cssClass")&&(h+=" "+c.cssClass),d.className=h;var f=c.hasOwnProperty("width")?c.width:16,p=c.hasOwnProperty("height")?c.height:16;if(c.hasOwnProperty("icon")){var g=document.createElement("img");g.src=c.icon,g.width=f,g.height=p,d.appendChild(g)}else l.annotation.hasOwnProperty("shortText")&&d.appendChild(document.createTextNode(l.annotation.shortText));var v=l.canvasx-f/2;d.style.left=v+"px";var y=0;if(c.attachAtBottom){var m=a.y+a.h-p-u;o[v]?m-=o[v]:o[v]=0,o[v]+=u+p,y=m}else y=l.canvasy-p-u;d.style.top=y+"px",d.style.width=f+"px",d.style.height=p+"px",d.title=l.annotation.text,d.style.color=t.colorsMap_[l.name],d.style.borderColor=t.colorsMap_[l.name],c.div=d,t.addAndTrackEvent(d,"click",i("clickHandler","annotationClickHandler",l)),t.addAndTrackEvent(d,"mouseover",i("mouseOverHandler","annotationMouseOverHandler",l)),t.addAndTrackEvent(d,"mouseout",i("mouseOutHandler","annotationMouseOutHandler",l)),t.addAndTrackEvent(d,"dblclick",i("dblClickHandler","annotationDblClickHandler",l)),r.appendChild(d),this.annotations_.push(d);var b=e.drawingContext;if(b.save(),b.strokeStyle=c.hasOwnProperty("tickColor")?c.tickColor:t.colorsMap_[l.name],b.lineWidth=c.hasOwnProperty("tickWidth")?c.tickWidth:t.getOption("strokeWidth"),b.beginPath(),c.attachAtBottom){m=y+p;b.moveTo(l.canvasx,m),b.lineTo(l.canvasx,m+u)}else b.moveTo(l.canvasx,l.canvasy),b.lineTo(l.canvasx,l.canvasy-2-u);b.closePath(),b.stroke(),b.restore()}}},P.prototype.destroy=function(){this.detachLabels()};var M=P,L=function(){this.xlabels_=[],this.ylabels_=[]};L.prototype.toString=function(){return"Axes Plugin"},L.prototype.activate=function(e){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},L.prototype.layout=function(e){var t,n=e.dygraph;if(n.getOptionForAxis("drawAxis","y")){var r=n.getOptionForAxis("axisLabelWidth","y")+2*n.getOptionForAxis("axisTickSize","y");e.reserveSpaceLeft(r)}n.getOptionForAxis("drawAxis","x")&&(t=n.getOption("xAxisHeight")?n.getOption("xAxisHeight"):n.getOptionForAxis("axisLabelFontSize","x")+2*n.getOptionForAxis("axisTickSize","x"),e.reserveSpaceBottom(t));if(2==n.numAxes()){if(n.getOptionForAxis("drawAxis","y2")){r=n.getOptionForAxis("axisLabelWidth","y2")+2*n.getOptionForAxis("axisTickSize","y2");e.reserveSpaceRight(r)}}else n.numAxes()>2&&n.error("Only two y-axes are supported at this time. (Trying to use "+n.numAxes()+")")},L.prototype.detachLabels=function(){function e(e){for(var t=0;t0){var b=t.numAxes(),_=[y("y"),y("y2")];g.yticks.forEach((function(e){if(void 0!==e.label){o=v.x;var t="y1",n=_[0];if(1==e.axis&&(o=v.x+v.w,-1,t="y2",n=_[1]),n("drawAxis")){var r=n("axisLabelFontSize");s=v.y+e.pos*v.h,a=p(e.label,"y",2==b?t:null);var i=s-r/2;i<0&&(i=0),i+r+3>d?a.style.bottom="0":a.style.top=Math.min(i,d-2*r)+"px",0===e.axis?(a.style.left=v.x-n("axisLabelWidth")-n("axisTickSize")+"px",a.style.textAlign="right"):1==e.axis&&(a.style.left=v.x+v.w+n("axisTickSize")+"px",a.style.textAlign="left"),a.style.width=n("axisLabelWidth")+"px",c.appendChild(a),m.ylabels_.push(a)}}}))}var x;if(t.getOption("drawAxesAtZero"))((C=t.toPercentXCoord(0))>1||C<0||isNaN(C))&&(C=0),x=n(v.x+C*v.w);else x=n(v.x);l.strokeStyle=t.getOptionForAxis("axisLineColor","y"),l.lineWidth=t.getOptionForAxis("axisLineWidth","y"),l.beginPath(),l.moveTo(x,i(v.y)),l.lineTo(x,i(v.y+v.h)),l.closePath(),l.stroke(),2==t.numAxes()&&t.getOptionForAxis("drawAxis","y2")&&(l.strokeStyle=t.getOptionForAxis("axisLineColor","y2"),l.lineWidth=t.getOptionForAxis("axisLineWidth","y2"),l.beginPath(),l.moveTo(i(v.x+v.w),i(v.y)),l.lineTo(i(v.x+v.w),i(v.y+v.h)),l.closePath(),l.stroke())}if(t.getOptionForAxis("drawAxis","x")){if(g.xticks){var w=y("x");g.xticks.forEach((function(e){if(void 0!==e.label){o=v.x+e.pos*v.w,s=v.y+v.h,(a=p(e.label,"x")).style.textAlign="center",a.style.top=s+w("axisTickSize")+"px";var t=o-w("axisLabelWidth")/2;t+w("axisLabelWidth")>u&&(t=u-w("axisLabelWidth"),a.style.textAlign="right"),t<0&&(t=0,a.style.textAlign="left"),a.style.left=t+"px",a.style.width=w("axisLabelWidth")+"px",c.appendChild(a),m.xlabels_.push(a)}}))}var S,C;if(l.strokeStyle=t.getOptionForAxis("axisLineColor","x"),l.lineWidth=t.getOptionForAxis("axisLineWidth","x"),l.beginPath(),t.getOption("drawAxesAtZero"))((C=t.toPercentYCoord(0,0))>1||C<0)&&(C=1),S=i(v.y+C*v.h);else S=i(v.y+v.h);l.moveTo(n(v.x),S),l.lineTo(n(v.x+v.w),S),l.closePath(),l.stroke()}l.restore()};var N=L,F=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};F.prototype.toString=function(){return"ChartLabels Plugin"},F.prototype.activate=function(e){return{layout:this.layout,didDrawChart:this.didDrawChart}};var I=function(e){var t=document.createElement("div");return t.style.position="absolute",t.style.left=e.x+"px",t.style.top=e.y+"px",t.style.width=e.w+"px",t.style.height=e.h+"px",t};F.prototype.detachLabels_=function(){for(var e=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],t=0;t=2);r=o.yticks,a.save(),r.forEach((e=>{if(e.has_tick){var r=e.axis;f[r]&&(a.save(),p[r]&&a.setLineDash&&a.setLineDash(g[r]),a.strokeStyle=d[r],a.lineWidth=h[r],t=l(s.x),n=c(s.y+e.pos*s.h),a.beginPath(),a.moveTo(t,n),a.lineTo(t+s.w,n),a.stroke(),a.restore())}})),a.restore()}if(i.getOptionForAxis("drawGrid","x")){r=o.xticks,a.save();g=i.getOptionForAxis("gridLinePattern","x");(p=g&&g.length>=2)&&a.setLineDash&&a.setLineDash(g),a.strokeStyle=i.getOptionForAxis("gridLineColor","x"),a.lineWidth=i.getOptionForAxis("gridLineWidth","x"),r.forEach((e=>{e.has_tick&&(t=l(s.x+e.pos*s.w),n=c(s.y+s.h),a.beginPath(),a.moveTo(t,n),a.lineTo(t,s.y),a.stroke())})),p&&a.setLineDash&&a.setLineDash([]),a.restore()}},U.prototype.destroy=function(){};var Y=U,z=function(){this.legend_div_=null,this.is_generated_div_=!1};z.prototype.toString=function(){return"Legend Plugin"},z.prototype.activate=function(e){var t,n=e.getOption("labelsDiv");return n&&null!==n?t="string"==typeof n||n instanceof String?document.getElementById(n):n:((t=document.createElement("div")).className="dygraph-legend",e.graphDiv.appendChild(t),this.is_generated_div_=!0),this.legend_div_=t,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};function W(e,t,n){if(!e||e.length<=1)return`
`;var r,i,a,o,s=0,l=0,c=[];for(r=0;r<=e.length;r++)s+=e[r%e.length];if((o=Math.floor(n/(s-e[0])))>1){for(r=0;r`;return u}z.prototype.select=function(e){var t=e.selectedX,n=e.selectedPoints,r=e.selectedRow,i=e.dygraph.getOption("legend");if("never"!==i){var a=z.generateLegendHTML(e.dygraph,t,n,this.one_em_width_,r);if(a instanceof Node&&a.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(this.legend_div_.innerHTML="",this.legend_div_.appendChild(a)):this.legend_div_.innerHTML=a,this.legend_div_.style.display="","follow"===i){var o,s=e.dygraph.plotter_.area,l=this.legend_div_.offsetWidth,c=e.dygraph.getOptionForAxis("axisLabelWidth","y"),u=e.dygraph.getHighlightSeries();u&&(o=n.find((e=>e.name===u)))||(o=n[0]);const t=e.dygraph.getNumericOption("legendFollowOffsetX"),r=e.dygraph.getNumericOption("legendFollowOffsetY");var d=o.x*s.w+t,h=o.y*s.h+r;d+l+1>s.w&&(d=d-2*t-l-(c-s.x)),this.legend_div_.style.left=c+d+"px",this.legend_div_.style.top=h+"px"}else if("onmouseover"===i&&this.is_generated_div_){s=e.dygraph.plotter_.area,l=this.legend_div_.offsetWidth;this.legend_div_.style.left=s.x+s.w-l-1+"px",this.legend_div_.style.top=s.y+"px"}}else this.legend_div_.style.display="none"},z.prototype.deselect=function(e){"always"!==e.dygraph.getOption("legend")&&(this.legend_div_.style.display="none");var t=function(e){var t=document.createElement("span");t.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),e.appendChild(t);var n=t.offsetWidth;return e.removeChild(t),n}(this.legend_div_);this.one_em_width_=t;var n=z.generateLegendHTML(e.dygraph,void 0,void 0,t,null);n instanceof Node&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(this.legend_div_.innerHTML="",this.legend_div_.appendChild(n)):this.legend_div_.innerHTML=n},z.prototype.didDrawChart=function(e){this.deselect(e)},z.prototype.predraw=function(e){if(this.is_generated_div_){e.dygraph.graphDiv.appendChild(this.legend_div_);var t=e.dygraph.plotter_.area,n=this.legend_div_.offsetWidth;this.legend_div_.style.left=t.x+t.w-n-1+"px",this.legend_div_.style.top=t.y+"px"}},z.prototype.destroy=function(){this.legend_div_=null},z.generateLegendHTML=function(e,t,n,i,a){var o,s={dygraph:e,x:t,i:a,series:[]},l={},c=e.getLabels();if(c)for(var u=1;u/g,">")),isVisible:d.visible,color:d.color};s.series.push(h),l[c[u]]=h}if("undefined"!==typeof t){var f=e.optionsViewForAxis_("x"),p=f("valueFormatter");s.xHTML=p.call(e,t,f,c[0],e,a,0);var g=[],v=e.numAxes();for(u=0;u":" "),n+=`${a.dashHTML} ${a.labelHTML}`)}return n}n=e.xHTML+":";for(i=0;i"),n+=` ${a.labelHTML}: ${a.yHTML}`}return n};var X=z,Z=function(){this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};Z.prototype.toString=function(){return"RangeSelector Plugin"},Z.prototype.activate=function(e){return this.dygraph_=e,this.getOption_("showRangeSelector")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},Z.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},Z.prototype.getOption_=function(e,t){return this.dygraph_.getOption(e,t)},Z.prototype.setDefaultOption_=function(e,t){this.dygraph_.attrs_[e]=t},Z.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(console.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},Z.prototype.addToGraph_=function(){var e=this.graphDiv_=this.dygraph_.graphDiv;e.appendChild(this.bgcanvas_),e.appendChild(this.fgcanvas_),e.appendChild(this.leftZoomHandle_),e.appendChild(this.rightZoomHandle_)},Z.prototype.removeFromGraph_=function(){var e=this.graphDiv_;e.removeChild(this.bgcanvas_),e.removeChild(this.fgcanvas_),e.removeChild(this.leftZoomHandle_),e.removeChild(this.rightZoomHandle_),this.graphDiv_=null},Z.prototype.reserveSpace_=function(e){this.getOption_("showRangeSelector")&&e.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},Z.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},Z.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},Z.prototype.updateVisibility_=function(){var e=this.getOption_("showRangeSelector");if(e)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var t=this.dygraph_;setTimeout((function(){t.width_=0,t.resize()}),1)}return e},Z.prototype.resize_=function(){function e(e,t,n,i){var a=i||r.getContextPixelRatio(t);e.style.top=n.y+"px",e.style.left=n.x+"px",e.width=n.w*a,e.height=n.h*a,e.style.width=n.w+"px",e.style.height=n.h+"px",1!=a&&t.scale(a,a)}var t=this.dygraph_.layout_.getPlotArea(),n=0;this.dygraph_.getOptionForAxis("drawAxis","x")&&(n=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={x:t.x,y:t.y+t.h+n+4,w:t.w,h:this.getOption_("rangeSelectorHeight")};var i=this.dygraph_.getNumericOption("pixelRatio");e(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,i),e(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,i)},Z.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},Z.prototype.createZoomHandles_=function(){var e=new Image;e.className="dygraph-rangesel-zoomhandle",e.style.position="absolute",e.style.zIndex=10,e.style.visibility="hidden",e.style.cursor="col-resize",e.width=9,e.height=16,e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=",this.isMobileDevice_&&(e.width*=2,e.height*=2),this.leftZoomHandle_=e,this.rightZoomHandle_=e.cloneNode(!1)},Z.prototype.initInteraction_=function(){var e,t,n,i,a,o,s,l,c,u,h,f,p,g,y=this,m=document,b=0,_=null,x=!1,w=!1,S=!this.isMobileDevice_,C=new v;e=function(e){var t=y.dygraph_.xAxisExtremes(),n=(t[1]-t[0])/y.canvasRect_.w;return[t[0]+(e.leftHandlePos-y.canvasRect_.x)*n,t[0]+(e.rightHandlePos-y.canvasRect_.x)*n]},t=function(e){return r.cancelEvent(e),x=!0,b=e.clientX,_=e.target?e.target:e.srcElement,"mousedown"!==e.type&&"dragstart"!==e.type||(r.addEvent(m,"mousemove",n),r.addEvent(m,"mouseup",i)),y.fgcanvas_.style.cursor="col-resize",C.cover(),!0},n=function(e){if(!x)return!1;r.cancelEvent(e);var t=e.clientX-b;if(Math.abs(t)<4)return!0;b=e.clientX;var n,i=y.getZoomHandleStatus_();_==y.leftZoomHandle_?(n=i.leftHandlePos+t,n=Math.min(n,i.rightHandlePos-_.width-3),n=Math.max(n,y.canvasRect_.x)):(n=i.rightHandlePos+t,n=Math.min(n,y.canvasRect_.x+y.canvasRect_.w),n=Math.max(n,i.leftHandlePos+_.width+3));var o=_.width/2;return _.style.left=n-o+"px",y.drawInteractiveLayer_(),S&&a(),!0},i=function(e){return!!x&&(x=!1,C.uncover(),r.removeEvent(m,"mousemove",n),r.removeEvent(m,"mouseup",i),y.fgcanvas_.style.cursor="default",S||a(),!0)},a=function(){try{var t=y.getZoomHandleStatus_();if(y.isChangingRange_=!0,t.isZoomed){var n=e(t);y.dygraph_.doZoomXDates_(n[0],n[1])}else y.dygraph_.resetZoom()}finally{y.isChangingRange_=!1}},o=function(e){var t=y.leftZoomHandle_.getBoundingClientRect(),n=t.left+t.width/2,r=(t=y.rightZoomHandle_.getBoundingClientRect()).left+t.width/2;return e.clientX>n&&e.clientX=y.canvasRect_.x+y.canvasRect_.w?i=(a=y.canvasRect_.x+y.canvasRect_.w)-o:(i+=t,a+=t);var s=y.leftZoomHandle_.width/2;return y.leftZoomHandle_.style.left=i-s+"px",y.rightZoomHandle_.style.left=a-s+"px",y.drawInteractiveLayer_(),S&&u(),!0},c=function(e){return!!w&&(w=!1,r.removeEvent(m,"mousemove",l),r.removeEvent(m,"mouseup",c),S||u(),!0)},u=function(){try{y.isChangingRange_=!0,y.dygraph_.dateWindow_=e(y.getZoomHandleStatus_()),y.dygraph_.drawGraph_(!1)}finally{y.isChangingRange_=!1}},h=function(e){if(!x&&!w){var t=o(e)?"move":"default";t!=y.fgcanvas_.style.cursor&&(y.fgcanvas_.style.cursor=t)}},f=function(e){"touchstart"==e.type&&1==e.targetTouches.length?t(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?n(e.targetTouches[0])&&r.cancelEvent(e):i(e)},p=function(e){"touchstart"==e.type&&1==e.targetTouches.length?s(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?l(e.targetTouches[0])&&r.cancelEvent(e):c(e)},g=function(e,t){for(var n=["touchstart","touchend","touchmove","touchcancel"],r=0;r1&&(p=h.rollingAverage(p,t.rollPeriod(),f,e)),d.push(p)}var g=[];for(e=0;e0)&&(_=Math.min(_,w),x=Math.max(x,w))}var S=.25;if(n)for(x=r.log10(x),x+=x*S,_=r.log10(_),e=0;ethis.canvasRect_.x||n+1=0;a--){var o=i[a][0];if(i[a][1].call(o,n),n.propagationStopped)break}return n.defaultPrevented},q.prototype.getPluginInstance_=function(e){for(var t=0;t!!e.valueRange)).indexOf(!0)>=0;if(null===e||void 0===e)return t||n;if("y"===e)return n;throw new Error(`axis parameter is [${e}] must be null, 'x' or 'y'.`)},q.prototype.toString=function(){var e=this.maindiv_;return"[Dygraph "+(e&&e.id?e.id:e)+"]"},q.prototype.attr_=function(e,t){return t?this.attributes_.getForSeries(e,t):this.attributes_.get(e)},q.prototype.getOption=function(e,t){return this.attr_(e,t)},q.prototype.getNumericOption=function(e,t){return this.getOption(e,t)},q.prototype.getStringOption=function(e,t){return this.getOption(e,t)},q.prototype.getBooleanOption=function(e,t){return this.getOption(e,t)},q.prototype.getFunctionOption=function(e,t){return this.getOption(e,t)},q.prototype.getOptionForAxis=function(e,t){return this.attributes_.getForAxis(e,t)},q.prototype.optionsViewForAxis_=function(e){var t=this;return function(n){var r=t.user_attrs_.axes;return r&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:("x"!==e||"logscale"!==n)&&("undefined"!=typeof t.user_attrs_[n]?t.user_attrs_[n]:(r=t.attrs_.axes)&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:"y"==e&&t.axes_[0].hasOwnProperty(n)?t.axes_[0][n]:"y2"==e&&t.axes_[1].hasOwnProperty(n)?t.axes_[1][n]:t.attr_(n))}},q.prototype.rollPeriod=function(){return this.rollPeriod_},q.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},q.prototype.xAxisExtremes=function(){var e=this.getNumericOption("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-e,1+e];var t=this.rawData_[0][0],n=this.rawData_[this.rawData_.length-1][0];if(e){var r=n-t;t-=r*e,n+=r*e}return[t,n]},q.prototype.yAxisExtremes=function(){const e=this.gatherDatasets_(this.rolledSeries_,null),{extremes:t}=e,n=this.axes_;this.computeYAxisRanges_(t);const r=this.axes_;return this.axes_=n,r.map((e=>e.extremeRange))},q.prototype.yAxisRange=function(e){if("undefined"==typeof e&&(e=0),e<0||e>=this.axes_.length)return null;var t=this.axes_[e];return[t.computedValueRange[0],t.computedValueRange[1]]},q.prototype.yAxisRanges=function(){for(var e=[],t=0;t=this.rawData_.length||t<0||t>=this.rawData_[e].length?null:this.rawData_[e][t]},q.prototype.createInterface_=function(){var e=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",this.graphDiv.style.position="relative",e.appendChild(this.graphDiv),this.canvas_=r.createCanvas(),this.canvas_.style.position="absolute",this.canvas_.style.top=0,this.canvas_.style.left=0,this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=r.getContext(this.canvas_),this.hidden_ctx_=r.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new a(this);var t=this;if(this.mouseMoveHandler_=function(e){t.mouseMove_(e)},this.mouseOutHandler_=function(e){var n=e.target||e.fromElement,i=e.relatedTarget||e.toElement;r.isNodeContainedBy(n,t.graphDiv)&&!r.isNodeContainedBy(i,t.graphDiv)&&t.mouseOut_(e)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),!this.resizeHandler_){this.resizeHandler_=function(e){t.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_),this.resizeObserver_=null;var n=this.getStringOption("resizable");if("undefined"===typeof ResizeObserver&&"no"!==n&&(console.error("ResizeObserver unavailable; ignoring resizable property"),n="no"),"horizontal"===n||"vertical"===n||"both"===n?e.style.resize=n:"passive"!==n&&(n="no"),"no"!==n){window.getComputedStyle(e).overflow;"visible"===window.getComputedStyle(e).overflow&&(e.style.overflow="hidden"),this.resizeObserver_=new ResizeObserver(this.resizeHandler_),this.resizeObserver_.observe(e)}}},q.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px";var e=this.getNumericOption("pixelRatio"),t=e||r.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*t,this.canvas_.height=this.height_*t,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",1!==t&&this.canvas_ctx_.scale(t,t);var n=e||r.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*n,this.hidden_.height=this.height_*n,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px",1!==n&&this.hidden_ctx_.scale(n,n)},q.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var e=this.plugins_.length-1;e>=0;e--){var t=this.plugins_.pop();t.plugin.destroy&&t.plugin.destroy()}var n=function(e){for(;e.hasChildNodes();)n(e.firstChild),e.removeChild(e.firstChild)};this.removeTrackedEvents_(),r.removeEvent(window,"mouseout",this.mouseOutHandler_),r.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeObserver_&&(this.resizeObserver_.disconnect(),this.resizeObserver_=null),r.removeEvent(window,"resize",this.resizeHandler_),this.resizeHandler_=null,n(this.maindiv_);var i=function(e){for(var t in e)"object"===typeof e[t]&&(e[t]=null)};i(this.layout_),i(this.plotter_),i(this)},q.prototype.createPlotKitCanvas_=function(e){var t=r.createCanvas();return t.style.position="absolute",t.style.top=e.style.top,t.style.left=e.style.left,t.width=this.width_,t.height=this.height_,t.style.width=this.width_+"px",t.style.height=this.height_+"px",t},q.prototype.createMouseEventElement_=function(){return this.canvas_},q.prototype.setColors_=function(){var e=this.getLabels(),t=e.length-1;this.colors_=[],this.colorsMap_={};for(var n=this.getNumericOption("colorSaturation")||1,i=this.getNumericOption("colorValue")||.5,a=Math.ceil(t/2),o=this.getOption("colors"),s=this.visibility(),l=0;l{e.valueRange&&delete e.valueRange})),this.drawGraph_(),void(o&&o.call(this,r,i,this.yAxisRanges()));var s=null,l=null,c=null,u=null;e&&(s=this.xAxisRange(),l=[r,i]),t&&(c=this.yAxisRanges(),u=this.yAxisExtremes());const d=this;this.doAnimatedZoom(s,l,c,u,(function(){d.dateWindow_=null,d.axes_.forEach((e=>{e.valueRange&&delete e.valueRange})),o&&o.call(d,r,i,d.yAxisRanges())}))},q.prototype.doAnimatedZoom=function(e,t,n,i,a){var o,s,l=this.getBooleanOption("animatedZooms")?q.ANIMATION_STEPS:1,c=[],u=[];if(null!==e&&null!==t)for(o=1;o<=l;o++)s=q.zoomAnimationFunction(o,l),c[o-1]=[e[0]*(1-s)+s*t[0],e[1]*(1-s)+s*t[1]];if(null!==n&&null!==i)for(o=1;o<=l;o++){s=q.zoomAnimationFunction(o,l);for(var d=[],h=0;h=0;--d)for(var h=this.layout_.points[d],f=0;f=l.length)){var c=l[s];if(r.isValidPoint(c)){var u=c.canvasy;if(e>c.canvasx&&s+10)u+=(e-c.canvasx)/h*(d.canvasy-c.canvasy)}else if(e0){var h,f=l[s-1];if(r.isValidPoint(f))if((h=c.canvasx-f.canvasx)>0)u+=(c.canvasx-e)/h*(f.canvasy-c.canvasy)}(0===o||u=0){var o=0,s=this.attr_("labels");for(t=1;to&&(o=l)}var c=this.previousVerticalX_;n.clearRect(c-o-1,0,2*o+2,this.height_)}if(this.selPoints_.length>0){var u=this.selPoints_[0].canvasx;for(n.save(),t=0;t=0){e!=this.lastRow_&&(i=!0),this.lastRow_=e;for(var a=0;a=0&&s=0&&(i=!0),this.lastRow_=-1;if(this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=null,void 0!==t&&(this.highlightSet_!==t&&(i=!0),this.highlightSet_=t),void 0!==n&&(this.lockedSet_=n),i&&(this.updateSelection_(void 0),r)){var u=this.getFunctionOption("highlightCallback");if(u){u.call(this,{},this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}}return i},q.prototype.mouseOut_=function(e){this.getFunctionOption("unhighlightCallback")&&this.getFunctionOption("unhighlightCallback").call(this,e),this.getBooleanOption("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},q.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=null,this.lastRow_=-1,this.highlightSet_=null)},q.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var e=0;e1&&(n=this.dataHandler_.rollingAverage(n,this.rollPeriod_,this.attributes_,t)),this.rolledSeries_.push(n)}this.drawGraph_();var r=new Date;this.drawingTimeMs_=r-e},q.PointType=void 0,q.stackPoints_=function(e,t,n,r){for(var i=null,a=null,o=null,s=-1,l=function(t){if(!(s>=t))for(var n=t;nn[1]&&(n[1]=f),f=1;n--)if(this.visibility()[n-1]){if(t){s=e[n];var h=t[0],f=t[1];for(i=null,a=null,r=0;r=h&&null===i&&(i=r),s[r][0]<=f&&(a=r);null===i&&(i=0);for(var p=i,g=!0;g&&p>0;)g=null===s[--p][1];null===a&&(a=s.length-1);var v=a;for(g=!0;g&&v0;){this.readyFns_.pop()(this)}},q.prototype.computeYAxes_=function(){var e,t,n;for(this.axes_=[],e=0;e0&&(v=0),y<0&&(y=0)),v==1/0&&(v=0),y==-1/0&&(y=1),0===(n=y-v)&&(0!==y?n=Math.abs(y):(y=1,n=1));var b=y,_=v;t&&(d?(b=y+a*n,_=v):((_=v-a*n)<0&&v>=0&&(_=0),(b=y+a*n)>0&&y<=0&&(b=0))),u.extremeRange=[_,b]}if(u.valueRange){var x=s(u.valueRange[0])?u.extremeRange[0]:u.valueRange[0],w=s(u.valueRange[1])?u.extremeRange[1]:u.valueRange[1];u.computedValueRange=[x,w]}else u.computedValueRange=u.extremeRange;if(!t){if((x=u.computedValueRange[0])===(w=u.computedValueRange[1]))if(0===x)w=1;else{var S=Math.abs(x/10);x-=S,w+=S}if(d){var C=a/(2*a-1),O=(a-1)/(2*a-1);u.computedValueRange[0]=r.logRangeFraction(x,w,C),u.computedValueRange[1]=r.logRangeFraction(x,w,O)}else n=w-x,u.computedValueRange[0]=x-n*a,u.computedValueRange[1]=w+n*a}if(f){u.independentTicks=f;var A=(k=this.optionsViewForAxis_("y"+(c?"2":"")))("ticker");u.ticks=A(u.computedValueRange[0],u.computedValueRange[1],this.plotter_.area.h,k,this),o||(o=u)}}if(void 0===o)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(c=0;c0&&"e"!=e[n-1]&&"E"!=e[n-1]||e.indexOf("/")>=0||isNaN(parseFloat(e)))&&(t=!0),this.setXAxisOptions_(t)},q.prototype.setXAxisOptions_=function(e){e?(this.attrs_.xValueParser=r.dateParser,this.attrs_.axes.x.valueFormatter=r.dateValueFormatter,this.attrs_.axes.x.ticker=l.cc,this.attrs_.axes.x.axisLabelFormatter=r.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.Dv,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},q.prototype.parseCSV_=function(e){var t,n,i=[],a=r.detectLineDelimiter(e),o=e.split(a||"\n"),s=this.getStringOption("delimiter");-1==o[0].indexOf(s)&&o[0].indexOf("\t")>=0&&(s="\t");var l=0;"labels"in this.user_attrs_||(l=1,this.attrs_.labels=o[0].split(s),this.attributes_.reparseSeries());for(var c,u=!1,d=this.attr_("labels").length,h=!1,f=l;f0&&v[0]0;)t=String.fromCharCode(65+(e-1)%26)+t.toLowerCase(),e=Math.floor((e-1)/26);return t},n=e.getNumberOfColumns(),i=e.getNumberOfRows(),a=e.getColumnType(0);if("date"==a||"datetime"==a)this.attrs_.xValueParser=r.dateParser,this.attrs_.axes.x.valueFormatter=r.dateValueFormatter,this.attrs_.axes.x.ticker=l.cc,this.attrs_.axes.x.axisLabelFormatter=r.dateAxisLabelFormatter;else{if("number"!=a)throw new Error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.Dv,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var o,s,c=[],u={},d=!1;for(o=1;o0&&m[0]0&&this.setAnnotations(y,!0),this.attributes_.reparseSeries()},q.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_("dataDidUpdate",{})},q.prototype.start_=function(){var e=this.file_;"function"==typeof e&&(e=e());const t=r.typeArrayLike(e);if("array"==t)this.rawData_=this.parseArray_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("object"==t&&"function"==typeof e.getColumnRange)this.parseDataTable_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("string"==t){if(r.detectLineDelimiter(e))this.loadedEvent_(e);else{var n;n=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var i=this;n.onreadystatechange=function(){4==n.readyState&&(200!==n.status&&0!==n.status||i.loadedEvent_(n.responseText))},n.open("GET",e,!0),n.send(null)}}else console.error("Unknown data format: "+t)},q.prototype.updateOptions=function(e,t){"undefined"==typeof t&&(t=!1);var n=e.file,i=q.copyUserAttrs_(e),a=this.attributes_.numAxes();"rollPeriod"in i&&(this.rollPeriod_=i.rollPeriod),"dateWindow"in i&&(this.dateWindow_=i.dateWindow);var o=r.isPixelChangingOptionList(this.attr_("labels"),i);r.updateDeep(this.user_attrs_,i),this.attributes_.reparseSeries(),a=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]);else for(i=0;i=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]:e[i]<0||e[i]>=n.length?console.warn("Invalid series number in setVisibility: "+e[i]):n[e[i]]=t;this.predraw_()},q.prototype.size=function(){return{width:this.width_,height:this.height_}},q.prototype.setAnnotations=function(e,t){this.annotations_=e,this.layout_?(this.layout_.setAnnotations(this.annotations_),t||this.predraw_()):console.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},q.prototype.annotations=function(){return this.annotations_},q.prototype.getLabels=function(){var e=this.attr_("labels");return e?e.slice():null},q.prototype.indexFromSetName=function(e){return this.setIndexByName_[e]},q.prototype.getRowForX=function(e){for(var t=0,n=this.numRows()-1;t<=n;){var r=n+t>>1,i=this.getValue(r,0);if(ie)n=r-1;else{if(t==r)return r;n=r}}return null},q.prototype.ready=function(e){this.is_initial_draw_?this.readyFns_.push(e):e.call(this,this)},q.prototype.addAndTrackEvent=function(e,t,n){r.addEvent(e,t,n),this.registeredEvents_.push({elem:e,type:t,fn:n})},q.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var e=0;ee.y&&l>t.y?(l=Math.max(e.y,t.y),u=2*t.y-l):lt.y&&u>n.y?(u=Math.max(t.y,n.y),l=2*t.y-u):u1&&(a=window.devicePixelRatio,r.style.width=r.style.height=[t.size,"px"].join(""),r.width=r.height=t.size*a,i.scale(a,a)),i.translate(t.size/2,t.size/2),i.rotate((t.rotate/180-.5)*Math.PI);var o=(t.size-t.lineWidth)/2;t.scaleColor&&t.scaleLength&&(o-=t.scaleLength+2),Date.now=Date.now||function(){return+new Date};var s=function(e,t,n){var r=(n=Math.min(Math.max(-1,n||0),1))<=0;i.beginPath(),i.arc(0,0,o,0,2*Math.PI*n,r),i.strokeStyle=e,i.lineWidth=t,i.stroke()},l=function(){var e,n;i.lineWidth=1,i.fillStyle=t.scaleColor,i.save();for(var r=24;r>0;--r)r%6===0?(n=t.scaleLength,e=0):(n=.6*t.scaleLength,e=t.scaleLength-n),i.fillRect(-t.size/2+e,0,n,1),i.rotate(Math.PI/12);i.restore()},c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},u=function(){t.scaleColor&&l(),t.trackColor&&s(t.trackColor,t.trackWidth||t.lineWidth,1)};this.getCanvas=function(){return r},this.getCtx=function(){return i},this.clear=function(){i.clearRect(t.size/-2,t.size/-2,t.size,t.size)},this.draw=function(e){var r;t.scaleColor||t.trackColor?i.getImageData&&i.putImageData?n?i.putImageData(n,0,0):(u(),n=i.getImageData(0,0,t.size*a,t.size*a)):(this.clear(),u()):this.clear(),i.lineCap=t.lineCap,r="function"===typeof t.barColor?t.barColor(e):t.barColor,s(r,t.lineWidth,e/100)}.bind(this),this.animate=function(e,n){var r=Date.now();t.onStart(e,n);var i=function(){var a=Math.min(Date.now()-r,t.animate.duration),o=t.easing(this,a,e,n-e,t.animate.duration);this.draw(o),t.onStep(e,n,o),a>=t.animate.duration?t.onStop(e,n):c(i)}.bind(this);c(i)}.bind(this)};return function(t,n){var r={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},onStart:function(e,t){},onStep:function(e,t,n){},onStop:function(e,t){}};if("undefined"!==typeof e)r.renderer=e;else{if("undefined"===typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");r.renderer=SVGRenderer}var i={},a=0,o=function(){for(var e in this.el=t,this.options=i,r)r.hasOwnProperty(e)&&(i[e]=n&&"undefined"!==typeof n[e]?n[e]:r[e],"function"===typeof i[e]&&(i[e]=i[e].bind(this)));"string"===typeof i.easing&&"undefined"!==typeof jQuery&&jQuery.isFunction(jQuery.easing[i.easing])?i.easing=jQuery.easing[i.easing]:i.easing=r.easing,"number"===typeof i.animate&&(i.animate={duration:i.animate,enabled:!0}),"boolean"!==typeof i.animate||i.animate||(i.animate={duration:1e3,enabled:i.animate}),this.renderer=new i.renderer(t,i),this.renderer.draw(a),t.dataset&&t.dataset.percent?this.update(parseFloat(t.dataset.percent)):t.getAttribute&&t.getAttribute("data-percent")&&this.update(parseFloat(t.getAttribute("data-percent")))}.bind(this);this.update=function(e){return e=parseFloat(e),i.animate.enabled?this.renderer.animate(a,e):this.renderer.draw(e),a=e,this}.bind(this),this.disableAnimation=function(){return i.animate.enabled=!1,this},this.enableAnimation=function(){return i.animate.enabled=!0,this},o()}}()}.apply(t,[]))||(e.exports=n)},92806:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a>1;if(t>0&&"number"!==typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:a,_hullHash:o}=this,l=e.length>>1;let d=1/0,h=1/0,f=-1/0,p=-1/0;for(let r=0;rf&&(f=t),n>p&&(p=n),this._ids[r]=r}const g=(d+f)/2,v=(h+p)/2;let y,m,b,_=1/0;for(let r=0;r0&&(m=r,_=t)}let S=e[2*m],C=e[2*m+1],O=1/0;for(let r=0;rr&&(t[n++]=i,r=this._dists[i])}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if((0,r.IW)(x,w,S,C,A,k)<0){const e=m,t=S,n=C;m=b,S=A,C=k,b=e,A=t,k=n}const T=function(e,t,n,r,i,a){const o=n-e,s=r-t,l=i-e,c=a-t,u=o*o+s*s,d=l*l+c*c,h=.5/(o*c-s*l);return{x:e+(c*u-s*d)*h,y:t+(o*d-l*u)*h}}(x,w,S,C,A,k);this._cx=T.x,this._cy=T.y;for(let r=0;r0&&Math.abs(d-s)<=i&&Math.abs(h-c)<=i)continue;if(s=d,c=h,l===y||l===m||l===b)continue;let f=0;for(let e=0,t=this._hashKey(d,h);e=0;)if(g=p,g===f){g=-1;break}if(-1===g)continue;let v=this._addTriangle(g,l,n[g],-1,-1,a[g]);a[l]=this._legalize(v+2),a[g]=v,D++;let _=n[g];for(;p=n[_],(0,r.IW)(d,h,e[2*_],e[2*_+1],e[2*p],e[2*p+1])<0;)v=this._addTriangle(_,l,p,a[l],-1,a[_]),a[l]=this._legalize(v+2),n[_]=_,D--,_=p;if(g===f)for(;p=t[g],(0,r.IW)(d,h,e[2*p],e[2*p+1],e[2*g],e[2*g+1])<0;)v=this._addTriangle(p,l,g,-1,a[g],a[p]),this._legalize(v+2),a[p]=v,n[g]=g,D--,g=p;this._hullStart=t[l]=g,n[g]=t[_]=l,n[l]=_,o[this._hashKey(d,h)]=l,o[this._hashKey(e[2*g],e[2*g+1])]=g}this.hull=new Uint32Array(D);for(let r=0,i=this._hullStart;r0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[e],c=e-e%3;if(o=c+(e+2)%3,-1===s){if(0===i)break;e=a[--i];continue}const u=s-s%3,d=c+(e+1)%3,h=u+(s+2)%3,f=t[o],p=t[e],g=t[d],v=t[h];if(l(r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*g],r[2*g+1],r[2*v],r[2*v+1])){t[e]=v,t[s]=f;const r=n[h];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===h){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(s,n[o]),this._link(o,h);const l=u+(s+1)%3;i=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+1,a=r;d(e,n+r>>1,i),t[e[n]]>t[e[r]]&&d(e,n,r),t[e[i]]>t[e[r]]&&d(e,i,r),t[e[n]]>t[e[i]]&&d(e,n,i);const o=e[i],s=t[o];for(;;){do{i++}while(t[e[i]]s);if(a=a-n?(u(e,t,i,r),u(e,t,n,a-1)):(u(e,t,n,a-1),u(e,t,i,r))}}function d(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function h(e){return e[0]}function f(e){return e[1]}}}]);