From 6d4f55639bc0c5d3ea7ccb39b934f50c45ac39b5 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Wed, 13 May 2026 14:39:11 +0100 Subject: [PATCH] update to new build: Utilisation Dashboard beta 2 Co-Authored-By: Claude Sonnet 4.6 --- assets/index-BTRMw9pS.js | 332 ++++++++++++++++++++++++++++++++++++++ assets/index-DtJOecoO.css | 1 + index.html | 4 +- 3 files changed, 335 insertions(+), 2 deletions(-) create mode 100644 assets/index-BTRMw9pS.js create mode 100644 assets/index-DtJOecoO.css diff --git a/assets/index-BTRMw9pS.js b/assets/index-BTRMw9pS.js new file mode 100644 index 0000000..8b8ffcd --- /dev/null +++ b/assets/index-BTRMw9pS.js @@ -0,0 +1,332 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var O0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dm={exports:{}},Ic={},Fm={exports:{}},Et={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var LS;function VM(){if(LS)return Et;LS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator;function x(K){return K===null||typeof K!="object"?null:(K=p&&K[p]||K["@@iterator"],typeof K=="function"?K:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function g(K,C,re){this.props=K,this.context=C,this.refs=b,this.updater=re||v}g.prototype.isReactComponent={},g.prototype.setState=function(K,C){if(typeof K!="object"&&typeof K!="function"&&K!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,K,C,"setState")},g.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function k(){}k.prototype=g.prototype;function A(K,C,re){this.props=K,this.context=C,this.refs=b,this.updater=re||v}var S=A.prototype=new k;S.constructor=A,w(S,g.prototype),S.isPureReactComponent=!0;var N=Array.isArray,T=Object.prototype.hasOwnProperty,E={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function D(K,C,re){var F,R={},Y=null,fe=null;if(C!=null)for(F in C.ref!==void 0&&(fe=C.ref),C.key!==void 0&&(Y=""+C.key),C)T.call(C,F)&&!j.hasOwnProperty(F)&&(R[F]=C[F]);var ce=arguments.length-2;if(ce===1)R.children=re;else if(1>>1,C=oe[K];if(0>>1;Ka(R,ie))Ya(fe,R)?(oe[K]=fe,oe[Y]=ie,K=Y):(oe[K]=R,oe[F]=ie,K=F);else if(Ya(fe,ie))oe[K]=fe,oe[Y]=ie,K=Y;else break e}}return z}function a(oe,z){var ie=oe.sortIndex-z.sortIndex;return ie!==0?ie:oe.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],f=[],d=1,p=null,x=3,v=!1,w=!1,b=!1,g=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(oe){for(var z=r(f);z!==null;){if(z.callback===null)n(f);else if(z.startTime<=oe)n(f),z.sortIndex=z.expirationTime,t(u,z);else break;z=r(f)}}function N(oe){if(b=!1,S(oe),!w)if(r(u)!==null)w=!0,ne(T);else{var z=r(f);z!==null&&te(N,z.startTime-oe)}}function T(oe,z){w=!1,b&&(b=!1,k(D),D=-1),v=!0;var ie=x;try{for(S(z),p=r(u);p!==null&&(!(p.expirationTime>z)||oe&&!U());){var K=p.callback;if(typeof K=="function"){p.callback=null,x=p.priorityLevel;var C=K(p.expirationTime<=z);z=e.unstable_now(),typeof C=="function"?p.callback=C:p===r(u)&&n(u),S(z)}else n(u);p=r(u)}if(p!==null)var re=!0;else{var F=r(f);F!==null&&te(N,F.startTime-z),re=!1}return re}finally{p=null,x=ie,v=!1}}var E=!1,j=null,D=-1,P=5,H=-1;function U(){return!(e.unstable_now()-Hoe||125K?(oe.sortIndex=ie,t(f,oe),r(u)===null&&oe===r(f)&&(b?(k(D),D=-1):b=!0,te(N,ie-K))):(oe.sortIndex=C,t(u,oe),w||v||(w=!0,ne(T))),oe},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(oe){var z=x;return function(){var ie=x;x=z;try{return oe.apply(this,arguments)}finally{x=ie}}}})(Rm)),Rm}var WS;function YM(){return WS||(WS=1,Im.exports=XM()),Im.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var HS;function ZM(){if(HS)return Cn;HS=1;var e=Bb(),t=YM();function r(o){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+o,m=1;m"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function x(o){return u.call(p,o)?!0:u.call(d,o)?!1:f.test(o)?p[o]=!0:(d[o]=!0,!1)}function v(o,c,m,y){if(m!==null&&m.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return y?!1:m!==null?!m.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function w(o,c,m,y){if(c===null||typeof c>"u"||v(o,c,m,y))return!0;if(y)return!1;if(m!==null)switch(m.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function b(o,c,m,y,_,O,L){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=y,this.attributeNamespace=_,this.mustUseProperty=m,this.propertyName=o,this.type=c,this.sanitizeURL=O,this.removeEmptyString=L}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){g[o]=new b(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var c=o[0];g[c]=new b(c,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){g[o]=new b(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){g[o]=new b(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){g[o]=new b(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){g[o]=new b(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){g[o]=new b(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){g[o]=new b(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){g[o]=new b(o,5,!1,o.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function A(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var c=o.replace(k,A);g[c]=new b(c,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var c=o.replace(k,A);g[c]=new b(c,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var c=o.replace(k,A);g[c]=new b(c,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){g[o]=new b(o,1,!1,o.toLowerCase(),null,!1,!1)}),g.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){g[o]=new b(o,1,!1,o.toLowerCase(),null,!0,!0)});function S(o,c,m,y){var _=g.hasOwnProperty(c)?g[c]:null;(_!==null?_.type!==0:y||!(2ae||_[L]!==O[ae]){var de=` +`+_[L].replace(" at new "," at ");return o.displayName&&de.includes("")&&(de=de.replace("",o.displayName)),de}while(1<=L&&0<=ae);break}}}finally{re=!1,Error.prepareStackTrace=m}return(o=o?o.displayName||o.name:"")?C(o):""}function R(o){switch(o.tag){case 5:return C(o.type);case 16:return C("Lazy");case 13:return C("Suspense");case 19:return C("SuspenseList");case 0:case 2:case 15:return o=F(o.type,!1),o;case 11:return o=F(o.type.render,!1),o;case 1:return o=F(o.type,!0),o;default:return""}}function Y(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case j:return"Fragment";case E:return"Portal";case P:return"Profiler";case D:return"StrictMode";case V:return"Suspense";case W:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case U:return(o.displayName||"Context")+".Consumer";case H:return(o._context.displayName||"Context")+".Provider";case B:var c=o.render;return o=o.displayName,o||(o=c.displayName||c.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case G:return c=o.displayName||null,c!==null?c:Y(o.type)||"Memo";case ne:c=o._payload,o=o._init;try{return Y(o(c))}catch{}}return null}function fe(o){var c=o.type;switch(o.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=c.render,o=o.displayName||o.name||"",c.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(c);case 8:return c===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function ce(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function se(o){var c=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function he(o){var c=se(o)?"checked":"value",m=Object.getOwnPropertyDescriptor(o.constructor.prototype,c),y=""+o[c];if(!o.hasOwnProperty(c)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var _=m.get,O=m.set;return Object.defineProperty(o,c,{configurable:!0,get:function(){return _.call(this)},set:function(L){y=""+L,O.call(this,L)}}),Object.defineProperty(o,c,{enumerable:m.enumerable}),{getValue:function(){return y},setValue:function(L){y=""+L},stopTracking:function(){o._valueTracker=null,delete o[c]}}}}function Ce(o){o._valueTracker||(o._valueTracker=he(o))}function I(o){if(!o)return!1;var c=o._valueTracker;if(!c)return!0;var m=c.getValue(),y="";return o&&(y=se(o)?o.checked?"true":"false":o.value),o=y,o!==m?(c.setValue(o),!0):!1}function qe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Ne(o,c){var m=c.checked;return ie({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??o._wrapperState.initialChecked})}function De(o,c){var m=c.defaultValue==null?"":c.defaultValue,y=c.checked!=null?c.checked:c.defaultChecked;m=ce(c.value!=null?c.value:m),o._wrapperState={initialChecked:y,initialValue:m,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function Fe(o,c){c=c.checked,c!=null&&S(o,"checked",c,!1)}function Se(o,c){Fe(o,c);var m=ce(c.value),y=c.type;if(m!=null)y==="number"?(m===0&&o.value===""||o.value!=m)&&(o.value=""+m):o.value!==""+m&&(o.value=""+m);else if(y==="submit"||y==="reset"){o.removeAttribute("value");return}c.hasOwnProperty("value")?pt(o,c.type,m):c.hasOwnProperty("defaultValue")&&pt(o,c.type,ce(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(o.defaultChecked=!!c.defaultChecked)}function Je(o,c,m){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var y=c.type;if(!(y!=="submit"&&y!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+o._wrapperState.initialValue,m||c===o.value||(o.value=c),o.defaultValue=c}m=o.name,m!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,m!==""&&(o.name=m)}function pt(o,c,m){(c!=="number"||qe(o.ownerDocument)!==o)&&(m==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+m&&(o.defaultValue=""+m))}var Ge=Array.isArray;function ut(o,c,m,y){if(o=o.options,c){c={};for(var _=0;_"+c.valueOf().toString()+"",c=qt.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;c.firstChild;)o.appendChild(c.firstChild)}});function ot(o,c){if(c){var m=o.firstChild;if(m&&m===o.lastChild&&m.nodeType===3){m.nodeValue=c;return}}o.textContent=c}var At={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},er=["Webkit","ms","Moz","O"];Object.keys(At).forEach(function(o){er.forEach(function(c){c=c+o.charAt(0).toUpperCase()+o.substring(1),At[c]=At[o]})});function Bt(o,c,m){return c==null||typeof c=="boolean"||c===""?"":m||typeof c!="number"||c===0||At.hasOwnProperty(o)&&At[o]?(""+c).trim():c+"px"}function vn(o,c){o=o.style;for(var m in c)if(c.hasOwnProperty(m)){var y=m.indexOf("--")===0,_=Bt(m,c[m],y);m==="float"&&(m="cssFloat"),y?o.setProperty(m,_):o[m]=_}}var Ia=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Es(o,c){if(c){if(Ia[o]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(r(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(r(61))}if(c.style!=null&&typeof c.style!="object")throw Error(r(62))}}function js(o,c){if(o.indexOf("-")===-1)return typeof c.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ci=null;function ri(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ni=null,le=null,me=null;function ke(o){if(o=wc(o)){if(typeof ni!="function")throw Error(r(280));var c=o.stateNode;c&&(c=Hf(c),ni(o.stateNode,o.type,c))}}function Te(o){le?me?me.push(o):me=[o]:le=o}function ze(){if(le){var o=le,c=me;if(me=le=null,ke(o),c)for(o=0;o>>=0,o===0?32:31-(lF(o)/cF|0)|0}var Af=64,Ef=4194304;function nc(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function jf(o,c){var m=o.pendingLanes;if(m===0)return 0;var y=0,_=o.suspendedLanes,O=o.pingedLanes,L=m&268435455;if(L!==0){var ae=L&~_;ae!==0?y=nc(ae):(O&=L,O!==0&&(y=nc(O)))}else L=m&~_,L!==0?y=nc(L):O!==0&&(y=nc(O));if(y===0)return 0;if(c!==0&&c!==y&&(c&_)===0&&(_=y&-y,O=c&-c,_>=O||_===16&&(O&4194240)!==0))return c;if((y&4)!==0&&(y|=m&16),c=o.entangledLanes,c!==0)for(o=o.entanglements,c&=y;0m;m++)c.push(o);return c}function ac(o,c,m){o.pendingLanes|=c,c!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,c=31-mr(c),o[c]=m}function hF(o,c){var m=o.pendingLanes&~c;o.pendingLanes=c,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=c,o.mutableReadLanes&=c,o.entangledLanes&=c,c=o.entanglements;var y=o.eventTimes;for(o=o.expirationTimes;0=dc),P2=" ",C2=!1;function D2(o,c){switch(o){case"keyup":return UF.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F2(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Oo=!1;function WF(o,c){switch(o){case"compositionend":return F2(c);case"keypress":return c.which!==32?null:(C2=!0,P2);case"textInput":return o=c.data,o===P2&&C2?null:o;default:return null}}function HF(o,c){if(Oo)return o==="compositionend"||!hp&&D2(o,c)?(o=T2(),Df=op=Li=null,Oo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1=c)return{node:m,offset:c-o};o=y}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=U2(m)}}function W2(o,c){return o&&c?o===c?!0:o&&o.nodeType===3?!1:c&&c.nodeType===3?W2(o,c.parentNode):"contains"in o?o.contains(c):o.compareDocumentPosition?!!(o.compareDocumentPosition(c)&16):!1:!1}function H2(){for(var o=window,c=qe();c instanceof o.HTMLIFrameElement;){try{var m=typeof c.contentWindow.location.href=="string"}catch{m=!1}if(m)o=c.contentWindow;else break;c=qe(o.document)}return c}function xp(o){var c=o&&o.nodeName&&o.nodeName.toLowerCase();return c&&(c==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||c==="textarea"||o.contentEditable==="true")}function QF(o){var c=H2(),m=o.focusedElem,y=o.selectionRange;if(c!==m&&m&&m.ownerDocument&&W2(m.ownerDocument.documentElement,m)){if(y!==null&&xp(m)){if(c=y.start,o=y.end,o===void 0&&(o=c),"selectionStart"in m)m.selectionStart=c,m.selectionEnd=Math.min(o,m.value.length);else if(o=(c=m.ownerDocument||document)&&c.defaultView||window,o.getSelection){o=o.getSelection();var _=m.textContent.length,O=Math.min(y.start,_);y=y.end===void 0?O:Math.min(y.end,_),!o.extend&&O>y&&(_=y,y=O,O=_),_=z2(m,O);var L=z2(m,y);_&&L&&(o.rangeCount!==1||o.anchorNode!==_.node||o.anchorOffset!==_.offset||o.focusNode!==L.node||o.focusOffset!==L.offset)&&(c=c.createRange(),c.setStart(_.node,_.offset),o.removeAllRanges(),O>y?(o.addRange(c),o.extend(L.node,L.offset)):(c.setEnd(L.node,L.offset),o.addRange(c)))}}for(c=[],o=m;o=o.parentNode;)o.nodeType===1&&c.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m=document.documentMode,No=null,vp=null,xc=null,gp=!1;function q2(o,c,m){var y=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;gp||No==null||No!==qe(y)||(y=No,"selectionStart"in y&&xp(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),xc&&mc(xc,y)||(xc=y,y=Uf(vp,"onSelect"),0Mo||(o.current=Np[Mo],Np[Mo]=null,Mo--)}function Yt(o,c){Mo++,Np[Mo]=o.current,o.current=c}var zi={},rn=Ui(zi),En=Ui(!1),Ps=zi;function Io(o,c){var m=o.type.contextTypes;if(!m)return zi;var y=o.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var _={},O;for(O in m)_[O]=c[O];return y&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=c,o.__reactInternalMemoizedMaskedChildContext=_),_}function jn(o){return o=o.childContextTypes,o!=null}function qf(){rr(En),rr(rn)}function s_(o,c,m){if(rn.current!==zi)throw Error(r(168));Yt(rn,c),Yt(En,m)}function o_(o,c,m){var y=o.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return m;y=y.getChildContext();for(var _ in y)if(!(_ in c))throw Error(r(108,fe(o)||"Unknown",_));return ie({},m,y)}function Vf(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||zi,Ps=rn.current,Yt(rn,o),Yt(En,En.current),!0}function l_(o,c,m){var y=o.stateNode;if(!y)throw Error(r(169));m?(o=o_(o,c,Ps),y.__reactInternalMemoizedMergedChildContext=o,rr(En),rr(rn),Yt(rn,o)):rr(En),Yt(En,m)}var ii=null,Kf=!1,Pp=!1;function c_(o){ii===null?ii=[o]:ii.push(o)}function fM(o){Kf=!0,c_(o)}function Wi(){if(!Pp&&ii!==null){Pp=!0;var o=0,c=Wt;try{var m=ii;for(Wt=1;o>=L,_-=L,si=1<<32-mr(c)+_|m<<_|y,oi=O+o}else si=1<xt?(Ur=dt,dt=null):Ur=dt.sibling;var It=Ie(ve,dt,ye[xt],He);if(It===null){dt===null&&(dt=Ur);break}o&&dt&&It.alternate===null&&c(ve,dt),pe=O(It,pe,xt),ft===null?st=It:ft.sibling=It,ft=It,dt=Ur}if(xt===ye.length)return m(ve,dt),ar&&Ds(ve,xt),st;if(dt===null){for(;xtxt?(Ur=dt,dt=null):Ur=dt.sibling;var Ji=Ie(ve,dt,It.value,He);if(Ji===null){dt===null&&(dt=Ur);break}o&&dt&&Ji.alternate===null&&c(ve,dt),pe=O(Ji,pe,xt),ft===null?st=Ji:ft.sibling=Ji,ft=Ji,dt=Ur}if(It.done)return m(ve,dt),ar&&Ds(ve,xt),st;if(dt===null){for(;!It.done;xt++,It=ye.next())It=$e(ve,It.value,He),It!==null&&(pe=O(It,pe,xt),ft===null?st=It:ft.sibling=It,ft=It);return ar&&Ds(ve,xt),st}for(dt=y(ve,dt);!It.done;xt++,It=ye.next())It=Xe(dt,ve,xt,It.value,He),It!==null&&(o&&It.alternate!==null&&dt.delete(It.key===null?xt:It.key),pe=O(It,pe,xt),ft===null?st=It:ft.sibling=It,ft=It);return o&&dt.forEach(function(qM){return c(ve,qM)}),ar&&Ds(ve,xt),st}function xr(ve,pe,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===j&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case T:e:{for(var st=ye.key,ft=pe;ft!==null;){if(ft.key===st){if(st=ye.type,st===j){if(ft.tag===7){m(ve,ft.sibling),pe=_(ft,ye.props.children),pe.return=ve,ve=pe;break e}}else if(ft.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===ne&&m_(st)===ft.type){m(ve,ft.sibling),pe=_(ft,ye.props),pe.ref=_c(ve,ft,ye),pe.return=ve,ve=pe;break e}m(ve,ft);break}else c(ve,ft);ft=ft.sibling}ye.type===j?(pe=Us(ye.props.children,ve.mode,He,ye.key),pe.return=ve,ve=pe):(He=w0(ye.type,ye.key,ye.props,null,ve.mode,He),He.ref=_c(ve,pe,ye),He.return=ve,ve=He)}return L(ve);case E:e:{for(ft=ye.key;pe!==null;){if(pe.key===ft)if(pe.tag===4&&pe.stateNode.containerInfo===ye.containerInfo&&pe.stateNode.implementation===ye.implementation){m(ve,pe.sibling),pe=_(pe,ye.children||[]),pe.return=ve,ve=pe;break e}else{m(ve,pe);break}else c(ve,pe);pe=pe.sibling}pe=jm(ye,ve.mode,He),pe.return=ve,ve=pe}return L(ve);case ne:return ft=ye._init,xr(ve,pe,ft(ye._payload),He)}if(Ge(ye))return nt(ve,pe,ye,He);if(z(ye))return at(ve,pe,ye,He);Zf(ve,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,pe!==null&&pe.tag===6?(m(ve,pe.sibling),pe=_(pe,ye),pe.return=ve,ve=pe):(m(ve,pe),pe=Em(ye,ve.mode,He),pe.return=ve,ve=pe),L(ve)):m(ve,pe)}return xr}var $o=x_(!0),v_=x_(!1),Jf=Ui(null),Qf=null,Uo=null,Rp=null;function Lp(){Rp=Uo=Qf=null}function Bp(o){var c=Jf.current;rr(Jf),o._currentValue=c}function $p(o,c,m){for(;o!==null;){var y=o.alternate;if((o.childLanes&c)!==c?(o.childLanes|=c,y!==null&&(y.childLanes|=c)):y!==null&&(y.childLanes&c)!==c&&(y.childLanes|=c),o===m)break;o=o.return}}function zo(o,c){Qf=o,Rp=Uo=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&c)!==0&&(On=!0),o.firstContext=null)}function ea(o){var c=o._currentValue;if(Rp!==o)if(o={context:o,memoizedValue:c,next:null},Uo===null){if(Qf===null)throw Error(r(308));Uo=o,Qf.dependencies={lanes:0,firstContext:o}}else Uo=Uo.next=o;return c}var Fs=null;function Up(o){Fs===null?Fs=[o]:Fs.push(o)}function g_(o,c,m,y){var _=c.interleaved;return _===null?(m.next=m,Up(c)):(m.next=_.next,_.next=m),c.interleaved=m,li(o,y)}function li(o,c){o.lanes|=c;var m=o.alternate;for(m!==null&&(m.lanes|=c),m=o,o=o.return;o!==null;)o.childLanes|=c,m=o.alternate,m!==null&&(m.childLanes|=c),m=o,o=o.return;return m.tag===3?m.stateNode:null}var Hi=!1;function zp(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y_(o,c){o=o.updateQueue,c.updateQueue===o&&(c.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function ci(o,c){return{eventTime:o,lane:c,tag:0,payload:null,callback:null,next:null}}function qi(o,c,m){var y=o.updateQueue;if(y===null)return null;if(y=y.shared,(Ft&2)!==0){var _=y.pending;return _===null?c.next=c:(c.next=_.next,_.next=c),y.pending=c,li(o,m)}return _=y.interleaved,_===null?(c.next=c,Up(y)):(c.next=_.next,_.next=c),y.interleaved=c,li(o,m)}function e0(o,c,m){if(c=c.updateQueue,c!==null&&(c=c.shared,(m&4194240)!==0)){var y=c.lanes;y&=o.pendingLanes,m|=y,c.lanes=m,rp(o,m)}}function b_(o,c){var m=o.updateQueue,y=o.alternate;if(y!==null&&(y=y.updateQueue,m===y)){var _=null,O=null;if(m=m.firstBaseUpdate,m!==null){do{var L={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};O===null?_=O=L:O=O.next=L,m=m.next}while(m!==null);O===null?_=O=c:O=O.next=c}else _=O=c;m={baseState:y.baseState,firstBaseUpdate:_,lastBaseUpdate:O,shared:y.shared,effects:y.effects},o.updateQueue=m;return}o=m.lastBaseUpdate,o===null?m.firstBaseUpdate=c:o.next=c,m.lastBaseUpdate=c}function t0(o,c,m,y){var _=o.updateQueue;Hi=!1;var O=_.firstBaseUpdate,L=_.lastBaseUpdate,ae=_.shared.pending;if(ae!==null){_.shared.pending=null;var de=ae,_e=de.next;de.next=null,L===null?O=_e:L.next=_e,L=de;var Re=o.alternate;Re!==null&&(Re=Re.updateQueue,ae=Re.lastBaseUpdate,ae!==L&&(ae===null?Re.firstBaseUpdate=_e:ae.next=_e,Re.lastBaseUpdate=de))}if(O!==null){var $e=_.baseState;L=0,Re=_e=de=null,ae=O;do{var Ie=ae.lane,Xe=ae.eventTime;if((y&Ie)===Ie){Re!==null&&(Re=Re.next={eventTime:Xe,lane:0,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null});e:{var nt=o,at=ae;switch(Ie=c,Xe=m,at.tag){case 1:if(nt=at.payload,typeof nt=="function"){$e=nt.call(Xe,$e,Ie);break e}$e=nt;break e;case 3:nt.flags=nt.flags&-65537|128;case 0:if(nt=at.payload,Ie=typeof nt=="function"?nt.call(Xe,$e,Ie):nt,Ie==null)break e;$e=ie({},$e,Ie);break e;case 2:Hi=!0}}ae.callback!==null&&ae.lane!==0&&(o.flags|=64,Ie=_.effects,Ie===null?_.effects=[ae]:Ie.push(ae))}else Xe={eventTime:Xe,lane:Ie,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null},Re===null?(_e=Re=Xe,de=$e):Re=Re.next=Xe,L|=Ie;if(ae=ae.next,ae===null){if(ae=_.shared.pending,ae===null)break;Ie=ae,ae=Ie.next,Ie.next=null,_.lastBaseUpdate=Ie,_.shared.pending=null}}while(!0);if(Re===null&&(de=$e),_.baseState=de,_.firstBaseUpdate=_e,_.lastBaseUpdate=Re,c=_.shared.interleaved,c!==null){_=c;do L|=_.lane,_=_.next;while(_!==c)}else O===null&&(_.shared.lanes=0);Rs|=L,o.lanes=L,o.memoizedState=$e}}function w_(o,c,m){if(o=c.effects,c.effects=null,o!==null)for(c=0;cm?m:4,o(!0);var y=Kp.transition;Kp.transition={};try{o(!1),c()}finally{Wt=m,Kp.transition=y}}function $_(){return ta().memoizedState}function mM(o,c,m){var y=Xi(o);if(m={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null},U_(o))z_(c,m);else if(m=g_(o,c,m,y),m!==null){var _=yn();_a(m,o,y,_),W_(m,c,y)}}function xM(o,c,m){var y=Xi(o),_={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null};if(U_(o))z_(c,_);else{var O=o.alternate;if(o.lanes===0&&(O===null||O.lanes===0)&&(O=c.lastRenderedReducer,O!==null))try{var L=c.lastRenderedState,ae=O(L,m);if(_.hasEagerState=!0,_.eagerState=ae,va(ae,L)){var de=c.interleaved;de===null?(_.next=_,Up(c)):(_.next=de.next,de.next=_),c.interleaved=_;return}}catch{}finally{}m=g_(o,c,_,y),m!==null&&(_=yn(),_a(m,o,y,_),W_(m,c,y))}}function U_(o){var c=o.alternate;return o===cr||c!==null&&c===cr}function z_(o,c){Ac=a0=!0;var m=o.pending;m===null?c.next=c:(c.next=m.next,m.next=c),o.pending=c}function W_(o,c,m){if((m&4194240)!==0){var y=c.lanes;y&=o.pendingLanes,m|=y,c.lanes=m,rp(o,m)}}var o0={readContext:ea,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useInsertionEffect:nn,useLayoutEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useMutableSource:nn,useSyncExternalStore:nn,useId:nn,unstable_isNewReconciler:!1},vM={readContext:ea,useCallback:function(o,c){return $a().memoizedState=[o,c===void 0?null:c],o},useContext:ea,useEffect:C_,useImperativeHandle:function(o,c,m){return m=m!=null?m.concat([o]):null,i0(4194308,4,M_.bind(null,c,o),m)},useLayoutEffect:function(o,c){return i0(4194308,4,o,c)},useInsertionEffect:function(o,c){return i0(4,2,o,c)},useMemo:function(o,c){var m=$a();return c=c===void 0?null:c,o=o(),m.memoizedState=[o,c],o},useReducer:function(o,c,m){var y=$a();return c=m!==void 0?m(c):c,y.memoizedState=y.baseState=c,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:c},y.queue=o,o=o.dispatch=mM.bind(null,cr,o),[y.memoizedState,o]},useRef:function(o){var c=$a();return o={current:o},c.memoizedState=o},useState:N_,useDebugValue:em,useDeferredValue:function(o){return $a().memoizedState=o},useTransition:function(){var o=N_(!1),c=o[0];return o=pM.bind(null,o[1]),$a().memoizedState=o,[c,o]},useMutableSource:function(){},useSyncExternalStore:function(o,c,m){var y=cr,_=$a();if(ar){if(m===void 0)throw Error(r(407));m=m()}else{if(m=c(),$r===null)throw Error(r(349));(Is&30)!==0||T_(y,c,m)}_.memoizedState=m;var O={value:m,getSnapshot:c};return _.queue=O,C_(E_.bind(null,y,O,o),[o]),y.flags|=2048,Oc(9,A_.bind(null,y,O,m,c),void 0,null),m},useId:function(){var o=$a(),c=$r.identifierPrefix;if(ar){var m=oi,y=si;m=(y&~(1<<32-mr(y)-1)).toString(32)+m,c=":"+c+"R"+m,m=Ec++,0<\/script>",o=o.removeChild(o.firstChild)):typeof y.is=="string"?o=L.createElement(m,{is:y.is}):(o=L.createElement(m),m==="select"&&(L=o,y.multiple?L.multiple=!0:y.size&&(L.size=y.size))):o=L.createElementNS(o,m),o[La]=c,o[bc]=y,cS(o,c,!1,!1),c.stateNode=o;e:{switch(L=js(m,y),m){case"dialog":tr("cancel",o),tr("close",o),_=y;break;case"iframe":case"object":case"embed":tr("load",o),_=y;break;case"video":case"audio":for(_=0;_Ko&&(c.flags|=128,y=!0,Nc(O,!1),c.lanes=4194304)}else{if(!y)if(o=r0(L),o!==null){if(c.flags|=128,y=!0,m=o.updateQueue,m!==null&&(c.updateQueue=m,c.flags|=4),Nc(O,!0),O.tail===null&&O.tailMode==="hidden"&&!L.alternate&&!ar)return an(c),null}else 2*Ue()-O.renderingStartTime>Ko&&m!==1073741824&&(c.flags|=128,y=!0,Nc(O,!1),c.lanes=4194304);O.isBackwards?(L.sibling=c.child,c.child=L):(m=O.last,m!==null?m.sibling=L:c.child=L,O.last=L)}return O.tail!==null?(c=O.tail,O.rendering=c,O.tail=c.sibling,O.renderingStartTime=Ue(),c.sibling=null,m=lr.current,Yt(lr,y?m&1|2:m&1),c):(an(c),null);case 22:case 23:return km(),y=c.memoizedState!==null,o!==null&&o.memoizedState!==null!==y&&(c.flags|=8192),y&&(c.mode&1)!==0?($n&1073741824)!==0&&(an(c),c.subtreeFlags&6&&(c.flags|=8192)):an(c),null;case 24:return null;case 25:return null}throw Error(r(156,c.tag))}function TM(o,c){switch(Dp(c),c.tag){case 1:return jn(c.type)&&qf(),o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 3:return Wo(),rr(En),rr(rn),Vp(),o=c.flags,(o&65536)!==0&&(o&128)===0?(c.flags=o&-65537|128,c):null;case 5:return Hp(c),null;case 13:if(rr(lr),o=c.memoizedState,o!==null&&o.dehydrated!==null){if(c.alternate===null)throw Error(r(340));Bo()}return o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 19:return rr(lr),null;case 4:return Wo(),null;case 10:return Bp(c.type._context),null;case 22:case 23:return km(),null;case 24:return null;default:return null}}var f0=!1,sn=!1,AM=typeof WeakSet=="function"?WeakSet:Set,tt=null;function qo(o,c){var m=o.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(y){ur(o,c,y)}else m.current=null}function dm(o,c,m){try{m()}catch(y){ur(o,c,y)}}var dS=!1;function EM(o,c){if(kp=Pf,o=H2(),xp(o)){if("selectionStart"in o)var m={start:o.selectionStart,end:o.selectionEnd};else e:{m=(m=o.ownerDocument)&&m.defaultView||window;var y=m.getSelection&&m.getSelection();if(y&&y.rangeCount!==0){m=y.anchorNode;var _=y.anchorOffset,O=y.focusNode;y=y.focusOffset;try{m.nodeType,O.nodeType}catch{m=null;break e}var L=0,ae=-1,de=-1,_e=0,Re=0,$e=o,Ie=null;t:for(;;){for(var Xe;$e!==m||_!==0&&$e.nodeType!==3||(ae=L+_),$e!==O||y!==0&&$e.nodeType!==3||(de=L+y),$e.nodeType===3&&(L+=$e.nodeValue.length),(Xe=$e.firstChild)!==null;)Ie=$e,$e=Xe;for(;;){if($e===o)break t;if(Ie===m&&++_e===_&&(ae=L),Ie===O&&++Re===y&&(de=L),(Xe=$e.nextSibling)!==null)break;$e=Ie,Ie=$e.parentNode}$e=Xe}m=ae===-1||de===-1?null:{start:ae,end:de}}else m=null}m=m||{start:0,end:0}}else m=null;for(Tp={focusedElem:o,selectionRange:m},Pf=!1,tt=c;tt!==null;)if(c=tt,o=c.child,(c.subtreeFlags&1028)!==0&&o!==null)o.return=c,tt=o;else for(;tt!==null;){c=tt;try{var nt=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(nt!==null){var at=nt.memoizedProps,xr=nt.memoizedState,ve=c.stateNode,pe=ve.getSnapshotBeforeUpdate(c.elementType===c.type?at:ya(c.type,at),xr);ve.__reactInternalSnapshotBeforeUpdate=pe}break;case 3:var ye=c.stateNode.containerInfo;ye.nodeType===1?ye.textContent="":ye.nodeType===9&&ye.documentElement&&ye.removeChild(ye.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(He){ur(c,c.return,He)}if(o=c.sibling,o!==null){o.return=c.return,tt=o;break}tt=c.return}return nt=dS,dS=!1,nt}function Pc(o,c,m){var y=c.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var _=y=y.next;do{if((_.tag&o)===o){var O=_.destroy;_.destroy=void 0,O!==void 0&&dm(c,m,O)}_=_.next}while(_!==y)}}function d0(o,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&o)===o){var y=m.create;m.destroy=y()}m=m.next}while(m!==c)}}function hm(o){var c=o.ref;if(c!==null){var m=o.stateNode;switch(o.tag){case 5:o=m;break;default:o=m}typeof c=="function"?c(o):c.current=o}}function hS(o){var c=o.alternate;c!==null&&(o.alternate=null,hS(c)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(c=o.stateNode,c!==null&&(delete c[La],delete c[bc],delete c[Op],delete c[cM],delete c[uM])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function pS(o){return o.tag===5||o.tag===3||o.tag===4}function mS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||pS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function pm(o,c,m){var y=o.tag;if(y===5||y===6)o=o.stateNode,c?m.nodeType===8?m.parentNode.insertBefore(o,c):m.insertBefore(o,c):(m.nodeType===8?(c=m.parentNode,c.insertBefore(o,m)):(c=m,c.appendChild(o)),m=m._reactRootContainer,m!=null||c.onclick!==null||(c.onclick=Wf));else if(y!==4&&(o=o.child,o!==null))for(pm(o,c,m),o=o.sibling;o!==null;)pm(o,c,m),o=o.sibling}function mm(o,c,m){var y=o.tag;if(y===5||y===6)o=o.stateNode,c?m.insertBefore(o,c):m.appendChild(o);else if(y!==4&&(o=o.child,o!==null))for(mm(o,c,m),o=o.sibling;o!==null;)mm(o,c,m),o=o.sibling}var Kr=null,ba=!1;function Vi(o,c,m){for(m=m.child;m!==null;)xS(o,c,m),m=m.sibling}function xS(o,c,m){if(Lr&&typeof Lr.onCommitFiberUnmount=="function")try{Lr.onCommitFiberUnmount(Ra,m)}catch{}switch(m.tag){case 5:sn||qo(m,c);case 6:var y=Kr,_=ba;Kr=null,Vi(o,c,m),Kr=y,ba=_,Kr!==null&&(ba?(o=Kr,m=m.stateNode,o.nodeType===8?o.parentNode.removeChild(m):o.removeChild(m)):Kr.removeChild(m.stateNode));break;case 18:Kr!==null&&(ba?(o=Kr,m=m.stateNode,o.nodeType===8?jp(o.parentNode,m):o.nodeType===1&&jp(o,m),cc(o)):jp(Kr,m.stateNode));break;case 4:y=Kr,_=ba,Kr=m.stateNode.containerInfo,ba=!0,Vi(o,c,m),Kr=y,ba=_;break;case 0:case 11:case 14:case 15:if(!sn&&(y=m.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){_=y=y.next;do{var O=_,L=O.destroy;O=O.tag,L!==void 0&&((O&2)!==0||(O&4)!==0)&&dm(m,c,L),_=_.next}while(_!==y)}Vi(o,c,m);break;case 1:if(!sn&&(qo(m,c),y=m.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=m.memoizedProps,y.state=m.memoizedState,y.componentWillUnmount()}catch(ae){ur(m,c,ae)}Vi(o,c,m);break;case 21:Vi(o,c,m);break;case 22:m.mode&1?(sn=(y=sn)||m.memoizedState!==null,Vi(o,c,m),sn=y):Vi(o,c,m);break;default:Vi(o,c,m)}}function vS(o){var c=o.updateQueue;if(c!==null){o.updateQueue=null;var m=o.stateNode;m===null&&(m=o.stateNode=new AM),c.forEach(function(y){var _=IM.bind(null,o,y);m.has(y)||(m.add(y),y.then(_,_))})}}function wa(o,c){var m=c.deletions;if(m!==null)for(var y=0;y_&&(_=L),y&=~O}if(y=_,y=Ue()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*OM(y/1960))-y,10o?16:o,Gi===null)var y=!1;else{if(o=Gi,Gi=null,v0=0,(Ft&6)!==0)throw Error(r(331));var _=Ft;for(Ft|=4,tt=o.current;tt!==null;){var O=tt,L=O.child;if((tt.flags&16)!==0){var ae=O.deletions;if(ae!==null){for(var de=0;deUe()-gm?Bs(o,0):vm|=m),Pn(o,c)}function NS(o,c){c===0&&((o.mode&1)===0?c=1:(c=Ef,Ef<<=1,(Ef&130023424)===0&&(Ef=4194304)));var m=yn();o=li(o,c),o!==null&&(ac(o,c,m),Pn(o,m))}function MM(o){var c=o.memoizedState,m=0;c!==null&&(m=c.retryLane),NS(o,m)}function IM(o,c){var m=0;switch(o.tag){case 13:var y=o.stateNode,_=o.memoizedState;_!==null&&(m=_.retryLane);break;case 19:y=o.stateNode;break;default:throw Error(r(314))}y!==null&&y.delete(c),NS(o,m)}var PS;PS=function(o,c,m){if(o!==null)if(o.memoizedProps!==c.pendingProps||En.current)On=!0;else{if((o.lanes&m)===0&&(c.flags&128)===0)return On=!1,SM(o,c,m);On=(o.flags&131072)!==0}else On=!1,ar&&(c.flags&1048576)!==0&&u_(c,Xf,c.index);switch(c.lanes=0,c.tag){case 2:var y=c.type;u0(o,c),o=c.pendingProps;var _=Io(c,rn.current);zo(c,m),_=Xp(null,c,y,o,_,m);var O=Yp();return c.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,jn(y)?(O=!0,Vf(c)):O=!1,c.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,zp(c),_.updater=l0,c.stateNode=_,_._reactInternals=c,rm(c,y,o,m),c=sm(null,c,y,!0,O,m)):(c.tag=0,ar&&O&&Cp(c),gn(null,c,_,m),c=c.child),c;case 16:y=c.elementType;e:{switch(u0(o,c),o=c.pendingProps,_=y._init,y=_(y._payload),c.type=y,_=c.tag=LM(y),o=ya(y,o),_){case 0:c=im(null,c,y,o,m);break e;case 1:c=nS(null,c,y,o,m);break e;case 11:c=J_(null,c,y,o,m);break e;case 14:c=Q_(null,c,y,ya(y.type,o),m);break e}throw Error(r(306,y,""))}return c;case 0:return y=c.type,_=c.pendingProps,_=c.elementType===y?_:ya(y,_),im(o,c,y,_,m);case 1:return y=c.type,_=c.pendingProps,_=c.elementType===y?_:ya(y,_),nS(o,c,y,_,m);case 3:e:{if(aS(c),o===null)throw Error(r(387));y=c.pendingProps,O=c.memoizedState,_=O.element,y_(o,c),t0(c,y,null,m);var L=c.memoizedState;if(y=L.element,O.isDehydrated)if(O={element:y,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},c.updateQueue.baseState=O,c.memoizedState=O,c.flags&256){_=Ho(Error(r(423)),c),c=iS(o,c,y,m,_);break e}else if(y!==_){_=Ho(Error(r(424)),c),c=iS(o,c,y,m,_);break e}else for(Bn=$i(c.stateNode.containerInfo.firstChild),Ln=c,ar=!0,ga=null,m=v_(c,null,y,m),c.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(Bo(),y===_){c=ui(o,c,m);break e}gn(o,c,y,m)}c=c.child}return c;case 5:return __(c),o===null&&Mp(c),y=c.type,_=c.pendingProps,O=o!==null?o.memoizedProps:null,L=_.children,Ap(y,_)?L=null:O!==null&&Ap(y,O)&&(c.flags|=32),rS(o,c),gn(o,c,L,m),c.child;case 6:return o===null&&Mp(c),null;case 13:return sS(o,c,m);case 4:return Wp(c,c.stateNode.containerInfo),y=c.pendingProps,o===null?c.child=$o(c,null,y,m):gn(o,c,y,m),c.child;case 11:return y=c.type,_=c.pendingProps,_=c.elementType===y?_:ya(y,_),J_(o,c,y,_,m);case 7:return gn(o,c,c.pendingProps,m),c.child;case 8:return gn(o,c,c.pendingProps.children,m),c.child;case 12:return gn(o,c,c.pendingProps.children,m),c.child;case 10:e:{if(y=c.type._context,_=c.pendingProps,O=c.memoizedProps,L=_.value,Yt(Jf,y._currentValue),y._currentValue=L,O!==null)if(va(O.value,L)){if(O.children===_.children&&!En.current){c=ui(o,c,m);break e}}else for(O=c.child,O!==null&&(O.return=c);O!==null;){var ae=O.dependencies;if(ae!==null){L=O.child;for(var de=ae.firstContext;de!==null;){if(de.context===y){if(O.tag===1){de=ci(-1,m&-m),de.tag=2;var _e=O.updateQueue;if(_e!==null){_e=_e.shared;var Re=_e.pending;Re===null?de.next=de:(de.next=Re.next,Re.next=de),_e.pending=de}}O.lanes|=m,de=O.alternate,de!==null&&(de.lanes|=m),$p(O.return,m,c),ae.lanes|=m;break}de=de.next}}else if(O.tag===10)L=O.type===c.type?null:O.child;else if(O.tag===18){if(L=O.return,L===null)throw Error(r(341));L.lanes|=m,ae=L.alternate,ae!==null&&(ae.lanes|=m),$p(L,m,c),L=O.sibling}else L=O.child;if(L!==null)L.return=O;else for(L=O;L!==null;){if(L===c){L=null;break}if(O=L.sibling,O!==null){O.return=L.return,L=O;break}L=L.return}O=L}gn(o,c,_.children,m),c=c.child}return c;case 9:return _=c.type,y=c.pendingProps.children,zo(c,m),_=ea(_),y=y(_),c.flags|=1,gn(o,c,y,m),c.child;case 14:return y=c.type,_=ya(y,c.pendingProps),_=ya(y.type,_),Q_(o,c,y,_,m);case 15:return eS(o,c,c.type,c.pendingProps,m);case 17:return y=c.type,_=c.pendingProps,_=c.elementType===y?_:ya(y,_),u0(o,c),c.tag=1,jn(y)?(o=!0,Vf(c)):o=!1,zo(c,m),q_(c,y,_),rm(c,y,_,m),sm(null,c,y,!0,o,m);case 19:return lS(o,c,m);case 22:return tS(o,c,m)}throw Error(r(156,c.tag))};function CS(o,c){return Be(o,c)}function RM(o,c,m,y){this.tag=o,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(o,c,m,y){return new RM(o,c,m,y)}function Am(o){return o=o.prototype,!(!o||!o.isReactComponent)}function LM(o){if(typeof o=="function")return Am(o)?1:0;if(o!=null){if(o=o.$$typeof,o===B)return 11;if(o===G)return 14}return 2}function Zi(o,c){var m=o.alternate;return m===null?(m=na(o.tag,c,o.key,o.mode),m.elementType=o.elementType,m.type=o.type,m.stateNode=o.stateNode,m.alternate=o,o.alternate=m):(m.pendingProps=c,m.type=o.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=o.flags&14680064,m.childLanes=o.childLanes,m.lanes=o.lanes,m.child=o.child,m.memoizedProps=o.memoizedProps,m.memoizedState=o.memoizedState,m.updateQueue=o.updateQueue,c=o.dependencies,m.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},m.sibling=o.sibling,m.index=o.index,m.ref=o.ref,m}function w0(o,c,m,y,_,O){var L=2;if(y=o,typeof o=="function")Am(o)&&(L=1);else if(typeof o=="string")L=5;else e:switch(o){case j:return Us(m.children,_,O,c);case D:L=8,_|=8;break;case P:return o=na(12,m,c,_|2),o.elementType=P,o.lanes=O,o;case V:return o=na(13,m,c,_),o.elementType=V,o.lanes=O,o;case W:return o=na(19,m,c,_),o.elementType=W,o.lanes=O,o;case te:return _0(m,_,O,c);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case H:L=10;break e;case U:L=9;break e;case B:L=11;break e;case G:L=14;break e;case ne:L=16,y=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return c=na(L,m,c,_),c.elementType=o,c.type=y,c.lanes=O,c}function Us(o,c,m,y){return o=na(7,o,y,c),o.lanes=m,o}function _0(o,c,m,y){return o=na(22,o,y,c),o.elementType=te,o.lanes=m,o.stateNode={isHidden:!1},o}function Em(o,c,m){return o=na(6,o,null,c),o.lanes=m,o}function jm(o,c,m){return c=na(4,o.children!==null?o.children:[],o.key,c),c.lanes=m,c.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},c}function BM(o,c,m,y,_){this.tag=c,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tp(0),this.expirationTimes=tp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tp(0),this.identifierPrefix=y,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function Om(o,c,m,y,_,O,L,ae,de){return o=new BM(o,c,m,ae,de),c===1?(c=1,O===!0&&(c|=8)):c=0,O=na(3,null,null,c),o.current=O,O.stateNode=o,O.memoizedState={element:y,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},zp(O),o}function $M(o,c,m){var y=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Mm.exports=ZM(),Mm.exports}var VS;function QM(){if(VS)return N0;VS=1;var e=JM();return N0.createRoot=e.createRoot,N0.hydrateRoot=e.hydrateRoot,N0}var e8=QM();/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var ZN=1252,t8=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],$b={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Ub=function(e){t8.indexOf(e)!=-1&&(ZN=$b[0]=e)};function r8(){Ub(1252)}var Na=function(e){Ub(e)};function JN(){Na(1200),r8()}function KS(e){for(var t=[],r=0,n=e.length;r>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function QN(e){for(var t=[],r=0;r>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var Xc=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?n8(e.slice(2)):t==254&&r==255?QN(e.slice(2)):t==65279?e.slice(1):e},P0=function(t){return String.fromCharCode(t)},GS=function(t){return String.fromCharCode(t)},wu,ls="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function XS(e){for(var t="",r=0,n=0,a=0,i=0,s=0,l=0,u=0,f=0;f>2,n=e.charCodeAt(f++),s=(r&3)<<4|n>>4,a=e.charCodeAt(f++),l=(n&15)<<2|a>>6,u=a&63,isNaN(n)?l=u=64:isNaN(a)&&(u=64),t+=ls.charAt(i)+ls.charAt(s)+ls.charAt(l)+ls.charAt(u);return t}function Yn(e){var t="",r=0,n=0,a=0,i=0,s=0,l=0,u=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f>4,t+=String.fromCharCode(r),l=ls.indexOf(e.charAt(f++)),n=(s&15)<<4|l>>2,l!==64&&(t+=String.fromCharCode(n)),u=ls.indexOf(e.charAt(f++)),a=(l&3)<<6|u,u!==64&&(t+=String.fromCharCode(a));return t}var Pt=(function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node})(),mo=(function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}})();function gs(e){return Pt?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function YS(e){return Pt?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var ja=function(t){return Pt?mo(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function xo(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return zb(new Uint8Array(e));for(var t=new Array(e.length),r=0;r>6&31,a[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var l=e.charCodeAt(++i)&1023;a[r++]=240|s>>8&7,a[r++]=128|s>>2&63,a[r++]=128|l>>6&15|(s&3)<<4,a[r++]=128|l&63}else a[r++]=224|s>>12&15,a[r++]=128|s>>6&63,a[r++]=128|s&63;r>n&&(t.push(a.slice(0,r)),r=0,a=gs(65535),n=65530)}return t.push(a.slice(0,r)),ss(t)}var Tn=/\u0000/g,Yc=/[\u0001-\u0006]/g;function il(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function Pa(e,t){var r=""+e;return r.length>=t?r:fr("0",t-r.length)+r}function Wb(e,t){var r=""+e;return r.length>=t?r:fr(" ",t-r.length)+r}function ld(e,t){var r=""+e;return r.length>=t?r:r+fr(" ",t-r.length)}function i8(e,t){var r=""+Math.round(e);return r.length>=t?r:fr("0",t-r.length)+r}function s8(e,t){var r=""+e;return r.length>=t?r:fr("0",t-r.length)+r}var ZS=Math.pow(2,32);function Xo(e,t){if(e>ZS||e<-ZS)return i8(e,t);var r=Math.round(e);return s8(r,t)}function cd(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var JS=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Lm=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function o8(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var kt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},QS={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},l8={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function ud(e,t,r){for(var n=e<0?-1:1,a=e*n,i=0,s=1,l=0,u=1,f=0,d=0,p=Math.floor(a);ft&&(f>t?(d=u,l=i):(d=f,l=s)),!r)return[0,n*l,d];var x=Math.floor(n*l/d);return[x,n*l-x*d,d]}function Ks(e,t,r){if(e>2958465||e<0)return null;var n=e|0,a=Math.floor(86400*(e-n)),i=0,s=[],l={D:n,T:a,u:86400*(e-n)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),t&&t.date1904&&(n+=1462),l.u>.9999&&(l.u=0,++a==86400&&(l.T=a=0,++n,++l.D)),n===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var u=new Date(1900,0,1);u.setDate(u.getDate()+n-1),s=[u.getFullYear(),u.getMonth()+1,u.getDate()],i=u.getDay(),n<60&&(i=(i+6)%7),r&&(i=p8(u,s))}return l.y=s[0],l.m=s[1],l.d=s[2],l.S=a%60,a=Math.floor(a/60),l.M=a%60,a=Math.floor(a/60),l.H=a,l.q=i,l}var eP=new Date(1899,11,31,0,0,0),c8=eP.getTime(),u8=new Date(1900,2,1,0,0,0);function tP(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=u8&&(r+=1440*60*1e3),(r-(c8+(e.getTimezoneOffset()-eP.getTimezoneOffset())*6e4))/(1440*60*1e3)}function Hb(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function f8(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function d8(e){var t=e<0?12:11,r=Hb(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function h8(e){var t=Hb(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function _u(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=d8(e):t===10?r=e.toFixed(10).substr(0,12):r=h8(e),Hb(f8(r.toUpperCase()))}function io(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):_u(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return ha(14,tP(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function p8(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function m8(e,t,r,n){var a="",i=0,s=0,l=r.y,u,f=0;switch(e){case 98:l=r.y+543;case 121:switch(t.length){case 1:case 2:u=l%100,f=2;break;default:u=l%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:u=r.m,f=t.length;break;case 3:return Lm[r.m-1][1];case 5:return Lm[r.m-1][0];default:return Lm[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:u=r.d,f=t.length;break;case 3:return JS[r.q][0];default:return JS[r.q][1]}break;case 104:switch(t.length){case 1:case 2:u=1+(r.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:u=r.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:u=r.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?Pa(r.S,t.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),t==="s"?i===0?"0":""+i/s:(a=Pa(i,2+n),t==="ss"?a.substr(0,2):"."+a.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":u=r.D*24+r.H;break;case"[m]":case"[mm]":u=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":u=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:u=l,f=1;break}var d=f>0?Pa(u,f):"";return d}function cs(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,n=e.substr(0,r);r!=e.length;r+=t)n+=(n.length>0?",":"")+e.substr(r,t);return n}var rP=/%/g;function x8(e,t,r){var n=t.replace(rP,""),a=t.length-n.length;return yi(e,n,r*Math.pow(10,2*a))+fr("%",a)}function v8(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return yi(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function nP(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+nP(e,-t);var a=e.indexOf(".");a===-1&&(a=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%a;if(i<0&&(i+=a),r=(t/Math.pow(10,i)).toPrecision(n+1+(a+i)%a),r.indexOf("e")===-1){var s=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,a)+"."+r.substr(2+a),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,u,f,d){return u+f+d.substr(0,(a+i)%a)+"."+d.substr(i)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var aP=/# (\?+)( ?)\/( ?)(\d+)/;function g8(e,t,r){var n=parseInt(e[4],10),a=Math.round(t*n),i=Math.floor(a/n),s=a-i*n,l=n;return r+(i===0?"":""+i)+" "+(s===0?fr(" ",e[1].length+1+e[4].length):Wb(s,e[1].length)+e[2]+"/"+e[3]+Pa(l,e[4].length))}function y8(e,t,r){return r+(t===0?"":""+t)+fr(" ",e[1].length+2+e[4].length)}var iP=/^#*0*\.([0#]+)/,sP=/\).*[0#]/,oP=/\(###\) ###\\?-####/;function wn(e){for(var t="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function ek(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function tk(e,t){var r=e-Math.floor(e),n=Math.pow(10,t);return t<(""+Math.round(r*n)).length?0:Math.round(r*n)}function b8(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function w8(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function la(e,t,r){if(e.charCodeAt(0)===40&&!t.match(sP)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?la("n",n,r):"("+la("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return v8(e,t,r);if(t.indexOf("%")!==-1)return x8(e,t,r);if(t.indexOf("E")!==-1)return nP(t,r);if(t.charCodeAt(0)===36)return"$"+la(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,s,l,u=Math.abs(r),f=r<0?"-":"";if(t.match(/^00+$/))return f+Xo(u,t.length);if(t.match(/^[#?]+$/))return a=Xo(r,0),a==="0"&&(a=""),a.length>t.length?a:wn(t.substr(0,t.length-a.length))+a;if(i=t.match(aP))return g8(i,u,f);if(t.match(/^#+0+$/))return f+Xo(u,t.length-t.indexOf("0"));if(i=t.match(iP))return a=ek(r,i[1].length).replace(/^([^\.]+)$/,"$1."+wn(i[1])).replace(/\.$/,"."+wn(i[1])).replace(/\.(\d*)$/,function(w,b){return"."+b+fr("0",wn(i[1]).length-b.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return f+ek(u,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return f+cs(Xo(u,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+la(e,t,-r):cs(""+(Math.floor(r)+b8(r,i[1].length)))+"."+Pa(tk(r,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return la(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=il(la(e,t.replace(/[\\-]/g,""),r)),s=0,il(il(t.replace(/\\/g,"")).replace(/[0#]/g,function(w){return s=0?Ha("n",n,r):"("+Ha("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return _8(e,t,r);if(t.indexOf("%")!==-1)return S8(e,t,r);if(t.indexOf("E")!==-1)return lP(t,r);if(t.charCodeAt(0)===36)return"$"+Ha(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,s,l,u=Math.abs(r),f=r<0?"-":"";if(t.match(/^00+$/))return f+Pa(u,t.length);if(t.match(/^[#?]+$/))return a=""+r,r===0&&(a=""),a.length>t.length?a:wn(t.substr(0,t.length-a.length))+a;if(i=t.match(aP))return y8(i,u,f);if(t.match(/^#+0+$/))return f+Pa(u,t.length-t.indexOf("0"));if(i=t.match(iP))return a=(""+r).replace(/^([^\.]+)$/,"$1."+wn(i[1])).replace(/\.$/,"."+wn(i[1])),a=a.replace(/\.(\d*)$/,function(w,b){return"."+b+fr("0",wn(i[1]).length-b.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return f+(""+u).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return f+cs(""+u);if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Ha(e,t,-r):cs(""+r)+"."+fr("0",i[1].length);if(i=t.match(/^#,#*,#0/))return Ha(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=il(Ha(e,t.replace(/[\\-]/g,""),r)),s=0,il(il(t.replace(/\\/g,"")).replace(/[0#]/g,function(w){return s-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t-1;);break;case" ":++t;break;default:++t;break}return!1}function T8(e,t,r,n){for(var a=[],i="",s=0,l="",u="t",f,d,p,x="H";s=12?"P":"A"),b.t="T",x="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(f!=null&&(b.v=f.H>=12?"PM":"AM"),b.t="T",s+=5,x="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(f!=null&&(b.v=f.H>=12?"下午":"上午"),b.t="T",s+=5,x="h"):(b.t="t",++s),f==null&&b.t==="T")return"";a[a.length]=b,u=l;break;case"[":for(i=l;e.charAt(s++)!=="]"&&s-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",Ul(e)||(a[a.length]={t:"t",v:i}));break;case".":if(f!=null){for(i=l;++s-1;)i+=l;a[a.length]={t:"n",v:i};break;case"?":for(i=l;e.charAt(++s)===l;)i+=l;a[a.length]={t:l,v:i},u=l;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":a[a.length]={t:n===1?"t":l,v:l},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=l;s-1;)i+=e.charAt(s);a[a.length]={t:"D",v:i};break;case" ":a[a.length]={t:l,v:l},++s;break;case"$":a[a.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(l)===-1)throw new Error("unrecognized character "+l+" in "+e);a[a.length]={t:"t",v:l},++s;break}var g=0,k=0,A;for(s=a.length-1,u="t";s>=0;--s)switch(a[s].t){case"h":case"H":a[s].t=x,u="h",g<1&&(g=1);break;case"s":(A=a[s].v.match(/\.0+$/))&&(k=Math.max(k,A[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":u=a[s].t;break;case"m":u==="s"&&(a[s].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&a[s].v.match(/[Hh]/)&&(g=1),g<2&&a[s].v.match(/[Mm]/)&&(g=2),g<3&&a[s].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M),f.M>=60&&(f.M=0,++f.H);break;case 2:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M);break}var S="",N;for(s=0;s0){S.charCodeAt(0)==40?(E=t<0&&S.charCodeAt(0)===45?-t:t,j=yi("n",S,E)):(E=t<0&&n>1?-t:t,j=yi("n",S,E),E<0&&a[0]&&a[0].t=="t"&&(j=j.substr(1),a[0].v="-"+a[0].v)),N=j.length-1;var D=a.length;for(s=0;s-1){D=s;break}var P=a.length;if(D===a.length&&j.indexOf("E")===-1){for(s=a.length-1;s>=0;--s)a[s]==null||"n?".indexOf(a[s].t)===-1||(N>=a[s].v.length-1?(N-=a[s].v.length,a[s].v=j.substr(N+1,a[s].v.length)):N<0?a[s].v="":(a[s].v=j.substr(0,N+1),N=-1),a[s].t="t",P=s);N>=0&&P=0;--s)if(!(a[s]==null||"n?".indexOf(a[s].t)===-1)){for(d=a[s].v.indexOf(".")>-1&&s===D?a[s].v.indexOf(".")-1:a[s].v.length-1,T=a[s].v.substr(d+1);d>=0;--d)N>=0&&(a[s].v.charAt(d)==="0"||a[s].v.charAt(d)==="#")&&(T=j.charAt(N--)+T);a[s].v=T,a[s].t="t",P=s}for(N>=0&&P-1&&s===D?a[s].v.indexOf(".")+1:0,T=a[s].v.substr(0,d);d-1&&(E=n>1&&t<0&&s>0&&a[s-1].v==="-"?-t:t,a[s].v=yi(a[s].t,a[s].v,E),a[s].t="t");var H="";for(s=0;s!==a.length;++s)a[s]!=null&&(H+=a[s].v);return H}var rk=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function nk(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function A8(e,t){var r=k8(e),n=r.length,a=r[n-1].indexOf("@");if(n<4&&a>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||a>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=a>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=a>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=a>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(rk),l=r[1].match(rk);return nk(t,s)?[n,r[0]]:nk(t,l)?[n,r[1]]:[n,r[s!=null&&l!=null?2:1]]}return[n,i]}function ha(e,t,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:kt)[e],n==null&&(n=r.table&&r.table[QS[e]]||kt[QS[e]]),n==null&&(n=l8[e]||"General");break}if(cd(n,0))return io(t,r);t instanceof Date&&(t=tP(t,r.date1904));var a=A8(n,t);if(cd(a[1]))return io(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return T8(a[1],t,r,a[0])}function Qs(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(kt[r]==null){t<0&&(t=r);continue}if(kt[r]==e){t=r;break}}t<0&&(t=391)}return kt[t]=e,t}function uP(){kt=o8()}var E8={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},fP=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function j8(e){var t=typeof e=="number"?kt[e]:e;return t=t.replace(fP,"(\\d+)"),new RegExp("^"+t+"$")}function O8(e,t,r){var n=-1,a=-1,i=-1,s=-1,l=-1,u=-1;(t.match(fP)||[]).forEach(function(p,x){var v=parseInt(r[x+1],10);switch(p.toLowerCase().charAt(0)){case"y":n=v;break;case"d":i=v;break;case"h":s=v;break;case"s":u=v;break;case"m":s>=0?l=v:a=v;break}}),u>=0&&l==-1&&a>=0&&(l=a,a=-1);var f=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(a>=1?a:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);f.length==7&&(f="0"+f),f.length==8&&(f="20"+f);var d=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(u>=0?u:0)).slice(-2);return s==-1&&l==-1&&u==-1?f:n==-1&&a==-1&&i==-1?d:f+"T"+d}var N8=(function(){var e={};e.version="1.2.0";function t(){for(var j=0,D=new Array(256),P=0;P!=256;++P)j=P,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,D[P]=j;return typeof Int32Array<"u"?new Int32Array(D):D}var r=t();function n(j){var D=0,P=0,H=0,U=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(H=0;H!=256;++H)U[H]=j[H];for(H=0;H!=256;++H)for(P=j[H],D=256+H;D<4096;D+=256)P=U[D]=P>>>8^j[P&255];var B=[];for(H=1;H!=16;++H)B[H-1]=typeof Int32Array<"u"?U.subarray(H*256,H*256+256):U.slice(H*256,H*256+256);return B}var a=n(r),i=a[0],s=a[1],l=a[2],u=a[3],f=a[4],d=a[5],p=a[6],x=a[7],v=a[8],w=a[9],b=a[10],g=a[11],k=a[12],A=a[13],S=a[14];function N(j,D){for(var P=D^-1,H=0,U=j.length;H>>8^r[(P^j.charCodeAt(H++))&255];return~P}function T(j,D){for(var P=D^-1,H=j.length-15,U=0;U>8&255]^k[j[U++]^P>>16&255]^g[j[U++]^P>>>24]^b[j[U++]]^w[j[U++]]^v[j[U++]]^x[j[U++]]^p[j[U++]]^d[j[U++]]^f[j[U++]]^u[j[U++]]^l[j[U++]]^s[j[U++]]^i[j[U++]]^r[j[U++]];for(H+=15;U>>8^r[(P^j[U++])&255];return~P}function E(j,D){for(var P=D^-1,H=0,U=j.length,B=0,V=0;H>>8^r[(P^B)&255]:B<2048?(P=P>>>8^r[(P^(192|B>>6&31))&255],P=P>>>8^r[(P^(128|B&63))&255]):B>=55296&&B<57344?(B=(B&1023)+64,V=j.charCodeAt(H++)&1023,P=P>>>8^r[(P^(240|B>>8&7))&255],P=P>>>8^r[(P^(128|B>>2&63))&255],P=P>>>8^r[(P^(128|V>>6&15|(B&3)<<4))&255],P=P>>>8^r[(P^(128|V&63))&255]):(P=P>>>8^r[(P^(224|B>>12&15))&255],P=P>>>8^r[(P^(128|B>>6&63))&255],P=P>>>8^r[(P^(128|B&63))&255]);return~P}return e.table=r,e.bstr=N,e.buf=T,e.str=E,e})(),Ct=(function(){var t={};t.version="1.2.1";function r(M,Z){for(var q=M.split("/"),X=Z.split("/"),J=0,ee=0,xe=Math.min(q.length,X.length);J>>1,M.write_shift(2,q);var X=Z.getFullYear()-1980;X=X<<4|Z.getMonth()+1,X=X<<5|Z.getDate(),M.write_shift(2,X)}function s(M){var Z=M.read_shift(2)&65535,q=M.read_shift(2)&65535,X=new Date,J=q&31;q>>>=5;var ee=q&15;q>>>=4,X.setMilliseconds(0),X.setFullYear(q+1980),X.setMonth(ee-1),X.setDate(J);var xe=Z&31;Z>>>=5;var Ee=Z&63;return Z>>>=6,X.setHours(Z),X.setMinutes(Ee),X.setSeconds(xe<<1),X}function l(M){Zr(M,0);for(var Z={},q=0;M.l<=M.length-4;){var X=M.read_shift(2),J=M.read_shift(2),ee=M.l+J,xe={};switch(X){case 21589:q=M.read_shift(1),q&1&&(xe.mtime=M.read_shift(4)),J>5&&(q&2&&(xe.atime=M.read_shift(4)),q&4&&(xe.ctime=M.read_shift(4))),xe.mtime&&(xe.mt=new Date(xe.mtime*1e3));break}M.l=ee,Z[X]=xe}return Z}var u;function f(){return u||(u={})}function d(M,Z){if(M[0]==80&&M[1]==75)return ni(M,Z);if((M[0]|32)==109&&(M[1]|32)==105)return Me(M,Z);if(M.length<512)throw new Error("CFB file size "+M.length+" < 512");var q=3,X=512,J=0,ee=0,xe=0,Ee=0,ge=0,be=[],we=M.slice(0,512);Zr(we,0);var Be=p(we);switch(q=Be[0],q){case 3:X=512;break;case 4:X=4096;break;case 0:if(Be[1]==0)return ni(M,Z);default:throw new Error("Major Version: Expected 3 or 4 saw "+q)}X!==512&&(we=M.slice(0,X),Zr(we,28));var Ke=M.slice(0,X);x(we,q);var Ye=we.read_shift(4,"i");if(q===3&&Ye!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ye);we.l+=4,xe=we.read_shift(4,"i"),we.l+=4,we.chk("00100000","Mini Stream Cutoff Size: "),Ee=we.read_shift(4,"i"),J=we.read_shift(4,"i"),ge=we.read_shift(4,"i"),ee=we.read_shift(4,"i");for(var We=-1,Ue=0;Ue<109&&(We=we.read_shift(4,"i"),!(We<0));++Ue)be[Ue]=We;var gt=v(M,X);g(ge,ee,gt,X,be);var Vt=A(gt,xe,be,X);Vt[xe].name="!Directory",J>0&&Ee!==V&&(Vt[Ee].name="!MiniFAT"),Vt[be[0]].name="!FAT",Vt.fat_addrs=be,Vt.ssz=X;var Xt={},pr=[],Os=[],Di=[];S(xe,Vt,gt,pr,J,Xt,Os,Ee),w(Os,Di,pr),pr.shift();var Ra={FileIndex:Os,FullPaths:Di};return Z&&Z.raw&&(Ra.raw={header:Ke,sectors:gt}),Ra}function p(M){if(M[M.l]==80&&M[M.l+1]==75)return[0,0];M.chk(W,"Header Signature: "),M.l+=16;var Z=M.read_shift(2,"u");return[M.read_shift(2,"u"),Z]}function x(M,Z){var q=9;switch(M.l+=2,q=M.read_shift(2)){case 9:if(Z!=3)throw new Error("Sector Shift: Expected 9 saw "+q);break;case 12:if(Z!=4)throw new Error("Sector Shift: Expected 12 saw "+q);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+q)}M.chk("0600","Mini Sector Shift: "),M.chk("000000000000","Reserved: ")}function v(M,Z){for(var q=Math.ceil(M.length/Z)-1,X=[],J=1;J0&&xe>=0;)ee.push(Z.slice(xe*B,xe*B+B)),J-=B,xe=Vs(q,xe*4);return ee.length===0?Pr(0):ss(ee).slice(0,M.size)}function g(M,Z,q,X,J){var ee=V;if(M===V){if(Z!==0)throw new Error("DIFAT chain shorter than expected")}else if(M!==-1){var xe=q[M],Ee=(X>>>2)-1;if(!xe)return;for(var ge=0;ge=0;){J[ge]=!0,ee[ee.length]=ge,xe.push(M[ge]);var we=q[Math.floor(ge*4/X)];if(be=ge*4&Ee,X<4+be)throw new Error("FAT boundary crossed: "+ge+" 4 "+X);if(!M[we])break;ge=Vs(M[we],be)}return{nodes:ee,data:hk([xe])}}function A(M,Z,q,X){var J=M.length,ee=[],xe=[],Ee=[],ge=[],be=X-1,we=0,Be=0,Ke=0,Ye=0;for(we=0;we=J&&(Ke-=J),!xe[Ke]){ge=[];var We=[];for(Be=Ke;Be>=0;){We[Be]=!0,xe[Be]=!0,Ee[Ee.length]=Be,ge.push(M[Be]);var Ue=q[Math.floor(Be*4/X)];if(Ye=Be*4&be,X<4+Ye)throw new Error("FAT boundary crossed: "+Be+" 4 "+X);if(!M[Ue]||(Be=Vs(M[Ue],Ye),We[Be]))break}ee[Ke]={nodes:Ee,data:hk([ge])}}return ee}function S(M,Z,q,X,J,ee,xe,Ee){for(var ge=0,be=X.length?2:0,we=Z[M].data,Be=0,Ke=0,Ye;Be0&&ge!==V&&(Z[ge].name="!StreamData")):Ue.size>=4096?(Ue.storage="fat",Z[Ue.start]===void 0&&(Z[Ue.start]=k(q,Ue.start,Z.fat_addrs,Z.ssz)),Z[Ue.start].name=Ue.name,Ue.content=Z[Ue.start].data.slice(0,Ue.size)):(Ue.storage="minifat",Ue.size<0?Ue.size=0:ge!==V&&Ue.start!==V&&Z[ge]&&(Ue.content=b(Ue,Z[ge].data,(Z[Ee]||{}).data))),Ue.content&&Zr(Ue.content,0),ee[Ye]=Ue,xe.push(Ue)}}function N(M,Z){return new Date((qn(M,Z+4)/1e7*Math.pow(2,32)+qn(M,Z)/1e7-11644473600)*1e3)}function T(M,Z){return f(),d(u.readFileSync(M),Z)}function E(M,Z){var q=Z&&Z.type;switch(q||Pt&&Buffer.isBuffer(M)&&(q="buffer"),q||"base64"){case"file":return T(M,Z);case"base64":return d(ja(Yn(M)),Z);case"binary":return d(ja(M),Z)}return d(M,Z)}function j(M,Z){var q=Z||{},X=q.root||"Root Entry";if(M.FullPaths||(M.FullPaths=[]),M.FileIndex||(M.FileIndex=[]),M.FullPaths.length!==M.FileIndex.length)throw new Error("inconsistent CFB structure");M.FullPaths.length===0&&(M.FullPaths[0]=X+"/",M.FileIndex[0]={name:X,type:5}),q.CLSID&&(M.FileIndex[0].clsid=q.CLSID),D(M)}function D(M){var Z="Sh33tJ5";if(!Ct.find(M,"/"+Z)){var q=Pr(4);q[0]=55,q[1]=q[3]=50,q[2]=54,M.FileIndex.push({name:Z,type:2,content:q,size:4,L:69,R:69,C:69}),M.FullPaths.push(M.FullPaths[0]+Z),P(M)}}function P(M,Z){j(M);for(var q=!1,X=!1,J=M.FullPaths.length-1;J>=0;--J){var ee=M.FileIndex[J];switch(ee.type){case 0:X?q=!0:(M.FileIndex.pop(),M.FullPaths.pop());break;case 1:case 2:case 5:X=!0,isNaN(ee.R*ee.L*ee.C)&&(q=!0),ee.R>-1&&ee.L>-1&&ee.R==ee.L&&(q=!0);break;default:q=!0;break}}if(!(!q&&!Z)){var xe=new Date(1987,1,19),Ee=0,ge=Object.create?Object.create(null):{},be=[];for(J=0;J1?1:-1,Be.size=0,Be.type=5;else if(Ke.slice(-1)=="/"){for(Ee=J+1;Ee=be.length?-1:Ee,Ee=J+1;Ee=be.length?-1:Ee,Be.type=1}else n(M.FullPaths[J+1]||"")==n(Ke)&&(Be.R=J+1),Be.type=2}}}function H(M,Z){var q=Z||{};if(q.fileType=="mad")return Ae(M,q);switch(P(M),q.fileType){case"zip":return me(M,q)}var X=(function(Ye){for(var We=0,Ue=0,gt=0;gt0&&(Xt<4096?We+=Xt+63>>6:Ue+=Xt+511>>9)}}for(var pr=Ye.FullPaths.length+3>>2,Os=We+7>>3,Di=We+127>>7,Ra=Os+Ue+pr+Di,Lr=Ra+127>>7,rc=Lr<=109?0:Math.ceil((Lr-109)/127);Ra+Lr+rc+127>>7>Lr;)rc=++Lr<=109?0:Math.ceil((Lr-109)/127);var mr=[1,rc,Lr,Di,pr,Ue,We,0];return Ye.FileIndex[0].size=We<<6,mr[7]=(Ye.FileIndex[0].start=mr[0]+mr[1]+mr[2]+mr[3]+mr[4]+mr[5])+(mr[6]+7>>3),mr})(M),J=Pr(X[7]<<9),ee=0,xe=0;{for(ee=0;ee<8;++ee)J.write_shift(1,G[ee]);for(ee=0;ee<8;++ee)J.write_shift(2,0);for(J.write_shift(2,62),J.write_shift(2,3),J.write_shift(2,65534),J.write_shift(2,9),J.write_shift(2,6),ee=0;ee<3;++ee)J.write_shift(2,0);for(J.write_shift(4,0),J.write_shift(4,X[2]),J.write_shift(4,X[0]+X[1]+X[2]+X[3]-1),J.write_shift(4,0),J.write_shift(4,4096),J.write_shift(4,X[3]?X[0]+X[1]+X[2]-1:V),J.write_shift(4,X[3]),J.write_shift(-4,X[1]?X[0]-1:V),J.write_shift(4,X[1]),ee=0;ee<109;++ee)J.write_shift(-4,ee>9)));for(Ee(X[6]+7>>3);J.l&511;)J.write_shift(-4,te.ENDOFCHAIN);for(xe=ee=0,ge=0;ge=4096)&&(we.start=xe,Ee(be+63>>6)));for(;J.l&511;)J.write_shift(-4,te.ENDOFCHAIN);for(ee=0;ee=4096)if(J.l=we.start+1<<9,Pt&&Buffer.isBuffer(we.content))we.content.copy(J,J.l,0,we.size),J.l+=we.size+511&-512;else{for(ge=0;ge0&&we.size<4096)if(Pt&&Buffer.isBuffer(we.content))we.content.copy(J,J.l,0,we.size),J.l+=we.size+63&-64;else{for(ge=0;ge>16|Z>>8|Z)&255}for(var se=typeof Uint8Array<"u",he=se?new Uint8Array(256):[],Ce=0;Ce<256;++Ce)he[Ce]=ce(Ce);function I(M,Z){var q=he[M&255];return Z<=8?q>>>8-Z:(q=q<<8|he[M>>8&255],Z<=16?q>>>16-Z:(q=q<<8|he[M>>16&255],q>>>24-Z))}function qe(M,Z){var q=Z&7,X=Z>>>3;return(M[X]|(q<=6?0:M[X+1]<<8))>>>q&3}function Ne(M,Z){var q=Z&7,X=Z>>>3;return(M[X]|(q<=5?0:M[X+1]<<8))>>>q&7}function De(M,Z){var q=Z&7,X=Z>>>3;return(M[X]|(q<=4?0:M[X+1]<<8))>>>q&15}function Fe(M,Z){var q=Z&7,X=Z>>>3;return(M[X]|(q<=3?0:M[X+1]<<8))>>>q&31}function Se(M,Z){var q=Z&7,X=Z>>>3;return(M[X]|(q<=1?0:M[X+1]<<8))>>>q&127}function Je(M,Z,q){var X=Z&7,J=Z>>>3,ee=(1<>>X;return q<8-X||(xe|=M[J+1]<<8-X,q<16-X)||(xe|=M[J+2]<<16-X,q<24-X)||(xe|=M[J+3]<<24-X),xe&ee}function pt(M,Z,q){var X=Z&7,J=Z>>>3;return X<=5?M[J]|=(q&7)<>8-X),Z+3}function Ge(M,Z,q){var X=Z&7,J=Z>>>3;return q=(q&1)<>>3;return q<<=X,M[J]|=q&255,q>>>=8,M[J+1]=q,Z+8}function it(M,Z,q){var X=Z&7,J=Z>>>3;return q<<=X,M[J]|=q&255,q>>>=8,M[J+1]=q&255,M[J+2]=q>>>8,Z+16}function _t(M,Z){var q=M.length,X=2*q>Z?2*q:Z+5,J=0;if(q>=Z)return M;if(Pt){var ee=YS(X);if(M.copy)M.copy(ee);else for(;J>X-Be,xe=(1<=0;--xe)Z[Ee|xe<0;)ge[ge.l++]=Ee[be++]}return ge.l}function xe(Ee,ge){for(var be=0,we=0,Be=se?new Uint16Array(32768):[];we0;)ge[ge.l++]=Ee[we++];be=ge.l*8;continue}be=pt(ge,be,+(we+Ke==Ee.length)+2);for(var Ye=0;Ke-- >0;){var We=Ee[we];Ye=(Ye<<5^We)&32767;var Ue=-1,gt=0;if((Ue=Be[Ye])&&(Ue|=we&-32768,Ue>we&&(Ue-=32768),Ue2){We=J[gt],We<=22?be=ut(ge,be,he[We+1]>>1)-1:(ut(ge,be,3),be+=5,ut(ge,be,he[We-23]>>5),be+=3);var Vt=We<8?0:We-4>>2;Vt>0&&(it(ge,be,gt-Y[We]),be+=Vt),We=Z[we-Ue],be=ut(ge,be,he[We]>>3),be-=3;var Xt=We<4?0:We-2>>1;Xt>0&&(it(ge,be,we-Ue-fe[We]),be+=Xt);for(var pr=0;pr>8-We;for(var Ue=(1<<7-We)-1;Ue>=0;--Ue)Bt[Ye|Ue<>>=3){case 16:for(ee=3+qe(M,Z),Z+=2,Ye=gt[gt.length-1];ee-- >0;)gt.push(Ye);break;case 17:for(ee=3+Ne(M,Z),Z+=3;ee-- >0;)gt.push(0);break;case 18:for(ee=11+Se(M,Z),Z+=7;ee-- >0;)gt.push(0);break;default:gt.push(Ye),ge>>0,Ee=0,ge=0;(X&1)==0;){if(X=Ne(M,q),q+=3,X>>>1)X>>1==1?(Ee=9,ge=5):(q=Es(M,q),Ee=vn,ge=Ia);else{q&7&&(q+=8-(q&7));var be=M[q>>>3]|M[(q>>>3)+1]<<8;if(q+=32,be>0)for(!Z&&xe0;)J[ee++]=M[q>>>3],q+=8;continue}for(;;){!Z&&xe>>1==1?Tr[we]:At[we];if(q+=Be&15,Be>>>=4,(Be>>>8&255)===0)J[ee++]=Be;else{if(Be==256)break;Be-=257;var Ke=Be<8?0:Be-4>>2;Ke>5&&(Ke=0);var Ye=ee+Y[Be];Ke>0&&(Ye+=Je(M,q,Ke),q+=Ke),we=Je(M,q,ge),Be=X>>>1==1?Rr[we]:er[we],q+=Be&15,Be>>>=4;var We=Be<4?0:Be-2>>1,Ue=fe[Be];for(We>0&&(Ue+=Je(M,q,We),q+=We),!Z&&xe>>3]:[J.slice(0,ee),q+7>>>3]}function Ci(M,Z){var q=M.slice(M.l||0),X=js(q,Z);return M.l+=X[1],X[0]}function ri(M,Z){if(M)typeof console<"u"&&console.error(Z);else throw new Error(Z)}function ni(M,Z){var q=M;Zr(q,0);var X=[],J=[],ee={FileIndex:X,FullPaths:J};j(ee,{root:Z.root});for(var xe=q.length-4;(q[xe]!=80||q[xe+1]!=75||q[xe+2]!=5||q[xe+3]!=6)&&xe>=0;)--xe;q.l=xe+4,q.l+=4;var Ee=q.read_shift(2);q.l+=6;var ge=q.read_shift(4);for(q.l=ge,xe=0;xe0&&(q=q.slice(0,q.length-1),q=q.slice(0,q.lastIndexOf("/")+1),ee.slice(0,q.length)!=q););var xe=(X[1]||"").match(/boundary="(.*?)"/);if(!xe)throw new Error("MAD cannot find boundary");var Ee="--"+(xe[1]||""),ge=[],be=[],we={FileIndex:ge,FullPaths:be};j(we);var Be,Ke=0;for(J=0;J=32&&Ye<128&&++Be;var Ue=Be>=Ke*4/5;J.push(X),J.push("Content-Location: "+(q.root||"file:///C:/SheetJS/")+xe),J.push("Content-Transfer-Encoding: "+(Ue?"quoted-printable":"base64")),J.push("Content-Type: "+Te(Ee,xe)),J.push(""),J.push(Ue?Ze(we):ze(we))}return J.push(X+`--\r +`),J.join(`\r +`)}function Pe(M){var Z={};return j(Z,M),Z}function et(M,Z,q,X){var J=X&&X.unsafe;J||j(M);var ee=!J&&Ct.find(M,Z);if(!ee){var xe=M.FullPaths[0];Z.slice(0,xe.length)==xe?xe=Z:(xe.slice(-1)!="/"&&(xe+="/"),xe=(xe+Z).replace("//","/")),ee={name:a(Z),type:2},M.FileIndex.push(ee),M.FullPaths.push(xe),J||Ct.utils.cfb_gc(M)}return ee.content=q,ee.size=q?q.length:0,X&&(X.CLSID&&(ee.clsid=X.CLSID),X.mt&&(ee.mt=X.mt),X.ct&&(ee.ct=X.ct)),ee}function vt(M,Z){j(M);var q=Ct.find(M,Z);if(q){for(var X=0;X3&&(n=!0),a[i].slice(a[i].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+a[i].slice(a[i].length-1));case"D":r*=24;case"H":r*=60;case"M":if(n)r*=60;else throw new Error("Unsupported ISO Duration Field: M")}t+=r*parseInt(a[i],10)}return t}var ik=new Date("2017-02-19T19:06:09.000Z"),hP=isNaN(ik.getFullYear())?new Date("2/19/17"):ik,F8=hP.getFullYear()==2017;function qr(e,t){var r=new Date(e);if(F8)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(hP.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var a=e.match(/\d+/g)||["2017","2","19","0","0","0"],i=new Date(+a[0],+a[1]-1,+a[2],+a[3]||0,+a[4]||0,+a[5]||0);return e.indexOf("Z")>-1&&(i=new Date(i.getTime()-i.getTimezoneOffset()*60*1e3)),i}function so(e,t){if(Pt&&Buffer.isBuffer(e)){if(t){if(e[0]==255&&e[1]==254)return Jc(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return Jc(QN(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(e[0]==255&&e[1]==254)return Jc(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return Jc(new TextDecoder("utf-16be").decode(e.slice(2)))}var r={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(i){return r[i]||i})}catch{}for(var n=[],a=0;a!=e.length;++a)n.push(String.fromCharCode(e[a]));return n.join("")}function en(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=en(e[r]));return t}function fr(e,t){for(var r="";r.length3&&M8.indexOf(s)==-1)return r}else if(s.match(/[a-z]/))return r;return n<0||n>8099?r:(a>0||i>1)&&n!=101?t:e.match(/[^-0-9:,\/\\]/)?r:t}var I8=(function(){var e="abacaba".split(/(:?b)/i).length==5;return function(r,n,a){if(e||typeof n=="string")return r.split(n);for(var i=r.split(n),s=[i[0]],l=1;l\r +`,$8=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,ok=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,U8=/<[^>]*>/g,xn=vP.match(ok)?ok:U8,z8=/<\w*:/,W8=/<(\/?)\w+:/;function mt(e,t,r){for(var n={},a=0,i=0;a!==e.length&&!((i=e.charCodeAt(a))===32||i===10||i===13);++a);if(t||(n[0]=e.slice(0,a)),a===e.length)return n;var s=e.match($8),l=0,u="",f=0,d="",p="",x=1;if(s)for(f=0;f!=s.length;++f){for(p=s[f],i=0;i!=p.length&&p.charCodeAt(i)!==61;++i);for(d=p.slice(0,i).trim();p.charCodeAt(i+1)==32;)++i;for(x=(a=p.charCodeAt(i+1))==34||a==39?1:0,u=p.slice(i+1+x,p.length-x),l=0;l!=d.length&&d.charCodeAt(l)!==58;++l);if(l===d.length)d.indexOf("_")>0&&(d=d.slice(0,d.indexOf("_"))),n[d]=u,n[d.toLowerCase()]=u;else{var v=(l===5&&d.slice(0,5)==="xmlns"?"xmlns":"")+d.slice(l+1);if(n[v]&&d.slice(l-3,l)=="ext")continue;n[v]=u,n[v.toLowerCase()]=u}}return n}function Qa(e){return e.replace(W8,"<$1")}var gP={""":'"',"'":"'",">":">","<":"<","&":"&"},H8=qb(gP),Mt=(function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig,t=/_x([\da-fA-F]{4})_/ig;return function r(n){var a=n+"",i=a.indexOf("-1?16:10))||l}).replace(t,function(l,u){return String.fromCharCode(parseInt(u,16))});var s=a.indexOf("]]>");return r(a.slice(0,i))+a.slice(i+9,s)+r(a.slice(s+3))}})(),q8=/[&<>'"]/g,V8=/[\u0000-\u001f]/g;function Kb(e){var t=e+"";return t.replace(q8,function(r){return H8[r]}).replace(/\n/g,"
").replace(V8,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}var lk=(function(){var e=/&#(\d+);/g;function t(r,n){return String.fromCharCode(parseInt(n,10))}return function(n){return n.replace(e,t)}})();function ir(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function Bm(e){for(var t="",r=0,n=0,a=0,i=0,s=0,l=0;r191&&n<224){s=(n&31)<<6,s|=a&63,t+=String.fromCharCode(s);continue}if(i=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(a&63)<<6|i&63);continue}s=e.charCodeAt(r++),l=((n&7)<<18|(a&63)<<12|(i&63)<<6|s&63)-65536,t+=String.fromCharCode(55296+(l>>>10&1023)),t+=String.fromCharCode(56320+(l&1023))}return t}function ck(e){var t=gs(2*e.length),r,n,a=1,i=0,s=0,l;for(n=0;n>>10&1023),r=56320+(r&1023)),s!==0&&(t[i++]=s&255,t[i++]=s>>>8,s=0),t[i++]=r%256,t[i++]=r>>>8;return t.slice(0,i).toString("ucs2")}function uk(e){return mo(e,"binary").toString("utf8")}var C0="foo bar baz☃🍣",Qt=Pt&&(uk(C0)==Bm(C0)&&uk||ck(C0)==Bm(C0)&&ck)||Bm,Jc=Pt?function(e){return mo(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,a=0;r>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,a=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(a>>18&7))),t.push(String.fromCharCode(144+(a>>12&63))),t.push(String.fromCharCode(128+(a>>6&63))),t.push(String.fromCharCode(128+(a&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},Su=(function(){var e={};return function(r,n){var a=r+"|"+(n||"");return e[a]?e[a]:e[a]=new RegExp("<(?:\\w+:)?"+r+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)",n||"")}})(),yP=(function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+/g,` +`).replace(/<[^>]*>/g,""),a=0;a([\\s\\S]*?)","g")}})(),G8=/<\/?(?:vt:)?variant>/g,X8=/<(?:vt:)([^>]*)>([\s\S]*)"+t+""}function Gb(e){if(Pt&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return Qt(xo(zb(e)));throw new Error("Bad input format: expected Buffer or string")}var ku=/<(\/?)([^\s?>:\/]+)(?:[\s?:\/][^>]*)?>/mg,Q8={CT:"http://schemas.openxmlformats.org/package/2006/content-types"},eI=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];function tI(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),a=e[t+6]&15,i=5;i>=0;--i)a=a*256+e[t+i];return n==2047?a==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,a+=Math.pow(2,52)),r*Math.pow(2,n-52)*a)}function rI(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,a=0,i=0,s=n?-t:t;isFinite(s)?s==0?a=i=0:(a=Math.floor(Math.log(s)/Math.LN2),i=s*Math.pow(2,52-a),a<=-1023&&(!isFinite(i)||i>4|n}var dk=function(e){for(var t=[],r=10240,n=0;n0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:mo(t)})):dk(e)}:dk,pk=function(e,t,r){for(var n=[],a=t;a0?hf(e,t+4,t+4+r-1):""},_P=wP,SP=function(e,t){var r=qn(e,t);return r>0?hf(e,t+4,t+4+r-1):""},kP=SP,TP=function(e,t){var r=2*qn(e,t);return r>0?hf(e,t+4,t+4+r-1):""},AP=TP,EP=function(t,r){var n=qn(t,r);return n>0?Xb(t,r+4,r+4+n):""},jP=EP,OP=function(e,t){var r=qn(e,t);return r>0?hf(e,t+4,t+4+r):""},NP=OP,PP=function(e,t){return tI(e,t)},dd=PP,CP=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};Pt&&(_P=function(t,r){if(!Buffer.isBuffer(t))return wP(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},kP=function(t,r){if(!Buffer.isBuffer(t))return SP(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},AP=function(t,r){if(!Buffer.isBuffer(t))return TP(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},jP=function(t,r){if(!Buffer.isBuffer(t))return EP(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},NP=function(t,r){if(!Buffer.isBuffer(t))return OP(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},dd=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):PP(t,r)},CP=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var el=function(e,t){return e[t]},mi=function(e,t){return e[t+1]*256+e[t]},nI=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},qn=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},Vs=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},aI=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function nu(e,t){var r="",n,a,i=[],s,l,u,f;switch(t){case"dbcs":if(f=this.l,Pt&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(u=0;u0?Vs:aI)(this,this.l),this.l+=4,n):(a=qn(this,this.l),this.l+=4,a);case 8:case-8:if(t==="f")return e==8?a=dd(this,this.l):a=dd([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,a;e=8;case 16:r=bP(this,this.l,e);break}}return this.l+=e,r}var iI=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},sI=function(e,t,r){e[r]=t&255,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},oI=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function lI(e,t,r){var n=0,a=0;if(r==="dbcs"){for(a=0;a!=t.length;++a)oI(this,t.charCodeAt(a),this.l+2*a);n=2*t.length}else if(r==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),a=0;a!=t.length;++a)this[this.l+a]=t.charCodeAt(a)&255;n=t.length}else if(r==="hex"){for(;a>8}for(;this.l>>=8,this[this.l+1]=t&255;break;case 3:n=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:n=4,iI(this,t,this.l);break;case 8:if(n=8,r==="f"){rI(this,t,this.l);break}case 16:break;case-4:n=4,sI(this,t,this.l);break}return this.l+=n,this}function DP(e,t){var r=bP(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function Zr(e,t){e.l=t,e.read_shift=nu,e.chk=DP,e.write_shift=lI}function mn(e,t){e.l+=t}function Pr(e){var t=gs(e);return Zr(t,0),t}function ji(e,t,r){if(e){var n,a,i;Zr(e,e.l||0);for(var s=e.length,l=0,u=0;e.ln.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},i=function(f){return n&&f=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function vk(e,t,r){var n=en(e);return n.s=au(n.s,t.s,r),n.e=au(n.e,t.s,r),n}function iu(e,t){if(e.cRel&&e.c<0)for(e=en(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=en(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=bt(e);return!e.cRel&&e.cRel!=null&&(r=fI(r)),!e.rRel&&e.rRel!=null&&(r=cI(r)),r}function $m(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+Cr(e.s.c)+":"+(e.e.cRel?"":"$")+Cr(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+tn(e.s.r)+":"+(e.e.rRel?"":"$")+tn(e.e.r):iu(e.s,t.biff)+":"+iu(e.e,t.biff)}function Yb(e){return parseInt(uI(e),10)-1}function tn(e){return""+(e+1)}function cI(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function uI(e){return e.replace(/\$(\d+)$/,"$1")}function Zb(e){for(var t=dI(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function Cr(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function fI(e){return e.replace(/^([A-Z])/,"$$$1")}function dI(e){return e.replace(/^\$([A-Z])/,"$1")}function hI(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function Sn(e){for(var t=0,r=0,n=0;n=48&&a<=57?t=10*t+(a-48):a>=65&&a<=90&&(r=26*r+(a-64))}return{c:r-1,r:t-1}}function bt(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function zl(e){var t=e.indexOf(":");return t==-1?{s:Sn(e),e:Sn(e)}:{s:Sn(e.slice(0,t)),e:Sn(e.slice(t+1))}}function Dt(e,t){return typeof t>"u"||typeof t=="number"?Dt(e.s,e.e):(typeof e!="string"&&(e=bt(e)),typeof t!="string"&&(t=bt(t)),e==t?e:e+":"+t)}function hr(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,a=0,i=e.length;for(r=0;n26);++n)r=26*r+a;for(t.s.c=--r,r=0;n9);++n)r=10*r+a;if(t.s.r=--r,n===i||a!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++n,r=0;n!=i&&!((a=e.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(t.e.c=--r,r=0;n!=i&&!((a=e.charCodeAt(n)-48)<0||a>9);++n)r=10*r+a;return t.e.r=--r,t}function gk(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=ha(e.z,r?An(t):t)}catch{}try{return e.w=ha((e.XF||{}).numFmtId||(r?14:0),r?An(t):t)}catch{return""+t}}function ki(e,t,r){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),e.t=="e"?yo[e.v]||e.v:t==null?gk(e,e.v):gk(e,t))}function bs(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function FP(e,t,r){var n=r||{},a=e?Array.isArray(e):n.dense,i=e||(a?[]:{}),s=0,l=0;if(i&&n.origin!=null){if(typeof n.origin=="number")s=n.origin;else{var u=typeof n.origin=="string"?Sn(n.origin):n.origin;s=u.r,l=u.c}i["!ref"]||(i["!ref"]="A1:A1")}var f={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var d=hr(i["!ref"]);f.s.c=d.s.c,f.s.r=d.s.r,f.e.c=Math.max(f.e.c,d.e.c),f.e.r=Math.max(f.e.r,d.e.r),s==-1&&(f.e.r=s=d.e.r+1)}for(var p=0;p!=t.length;++p)if(t[p]){if(!Array.isArray(t[p]))throw new Error("aoa_to_sheet expects an array of arrays");for(var x=0;x!=t[p].length;++x)if(!(typeof t[p][x]>"u")){var v={v:t[p][x]},w=s+p,b=l+x;if(f.s.r>w&&(f.s.r=w),f.s.c>b&&(f.s.c=b),f.e.r>2;return r?a/100:a}function MP(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var go=MP;function dn(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function yI(e){var t={},r=e.read_shift(1),n=r>>>1,a=e.read_shift(1),i=e.read_shift(2,"i"),s=e.read_shift(1),l=e.read_shift(1),u=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=a;var f=eo[a];f&&(t.rgb=Au(f));break;case 2:t.rgb=Au([s,l,u]);break;case 3:t.theme=a;break}return i!=0&&(t.tint=i>0?i/32767:i/32768),t}function bI(e){var t=e.read_shift(1);e.l++;var r={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return r}function IP(e,t){var r={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},n=e.read_shift(4);switch(n){case 0:return"";case 4294967295:case 4294967294:return r[e.read_shift(4)]||""}if(n>400)throw new Error("Unsupported Clipboard: "+n.toString(16));return e.l-=4,e.read_shift(0,t==1?"lpstr":"lpwstr")}function wI(e){return IP(e,1)}function _I(e){return IP(e,2)}var tw=2,Dn=3,D0=11,yk=12,hd=19,F0=64,SI=65,kI=71,TI=4108,AI=4126,zr=80,RP=81,EI=[zr,RP],jI={1:{n:"CodePage",t:tw},2:{n:"Category",t:zr},3:{n:"PresentationFormat",t:zr},4:{n:"ByteCount",t:Dn},5:{n:"LineCount",t:Dn},6:{n:"ParagraphCount",t:Dn},7:{n:"SlideCount",t:Dn},8:{n:"NoteCount",t:Dn},9:{n:"HiddenCount",t:Dn},10:{n:"MultimediaClipCount",t:Dn},11:{n:"ScaleCrop",t:D0},12:{n:"HeadingPairs",t:TI},13:{n:"TitlesOfParts",t:AI},14:{n:"Manager",t:zr},15:{n:"Company",t:zr},16:{n:"LinksUpToDate",t:D0},17:{n:"CharacterCount",t:Dn},19:{n:"SharedDoc",t:D0},22:{n:"HyperlinksChanged",t:D0},23:{n:"AppVersion",t:Dn,p:"version"},24:{n:"DigSig",t:SI},26:{n:"ContentType",t:zr},27:{n:"ContentStatus",t:zr},28:{n:"Language",t:zr},29:{n:"Version",t:zr},255:{},2147483648:{n:"Locale",t:hd},2147483651:{n:"Behavior",t:hd},1919054434:{}},OI={1:{n:"CodePage",t:tw},2:{n:"Title",t:zr},3:{n:"Subject",t:zr},4:{n:"Author",t:zr},5:{n:"Keywords",t:zr},6:{n:"Comments",t:zr},7:{n:"Template",t:zr},8:{n:"LastAuthor",t:zr},9:{n:"RevNumber",t:zr},10:{n:"EditTime",t:F0},11:{n:"LastPrinted",t:F0},12:{n:"CreatedDate",t:F0},13:{n:"ModifiedDate",t:F0},14:{n:"PageCount",t:Dn},15:{n:"WordCount",t:Dn},16:{n:"CharCount",t:Dn},17:{n:"Thumbnail",t:kI},18:{n:"Application",t:zr},19:{n:"DocSecurity",t:Dn},255:{},2147483648:{n:"Locale",t:hd},2147483651:{n:"Behavior",t:hd},1919054434:{}},bk={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},NI=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function PI(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var CI=PI([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),eo=en(CI),yo={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},LP={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},wk={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};function DI(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function FI(e){var t=DI();if(!e||!e.match)return t;var r={};if((e.match(xn)||[]).forEach(function(n){var a=mt(n);switch(a[0].replace(z8,"<")){case"0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=r,delete t.calcchains,t}var tl={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function l1(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function su(e,t){var r={"!id":{}};if(!e)return r;t.charAt(0)!=="/"&&(t="/"+t);var n={};return(e.match(xn)||[]).forEach(function(a){var i=mt(a);if(i[0]==="]*>([\\s\\S]*?)")}return e})();function BP(e){var t={};e=Qt(e);for(var r=0;r0&&(t[n[1]]=Mt(a[1])),n[2]==="date"&&t[n[1]]&&(t[n[1]]=qr(t[n[1]]))}return t}var LI=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function $P(e,t,r,n){var a=[];if(typeof e=="string")a=fk(e,n);else for(var i=0;i0)for(var f=0;f!==a.length;f+=2){switch(u=+a[f+1].v,a[f].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":r.Worksheets=u,r.SheetNames=s.slice(l,l+u);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":r.NamedRanges=u,r.DefinedNames=s.slice(l,l+u);break;case"Charts":case"Diagramme":r.Chartsheets=u,r.ChartNames=s.slice(l,l+u);break}l+=u}}function BI(e,t,r){var n={};return t||(t={}),e=Qt(e),LI.forEach(function(a){var i=(e.match(Su(a[0]))||[])[1];switch(a[2]){case"string":i&&(t[a[1]]=Mt(i));break;case"bool":t[a[1]]=i==="true";break;case"raw":var s=e.match(new RegExp("<"+a[0]+"[^>]*>([\\s\\S]*?)"));s&&s.length>0&&(n[a[1]]=s[1]);break}}),n.HeadingPairs&&n.TitlesOfParts&&$P(n.HeadingPairs,n.TitlesOfParts,t,r),t}var $I=/<[^>]+>[^<]*/g;function UI(e,t){var r={},n="",a=e.match($I);if(a)for(var i=0;i!=a.length;++i){var s=a[i],l=mt(s);switch(l[0]){case"":n=null;break;default:if(s.indexOf(""),f=u[0].slice(4),d=u[1];switch(f){case"lpstr":case"bstr":case"lpwstr":r[n]=Mt(d);break;case"bool":r[n]=ir(d);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":r[n]=parseInt(d,10);break;case"r4":case"r8":case"decimal":r[n]=parseFloat(d);break;case"filetime":case"date":r[n]=qr(d);break;case"cy":case"error":r[n]=Mt(d);break;default:if(f.slice(-1)=="/")break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",s,f,u)}}else if(s.slice(0,2)!==">3<<2),n}function HP(e){var t=e.read_shift(4),r=e.slice(e.l,e.l+t);return e.l+=t,(t&3)>0&&(e.l+=4-(t&3)&3),r}function XI(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}function pd(e,t,r){var n=e.read_shift(2),a,i=r||{};if(e.l+=2,t!==yk&&n!==t&&EI.indexOf(t)===-1&&!((t&65534)==4126&&(n&65534)==4126))throw new Error("Expected type "+t+" saw "+n);switch(t===yk?n:t){case 2:return a=e.read_shift(2,"i"),i.raw||(e.l+=2),a;case 3:return a=e.read_shift(4,"i"),a;case 11:return e.read_shift(4)!==0;case 19:return a=e.read_shift(4),a;case 30:return UP(e,n,4).replace(Tn,"");case 31:return zP(e);case 64:return rw(e);case 65:return HP(e);case 71:return XI(e);case 80:return c1(e,n,!i.raw).replace(Tn,"");case 81:return HI(e,n).replace(Tn,"");case 4108:return GI(e);case 4126:case 4127:return n==4127?qI(e):VI(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+n)}}function Sk(e,t){var r=e.l,n=e.read_shift(4),a=e.read_shift(4),i=[],s=0,l=0,u=-1,f={};for(s=0;s!=a;++s){var d=e.read_shift(4),p=e.read_shift(4);i[s]=[d,p+r]}i.sort(function(A,S){return A[1]-S[1]});var x={};for(s=0;s!=a;++s){if(e.l!==i[s][1]){var v=!0;if(s>0&&t)switch(t[i[s-1][0]].t){case 2:e.l+2===i[s][1]&&(e.l+=2,v=!1);break;case 80:e.l<=i[s][1]&&(e.l=i[s][1],v=!1);break;case 4108:e.l<=i[s][1]&&(e.l=i[s][1],v=!1);break}if((!t||s==0)&&e.l<=i[s][1]&&(v=!1,e.l=i[s][1]),v)throw new Error("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(t){var w=t[i[s][0]];if(x[w.n]=pd(e,w.t,{raw:!0}),w.p==="version"&&(x[w.n]=String(x[w.n]>>16)+"."+("0000"+String(x[w.n]&65535)).slice(-4)),w.n=="CodePage")switch(x[w.n]){case 0:x[w.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:Na(l=x[w.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+x[w.n])}}else if(i[s][0]===1){if(l=x.CodePage=pd(e,tw),Na(l),u!==-1){var b=e.l;e.l=i[u][1],f=_k(e,l),e.l=b}}else if(i[s][0]===0){if(l===0){u=s,e.l=i[s+1][1];continue}f=_k(e,l)}else{var g=f[i[s][0]],k;switch(e[e.l]){case 65:e.l+=4,k=HP(e);break;case 30:e.l+=4,k=c1(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4,k=c1(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,k=e.read_shift(4,"i");break;case 19:e.l+=4,k=e.read_shift(4);break;case 5:e.l+=4,k=e.read_shift(8,"f");break;case 11:e.l+=4,k=vr(e,4);break;case 64:e.l+=4,k=qr(rw(e));break;default:throw new Error("unparsed value: "+e[e.l])}x[g]=k}}return e.l=r+n,x}function kk(e,t,r){var n=e.content;if(!n)return{};Zr(n,0);var a,i,s,l,u=0;n.chk("feff","Byte Order: "),n.read_shift(2);var f=n.read_shift(4),d=n.read_shift(16);if(d!==Ct.utils.consts.HEADER_CLSID&&d!==r)throw new Error("Bad PropertySet CLSID "+d);if(a=n.read_shift(4),a!==1&&a!==2)throw new Error("Unrecognized #Sets: "+a);if(i=n.read_shift(16),l=n.read_shift(4),a===1&&l!==n.l)throw new Error("Length mismatch: "+l+" !== "+n.l);a===2&&(s=n.read_shift(16),u=n.read_shift(4));var p=Sk(n,t),x={SystemIdentifier:f};for(var v in p)x[v]=p[v];if(x.FMTID=i,a===1)return x;if(u-n.l==2&&(n.l+=2),n.l!==u)throw new Error("Length mismatch 2: "+n.l+" !== "+u);var w;try{w=Sk(n,null)}catch{}for(v in w)x[v]=w[v];return x.FMTID=[i,s],x}function Qi(e,t){return e.read_shift(t),null}function YI(e,t,r){for(var n=[],a=e.l+t;e.l=12?2:1),a="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var i=e.read_shift(1);i&&(a="dbcs-cont")}else r.biff==12&&(a="wstr");r.biff>=2&&r.biff<=5&&(a="cpstr");var s=n?e.read_shift(n,a):"";return s}function JI(e){var t=e.read_shift(2),r=e.read_shift(1),n=r&4,a=r&8,i=1+(r&1),s=0,l,u={};a&&(s=e.read_shift(2)),n&&(l=e.read_shift(4));var f=i==2?"dbcs-cont":"sbcs-cont",d=t===0?"":e.read_shift(t,f);return a&&(e.l+=4*s),n&&(e.l+=l),u.t=d,a||(u.raw=""+u.t+"",u.r=u.t),u}function oo(e,t,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var a=e.read_shift(1);return a===0?n=e.read_shift(t,"sbcs-cont"):n=e.read_shift(t,"dbcs-cont"),n}function mf(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):oo(e,n,r)}function bo(e,t,r){if(r.biff>5)return mf(e,t,r);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function QI(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);return e.l+=2,[t,r]}function eR(e){var t=e.read_shift(4),r=e.l,n=!1;t>24&&(e.l+=t-24,e.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(n=!0),e.l=r);var a=e.read_shift((n?t-24:t)>>1,"utf16le").replace(Tn,"");return n&&(e.l+=24),a}function tR(e){for(var t=e.read_shift(2),r="";t-- >0;)r+="../";var n=e.read_shift(0,"lpstr-ansi");if(e.l+=2,e.read_shift(2)!=57005)throw new Error("Bad FileMoniker");var a=e.read_shift(4);if(a===0)return r+n.replace(/\\/g,"/");var i=e.read_shift(4);if(e.read_shift(2)!=3)throw new Error("Bad FileMoniker");var s=e.read_shift(i>>1,"utf16le").replace(Tn,"");return r+s}function rR(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return eR(e);case"0303000000000000c000000000000046":return tR(e);default:throw new Error("Unsupported Moniker "+r)}}function M0(e){var t=e.read_shift(4),r=t>0?e.read_shift(t,"utf16le").replace(Tn,""):"";return r}function nR(e,t){var r=e.l+t,n=e.read_shift(4);if(n!==2)throw new Error("Unrecognized streamVersion: "+n);var a=e.read_shift(2);e.l+=2;var i,s,l,u,f="",d,p;a&16&&(i=M0(e,r-e.l)),a&128&&(s=M0(e,r-e.l)),(a&257)===257&&(l=M0(e,r-e.l)),(a&257)===1&&(u=rR(e,r-e.l)),a&8&&(f=M0(e,r-e.l)),a&32&&(d=e.read_shift(16)),a&64&&(p=rw(e)),e.l=r;var x=s||l||u||"";x&&f&&(x+="#"+f),x||(x="#"+f),a&2&&x.charAt(0)=="/"&&x.charAt(1)!="/"&&(x="file://"+x);var v={Target:x};return d&&(v.guid=d),p&&(v.time=p),i&&(v.Tooltip=i),v}function VP(e){var t=e.read_shift(1),r=e.read_shift(1),n=e.read_shift(1),a=e.read_shift(1);return[t,r,n,a]}function KP(e,t){var r=VP(e);return r[3]=0,r}function ei(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return{r:t,c:r,ixfe:n}}function aR(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}function iR(e,t,r){return t===0?"":bo(e,t,r)}function sR(e,t,r){var n=r.biff>8?4:2,a=e.read_shift(n),i=e.read_shift(n,"i"),s=e.read_shift(n,"i");return[a,i,s]}function GP(e){var t=e.read_shift(2),r=ew(e);return[t,r]}function oR(e,t,r){e.l+=4,t-=4;var n=e.l+t,a=pf(e,t,r),i=e.read_shift(2);if(n-=e.l,i!==n)throw new Error("Malformed AddinUdf: padding = "+n+" != "+i);return e.l+=i,a}function wh(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),a=e.read_shift(2);return{s:{c:n,r:t},e:{c:a,r}}}function XP(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(1),a=e.read_shift(1);return{s:{c:n,r:t},e:{c:a,r}}}var lR=XP;function YP(e){e.l+=4;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return e.l+=12,[r,t,n]}function cR(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t}function uR(e){var t={};return e.l+=4,e.cf=e.read_shift(2),t}function on(e){e.l+=2,e.l+=e.read_shift(2)}var fR={0:on,4:on,5:on,6:on,7:uR,8:on,9:on,10:on,11:on,12:on,13:cR,14:on,15:on,16:on,17:on,18:on,19:on,20:on,21:YP};function dR(e,t){for(var r=e.l+t,n=[];e.l=2&&(r.dt=e.read_shift(2),e.l-=2),r.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+r.BIFFVer)}return e.read_shift(t),r}function hR(e,t){return t===0||e.read_shift(2),1200}function pR(e,t,r){if(r.enc)return e.l+=t,"";var n=e.l,a=bo(e,0,r);return e.read_shift(t+n-e.l),a}function mR(e,t,r){var n=r&&r.biff==8||t==2?e.read_shift(2):(e.l+=t,0);return{fDialog:n&16,fBelow:n&64,fRight:n&128}}function xR(e,t,r){var n=e.read_shift(4),a=e.read_shift(1)&3,i=e.read_shift(1);switch(i){case 0:i="Worksheet";break;case 1:i="Macrosheet";break;case 2:i="Chartsheet";break;case 6:i="VBAModule";break}var s=pf(e,0,r);return s.length===0&&(s="Sheet1"),{pos:n,hs:a,dt:i,name:s}}function vR(e,t){for(var r=e.l+t,n=e.read_shift(4),a=e.read_shift(4),i=[],s=0;s!=a&&e.l>15),a&=32767);var i={Unsynced:n&1,DyZero:(n&2)>>1,ExAsc:(n&4)>>2,ExDsc:(n&8)>>3};return[i,a]}function _R(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2),s=e.read_shift(2),l=e.read_shift(2),u=e.read_shift(2),f=e.read_shift(2);return{Pos:[t,r],Dim:[n,a],Flags:i,CurTab:s,FirstTab:l,Selected:u,TabRatio:f}}function SR(e,t,r){if(r&&r.biff>=2&&r.biff<5)return{};var n=e.read_shift(2);return{RTL:n&64}}function kR(){}function TR(e,t,r){var n={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(r&&r.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10;break}return n.name=pf(e,0,r),n}function AR(e){var t=ei(e);return t.isst=e.read_shift(4),t}function ER(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=e.l+t,a=ei(e);r.biff==2&&e.l++;var i=mf(e,n-e.l,r);return a.val=i,a}function jR(e,t,r){var n=e.read_shift(2),a=bo(e,0,r);return[n,a]}var OR=bo;function Ak(e,t,r){var n=e.l+t,a=r.biff==8||!r.biff?4:2,i=e.read_shift(a),s=e.read_shift(a),l=e.read_shift(2),u=e.read_shift(2);return e.l=n,{s:{r:i,c:l},e:{r:s,c:u}}}function NR(e){var t=e.read_shift(2),r=e.read_shift(2),n=GP(e);return{r:t,c:r,ixfe:n[0],rknum:n[1]}}function PR(e,t){for(var r=e.l+t-2,n=e.read_shift(2),a=e.read_shift(2),i=[];e.l>26],n.cellStyles&&(a.alc=i&7,a.fWrap=i>>3&1,a.alcV=i>>4&7,a.fJustLast=i>>7&1,a.trot=i>>8&255,a.cIndent=i>>16&15,a.fShrinkToFit=i>>20&1,a.iReadOrder=i>>22&2,a.fAtrNum=i>>26&1,a.fAtrFnt=i>>27&1,a.fAtrAlc=i>>28&1,a.fAtrBdr=i>>29&1,a.fAtrPat=i>>30&1,a.fAtrProt=i>>31&1,a.dgLeft=s&15,a.dgRight=s>>4&15,a.dgTop=s>>8&15,a.dgBottom=s>>12&15,a.icvLeft=s>>16&127,a.icvRight=s>>23&127,a.grbitDiag=s>>30&3,a.icvTop=l&127,a.icvBottom=l>>7&127,a.icvDiag=l>>14&127,a.dgDiag=l>>21&15,a.icvFore=u&127,a.icvBack=u>>7&127,a.fsxButton=u>>14&1),a}function FR(e,t,r){var n={};return n.ifnt=e.read_shift(2),n.numFmtId=e.read_shift(2),n.flags=e.read_shift(2),n.fStyle=n.flags>>2&1,t-=6,n.data=DR(e,t,n.fStyle,r),n}function MR(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(t[0]!==0&&t[0]--,t[1]!==0&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}function Ek(e,t,r){var n=ei(e);(r.biff==2||t==9)&&++e.l;var a=ZI(e);return n.val=a,n.t=a===!0||a===!1?"b":"e",n}function IR(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=ei(e),a=dn(e);return n.val=a,n}var jk=iR;function RR(e,t,r){var n=e.l+t,a=e.read_shift(2),i=e.read_shift(2);if(r.sbcch=i,i==1025||i==14849)return[i,a];if(i<1||i>255)throw new Error("Unexpected SupBook type: "+i);for(var s=oo(e,i),l=[];n>e.l;)l.push(mf(e));return[i,a,s,l]}function Ok(e,t,r){var n=e.read_shift(2),a,i={fBuiltIn:n&1,fWantAdvise:n>>>1&1,fWantPict:n>>>2&1,fOle:n>>>3&1,fOleLink:n>>>4&1,cf:n>>>5&1023,fIcon:n>>>15&1};return r.sbcch===14849&&(a=oR(e,t-2,r)),i.body=a||e.read_shift(t-2),typeof a=="string"&&(i.Name=a),i}var LR=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function Nk(e,t,r){var n=e.l+t,a=e.read_shift(2),i=e.read_shift(1),s=e.read_shift(1),l=e.read_shift(r&&r.biff==2?1:2),u=0;(!r||r.biff>=5)&&(r.biff!=5&&(e.l+=2),u=e.read_shift(2),r.biff==5&&(e.l+=2),e.l+=4);var f=oo(e,s,r);a&32&&(f=LR[f.charCodeAt(0)]);var d=n-e.l;r&&r.biff==2&&--d;var p=n==e.l||l===0||!(d>0)?[]:y$(e,d,r,l);return{chKey:i,Name:f,itab:u,rgce:p}}function ZP(e,t,r){if(r.biff<8)return BR(e,t,r);for(var n=[],a=e.l+t,i=e.read_shift(r.biff>8?4:2);i--!==0;)n.push(sR(e,r.biff>8?12:6,r));if(e.l!=a)throw new Error("Bad ExternSheet: "+e.l+" != "+a);return n}function BR(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=pf(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function $R(e,t,r){if(r.biff<8){e.l+=t;return}var n=e.read_shift(2),a=e.read_shift(2),i=oo(e,n,r),s=oo(e,a,r);return[i,s]}function UR(e,t,r){var n=XP(e);e.l++;var a=e.read_shift(1);return t-=8,[b$(e,t,r),a,n]}function Pk(e,t,r){var n=lR(e);switch(r.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[n,v$(e,t,r)]}function zR(e){var t=e.read_shift(4)!==0,r=e.read_shift(4)!==0,n=e.read_shift(4);return[t,r,n]}function WR(e,t,r){if(!(r.biff<8)){var n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2),s=e.read_shift(2),l=bo(e,0,r);return r.biff<8&&e.read_shift(1),[{r:n,c:a},l,s,i]}}function HR(e,t,r){return WR(e,t,r)}function qR(e,t){for(var r=[],n=e.read_shift(2);n--;)r.push(wh(e));return r}function VR(e,t,r){if(r&&r.biff<8)return GR(e,t,r);var n=YP(e),a=dR(e,t-22,n[1]);return{cmo:n,ft:a}}var KR={8:function(e,t){var r=e.l+t;e.l+=10;var n=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var a=e.read_shift(1);return e.l+=a,e.l=r,{fmt:n}}};function GR(e,t,r){e.l+=4;var n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6,t-=36;var s=[];return s.push((KR[n]||mn)(e,t,r)),{cmo:[a,n,i],ft:s}}function XR(e,t,r){var n=e.l,a="";try{e.l+=4;var i=(r.lastobj||{cmo:[0,0]}).cmo[1],s;[0,5,7,11,12,14].indexOf(i)==-1?e.l+=6:s=QI(e,6,r);var l=e.read_shift(2);e.read_shift(2),_r(e,2);var u=e.read_shift(2);e.l+=u;for(var f=1;f=(d?l:2*l))break}if(a.length!==l&&a.length!==l*2)throw new Error("cchText: "+l+" != "+a.length);return e.l=n+t,{t:a}}catch{return e.l=n+t,{t:a}}}function YR(e,t){var r=wh(e);e.l+=16;var n=nR(e,t-24);return[r,n]}function ZR(e,t){e.read_shift(2);var r=wh(e),n=e.read_shift((t-10)/2,"dbcs-cont");return n=n.replace(Tn,""),[r,n]}function JR(e){var t=[0,0],r;return r=e.read_shift(2),t[0]=bk[r]||r,r=e.read_shift(2),t[1]=bk[r]||r,t}function QR(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(KP(e));return r}function e6(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(KP(e));return r}function t6(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t}function JP(e,t,r){if(!r.cellStyles)return mn(e,t);var n=r&&r.biff>=12?4:2,a=e.read_shift(n),i=e.read_shift(n),s=e.read_shift(n),l=e.read_shift(n),u=e.read_shift(2);n==2&&(e.l+=2);var f={s:a,e:i,w:s,ixfe:l,flags:u};return(r.biff>=5||!r.biff)&&(f.level=u>>8&7),f}function r6(e,t){var r={};return t<32||(e.l+=16,r.header=dn(e),r.footer=dn(e),e.l+=2),r}function n6(e,t,r){var n={area:!1};if(r.biff!=5)return e.l+=t,n;var a=e.read_shift(1);return e.l+=3,a&16&&(n.area=!0),n}var a6=ei,i6=qP,s6=mf;function o6(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),a={fmt:t,env:r,len:n,data:e.slice(e.l,e.l+n)};return e.l+=n,a}function l6(e,t,r){r.biffguess&&r.biff==5&&(r.biff=2);var n=ei(e);++e.l;var a=bo(e,t-7,r);return n.t="str",n.val=a,n}function c6(e){var t=ei(e);++e.l;var r=dn(e);return t.t="n",t.val=r,t}function u6(e){var t=ei(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}function f6(e){var t=e.read_shift(1);return t===0?(e.l++,""):e.read_shift(t,"sbcs-cont")}function d6(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}function h6(e,t,r){var n=e.l+t,a=ei(e),i=e.read_shift(2),s=oo(e,i,r);return e.l=n,a.t="str",a.val=s,a}var p6=[2,3,48,49,131,139,140,245],Ck=(function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=qb({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(l,u){var f=[],d=gs(1);switch(u.type){case"base64":d=ja(Yn(l));break;case"binary":d=ja(l);break;case"buffer":case"array":d=l;break}Zr(d,0);var p=d.read_shift(1),x=!!(p&136),v=!1,w=!1;switch(p){case 2:break;case 3:break;case 48:v=!0,x=!0;break;case 49:v=!0,x=!0;break;case 131:break;case 139:break;case 140:w=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+p.toString(16))}var b=0,g=521;p==2&&(b=d.read_shift(2)),d.l+=3,p!=2&&(b=d.read_shift(4)),b>1048576&&(b=1e6),p!=2&&(g=d.read_shift(2));var k=d.read_shift(2),A=u.codepage||1252;p!=2&&(d.l+=16,d.read_shift(1),d[d.l]!==0&&(A=e[d[d.l]]),d.l+=1,d.l+=2),w&&(d.l+=36);for(var S=[],N={},T=Math.min(d.length,p==2?521:g-10-(v?264:0)),E=w?32:11;d.l0;){if(d[d.l]===42){d.l+=k;continue}for(++d.l,f[++j]=[],D=0,D=0;D!=S.length;++D){var P=d.slice(d.l,d.l+S[D].len);d.l+=S[D].len,Zr(P,0);var H=wu.utils.decode(A,P);switch(S[D].type){case"C":H.trim().length&&(f[j][D]=H.replace(/\s+$/,""));break;case"D":H.length===8?f[j][D]=new Date(+H.slice(0,4),+H.slice(4,6)-1,+H.slice(6,8)):f[j][D]=H;break;case"F":f[j][D]=parseFloat(H.trim());break;case"+":case"I":f[j][D]=w?P.read_shift(-4,"i")^2147483648:P.read_shift(4,"i");break;case"L":switch(H.trim().toUpperCase()){case"Y":case"T":f[j][D]=!0;break;case"N":case"F":f[j][D]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+H+"|")}break;case"M":if(!x)throw new Error("DBF Unexpected MEMO for type "+p.toString(16));f[j][D]="##MEMO##"+(w?parseInt(H.trim(),10):P.read_shift(4));break;case"N":H=H.replace(/\u0000/g,"").trim(),H&&H!="."&&(f[j][D]=+H||0);break;case"@":f[j][D]=new Date(P.read_shift(-8,"f")-621356832e5);break;case"T":f[j][D]=new Date((P.read_shift(4)-2440588)*864e5+P.read_shift(4));break;case"Y":f[j][D]=P.read_shift(4,"i")/1e4+P.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":f[j][D]=-P.read_shift(-8,"f");break;case"B":if(v&&S[D].len==8){f[j][D]=P.read_shift(8,"f");break}case"G":case"P":P.l+=S[D].len;break;case"0":if(S[D].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+S[D].type)}}}if(p!=2&&d.l=0&&Na(+f.codepage),f.type=="string")throw new Error("Cannot write DBF to JS string");var d=s1(),p=m1(l,{header:1,raw:!0,cellDates:!0}),x=p[0],v=p.slice(1),w=l["!cols"]||[],b=0,g=0,k=0,A=1;for(b=0;b250&&(P=250),D=((w[b]||{}).DBF||{}).type,D=="C"&&w[b].DBF.len>P&&(P=w[b].DBF.len),j=="B"&&D=="N"&&(j="N",E[b]=w[b].DBF.dec,P=w[b].DBF.len),T[b]=j=="C"||D=="N"?P:i[j]||0,A+=T[b],N[b]=j}var U=d.next(32);for(U.write_shift(4,318902576),U.write_shift(4,v.length),U.write_shift(2,296+32*k),U.write_shift(2,A),b=0;b<4;++b)U.write_shift(4,0);for(U.write_shift(4,0|(+t[ZN]||3)<<8),b=0,g=0;b":190,"?":191,"{":223},t=new RegExp("\x1BN("+Za(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(x,v){var w=e[v];return typeof w=="number"?GS(w):w},n=function(x,v,w){var b=v.charCodeAt(0)-32<<4|w.charCodeAt(0)-48;return b==59?x:GS(b)};e["|"]=254;function a(x,v){switch(v.type){case"base64":return i(Yn(x),v);case"binary":return i(x,v);case"buffer":return i(Pt&&Buffer.isBuffer(x)?x.toString("binary"):xo(x),v);case"array":return i(so(x),v)}throw new Error("Unrecognized type "+v.type)}function i(x,v){var w=x.split(/[\n\r]+/),b=-1,g=-1,k=0,A=0,S=[],N=[],T=null,E={},j=[],D=[],P=[],H=0,U;for(+v.codepage>=0&&Na(+v.codepage);k!==w.length;++k){H=0;var B=w[k].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),V=B.replace(/;;/g,"\0").split(";").map(function(R){return R.replace(/\u0000/g,";")}),W=V[0],G;if(B.length>0)switch(W){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":V[1].charAt(0)=="P"&&N.push(B.slice(3).replace(/;;/g,";"));break;case"C":var ne=!1,te=!1,oe=!1,z=!1,ie=-1,K=-1;for(A=1;A-1&&S[ie][K];if(!re||!re[1])throw new Error("SYLK shared formula cannot find base");S[b][g][1]=l3(re[1],{r:b-ie,c:g-K})}break;case"F":var F=0;for(A=1;A0?(j[b].hpt=H,j[b].hpx=Eu(H)):H===0&&(j[b].hidden=!0);break;default:if(v&&v.WTF)throw new Error("SYLK bad record "+B)}F<1&&(T=null);break;default:if(v&&v.WTF)throw new Error("SYLK bad record "+B)}}return j.length>0&&(E["!rows"]=j),D.length>0&&(E["!cols"]=D),v&&v.sheetRows&&(S=S.slice(0,v.sheetRows)),[S,E]}function s(x,v){var w=a(x,v),b=w[0],g=w[1],k=Wl(b,v);return Za(g).forEach(function(A){k[A]=g[A]}),k}function l(x,v){return bs(s(x,v),v)}function u(x,v,w,b){var g="C;Y"+(w+1)+";X"+(b+1)+";K";switch(x.t){case"n":g+=x.v||0,x.f&&!x.F&&(g+=";E"+tB(x.f,{r:w,c:b}));break;case"b":g+=x.v?"TRUE":"FALSE";break;case"e":g+=x.w||x.v;break;case"d":g+='"'+(x.w||x.v)+'"';break;case"s":g+='"'+x.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return g}function f(x,v){v.forEach(function(w,b){var g="F;W"+(b+1)+" "+(b+1)+" ";w.hidden?g+="0":(typeof w.width=="number"&&!w.wpx&&(w.wpx=xd(w.width)),typeof w.wpx=="number"&&!w.wch&&(w.wch=vd(w.wpx)),typeof w.wch=="number"&&(g+=Math.round(w.wch))),g.charAt(g.length-1)!=" "&&x.push(g)})}function d(x,v){v.forEach(function(w,b){var g="F;";w.hidden?g+="M0;":w.hpt?g+="M"+20*w.hpt+";":w.hpx&&(g+="M"+20*i3(w.hpx)+";"),g.length>2&&x.push(g+"R"+(b+1))})}function p(x,v){var w=["ID;PWXL;N;E"],b=[],g=hr(x["!ref"]),k,A=Array.isArray(x),S=`\r +`;w.push("P;PGeneral"),w.push("F;P0;DG0G8;M255"),x["!cols"]&&f(w,x["!cols"]),x["!rows"]&&d(w,x["!rows"]),w.push("B;Y"+(g.e.r-g.s.r+1)+";X"+(g.e.c-g.s.c+1)+";D"+[g.s.c,g.s.r,g.e.c,g.e.r].join(" "));for(var N=g.s.r;N<=g.e.r;++N)for(var T=g.s.c;T<=g.e.c;++T){var E=bt({r:N,c:T});k=A?(x[N]||[])[T]:x[E],!(!k||k.v==null&&(!k.f||k.F))&&b.push(u(k,x,N,T))}return w.join(S)+S+b.join(S)+S+"E"+S}return{to_workbook:l,to_sheet:s,from_sheet:p}})(),x6=(function(){function e(i,s){switch(s.type){case"base64":return t(Yn(i),s);case"binary":return t(i,s);case"buffer":return t(Pt&&Buffer.isBuffer(i)?i.toString("binary"):xo(i),s);case"array":return t(so(i),s)}throw new Error("Unrecognized type "+s.type)}function t(i,s){for(var l=i.split(` +`),u=-1,f=-1,d=0,p=[];d!==l.length;++d){if(l[d].trim()==="BOT"){p[++u]=[],f=0;continue}if(!(u<0)){var x=l[d].trim().split(","),v=x[0],w=x[1];++d;for(var b=l[d]||"";(b.match(/["]/g)||[]).length&1&&d=0&&w[b].length===0;)--b;for(var g=10,k=0,A=0;A<=b;++A)k=w[A].indexOf(" "),k==-1?k=w[A].length:k++,g=Math.max(g,k);for(A=0;A<=b;++A){v[A]=[];var S=0;for(e(w[A].slice(0,g).trim(),v,A,S,x),S=1;S<=(w[A].length-g)/10+1;++S)e(w[A].slice(g+(S-1)*10,g+S*10).trim(),v,A,S,x)}return x.sheetRows&&(v=v.slice(0,x.sheetRows)),v}var r={44:",",9:" ",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function a(d){for(var p={},x=!1,v=0,w=0;v0&&H(),w["!ref"]=Dt(b),w}function s(d,p){return!(p&&p.PRN)||p.FS||d.slice(0,4)=="sep="||d.indexOf(" ")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?i(d,p):Wl(t(d,p),p)}function l(d,p){var x="",v=p.type=="string"?[0,0,0,0]:uw(d,p);switch(p.type){case"base64":x=Yn(d);break;case"binary":x=d;break;case"buffer":p.codepage==65001?x=d.toString("utf8"):p.codepage&&typeof wu<"u"||(x=Pt&&Buffer.isBuffer(d)?d.toString("binary"):xo(d));break;case"array":x=so(d);break;case"string":x=d;break;default:throw new Error("Unrecognized type "+p.type)}return v[0]==239&&v[1]==187&&v[2]==191?x=Qt(x.slice(3)):p.type!="string"&&p.type!="buffer"&&p.codepage==65001?x=Qt(x):p.type=="binary"&&typeof wu<"u",x.slice(0,19)=="socialcalc:version:"?v6.to_sheet(p.type=="string"?x:Qt(x),p):s(x,p)}function u(d,p){return bs(l(d,p),p)}function f(d){for(var p=[],x=hr(d["!ref"]),v,w=Array.isArray(d),b=x.s.r;b<=x.e.r;++b){for(var g=[],k=x.s.c;k<=x.e.c;++k){var A=bt({r:b,c:k});if(v=w?(d[b]||[])[k]:d[A],!v||v.v==null){g.push(" ");continue}for(var S=(v.w||(ki(v),v.w)||"").slice(0,10);S.length<10;)S+=" ";g.push(S+(k===0?" ":""))}p.push(g.join(""))}return p.join(` +`)}return{to_workbook:u,to_sheet:l,from_sheet:f}})();function g6(e,t){var r=t||{},n=!!r.WTF;r.WTF=!0;try{var a=m6.to_workbook(e,r);return r.WTF=n,a}catch(i){if(r.WTF=n,!i.message.match(/SYLK bad record ID/)&&n)throw i;return Tu.to_workbook(e,t)}}var lu=(function(){function e(C,re,F){if(C){Zr(C,C.l||0);for(var R=F.Enum||ie;C.l=16&&C[14]==5&&C[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(C[2]==2)F.Enum=ie,e(C,function(Se,Je,pt){switch(pt){case 0:F.vers=Se,Se>=4096&&(F.qpro=!0);break;case 6:I=Se;break;case 204:Se&&(fe=Se);break;case 222:fe=Se;break;case 15:case 51:F.qpro||(Se[1].v=Se[1].v.slice(1));case 13:case 14:case 16:pt==14&&(Se[2]&112)==112&&(Se[2]&15)>1&&(Se[2]&15)<15&&(Se[1].z=F.dateNF||kt[14],F.cellDates&&(Se[1].t="d",Se[1].v=bh(Se[1].v))),F.qpro&&Se[3]>ce&&(R["!ref"]=Dt(I),se[Y]=R,he.push(Y),R=F.dense?[]:{},I={s:{r:0,c:0},e:{r:0,c:0}},ce=Se[3],Y=fe||"Sheet"+(ce+1),fe="");var Ge=F.dense?(R[Se[0].r]||[])[Se[0].c]:R[bt(Se[0])];if(Ge){Ge.t=Se[1].t,Ge.v=Se[1].v,Se[1].z!=null&&(Ge.z=Se[1].z),Se[1].f!=null&&(Ge.f=Se[1].f);break}F.dense?(R[Se[0].r]||(R[Se[0].r]=[]),R[Se[0].r][Se[0].c]=Se[1]):R[bt(Se[0])]=Se[1];break}},F);else if(C[2]==26||C[2]==14)F.Enum=K,C[2]==14&&(F.qpro=!0,C.l=0),e(C,function(Se,Je,pt){switch(pt){case 204:Y=Se;break;case 22:Se[1].v=Se[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(Se[3]>ce&&(R["!ref"]=Dt(I),se[Y]=R,he.push(Y),R=F.dense?[]:{},I={s:{r:0,c:0},e:{r:0,c:0}},ce=Se[3],Y="Sheet"+(ce+1)),qe>0&&Se[0].r>=qe)break;F.dense?(R[Se[0].r]||(R[Se[0].r]=[]),R[Se[0].r][Se[0].c]=Se[1]):R[bt(Se[0])]=Se[1],I.e.c=0&&Na(+F.codepage),F.type=="string")throw new Error("Cannot write WK1 to JS string");var R=s1(),Y=hr(C["!ref"]),fe=Array.isArray(C),ce=[];ka(R,0,i(1030)),ka(R,6,u(Y));for(var se=Math.min(Y.e.r,8191),he=Y.s.r;he<=se;++he)for(var Ce=tn(he),I=Y.s.c;I<=Y.e.c;++I){he===Y.s.r&&(ce[I]=Cr(I));var qe=ce[I]+Ce,Ne=fe?(C[he]||[])[I]:C[qe];if(!(!Ne||Ne.t=="z"))if(Ne.t=="n")(Ne.v|0)==Ne.v&&Ne.v>=-32768&&Ne.v<=32767?ka(R,13,v(he,I,Ne.v)):ka(R,14,b(he,I,Ne.v));else{var De=ki(Ne);ka(R,15,p(he,I,De.slice(0,239)))}}return ka(R,1),R.end()}function a(C,re){var F=re||{};if(+F.codepage>=0&&Na(+F.codepage),F.type=="string")throw new Error("Cannot write WK3 to JS string");var R=s1();ka(R,0,s(C));for(var Y=0,fe=0;Y8191&&(F=8191),re.write_shift(2,F),re.write_shift(1,Y),re.write_shift(1,R),re.write_shift(2,0),re.write_shift(2,0),re.write_shift(1,1),re.write_shift(1,2),re.write_shift(4,0),re.write_shift(4,0),re}function l(C,re,F){var R={s:{c:0,r:0},e:{c:0,r:0}};return re==8&&F.qpro?(R.s.c=C.read_shift(1),C.l++,R.s.r=C.read_shift(2),R.e.c=C.read_shift(1),C.l++,R.e.r=C.read_shift(2),R):(R.s.c=C.read_shift(2),R.s.r=C.read_shift(2),re==12&&F.qpro&&(C.l+=2),R.e.c=C.read_shift(2),R.e.r=C.read_shift(2),re==12&&F.qpro&&(C.l+=2),R.s.c==65535&&(R.s.c=R.e.c=R.s.r=R.e.r=0),R)}function u(C){var re=Pr(8);return re.write_shift(2,C.s.c),re.write_shift(2,C.s.r),re.write_shift(2,C.e.c),re.write_shift(2,C.e.r),re}function f(C,re,F){var R=[{c:0,r:0},{t:"n",v:0},0,0];return F.qpro&&F.vers!=20768?(R[0].c=C.read_shift(1),R[3]=C.read_shift(1),R[0].r=C.read_shift(2),C.l+=2):(R[2]=C.read_shift(1),R[0].c=C.read_shift(2),R[0].r=C.read_shift(2)),R}function d(C,re,F){var R=C.l+re,Y=f(C,re,F);if(Y[1].t="s",F.vers==20768){C.l++;var fe=C.read_shift(1);return Y[1].v=C.read_shift(fe,"utf8"),Y}return F.qpro&&C.l++,Y[1].v=C.read_shift(R-C.l,"cstr"),Y}function p(C,re,F){var R=Pr(7+F.length);R.write_shift(1,255),R.write_shift(2,re),R.write_shift(2,C),R.write_shift(1,39);for(var Y=0;Y=128?95:fe)}return R.write_shift(1,0),R}function x(C,re,F){var R=f(C,re,F);return R[1].v=C.read_shift(2,"i"),R}function v(C,re,F){var R=Pr(7);return R.write_shift(1,255),R.write_shift(2,re),R.write_shift(2,C),R.write_shift(2,F,"i"),R}function w(C,re,F){var R=f(C,re,F);return R[1].v=C.read_shift(8,"f"),R}function b(C,re,F){var R=Pr(13);return R.write_shift(1,255),R.write_shift(2,re),R.write_shift(2,C),R.write_shift(8,F,"f"),R}function g(C,re,F){var R=C.l+re,Y=f(C,re,F);if(Y[1].v=C.read_shift(8,"f"),F.qpro)C.l=R;else{var fe=C.read_shift(2);N(C.slice(C.l,C.l+fe),Y),C.l+=fe}return Y}function k(C,re,F){var R=re&32768;return re&=-32769,re=(R?C:0)+(re>=8192?re-16384:re),(R?"":"$")+(F?Cr(re):tn(re))}var A={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},S=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function N(C,re){Zr(C,0);for(var F=[],R=0,Y="",fe="",ce="",se="";C.lF.length){console.error("WK1 bad formula parse 0x"+he.toString(16)+":|"+F.join("|")+"|");return}var Ne=F.slice(-R);F.length-=R,F.push(A[he][0]+"("+Ne.join(",")+")")}else return he<=7?console.error("WK1 invalid opcode "+he.toString(16)):he<=24?console.error("WK1 unsupported op "+he.toString(16)):he<=30?console.error("WK1 invalid opcode "+he.toString(16)):he<=115?console.error("WK1 unsupported function opcode "+he.toString(16)):console.error("WK1 unrecognized opcode "+he.toString(16))}}F.length==1?re[1].f=""+F[0]:console.error("WK1 bad formula parse |"+F.join("|")+"|")}function T(C){var re=[{c:0,r:0},{t:"n",v:0},0];return re[0].r=C.read_shift(2),re[3]=C[C.l++],re[0].c=C[C.l++],re}function E(C,re){var F=T(C);return F[1].t="s",F[1].v=C.read_shift(re-4,"cstr"),F}function j(C,re,F,R){var Y=Pr(6+R.length);Y.write_shift(2,C),Y.write_shift(1,F),Y.write_shift(1,re),Y.write_shift(1,39);for(var fe=0;fe=128?95:ce)}return Y.write_shift(1,0),Y}function D(C,re){var F=T(C);F[1].v=C.read_shift(2);var R=F[1].v>>1;if(F[1].v&1)switch(R&7){case 0:R=(R>>3)*5e3;break;case 1:R=(R>>3)*500;break;case 2:R=(R>>3)/20;break;case 3:R=(R>>3)/200;break;case 4:R=(R>>3)/2e3;break;case 5:R=(R>>3)/2e4;break;case 6:R=(R>>3)/16;break;case 7:R=(R>>3)/64;break}return F[1].v=R,F}function P(C,re){var F=T(C),R=C.read_shift(4),Y=C.read_shift(4),fe=C.read_shift(2);if(fe==65535)return R===0&&Y===3221225472?(F[1].t="e",F[1].v=15):R===0&&Y===3489660928?(F[1].t="e",F[1].v=42):F[1].v=0,F;var ce=fe&32768;return fe=(fe&32767)-16446,F[1].v=(1-ce*2)*(Y*Math.pow(2,fe+32)+R*Math.pow(2,fe)),F}function H(C,re,F,R){var Y=Pr(14);if(Y.write_shift(2,C),Y.write_shift(1,F),Y.write_shift(1,re),R==0)return Y.write_shift(4,0),Y.write_shift(4,0),Y.write_shift(2,65535),Y;var fe=0,ce=0,se=0,he=0;return R<0&&(fe=1,R=-R),ce=Math.log2(R)|0,R/=Math.pow(2,ce-31),he=R>>>0,(he&2147483648)==0&&(R/=2,++ce,he=R>>>0),R-=he,he|=2147483648,he>>>=0,R*=Math.pow(2,32),se=R>>>0,Y.write_shift(4,se),Y.write_shift(4,he),ce+=16383+(fe?32768:0),Y.write_shift(2,ce),Y}function U(C,re){var F=P(C);return C.l+=re-14,F}function B(C,re){var F=T(C),R=C.read_shift(4);return F[1].v=R>>6,F}function V(C,re){var F=T(C),R=C.read_shift(8,"f");return F[1].v=R,F}function W(C,re){var F=V(C);return C.l+=re-10,F}function G(C,re){return C[C.l+re-1]==0?C.read_shift(re,"cstr"):""}function ne(C,re){var F=C[C.l++];F>re-1&&(F=re-1);for(var R="";R.length127?95:Y}return F[F.l++]=0,F}var ie={0:{n:"BOF",f:_r},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:l},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:x},14:{n:"NUMBER",f:w},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:g},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:d},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:G},222:{n:"SHEETNAMELP",f:ne},65535:{n:""}},K={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:E},23:{n:"NUMBER17",f:P},24:{n:"NUMBER18",f:D},25:{n:"FORMULA19",f:U},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:oe},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:B},38:{n:"??"},39:{n:"NUMBER27",f:V},40:{n:"FORMULA28",f:W},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:G},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:te},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:n,book_to_wk3:a,to_workbook:t}})();function y6(e){var t={},r=e.match(xn),n=0,a=!1;if(r)for(;n!=r.length;++n){var i=mt(r[n]);switch(i[0].replace(/\w*:/g,"")){case"":case"":t.shadow=1;break;case"":break;case"":case"":t.outline=1;break;case"":break;case"":case"":t.strike=1;break;case"":break;case"":case"":t.u=1;break;case"":break;case"":case"":t.b=1;break;case"":break;case"":case"":t.i=1;break;case"":break;case"":case"":case"":break;case"":case"":case"":break;case"":case"":case"":break;case"":case"":case"":break;case"":case"":break;case"":a=!1;break;default:if(i[0].charCodeAt(1)!==47&&!a)throw new Error("Unrecognized rich format "+i[0])}}return t}var b6=(function(){var e=Su("t"),t=Su("rPr");function r(i){var s=i.match(e);if(!s)return{t:"s",v:""};var l={t:"s",v:Mt(s[1])},u=i.match(t);return u&&(l.s=y6(u[1])),l}var n=/<(?:\w+:)?r>/g,a=/<\/(?:\w+:)?r>/;return function(s){return s.replace(n,"").split(a).map(r).filter(function(l){return l.v})}})(),w6=(function(){var t=/(\r\n|\n)/g;function r(a,i,s){var l=[];a.u&&l.push("text-decoration: underline;"),a.uval&&l.push("text-underline-style:"+a.uval+";"),a.sz&&l.push("font-size:"+a.sz+"pt;"),a.outline&&l.push("text-effect: outline;"),a.shadow&&l.push("text-shadow: auto;"),i.push(''),a.b&&(i.push(""),s.push("")),a.i&&(i.push(""),s.push("")),a.strike&&(i.push(""),s.push(""));var u=a.valign||"";return u=="superscript"||u=="super"?u="sup":u=="subscript"&&(u="sub"),u!=""&&(i.push("<"+u+">"),s.push("")),s.push(""),a}function n(a){var i=[[],a.v,[]];return a.v?(a.s&&r(a.s,i[0],i[2]),i[0].join("")+i[1].replace(t,"
")+i[2].join("")):""}return function(i){return i.map(n).join("")}})(),_6=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,S6=/<(?:\w+:)?r>/,k6=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function nw(e,t){var r=t?t.cellHTML:!0,n={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(n.t=Mt(Qt(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),n.r=Qt(e),r&&(n.h=Kb(n.t))):e.match(S6)&&(n.r=Qt(e),n.t=Mt(Qt((e.replace(k6,"").match(_6)||[]).join("").replace(xn,""))),r&&(n.h=w6(b6(n.r)))),n):{t:""}}var T6=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,A6=/<(?:\w+:)?(?:si|sstItem)>/g,E6=/<\/(?:\w+:)?(?:si|sstItem)>/;function j6(e,t){var r=[],n="";if(!e)return r;var a=e.match(T6);if(a){n=a[2].replace(A6,"").split(E6);for(var i=0;i!=n.length;++i){var s=nw(n[i].trim(),t);s!=null&&(r[r.length]=s)}a=mt(a[1]),r.Count=a.count,r.Unique=a.uniqueCount}return r}function O6(e){return[e.read_shift(4),e.read_shift(4)]}function N6(e,t){var r=[],n=!1;return ji(e,function(i,s,l){switch(l){case 159:r.Count=i[0],r.Unique=i[1];break;case 19:r.push(i);break;case 160:return!0;case 35:n=!0;break;case 36:n=!1;break;default:if(s.T,!n||t.WTF)throw new Error("Unexpected record 0x"+l.toString(16))}}),r}function QP(e){for(var t=[],r=e.split(""),n=0;n=4&&(e.l+=t-4),r}function P6(e){var t={};return t.id=e.read_shift(0,"lpp4"),t.R=bi(e,4),t.U=bi(e,4),t.W=bi(e,4),t}function C6(e){for(var t=e.read_shift(4),r=e.l+t-4,n={},a=e.read_shift(4),i=[];a-- >0;)i.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(n.name=e.read_shift(0,"lpp4"),n.comps=i,e.l!=r)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+r);return n}function D6(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(C6(e));return t}function F6(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(e.read_shift(0,"lpp4"));return t}function M6(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=bi(e,4),t.U=bi(e,4),t.W=bi(e,4),t}function I6(e){var t=M6(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),e.read_shift(4)!=4)throw new Error("Bad !Primary record");return t}function e3(e,t){var r=e.l+t,n={};n.Flags=e.read_shift(4)&63,e.l+=4,n.AlgID=e.read_shift(4);var a=!1;switch(n.AlgID){case 26126:case 26127:case 26128:a=n.Flags==36;break;case 26625:a=n.Flags==4;break;case 0:a=n.Flags==16||n.Flags==4||n.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+n.AlgID}if(!a)throw new Error("Encryption Flags/AlgID mismatch");return n.AlgIDHash=e.read_shift(4),n.KeySize=e.read_shift(4),n.ProviderType=e.read_shift(4),e.l+=8,n.CSPName=e.read_shift(r-e.l>>1,"utf16le"),e.l=r,n}function t3(e,t){var r={},n=e.l+t;return e.l+=4,r.Salt=e.slice(e.l,e.l+16),e.l+=16,r.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),r.VerifierHash=e.slice(e.l,n),e.l=n,r}function R6(e){var t=bi(e);switch(t.Minor){case 2:return[t.Minor,L6(e)];case 3:return[t.Minor,B6()];case 4:return[t.Minor,$6(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}function L6(e){var t=e.read_shift(4);if((t&63)!=36)throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4),n=e3(e,r),a=t3(e,e.length-e.l);return{t:"Std",h:n,v:a}}function B6(){throw new Error("File is password-protected: ECMA-376 Extensible")}function $6(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var r=e.read_shift(e.length-e.l,"utf8"),n={};return r.replace(xn,function(i){var s=mt(i);switch(Qa(s[0])){case"":break;case"":case"":break;case"":break;case"4||n.Major<2)throw new Error("unrecognized major version code: "+n.Major);r.Flags=e.read_shift(4),t-=4;var a=e.read_shift(4);return t-=4,r.EncryptionHeader=e3(e,a),t-=a,r.EncryptionVerifier=t3(e,t),r}function z6(e){var t={},r=t.EncryptionVersionInfo=bi(e,4);if(r.Major!=1||r.Minor!=1)throw"unrecognized version code "+r.Major+" : "+r.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}function W6(e){var t=0,r,n=QP(e),a=n.length+1,i,s,l,u,f;for(r=gs(a),r[0]=n.length,i=1;i!=a;++i)r[i]=n[i-1];for(i=a-1;i>=0;--i)s=r[i],l=(t&16384)===0?0:1,u=t<<1&32767,f=l|u,t=f^s;return t^52811}var r3=(function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],r=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],n=function(s){return(s/2|s*128)&255},a=function(s,l){return n(s^l)},i=function(s){for(var l=t[s.length-1],u=104,f=s.length-1;f>=0;--f)for(var d=s[f],p=0;p!=7;++p)d&64&&(l^=r[u]),d*=2,--u;return l};return function(s){for(var l=QP(s),u=i(l),f=l.length,d=gs(16),p=0;p!=16;++p)d[p]=0;var x,v,w;for((f&1)===1&&(x=u>>8,d[f]=a(e[0],x),--f,x=u&255,v=l[l.length-1],d[f]=a(v,x));f>0;)--f,x=u>>8,d[f]=a(l[f],x),--f,x=u&255,d[f]=a(l[f],x);for(f=15,w=15-l.length;w>0;)x=u>>8,d[f]=a(e[w],x),--f,--w,x=u&255,d[f]=a(l[f],x),--f,--w;return d}})(),H6=function(e,t,r,n,a){a||(a=t),n||(n=r3(e));var i,s;for(i=0;i!=t.length;++i)s=t[i],s^=n[r],s=(s>>5|s<<3)&255,a[i]=s,++r;return[a,r,n]},q6=function(e){var t=0,r=r3(e);return function(n){var a=H6("",n,t,r);return t=a[1],a[0]}};function V6(e,t,r,n){var a={key:_r(e),verificationBytes:_r(e)};return r.password&&(a.verifier=W6(r.password)),n.valid=a.verificationBytes===a.verifier,n.valid&&(n.insitu=q6(r.password)),a}function K6(e,t,r){var n=r||{};return n.Info=e.read_shift(2),e.l-=2,n.Info===1?n.Data=z6(e):n.Data=U6(e,t),n}function G6(e,t,r){var n={Type:r.biff>=8?e.read_shift(2):0};return n.Type?K6(e,t-2,n):V6(e,r.biff>=8?t:t-2,r,n),n}var X6=(function(){function e(a,i){switch(i.type){case"base64":return t(Yn(a),i);case"binary":return t(a,i);case"buffer":return t(Pt&&Buffer.isBuffer(a)?a.toString("binary"):xo(a),i);case"array":return t(so(a),i)}throw new Error("Unrecognized type "+i.type)}function t(a,i){var s=i||{},l=s.dense?[]:{},u=a.match(/\\trowd.*?\\row\b/g);if(!u.length)throw new Error("RTF missing table");var f={s:{c:0,r:0},e:{c:0,r:u.length-1}};return u.forEach(function(d,p){Array.isArray(l)&&(l[p]=[]);for(var x=/\\\w+\b/g,v=0,w,b=-1;w=x.exec(d);){switch(w[0]){case"\\cell":var g=d.slice(v,x.lastIndex-w[0].length);if(g[0]==" "&&(g=g.slice(1)),++b,g.length){var k={v:g,t:"s"};Array.isArray(l)?l[p][b]=k:l[bt({r:p,c:b})]=k}break}v=x.lastIndex}b>f.e.c&&(f.e.c=b)}),l["!ref"]=Dt(f),l}function r(a,i){return bs(e(a,i),i)}function n(a){for(var i=["{\\rtf1\\ansi"],s=hr(a["!ref"]),l,u=Array.isArray(a),f=s.s.r;f<=s.e.r;++f){i.push("\\trowd\\trautofit1");for(var d=s.s.c;d<=s.e.c;++d)i.push("\\cellx"+(d+1));for(i.push("\\pard\\intbl"),d=s.s.c;d<=s.e.c;++d){var p=bt({r:f,c:d});l=u?(a[f]||[])[d]:a[p],!(!l||l.v==null&&(!l.f||l.F))&&(i.push(" "+(l.w||(ki(l),l.w))),i.push("\\cell"))}i.push("\\pard\\intbl\\row")}return i.join("")+"}"}return{to_workbook:r,to_sheet:e,from_sheet:n}})();function Y6(e){var t=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function Au(e){for(var t=0,r=1;t!=3;++t)r=r*256+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}function Z6(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.max(t,r,n),i=Math.min(t,r,n),s=a-i;if(s===0)return[0,0,t];var l=0,u=0,f=a+i;switch(u=s/(f>1?2-f:f),a){case t:l=((r-n)/s+6)%6;break;case r:l=(n-t)/s+2;break;case n:l=(t-r)/s+4;break}return[l/6,u,f/2]}function J6(e){var t=e[0],r=e[1],n=e[2],a=r*2*(n<.5?n:1-n),i=n-a/2,s=[i,i,i],l=6*t,u;if(r!==0)switch(l|0){case 0:case 6:u=a*l,s[0]+=a,s[1]+=u;break;case 1:u=a*(2-l),s[0]+=u,s[1]+=a;break;case 2:u=a*(l-2),s[1]+=a,s[2]+=u;break;case 3:u=a*(4-l),s[1]+=u,s[2]+=a;break;case 4:u=a*(l-4),s[2]+=a,s[0]+=u;break;case 5:u=a*(6-l),s[2]+=u,s[0]+=a;break}for(var f=0;f!=3;++f)s[f]=Math.round(s[f]*255);return s}function md(e,t){if(t===0)return e;var r=Z6(Y6(e));return t<0?r[2]=r[2]*(1+t):r[2]=1-(1-r[2])*(1-t),Au(J6(r))}var n3=6,Q6=15,eL=1,_n=n3;function xd(e){return Math.floor((e+Math.round(128/_n)/256)*_n)}function vd(e){return Math.floor((e-5)/_n*100+.5)/100}function u1(e){return Math.round((e*_n+5)/_n*256)/256}function zm(e){return u1(vd(xd(e)))}function aw(e){var t=Math.abs(e-zm(e)),r=_n;if(t>.005)for(_n=eL;_n":case"":break;case"":case"":a={},l.diagonalUp&&(a.diagonalUp=ir(l.diagonalUp)),l.diagonalDown&&(a.diagonalDown=ir(l.diagonalDown)),t.Borders.push(a);break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":case"":break;case"":break;case"":case"":break;case"":break;case"":case"":break;case"":break;case"":case"":break;case"":break;case"":case"":break;case"":break;case"":break;case"":case"":break;case"":case"":break;case"":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in borders")}})}function aL(e,t,r,n){t.Fills=[];var a={},i=!1;(e[0].match(xn)||[]).forEach(function(s){var l=mt(s);switch(Qa(l[0])){case"":case"":break;case"":case"":a={},t.Fills.push(a);break;case"":break;case"":break;case"":t.Fills.push(a),a={};break;case"":l.patternType&&(a.patternType=l.patternType);break;case"":case"":break;case"":case"":break;case"":case"":break;case"":break;case"":break;case"":break;case"":break;case"":case"":break;case"":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in fills")}})}function iL(e,t,r,n){t.Fonts=[];var a={},i=!1;(e[0].match(xn)||[]).forEach(function(s){var l=mt(s);switch(Qa(l[0])){case"":case"":break;case"":break;case"":case"":t.Fonts.push(a),a={};break;case"":case"":break;case"":a.bold=1;break;case"":a.italic=1;break;case"":a.underline=1;break;case"":a.strike=1;break;case"":a.outline=1;break;case"":a.shadow=1;break;case"":a.condense=1;break;case"":a.extend=1;break;case"":case"":break;case"":case"":break;case"":case"":break;case"":case"":break;case"":case"":break;case"":i=!1;break;case"":case"":break;case"":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in fonts")}})}function sL(e,t,r){t.NumberFmt=[];for(var n=Za(kt),a=0;a":case"":case"":break;case"0){if(u>392){for(u=392;u>60&&t.NumberFmt[u]!=null;--u);t.NumberFmt[u]=l}Qs(l,u)}}break;case"":break;default:if(r.WTF)throw new Error("unrecognized "+s[0]+" in numFmts")}}}var R0=["numFmtId","fillId","fontId","borderId","xfId"],L0=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function oL(e,t,r){t.CellXf=[];var n,a=!1;(e[0].match(xn)||[]).forEach(function(i){var s=mt(i),l=0;switch(Qa(s[0])){case"":case"":case"":break;case"":for(n=s,delete n[0],l=0;l392){for(l=392;l>60;--l)if(t.NumberFmt[n.numFmtId]==t.NumberFmt[l]){n.numFmtId=l;break}}t.CellXf.push(n);break;case"":break;case"":var u={};s.vertical&&(u.vertical=s.vertical),s.horizontal&&(u.horizontal=s.horizontal),s.textRotation!=null&&(u.textRotation=s.textRotation),s.indent&&(u.indent=s.indent),s.wrapText&&(u.wrapText=ir(s.wrapText)),n.alignment=u;break;case"":break;case"":case"":break;case"":a=!1;break;case"":case"":break;case"":a=!1;break;default:if(r&&r.WTF&&!a)throw new Error("unrecognized "+s[0]+" in cellXfs")}})}var lL=(function(){var t=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,n=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,a=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,i=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(l,u,f){var d={};if(!l)return d;l=l.replace(//mg,"").replace(//gm,"");var p;return(p=l.match(t))&&sL(p,d,f),(p=l.match(a))&&iL(p,d,u,f),(p=l.match(n))&&aL(p,d,u,f),(p=l.match(i))&&nL(p,d,u,f),(p=l.match(r))&&oL(p,d,f),d}})();function cL(e,t){var r=e.read_shift(2),n=pn(e);return[r,n]}function uL(e,t,r){var n={};n.sz=e.read_shift(2)/20;var a=bI(e);a.fItalic&&(n.italic=1),a.fCondense&&(n.condense=1),a.fExtend&&(n.extend=1),a.fShadow&&(n.shadow=1),a.fOutline&&(n.outline=1),a.fStrikeout&&(n.strike=1);var i=e.read_shift(2);switch(i===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var s=e.read_shift(1);s!=0&&(n.underline=s);var l=e.read_shift(1);l>0&&(n.family=l);var u=e.read_shift(1);switch(u>0&&(n.charset=u),e.l++,n.color=yI(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=pn(e),n}var fL=mn;function dL(e,t){var r=e.l+t,n=e.read_shift(2),a=e.read_shift(2);return e.l=r,{ixfe:n,numFmtId:a}}var hL=mn;function pL(e,t,r){var n={};n.NumberFmt=[];for(var a in kt)n.NumberFmt[a]=kt[a];n.CellXf=[],n.Fonts=[];var i=[],s=!1;return ji(e,function(u,f,d){switch(d){case 44:n.NumberFmt[u[0]]=u[1],Qs(u[1],u[0]);break;case 43:n.Fonts.push(u),u.color.theme!=null&&t&&t.themeElements&&t.themeElements.clrScheme&&(u.color.rgb=md(t.themeElements.clrScheme[u.color.theme].rgb,u.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:i[i.length-1]==617&&n.CellXf.push(u);break;case 48:case 507:case 572:case 475:break;case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 35:s=!0;break;case 36:s=!1;break;case 37:i.push(d),s=!0;break;case 38:i.pop(),s=!1;break;default:if(f.T>0)i.push(d);else if(f.T<0)i.pop();else if(!s||r.WTF&&i[i.length-1]!=37)throw new Error("Unexpected record 0x"+d.toString(16))}}),n}var mL=["","","","","","","","","","","",""];function xL(e,t,r){t.themeElements.clrScheme=[];var n={};(e[0].match(xn)||[]).forEach(function(a){var i=mt(a);switch(i[0]){case"":break;case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":i[0].charAt(1)==="/"?(t.themeElements.clrScheme[mL.indexOf(i[0])]=n,n={}):n.name=i[0].slice(3,i[0].length-1);break;default:if(r&&r.WTF)throw new Error("Unrecognized "+i[0]+" in clrScheme")}})}function vL(){}function gL(){}var yL=/]*)>[\s\S]*<\/a:clrScheme>/,bL=/]*)>[\s\S]*<\/a:fontScheme>/,wL=/]*)>[\s\S]*<\/a:fmtScheme>/;function _L(e,t,r){t.themeElements={};var n;[["clrScheme",yL,xL],["fontScheme",bL,vL],["fmtScheme",wL,gL]].forEach(function(a){if(!(n=e.match(a[1])))throw new Error(a[0]+" not found in themeElements");a[2](n,t,r)})}var SL=/]*)>[\s\S]*<\/a:themeElements>/;function s3(e,t){(!e||e.length===0)&&(e=kL());var r,n={};if(!(r=e.match(SL)))throw new Error("themeElements not found in theme");return _L(r[0],n,t),n.raw=e,n}function kL(e,t){var r=[vP];return r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]='',r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]='',r[r.length]="",r[r.length]="",r[r.length]="",r[r.length]="",r.join("")}function TL(e,t,r){var n=e.l+t,a=e.read_shift(4);if(a!==124226){if(!r.cellStyles){e.l=n;return}var i=e.slice(e.l);e.l=n;var s;try{s=xP(i,{type:"array"})}catch{return}var l=Vn(s,"theme/theme/theme1.xml",!0);if(l)return s3(l,r)}}function AL(e){return e.read_shift(4)}function EL(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:e.l+=4;break;case 1:t.xclrValue=jL(e,4);break;case 2:t.xclrValue=VP(e);break;case 3:t.xclrValue=AL(e);break;case 4:e.l+=4;break}return e.l+=8,t}function jL(e,t){return mn(e,t)}function OL(e,t){return mn(e,t)}function NL(e){var t=e.read_shift(2),r=e.read_shift(2)-4,n=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:n[1]=EL(e);break;case 6:n[1]=OL(e,r);break;case 14:case 15:n[1]=e.read_shift(r===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+r)}return n}function PL(e,t){var r=e.l+t;e.l+=2;var n=e.read_shift(2);e.l+=2;for(var a=e.read_shift(2),i=[];a-- >0;)i.push(NL(e,r-e.l));return{ixfe:n,ext:i}}function CL(e,t){t.forEach(function(r){r[0]})}function DL(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:pn(e)}}function FL(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function ML(e){return e.l+=4,e.read_shift(4)!=0}function IL(e,t,r){var n={Types:[],Cell:[],Value:[]},a=r||{},i=[],s=!1,l=2;return ji(e,function(u,f,d){switch(d){case 335:n.Types.push({name:u.name});break;case 51:u.forEach(function(p){l==1?n.Cell.push({type:n.Types[p[0]-1].name,index:p[1]}):l==0&&n.Value.push({type:n.Types[p[0]-1].name,index:p[1]})});break;case 337:l=u?1:0;break;case 338:l=2;break;case 35:i.push(d),s=!0;break;case 36:i.pop(),s=!1;break;default:if(!f.T){if(!s||a.WTF&&i[i.length-1]!=35)throw new Error("Unexpected record 0x"+d.toString(16))}}}),n}function RL(e,t,r){var n={Types:[],Cell:[],Value:[]};if(!e)return n;var a=!1,i=2,s;return e.replace(xn,function(l){var u=mt(l);switch(Qa(u[0])){case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":break;case"":i=2;break;case"":i=2;break;case"":case"":case"":break;case"":a=!1;break;case"":case"":break;case"]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}function Dk(e,t,r,n){var a=Array.isArray(e),i;t.forEach(function(s){var l=Sn(s.ref);if(a?(e[l.r]||(e[l.r]=[]),i=e[l.r][l.c]):i=e[s.ref],!i){i={t:"z"},a?e[l.r][l.c]=i:e[s.ref]=i;var u=hr(e["!ref"]||"BDWGO1000001:A1");u.s.r>l.r&&(u.s.r=l.r),u.e.rl.c&&(u.s.c=l.c),u.e.c=0;--p){if(!r&&i.c[p].T)return;r&&!i.c[p].T&&i.c.splice(p,1)}if(r&&n){for(p=0;p/))return[];var r=[],n=[],a=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);a&&a[1]&&a[1].split(/<\/\w*:?author>/).forEach(function(s){if(!(s===""||s.trim()==="")){var l=s.match(/<(?:\w+:)?author[^>]*>(.*)/);l&&r.push(l[1])}});var i=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return i&&i[1]&&i[1].split(/<\/\w*:?comment>/).forEach(function(s){if(!(s===""||s.trim()==="")){var l=s.match(/<(?:\w+:)?comment[^>]*>/);if(l){var u=mt(l[0]),f={author:u.authorId&&r[u.authorId]||"sheetjsghost",ref:u.ref,guid:u.guid},d=Sn(u.ref);if(!(t.sheetRows&&t.sheetRows<=d.r)){var p=s.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),x=!!p&&!!p[1]&&nw(p[1])||{r:"",t:"",h:""};f.r=x.r,x.r==""&&(x.t=x.h=""),f.t=(x.t||"").replace(/\r\n/g,` +`).replace(/\r/g,` +`),t.cellHTML&&(f.h=x.h),n.push(f)}}}}),n}function HL(e,t){var r=[],n=!1,a={},i=0;return e.replace(xn,function(l,u){var f=mt(l);switch(Qa(f[0])){case"":break;case"":a.t!=null&&r.push(a);break;case"":case"":a.t=e.slice(i,u).replace(/\r\n/g,` +`).replace(/\r/g,` +`);break;case"":n=!0;break;case"":n=!1;break;case"":case"":case"":break;case"":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+f[0]+" in threaded comments")}return l}),r}function qL(e,t){var r=[],n=!1;return e.replace(xn,function(i){var s=mt(i);switch(Qa(s[0])){case"":break;case"":break;case"":case"":case"":break;case"":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+s[0]+" in threaded comments")}return i}),r}function VL(e){var t={};t.iauthor=e.read_shift(4);var r=go(e);return t.rfx=r.s,t.ref=bt(r.s),e.l+=16,t}var KL=pn;function GL(e,t){var r=[],n=[],a={},i=!1;return ji(e,function(l,u,f){switch(f){case 632:n.push(l);break;case 635:a=l;break;case 637:a.t=l.t,a.h=l.h,a.r=l.r;break;case 636:if(a.author=n[a.iauthor],delete a.iauthor,t.sheetRows&&a.rfx&&t.sheetRows<=a.rfx.r)break;a.t||(a.t=""),delete a.rfx,r.push(a);break;case 3072:break;case 35:i=!0;break;case 36:i=!1;break;case 37:break;case 38:break;default:if(!u.T){if(!i||t.WTF)throw new Error("Unexpected record 0x"+f.toString(16))}}}),r}var XL="application/vnd.ms-office.vbaProject";function YL(e){var t=Ct.utils.cfb_new({root:"R"});return e.FullPaths.forEach(function(r,n){if(!(r.slice(-1)==="/"||!r.match(/_VBA_PROJECT_CUR/))){var a=r.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");Ct.utils.cfb_add(t,a,e.FileIndex[n].content)}}),Ct.write(t)}function ZL(){return{"!type":"dialog"}}function JL(){return{"!type":"dialog"}}function QL(){return{"!type":"macro"}}function eB(){return{"!type":"macro"}}var sl=(function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,a,i,s){var l=!1,u=!1;i.length==0?u=!0:i.charAt(0)=="["&&(u=!0,i=i.slice(1,-1)),s.length==0?l=!0:s.charAt(0)=="["&&(l=!0,s=s.slice(1,-1));var f=i.length>0?parseInt(i,10)|0:0,d=s.length>0?parseInt(s,10)|0:0;return l?d+=t.c:--d,u?f+=t.r:--f,a+(l?"":"$")+Cr(d)+(u?"":"$")+tn(f)}return function(a,i){return t=i,a.replace(e,r)}})(),o3=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,tB=(function(){return function(t,r){return t.replace(o3,function(n,a,i,s,l,u){var f=Zb(s)-(i?0:r.c),d=Yb(u)-(l?0:r.r),p=d==0?"":l?d+1:"["+d+"]",x=f==0?"":i?f+1:"["+f+"]";return a+"R"+p+"C"+x})}})();function l3(e,t){return e.replace(o3,function(r,n,a,i,s,l){return n+(a=="$"?a+i:Cr(Zb(i)+t.c))+(s=="$"?s+l:tn(Yb(l)+t.r))})}function rB(e,t,r){var n=zl(t),a=n.s,i=Sn(r),s={r:i.r-a.r,c:i.c-a.c};return l3(e,s)}function nB(e){return e.length!=1}function Fk(e){return e.replace(/_xlfn\./g,"")}function br(e){e.l+=1}function ys(e,t){var r=e.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}function c3(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return u3(e);r.biff==12&&(n=4)}var a=e.read_shift(n),i=e.read_shift(n),s=ys(e),l=ys(e);return{s:{r:a,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:l[0],cRel:l[1],rRel:l[2]}}}function u3(e){var t=ys(e),r=ys(e),n=e.read_shift(1),a=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:a,cRel:r[1],rRel:r[2]}}}function aB(e,t,r){if(r.biff<8)return u3(e);var n=e.read_shift(r.biff==12?4:2),a=e.read_shift(r.biff==12?4:2),i=ys(e),s=ys(e);return{s:{r:n,c:i[0],cRel:i[1],rRel:i[2]},e:{r:a,c:s[0],cRel:s[1],rRel:s[2]}}}function f3(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return iB(e);var n=e.read_shift(r&&r.biff==12?4:2),a=ys(e);return{r:n,c:a[0],cRel:a[1],rRel:a[2]}}function iB(e){var t=ys(e),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function sB(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function oB(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return lB(e);var a=e.read_shift(n>=12?4:2),i=e.read_shift(2),s=(i&16384)>>14,l=(i&32768)>>15;if(i&=16383,l==1)for(;a>524287;)a-=1048576;if(s==1)for(;i>8191;)i=i-16384;return{r:a,c:i,cRel:s,rRel:l}}function lB(e){var t=e.read_shift(2),r=e.read_shift(1),n=(t&32768)>>15,a=(t&16384)>>14;return t&=16383,n==1&&t>=8192&&(t=t-16384),a==1&&r>=128&&(r=r-256),{r:t,c:r,cRel:a,rRel:n}}function cB(e,t,r){var n=(e[e.l++]&96)>>5,a=c3(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,a]}function uB(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2,"i"),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}var s=c3(e,i,r);return[n,a,s]}function fB(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}function dB(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}return e.l+=i,[n,a]}function hB(e,t,r){var n=(e[e.l++]&96)>>5,a=aB(e,t-1,r);return[n,a]}function pB(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function Mk(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function mB(e,t,r){e.l+=2;for(var n=e.read_shift(r&&r.biff==2?1:2),a=[],i=0;i<=n;++i)a.push(e.read_shift(r&&r.biff==2?1:2));return a}function xB(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function vB(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function gB(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function yB(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function d3(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function bB(e){return e.read_shift(2),d3(e)}function wB(e){return e.read_shift(2),d3(e)}function _B(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=f3(e,0,r);return[n,a]}function SB(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=oB(e,0,r);return[n,a]}function kB(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=e.read_shift(2);r&&r.biff==5&&(e.l+=12);var i=f3(e,0,r);return[n,a,i]}function TB(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=e.read_shift(r&&r.biff<=3?1:2);return[A$[a],m3[a],n]}function AB(e,t,r){var n=e[e.l++],a=e.read_shift(1),i=r&&r.biff<=3?[n==88?-1:0,e.read_shift(1)]:EB(e);return[a,(i[0]===0?m3:T$)[i[1]]]}function EB(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function jB(e,t,r){e.l+=r&&r.biff==2?3:4}function OB(e,t,r){if(e.l++,r&&r.biff==12)return[e.read_shift(4,"i"),0];var n=e.read_shift(2),a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function NB(e){return e.l++,yo[e.read_shift(1)]}function PB(e){return e.l++,e.read_shift(2)}function CB(e){return e.l++,e.read_shift(1)!==0}function DB(e){return e.l++,dn(e)}function FB(e,t,r){return e.l++,pf(e,t-1,r)}function MB(e,t){var r=[e.read_shift(1)];if(t==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=vr(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=yo[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=dn(e);break;case 2:r[1]=bo(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function IB(e,t,r){for(var n=e.read_shift(r.biff==12?4:2),a=[],i=0;i!=n;++i)a.push((r.biff==12?go:wh)(e));return a}function RB(e,t,r){var n=0,a=0;r.biff==12?(n=e.read_shift(4),a=e.read_shift(4)):(a=1+e.read_shift(1),n=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--a==0&&(a=256));for(var i=0,s=[];i!=n&&(s[i]=[]);++i)for(var l=0;l!=a;++l)s[i][l]=MB(e,r.biff);return s}function LB(e,t,r){var n=e.read_shift(1)>>>5&3,a=!r||r.biff>=8?4:2,i=e.read_shift(a);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[n,0,i]}function BB(e,t,r){if(r.biff==5)return $B(e);var n=e.read_shift(1)>>>5&3,a=e.read_shift(2),i=e.read_shift(4);return[n,a,i]}function $B(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[t,r,n]}function UB(e,t,r){var n=e.read_shift(1)>>>5&3;e.l+=r&&r.biff==2?3:4;var a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function zB(e,t,r){var n=e.read_shift(1)>>>5&3,a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function WB(e,t,r){var n=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,r.biff==12&&(e.l+=2),[n]}function HB(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2),i=4;if(r)switch(r.biff){case 5:i=15;break;case 12:i=6;break}return e.l+=i,[n,a]}var qB=mn,VB=mn,KB=mn;function xf(e,t,r){return e.l+=2,[sB(e)]}function iw(e){return e.l+=6,[]}var GB=xf,XB=iw,YB=iw,ZB=xf;function h3(e){return e.l+=2,[_r(e),e.read_shift(2)&1]}var JB=xf,QB=h3,e$=iw,t$=xf,r$=xf,n$=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function a$(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),a=e.read_shift(2),i=e.read_shift(2),s=n$[r>>2&31];return{ixti:t,coltype:r&3,rt:s,idx:n,c:a,C:i}}function i$(e){return e.l+=2,[e.read_shift(4)]}function s$(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function o$(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function l$(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function c$(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function u$(e){return e.l+=4,[0,0]}var Ik={1:{n:"PtgExp",f:OB},2:{n:"PtgTbl",f:KB},3:{n:"PtgAdd",f:br},4:{n:"PtgSub",f:br},5:{n:"PtgMul",f:br},6:{n:"PtgDiv",f:br},7:{n:"PtgPower",f:br},8:{n:"PtgConcat",f:br},9:{n:"PtgLt",f:br},10:{n:"PtgLe",f:br},11:{n:"PtgEq",f:br},12:{n:"PtgGe",f:br},13:{n:"PtgGt",f:br},14:{n:"PtgNe",f:br},15:{n:"PtgIsect",f:br},16:{n:"PtgUnion",f:br},17:{n:"PtgRange",f:br},18:{n:"PtgUplus",f:br},19:{n:"PtgUminus",f:br},20:{n:"PtgPercent",f:br},21:{n:"PtgParen",f:br},22:{n:"PtgMissArg",f:br},23:{n:"PtgStr",f:FB},26:{n:"PtgSheet",f:s$},27:{n:"PtgEndSheet",f:o$},28:{n:"PtgErr",f:NB},29:{n:"PtgBool",f:CB},30:{n:"PtgInt",f:PB},31:{n:"PtgNum",f:DB},32:{n:"PtgArray",f:pB},33:{n:"PtgFunc",f:TB},34:{n:"PtgFuncVar",f:AB},35:{n:"PtgName",f:LB},36:{n:"PtgRef",f:_B},37:{n:"PtgArea",f:cB},38:{n:"PtgMemArea",f:UB},39:{n:"PtgMemErr",f:qB},40:{n:"PtgMemNoMem",f:VB},41:{n:"PtgMemFunc",f:zB},42:{n:"PtgRefErr",f:WB},43:{n:"PtgAreaErr",f:fB},44:{n:"PtgRefN",f:SB},45:{n:"PtgAreaN",f:hB},46:{n:"PtgMemAreaN",f:l$},47:{n:"PtgMemNoMemN",f:c$},57:{n:"PtgNameX",f:BB},58:{n:"PtgRef3d",f:kB},59:{n:"PtgArea3d",f:uB},60:{n:"PtgRefErr3d",f:HB},61:{n:"PtgAreaErr3d",f:dB},255:{}},f$={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},d$={1:{n:"PtgElfLel",f:h3},2:{n:"PtgElfRw",f:t$},3:{n:"PtgElfCol",f:GB},6:{n:"PtgElfRwV",f:r$},7:{n:"PtgElfColV",f:ZB},10:{n:"PtgElfRadical",f:JB},11:{n:"PtgElfRadicalS",f:e$},13:{n:"PtgElfColS",f:XB},15:{n:"PtgElfColSV",f:YB},16:{n:"PtgElfRadicalLel",f:QB},25:{n:"PtgList",f:a$},29:{n:"PtgSxName",f:i$},255:{}},h$={0:{n:"PtgAttrNoop",f:u$},1:{n:"PtgAttrSemi",f:yB},2:{n:"PtgAttrIf",f:vB},4:{n:"PtgAttrChoose",f:mB},8:{n:"PtgAttrGoto",f:xB},16:{n:"PtgAttrSum",f:jB},32:{n:"PtgAttrBaxcel",f:Mk},33:{n:"PtgAttrBaxcel",f:Mk},64:{n:"PtgAttrSpace",f:bB},65:{n:"PtgAttrSpaceSemi",f:wB},128:{n:"PtgAttrIfError",f:gB},255:{}};function vf(e,t,r,n){if(n.biff<8)return mn(e,t);for(var a=e.l+t,i=[],s=0;s!==r.length;++s)switch(r[s][0]){case"PtgArray":r[s][1]=RB(e,0,n),i.push(r[s][1]);break;case"PtgMemArea":r[s][2]=IB(e,r[s][1],n),i.push(r[s][2]);break;case"PtgExp":n&&n.biff==12&&(r[s][1][1]=e.read_shift(4),i.push(r[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[s][0]}return t=a-e.l,t!==0&&i.push(mn(e,t)),i}function gf(e,t,r){for(var n=e.l+t,a,i,s=[];n!=e.l;)t=n-e.l,i=e[e.l],a=Ik[i]||Ik[f$[i]],(i===24||i===25)&&(a=(i===24?d$:h$)[e[e.l+1]]),!a||!a.f?mn(e,t):s.push([a.n,a.f(e,t,r)]);return s}function p$(e){for(var t=[],r=0;r=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function x$(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function p3(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!n)return"SH33TJSERR1";var a="";if(r.biff>8)switch(e[n[0]][0]){case 357:return a=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 358:return r.SID!=null?e.SheetNames[r.SID]:"SH33TJSSAME"+e[n[0]][0];case 355:default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return a=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(i){return i.Name}).join(";;");default:return e[n[0]][0][3]?(a=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?a:a+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function Rk(e,t,r){var n=p3(e,t,r);return n=="#REF"?n:x$(n,r)}function cn(e,t,r,n,a){var i=a&&a.biff||8,s={s:{c:0,r:0}},l=[],u,f,d,p=0,x=0,v,w="";if(!e[0]||!e[0][0])return"";for(var b=-1,g="",k=0,A=e[0].length;k=0){switch(e[0][b][1][0]){case 0:g=fr(" ",e[0][b][1][1]);break;case 1:g=fr("\r",e[0][b][1][1]);break;default:if(g="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][b][1][0])}f=f+g,b=-1}l.push(f+m$[S[0]]+u);break;case"PtgIsect":u=l.pop(),f=l.pop(),l.push(f+" "+u);break;case"PtgUnion":u=l.pop(),f=l.pop(),l.push(f+","+u);break;case"PtgRange":u=l.pop(),f=l.pop(),l.push(f+":"+u);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":d=au(S[1][1],s,a),l.push(iu(d,i));break;case"PtgRefN":d=r?au(S[1][1],r,a):S[1][1],l.push(iu(d,i));break;case"PtgRef3d":p=S[1][1],d=au(S[1][2],s,a),w=Rk(n,p,a),l.push(w+"!"+iu(d,i));break;case"PtgFunc":case"PtgFuncVar":var N=S[1][0],T=S[1][1];N||(N=0),N&=127;var E=N==0?[]:l.slice(-N);l.length-=N,T==="User"&&(T=E.shift()),l.push(T+"("+E.join(",")+")");break;case"PtgBool":l.push(S[1]?"TRUE":"FALSE");break;case"PtgInt":l.push(S[1]);break;case"PtgNum":l.push(String(S[1]));break;case"PtgStr":l.push('"'+S[1].replace(/"/g,'""')+'"');break;case"PtgErr":l.push(S[1]);break;case"PtgAreaN":v=vk(S[1][1],r?{s:r}:s,a),l.push($m(v,a));break;case"PtgArea":v=vk(S[1][1],s,a),l.push($m(v,a));break;case"PtgArea3d":p=S[1][1],v=S[1][2],w=Rk(n,p,a),l.push(w+"!"+$m(v,a));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":x=S[1][2];var j=(n.names||[])[x-1]||(n[0]||[])[x],D=j?j.Name:"SH33TJSNAME"+String(x);D&&D.slice(0,6)=="_xlfn."&&!a.xlfn&&(D=D.slice(6)),l.push(D);break;case"PtgNameX":var P=S[1][1];x=S[1][2];var H;if(a.biff<=5)P<0&&(P=-P),n[P]&&(H=n[P][x]);else{var U="";if(((n[P]||[])[0]||[])[0]==14849||(((n[P]||[])[0]||[])[0]==1025?n[P][x]&&n[P][x].itab>0&&(U=n.SheetNames[n[P][x].itab-1]+"!"):U=n.SheetNames[x-1]+"!"),n[P]&&n[P][x])U+=n[P][x].Name;else if(n[0]&&n[0][x])U+=n[0][x].Name;else{var B=(p3(n,P,a)||"").split(";;");B[x-1]?U=B[x-1]:U+="SH33TJSERRX"}l.push(U);break}H||(H={Name:"SH33TJSERRY"}),l.push(H.Name);break;case"PtgParen":var V="(",W=")";if(b>=0){switch(g="",e[0][b][1][0]){case 2:V=fr(" ",e[0][b][1][1])+V;break;case 3:V=fr("\r",e[0][b][1][1])+V;break;case 4:W=fr(" ",e[0][b][1][1])+W;break;case 5:W=fr("\r",e[0][b][1][1])+W;break;default:if(a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][b][1][0])}b=-1}l.push(V+l.pop()+W);break;case"PtgRefErr":l.push("#REF!");break;case"PtgRefErr3d":l.push("#REF!");break;case"PtgExp":d={c:S[1][1],r:S[1][0]};var G={c:r.c,r:r.r};if(n.sharedf[bt(d)]){var ne=n.sharedf[bt(d)];l.push(cn(ne,s,G,n,a))}else{var te=!1;for(u=0;u!=n.arrayf.length;++u)if(f=n.arrayf[u],!(d.cf[0].e.c)&&!(d.rf[0].e.r)){l.push(cn(f[1],s,G,n,a)),te=!0;break}te||l.push(S[1])}break;case"PtgArray":l.push("{"+p$(S[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":b=k;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":l.push("");break;case"PtgAreaErr":l.push("#REF!");break;case"PtgAreaErr3d":l.push("#REF!");break;case"PtgList":l.push("Table"+S[1].idx+"[#"+S[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(S));default:throw new Error("Unrecognized Formula Token: "+String(S))}var oe=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(a.biff!=3&&b>=0&&oe.indexOf(e[0][k][0])==-1){S=e[0][b];var z=!0;switch(S[1][0]){case 4:z=!1;case 0:g=fr(" ",S[1][1]);break;case 5:z=!1;case 1:g=fr("\r",S[1][1]);break;default:if(g="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+S[1][0])}l.push((z?g:"")+l.pop()+(z?"":g)),b=-1}}if(l.length>1&&a.WTF)throw new Error("bad formula stack");return l[0]}function v$(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,s=e.read_shift(a);if(s==65535)return[[],mn(e,t-2)];var l=gf(e,s,r);return t!==s+a&&(i=vf(e,t-s-a,l,r)),e.l=n,[l,i]}function g$(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,s=e.read_shift(a);if(s==65535)return[[],mn(e,t-2)];var l=gf(e,s,r);return t!==s+a&&(i=vf(e,t-s-a,l,r)),e.l=n,[l,i]}function y$(e,t,r,n){var a=e.l+t,i=gf(e,n,r),s;return a!==e.l&&(s=vf(e,a-e.l,i,r)),[i,s]}function b$(e,t,r){var n=e.l+t,a,i=e.read_shift(2),s=gf(e,i,r);return i==65535?[[],mn(e,t-2)]:(t!==i+2&&(a=vf(e,n-i-2,s,r)),[s,a])}function w$(e){var t;if(mi(e,e.l+6)!==65535)return[dn(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=e[e.l+2]===1,e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}function Wm(e,t,r){var n=e.l+t,a=ei(e);r.biff==2&&++e.l;var i=w$(e),s=e.read_shift(1);r.biff!=2&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var l=g$(e,n-e.l,r);return{cell:a,val:i[0],formula:l,shared:s>>3&1,tt:i[1]}}function _h(e,t,r){var n=e.read_shift(4),a=gf(e,n,r),i=e.read_shift(4),s=i>0?vf(e,i,a,r):null;return[a,s]}var _$=_h,Sh=_h,S$=_h,k$=_h,T$={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},m3={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},A$={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function Lk(e){return e.slice(0,3)=="of:"&&(e=e.slice(3)),e.charCodeAt(0)==61&&(e=e.slice(1),e.charCodeAt(0)==61&&(e=e.slice(1))),e=e.replace(/COM\.MICROSOFT\./g,""),e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(t,r){return r.replace(/\./g,"")}),e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1"),e.replace(/[;~]/g,",").replace(/\|/g,";")}function Hm(e){var t=e.split(":"),r=t[0].split(".")[0];return[r,t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}var cu={},ol={};function uu(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];t=="xlml"&&(r=[1,1,1,1,.5,.5]),e.left==null&&(e.left=r[0]),e.right==null&&(e.right=r[1]),e.top==null&&(e.top=r[2]),e.bottom==null&&(e.bottom=r[3]),e.header==null&&(e.header=r[4]),e.footer==null&&(e.footer=r[5])}}function x3(e,t,r,n,a,i){try{n.cellNF&&(e.z=kt[t])}catch(l){if(n.WTF)throw l}if(!(e.t==="z"&&!n.cellStyles)){if(e.t==="d"&&typeof e.v=="string"&&(e.v=qr(e.v)),(!n||n.cellText!==!1)&&e.t!=="z")try{if(kt[t]==null&&Qs(E8[t]||"General",t),e.t==="e")e.w=e.w||yo[e.v];else if(t===0)if(e.t==="n")(e.v|0)===e.v?e.w=e.v.toString(10):e.w=_u(e.v);else if(e.t==="d"){var s=An(e.v);(s|0)===s?e.w=s.toString(10):e.w=_u(s)}else{if(e.v===void 0)return"";e.w=io(e.v,ol)}else e.t==="d"?e.w=ha(t,An(e.v),ol):e.w=ha(t,e.v,ol)}catch(l){if(n.WTF)throw l}if(n.cellStyles&&r!=null)try{e.s=i.Fills[r],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=md(a.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),n.WTF&&(e.s.fgColor.raw_rgb=a.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=md(a.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),n.WTF&&(e.s.bgColor.raw_rgb=a.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(l){if(n.WTF&&i.Fills)throw l}}}function E$(e,t){var r=hr(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=Dt(r))}var j$=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,O$=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,N$=/<(?:\w:)?hyperlink [^>]*>/mg,P$=/"(\w*:\w*)"/,C$=/<(?:\w:)?col\b[^>]*[\/]?>/g,D$=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,F$=/<(?:\w:)?pageMargins[^>]*\/>/g,v3=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,M$=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,I$=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function R$(e,t,r,n,a,i,s){if(!e)return e;n||(n={"!id":{}});var l=t.dense?[]:{},u={s:{r:2e6,c:2e6},e:{r:0,c:0}},f="",d="",p=e.match(O$);p?(f=e.slice(0,p.index),d=e.slice(p.index+p[0].length)):f=d=e;var x=f.match(v3);x?sw(x[0],l,a,r):(x=f.match(M$))&&L$(x[0],x[1]||"",l,a,r);var v=(f.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(v>0){var w=f.slice(v,v+50).match(P$);w&&E$(l,w[1])}var b=f.match(I$);b&&b[1]&&H$(b[1],a);var g=[];if(t.cellStyles){var k=f.match(C$);k&&U$(g,k)}p&&q$(p[1],l,t,u,i,s);var A=d.match(D$);A&&(l["!autofilter"]=z$(A[0]));var S=[],N=d.match(j$);if(N)for(v=0;v!=N.length;++v)S[v]=hr(N[v].slice(N[v].indexOf('"')+1));var T=d.match(N$);T&&B$(l,T,n);var E=d.match(F$);if(E&&(l["!margins"]=$$(mt(E[0]))),!l["!ref"]&&u.e.c>=u.s.c&&u.e.r>=u.s.r&&(l["!ref"]=Dt(u)),t.sheetRows>0&&l["!ref"]){var j=hr(l["!ref"]);t.sheetRows<=+j.e.r&&(j.e.r=t.sheetRows-1,j.e.r>u.e.r&&(j.e.r=u.e.r),j.e.ru.e.c&&(j.e.c=u.e.c),j.e.c0&&(l["!cols"]=g),S.length>0&&(l["!merges"]=S),l}function sw(e,t,r,n){var a=mt(e);r.Sheets[n]||(r.Sheets[n]={}),a.codeName&&(r.Sheets[n].CodeName=Mt(Qt(a.codeName)))}function L$(e,t,r,n,a){sw(e.slice(0,e.indexOf(">")),r,n,a)}function B$(e,t,r){for(var n=Array.isArray(e),a=0;a!=t.length;++a){var i=mt(Qt(t[a]),!0);if(!i.ref)return;var s=((r||{})["!id"]||[])[i.id];s?(i.Target=s.Target,i.location&&(i.Target+="#"+Mt(i.location))):(i.Target="#"+Mt(i.location),s={Target:i.Target,TargetMode:"Internal"}),i.Rel=s,i.tooltip&&(i.Tooltip=i.tooltip,delete i.tooltip);for(var l=hr(i.ref),u=l.s.r;u<=l.e.r;++u)for(var f=l.s.c;f<=l.e.c;++f){var d=bt({c:f,r:u});n?(e[u]||(e[u]=[]),e[u][f]||(e[u][f]={t:"z",v:void 0}),e[u][f].l=i):(e[d]||(e[d]={t:"z",v:void 0}),e[d].l=i)}}}function $$(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(r){e[r]&&(t[r]=parseFloat(e[r]))}),t}function U$(e,t){for(var r=!1,n=0;n!=t.length;++n){var a=mt(t[n],!0);a.hidden&&(a.hidden=ir(a.hidden));var i=parseInt(a.min,10)-1,s=parseInt(a.max,10)-1;for(a.outlineLevel&&(a.level=+a.outlineLevel||0),delete a.min,delete a.max,a.width=+a.width,!r&&a.width&&(r=!0,aw(a.width)),hl(a);i<=s;)e[i++]=en(a)}}function z$(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}var W$=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function H$(e,t){t.Views||(t.Views=[{}]),(e.match(W$)||[]).forEach(function(r,n){var a=mt(r);t.Views[n]||(t.Views[n]={}),+a.zoomScale&&(t.Views[n].zoom=+a.zoomScale),ir(a.rightToLeft)&&(t.Views[n].RTL=!0)})}var q$=(function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,n=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,a=/ref=["']([^"']*)["']/,i=Su("v"),s=Su("f");return function(u,f,d,p,x,v){for(var w=0,b="",g=[],k=[],A=0,S=0,N=0,T="",E,j,D=0,P=0,H,U,B=0,V=0,W=Array.isArray(v.CellXf),G,ne=[],te=[],oe=Array.isArray(f),z=[],ie={},K=!1,C=!!d.sheetStubs,re=u.split(t),F=0,R=re.length;F!=R;++F){b=re[F].trim();var Y=b.length;if(Y!==0){var fe=0;e:for(w=0;w":if(b[w-1]!="/"){++w;break e}if(d&&d.cellStyles){if(j=mt(b.slice(fe,w),!0),D=j.r!=null?parseInt(j.r,10):D+1,P=-1,d.sheetRows&&d.sheetRows=w)break;if(j=mt(b.slice(fe,w),!0),D=j.r!=null?parseInt(j.r,10):D+1,P=-1,!(d.sheetRows&&d.sheetRowsD-1&&(p.s.r=D-1),p.e.r":"")+b,k!=null&&k.length===2){for(A=0,T=k[1],S=0;S!=T.length&&!((N=T.charCodeAt(S)-64)<1||N>26);++S)A=26*A+N;--A,P=A}else++P;for(S=0;S!=b.length&&b.charCodeAt(S)!==62;++S);if(++S,j=mt(b.slice(0,S),!0),j.r||(j.r=bt({r:D-1,c:P})),T=b.slice(S),E={t:""},(k=T.match(i))!=null&&k[1]!==""&&(E.v=Mt(k[1])),d.cellFormula){if((k=T.match(s))!=null&&k[1]!==""){if(E.f=Mt(Qt(k[1])).replace(/\r\n/g,` +`),d.xlfn||(E.f=Fk(E.f)),k[0].indexOf('t="array"')>-1)E.F=(T.match(a)||[])[1],E.F.indexOf(":")>-1&&ne.push([hr(E.F),E.F]);else if(k[0].indexOf('t="shared"')>-1){U=mt(k[0]);var se=Mt(Qt(k[1]));d.xlfn||(se=Fk(se)),te[parseInt(U.si,10)]=[U,se,j.r]}}else(k=T.match(/]*\/>/))&&(U=mt(k[0]),te[U.si]&&(E.f=rB(te[U.si][1],te[U.si][2],j.r)));var he=Sn(j.r);for(S=0;S=ne[S][0].s.r&&he.r<=ne[S][0].e.r&&he.c>=ne[S][0].s.c&&he.c<=ne[S][0].e.c&&(E.F=ne[S][1])}if(j.t==null&&E.v===void 0)if(E.f||E.F)E.v=0,E.t="n";else if(C)E.t="z";else continue;else E.t=j.t||"n";switch(p.s.c>P&&(p.s.c=P),p.e.c"u"){if(!C)continue;E.t="z"}else H=cu[parseInt(E.v,10)],E.v=H.t,E.r=H.r,d.cellHTML&&(E.h=H.h);break;case"str":E.t="s",E.v=E.v!=null?Qt(E.v):"",d.cellHTML&&(E.h=Kb(E.v));break;case"inlineStr":k=T.match(n),E.t="s",k!=null&&(H=nw(k[1]))?(E.v=H.t,d.cellHTML&&(E.h=H.h)):E.v="";break;case"b":E.v=ir(E.v);break;case"d":d.cellDates?E.v=qr(E.v,1):(E.v=An(qr(E.v,1)),E.t="n");break;case"e":(!d||d.cellText!==!1)&&(E.w=E.v),E.v=LP[E.v];break}if(B=V=0,G=null,W&&j.s!==void 0&&(G=v.CellXf[j.s],G!=null&&(G.numFmtId!=null&&(B=G.numFmtId),d.cellStyles&&G.fillId!=null&&(V=G.fillId))),x3(E,B,V,d,x,v),d.cellDates&&W&&E.t=="n"&&Ul(kt[B])&&(E.t="d",E.v=bh(E.v)),j.cm&&d.xlmeta){var Ce=(d.xlmeta.Cell||[])[+j.cm-1];Ce&&Ce.type=="XLDAPR"&&(E.D=!0)}if(oe){var I=Sn(j.r);f[I.r]||(f[I.r]=[]),f[I.r][I.c]=E}else f[j.r]=E}}}}z.length>0&&(f["!rows"]=z)}})();function V$(e,t){var r={},n=e.l+t;r.r=e.read_shift(4),e.l+=4;var a=e.read_shift(2);e.l+=1;var i=e.read_shift(1);return e.l=n,i&7&&(r.level=i&7),i&16&&(r.hidden=!0),i&32&&(r.hpt=a/20),r}var K$=go;function G$(){}function X$(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=vI(e),r}function Y$(e){var t=ma(e);return[t]}function Z$(e){var t=vo(e);return[t]}function J$(e){var t=ma(e),r=e.read_shift(1);return[t,r,"b"]}function Q$(e){var t=vo(e),r=e.read_shift(1);return[t,r,"b"]}function e7(e){var t=ma(e),r=e.read_shift(1);return[t,r,"e"]}function t7(e){var t=vo(e),r=e.read_shift(1);return[t,r,"e"]}function r7(e){var t=ma(e),r=e.read_shift(4);return[t,r,"s"]}function n7(e){var t=vo(e),r=e.read_shift(4);return[t,r,"s"]}function a7(e){var t=ma(e),r=dn(e);return[t,r,"n"]}function g3(e){var t=vo(e),r=dn(e);return[t,r,"n"]}function i7(e){var t=ma(e),r=ew(e);return[t,r,"n"]}function s7(e){var t=vo(e),r=ew(e);return[t,r,"n"]}function o7(e){var t=ma(e),r=Jb(e);return[t,r,"is"]}function l7(e){var t=ma(e),r=pn(e);return[t,r,"str"]}function c7(e){var t=vo(e),r=pn(e);return[t,r,"str"]}function u7(e,t,r){var n=e.l+t,a=ma(e);a.r=r["!row"];var i=e.read_shift(1),s=[a,i,"b"];if(r.cellFormula){e.l+=2;var l=Sh(e,n-e.l,r);s[3]=cn(l,null,a,r.supbooks,r)}else e.l=n;return s}function f7(e,t,r){var n=e.l+t,a=ma(e);a.r=r["!row"];var i=e.read_shift(1),s=[a,i,"e"];if(r.cellFormula){e.l+=2;var l=Sh(e,n-e.l,r);s[3]=cn(l,null,a,r.supbooks,r)}else e.l=n;return s}function d7(e,t,r){var n=e.l+t,a=ma(e);a.r=r["!row"];var i=dn(e),s=[a,i,"n"];if(r.cellFormula){e.l+=2;var l=Sh(e,n-e.l,r);s[3]=cn(l,null,a,r.supbooks,r)}else e.l=n;return s}function h7(e,t,r){var n=e.l+t,a=ma(e);a.r=r["!row"];var i=pn(e),s=[a,i,"str"];if(r.cellFormula){e.l+=2;var l=Sh(e,n-e.l,r);s[3]=cn(l,null,a,r.supbooks,r)}else e.l=n;return s}var p7=go;function m7(e,t){var r=e.l+t,n=go(e),a=Qb(e),i=pn(e),s=pn(e),l=pn(e);e.l=r;var u={rfx:n,relId:a,loc:i,display:l};return s&&(u.Tooltip=s),u}function x7(){}function v7(e,t,r){var n=e.l+t,a=MP(e),i=e.read_shift(1),s=[a];if(s[2]=i,r.cellFormula){var l=_$(e,n-e.l,r);s[1]=l}else e.l=n;return s}function g7(e,t,r){var n=e.l+t,a=go(e),i=[a];if(r.cellFormula){var s=k$(e,n-e.l,r);i[1]=s,e.l=n}else e.l=n;return i}var y7=["left","right","top","bottom","header","footer"];function b7(e){var t={};return y7.forEach(function(r){t[r]=dn(e)}),t}function w7(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function _7(){}function S7(){}function k7(e,t,r,n,a,i,s){if(!e)return e;var l=t||{};n||(n={"!id":{}});var u=l.dense?[]:{},f,d={s:{r:2e6,c:2e6},e:{r:0,c:0}},p=!1,x=!1,v,w,b,g,k,A,S,N,T,E=[];l.biff=12,l["!row"]=0;var j=0,D=!1,P=[],H={},U=l.supbooks||a.supbooks||[[]];if(U.sharedf=H,U.arrayf=P,U.SheetNames=a.SheetNames||a.Sheets.map(function(oe){return oe.name}),!l.supbooks&&(l.supbooks=U,a.Names))for(var B=0;B=C[0].s.r&&v.r<=C[0].e.r&&k>=C[0].s.c&&k<=C[0].e.c&&(w.F=Dt(C[0]),D=!0)}!D&&z.length>3&&(w.f=z[3])}if(d.s.r>v.r&&(d.s.r=v.r),d.s.c>k&&(d.s.c=k),d.e.rv.r&&(d.s.r=v.r),d.s.c>k&&(d.s.c=k),d.e.r=z.s;)V[z.e--]={width:z.w/256,hidden:!!(z.flags&1),level:z.level},G||(G=!0,aw(z.w/256)),hl(V[z.e+1]);break;case 161:u["!autofilter"]={ref:Dt(z)};break;case 476:u["!margins"]=z;break;case 147:a.Sheets[r]||(a.Sheets[r]={}),z.name&&(a.Sheets[r].CodeName=z.name),(z.above||z.left)&&(u["!outline"]={above:z.above,left:z.left});break;case 137:a.Views||(a.Views=[{}]),a.Views[0]||(a.Views[0]={}),z.RTL&&(a.Views[0].RTL=!0);break;case 485:break;case 64:case 1053:break;case 151:break;case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:p=!0;break;case 36:p=!1;break;case 37:p=!0;break;case 38:p=!1;break;default:if(!ie.T){if(!p||l.WTF)throw new Error("Unexpected record 0x"+K.toString(16))}}},l),delete l.supbooks,delete l["!row"],!u["!ref"]&&(d.s.r<2e6||f&&(f.e.r>0||f.e.c>0||f.s.r>0||f.s.c>0))&&(u["!ref"]=Dt(f||d)),l.sheetRows&&u["!ref"]){var te=hr(u["!ref"]);l.sheetRows<=+te.e.r&&(te.e.r=l.sheetRows-1,te.e.r>d.e.r&&(te.e.r=d.e.r),te.e.rd.e.c&&(te.e.c=d.e.c),te.e.c0&&(u["!merges"]=E),V.length>0&&(u["!cols"]=V),W.length>0&&(u["!rows"]=W),u}function T7(e){var t=[],r=e.match(/^/),n;(e.match(/(.*?)<\/c:pt>/mg)||[]).forEach(function(i){var s=i.match(/(.*)<\/c:v><\/c:pt>/);s&&(t[+s[1]]=r?+s[2]:s[2])});var a=Mt((e.match(/([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/(.*?)<\/c:f>/mg)||[]).forEach(function(i){n=i.replace(/<.*?>/g,"")}),[t,a,n]}function A7(e,t,r,n,a,i){var s=i||{"!type":"chart"};if(!e)return i;var l=0,u=0,f="A",d={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(p){var x=T7(p);d.s.r=d.s.c=0,d.e.c=l,f=Cr(l),x[0].forEach(function(v,w){s[f+tn(w)]={t:"n",v,z:x[1]},u=w}),d.e.r0&&(s["!ref"]=Dt(d)),s}function E7(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},s,l=e.match(v3);return l&&sw(l[0],i,a,r),(s=e.match(/drawing r:id="(.*?)"/))&&(i["!rel"]=s[1]),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}function j7(e,t){e.l+=10;var r=pn(e);return{name:r}}function O7(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},s=!1;return ji(e,function(u,f,d){switch(d){case 550:i["!rel"]=u;break;case 651:a.Sheets[r]||(a.Sheets[r]={}),u.name&&(a.Sheets[r].CodeName=u.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:s=!0;break;case 36:s=!1;break;case 37:break;case 38:break;default:if(!(f.T>0)){if(!(f.T<0)){if(!s||t.WTF)throw new Error("Unexpected record 0x"+d.toString(16))}}}},t),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}var y3=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],N7=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],P7=[],C7=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function Bk(e,t){for(var r=0;r!=e.length;++r)for(var n=e[r],a=0;a!=t.length;++a){var i=t[a];if(n[i[0]]==null)n[i[0]]=i[1];else switch(i[2]){case"bool":typeof n[i[0]]=="string"&&(n[i[0]]=ir(n[i[0]]));break;case"int":typeof n[i[0]]=="string"&&(n[i[0]]=parseInt(n[i[0]],10));break}}}function $k(e,t){for(var r=0;r!=t.length;++r){var n=t[r];if(e[n[0]]==null)e[n[0]]=n[1];else switch(n[2]){case"bool":typeof e[n[0]]=="string"&&(e[n[0]]=ir(e[n[0]]));break;case"int":typeof e[n[0]]=="string"&&(e[n[0]]=parseInt(e[n[0]],10));break}}}function b3(e){$k(e.WBProps,y3),$k(e.CalcPr,C7),Bk(e.WBView,N7),Bk(e.Sheets,P7),ol.date1904=ir(e.WBProps.date1904)}var D7="][*?/\\".split("");function F7(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return D7.forEach(function(n){if(e.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}var M7=/<\w+:workbook/;function I7(e,t){if(!e)throw new Error("Could not find file");var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},n=!1,a="xmlns",i={},s=0;if(e.replace(xn,function(u,f){var d=mt(u);switch(Qa(d[0])){case"":break;case"":case"":break;case"":break;case"":y3.forEach(function(p){if(d[p[0]]!=null)switch(p[2]){case"bool":r.WBProps[p[0]]=ir(d[p[0]]);break;case"int":r.WBProps[p[0]]=parseInt(d[p[0]],10);break;default:r.WBProps[p[0]]=d[p[0]]}}),d.codeName&&(r.WBProps.CodeName=Qt(d.codeName));break;case"":break;case"":break;case"":case"":break;case"":delete d[0],r.WBView.push(d);break;case"":break;case"":case"":break;case"":break;case"":break;case"":case"":break;case"":break;case"":case"":n=!1;break;case"":i.Ref=Mt(Qt(e.slice(s,f))),r.Names.push(i);break;case"":break;case"":delete d[0],r.CalcPr=d;break;case"":break;case"":case"":case"":break;case"":case"":case"":break;case"":case"":break;case"":break;case"":break;case"":case"":break;case"":case"":case"":break;case"":n=!1;break;case"":n=!0;break;case"":n=!1;break;case"8?pn(e):"";return a.length>0&&(r.CodeName=a),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}function B7(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function $7(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var a=e.read_shift(4),i=gI(e),s=S$(e,0,r),l=Qb(e);e.l=n;var u={Name:i,Ptg:s};return a<268435455&&(u.Sheet=a),l&&(u.Comment=l),u}function U7(e,t){var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},n=[],a=!1;t||(t={}),t.biff=12;var i=[],s=[[]];return s.SheetNames=[],s.XTI=[],gd[16]={n:"BrtFRTArchID$",f:B7},ji(e,function(u,f,d){switch(d){case 156:s.SheetNames.push(u.name),r.Sheets.push(u);break;case 153:r.WBProps=u;break;case 39:u.Sheet!=null&&(t.SID=u.Sheet),u.Ref=cn(u.Ptg,null,null,s,t),delete t.SID,delete u.Ptg,i.push(u);break;case 1036:break;case 357:case 358:case 355:case 667:s[0].length?s.push([d,u]):s[0]=[d,u],s[s.length-1].XTI=[];break;case 362:s.length===0&&(s[0]=[],s[0].XTI=[]),s[s.length-1].XTI=s[s.length-1].XTI.concat(u),s.XTI=s.XTI.concat(u);break;case 361:break;case 2071:case 158:case 143:case 664:case 353:break;case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:break;case 35:n.push(d),a=!0;break;case 36:n.pop(),a=!1;break;case 37:n.push(d),a=!0;break;case 38:n.pop(),a=!1;break;case 16:break;default:if(!f.T){if(!a||t.WTF&&n[n.length-1]!=37&&n[n.length-1]!=35)throw new Error("Unexpected record 0x"+d.toString(16))}}},t),b3(r),r.Names=i,r.supbooks=s,r}function z7(e,t,r){return t.slice(-4)===".bin"?U7(e,r):I7(e,r)}function W7(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?k7(e,n,r,a,i,s,l):R$(e,n,r,a,i,s,l)}function H7(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?O7(e,n,r,a,i):E7(e,n,r,a,i)}function q7(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?QL():eB()}function V7(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?ZL():JL()}function K7(e,t,r,n){return t.slice(-4)===".bin"?pL(e,r,n):lL(e,r,n)}function G7(e,t,r){return s3(e,r)}function X7(e,t,r){return t.slice(-4)===".bin"?N6(e,r):j6(e,r)}function Y7(e,t,r){return t.slice(-4)===".bin"?GL(e,r):WL(e,r)}function Z7(e,t,r){return t.slice(-4)===".bin"?$L(e):LL(e)}function J7(e,t,r,n){return r.slice(-4)===".bin"?UL(e,t,r,n):void 0}function Q7(e,t,r){return t.slice(-4)===".bin"?IL(e,t,r):RL(e,t,r)}var w3=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,_3=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function Sa(e,t){var r=e.split(/\s+/),n=[];if(n[0]=r[0],r.length===1)return n;var a=e.match(w3),i,s,l,u;if(a)for(u=0;u!=a.length;++u)i=a[u].match(_3),(s=i[1].indexOf(":"))===-1?n[i[1]]=i[2].slice(1,i[2].length-1):(i[1].slice(0,6)==="xmlns:"?l="xmlns"+i[1].slice(6):l=i[1].slice(s+1),n[l]=i[2].slice(1,i[2].length-1));return n}function e9(e){var t=e.split(/\s+/),r={};if(t.length===1)return r;var n=e.match(w3),a,i,s,l;if(n)for(l=0;l!=n.length;++l)a=n[l].match(_3),(i=a[1].indexOf(":"))===-1?r[a[1]]=a[2].slice(1,a[2].length-1):(a[1].slice(0,6)==="xmlns:"?s="xmlns"+a[1].slice(6):s=a[1].slice(i+1),r[s]=a[2].slice(1,a[2].length-1));return r}var fu;function t9(e,t){var r=fu[e]||Mt(e);return r==="General"?io(t):ha(r,t)}function r9(e,t,r,n){var a=n;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":a=ir(n);break;case"i2":case"int":a=parseInt(n,10);break;case"r4":case"float":a=parseFloat(n);break;case"date":case"dateTime.tz":a=qr(n);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[Mt(t)]=a}function n9(e,t,r){if(e.t!=="z"){if(!r||r.cellText!==!1)try{e.t==="e"?e.w=e.w||yo[e.v]:t==="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=_u(e.v):e.w=io(e.v):e.w=t9(t||"General",e.v)}catch(i){if(r.WTF)throw i}try{var n=fu[t]||t||"General";if(r.cellNF&&(e.z=n),r.cellDates&&e.t=="n"&&Ul(n)){var a=Ks(e.v);a&&(e.t="d",e.v=new Date(a.y,a.m-1,a.d,a.H,a.M,a.S,a.u))}}catch(i){if(r.WTF)throw i}}}function a9(e,t,r){if(r.cellStyles&&t.Interior){var n=t.Interior;n.Pattern&&(n.patternType=rL[n.Pattern]||n.Pattern)}e[t.ID]=t}function i9(e,t,r,n,a,i,s,l,u,f){var d="General",p=n.StyleID,x={};f=f||{};var v=[],w=0;for(p===void 0&&l&&(p=l.StyleID),p===void 0&&s&&(p=s.StyleID);i[p]!==void 0&&(i[p].nf&&(d=i[p].nf),i[p].Interior&&v.push(i[p].Interior),!!i[p].Parent);)p=i[p].Parent;switch(r.Type){case"Boolean":n.t="b",n.v=ir(e);break;case"String":n.t="s",n.r=lk(Mt(e)),n.v=e.indexOf("<")>-1?Mt(t||e).replace(/<.*?>/g,""):n.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),n.v=(qr(e)-new Date(Date.UTC(1899,11,30)))/(1440*60*1e3),n.v!==n.v?n.v=Mt(e):n.v<60&&(n.v=n.v-1),(!d||d=="General")&&(d="yyyy-mm-dd");case"Number":n.v===void 0&&(n.v=+e),n.t||(n.t="n");break;case"Error":n.t="e",n.v=LP[e],f.cellText!==!1&&(n.w=e);break;default:e==""&&t==""?n.t="z":(n.t="s",n.v=lk(t||e));break}if(n9(n,d,f),f.cellFormula!==!1)if(n.Formula){var b=Mt(n.Formula);b.charCodeAt(0)==61&&(b=b.slice(1)),n.f=sl(b,a),delete n.Formula,n.ArrayRange=="RC"?n.F=sl("RC:RC",a):n.ArrayRange&&(n.F=sl(n.ArrayRange,a),u.push([hr(n.F),n.F]))}else for(w=0;w=u[w][0].s.r&&a.r<=u[w][0].e.r&&a.c>=u[w][0].s.c&&a.c<=u[w][0].e.c&&(n.F=u[w][1]);f.cellStyles&&(v.forEach(function(g){!x.patternType&&g.patternType&&(x.patternType=g.patternType)}),n.s=x),n.StyleID!==void 0&&(n.ixfe=n.StyleID)}function s9(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,` +`).replace(/\r/g,` +`),e.v=e.w=e.ixfe=void 0}function qm(e,t){var r=t||{};uP();var n=Xc(Gb(e));(r.type=="binary"||r.type=="array"||r.type=="base64")&&(n=Qt(n));var a=n.slice(0,1024).toLowerCase(),i=!1;if(a=a.replace(/".*?"/g,""),(a.indexOf(">")&1023)>Math.min(a.indexOf(",")&1023,a.indexOf(";")&1023)){var s=en(r);return s.type="string",Tu.to_workbook(n,s)}if(a.indexOf("=0&&(i=!0)}),i)return m9(n,r);fu={"General Number":"General","General Date":kt[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":kt[15],"Short Date":kt[14],"Long Time":kt[19],"Medium Time":kt[18],"Short Time":kt[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:kt[2],Standard:kt[4],Percent:kt[10],Scientific:kt[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var l,u=[],f,d={},p=[],x=r.dense?[]:{},v="",w={},b={},g=Sa(''),k=0,A=0,S=0,N={s:{r:2e6,c:2e6},e:{r:0,c:0}},T={},E={},j="",D=0,P=[],H={},U={},B=0,V=[],W=[],G={},ne=[],te,oe=!1,z=[],ie=[],K={},C=0,re=0,F={Sheets:[],WBProps:{date1904:!1}},R={};ku.lastIndex=0,n=n.replace(//mg,"");for(var Y="";l=ku.exec(n);)switch(l[3]=(Y=l[3]).toLowerCase()){case"data":if(Y=="data"){if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&u.push([l[3],!0]);break}if(u[u.length-1][1])break;l[1]==="/"?i9(n.slice(k,l.index),j,g,u[u.length-1][0]=="comment"?G:w,{c:A,r:S},T,ne[A],b,z,r):(j="",g=Sa(l[0]),k=l.index+l[0].length);break;case"cell":if(l[1]==="/")if(W.length>0&&(w.c=W),(!r.sheetRows||r.sheetRows>S)&&w.v!==void 0&&(r.dense?(x[S]||(x[S]=[]),x[S][A]=w):x[Cr(A)+tn(S)]=w),w.HRef&&(w.l={Target:Mt(w.HRef)},w.HRefScreenTip&&(w.l.Tooltip=w.HRefScreenTip),delete w.HRef,delete w.HRefScreenTip),(w.MergeAcross||w.MergeDown)&&(C=A+(parseInt(w.MergeAcross,10)|0),re=S+(parseInt(w.MergeDown,10)|0),P.push({s:{c:A,r:S},e:{c:C,r:re}})),!r.sheetStubs)w.MergeAcross?A=C+1:++A;else if(w.MergeAcross||w.MergeDown){for(var fe=A;fe<=C;++fe)for(var ce=S;ce<=re;++ce)(fe>A||ce>S)&&(r.dense?(x[ce]||(x[ce]=[]),x[ce][fe]={t:"z"}):x[Cr(fe)+tn(ce)]={t:"z"});A=C+1}else++A;else w=e9(l[0]),w.Index&&(A=+w.Index-1),AN.e.c&&(N.e.c=A),l[0].slice(-2)==="/>"&&++A,W=[];break;case"row":l[1]==="/"||l[0].slice(-2)==="/>"?(SN.e.r&&(N.e.r=S),l[0].slice(-2)==="/>"&&(b=Sa(l[0]),b.Index&&(S=+b.Index-1)),A=0,++S):(b=Sa(l[0]),b.Index&&(S=+b.Index-1),K={},(b.AutoFitHeight=="0"||b.Height)&&(K.hpx=parseInt(b.Height,10),K.hpt=i3(K.hpx),ie[S]=K),b.Hidden=="1"&&(K.hidden=!0,ie[S]=K));break;case"worksheet":if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"));p.push(v),N.s.r<=N.e.r&&N.s.c<=N.e.c&&(x["!ref"]=Dt(N),r.sheetRows&&r.sheetRows<=N.e.r&&(x["!fullref"]=x["!ref"],N.e.r=r.sheetRows-1,x["!ref"]=Dt(N))),P.length&&(x["!merges"]=P),ne.length>0&&(x["!cols"]=ne),ie.length>0&&(x["!rows"]=ie),d[v]=x}else N={s:{r:2e6,c:2e6},e:{r:0,c:0}},S=A=0,u.push([l[3],!1]),f=Sa(l[0]),v=Mt(f.Name),x=r.dense?[]:{},P=[],z=[],ie=[],R={name:v,Hidden:0},F.Sheets.push(R);break;case"table":if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"))}else{if(l[0].slice(-2)=="/>")break;u.push([l[3],!1]),ne=[],oe=!1}break;case"style":l[1]==="/"?a9(T,E,r):E=Sa(l[0]);break;case"numberformat":E.nf=Mt(Sa(l[0]).Format||"General"),fu[E.nf]&&(E.nf=fu[E.nf]);for(var se=0;se!=392&&kt[se]!=E.nf;++se);if(se==392){for(se=57;se!=392;++se)if(kt[se]==null){Qs(E.nf,se);break}}break;case"column":if(u[u.length-1][0]!=="table")break;if(te=Sa(l[0]),te.Hidden&&(te.hidden=!0,delete te.Hidden),te.Width&&(te.wpx=parseInt(te.Width,10)),!oe&&te.wpx>10){oe=!0,_n=n3;for(var he=0;he0&&(qe.Sheet=F.Sheets.length-1),F.Names.push(qe);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(l[0].slice(-2)==="/>")break;l[1]==="/"?j+=n.slice(D,l.index):D=l.index+l[0].length;break;case"interior":if(!r.cellStyles)break;E.Interior=Sa(l[0]);break;case"protection":break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(l[0].slice(-2)==="/>")break;l[1]==="/"?WI(H,Y,n.slice(B,l.index)):B=l.index+l[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"))}else u.push([l[3],!1]);break;case"comment":if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"));s9(G),W.push(G)}else u.push([l[3],!1]),f=Sa(l[0]),G={a:f.Author};break;case"autofilter":if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/"){var Ne=Sa(l[0]);x["!autofilter"]={ref:sl(Ne.Range).replace(/\$/g,"")},u.push([l[3],!0])}break;case"name":break;case"datavalidation":if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&u.push([l[3],!0]);break;case"pixelsperinch":break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(l[1]==="/"){if((f=u.pop())[0]!==l[3])throw new Error("Bad state: "+f.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&u.push([l[3],!0]);break;case"null":break;default:if(u.length==0&&l[3]=="document"||u.length==0&&l[3]=="uof")return Vk(n,r);var De=!0;switch(u[u.length-1][0]){case"officedocumentsettings":switch(l[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:De=!1}break;case"componentoptions":switch(l[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:De=!1}break;case"excelworkbook":switch(l[3]){case"date1904":F.WBProps.date1904=!0;break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:De=!1}break;case"workbookoptions":switch(l[3]){case"owcversion":break;case"height":break;case"width":break;default:De=!1}break;case"worksheetoptions":switch(l[3]){case"visible":if(l[0].slice(-2)!=="/>")if(l[1]==="/")switch(n.slice(B,l.index)){case"SheetHidden":R.Hidden=1;break;case"SheetVeryHidden":R.Hidden=2;break}else B=l.index+l[0].length;break;case"header":x["!margins"]||uu(x["!margins"]={},"xlml"),isNaN(+mt(l[0]).Margin)||(x["!margins"].header=+mt(l[0]).Margin);break;case"footer":x["!margins"]||uu(x["!margins"]={},"xlml"),isNaN(+mt(l[0]).Margin)||(x["!margins"].footer=+mt(l[0]).Margin);break;case"pagemargins":var Fe=mt(l[0]);x["!margins"]||uu(x["!margins"]={},"xlml"),isNaN(+Fe.Top)||(x["!margins"].top=+Fe.Top),isNaN(+Fe.Left)||(x["!margins"].left=+Fe.Left),isNaN(+Fe.Right)||(x["!margins"].right=+Fe.Right),isNaN(+Fe.Bottom)||(x["!margins"].bottom=+Fe.Bottom);break;case"displayrighttoleft":F.Views||(F.Views=[]),F.Views[0]||(F.Views[0]={}),F.Views[0].RTL=!0;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":x["!outline"]||(x["!outline"]={}),x["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":x["!outline"]||(x["!outline"]={}),x["!outline"].left=!0;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:De=!1}break;case"pivottable":case"pivotcache":switch(l[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:De=!1}break;case"pagebreaks":switch(l[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:De=!1}break;case"autofilter":switch(l[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:De=!1}break;case"querytable":switch(l[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:De=!1}break;case"datavalidation":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:De=!1}break;case"sorting":case"conditionalformatting":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:De=!1}break;case"mapinfo":case"schema":case"data":switch(l[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":break;case"row":break;default:De=!1}break;case"smarttags":break;default:De=!1;break}if(De||l[3].match(/!\[CDATA/))break;if(!u[u.length-1][1])throw"Unrecognized tag: "+l[3]+"|"+u.join("|");if(u[u.length-1][0]==="customdocumentproperties"){if(l[0].slice(-2)==="/>")break;l[1]==="/"?r9(U,Y,V,n.slice(B,l.index)):(V=l,B=l.index+l[0].length);break}if(r.WTF)throw"Unrecognized tag: "+l[3]+"|"+u.join("|")}var Se={};return!r.bookSheets&&!r.bookProps&&(Se.Sheets=d),Se.SheetNames=p,Se.Workbook=F,Se.SSF=en(kt),Se.Props=H,Se.Custprops=U,Se}function f1(e,t){switch(cw(t=t||{}),t.type||"base64"){case"base64":return qm(Yn(e),t);case"binary":case"buffer":case"file":return qm(e,t);case"array":return qm(xo(e),t)}}function o9(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=wI(r),r.length-r.l<=4)return t;var n=r.read_shift(4);if(n==0||n>40||(r.l-=4,t.Reserved1=r.read_shift(0,"lpstr-ansi"),r.length-r.l<=4)||(n=r.read_shift(4),n!==1907505652)||(t.UnicodeClipboardFormat=_I(r),n=r.read_shift(4),n==0||n>40))return t;r.l-=4,t.Reserved2=r.read_shift(0,"lpwstr")}var l9=[60,1084,2066,2165,2175];function c9(e,t,r,n,a){var i=n,s=[],l=r.slice(r.l,r.l+i);if(a&&a.enc&&a.enc.insitu&&l.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:break;case 133:break;default:a.enc.insitu(l)}s.push(l),r.l+=i;for(var u=mi(r,r.l),f=d1[u],d=0;f!=null&&l9.indexOf(u)>-1;)i=mi(r,r.l+2),d=r.l+4,u==2066?d+=4:(u==2165||u==2175)&&(d+=12),l=r.slice(d,r.l+4+i),s.push(l),r.l+=4+i,f=d1[u=mi(r,r.l)];var p=ss(s);Zr(p,0);var x=0;p.lens=[];for(var v=0;v1)&&!(er.sheetRows&&ot.r>=er.sheetRows)){if(er.cellStyles&&At.XF&&At.XF.data&&H(ot,At,er),delete At.ixfe,delete At.XF,p=ot,x=bt(ot),(!s||!s.s||!s.e)&&(s={s:{r:0,c:0},e:{r:0,c:0}}),ot.rs.e.r&&(s.e.r=ot.r+1),ot.c+1>s.e.c&&(s.e.c=ot.c+1),er.cellFormula&&At.f){for(var Bt=0;Btot.c||A[Bt][0].s.r>ot.r)&&!(A[Bt][0].e.c>8)!==ce)throw new Error("rt mismatch: "+Ce+"!="+ce);he.r==12&&(e.l+=10,se-=10)}var I={};if(ce===10?I=he.f(e,se,B):I=c9(ce,he,e,se,B),K==0&&[9,521,1033,2057].indexOf(ie)===-1)continue;switch(ce){case 34:r.opts.Date1904=j.WBProps.date1904=I;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(B.enc||(e.l=0),B.enc=I,!t.password)throw new Error("File is password-protected");if(I.valid==null)throw new Error("Encryption scheme unsupported");if(!I.valid)throw new Error("Password is incorrect");break;case 92:B.lastuser=I;break;case 66:var qe=Number(I);switch(qe){case 21010:qe=1200;break;case 32768:qe=1e4;break;case 32769:qe=1252;break}Na(B.codepage=qe),Y=!0;break;case 317:B.rrtabid=I;break;case 25:B.winlocked=I;break;case 439:r.opts.RefreshAll=I;break;case 12:r.opts.CalcCount=I;break;case 16:r.opts.CalcDelta=I;break;case 17:r.opts.CalcIter=I;break;case 13:r.opts.CalcMode=I;break;case 14:r.opts.CalcPrecision=I;break;case 95:r.opts.CalcSaveRecalc=I;break;case 15:B.CalcRefMode=I;break;case 2211:r.opts.FullCalc=I;break;case 129:I.fDialog&&(a["!type"]="dialog"),I.fBelow||((a["!outline"]||(a["!outline"]={})).above=!0),I.fRight||((a["!outline"]||(a["!outline"]={})).left=!0);break;case 224:T.push(I);break;case 430:z.push([I]),z[z.length-1].XTI=[];break;case 35:case 547:z[z.length-1].push(I);break;case 24:case 536:R={Name:I.Name,Ref:cn(I.rgce,s,null,z,B)},I.itab>0&&(R.Sheet=I.itab-1),z.names.push(R),z[0]||(z[0]=[],z[0].XTI=[]),z[z.length-1].push(I),I.Name=="_xlnm._FilterDatabase"&&I.itab>0&&I.rgce&&I.rgce[0]&&I.rgce[0][0]&&I.rgce[0][0][0]=="PtgArea3d"&&(F[I.itab-1]={ref:Dt(I.rgce[0][0][1][2])});break;case 22:B.ExternCount=I;break;case 23:z.length==0&&(z[0]=[],z[0].XTI=[]),z[z.length-1].XTI=z[z.length-1].XTI.concat(I),z.XTI=z.XTI.concat(I);break;case 2196:if(B.biff<8)break;R!=null&&(R.Comment=I[1]);break;case 18:a["!protect"]=I;break;case 19:I!==0&&B.WTF&&console.error("Password verifier: "+I);break;case 133:i[I.pos]=I,B.snames.push(I.name);break;case 10:{if(--K)break;if(s.e){if(s.e.r>0&&s.e.c>0){if(s.e.r--,s.e.c--,a["!ref"]=Dt(s),t.sheetRows&&t.sheetRows<=s.e.r){var Ne=s.e.r;s.e.r=t.sheetRows-1,a["!fullref"]=a["!ref"],a["!ref"]=Dt(s),s.e.r=Ne}s.e.r++,s.e.c++}W.length>0&&(a["!merges"]=W),G.length>0&&(a["!objects"]=G),ne.length>0&&(a["!cols"]=ne),te.length>0&&(a["!rows"]=te),j.Sheets.push(D)}f===""?d=a:n[f]=a,a=t.dense?[]:{}}break;case 9:case 521:case 1033:case 2057:{if(B.biff===8&&(B.biff={9:2,521:3,1033:4}[ce]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[I.BIFFVer]||8),B.biffguess=I.BIFFVer==0,I.BIFFVer==0&&I.dt==4096&&(B.biff=5,Y=!0,Na(B.codepage=28591)),B.biff==8&&I.BIFFVer==0&&I.dt==16&&(B.biff=2),K++)break;if(a=t.dense?[]:{},B.biff<8&&!Y&&(Y=!0,Na(B.codepage=t.codepage||1252)),B.biff<5||I.BIFFVer==0&&I.dt==4096){f===""&&(f="Sheet1"),s={s:{r:0,c:0},e:{r:0,c:0}};var De={pos:e.l-se,name:f};i[De.pos]=De,B.snames.push(f)}else f=(i[fe]||{name:""}).name;I.dt==32&&(a["!type"]="chart"),I.dt==64&&(a["!type"]="macro"),W=[],G=[],B.arrayf=A=[],ne=[],te=[],oe=!1,D={Hidden:(i[fe]||{hs:0}).hs,name:f}}break;case 515:case 3:case 2:a["!type"]=="chart"&&(t.dense?(a[I.r]||[])[I.c]:a[bt({c:I.c,r:I.r})])&&++I.c,S={ixfe:I.ixfe,XF:T[I.ixfe]||{},v:I.val,t:"n"},C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:I.c,r:I.r},S,t);break;case 5:case 517:S={ixfe:I.ixfe,XF:T[I.ixfe],v:I.val,t:I.t},C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:I.c,r:I.r},S,t);break;case 638:S={ixfe:I.ixfe,XF:T[I.ixfe],v:I.rknum,t:"n"},C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:I.c,r:I.r},S,t);break;case 189:for(var Fe=I.c;Fe<=I.C;++Fe){var Se=I.rkrec[Fe-I.c][0];S={ixfe:Se,XF:T[Se],v:I.rkrec[Fe-I.c][1],t:"n"},C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:Fe,r:I.r},S,t)}break;case 6:case 518:case 1030:{if(I.val=="String"){l=I;break}if(S=B0(I.val,I.cell.ixfe,I.tt),S.XF=T[S.ixfe],t.cellFormula){var Je=I.formula;if(Je&&Je[0]&&Je[0][0]&&Je[0][0][0]=="PtgExp"){var pt=Je[0][0][1][0],Ge=Je[0][0][1][1],ut=bt({r:pt,c:Ge});k[ut]?S.f=""+cn(I.formula,s,I.cell,z,B):S.F=((t.dense?(a[pt]||[])[Ge]:a[ut])||{}).F}else S.f=""+cn(I.formula,s,I.cell,z,B)}C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U(I.cell,S,t),l=I}break;case 7:case 519:if(l)l.val=I,S=B0(I,l.cell.ixfe,"s"),S.XF=T[S.ixfe],t.cellFormula&&(S.f=""+cn(l.formula,s,l.cell,z,B)),C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U(l.cell,S,t),l=null;else throw new Error("String record expects Formula");break;case 33:case 545:{A.push(I);var it=bt(I[0].s);if(v=t.dense?(a[I[0].s.r]||[])[I[0].s.c]:a[it],t.cellFormula&&v){if(!l||!it||!v)break;v.f=""+cn(I[1],s,I[0],z,B),v.F=Dt(I[0])}}break;case 1212:{if(!t.cellFormula)break;if(x){if(!l)break;k[bt(l.cell)]=I[0],v=t.dense?(a[l.cell.r]||[])[l.cell.c]:a[bt(l.cell)],(v||{}).f=""+cn(I[0],s,p,z,B)}}break;case 253:S=B0(u[I.isst].t,I.ixfe,"s"),u[I.isst].h&&(S.h=u[I.isst].h),S.XF=T[S.ixfe],C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:I.c,r:I.r},S,t);break;case 513:t.sheetStubs&&(S={ixfe:I.ixfe,XF:T[I.ixfe],t:"z"},C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:I.c,r:I.r},S,t));break;case 190:if(t.sheetStubs)for(var _t=I.c;_t<=I.C;++_t){var Lt=I.ixfe[_t-I.c];S={ixfe:Lt,XF:T[Lt],t:"z"},C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:_t,r:I.r},S,t)}break;case 214:case 516:case 4:S=B0(I.val,I.ixfe,"s"),S.XF=T[S.ixfe],C>0&&(S.z=re[S.ixfe>>8&63]),za(S,t,r.opts.Date1904),U({c:I.c,r:I.r},S,t);break;case 0:case 512:K===1&&(s=I);break;case 252:u=I;break;case 1054:if(B.biff==4){re[C++]=I[1];for(var Tt=0;Tt=163&&Qs(I[1],C+163)}else Qs(I[1],I[0]);break;case 30:{re[C++]=I;for(var Tr=0;Tr=163&&Qs(I,C+163)}break;case 229:W=W.concat(I);break;case 93:G[I.cmo[0]]=B.lastobj=I;break;case 438:B.lastobj.TxO=I;break;case 127:B.lastobj.ImData=I;break;case 440:for(g=I[0].s.r;g<=I[0].e.r;++g)for(b=I[0].s.c;b<=I[0].e.c;++b)v=t.dense?(a[g]||[])[b]:a[bt({c:b,r:g})],v&&(v.l=I[1]);break;case 2048:for(g=I[0].s.r;g<=I[0].e.r;++g)for(b=I[0].s.c;b<=I[0].e.c;++b)v=t.dense?(a[g]||[])[b]:a[bt({c:b,r:g})],v&&v.l&&(v.l.Tooltip=I[1]);break;case 28:{if(B.biff<=5&&B.biff>=2)break;v=t.dense?(a[I[0].r]||[])[I[0].c]:a[bt(I[0])];var Rr=G[I[2]];v||(t.dense?(a[I[0].r]||(a[I[0].r]=[]),v=a[I[0].r][I[0].c]={t:"z"}):v=a[bt(I[0])]={t:"z"},s.e.r=Math.max(s.e.r,I[0].r),s.s.r=Math.min(s.s.r,I[0].r),s.e.c=Math.max(s.e.c,I[0].c),s.s.c=Math.min(s.s.c,I[0].c)),v.c||(v.c=[]),w={a:I[1],t:Rr.TxO.t},v.c.push(w)}break;case 2173:CL(T[I.ixfe],I.ext);break;case 125:{if(!B.cellStyles)break;for(;I.e>=I.s;)ne[I.e--]={width:I.w/256,level:I.level||0,hidden:!!(I.flags&1)},oe||(oe=!0,aw(I.w/256)),hl(ne[I.e+1])}break;case 520:{var qt={};I.level!=null&&(te[I.r]=qt,qt.level=I.level),I.hidden&&(te[I.r]=qt,qt.hidden=!0),I.hpt&&(te[I.r]=qt,qt.hpt=I.hpt,qt.hpx=Eu(I.hpt))}break;case 38:case 39:case 40:case 41:a["!margins"]||uu(a["!margins"]={}),a["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[ce]]=I;break;case 161:a["!margins"]||uu(a["!margins"]={}),a["!margins"].header=I.header,a["!margins"].footer=I.footer;break;case 574:I.RTL&&(j.Views[0].RTL=!0);break;case 146:E=I;break;case 2198:V=I;break;case 140:N=I;break;case 442:f?D.CodeName=I||D.name:j.WBProps.CodeName=I||"ThisWorkbook";break}}else he||console.error("Missing Info for XLS Record 0x"+ce.toString(16)),e.l+=se}return r.SheetNames=Za(i).sort(function(Ar,ot){return Number(Ar)-Number(ot)}).map(function(Ar){return i[Ar].name}),t.bookSheets||(r.Sheets=n),!r.SheetNames.length&&d["!ref"]?(r.SheetNames.push("Sheet1"),r.Sheets&&(r.Sheets.Sheet1=d)):r.Preamble=d,r.Sheets&&F.forEach(function(Ar,ot){r.Sheets[r.SheetNames[ot]]["!autofilter"]=Ar}),r.Strings=u,r.SSF=en(kt),B.enc&&(r.Encryption=B.enc),V&&(r.Themes=V),r.Metadata={},N!==void 0&&(r.Metadata.Country=N),z.names.length>0&&(j.Names=z.names),r.Workbook=j,r}var Uk={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function f9(e,t,r){var n=Ct.find(e,"/!DocumentSummaryInformation");if(n&&n.size>0)try{var a=kk(n,jI,Uk.DSI);for(var i in a)t[i]=a[i]}catch(f){if(r.WTF)throw f}var s=Ct.find(e,"/!SummaryInformation");if(s&&s.size>0)try{var l=kk(s,OI,Uk.SI);for(var u in l)t[u]==null&&(t[u]=l[u])}catch(f){if(r.WTF)throw f}t.HeadingPairs&&t.TitlesOfParts&&($P(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}function S3(e,t){t||(t={}),cw(t),JN(),t.codepage&&Ub(t.codepage);var r,n;if(e.FullPaths){if(Ct.find(e,"/encryption"))throw new Error("File is password-protected");r=Ct.find(e,"!CompObj"),n=Ct.find(e,"/Workbook")||Ct.find(e,"/Book")}else{switch(t.type){case"base64":e=ja(Yn(e));break;case"binary":e=ja(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e));break}Zr(e,0),n={content:e}}var a,i;if(r&&o9(r),t.bookProps&&!t.bookSheets)a={};else{var s=Pt?"buffer":"array";if(n&&n.content)a=u9(n.content,t);else if((i=Ct.find(e,"PerfectOffice_MAIN"))&&i.content)a=lu.to_workbook(i.content,(t.type=s,t));else if((i=Ct.find(e,"NativeContent_MAIN"))&&i.content)a=lu.to_workbook(i.content,(t.type=s,t));else throw(i=Ct.find(e,"MN0"))&&i.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");t.bookVBA&&e.FullPaths&&Ct.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(a.vbaraw=YL(e))}var l={};return e.FullPaths&&f9(e,l,t),a.Props=a.Custprops=l,t.bookFiles&&(a.cfb=e),a}var gd={0:{f:V$},1:{f:Y$},2:{f:i7},3:{f:e7},4:{f:J$},5:{f:a7},6:{f:l7},7:{f:r7},8:{f:h7},9:{f:d7},10:{f:u7},11:{f:f7},12:{f:Z$},13:{f:s7},14:{f:t7},15:{f:Q$},16:{f:g3},17:{f:c7},18:{f:n7},19:{f:Jb},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:$7},40:{},42:{},43:{f:uL},44:{f:cL},45:{f:fL},46:{f:hL},47:{f:dL},48:{},49:{f:pI},50:{},51:{f:FL},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:JP},62:{f:o7},63:{f:BL},64:{f:_7},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:mn,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:w7},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:X$},148:{f:K$,p:16},151:{f:x7},152:{},153:{f:L7},154:{},155:{},156:{f:R7},157:{},158:{},159:{T:1,f:O6},160:{T:-1},161:{T:1,f:go},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:p7},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:DL},336:{T:-1},337:{f:ML,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:o1},357:{},358:{},359:{},360:{T:1},361:{},362:{f:ZP},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:v7},427:{f:g7},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:b7},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:G$},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:m7},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:o1},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:KL},633:{T:1},634:{T:-1},635:{T:1,f:VL},636:{T:-1},637:{f:xI},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:j7},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:S7},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},d1={6:{f:Wm},10:{f:Qi},12:{f:_r},13:{f:_r},14:{f:vr},15:{f:vr},16:{f:dn},17:{f:vr},18:{f:vr},19:{f:_r},20:{f:jk},21:{f:jk},23:{f:ZP},24:{f:Nk},25:{f:vr},26:{},27:{},28:{f:HR},29:{},34:{f:vr},35:{f:Ok},38:{f:dn},39:{f:dn},40:{f:dn},41:{f:dn},42:{f:vr},43:{f:vr},47:{f:G6},49:{f:TR},51:{f:_r},60:{},61:{f:_R},64:{f:vr},65:{f:kR},66:{f:_r},77:{},80:{},81:{},82:{},85:{f:_r},89:{},90:{},91:{},92:{f:pR},93:{f:VR},94:{},95:{f:vr},96:{},97:{},99:{f:vr},125:{f:JP},128:{f:MR},129:{f:mR},130:{f:_r},131:{f:vr},132:{f:vr},133:{f:xR},134:{},140:{f:JR},141:{f:_r},144:{},146:{f:e6},151:{},152:{},153:{},154:{},155:{},156:{f:_r},157:{},158:{},160:{f:i6},161:{f:r6},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:PR},190:{f:CR},193:{f:Qi},197:{},198:{},199:{},200:{},201:{},202:{f:vr},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:_r},220:{},221:{f:vr},222:{},224:{f:FR},225:{f:hR},226:{f:Qi},227:{},229:{f:qR},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:vR},253:{f:AR},255:{f:gR},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:qP},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:vr},353:{f:Qi},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:RR},431:{f:vr},432:{},433:{},434:{},437:{},438:{f:XR},439:{f:vr},440:{f:YR},441:{},442:{f:mf},443:{},444:{f:_r},445:{},446:{},448:{f:Qi},449:{f:wR,r:2},450:{f:Qi},512:{f:Ak},513:{f:a6},515:{f:IR},516:{f:ER},517:{f:Ek},519:{f:s6},520:{f:yR},523:{},545:{f:Pk},549:{f:Tk},566:{},574:{f:SR},638:{f:NR},659:{},1048:{},1054:{f:jR},1084:{},1212:{f:UR},2048:{f:ZR},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:I0},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:Qi},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:t6,r:12},2173:{f:PL,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:vr,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:$R,r:12},2197:{},2198:{f:TL,r:12},2199:{},2200:{},2201:{},2202:{f:zR,r:12},2203:{f:Qi},2204:{},2205:{},2206:{},2207:{},2211:{f:bR},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:_r},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:n6},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:QR},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:Ak},1:{},2:{f:u6},3:{f:c6},4:{f:l6},5:{f:Ek},7:{f:f6},8:{},9:{f:I0},11:{},22:{f:_r},30:{f:OR},31:{},32:{},33:{f:Pk},36:{},37:{f:Tk},50:{f:d6},62:{},52:{},67:{},68:{f:_r},69:{},86:{},126:{},127:{f:o6},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:h6},223:{},234:{},354:{},421:{},518:{f:Wm},521:{f:I0},536:{f:Nk},547:{f:Ok},561:{},579:{},1030:{f:Wm},1033:{f:I0},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function ka(e,t,r,n){var a=t;if(!isNaN(a)){var i=(r||[]).length||0,s=e.next(4);s.write_shift(2,a),s.write_shift(2,i),i>0&&CP(r)&&e.push(r)}}function zk(e,t){var r=t||{},n=r.dense?[]:{};e=e.replace(//g,"");var a=e.match(/");var i=e.match(/<\/table/i),s=a.index,l=i&&i.index||e.length,u=I8(e.slice(s,l),/(:?]*>)/i,""),f=-1,d=0,p=0,x=0,v={s:{r:1e7,c:1e7},e:{r:0,c:0}},w=[];for(s=0;s/i);for(l=0;l"))>-1;)S=S.slice(N+1);for(var T=0;T")));x=j.colspan?+j.colspan:1,((p=+j.rowspan)>1||x>1)&&w.push({s:{r:f,c:d},e:{r:f+(p||1)-1,c:d+x-1}});var D=j.t||j["data-t"]||"";if(!S.length){d+=x;continue}if(S=yP(S),v.s.r>f&&(v.s.r=f),v.e.rd&&(v.s.c=d),v.e.cr||a[f].s.c>s)&&!(a[f].e.r1&&(v.rowspan=l),u>1&&(v.colspan=u),n.editable?x=''+x+"":p&&(v["data-t"]=p&&p.t||"z",p.v!=null&&(v["data-v"]=p.v),p.z!=null&&(v["data-z"]=p.z),p.l&&(p.l.Target||"#").charAt(0)!="#"&&(x=''+x+"")),v.id=(n.id||"sjs")+"-"+d,i.push(J8("td",x,v))}}var w="";return w+i.join("")+""}var h9='SheetJS Table Export',p9="";function m9(e,t){var r=e.match(/[\s\S]*?<\/table>/gi);if(!r||r.length==0)throw new Error("Invalid HTML: could not find
");if(r.length==1)return bs(zk(r[0],t),t);var n=fw();return r.forEach(function(a,i){dw(n,zk(a,t),"Sheet"+(i+1))}),n}function x9(e,t,r){var n=[];return n.join("")+""}function v9(e,t){var r=t||{},n=r.header!=null?r.header:h9,a=r.footer!=null?r.footer:p9,i=[n],s=zl(e["!ref"]);r.dense=Array.isArray(e),i.push(x9(e,s,r));for(var l=s.s.r;l<=s.e.r;++l)i.push(d9(e,s,l,r));return i.push("
"+a),i.join("")}function k3(e,t,r){var n=r||{},a=0,i=0;if(n.origin!=null)if(typeof n.origin=="number")a=n.origin;else{var s=typeof n.origin=="string"?Sn(n.origin):n.origin;a=s.r,i=s.c}var l=t.getElementsByTagName("tr"),u=Math.min(n.sheetRows||1e7,l.length),f={s:{r:0,c:0},e:{r:a,c:i}};if(e["!ref"]){var d=zl(e["!ref"]);f.s.r=Math.min(f.s.r,d.s.r),f.s.c=Math.min(f.s.c,d.s.c),f.e.r=Math.max(f.e.r,d.e.r),f.e.c=Math.max(f.e.c,d.e.c),a==-1&&(f.e.r=a=d.e.r+1)}var p=[],x=0,v=e["!rows"]||(e["!rows"]=[]),w=0,b=0,g=0,k=0,A=0,S=0;for(e["!cols"]||(e["!cols"]=[]);w1||S>1)&&p.push({s:{r:b+a,c:k+i},e:{r:b+a+(A||1)-1,c:k+i+(S||1)-1}});var H={t:"s",v:j},U=E.getAttribute("data-t")||E.getAttribute("t")||"";j!=null&&(j.length==0?H.t=U||"z":n.raw||j.trim().length==0||U=="s"||(j==="TRUE"?H={t:"b",v:!0}:j==="FALSE"?H={t:"b",v:!1}:isNaN(Da(j))?isNaN(dl(j).getDate())||(H={t:"d",v:qr(j)},n.cellDates||(H={t:"n",v:An(H.v)}),H.z=n.dateNF||kt[14]):H={t:"n",v:Da(j)})),H.z===void 0&&D!=null&&(H.z=D);var B="",V=E.getElementsByTagName("A");if(V&&V.length)for(var W=0;W=u&&(e["!fullref"]=Dt((f.e.r=l.length-w+b-1+a,f))),e}function T3(e,t){var r=t||{},n=r.dense?[]:{};return k3(n,e,t)}function g9(e,t){return bs(T3(e,t),t)}function Wk(e){var t="",r=y9(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function y9(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function b9(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(//g," ").replace(//g,function(n,a){return Array(parseInt(a,10)+1).join(" ")}).replace(/]*\/>/g," ").replace(//g,` +`),r=Mt(t.replace(/<[^>]*>/g,""));return[r]}var Hk={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function A3(e,t){var r=t||{},n=Gb(e),a=[],i,s,l={name:""},u="",f=0,d,p,x={},v=[],w=r.dense?[]:{},b,g,k={value:""},A="",S=0,N=[],T=-1,E=-1,j={s:{r:1e6,c:1e7},e:{r:0,c:0}},D=0,P={},H=[],U={},B=0,V=0,W=[],G=1,ne=1,te=[],oe={Names:[]},z={},ie=["",""],K=[],C={},re="",F=0,R=!1,Y=!1,fe=0;for(ku.lastIndex=0,n=n.replace(//mg,"").replace(//gm,"");b=ku.exec(n);)switch(b[3]=b[3].replace(/_.*$/,"")){case"table":case"工作表":b[1]==="/"?(j.e.c>=j.s.c&&j.e.r>=j.s.r?w["!ref"]=Dt(j):w["!ref"]="A1:A1",r.sheetRows>0&&r.sheetRows<=j.e.r&&(w["!fullref"]=w["!ref"],j.e.r=r.sheetRows-1,w["!ref"]=Dt(j)),H.length&&(w["!merges"]=H),W.length&&(w["!rows"]=W),d.name=d.名称||d.name,typeof JSON<"u"&&JSON.stringify(d),v.push(d.name),x[d.name]=w,Y=!1):b[0].charAt(b[0].length-2)!=="/"&&(d=mt(b[0],!1),T=E=-1,j.s.r=j.s.c=1e7,j.e.r=j.e.c=0,w=r.dense?[]:{},H=[],W=[],Y=!0);break;case"table-row-group":b[1]==="/"?--D:++D;break;case"table-row":case"行":if(b[1]==="/"){T+=G,G=1;break}if(p=mt(b[0],!1),p.行号?T=p.行号-1:T==-1&&(T=0),G=+p["number-rows-repeated"]||1,G<10)for(fe=0;fe0&&(W[T+fe]={level:D});E=-1;break;case"covered-table-cell":b[1]!=="/"&&++E,r.sheetStubs&&(r.dense?(w[T]||(w[T]=[]),w[T][E]={t:"z"}):w[bt({r:T,c:E})]={t:"z"}),A="",N=[];break;case"table-cell":case"数据":if(b[0].charAt(b[0].length-2)==="/")++E,k=mt(b[0],!1),ne=parseInt(k["number-columns-repeated"]||"1",10),g={t:"z",v:null},k.formula&&r.cellFormula!=!1&&(g.f=Lk(Mt(k.formula))),(k.数据类型||k["value-type"])=="string"&&(g.t="s",g.v=Mt(k["string-value"]||""),r.dense?(w[T]||(w[T]=[]),w[T][E]=g):w[bt({r:T,c:E})]=g),E+=ne-1;else if(b[1]!=="/"){++E,A="",S=0,N=[],ne=1;var ce=G?T+G-1:T;if(E>j.e.c&&(j.e.c=E),Ej.e.r&&(j.e.r=ce),k=mt(b[0],!1),K=[],C={},g={t:k.数据类型||k["value-type"],v:null},r.cellFormula)if(k.formula&&(k.formula=Mt(k.formula)),k["number-matrix-columns-spanned"]&&k["number-matrix-rows-spanned"]&&(B=parseInt(k["number-matrix-rows-spanned"],10)||0,V=parseInt(k["number-matrix-columns-spanned"],10)||0,U={s:{r:T,c:E},e:{r:T+B-1,c:E+V-1}},g.F=Dt(U),te.push([U,g.F])),k.formula)g.f=Lk(k.formula);else for(fe=0;fe=te[fe][0].s.r&&T<=te[fe][0].e.r&&E>=te[fe][0].s.c&&E<=te[fe][0].e.c&&(g.F=te[fe][1]);switch((k["number-columns-spanned"]||k["number-rows-spanned"])&&(B=parseInt(k["number-rows-spanned"],10)||0,V=parseInt(k["number-columns-spanned"],10)||0,U={s:{r:T,c:E},e:{r:T+B-1,c:E+V-1}},H.push(U)),k["number-columns-repeated"]&&(ne=parseInt(k["number-columns-repeated"],10)),g.t){case"boolean":g.t="b",g.v=ir(k["boolean-value"]);break;case"float":g.t="n",g.v=parseFloat(k.value);break;case"percentage":g.t="n",g.v=parseFloat(k.value);break;case"currency":g.t="n",g.v=parseFloat(k.value);break;case"date":g.t="d",g.v=qr(k["date-value"]),r.cellDates||(g.t="n",g.v=An(g.v)),g.z="m/d/yy";break;case"time":g.t="n",g.v=D8(k["time-value"])/86400,r.cellDates&&(g.t="d",g.v=bh(g.v)),g.z="HH:MM:SS";break;case"number":g.t="n",g.v=parseFloat(k.数据数值);break;default:if(g.t==="string"||g.t==="text"||!g.t)g.t="s",k["string-value"]!=null&&(A=Mt(k["string-value"]),N=[]);else throw new Error("Unsupported value type "+g.t)}}else{if(R=!1,g.t==="s"&&(g.v=A||"",N.length&&(g.R=N),R=S==0),z.Target&&(g.l=z),K.length>0&&(g.c=K,K=[]),A&&r.cellText!==!1&&(g.w=A),R&&(g.t="z",delete g.v),(!R||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=T))for(var se=0;se0;)w[T+se][E+ne]=en(g);else for(w[bt({r:T+se,c:E})]=g;--ne>0;)w[bt({r:T+se,c:E+ne})]=en(g);j.e.c<=E&&(j.e.c=E)}ne=parseInt(k["number-columns-repeated"]||"1",10),E+=ne-1,ne=0,g={},A="",N=[]}z={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(b[1]==="/"){if((i=a.pop())[0]!==b[3])throw"Bad state: "+i}else b[0].charAt(b[0].length-2)!=="/"&&a.push([b[3],!0]);break;case"annotation":if(b[1]==="/"){if((i=a.pop())[0]!==b[3])throw"Bad state: "+i;C.t=A,N.length&&(C.R=N),C.a=re,K.push(C)}else b[0].charAt(b[0].length-2)!=="/"&&a.push([b[3],!1]);re="",F=0,A="",S=0,N=[];break;case"creator":b[1]==="/"?re=n.slice(F,b.index):F=b.index+b[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(b[1]==="/"){if((i=a.pop())[0]!==b[3])throw"Bad state: "+i}else b[0].charAt(b[0].length-2)!=="/"&&a.push([b[3],!1]);A="",S=0,N=[];break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(b[1]==="/"){if(P[l.name]=u,(i=a.pop())[0]!==b[3])throw"Bad state: "+i}else b[0].charAt(b[0].length-2)!=="/"&&(u="",l=mt(b[0],!1),a.push([b[3],!0]));break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":switch(a[a.length-1][0]){case"time-style":case"date-style":s=mt(b[0],!1),u+=Hk[b[3]][s.style==="long"?1:0];break}break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(a[a.length-1][0]){case"time-style":case"date-style":s=mt(b[0],!1),u+=Hk[b[3]][s.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(b[0].slice(-2)==="/>")break;if(b[1]==="/")switch(a[a.length-1][0]){case"number-style":case"date-style":case"time-style":u+=n.slice(f,b.index);break}else f=b.index+b[0].length;break;case"named-range":s=mt(b[0],!1),ie=Hm(s["cell-range-address"]);var he={Name:s.name,Ref:ie[0]+"!"+ie[1]};Y&&(he.Sheet=v.length),oe.Names.push(he);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(a[a.length-1][0])>-1)break;if(b[1]==="/"&&(!k||!k["string-value"])){var Ce=b9(n.slice(S,b.index));A=(A.length>0?A+` +`:"")+Ce[0]}else mt(b[0],!1),S=b.index+b[0].length;break;case"s":break;case"database-range":if(b[1]==="/")break;try{ie=Hm(mt(b[0])["target-range-address"]),x[ie[0]]["!autofilter"]={ref:ie[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(b[1]!=="/"){if(z=mt(b[0],!1),!z.href)break;z.Target=Mt(z.href),delete z.href,z.Target.charAt(0)=="#"&&z.Target.indexOf(".")>-1?(ie=Hm(z.Target.slice(1)),z.Target="#"+ie[0]+"!"+ie[1]):z.Target.match(/^\.\.[\\\/]/)&&(z.Target=z.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(b[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(r.WTF)throw new Error(b)}}var I={Sheets:x,SheetNames:v,Workbook:oe};return r.bookSheets&&delete I.Sheets,I}function qk(e,t){t=t||{},ca(e,"META-INF/manifest.xml")&&II(wr(e,"META-INF/manifest.xml"),t);var r=Vn(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var n=A3(Qt(r),t);return ca(e,"meta.xml")&&(n.Props=BP(wr(e,"meta.xml"))),n}function Vk(e,t){return A3(e,t)}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function ow(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function h1(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):Qt(xo(e))}function p1(e){var t=e.reduce(function(a,i){return a+i.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(a){r.set(a,n),n+=a.length}),r}function Kk(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function w9(e,t){for(var r=(e[t+15]&127)<<7|e[t+14]>>1,n=e[t+14]&1,a=t+13;a>=t;--a)n=n*256+e[a];return(e[t+15]&128?-n:n)*Math.pow(10,r-6176)}function ju(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function Fr(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function hn(e){for(var t=[],r=[0];r[0]=128;);l=e.slice(u,r[0])}break;case 5:s=4,l=e.slice(r[0],r[0]+s),r[0]+=s;break;case 1:s=8,l=e.slice(r[0],r[0]+s),r[0]+=s;break;case 2:s=ju(e,r),l=e.slice(r[0],r[0]+s),r[0]+=s;break;case 3:case 4:default:throw new Error("PB Type ".concat(i," for Field ").concat(a," at offset ").concat(n))}var f={data:l,type:i};t[a]==null?t[a]=[f]:t[a].push(f)}return t}function lw(e,t){return(e==null?void 0:e.map(function(r){return t(r.data)}))||[]}function _9(e){for(var t,r=[],n=[0];n[0]>>0>0),r.push(s)}return r}function S9(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=ju(t,r),a=[];r[0]>2;if(s<60)++s;else{var l=s-59;s=t[r[0]],l>1&&(s|=t[r[0]+1]<<8),l>2&&(s|=t[r[0]+2]<<16),l>3&&(s|=t[r[0]+3]<<24),s>>>=0,s++,r[0]+=l}a.push(t.slice(r[0],r[0]+s)),r[0]+=s;continue}else{var u=0,f=0;if(i==1?(f=(t[r[0]]>>2&7)+4,u=(t[r[0]++]&224)<<3,u|=t[r[0]++]):(f=(t[r[0]++]>>2)+1,i==2?(u=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(u=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),a=[p1(a)],u==0)throw new Error("Invalid offset 0");if(u>a[0].length)throw new Error("Invalid offset beyond length");if(f>=u)for(a.push(a[0].slice(-u)),f-=u;f>=a[a.length-1].length;)a.push(a[a.length-1]),f-=a[a.length-1].length;a.push(a[0].slice(-u,-u+f))}}var d=p1(a);if(d.length!=n)throw new Error("Unexpected length: ".concat(d.length," != ").concat(n));return d}function k9(e){for(var t=[],r=0;r1?12:8)+Kk(i&(n>1?3470:398))*4,l=-1,u=-1,f=NaN,d=new Date(2001,0,1);i&512&&(l=a.getUint32(s,!0),s+=4),s+=Kk(i&(n>1?12288:4096))*4,i&16&&(u=a.getUint32(s,!0),s+=4),i&32&&(f=a.getFloat64(s,!0),s+=8),i&64&&(d.setTime(d.getTime()+a.getFloat64(s,!0)*1e3),s+=8);var p;switch(e[2]){case 0:break;case 2:p={t:"n",v:f};break;case 3:p={t:"s",v:t[u]};break;case 5:p={t:"d",v:d};break;case 6:p={t:"b",v:f>0};break;case 7:p={t:"n",v:f/86400};break;case 8:p={t:"e",v:0};break;case 9:if(l>-1)p={t:"s",v:r[l]};else if(u>-1)p={t:"s",v:t[u]};else if(!isNaN(f))p={t:"n",v:f};else throw new Error("Unsupported cell type ".concat(e.slice(0,4)));break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return p}function A9(e,t,r){var n=ow(e),a=n.getUint32(8,!0),i=12,s=-1,l=-1,u=NaN,f=NaN,d=new Date(2001,0,1);a&1&&(u=w9(e,i),i+=16),a&2&&(f=n.getFloat64(i,!0),i+=8),a&4&&(d.setTime(d.getTime()+n.getFloat64(i,!0)*1e3),i+=8),a&8&&(l=n.getUint32(i,!0),i+=4),a&16&&(s=n.getUint32(i,!0),i+=4);var p;switch(e[1]){case 0:break;case 2:p={t:"n",v:u};break;case 3:p={t:"s",v:t[l]};break;case 5:p={t:"d",v:d};break;case 6:p={t:"b",v:f>0};break;case 7:p={t:"n",v:f/86400};break;case 8:p={t:"e",v:0};break;case 9:if(s>-1)p={t:"s",v:r[s]};else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(a&31," : ").concat(e.slice(0,4)));break;case 10:p={t:"n",v:u};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(a&31," : ").concat(e.slice(0,4)))}return p}function E9(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return T9(e,t,r,e[0]);case 5:return A9(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function hs(e){var t=hn(e);return ju(t[1][0].data)}function Gk(e,t){var r=hn(t.data),n=Fr(r[1][0].data),a=r[3],i=[];return(a||[]).forEach(function(s){var l=hn(s.data),u=Fr(l[1][0].data)>>>0;switch(n){case 1:i[u]=h1(l[3][0].data);break;case 8:{var f=e[hs(l[9][0].data)][0],d=hn(f.data),p=e[hs(d[1][0].data)][0],x=Fr(p.meta[1][0].data);if(x!=2001)throw new Error("2000 unexpected reference to ".concat(x));var v=hn(p.data);i[u]=v[3].map(function(w){return h1(w.data)}).join("")}break}}),i}function j9(e,t){var r,n,a,i,s,l,u,f,d,p,x,v,w,b,g=hn(e),k=Fr(g[1][0].data)>>>0,A=Fr(g[2][0].data)>>>0,S=((n=(r=g[8])==null?void 0:r[0])==null?void 0:n.data)&&Fr(g[8][0].data)>0||!1,N,T;if((i=(a=g[7])==null?void 0:a[0])!=null&&i.data&&t!=0)N=(l=(s=g[7])==null?void 0:s[0])==null?void 0:l.data,T=(f=(u=g[6])==null?void 0:u[0])==null?void 0:f.data;else if((p=(d=g[4])==null?void 0:d[0])!=null&&p.data&&t!=1)N=(v=(x=g[4])==null?void 0:x[0])==null?void 0:v.data,T=(b=(w=g[3])==null?void 0:w[0])==null?void 0:b.data;else throw"NUMBERS Tile missing ".concat(t," cell storage");for(var E=S?4:1,j=ow(N),D=[],P=0;P=1&&(U[D[D.length-1][0]]=T.subarray(D[D.length-1][1]*E)),{R:k,cells:U}}function O9(e,t){var r,n=hn(t.data),a=(r=n==null?void 0:n[7])!=null&&r[0]?Fr(n[7][0].data)>>>0>0?1:0:-1,i=lw(n[5],function(s){return j9(s,a)});return{nrows:Fr(n[4][0].data)>>>0,data:i.reduce(function(s,l){return s[l.R]||(s[l.R]=[]),l.cells.forEach(function(u,f){if(s[l.R][f])throw new Error("Duplicate cell r=".concat(l.R," c=").concat(f));s[l.R][f]=u}),s},[])}}function N9(e,t,r){var n,a=hn(t.data),i={s:{r:0,c:0},e:{r:0,c:0}};if(i.e.r=(Fr(a[6][0].data)>>>0)-1,i.e.r<0)throw new Error("Invalid row varint ".concat(a[6][0].data));if(i.e.c=(Fr(a[7][0].data)>>>0)-1,i.e.c<0)throw new Error("Invalid col varint ".concat(a[7][0].data));r["!ref"]=Dt(i);var s=hn(a[4][0].data),l=Gk(e,e[hs(s[4][0].data)][0]),u=(n=s[17])!=null&&n[0]?Gk(e,e[hs(s[17][0].data)][0]):[],f=hn(s[3][0].data),d=0;f[1].forEach(function(p){var x=hn(p.data),v=e[hs(x[2][0].data)][0],w=Fr(v.meta[1][0].data);if(w!=6002)throw new Error("6001 unexpected reference to ".concat(w));var b=O9(e,v);b.data.forEach(function(g,k){g.forEach(function(A,S){var N=bt({r:d+k,c:S}),T=E9(A,l,u);T&&(r[N]=T)})}),d+=b.nrows})}function P9(e,t){var r=hn(t.data),n={"!ref":"A1"},a=e[hs(r[2][0].data)],i=Fr(a[0].meta[1][0].data);if(i!=6001)throw new Error("6000 unexpected reference to ".concat(i));return N9(e,a[0],n),n}function C9(e,t){var r,n=hn(t.data),a={name:(r=n[1])!=null&&r[0]?h1(n[1][0].data):"",sheets:[]},i=lw(n[2],hs);return i.forEach(function(s){e[s].forEach(function(l){var u=Fr(l.meta[1][0].data);u==6e3&&a.sheets.push(P9(e,l))})}),a}function D9(e,t){var r=fw(),n=hn(t.data),a=lw(n[1],hs);if(a.forEach(function(i){e[i].forEach(function(s){var l=Fr(s.meta[1][0].data);if(l==2){var u=C9(e,s);u.sheets.forEach(function(f,d){dw(r,f,d==0?u.name:u.name+"_"+d,!0)})}})}),r.SheetNames.length==0)throw new Error("Empty NUMBERS file");return r}function Vm(e){var t,r,n,a,i={},s=[];if(e.FullPaths.forEach(function(u){if(u.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(u){if(u.name.match(/\.iwa$/)){var f;try{f=k9(u.content)}catch(p){return console.log("?? "+u.content.length+" "+(p.message||p))}var d;try{d=_9(f)}catch(p){return console.log("## "+(p.message||p))}d.forEach(function(p){i[p.id]=p.messages,s.push(p.id)})}}),!s.length)throw new Error("File has no messages");var l=((a=(n=(r=(t=i==null?void 0:i[1])==null?void 0:t[0])==null?void 0:r.meta)==null?void 0:n[1])==null?void 0:a[0].data)&&Fr(i[1][0].meta[1][0].data)==1&&i[1][0];if(l||s.forEach(function(u){i[u].forEach(function(f){var d=Fr(f.meta[1][0].data)>>>0;if(d==1)if(!l)l=f;else throw new Error("Document has multiple roots")})}),!l)throw new Error("Cannot find Document root");return D9(i,l)}function F9(e){return function(r){for(var n=0;n!=e.length;++n){var a=e[n];r[a[0]]===void 0&&(r[a[0]]=a[1]),a[2]==="n"&&(r[a[0]]=Number(r[a[0]]))}}}function cw(e){F9([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function M9(e){return tl.WS.indexOf(e)>-1?"sheet":e==tl.CS?"chart":e==tl.DS?"dialog":e==tl.MS?"macro":e&&e.length?e:"sheet"}function I9(e,t){if(!e)return 0;try{e=t.map(function(n){return n.id||(n.id=n.strRelID),[n.name,e["!id"][n.id].Target,M9(e["!id"][n.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function R9(e,t,r,n,a,i,s,l,u,f,d,p){try{i[n]=su(Vn(e,r,!0),t);var x=wr(e,t),v;switch(l){case"sheet":v=W7(x,t,a,u,i[n],f,d,p);break;case"chart":if(v=H7(x,t,a,u,i[n],f,d,p),!v||!v["!drawel"])break;var w=Zc(v["!drawel"].Target,t),b=l1(w),g=zL(Vn(e,w,!0),su(Vn(e,b,!0),w)),k=Zc(g,w),A=l1(k);v=A7(Vn(e,k,!0),k,u,su(Vn(e,A,!0),k),f,v);break;case"macro":v=q7(x,t,a,u,i[n],f,d,p);break;case"dialog":v=V7(x,t,a,u,i[n],f,d,p);break;default:throw new Error("Unrecognized sheet type "+l)}s[n]=v;var S=[];i&&i[n]&&Za(i[n]).forEach(function(N){var T="";if(i[n][N].Type==tl.CMNT){T=Zc(i[n][N].Target,t);var E=Y7(wr(e,T,!0),T,u);if(!E||!E.length)return;Dk(v,E,!1)}i[n][N].Type==tl.TCMNT&&(T=Zc(i[n][N].Target,t),S=S.concat(HL(wr(e,T,!0),u)))}),S&&S.length&&Dk(v,S,!0,u.people||[])}catch(N){if(u.WTF)throw N}}function aa(e){return e.charAt(0)=="/"?e.slice(1):e}function L9(e,t){if(uP(),t=t||{},cw(t),ca(e,"META-INF/manifest.xml")||ca(e,"objectdata.xml"))return qk(e,t);if(ca(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof Vm<"u"){if(e.FileIndex)return Vm(e);var r=Ct.utils.cfb_new();return sk(e).forEach(function(W){B8(r,W,L8(e,W))}),Vm(r)}throw new Error("Unsupported NUMBERS file")}if(!ca(e,"[Content_Types].xml"))throw ca(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):ca(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var n=sk(e),a=FI(Vn(e,"[Content_Types].xml")),i=!1,s,l;if(a.workbooks.length===0&&(l="xl/workbook.xml",wr(e,l,!0)&&a.workbooks.push(l)),a.workbooks.length===0){if(l="xl/workbook.bin",!wr(e,l,!0))throw new Error("Could not find workbook");a.workbooks.push(l),i=!0}a.workbooks[0].slice(-3)=="bin"&&(i=!0);var u={},f={};if(!t.bookSheets&&!t.bookProps){if(cu=[],a.sst)try{cu=X7(wr(e,aa(a.sst)),a.sst,t)}catch(W){if(t.WTF)throw W}t.cellStyles&&a.themes.length&&(u=G7(Vn(e,a.themes[0].replace(/^\//,""),!0)||"",a.themes[0],t)),a.style&&(f=K7(wr(e,aa(a.style)),a.style,u,t))}a.links.map(function(W){try{var G=su(Vn(e,l1(aa(W))),W);return J7(wr(e,aa(W)),G,W,t)}catch{}});var d=z7(wr(e,aa(a.workbooks[0])),a.workbooks[0],t),p={},x="";a.coreprops.length&&(x=wr(e,aa(a.coreprops[0]),!0),x&&(p=BP(x)),a.extprops.length!==0&&(x=wr(e,aa(a.extprops[0]),!0),x&&BI(x,p,t)));var v={};(!t.bookSheets||t.bookProps)&&a.custprops.length!==0&&(x=Vn(e,aa(a.custprops[0]),!0),x&&(v=UI(x,t)));var w={};if((t.bookSheets||t.bookProps)&&(d.Sheets?s=d.Sheets.map(function(G){return G.name}):p.Worksheets&&p.SheetNames.length>0&&(s=p.SheetNames),t.bookProps&&(w.Props=p,w.Custprops=v),t.bookSheets&&typeof s<"u"&&(w.SheetNames=s),t.bookSheets?w.SheetNames:t.bookProps))return w;s={};var b={};t.bookDeps&&a.calcchain&&(b=Z7(wr(e,aa(a.calcchain)),a.calcchain));var g=0,k={},A,S;{var N=d.Sheets;p.Worksheets=N.length,p.SheetNames=[];for(var T=0;T!=N.length;++T)p.SheetNames[T]=N[T].name}var E=i?"bin":"xml",j=a.workbooks[0].lastIndexOf("/"),D=(a.workbooks[0].slice(0,j+1)+"_rels/"+a.workbooks[0].slice(j+1)+".rels").replace(/^\//,"");ca(e,D)||(D="xl/_rels/workbook."+E+".rels");var P=su(Vn(e,D,!0),D.replace(/_rels.*/,"s5s"));(a.metadata||[]).length>=1&&(t.xlmeta=Q7(wr(e,aa(a.metadata[0])),a.metadata[0],t)),(a.people||[]).length>=1&&(t.people=qL(wr(e,aa(a.people[0])),t)),P&&(P=I9(P,d.Sheets));var H=wr(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(g=0;g!=p.Worksheets;++g){var U="sheet";if(P&&P[g]?(A="xl/"+P[g][1].replace(/[\/]?xl\//,""),ca(e,A)||(A=P[g][1]),ca(e,A)||(A=D.replace(/_rels\/.*$/,"")+P[g][1]),U=P[g][2]):(A="xl/worksheets/sheet"+(g+1-H)+"."+E,A=A.replace(/sheet0\./,"sheet.")),S=A.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&t.sheets!=null)switch(typeof t.sheets){case"number":if(g!=t.sheets)continue e;break;case"string":if(p.SheetNames[g].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var B=!1,V=0;V!=t.sheets.length;++V)typeof t.sheets[V]=="number"&&t.sheets[V]==g&&(B=1),typeof t.sheets[V]=="string"&&t.sheets[V].toLowerCase()==p.SheetNames[g].toLowerCase()&&(B=1);if(!B)continue e}}R9(e,A,S,p.SheetNames[g],g,k,s,U,t,d,u,f)}return w={Directory:a,Workbook:d,Props:p,Custprops:v,Deps:b,Sheets:s,SheetNames:p.SheetNames,Strings:cu,Styles:f,Themes:u,SSF:en(kt)},t&&t.bookFiles&&(e.files?(w.keys=n,w.files=e.files):(w.keys=[],w.files={},e.FullPaths.forEach(function(W,G){W=W.replace(/^Root Entry[\/]/,""),w.keys.push(W),w.files[W]=e.FileIndex[G]}))),t&&t.bookVBA&&(a.vba.length>0?w.vbaraw=wr(e,aa(a.vba[0]),!0):a.defaults&&a.defaults.bin===XL&&(w.vbaraw=wr(e,"xl/vbaProject.bin",!0))),w}function B9(e,t){var r=t||{},n="Workbook",a=Ct.find(e,n);try{if(n="/!DataSpaces/Version",a=Ct.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(P6(a.content),n="/!DataSpaces/DataSpaceMap",a=Ct.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var i=D6(a.content);if(i.length!==1||i[0].comps.length!==1||i[0].comps[0].t!==0||i[0].name!=="StrongEncryptionDataSpace"||i[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",a=Ct.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var s=F6(a.content);if(s.length!=1||s[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",a=Ct.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);I6(a.content)}catch{}if(n="/EncryptionInfo",a=Ct.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var l=R6(a.content);if(n="/EncryptedPackage",a=Ct.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(l[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(l[1],a.content,r.password||"",r);if(l[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(l[1],a.content,r.password||"",r);throw new Error("File is password-protected")}function uw(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=Yn(e.slice(0,12));break;case"binary":r=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function $9(e,t){return Ct.find(e,"EncryptedPackage")?B9(e,t):S3(e,t)}function U9(e,t){var r,n=e,a=t||{};return a.type||(a.type=Pt&&Buffer.isBuffer(e)?"buffer":"base64"),r=xP(n,a),L9(r,a)}function E3(e,t){var r=0;e:for(;r=2&&a[3]===0||a[2]===0&&(a[3]===8||a[3]===9)))return lu.to_workbook(n,r);break;case 3:case 131:case 139:case 140:return Ck.to_workbook(n,r);case 123:if(a[1]===92&&a[2]===114&&a[3]===116)return X6.to_workbook(n,r);break;case 10:case 13:case 32:return z9(n,r);case 137:if(a[1]===80&&a[2]===78&&a[3]===71)throw new Error("PNG Image File is not a spreadsheet");break}return p6.indexOf(a[0])>-1&&a[2]<=12&&a[3]<=31?Ck.to_workbook(n,r):Km(e,n,r,i)}function q9(e,t,r,n,a,i,s,l){var u=tn(r),f=l.defval,d=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw"),p=!0,x=a===1?[]:{};if(a!==1)if(Object.defineProperty)try{Object.defineProperty(x,"__rowNum__",{value:r,enumerable:!1})}catch{x.__rowNum__=r}else x.__rowNum__=r;if(!s||e[r])for(var v=t.s.c;v<=t.e.c;++v){var w=s?e[r][v]:e[n[v]+u];if(w===void 0||w.t===void 0){if(f===void 0)continue;i[v]!=null&&(x[i[v]]=f);continue}var b=w.v;switch(w.t){case"z":if(b==null)break;continue;case"e":b=b==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+w.t)}if(i[v]!=null){if(b==null)if(w.t=="e"&&b===null)x[i[v]]=null;else if(f!==void 0)x[i[v]]=f;else if(d&&b===null)x[i[v]]=null;else continue;else x[i[v]]=d&&(w.t!=="n"||w.t==="n"&&l.rawNumbers!==!1)?b:ki(w,b,l);b!=null&&(p=!1)}}return{row:x,isempty:p}}function m1(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,a=1,i=[],s=0,l="",u={s:{r:0,c:0},e:{r:0,c:0}},f=t||{},d=f.range!=null?f.range:e["!ref"];switch(f.header===1?n=1:f.header==="A"?n=2:Array.isArray(f.header)?n=3:f.header==null&&(n=0),typeof d){case"string":u=hr(d);break;case"number":u=hr(e["!ref"]),u.s.r=d;break;default:u=d}n>0&&(a=0);var p=tn(u.s.r),x=[],v=[],w=0,b=0,g=Array.isArray(e),k=u.s.r,A=0,S={};g&&!e[k]&&(e[k]=[]);var N=f.skipHidden&&e["!cols"]||[],T=f.skipHidden&&e["!rows"]||[];for(A=u.s.c;A<=u.e.c;++A)if(!(N[A]||{}).hidden)switch(x[A]=Cr(A),r=g?e[k][A]:e[x[A]+p],n){case 1:i[A]=A-u.s.c;break;case 2:i[A]=x[A];break;case 3:i[A]=f.header[A-u.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),l=s=ki(r,null,f),b=S[s]||0,!b)S[s]=1;else{do l=s+"_"+b++;while(S[l]);S[s]=b,S[l]=1}i[A]=l}for(k=u.s.r+a;k<=u.e.r;++k)if(!(T[k]||{}).hidden){var E=q9(e,u,k,x,n,i,g,f);(E.isempty===!1||(n===1?f.blankrows!==!1:f.blankrows))&&(v[w++]=E.row)}return v.length=w,v}var Xk=/"/g;function V9(e,t,r,n,a,i,s,l){for(var u=!0,f=[],d="",p=tn(r),x=t.s.c;x<=t.e.c;++x)if(n[x]){var v=l.dense?(e[r]||[])[x]:e[n[x]+p];if(v==null)d="";else if(v.v!=null){u=!1,d=""+(l.rawNumbers&&v.t=="n"?v.v:ki(v,null,l));for(var w=0,b=0;w!==d.length;++w)if((b=d.charCodeAt(w))===a||b===i||b===34||l.forceQuotes){d='"'+d.replace(Xk,'""')+'"';break}d=="ID"&&(d='"ID"')}else v.f!=null&&!v.F?(u=!1,d="="+v.f,d.indexOf(",")>=0&&(d='"'+d.replace(Xk,'""')+'"')):d="";f.push(d)}return l.blankrows===!1&&u?null:f.join(s)}function j3(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var a=hr(e["!ref"]),i=n.FS!==void 0?n.FS:",",s=i.charCodeAt(0),l=n.RS!==void 0?n.RS:` +`,u=l.charCodeAt(0),f=new RegExp((i=="|"?"\\|":i)+"+$"),d="",p=[];n.dense=Array.isArray(e);for(var x=n.skipHidden&&e["!cols"]||[],v=n.skipHidden&&e["!rows"]||[],w=a.s.c;w<=a.e.c;++w)(x[w]||{}).hidden||(p[w]=Cr(w));for(var b=0,g=a.s.r;g<=a.e.r;++g)(v[g]||{}).hidden||(d=V9(e,a,g,p,s,u,i,n),d!=null&&(n.strip&&(d=d.replace(f,"")),(d||n.blankrows!==!1)&&r.push((b++?l:"")+d)));return delete n.dense,r.join("")}function K9(e,t){t||(t={}),t.FS=" ",t.RS=` +`;var r=j3(e,t);return r}function G9(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var a=hr(e["!ref"]),i="",s=[],l,u=[],f=Array.isArray(e);for(l=a.s.c;l<=a.e.c;++l)s[l]=Cr(l);for(var d=a.s.r;d<=a.e.r;++d)for(i=tn(d),l=a.s.c;l<=a.e.c;++l)if(t=s[l]+i,r=f?(e[d]||[])[l]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}u[u.length]=t+"="+n}return u}function O3(e,t,r){var n=r||{},a=+!n.skipHeader,i=e||{},s=0,l=0;if(i&&n.origin!=null)if(typeof n.origin=="number")s=n.origin;else{var u=typeof n.origin=="string"?Sn(n.origin):n.origin;s=u.r,l=u.c}var f,d={s:{c:0,r:0},e:{c:l,r:s+t.length-1+a}};if(i["!ref"]){var p=hr(i["!ref"]);d.e.c=Math.max(d.e.c,p.e.c),d.e.r=Math.max(d.e.r,p.e.r),s==-1&&(s=p.e.r+1,d.e.r=s+t.length-1+a)}else s==-1&&(s=0,d.e.r=t.length-1+a);var x=n.header||[],v=0;t.forEach(function(b,g){Za(b).forEach(function(k){(v=x.indexOf(k))==-1&&(x[v=x.length]=k);var A=b[k],S="z",N="",T=bt({c:l+v,r:s+g+a});f=Ou(i,T),A&&typeof A=="object"&&!(A instanceof Date)?i[T]=A:(typeof A=="number"?S="n":typeof A=="boolean"?S="b":typeof A=="string"?S="s":A instanceof Date?(S="d",n.cellDates||(S="n",A=An(A)),N=n.dateNF||kt[14]):A===null&&n.nullError&&(S="e",A=0),f?(f.t=S,f.v=A,delete f.w,delete f.R,N&&(f.z=N)):i[T]=f={t:S,v:A},N&&(f.z=N))})}),d.e.c=Math.max(d.e.c,l+x.length-1);var w=tn(s);if(a)for(v=0;v=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function fw(){return{SheetNames:[],Sheets:{}}}function dw(e,t,r,n){var a=1;if(!r)for(;a<=65535&&e.SheetNames.indexOf(r="Sheet"+a)!=-1;++a,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);a=i&&+i[2]||0;var s=i&&i[1]||r;for(++a;a<=65535&&e.SheetNames.indexOf(r=s+a)!=-1;++a);}if(F7(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function Z9(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=Y9(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function J9(e,t){return e.z=t,e}function N3(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function Q9(e,t,r){return N3(e,"#"+t,r)}function eU(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function tU(e,t,r,n){for(var a=typeof t!="string"?t:hr(t),i=typeof t=="string"?t:Dt(t),s=a.s.r;s<=a.e.r;++s)for(var l=a.s.c;l<=a.e.c;++l){var u=Ou(e,s,l);u.t="n",u.F=i,delete u.v,s==a.s.r&&l==a.s.c&&(u.f=r,n&&(u.D=!0))}return e}var P3={encode_col:Cr,encode_row:tn,encode_cell:bt,encode_range:Dt,decode_col:Zb,decode_row:Yb,split_cell:hI,decode_cell:Sn,decode_range:zl,format_cell:ki,sheet_add_aoa:FP,sheet_add_json:O3,sheet_add_dom:k3,aoa_to_sheet:Wl,json_to_sheet:X9,table_to_sheet:T3,table_to_book:g9,sheet_to_csv:j3,sheet_to_txt:K9,sheet_to_json:m1,sheet_to_html:v9,sheet_to_formulae:G9,sheet_to_row_object_array:m1,sheet_get_cell:Ou,book_new:fw,book_append_sheet:dw,book_set_sheet_visibility:Z9,cell_set_number_format:J9,cell_set_hyperlink:N3,cell_set_internal_link:Q9,cell_add_comment:eU,sheet_set_array_formula:tU,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function C3(e){const t=(e-25569)*86400*1e3;return new Date(t).toISOString().split("T")[0]}function Gm(e){if(typeof e=="number")return C3(e);if(typeof e=="string"){const t=e.trim();if(!t)return"";if(/^\d{4}-\d{2}-\d{2}/.test(t))return t.slice(0,10);const r=t.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})/);if(r){const[,n,a,i]=r;return`${i}-${a.padStart(2,"0")}-${n.padStart(2,"0")}`}}return""}function rU(e){if(!e)return{name:"Unknown",email:""};const t=e.match(/^(.+?)\s*\(([^)]+)\)\s*$/);return t?{name:t[1].trim(),email:t[2].trim()}:{name:e.trim(),email:""}}function od(e){if(typeof e=="number"){const t=new Date().toISOString().split("T")[0],r=C3(e);return r&&r<=t?r:""}if(typeof e=="string"){const t=e.trim();if(!t)return"";if(/^\d{4}-\d{2}-\d{2}/.test(t))return t.slice(0,10);const r=t.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})/);if(r){const[,s,l,u]=r;return`${u}-${l.padStart(2,"0")}-${s.padStart(2,"0")}`}const n={january:"01",february:"02",march:"03",april:"04",may:"05",june:"06",july:"07",august:"08",september:"09",october:"10",november:"11",december:"12"},a=t.match(/^([A-Za-z]+),?\s+(\d{4})$/);if(a){const s=n[a[1].toLowerCase()];if(s)return`${a[2]}-${s}-01`}const i=new Date(t);if(!isNaN(i.getTime())){const s=i.getUTCFullYear(),l=i.getUTCMonth()+1,u=i.getUTCDate();return`${s}-${String(l).padStart(2,"0")}-${String(u).padStart(2,"0")}`}}return""}function Yk(e,t){const r=new Map;e.forEach((i,s)=>{const l=String(i??"").toLowerCase().trim();l&&!r.has(l)&&r.set(l,s)});const n=(i,...s)=>{for(const l of s){const u=r.get(l.toLowerCase());if(u!==void 0&&i[u]!==void 0&&i[u]!==null&&i[u]!=="")return i[u]}return""},a=[];for(const i of t){const s=i,l=n(s,"month & year (log date)","time log start","time_log_start","date"),u=od(l);if(!u)continue;const f=n(s,"time logged","time_logged","hours logged","hours"),d=typeof f=="number"?f:parseFloat(String(f));if(!d||d<=0)continue;const p=String(n(s,"time submitter","time_submitter","submitter")??""),{name:x,email:v}=rU(p),w=String(n(s,"brand")||n(s,"project brand")||"").trim()||"Unknown",b=String(n(s,"business division","businessdivision","division")??"").trim()||"Unknown",g=String(n(s,"market","hub","business area - lv 2","businessarea-lv2","businessarea")??"").trim()||"Unknown",k=String(n(s,"user role","user_role","userrole","role")??"").trim(),A=String(n(s,"project number","project_number","projectnumber","project no")??"").trim(),N=String(n(s,"project title","project_title","projecttitle","project name")??"").trim()||A,T=String(n(s,"project type (from omg)","projecttype(fromomg)","project type","project_type","projecttype")??"").trim(),E=n(s,"no. of assets","no_of_assets","asset count","assets"),j=(()=>{if(typeof E=="number")return E;const te=parseFloat(String(E??""));return isNaN(te)?null:te})(),D=String(n(s,"user agency","user_agency","useragency")??"").trim()||"Unknown",P=String(n(s,"user employing company","employing company","employingcompany")??"").trim()||"Unknown",H=String(n(s,"sage job profile","job profile","sagejobprofile")??"").trim()||"Unknown",U=String(n(s,"project billing type","billing type","projectbillingtype")??"").trim(),B=String(n(s,"task description","time log task description","task name","task","activity","description")??"").trim(),V=Gm(n(s,"time log start","time_log_start","timelogstart")),W=String(n(s,"project status","project_status","projectstatus","status")??"").trim().toUpperCase(),G=Gm(n(s,"project start date","project_start_date","projectstartdate")),ne=Gm(n(s,"project end date","project_end_date","projectenddate"));a.push({date:u,submitter:x,submitterEmail:v,hoursLogged:d,userRole:k,brand:w,division:b,hub:g,projectTitle:N,projectType:T,projectNumber:A,assetCount:j,userAgency:D,employingCompany:P,sageJobProfile:H,projectBillingType:U,taskDescription:B,timeLogStartDisplay:V,projectStatus:W,projectStartDate:G,projectEndDate:ne})}return a}function D3(e){const t=[];let r=[],n="",a=!1;for(let i=0;ii.length>0)&&t.push(r),t.filter(i=>i.some(s=>s.trim().length>0))}function F3(e,t=""){if(t.toLowerCase().endsWith(".csv")){const l=new TextDecoder("utf-8").decode(e),u=D3(l);return u.length<2?[]:Yk(u[0],u.slice(1))}const n=yd(e,{type:"array"}),a=n.SheetNames.find(l=>l.startsWith("Loreal_-_Time_Summary"))??n.SheetNames[n.SheetNames.length-1],i=n.Sheets[a],s=P3.sheet_to_json(i,{header:1});return s.length<2?[]:Yk(s[0],s.slice(1))}async function nU(e){return F3(await e.arrayBuffer(),e.name)}function Zk(e,t=""){const r=!t||t.toLowerCase().endsWith(".csv");let n;if(r){const l=new TextDecoder("utf-8").decode(e);n=D3(l)}else{const l=yd(e,{type:"array"}),u=l.Sheets[l.SheetNames[0]];n=P3.sheet_to_json(u,{header:1}).map(d=>d.map(p=>String(p??"")))}if(n.length<2)return[];const a=new Map;n[0].forEach((l,u)=>{const f=l.toLowerCase().trim();f&&!a.has(f)&&a.set(f,u)});const i=(l,...u)=>{for(const f of u){const d=a.get(f.toLowerCase());if(d!==void 0&&l[d]!==void 0){const p=String(l[d]).trim();if(p)return p}}return""},s=[];for(const l of n.slice(1)){if(i(l,"component")!=="D")continue;const u=i(l,"project number");if(!u)continue;const f=od(i(l,"deliverable start date")),d=od(i(l,"deliverable end date"));!f||!d||s.push({projectNumber:u,projectStatus:i(l,"project status").toUpperCase(),deliverableNumber:i(l,"deliverable number"),deliverableStatus:i(l,"deliverable status").toUpperCase(),projectType:i(l,"project type (from omg)","project type"),deliverableStartDate:f,deliverableEndDate:d,projectEndDate:od(i(l,"project end date")),brand:i(l,"brand")||"Unknown",businessDivision:i(l,"business division")||"Unknown",businessArea:i(l,"business area - lv 2","business area")||"Unknown",market:i(l,"market")||"Unknown",deliverableTitle:i(l,"deliverable title")})}return s}const aU="loreal-util",Zn="files",M3="latest",I3="deliverables";function Hl(){return new Promise((e,t)=>{const r=indexedDB.open(aU,1);r.onupgradeneeded=()=>r.result.createObjectStore(Zn),r.onsuccess=()=>e(r.result),r.onerror=()=>t(r.error)})}async function iU(e){const t=await Hl(),r=await e.arrayBuffer();return new Promise((n,a)=>{const i=t.transaction(Zn,"readwrite");i.objectStore(Zn).put({buf:r,name:e.name,savedAt:Date.now()},M3),i.oncomplete=()=>n(),i.onerror=()=>a(i.error)})}async function sU(){const e=await Hl();return new Promise((t,r)=>{const a=e.transaction(Zn,"readonly").objectStore(Zn).get(M3);a.onsuccess=()=>t(a.result??null),a.onerror=()=>r(a.error)})}async function oU(e){const t=await Hl(),r=await e.arrayBuffer();return new Promise((n,a)=>{const i=t.transaction(Zn,"readwrite");i.objectStore(Zn).put({buf:r,name:e.name,savedAt:Date.now()},I3),i.oncomplete=()=>n(),i.onerror=()=>a(i.error)})}async function lU(){const e=await Hl();return new Promise((t,r)=>{const a=e.transaction(Zn,"readonly").objectStore(Zn).get(I3);a.onsuccess=()=>t(a.result??null),a.onerror=()=>r(a.error)})}async function Jk(e,t){const r=await Hl();return new Promise((n,a)=>{const i=r.transaction(Zn,"readwrite");i.objectStore(Zn).put({data:t,savedAt:Date.now()},e),i.oncomplete=()=>n(),i.onerror=()=>a(i.error)})}async function Qk(e){const t=await Hl();return new Promise((r,n)=>{const i=t.transaction(Zn,"readonly").objectStore(Zn).get(e);i.onsuccess=()=>r(i.result??null),i.onerror=()=>n(i.error)})}const Xm=100,cU=e=>e&&e.length>=10?`${e.slice(8,10)}/${e.slice(5,7)}/${e.slice(0,4)}`:e||"—";function uU({logs:e}){const[t,r]=Q.useState(""),[n,a]=Q.useState(0),[i,s]=Q.useState("date"),[l,u]=Q.useState("desc"),f=g=>{i===g?u(k=>k==="asc"?"desc":"asc"):(s(g),u("asc")),a(0)},d=Q.useMemo(()=>{const g=t.toLowerCase();return e.filter(k=>!g||k.submitter.toLowerCase().includes(g)||k.userRole.toLowerCase().includes(g)||k.projectTitle.toLowerCase().includes(g)||k.projectType.toLowerCase().includes(g)||k.projectNumber.toLowerCase().includes(g)||k.brand.toLowerCase().includes(g)||k.hub.toLowerCase().includes(g)||k.date.includes(g))},[e,t]),p=Q.useMemo(()=>[...d].sort((g,k)=>{const A=g[i],S=k[i],N=typeof A=="number"&&typeof S=="number"?A-S:String(A).localeCompare(String(S));return l==="asc"?N:-N}),[d,i,l]),x=p.slice(n*Xm,(n+1)*Xm),v=Math.ceil(p.length/Xm),w=[["date","Date"],["submitter","Time Submitter"],["userRole","Role"],["brand","Brand"],["division","Division"],["hub","Hub / Market"],["hoursLogged","Hours Logged"],["projectNumber","Project No."],["projectTitle","Project Title"],["projectType","Project Type"]],b=Q.useMemo(()=>d.reduce((g,k)=>g+k.hoursLogged,0),[d]);return h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-800",children:[h.jsxs("h3",{className:"text-sm font-semibold text-slate-200",children:["Time Log Detail —"," ",h.jsxs("span",{className:"text-indigo-300",children:[p.length.toLocaleString()," entries"]}),t&&h.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["· ",b.toFixed(1),"h total"]})]}),h.jsx("input",{value:t,onChange:g=>{r(g.target.value),a(0)},placeholder:"Search project type, name, OMG#, role…",className:"bg-slate-800 border border-slate-600 rounded px-3 py-1 text-xs text-slate-200 placeholder-slate-500 w-72"})]}),h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{children:h.jsx("tr",{className:"border-b border-slate-800 text-slate-400",children:w.map(([g,k])=>h.jsxs("th",{onClick:()=>f(g),className:"text-left px-3 py-2 cursor-pointer hover:text-slate-200 select-none whitespace-nowrap",children:[k," ",i===g?l==="asc"?"↑":"↓":""]},g))})}),h.jsx("tbody",{children:x.map((g,k)=>h.jsxs("tr",{className:"border-b border-slate-800/40 hover:bg-slate-800/30",children:[h.jsx("td",{className:"px-3 py-1.5 text-slate-400 whitespace-nowrap",children:cU(g.date)}),h.jsx("td",{className:"px-3 py-1.5 text-slate-200 whitespace-nowrap",children:g.submitter}),h.jsx("td",{className:"px-3 py-1.5 text-slate-400 whitespace-nowrap",children:g.userRole}),h.jsx("td",{className:"px-3 py-1.5 text-slate-400 whitespace-nowrap",children:g.brand}),h.jsx("td",{className:"px-3 py-1.5",children:h.jsx("span",{className:"bg-slate-700 text-slate-300 px-1.5 py-0.5 rounded",children:g.division})}),h.jsx("td",{className:"px-3 py-1.5 text-slate-400 whitespace-nowrap",children:g.hub}),h.jsxs("td",{className:"px-3 py-1.5 text-right font-medium text-indigo-300",children:[g.hoursLogged.toFixed(1),"h"]}),h.jsx("td",{className:"px-3 py-1.5 text-slate-500 whitespace-nowrap font-mono",children:g.projectNumber}),h.jsx("td",{className:"px-3 py-1.5 text-slate-300 max-w-[200px] truncate",title:g.projectTitle,children:g.projectTitle}),h.jsx("td",{className:"px-3 py-1.5 text-slate-500 whitespace-nowrap",children:g.projectType})]},k))})]})}),v>1&&h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-slate-800",children:[h.jsxs("span",{className:"text-xs text-slate-400",children:["Page ",n+1," of ",v," (",p.length.toLocaleString()," rows)"]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{onClick:()=>a(g=>Math.max(0,g-1)),disabled:n===0,className:"text-xs px-3 py-1 bg-slate-800 hover:bg-slate-700 rounded disabled:opacity-40",children:"Prev"}),h.jsx("button",{onClick:()=>a(g=>Math.min(v-1,g+1)),disabled:n>=v-1,className:"text-xs px-3 py-1 bg-slate-800 hover:bg-slate-700 rounded disabled:opacity-40",children:"Next"})]})]})]})}function R3(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}return Ax=t,Ax}var Ex,PT;function EU(){if(PT)return Ex;PT=1;var e=Th();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Ex=t,Ex}var jx,CT;function Ah(){if(CT)return jx;CT=1;var e=SU(),t=kU(),r=TU(),n=AU(),a=EU();function i(s){var l=-1,u=s==null?0:s.length;for(this.clear();++l0?1:-1},Gs=function(t){return lo(t)&&t.indexOf("%")===t.length-1},Ve=function(t){return YU(t)&&!Kl(t)},ZU=function(t){return yt(t)},Dr=function(t){return Ve(t)||lo(t)},JU=0,_o=function(t){var r=++JU;return"".concat(t||"").concat(r)},co=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ve(t)&&!lo(t))return n;var i;if(Gs(t)){var s=t.indexOf("%");i=r*parseFloat(t.slice(0,s))/100}else i=+t;return Kl(i)&&(i=n),a&&i>r&&(i=r),i},os=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},QU=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function v1(e){"@babel/helpers - typeof";return v1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v1(e)}var sA={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},wi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},oA=null,ev=null,ww=function e(t){if(t===oA&&Array.isArray(ev))return ev;var r=[];return Q.Children.forEach(t,function(n){yt(n)||(VU.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),ev=r,oA=t,r};function Mn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return wi(a)}):n=[wi(t)],ww(e).forEach(function(a){var i=da(a,"type.displayName")||da(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function Wn(e,t){var r=Mn(e,t);return r&&r[0]}var lA=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Ve(n)||n<=0||!Ve(a)||a<=0)},lz=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],cz=function(t){return t&&t.type&&lo(t.type)&&lz.indexOf(t.type)>=0},q3=function(t){return t&&v1(t)==="object"&&"clipDot"in t},uz=function(t,r,n,a){var i,s=(i=Qx==null?void 0:Qx[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!St(t)&&(a&&s.includes(r)||nz.includes(r))||n&&bw.includes(r)},wt=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(Q.isValidElement(t)&&(a=t.props),!Vl(a))return null;var i={};return Object.keys(a).forEach(function(s){var l;uz((l=a)===null||l===void 0?void 0:l[s],s,r,n)&&(i[s]=a[s])}),i},g1=function e(t,r){if(t===r)return!0;var n=Q.Children.count(t);if(n!==Q.Children.count(r))return!1;if(n===0)return!0;if(n===1)return cA(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function b1(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,s=e.style,l=e.title,u=e.desc,f=pz(e,hz),d=a||{width:r,height:n,x:0,y:0},p=Ot("recharts-surface",i);return ue.createElement("svg",y1({},wt(f,!0,"svg"),{className:p,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),ue.createElement("title",null,l),ue.createElement("desc",null,u),t)}var xz=["children","className"];function w1(){return w1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var $t=ue.forwardRef(function(e,t){var r=e.children,n=e.className,a=vz(e,xz),i=Ot("recharts-layer",n);return ue.createElement("g",w1({className:i},wt(a,!0),{ref:t}),r)}),_i=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;ii?0:i+r),n=n>i?i:n,n<0&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(i);++a=i?r:e(r,n,a)}return rv=t,rv}var nv,hA;function V3(){if(hA)return nv;hA=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="\\u200d",l=RegExp("["+s+e+a+i+"]");function u(f){return l.test(f)}return nv=u,nv}var av,pA;function wz(){if(pA)return av;pA=1;function e(t){return t.split("")}return av=e,av}var iv,mA;function _z(){if(mA)return iv;mA=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="["+e+"]",l="["+a+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",d="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",x="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",w=f+"?",b="["+i+"]?",g="(?:"+v+"(?:"+[d,p,x].join("|")+")"+b+w+")*",k=b+w+g,A="(?:"+[d+l+"?",l,p,x,s].join("|")+")",S=RegExp(u+"(?="+u+")|"+A+k,"g");function N(T){return T.match(S)||[]}return iv=N,iv}var sv,xA;function Sz(){if(xA)return sv;xA=1;var e=wz(),t=V3(),r=_z();function n(a){return t(a)?r(a):e(a)}return sv=n,sv}var ov,vA;function kz(){if(vA)return ov;vA=1;var e=bz(),t=V3(),r=Sz(),n=U3();function a(i){return function(s){s=n(s);var l=t(s)?r(s):void 0,u=l?l[0]:s.charAt(0),f=l?e(l,1).join(""):s.slice(1);return u[i]()+f}}return ov=a,ov}var lv,gA;function Tz(){if(gA)return lv;gA=1;var e=kz(),t=e("toUpperCase");return lv=t,lv}var Az=Tz();const Oh=Gt(Az);function Zt(e){return function(){return e}}const K3=Math.cos,_d=Math.sin,Ma=Math.sqrt,Sd=Math.PI,Nh=2*Sd,_1=Math.PI,S1=2*_1,Hs=1e-6,Ez=S1-Hs;function G3(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return G3;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;aHs)if(!(Math.abs(p*u-f*d)>Hs)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-s,w=a-l,b=u*u+f*f,g=v*v+w*w,k=Math.sqrt(b),A=Math.sqrt(x),S=i*Math.tan((_1-Math.acos((b+x-g)/(2*k*A)))/2),N=S/A,T=S/k;Math.abs(N-1)>Hs&&this._append`L${t+N*d},${r+N*p}`,this._append`A${i},${i},0,0,${+(p*v>d*w)},${this._x1=t+T*u},${this._y1=r+T*f}`}}arc(t,r,n,a,i,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),u=n*Math.sin(a),f=t+l,d=r+u,p=1^s,x=s?a-i:i-a;this._x1===null?this._append`M${f},${d}`:(Math.abs(this._x1-f)>Hs||Math.abs(this._y1-d)>Hs)&&this._append`L${f},${d}`,n&&(x<0&&(x=x%S1+S1),x>Ez?this._append`A${n},${n},0,1,${p},${t-l},${r-u}A${n},${n},0,1,${p},${this._x1=f},${this._y1=d}`:x>Hs&&this._append`A${n},${n},0,${+(x>=_1)},${p},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function _w(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Oz(t)}function Sw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function X3(e){this._context=e}X3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ph(e){return new X3(e)}function Y3(e){return e[0]}function Z3(e){return e[1]}function J3(e,t){var r=Zt(!0),n=null,a=Ph,i=null,s=_w(l);e=typeof e=="function"?e:e===void 0?Y3:Zt(e),t=typeof t=="function"?t:t===void 0?Z3:Zt(t);function l(u){var f,d=(u=Sw(u)).length,p,x=!1,v;for(n==null&&(i=a(v=s())),f=0;f<=d;++f)!(f=v;--w)l.point(S[w],N[w]);l.lineEnd(),l.areaEnd()}k&&(S[x]=+e(g,x,p),N[x]=+t(g,x,p),l.point(n?+n(g,x,p):S[x],r?+r(g,x,p):N[x]))}if(A)return l=null,A+""||null}function d(){return J3().defined(a).curve(s).context(i)}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:Zt(+p),n=null,f):e},f.x0=function(p){return arguments.length?(e=typeof p=="function"?p:Zt(+p),f):e},f.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:Zt(+p),f):n},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:Zt(+p),r=null,f):t},f.y0=function(p){return arguments.length?(t=typeof p=="function"?p:Zt(+p),f):t},f.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:Zt(+p),f):r},f.lineX0=f.lineY0=function(){return d().x(e).y(t)},f.lineY1=function(){return d().x(e).y(r)},f.lineX1=function(){return d().x(n).y(t)},f.defined=function(p){return arguments.length?(a=typeof p=="function"?p:Zt(!!p),f):a},f.curve=function(p){return arguments.length?(s=p,i!=null&&(l=s(i)),f):s},f.context=function(p){return arguments.length?(p==null?i=l=null:l=s(i=p),f):i},f}class Q3{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Nz(e){return new Q3(e,!0)}function Pz(e){return new Q3(e,!1)}const kw={draw(e,t){const r=Ma(t/Sd);e.moveTo(r,0),e.arc(0,0,r,0,Nh)}},Cz={draw(e,t){const r=Ma(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},eC=Ma(1/3),Dz=eC*2,Fz={draw(e,t){const r=Ma(t/Dz),n=r*eC;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Mz={draw(e,t){const r=Ma(t),n=-r/2;e.rect(n,n,r,r)}},Iz=.8908130915292852,tC=_d(Sd/10)/_d(7*Sd/10),Rz=_d(Nh/10)*tC,Lz=-K3(Nh/10)*tC,Bz={draw(e,t){const r=Ma(t*Iz),n=Rz*r,a=Lz*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const s=Nh*i/5,l=K3(s),u=_d(s);e.lineTo(u*r,-l*r),e.lineTo(l*n-u*a,u*n+l*a)}e.closePath()}},cv=Ma(3),$z={draw(e,t){const r=-Ma(t/(cv*3));e.moveTo(0,r*2),e.lineTo(-cv*r,-r),e.lineTo(cv*r,-r),e.closePath()}},ia=-.5,sa=Ma(3)/2,k1=1/Ma(12),Uz=(k1/2+1)*3,zz={draw(e,t){const r=Ma(t/Uz),n=r/2,a=r*k1,i=n,s=r*k1+r,l=-i,u=s;e.moveTo(n,a),e.lineTo(i,s),e.lineTo(l,u),e.lineTo(ia*n-sa*a,sa*n+ia*a),e.lineTo(ia*i-sa*s,sa*i+ia*s),e.lineTo(ia*l-sa*u,sa*l+ia*u),e.lineTo(ia*n+sa*a,ia*a-sa*n),e.lineTo(ia*i+sa*s,ia*s-sa*i),e.lineTo(ia*l+sa*u,ia*u-sa*l),e.closePath()}};function Wz(e,t){let r=null,n=_w(a);e=typeof e=="function"?e:Zt(e||kw),t=typeof t=="function"?t:Zt(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Zt(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Zt(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function kd(){}function Td(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function rC(e){this._context=e}rC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Td(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hz(e){return new rC(e)}function nC(e){this._context=e}nC.prototype={areaStart:kd,areaEnd:kd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qz(e){return new nC(e)}function aC(e){this._context=e}aC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Vz(e){return new aC(e)}function iC(e){this._context=e}iC.prototype={areaStart:kd,areaEnd:kd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Kz(e){return new iC(e)}function yA(e){return e<0?-1:1}function bA(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),s=(r-e._y1)/(a||n<0&&-0),l=(i*a+s*n)/(n+a);return(yA(i)+yA(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(l))||0}function wA(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function uv(e,t,r){var n=e._x0,a=e._y0,i=e._x1,s=e._y1,l=(i-n)/3;e._context.bezierCurveTo(n+l,a+l*t,i-l,s-l*r,i,s)}function Ad(e){this._context=e}Ad.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:uv(this,this._t0,wA(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,uv(this,wA(this,r=bA(this,e,t)),r);break;default:uv(this,this._t0,r=bA(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sC(e){this._context=new oC(e)}(sC.prototype=Object.create(Ad.prototype)).point=function(e,t){Ad.prototype.point.call(this,t,e)};function oC(e){this._context=e}oC.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function Gz(e){return new Ad(e)}function Xz(e){return new sC(e)}function lC(e){this._context=e}lC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=_A(e),a=_A(t),i=0,s=1;s=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Zz(e){return new Ch(e,.5)}function Jz(e){return new Ch(e,0)}function Qz(e){return new Ch(e,1)}function pl(e,t){if((s=e.length)>1)for(var r=1,n,a,i=e[t[0]],s,l=i.length;r=0;)r[t]=t;return r}function eW(e,t){return e[t]}function tW(e){const t=[];return t.key=e,t}function rW(){var e=Zt([]),t=T1,r=pl,n=eW;function a(i){var s=Array.from(e.apply(this,arguments),tW),l,u=s.length,f=-1,d;for(const p of i)for(l=0,++f;l0){for(var r,n,a=0,i=e[0].length,s;a0){for(var r=0,n=e[t[0]],a,i=n.length;r0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,s;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var cC={symbolCircle:kw,symbolCross:Cz,symbolDiamond:Fz,symbolSquare:Mz,symbolStar:Bz,symbolTriangle:$z,symbolWye:zz},dW=Math.PI/180,hW=function(t){var r="symbol".concat(Oh(t));return cC[r]||kw},pW=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*dW;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},mW=function(t,r){cC["symbol".concat(Oh(t))]=r},Dh=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,s=t.sizeType,l=s===void 0?"area":s,u=uW(t,sW),f=kA(kA({},u),{},{type:n,size:i,sizeType:l}),d=function(){var g=hW(n),k=Wz().type(g).size(pW(i,l,n));return k()},p=f.className,x=f.cx,v=f.cy,w=wt(f,!0);return x===+x&&v===+v&&i===+i?ue.createElement("path",A1({},w,{className:Ot("recharts-symbols",p),transform:"translate(".concat(x,", ").concat(v,")"),d:d()})):null};Dh.registerSymbol=mW;function ml(e){"@babel/helpers - typeof";return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}function E1(){return E1=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var A=v.inactive?f:v.color;return ue.createElement("li",E1({className:g,style:p,key:"legend-item-".concat(w)},Nu(n.props,v,w)),ue.createElement(b1,{width:s,height:s,viewBox:d,style:x},n.renderIcon(v)),ue.createElement("span",{className:"recharts-legend-item-text",style:{color:A}},b?b(k,v,w):k))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,s=n.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return ue.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(Q.PureComponent);Cu(Tw,"displayName","Legend");Cu(Tw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var fv,AA;function TW(){if(AA)return fv;AA=1;var e=Ah();function t(){this.__data__=new e,this.size=0}return fv=t,fv}var dv,EA;function AW(){if(EA)return dv;EA=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return dv=e,dv}var hv,jA;function EW(){if(jA)return hv;jA=1;function e(t){return this.__data__.get(t)}return hv=e,hv}var pv,OA;function jW(){if(OA)return pv;OA=1;function e(t){return this.__data__.has(t)}return pv=e,pv}var mv,NA;function OW(){if(NA)return mv;NA=1;var e=Ah(),t=xw(),r=vw(),n=200;function a(i,s){var l=this.__data__;if(l instanceof e){var u=l.__data__;if(!t||u.lengthv))return!1;var b=p.get(s),g=p.get(l);if(b&&g)return b==l&&g==s;var k=-1,A=!0,S=u&a?new e:void 0;for(p.set(s,l),p.set(l,s);++k-1&&n%1==0&&n-1&&r%1==0&&r<=e}return Rv=t,Rv}var Lv,eE;function zW(){if(eE)return Lv;eE=1;var e=Oi(),t=Ow(),r=Ni(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",l="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",p="[object Object]",x="[object RegExp]",v="[object Set]",w="[object String]",b="[object WeakMap]",g="[object ArrayBuffer]",k="[object DataView]",A="[object Float32Array]",S="[object Float64Array]",N="[object Int8Array]",T="[object Int16Array]",E="[object Int32Array]",j="[object Uint8Array]",D="[object Uint8ClampedArray]",P="[object Uint16Array]",H="[object Uint32Array]",U={};U[A]=U[S]=U[N]=U[T]=U[E]=U[j]=U[D]=U[P]=U[H]=!0,U[n]=U[a]=U[g]=U[i]=U[k]=U[s]=U[l]=U[u]=U[f]=U[d]=U[p]=U[x]=U[v]=U[w]=U[b]=!1;function B(V){return r(V)&&t(V.length)&&!!U[e(V)]}return Lv=B,Lv}var Bv,tE;function yC(){if(tE)return Bv;tE=1;function e(t){return function(r){return t(r)}}return Bv=e,Bv}var eu={exports:{}};eu.exports;var rE;function WW(){return rE||(rE=1,(function(e,t){var r=L3(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,l=(function(){try{var u=a&&a.require&&a.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l})(eu,eu.exports)),eu.exports}var $v,nE;function bC(){if(nE)return $v;nE=1;var e=zW(),t=yC(),r=WW(),n=r&&r.isTypedArray,a=n?t(n):e;return $v=a,$v}var Uv,aE;function HW(){if(aE)return Uv;aE=1;var e=BW(),t=Ew(),r=In(),n=gC(),a=jw(),i=bC(),s=Object.prototype,l=s.hasOwnProperty;function u(f,d){var p=r(f),x=!p&&t(f),v=!p&&!x&&n(f),w=!p&&!x&&!v&&i(f),b=p||x||v||w,g=b?e(f.length,String):[],k=g.length;for(var A in f)(d||l.call(f,A))&&!(b&&(A=="length"||v&&(A=="offset"||A=="parent")||w&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||a(A,k)))&&g.push(A);return g}return Uv=u,Uv}var zv,iE;function qW(){if(iE)return zv;iE=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return zv=t,zv}var Wv,sE;function wC(){if(sE)return Wv;sE=1;function e(t,r){return function(n){return t(r(n))}}return Wv=e,Wv}var Hv,oE;function VW(){if(oE)return Hv;oE=1;var e=wC(),t=e(Object.keys,Object);return Hv=t,Hv}var qv,lE;function KW(){if(lE)return qv;lE=1;var e=qW(),t=VW(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var l in Object(i))n.call(i,l)&&l!="constructor"&&s.push(l);return s}return qv=a,qv}var Vv,cE;function bf(){if(cE)return Vv;cE=1;var e=pw(),t=Ow();function r(n){return n!=null&&t(n.length)&&!e(n)}return Vv=r,Vv}var Kv,uE;function Fh(){if(uE)return Kv;uE=1;var e=HW(),t=KW(),r=bf();function n(a){return r(a)?e(a):t(a)}return Kv=n,Kv}var Gv,fE;function GW(){if(fE)return Gv;fE=1;var e=MW(),t=LW(),r=Fh();function n(a){return e(a,r,t)}return Gv=n,Gv}var Xv,dE;function XW(){if(dE)return Xv;dE=1;var e=GW(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,s,l,u,f,d){var p=l&t,x=e(i),v=x.length,w=e(s),b=w.length;if(v!=b&&!p)return!1;for(var g=v;g--;){var k=x[g];if(!(p?k in s:n.call(s,k)))return!1}var A=d.get(i),S=d.get(s);if(A&&S)return A==s&&S==i;var N=!0;d.set(i,s),d.set(s,i);for(var T=p;++g-1}return wg=t,wg}var _g,BE;function mH(){if(BE)return _g;BE=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a=s){var k=f?null:a(u);if(k)return i(k);w=!1,x=n,g=new e}else g=f?[]:b;e:for(;++p=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NH(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function PH(e){return e.value}function CH(e,t){if(ue.isValidElement(e))return ue.cloneElement(e,t);if(typeof e=="function")return ue.createElement(e,t);t.ref;var r=OH(t,wH);return ue.createElement(Tw,r)}var KE=1,cl=(function(e){function t(){var r;_H(this,t);for(var n=arguments.length,a=new Array(n),i=0;iKE||Math.abs(a.height-this.lastBoundingBox.height)>KE)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?di({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,s=a.align,l=a.verticalAlign,u=a.margin,f=a.chartWidth,d=a.chartHeight,p,x;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&i==="vertical"){var v=this.getBBoxSnapshot();p={left:((f||0)-v.width)/2}}else p=s==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var w=this.getBBoxSnapshot();x={top:((d||0)-w.height)/2}}else x=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return di(di({},p),x)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,s=a.width,l=a.height,u=a.wrapperStyle,f=a.payloadUniqBy,d=a.payload,p=di(di({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return ue.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(v){n.wrapperNode=v}},CH(i,di(di({},this.props),{},{payload:AC(d,f,PH)})))}}],[{key:"getWithHeight",value:function(n,a){var i=di(di({},this.defaultProps),n.props),s=i.layout;return s==="vertical"&&Ve(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||a}:null}}])})(Q.PureComponent);Mh(cl,"displayName","Legend");Mh(cl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Eg,GE;function DH(){if(GE)return Eg;GE=1;var e=yf(),t=Ew(),r=In(),n=e?e.isConcatSpreadable:void 0;function a(i){return r(i)||t(i)||!!(n&&i&&i[n])}return Eg=a,Eg}var jg,XE;function OC(){if(XE)return jg;XE=1;var e=vC(),t=DH();function r(n,a,i,s,l){var u=-1,f=n.length;for(i||(i=t),l||(l=[]);++u0&&i(d)?a>1?r(d,a-1,i,s,l):e(l,d):s||(l[l.length]=d)}return l}return jg=r,jg}var Og,YE;function FH(){if(YE)return Og;YE=1;function e(t){return function(r,n,a){for(var i=-1,s=Object(r),l=a(r),u=l.length;u--;){var f=l[t?u:++i];if(n(s[f],f,s)===!1)break}return r}}return Og=e,Og}var Ng,ZE;function MH(){if(ZE)return Ng;ZE=1;var e=FH(),t=e();return Ng=t,Ng}var Pg,JE;function NC(){if(JE)return Pg;JE=1;var e=MH(),t=Fh();function r(n,a){return n&&e(n,a,t)}return Pg=r,Pg}var Cg,QE;function IH(){if(QE)return Cg;QE=1;var e=bf();function t(r,n){return function(a,i){if(a==null)return a;if(!e(a))return r(a,i);for(var s=a.length,l=n?s:-1,u=Object(a);(n?l--:++ln||l&&u&&d&&!f&&!p||i&&u&&d||!a&&d||!s)return 1;if(!i&&!l&&!p&&r=f)return d;var p=a[i];return d*(p=="desc"?-1:1)}}return r.index-n.index}return Rg=t,Rg}var Lg,i4;function $H(){if(i4)return Lg;i4=1;var e=gw(),t=yw(),r=_s(),n=PC(),a=RH(),i=yC(),s=BH(),l=Gl(),u=In();function f(d,p,x){p.length?p=e(p,function(b){return u(b)?function(g){return t(g,b.length===1?b[0]:b)}:b}):p=[l];var v=-1;p=e(p,i(r));var w=n(d,function(b,g,k){var A=e(p,function(S){return S(b)});return{criteria:A,index:++v,value:b}});return a(w,function(b,g){return s(b,g,x)})}return Lg=f,Lg}var Bg,s4;function UH(){if(s4)return Bg;s4=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Bg=e,Bg}var $g,o4;function zH(){if(o4)return $g;o4=1;var e=UH(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var s=arguments,l=-1,u=t(s.length-a,0),f=Array(u);++l0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Hg=n,Hg}var qg,d4;function VH(){if(d4)return qg;d4=1;var e=HH(),t=qH(),r=t(e);return qg=r,qg}var Vg,h4;function KH(){if(h4)return Vg;h4=1;var e=Gl(),t=zH(),r=VH();function n(a,i){return r(t(a,i,e),a+"")}return Vg=n,Vg}var Kg,p4;function Ih(){if(p4)return Kg;p4=1;var e=mw(),t=bf(),r=jw(),n=ws();function a(i,s,l){if(!n(l))return!1;var u=typeof s;return(u=="number"?t(l)&&r(s,l.length):u=="string"&&s in l)?e(l[s],i):!1}return Kg=a,Kg}var Gg,m4;function GH(){if(m4)return Gg;m4=1;var e=OC(),t=$H(),r=KH(),n=Ih(),a=r(function(i,s){if(i==null)return[];var l=s.length;return l>1&&n(i,s[0],s[1])?s=[]:l>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return Gg=a,Gg}var XH=GH();const Cw=Gt(XH);function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function N1(){return N1=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Rc,"-left"),Ve(r)&&t&&Ve(t.x)&&r=t.y),"".concat(Rc,"-top"),Ve(n)&&t&&Ve(t.y)&&nb?Math.max(d,u[n]):Math.max(p,u[n])}function uq(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function fq(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,f,d,p;return s.height>0&&s.width>0&&r?(d=g4({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:u,viewBoxDimension:u.width}),p=g4({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:u,viewBoxDimension:u.height}),f=uq({translateX:d,translateY:p,useTranslate3d:l})):f=lq,{cssProperties:f,cssClasses:cq({translateX:d,translateY:p,coordinate:r})}}function vl(e){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function y4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function b4(e){for(var t=1;tw4||Math.abs(n.height-this.state.lastBoundingBox.height)>w4)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,u=a.animationEasing,f=a.children,d=a.coordinate,p=a.hasPayload,x=a.isAnimationActive,v=a.offset,w=a.position,b=a.reverseDirection,g=a.useTranslate3d,k=a.viewBox,A=a.wrapperStyle,S=fq({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:v,position:w,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:k}),N=S.cssClasses,T=S.cssProperties,E=b4(b4({transition:x&&i?"transform ".concat(l,"ms ").concat(u):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&p?"visible":"hidden",position:"absolute",top:0,left:0},A);return ue.createElement("div",{tabIndex:-1,className:N,style:E,ref:function(D){n.wrapperNode=D}},f)}}])})(Q.PureComponent),wq=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ss={isSsr:wq()};function gl(e){"@babel/helpers - typeof";return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}function _4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function S4(e){for(var t=1;t0;return ue.createElement(bq,{allowEscapeViewBox:s,animationDuration:l,animationEasing:u,isAnimationActive:x,active:i,coordinate:d,hasPayload:E,offset:v,position:g,reverseDirection:k,useTranslate3d:A,viewBox:S,wrapperStyle:N},Pq(f,S4(S4({},this.props),{},{payload:T})))}}])})(Q.PureComponent);Dw(Jr,"displayName","Tooltip");Dw(Jr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ss.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Yg,k4;function Cq(){if(k4)return Yg;k4=1;var e=ti(),t=function(){return e.Date.now()};return Yg=t,Yg}var Zg,T4;function Dq(){if(T4)return Zg;T4=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Zg=t,Zg}var Jg,A4;function Fq(){if(A4)return Jg;A4=1;var e=Dq(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Jg=r,Jg}var Qg,E4;function RC(){if(E4)return Qg;E4=1;var e=Fq(),t=ws(),r=ql(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function u(f){if(typeof f=="number")return f;if(r(f))return n;if(t(f)){var d=typeof f.valueOf=="function"?f.valueOf():f;f=t(d)?d+"":d}if(typeof f!="string")return f===0?f:+f;f=e(f);var p=i.test(f);return p||s.test(f)?l(f.slice(2),p?2:8):a.test(f)?n:+f}return Qg=u,Qg}var ey,j4;function Mq(){if(j4)return ey;j4=1;var e=ws(),t=Cq(),r=RC(),n="Expected a function",a=Math.max,i=Math.min;function s(l,u,f){var d,p,x,v,w,b,g=0,k=!1,A=!1,S=!0;if(typeof l!="function")throw new TypeError(n);u=r(u)||0,e(f)&&(k=!!f.leading,A="maxWait"in f,x=A?a(r(f.maxWait)||0,u):x,S="trailing"in f?!!f.trailing:S);function N(V){var W=d,G=p;return d=p=void 0,g=V,v=l.apply(G,W),v}function T(V){return g=V,w=setTimeout(D,u),k?N(V):v}function E(V){var W=V-b,G=V-g,ne=u-W;return A?i(ne,x-G):ne}function j(V){var W=V-b,G=V-g;return b===void 0||W>=u||W<0||A&&G>=x}function D(){var V=t();if(j(V))return P(V);w=setTimeout(D,E(V))}function P(V){return w=void 0,S&&d?N(V):(d=p=void 0,v)}function H(){w!==void 0&&clearTimeout(w),g=0,d=b=p=w=void 0}function U(){return w===void 0?v:P(t())}function B(){var V=t(),W=j(V);if(d=arguments,p=this,b=V,W){if(w===void 0)return T(b);if(A)return clearTimeout(w),w=setTimeout(D,u),N(b)}return w===void 0&&(w=setTimeout(D,u)),v}return B.cancel=H,B.flush=U,B}return ey=s,ey}var ty,O4;function Iq(){if(O4)return ty;O4=1;var e=Mq(),t=ws(),r="Expected a function";function n(a,i,s){var l=!0,u=!0;if(typeof a!="function")throw new TypeError(r);return t(s)&&(l="leading"in s?!!s.leading:l,u="trailing"in s?!!s.trailing:u),e(a,i,{leading:l,maxWait:i,trailing:u})}return ty=n,ty}var Rq=Iq();const LC=Gt(Rq);function Mu(e){"@babel/helpers - typeof";return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(e)}function N4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function z0(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(V=LC(V,b,{trailing:!0,leading:!1}));var W=new ResizeObserver(V),G=T.current.getBoundingClientRect(),ne=G.width,te=G.height;return U(ne,te),W.observe(T.current),function(){W.disconnect()}},[U,b]);var B=Q.useMemo(function(){var V=P.containerWidth,W=P.containerHeight;if(V<0||W<0)return null;_i(Gs(s)||Gs(u),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,s,u),_i(!r||r>0,"The aspect(%s) must be greater than zero.",r);var G=Gs(s)?V:s,ne=Gs(u)?W:u;r&&r>0&&(G?ne=G/r:ne&&(G=ne*r),x&&ne>x&&(ne=x)),_i(G>0||ne>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,G,ne,s,u,d,p,r);var te=!Array.isArray(v)&&wi(v.type).endsWith("Chart");return ue.Children.map(v,function(oe){return ue.isValidElement(oe)?Q.cloneElement(oe,z0({width:G,height:ne},te?{style:z0({height:"100%",width:"100%",maxHeight:ne,maxWidth:G},oe.props.style)}:{})):oe})},[r,v,u,x,p,d,P,s]);return ue.createElement("div",{id:g?"".concat(g):void 0,className:Ot("recharts-responsive-container",k),style:z0(z0({},N),{},{width:s,height:u,minWidth:d,minHeight:p,maxHeight:x}),ref:T},B)}),Fw=function(t){return null};Fw.displayName="Cell";function Iu(e){"@babel/helpers - typeof";return Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iu(e)}function C4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function F1(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ss.isSsr)return{width:0,height:0};var n=Zq(r),a=JSON.stringify({text:t,copyStyle:n});if(Yo.widthCache[a])return Yo.widthCache[a];try{var i=document.getElementById(D4);i||(i=document.createElement("span"),i.setAttribute("id",D4),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=F1(F1({},Yq),n);Object.assign(i.style,s),i.textContent="".concat(t);var l=i.getBoundingClientRect(),u={width:l.width,height:l.height};return Yo.widthCache[a]=u,++Yo.cacheCount>Xq&&(Yo.cacheCount=0,Yo.widthCache={}),u}catch{return{width:0,height:0}}},Jq=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ru(e){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}function Pd(e,t){return rV(e)||tV(e,t)||eV(e,t)||Qq()}function Qq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eV(e,t){if(e){if(typeof e=="string")return F4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F4(e,t)}}function F4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $4(e,t){return bV(e)||yV(e,t)||gV(e,t)||vV()}function vV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gV(e,t){if(e){if(typeof e=="string")return U4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U4(e,t)}}function U4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(ne,te){var oe=te.word,z=te.width,ie=ne[ne.length-1];if(ie&&(a==null||i||ie.width+z+nte.width?ne:te})};if(!d)return v;for(var b="…",g=function(G){var ne=p.slice(0,G),te=zC({breakAll:f,style:u,children:ne+b}).wordsWithComputedWidth,oe=x(te),z=oe.length>s||w(oe).width>Number(a);return[z,oe]},k=0,A=p.length-1,S=0,N;k<=A&&S<=p.length-1;){var T=Math.floor((k+A)/2),E=T-1,j=g(E),D=$4(j,2),P=D[0],H=D[1],U=g(T),B=$4(U,1),V=B[0];if(!P&&!V&&(k=T+1),P&&V&&(A=T-1),!P&&V){N=H;break}S++}return N||v},z4=function(t){var r=yt(t)?[]:t.toString().split(UC);return[{words:r}]},_V=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,l=t.maxLines;if((r||n)&&!Ss.isSsr){var u,f,d=zC({breakAll:s,children:a,style:i});if(d){var p=d.wordsWithComputedWidth,x=d.spaceWidth;u=p,f=x}else return z4(a);return wV({breakAll:s,children:a,maxLines:l,style:i},u,f,r,n)}return z4(a)},W4="#808080",Cd=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.lineHeight,l=s===void 0?"1em":s,u=t.capHeight,f=u===void 0?"0.71em":u,d=t.scaleToFit,p=d===void 0?!1:d,x=t.textAnchor,v=x===void 0?"start":x,w=t.verticalAnchor,b=w===void 0?"end":w,g=t.fill,k=g===void 0?W4:g,A=B4(t,pV),S=Q.useMemo(function(){return _V({breakAll:A.breakAll,children:A.children,maxLines:A.maxLines,scaleToFit:p,style:A.style,width:A.width})},[A.breakAll,A.children,A.maxLines,p,A.style,A.width]),N=A.dx,T=A.dy,E=A.angle,j=A.className,D=A.breakAll,P=B4(A,mV);if(!Dr(n)||!Dr(i))return null;var H=n+(Ve(N)?N:0),U=i+(Ve(T)?T:0),B;switch(b){case"start":B=ry("calc(".concat(f,")"));break;case"middle":B=ry("calc(".concat((S.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:B=ry("calc(".concat(S.length-1," * -").concat(l,")"));break}var V=[];if(p){var W=S[0].width,G=A.width;V.push("scale(".concat((Ve(G)?G/W:1)/W,")"))}return E&&V.push("rotate(".concat(E,", ").concat(H,", ").concat(U,")")),V.length&&(P.transform=V.join(" ")),ue.createElement("text",M1({},wt(P,!0),{x:H,y:U,className:Ot("recharts-text",j),textAnchor:v,fill:k.includes("url")?W4:k}),S.map(function(ne,te){var oe=ne.words.join(D?"":" ");return ue.createElement("tspan",{x:H,dy:te===0?B:l,key:"".concat(oe,"-").concat(te)},oe)}))};function ps(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function SV(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Mw(e){let t,r,n;e.length!==2?(t=ps,r=(l,u)=>ps(e(l),u),n=(l,u)=>e(l)-u):(t=e===ps||e===SV?e:kV,r=e,n=e);function a(l,u,f=0,d=l.length){if(f>>1;r(l[p],u)<0?f=p+1:d=p}while(f>>1;r(l[p],u)<=0?f=p+1:d=p}while(ff&&n(l[p-1],u)>-n(l[p],u)?p-1:p}return{left:a,center:s,right:i}}function kV(){return 0}function WC(e){return e===null?NaN:+e}function*TV(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const AV=Mw(ps),wf=AV.right;Mw(WC).center;class H4 extends Map{constructor(t,r=OV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(q4(this,t))}has(t){return super.has(q4(this,t))}set(t,r){return super.set(EV(this,t),r)}delete(t){return super.delete(jV(this,t))}}function q4({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function EV({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function jV({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function OV(e){return e!==null&&typeof e=="object"?e.valueOf():e}function NV(e=ps){if(e===ps)return HC;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function HC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const PV=Math.sqrt(50),CV=Math.sqrt(10),DV=Math.sqrt(2);function Dd(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),s=i>=PV?10:i>=CV?5:i>=DV?2:1;let l,u,f;return a<0?(f=Math.pow(10,-a)/s,l=Math.round(e*f),u=Math.round(t*f),l/ft&&--u,f=-f):(f=Math.pow(10,a)*s,l=Math.round(e/f),u=Math.round(t/f),l*ft&&--u),u0))return[];if(e===t)return[e];const n=t=a))return[];const l=i-a+1,u=new Array(l);if(n)if(s<0)for(let f=0;f=n)&&(r=n);return r}function K4(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function qC(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?HC:NV(a);n>r;){if(n-r>600){const u=n-r+1,f=t-r+1,d=Math.log(u),p=.5*Math.exp(2*d/3),x=.5*Math.sqrt(d*p*(u-p)/u)*(f-u/2<0?-1:1),v=Math.max(r,Math.floor(t-f*p/u+x)),w=Math.min(n,Math.floor(t+(u-f)*p/u+x));qC(e,t,v,w,a)}const i=e[t];let s=r,l=n;for(Lc(e,r,t),a(e[n],i)>0&&Lc(e,r,n);s0;)--l}a(e[r],i)===0?Lc(e,r,l):(++l,Lc(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function Lc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function FV(e,t,r){if(e=Float64Array.from(TV(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return K4(e);if(t>=1)return V4(e);var n,a=(n-1)*t,i=Math.floor(a),s=V4(qC(e,i).subarray(0,i+1)),l=K4(e.subarray(i+1));return s+(l-s)*(a-i)}}function MV(e,t,r=WC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),s=+r(e[i],i,e),l=+r(e[i+1],i+1,e);return s+(l-s)*(a-i)}}function IV(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?H0(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?H0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=LV.exec(e))?new Fn(t[1],t[2],t[3],1):(t=BV.exec(e))?new Fn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$V.exec(e))?H0(t[1],t[2],t[3],t[4]):(t=UV.exec(e))?H0(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zV.exec(e))?ej(t[1],t[2]/100,t[3]/100,1):(t=WV.exec(e))?ej(t[1],t[2]/100,t[3]/100,t[4]):G4.hasOwnProperty(e)?Z4(G4[e]):e==="transparent"?new Fn(NaN,NaN,NaN,0):null}function Z4(e){return new Fn(e>>16&255,e>>8&255,e&255,1)}function H0(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fn(e,t,r,n)}function VV(e){return e instanceof _f||(e=Uu(e)),e?(e=e.rgb(),new Fn(e.r,e.g,e.b,e.opacity)):new Fn}function $1(e,t,r,n){return arguments.length===1?VV(e):new Fn(e,t,r,n??1)}function Fn(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Rw(Fn,$1,KC(_f,{brighter(e){return e=e==null?Fd:Math.pow(Fd,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bu:Math.pow(Bu,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fn(ro(this.r),ro(this.g),ro(this.b),Md(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:J4,formatHex:J4,formatHex8:KV,formatRgb:Q4,toString:Q4}));function J4(){return`#${Xs(this.r)}${Xs(this.g)}${Xs(this.b)}`}function KV(){return`#${Xs(this.r)}${Xs(this.g)}${Xs(this.b)}${Xs((isNaN(this.opacity)?1:this.opacity)*255)}`}function Q4(){const e=Md(this.opacity);return`${e===1?"rgb(":"rgba("}${ro(this.r)}, ${ro(this.g)}, ${ro(this.b)}${e===1?")":`, ${e})`}`}function Md(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ro(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xs(e){return e=ro(e),(e<16?"0":"")+e.toString(16)}function ej(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Oa(e,t,r,n)}function GC(e){if(e instanceof Oa)return new Oa(e.h,e.s,e.l,e.opacity);if(e instanceof _f||(e=Uu(e)),!e)return new Oa;if(e instanceof Oa)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),s=NaN,l=i-a,u=(i+a)/2;return l?(t===i?s=(r-n)/l+(r0&&u<1?0:s,new Oa(s,l,u,e.opacity)}function GV(e,t,r,n){return arguments.length===1?GC(e):new Oa(e,t,r,n??1)}function Oa(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Rw(Oa,GV,KC(_f,{brighter(e){return e=e==null?Fd:Math.pow(Fd,e),new Oa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bu:Math.pow(Bu,e),new Oa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Fn(ny(e>=240?e-240:e+120,a,n),ny(e,a,n),ny(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Oa(tj(this.h),q0(this.s),q0(this.l),Md(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Md(this.opacity);return`${e===1?"hsl(":"hsla("}${tj(this.h)}, ${q0(this.s)*100}%, ${q0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tj(e){return e=(e||0)%360,e<0?e+360:e}function q0(e){return Math.max(0,Math.min(1,e||0))}function ny(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Lw=e=>()=>e;function XV(e,t){return function(r){return e+r*t}}function YV(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function ZV(e){return(e=+e)==1?XC:function(t,r){return r-t?YV(t,r,e):Lw(isNaN(t)?r:t)}}function XC(e,t){var r=t-e;return r?XV(e,r):Lw(isNaN(e)?t:e)}const rj=(function e(t){var r=ZV(t);function n(a,i){var s=r((a=$1(a)).r,(i=$1(i)).r),l=r(a.g,i.g),u=r(a.b,i.b),f=XC(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=l(d),a.b=u(d),a.opacity=f(d),a+""}}return n.gamma=e,n})(1);function JV(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;ar&&(i=t.slice(r,i),l[s]?l[s]+=i:l[++s]=i),(n=n[0])===(a=a[0])?l[s]?l[s]+=a:l[++s]=a:(l[++s]=null,u.push({i:s,x:Id(n,a)})),r=ay.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function cK(e,t,r){var n=e[0],a=e[1],i=t[0],s=t[1];return a2?uK:cK,u=f=null,p}function p(x){return x==null||isNaN(x=+x)?i:(u||(u=l(e.map(n),t,r)))(n(s(x)))}return p.invert=function(x){return s(a((f||(f=l(t,e.map(n),Id)))(x)))},p.domain=function(x){return arguments.length?(e=Array.from(x,Rd),d()):e.slice()},p.range=function(x){return arguments.length?(t=Array.from(x),d()):t.slice()},p.rangeRound=function(x){return t=Array.from(x),r=Bw,d()},p.clamp=function(x){return arguments.length?(s=x?!0:kn,d()):s!==kn},p.interpolate=function(x){return arguments.length?(r=x,d()):r},p.unknown=function(x){return arguments.length?(i=x,p):i},function(x,v){return n=x,a=v,d()}}function $w(){return Rh()(kn,kn)}function fK(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ld(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function yl(e){return e=Ld(Math.abs(e)),e?e[1]:NaN}function dK(e,t){return function(r,n){for(var a=r.length,i=[],s=0,l=e[0],u=0;a>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),i.push(r.substring(a-=l,a+l)),!((u+=l+1)>n));)l=e[s=(s+1)%e.length];return i.reverse().join(t)}}function hK(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var pK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function zu(e){if(!(t=pK.exec(e)))throw new Error("invalid format: "+e);var t;return new Uw({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}zu.prototype=Uw.prototype;function Uw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Uw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function mK(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Bd;function xK(e,t){var r=Ld(e,t);if(!r)return Bd=void 0,e.toPrecision(t);var n=r[0],a=r[1],i=a-(Bd=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return i===s?n:i>s?n+new Array(i-s+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Ld(e,Math.max(0,t+i-1))[0]}function aj(e,t){var r=Ld(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const ij={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:fK,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>aj(e*100,t),r:aj,s:xK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sj(e){return e}var oj=Array.prototype.map,lj=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vK(e){var t=e.grouping===void 0||e.thousands===void 0?sj:dK(oj.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?sj:hK(oj.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function f(p,x){p=zu(p);var v=p.fill,w=p.align,b=p.sign,g=p.symbol,k=p.zero,A=p.width,S=p.comma,N=p.precision,T=p.trim,E=p.type;E==="n"?(S=!0,E="g"):ij[E]||(N===void 0&&(N=12),T=!0,E="g"),(k||v==="0"&&w==="=")&&(k=!0,v="0",w="=");var j=(x&&x.prefix!==void 0?x.prefix:"")+(g==="$"?r:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),D=(g==="$"?n:/[%p]/.test(E)?s:"")+(x&&x.suffix!==void 0?x.suffix:""),P=ij[E],H=/[defgprs%]/.test(E);N=N===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function U(B){var V=j,W=D,G,ne,te;if(E==="c")W=P(B)+W,B="";else{B=+B;var oe=B<0||1/B<0;if(B=isNaN(B)?u:P(Math.abs(B),N),T&&(B=mK(B)),oe&&+B==0&&b!=="+"&&(oe=!1),V=(oe?b==="("?b:l:b==="-"||b==="("?"":b)+V,W=(E==="s"&&!isNaN(B)&&Bd!==void 0?lj[8+Bd/3]:"")+W+(oe&&b==="("?")":""),H){for(G=-1,ne=B.length;++Gte||te>57){W=(te===46?a+B.slice(G+1):B.slice(G))+W,B=B.slice(0,G);break}}}S&&!k&&(B=t(B,1/0));var z=V.length+B.length+W.length,ie=z>1)+V+B+W+ie.slice(z);break;default:B=ie+V+B+W;break}return i(B)}return U.toString=function(){return p+""},U}function d(p,x){var v=Math.max(-8,Math.min(8,Math.floor(yl(x)/3)))*3,w=Math.pow(10,-v),b=f((p=zu(p),p.type="f",p),{suffix:lj[8+v/3]});return function(g){return b(w*g)}}return{format:f,formatPrefix:d}}var V0,zw,YC;gK({thousands:",",grouping:[3],currency:["$",""]});function gK(e){return V0=vK(e),zw=V0.format,YC=V0.formatPrefix,V0}function yK(e){return Math.max(0,-yl(Math.abs(e)))}function bK(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yl(t)/3)))*3-yl(Math.abs(e)))}function wK(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yl(t)-yl(e))+1}function ZC(e,t,r,n){var a=L1(e,t,r),i;switch(n=zu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=bK(a,s))&&(n.precision=i),YC(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=wK(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=yK(a))&&(n.precision=i-(n.type==="%")*2);break}}return zw(n)}function ks(e){var t=e.domain;return e.ticks=function(r){var n=t();return I1(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return ZC(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,s=n[a],l=n[i],u,f,d=10;for(l0;){if(f=R1(s,l,r),f===u)return n[a]=s,n[i]=l,t(n);if(f>0)s=Math.floor(s/f)*f,l=Math.ceil(l/f)*f;else if(f<0)s=Math.ceil(s*f)/f,l=Math.floor(l*f)/f;else break;u=f}return e},e}function $d(){var e=$w();return e.copy=function(){return Sf(e,$d())},xa.apply(e,arguments),ks(e)}function JC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Rd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return JC(e).unknown(t)},e=arguments.length?Array.from(e,Rd):[0,1],ks(r)}function QC(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],s;return iMath.pow(e,t)}function AK(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function fj(e){return(t,r)=>-e(-t,r)}function Ww(e){const t=e(cj,uj),r=t.domain;let n=10,a,i;function s(){return a=AK(n),i=TK(n),r()[0]<0?(a=fj(a),i=fj(i),e(_K,SK)):e(cj,uj),t}return t.base=function(l){return arguments.length?(n=+l,s()):n},t.domain=function(l){return arguments.length?(r(l),s()):r()},t.ticks=l=>{const u=r();let f=u[0],d=u[u.length-1];const p=d0){for(;x<=v;++x)for(w=1;wd)break;k.push(b)}}else for(;x<=v;++x)for(w=n-1;w>=1;--w)if(b=x>0?w/i(-x):w*i(x),!(bd)break;k.push(b)}k.length*2{if(l==null&&(l=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=zu(u)).precision==null&&(u.trim=!0),u=zw(u)),l===1/0)return u;const f=Math.max(1,n*l/t.ticks().length);return d=>{let p=d/i(Math.round(a(d)));return p*nr(QC(r(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function eD(){const e=Ww(Rh()).domain([1,10]);return e.copy=()=>Sf(e,eD()).base(e.base()),xa.apply(e,arguments),e}function dj(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function hj(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Hw(e){var t=1,r=e(dj(t),hj(t));return r.constant=function(n){return arguments.length?e(dj(t=+n),hj(t)):t},ks(r)}function tD(){var e=Hw(Rh());return e.copy=function(){return Sf(e,tD()).constant(e.constant())},xa.apply(e,arguments)}function pj(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function EK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jK(e){return e<0?-e*e:e*e}function qw(e){var t=e(kn,kn),r=1;function n(){return r===1?e(kn,kn):r===.5?e(EK,jK):e(pj(r),pj(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ks(t)}function Vw(){var e=qw(Rh());return e.copy=function(){return Sf(e,Vw()).exponent(e.exponent())},xa.apply(e,arguments),e}function OK(){return Vw.apply(null,arguments).exponent(.5)}function mj(e){return Math.sign(e)*e*e}function NK(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function rD(){var e=$w(),t=[0,1],r=!1,n;function a(i){var s=NK(e(i));return isNaN(s)?n:r?Math.round(s):s}return a.invert=function(i){return e.invert(mj(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Rd)).map(mj)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return rD(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},xa.apply(a,arguments),ks(a)}function nD(){var e=[],t=[],r=[],n;function a(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[f-1],n[f]]},s.unknown=function(u){return arguments.length&&(i=u),s},s.thresholds=function(){return n.slice()},s.copy=function(){return aD().domain([e,t]).range(a).unknown(i)},xa.apply(ks(s),arguments)}function iD(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[wf(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return iD().domain(e).range(t).unknown(r)},xa.apply(a,arguments)}const iy=new Date,sy=new Date;function Ir(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),l=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,l)=>{const u=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i0))return u;let f;do u.push(f=new Date(+i)),t(i,l),e(i);while(fIr(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!i(s););else for(;--l>=0;)for(;t(s,1),!i(s););}),r&&(a.count=(i,s)=>(iy.setTime(+i),sy.setTime(+s),e(iy),e(sy),Math.floor(r(iy,sy))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ud=Ir(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ud.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ir(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ud);Ud.range;const xi=1e3,fa=xi*60,vi=fa*60,Ti=vi*24,Kw=Ti*7,xj=Ti*30,oy=Ti*365,Ys=Ir(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xi)},(e,t)=>(t-e)/xi,e=>e.getUTCSeconds());Ys.range;const Gw=Ir(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xi)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getMinutes());Gw.range;const Xw=Ir(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getUTCMinutes());Xw.range;const Yw=Ir(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xi-e.getMinutes()*fa)},(e,t)=>{e.setTime(+e+t*vi)},(e,t)=>(t-e)/vi,e=>e.getHours());Yw.range;const Zw=Ir(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*vi)},(e,t)=>(t-e)/vi,e=>e.getUTCHours());Zw.range;const kf=Ir(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fa)/Ti,e=>e.getDate()-1);kf.range;const Lh=Ir(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ti,e=>e.getUTCDate()-1);Lh.range;const sD=Ir(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ti,e=>Math.floor(e/Ti));sD.range;function So(e){return Ir(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*fa)/Kw)}const Bh=So(0),zd=So(1),PK=So(2),CK=So(3),bl=So(4),DK=So(5),FK=So(6);Bh.range;zd.range;PK.range;CK.range;bl.range;DK.range;FK.range;function ko(e){return Ir(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Kw)}const $h=ko(0),Wd=ko(1),MK=ko(2),IK=ko(3),wl=ko(4),RK=ko(5),LK=ko(6);$h.range;Wd.range;MK.range;IK.range;wl.range;RK.range;LK.range;const Jw=Ir(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Jw.range;const Qw=Ir(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Qw.range;const Ai=Ir(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ai.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ir(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Ai.range;const Ei=Ir(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ei.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ir(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ei.range;function oD(e,t,r,n,a,i){const s=[[Ys,1,xi],[Ys,5,5*xi],[Ys,15,15*xi],[Ys,30,30*xi],[i,1,fa],[i,5,5*fa],[i,15,15*fa],[i,30,30*fa],[a,1,vi],[a,3,3*vi],[a,6,6*vi],[a,12,12*vi],[n,1,Ti],[n,2,2*Ti],[r,1,Kw],[t,1,xj],[t,3,3*xj],[e,1,oy]];function l(f,d,p){const x=dg).right(s,x);if(v===s.length)return e.every(L1(f/oy,d/oy,p));if(v===0)return Ud.every(Math.max(L1(f,d,p),1));const[w,b]=s[x/s[v-1][2]53)return null;"w"in I||(I.w=1),"Z"in I?(Ne=cy(Bc(I.y,0,1)),De=Ne.getUTCDay(),Ne=De>4||De===0?Wd.ceil(Ne):Wd(Ne),Ne=Lh.offset(Ne,(I.V-1)*7),I.y=Ne.getUTCFullYear(),I.m=Ne.getUTCMonth(),I.d=Ne.getUTCDate()+(I.w+6)%7):(Ne=ly(Bc(I.y,0,1)),De=Ne.getDay(),Ne=De>4||De===0?zd.ceil(Ne):zd(Ne),Ne=kf.offset(Ne,(I.V-1)*7),I.y=Ne.getFullYear(),I.m=Ne.getMonth(),I.d=Ne.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),De="Z"in I?cy(Bc(I.y,0,1)).getUTCDay():ly(Bc(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(De+5)%7:I.w+I.U*7-(De+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,cy(I)):ly(I)}}function D(se,he,Ce,I){for(var qe=0,Ne=he.length,De=Ce.length,Fe,Se;qe=De)return-1;if(Fe=he.charCodeAt(qe++),Fe===37){if(Fe=he.charAt(qe++),Se=T[Fe in vj?he.charAt(qe++):Fe],!Se||(I=Se(se,Ce,I))<0)return-1}else if(Fe!=Ce.charCodeAt(I++))return-1}return I}function P(se,he,Ce){var I=f.exec(he.slice(Ce));return I?(se.p=d.get(I[0].toLowerCase()),Ce+I[0].length):-1}function H(se,he,Ce){var I=v.exec(he.slice(Ce));return I?(se.w=w.get(I[0].toLowerCase()),Ce+I[0].length):-1}function U(se,he,Ce){var I=p.exec(he.slice(Ce));return I?(se.w=x.get(I[0].toLowerCase()),Ce+I[0].length):-1}function B(se,he,Ce){var I=k.exec(he.slice(Ce));return I?(se.m=A.get(I[0].toLowerCase()),Ce+I[0].length):-1}function V(se,he,Ce){var I=b.exec(he.slice(Ce));return I?(se.m=g.get(I[0].toLowerCase()),Ce+I[0].length):-1}function W(se,he,Ce){return D(se,t,he,Ce)}function G(se,he,Ce){return D(se,r,he,Ce)}function ne(se,he,Ce){return D(se,n,he,Ce)}function te(se){return s[se.getDay()]}function oe(se){return i[se.getDay()]}function z(se){return u[se.getMonth()]}function ie(se){return l[se.getMonth()]}function K(se){return a[+(se.getHours()>=12)]}function C(se){return 1+~~(se.getMonth()/3)}function re(se){return s[se.getUTCDay()]}function F(se){return i[se.getUTCDay()]}function R(se){return u[se.getUTCMonth()]}function Y(se){return l[se.getUTCMonth()]}function fe(se){return a[+(se.getUTCHours()>=12)]}function ce(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var he=E(se+="",S);return he.toString=function(){return se},he},parse:function(se){var he=j(se+="",!1);return he.toString=function(){return se},he},utcFormat:function(se){var he=E(se+="",N);return he.toString=function(){return se},he},utcParse:function(se){var he=j(se+="",!0);return he.toString=function(){return se},he}}}var vj={"-":"",_:" ",0:"0"},Vr=/^\s*\d+/,HK=/^%/,qK=/[\\^$*+?|[\]().{}]/g;function Rt(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i[t.toLowerCase(),r]))}function KK(e,t,r){var n=Vr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function GK(e,t,r){var n=Vr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function XK(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function YK(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function ZK(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function gj(e,t,r){var n=Vr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function yj(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function JK(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function QK(e,t,r){var n=Vr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function eG(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function bj(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function tG(e,t,r){var n=Vr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function wj(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function rG(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function nG(e,t,r){var n=Vr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function aG(e,t,r){var n=Vr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function iG(e,t,r){var n=Vr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function sG(e,t,r){var n=HK.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function oG(e,t,r){var n=Vr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function lG(e,t,r){var n=Vr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function _j(e,t){return Rt(e.getDate(),t,2)}function cG(e,t){return Rt(e.getHours(),t,2)}function uG(e,t){return Rt(e.getHours()%12||12,t,2)}function fG(e,t){return Rt(1+kf.count(Ai(e),e),t,3)}function lD(e,t){return Rt(e.getMilliseconds(),t,3)}function dG(e,t){return lD(e,t)+"000"}function hG(e,t){return Rt(e.getMonth()+1,t,2)}function pG(e,t){return Rt(e.getMinutes(),t,2)}function mG(e,t){return Rt(e.getSeconds(),t,2)}function xG(e){var t=e.getDay();return t===0?7:t}function vG(e,t){return Rt(Bh.count(Ai(e)-1,e),t,2)}function cD(e){var t=e.getDay();return t>=4||t===0?bl(e):bl.ceil(e)}function gG(e,t){return e=cD(e),Rt(bl.count(Ai(e),e)+(Ai(e).getDay()===4),t,2)}function yG(e){return e.getDay()}function bG(e,t){return Rt(zd.count(Ai(e)-1,e),t,2)}function wG(e,t){return Rt(e.getFullYear()%100,t,2)}function _G(e,t){return e=cD(e),Rt(e.getFullYear()%100,t,2)}function SG(e,t){return Rt(e.getFullYear()%1e4,t,4)}function kG(e,t){var r=e.getDay();return e=r>=4||r===0?bl(e):bl.ceil(e),Rt(e.getFullYear()%1e4,t,4)}function TG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Rt(t/60|0,"0",2)+Rt(t%60,"0",2)}function Sj(e,t){return Rt(e.getUTCDate(),t,2)}function AG(e,t){return Rt(e.getUTCHours(),t,2)}function EG(e,t){return Rt(e.getUTCHours()%12||12,t,2)}function jG(e,t){return Rt(1+Lh.count(Ei(e),e),t,3)}function uD(e,t){return Rt(e.getUTCMilliseconds(),t,3)}function OG(e,t){return uD(e,t)+"000"}function NG(e,t){return Rt(e.getUTCMonth()+1,t,2)}function PG(e,t){return Rt(e.getUTCMinutes(),t,2)}function CG(e,t){return Rt(e.getUTCSeconds(),t,2)}function DG(e){var t=e.getUTCDay();return t===0?7:t}function FG(e,t){return Rt($h.count(Ei(e)-1,e),t,2)}function fD(e){var t=e.getUTCDay();return t>=4||t===0?wl(e):wl.ceil(e)}function MG(e,t){return e=fD(e),Rt(wl.count(Ei(e),e)+(Ei(e).getUTCDay()===4),t,2)}function IG(e){return e.getUTCDay()}function RG(e,t){return Rt(Wd.count(Ei(e)-1,e),t,2)}function LG(e,t){return Rt(e.getUTCFullYear()%100,t,2)}function BG(e,t){return e=fD(e),Rt(e.getUTCFullYear()%100,t,2)}function $G(e,t){return Rt(e.getUTCFullYear()%1e4,t,4)}function UG(e,t){var r=e.getUTCDay();return e=r>=4||r===0?wl(e):wl.ceil(e),Rt(e.getUTCFullYear()%1e4,t,4)}function zG(){return"+0000"}function kj(){return"%"}function Tj(e){return+e}function Aj(e){return Math.floor(+e/1e3)}var Zo,dD,hD;WG({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function WG(e){return Zo=WK(e),dD=Zo.format,Zo.parse,hD=Zo.utcFormat,Zo.utcParse,Zo}function HG(e){return new Date(e)}function qG(e){return e instanceof Date?+e:+new Date(+e)}function e2(e,t,r,n,a,i,s,l,u,f){var d=$w(),p=d.invert,x=d.domain,v=f(".%L"),w=f(":%S"),b=f("%I:%M"),g=f("%I %p"),k=f("%a %d"),A=f("%b %d"),S=f("%B"),N=f("%Y");function T(E){return(u(E)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>FV(e,i/n))},r.copy=function(){return vD(t).domain(e)},Pi.apply(r,arguments)}function zh(){var e=0,t=.5,r=1,n=1,a,i,s,l,u,f=kn,d,p=!1,x;function v(b){return isNaN(b=+b)?x:(b=.5+((b=+d(b))-i)*(n*br}return fy=e,fy}var dy,Nj;function ZG(){if(Nj)return dy;Nj=1;var e=wD(),t=YG(),r=Gl();function n(a){return a&&a.length?e(a,r,t):void 0}return dy=n,dy}var JG=ZG();const us=Gt(JG);var hy,Pj;function QG(){if(Pj)return hy;Pj=1;function e(t,r){return te.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=ne.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};rt.decimalPlaces=rt.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*nr;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};rt.dividedBy=rt.div=function(e){return Si(this,new this.constructor(e))};rt.dividedToIntegerBy=rt.idiv=function(e){var t=this,r=t.constructor;return Kt(Si(t,new r(e),0,1),r.precision)};rt.equals=rt.eq=function(e){return!this.cmp(e)};rt.exponent=function(){return kr(this)};rt.greaterThan=rt.gt=function(e){return this.cmp(e)>0};rt.greaterThanOrEqualTo=rt.gte=function(e){return this.cmp(e)>=0};rt.isInteger=rt.isint=function(){return this.e>this.d.length-2};rt.isNegative=rt.isneg=function(){return this.s<0};rt.isPositive=rt.ispos=function(){return this.s>0};rt.isZero=function(){return this.s===0};rt.lessThan=rt.lt=function(e){return this.cmp(e)<0};rt.lessThanOrEqualTo=rt.lte=function(e){return this.cmp(e)<1};rt.logarithm=rt.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Kn))throw Error(pa+"NaN");if(r.s<1)throw Error(pa+(r.s?"NaN":"-Infinity"));return r.eq(Kn)?new n(0):(or=!1,t=Si(Wu(r,i),Wu(e,i),i),or=!0,Kt(t,a))};rt.minus=rt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TD(t,e):SD(t,(e.s=-e.s,e))};rt.modulo=rt.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(pa+"NaN");return r.s?(or=!1,t=Si(r,e,0,1).times(e),or=!0,r.minus(t)):Kt(new n(r),a)};rt.naturalExponential=rt.exp=function(){return kD(this)};rt.naturalLogarithm=rt.ln=function(){return Wu(this)};rt.negated=rt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};rt.plus=rt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?SD(t,e):TD(t,(e.s=-e.s,e))};rt.precision=rt.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(no+e);if(t=kr(a)+1,n=a.d.length-1,r=n*nr+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};rt.squareRoot=rt.sqrt=function(){var e,t,r,n,a,i,s,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(pa+"NaN")}for(e=kr(l),or=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=Va(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Zl((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(a.toString()),r=u.precision,a=s=r+3;;)if(i=n,n=i.plus(Si(l,i,s+2)).times(.5),Va(i.d).slice(0,s)===(t=Va(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Kt(i,r+1,0),i.times(i).eq(l)){n=i;break}}else if(t!="9999")break;s+=4}return or=!0,Kt(n,r)};rt.times=rt.mul=function(e){var t,r,n,a,i,s,l,u,f,d=this,p=d.constructor,x=d.d,v=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,r=d.e+e.e,u=x.length,f=v.length,u=0;){for(t=0,a=u+n;a>n;)l=i[a]+v[n]*x[a-n-1]+t,i[a--]=l%Wr|0,t=l/Wr|0;i[a]=(i[a]+t)%Wr|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,or?Kt(e,p.precision):e};rt.toDecimalPlaces=rt.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ja(e,0,Yl),t===void 0?t=n.rounding:Ja(t,0,8),Kt(r,e+kr(r)+1,t))};rt.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=fo(n,!0):(Ja(e,0,Yl),t===void 0?t=a.rounding:Ja(t,0,8),n=Kt(new a(n),e+1,t),r=fo(n,!0,e+1)),r};rt.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?fo(a):(Ja(e,0,Yl),t===void 0?t=i.rounding:Ja(t,0,8),n=Kt(new i(a),e+kr(a)+1,t),r=fo(n.abs(),!1,e+kr(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};rt.toInteger=rt.toint=function(){var e=this,t=e.constructor;return Kt(new t(e),kr(e)+1,t.rounding)};rt.toNumber=function(){return+this};rt.toPower=rt.pow=function(e){var t,r,n,a,i,s,l=this,u=l.constructor,f=12,d=+(e=new u(e));if(!e.s)return new u(Kn);if(l=new u(l),!l.s){if(e.s<1)throw Error(pa+"Infinity");return l}if(l.eq(Kn))return l;if(n=u.precision,e.eq(Kn))return Kt(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,i=l.s,s){if((r=d<0?-d:d)<=_D){for(a=new u(Kn),t=Math.ceil(n/nr+4),or=!1;r%2&&(a=a.times(l),Rj(a.d,t)),r=Zl(r/2),r!==0;)l=l.times(l),Rj(l.d,t);return or=!0,e.s<0?new u(Kn).div(a):Kt(a,n)}}else if(i<0)throw Error(pa+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,or=!1,a=e.times(Wu(l,n+f)),or=!0,a=kD(a),a.s=i,a};rt.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=kr(a),n=fo(a,r<=i.toExpNeg||r>=i.toExpPos)):(Ja(e,1,Yl),t===void 0?t=i.rounding:Ja(t,0,8),a=Kt(new i(a),e,t),r=kr(a),n=fo(a,e<=r||r<=i.toExpNeg,e)),n};rt.toSignificantDigits=rt.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ja(e,1,Yl),t===void 0?t=n.rounding:Ja(t,0,8)),Kt(new n(r),e,t)};rt.toString=rt.valueOf=rt.val=rt.toJSON=rt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kr(e),r=e.constructor;return fo(e,t<=r.toExpNeg||t>=r.toExpPos)};function SD(e,t){var r,n,a,i,s,l,u,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),or?Kt(t,p):t;if(u=e.d,f=t.d,s=e.e,a=t.e,u=u.slice(),i=s-a,i){for(i<0?(n=u,i=-i,l=f.length):(n=f,a=s,l=u.length),s=Math.ceil(p/nr),l=s>l?s+1:l+1,i>l&&(i=l,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(l=u.length,i=f.length,l-i<0&&(i=l,n=f,f=u,u=n),r=0;i;)r=(u[--i]=u[i]+f[i]+r)/Wr|0,u[i]%=Wr;for(r&&(u.unshift(r),++a),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=a,or?Kt(t,p):t}function Ja(e,t,r){if(e!==~~e||er)throw Error(no+e)}function Va(e){var t,r,n,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;ts?1:-1;else for(l=u=0;la[l]?1:-1;break}return u}function r(n,a,i){for(var s=0;i--;)n[i]-=s,s=n[i]1;)n.shift()}return function(n,a,i,s){var l,u,f,d,p,x,v,w,b,g,k,A,S,N,T,E,j,D,P=n.constructor,H=n.s==a.s?1:-1,U=n.d,B=a.d;if(!n.s)return new P(n);if(!a.s)throw Error(pa+"Division by zero");for(u=n.e-a.e,j=B.length,T=U.length,v=new P(H),w=v.d=[],f=0;B[f]==(U[f]||0);)++f;if(B[f]>(U[f]||0)&&--u,i==null?A=i=P.precision:s?A=i+(kr(n)-kr(a))+1:A=i,A<0)return new P(0);if(A=A/nr+2|0,f=0,j==1)for(d=0,B=B[0],A++;(f1&&(B=e(B,d),U=e(U,d),j=B.length,T=U.length),N=j,b=U.slice(0,j),g=b.length;g=Wr/2&&++E;do d=0,l=t(B,b,j,g),l<0?(k=b[0],j!=g&&(k=k*Wr+(b[1]||0)),d=k/E|0,d>1?(d>=Wr&&(d=Wr-1),p=e(B,d),x=p.length,g=b.length,l=t(p,b,x,g),l==1&&(d--,r(p,j16)throw Error(n2+kr(e));if(!e.s)return new d(Kn);for(or=!1,l=p,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),f+=5;for(n=Math.log(qs(2,f))/Math.LN10*2+5|0,l+=n,r=a=i=new d(Kn),d.precision=l;;){if(a=Kt(a.times(e),l),r=r.times(++u),s=i.plus(Si(a,r,l)),Va(s.d).slice(0,l)===Va(i.d).slice(0,l)){for(;f--;)i=Kt(i.times(i),l);return d.precision=p,t==null?(or=!0,Kt(i,p)):i}i=s}}function kr(e){for(var t=e.e*nr,r=e.d[0];r>=10;r/=10)t++;return t}function gy(e,t,r){if(t>e.LN10.sd())throw or=!0,r&&(e.precision=r),Error(pa+"LN10 precision limit exceeded");return Kt(new e(e.LN10),t)}function is(e){for(var t="";e--;)t+="0";return t}function Wu(e,t){var r,n,a,i,s,l,u,f,d,p=1,x=10,v=e,w=v.d,b=v.constructor,g=b.precision;if(v.s<1)throw Error(pa+(v.s?"NaN":"-Infinity"));if(v.eq(Kn))return new b(0);if(t==null?(or=!1,f=g):f=t,v.eq(10))return t==null&&(or=!0),gy(b,f);if(f+=x,b.precision=f,r=Va(w),n=r.charAt(0),i=kr(v),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(e),r=Va(v.d),n=r.charAt(0),p++;i=kr(v),n>1?(v=new b("0."+r),i++):v=new b(n+"."+r.slice(1))}else return u=gy(b,f+2,g).times(i+""),v=Wu(new b(n+"."+r.slice(1)),f-x).plus(u),b.precision=g,t==null?(or=!0,Kt(v,g)):v;for(l=s=v=Si(v.minus(Kn),v.plus(Kn),f),d=Kt(v.times(v),f),a=3;;){if(s=Kt(s.times(d),f),u=l.plus(Si(s,new b(a),f)),Va(u.d).slice(0,f)===Va(l.d).slice(0,f))return l=l.times(2),i!==0&&(l=l.plus(gy(b,f+2,g).times(i+""))),l=Si(l,new b(p),f),b.precision=g,t==null?(or=!0,Kt(l,g)):l;l=u,a+=2}}function Ij(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Zl(r/nr),e.d=[],n=(r+1)%nr,r<0&&(n+=nr),nHd||e.e<-Hd))throw Error(n2+r)}else e.s=0,e.e=0,e.d=[0];return e}function Kt(e,t,r){var n,a,i,s,l,u,f,d,p=e.d;for(s=1,i=p[0];i>=10;i/=10)s++;if(n=t-s,n<0)n+=nr,a=t,f=p[d=0];else{if(d=Math.ceil((n+1)/nr),i=p.length,d>=i)return e;for(f=i=p[d],s=1;i>=10;i/=10)s++;n%=nr,a=n-nr+s}if(r!==void 0&&(i=qs(10,s-a-1),l=f/i%10|0,u=t<0||p[d+1]!==void 0||f%i,u=r<4?(l||u)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||u||r==6&&(n>0?a>0?f/qs(10,s-a):0:p[d-1])%10&1||r==(e.s<0?8:7))),t<1||!p[0])return u?(i=kr(e),p.length=1,t=t-i-1,p[0]=qs(10,(nr-t%nr)%nr),e.e=Zl(-t/nr)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(n==0?(p.length=d,i=1,d--):(p.length=d+1,i=qs(10,nr-n),p[d]=a>0?(f/qs(10,s-a)%qs(10,a)|0)*i:0),u)for(;;)if(d==0){(p[0]+=i)==Wr&&(p[0]=1,++e.e);break}else{if(p[d]+=i,p[d]!=Wr)break;p[d--]=0,i=1}for(n=p.length;p[--n]===0;)p.pop();if(or&&(e.e>Hd||e.e<-Hd))throw Error(n2+kr(e));return e}function TD(e,t){var r,n,a,i,s,l,u,f,d,p,x=e.constructor,v=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),or?Kt(t,v):t;if(u=e.d,p=t.d,n=t.e,f=e.e,u=u.slice(),s=f-n,s){for(d=s<0,d?(r=u,s=-s,l=p.length):(r=p,n=f,l=u.length),a=Math.max(Math.ceil(v/nr),l)+2,s>a&&(s=a,r.length=1),r.reverse(),a=s;a--;)r.push(0);r.reverse()}else{for(a=u.length,l=p.length,d=a0;--a)u[l++]=0;for(a=p.length;a>s;){if(u[--a]0?i=i.charAt(0)+"."+i.slice(1)+is(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+is(-a-1)+i,r&&(n=r-s)>0&&(i+=is(n))):a>=s?(i+=is(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+is(n))):((n=a+1)0&&(a+1===s&&(i+="."),i+=is(n))),e.s<0?"-"+i:i}function Rj(e,t){if(e.length>t)return e.length=t,!0}function AD(e){var t,r,n;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(no+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return Ij(s,i.toString())}else if(typeof i!="string")throw Error(no+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,cX.test(i))Ij(s,i);else throw Error(no+i)}if(a.prototype=rt,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=AD,a.config=a.set=uX,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(no+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(no+r+": "+n);return this}var a2=AD(lX);Kn=new a2(1);const Ht=a2;function fX(e){return mX(e)||pX(e)||hX(e)||dX()}function dX(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hX(e,t){if(e){if(typeof e=="string")return W1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W1(e,t)}}function pX(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function mX(e){if(Array.isArray(e))return W1(e)}function W1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,a):e(t-s,Lj(function(){for(var l=arguments.length,u=new Array(l),f=0;fe.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var s=e[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){a=!0,i=u}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw i}}return r}}function NX(e){if(Array.isArray(e))return e}function PD(e){var t=Hu(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function CD(e,t,r){if(e.lte(0))return new Ht(0);var n=qh.getDigitCount(e.toNumber()),a=new Ht(10).pow(n),i=e.div(a),s=n!==1?.05:.1,l=new Ht(Math.ceil(i.div(s).toNumber())).add(r).mul(s),u=l.mul(a);return t?u:new Ht(Math.ceil(u))}function PX(e,t,r){var n=1,a=new Ht(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Ht(10).pow(qh.getDigitCount(e)-1),a=new Ht(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Ht(Math.floor(e)))}else e===0?a=new Ht(Math.floor((t-1)/2)):r||(a=new Ht(Math.floor(e)));var s=Math.floor((t-1)/2),l=yX(gX(function(u){return a.add(new Ht(u-s).mul(n)).toNumber()}),H1);return l(0,t)}function DD(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ht(0),tickMin:new Ht(0),tickMax:new Ht(0)};var i=CD(new Ht(t).sub(e).div(r-1),n,a),s;e<=0&&t>=0?s=new Ht(0):(s=new Ht(e).add(t).div(2),s=s.sub(new Ht(s).mod(i)));var l=Math.ceil(s.sub(e).div(i).toNumber()),u=Math.ceil(new Ht(t).sub(s).div(i).toNumber()),f=l+u+1;return f>r?DD(e,t,r,n,a+1):(f0?u+(r-f):u,l=t>0?l:l+(r-f)),{step:i,tickMin:s.sub(new Ht(l).mul(i)),tickMax:s.add(new Ht(u).mul(i))})}function CX(e){var t=Hu(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(a,2),l=PD([r,n]),u=Hu(l,2),f=u[0],d=u[1];if(f===-1/0||d===1/0){var p=d===1/0?[f].concat(V1(H1(0,a-1).map(function(){return 1/0}))):[].concat(V1(H1(0,a-1).map(function(){return-1/0})),[d]);return r>n?q1(p):p}if(f===d)return PX(f,a,i);var x=DD(f,d,s,i),v=x.step,w=x.tickMin,b=x.tickMax,g=qh.rangeStep(w,b.add(new Ht(.1).mul(v)),v);return r>n?q1(g):g}function DX(e,t){var r=Hu(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=PD([n,a]),l=Hu(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0)return[n,a];if(u===f)return[u];var d=Math.max(t,2),p=CD(new Ht(f).sub(u).div(d-1),i,0),x=[].concat(V1(qh.rangeStep(new Ht(u),new Ht(f).sub(new Ht(.99).mul(p)),p)),[f]);return n>a?q1(x):x}var FX=OD(CX),MX=OD(DX),IX="Invariant failed";function ho(e,t){throw new Error(IX)}var RX=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _l(e){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function qd(){return qd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function HX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function qX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VX(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var u=i.range,f=0;f0?a[f-1].coordinate:a[l-1].coordinate,p=a[f].coordinate,x=f>=l-1?a[0].coordinate:a[f+1].coordinate,v=void 0;if(Ca(p-d)!==Ca(x-p)){var w=[];if(Ca(x-p)===Ca(u[1]-u[0])){v=x;var b=p+u[1]-u[0];w[0]=Math.min(b,(b+d)/2),w[1]=Math.max(b,(b+d)/2)}else{v=d;var g=x+u[1]-u[0];w[0]=Math.min(p,(g+p)/2),w[1]=Math.max(p,(g+p)/2)}var k=[Math.min(p,(v+p)/2),Math.max(p,(v+p)/2)];if(t>k[0]&&t<=k[1]||t>=w[0]&&t<=w[1]){s=a[f].index;break}}else{var A=Math.min(d,x),S=Math.max(d,x);if(t>(A+p)/2&&t<=(S+p)/2){s=a[f].index;break}}}else for(var N=0;N0&&N(n[N].coordinate+n[N-1].coordinate)/2&&t<=(n[N].coordinate+n[N+1].coordinate)/2||N===l-1&&t>(n[N].coordinate+n[N-1].coordinate)/2){s=n[N].index;break}return s},i2=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?dr(dr({},t.type.defaultProps),t.props):t.props,s=i.stroke,l=i.fill,u;switch(a){case"Line":u=s;break;case"Area":case"Radar":u=s&&s!=="none"?s:l;break;default:u=l;break}return u},cY=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var s={},l=Object.keys(i),u=0,f=l.length;u=0});if(k&&k.length){var A=k[0].type.defaultProps,S=A!==void 0?dr(dr({},A),k[0].props):k[0].props,N=S.barSize,T=S[g];s[T]||(s[T]=[]);var E=yt(N)?r:N;s[T].push({item:k[0],stackList:k.slice(1),barSize:yt(E)?void 0:co(E,n,0)})}}return s},uY=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,s=i===void 0?[]:i,l=t.maxBarSize,u=s.length;if(u<1)return null;var f=co(r,a,0,!0),d,p=[];if(s[0].barSize===+s[0].barSize){var x=!1,v=a/u,w=s.reduce(function(N,T){return N+T.barSize||0},0);w+=(u-1)*f,w>=a&&(w-=(u-1)*f,f=0),w>=a&&v>0&&(x=!0,v*=.9,w=u*v);var b=(a-w)/2>>0,g={offset:b-f,size:0};d=s.reduce(function(N,T){var E={item:T.item,position:{offset:g.offset+g.size+f,size:x?v:T.barSize}},j=[].concat(Uj(N),[E]);return g=j[j.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(D){j.push({item:D,position:g})}),j},p)}else{var k=co(n,a,0,!0);a-2*k-(u-1)*f<=0&&(f=0);var A=(a-2*k-(u-1)*f)/u;A>1&&(A>>=0);var S=l===+l?Math.min(A,l):A;d=s.reduce(function(N,T,E){var j=[].concat(Uj(N),[{item:T.item,position:{offset:k+(A+f)*E+(A-S)/2,size:S}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(D){j.push({item:D,position:j[j.length-1].position})}),j},p)}return d},fY=function(t,r,n,a){var i=n.children,s=n.width,l=n.margin,u=s-(l.left||0)-(l.right||0),f=RD({children:i,legendWidth:u});if(f){var d=a||{},p=d.width,x=d.height,v=f.align,w=f.verticalAlign,b=f.layout;if((b==="vertical"||b==="horizontal"&&w==="middle")&&v!=="center"&&Ve(t[v]))return dr(dr({},t),{},fl({},v,t[v]+(p||0)));if((b==="horizontal"||b==="vertical"&&v==="center")&&w!=="middle"&&Ve(t[w]))return dr(dr({},t),{},fl({},w,t[w]+(x||0)))}return t},dY=function(t,r,n){return yt(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},LD=function(t,r,n,a,i){var s=r.props.children,l=Mn(s,Jl).filter(function(f){return dY(a,i,f.props.direction)});if(l&&l.length){var u=l.map(function(f){return f.props.dataKey});return t.reduce(function(f,d){var p=Mr(d,n);if(yt(p))return f;var x=Array.isArray(p)?[Wh(p),us(p)]:[p,p],v=u.reduce(function(w,b){var g=Mr(d,b,0),k=x[0]-Math.abs(Array.isArray(g)?g[0]:g),A=x[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(k,w[0]),Math.max(A,w[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},hY=function(t,r,n,a,i){var s=r.map(function(l){return LD(t,l,n,i,a)}).filter(function(l){return!yt(l)});return s&&s.length?s.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},BD=function(t,r,n,a,i){var s=r.map(function(u){var f=u.props.dataKey;return n==="number"&&f&&LD(t,u,f,a)||pu(t,f,n,i)});if(n==="number")return s.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);var l={};return s.reduce(function(u,f){for(var d=0,p=f.length;d=2?Ca(l[0]-l[1])*2*f:f,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(p){var x=i?i.indexOf(p):p;return{coordinate:a(x)+f,value:p,offset:f}});return d.filter(function(p){return!Kl(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,x){return{coordinate:a(p)+f,value:p,index:x,offset:f}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(p){return{coordinate:a(p)+f,value:p,offset:f}}):a.domain().map(function(p,x){return{coordinate:a(p)+f,value:i?i[p]:p,index:x,offset:f}})},yy=new WeakMap,K0=function(t,r){if(typeof r!="function")return t;yy.has(t)||yy.set(t,new WeakMap);var n=yy.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},pY=function(t,r,n){var a=t.scale,i=t.type,s=t.layout,l=t.axisType;if(a==="auto")return s==="radial"&&l==="radiusAxis"?{scale:Lu(),realScaleType:"band"}:s==="radial"&&l==="angleAxis"?{scale:$d(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:hu(),realScaleType:"point"}:i==="category"?{scale:Lu(),realScaleType:"band"}:{scale:$d(),realScaleType:"linear"};if(lo(a)){var u="scale".concat(Oh(a));return{scale:(Ej[u]||hu)(),realScaleType:Ej[u]?u:"point"}}return St(a)?{scale:a}:{scale:hu(),realScaleType:"point"}},Wj=1e-4,mY=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-Wj,s=Math.max(a[0],a[1])+Wj,l=t(r[0]),u=t(r[n-1]);(ls||us)&&t.domain([r[0],r[n-1]])}},xY=function(t,r){if(!t)return null;for(var n=0,a=t.length;na)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]=0?(t[l][n][0]=i,t[l][n][1]=i+u,i=t[l][n][1]):(t[l][n][0]=s,t[l][n][1]=s+u,s=t[l][n][1])}},yY=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},bY={sign:gY,expand:nW,none:pl,silhouette:aW,wiggle:iW,positive:yY},wY=function(t,r,n){var a=r.map(function(l){return l.props.dataKey}),i=bY[n],s=rW().keys(a).value(function(l,u){return+Mr(l,u,0)}).order(T1).offset(i);return s(t)},_Y=function(t,r,n,a,i,s){if(!t)return null;var l=s?r.reverse():r,u={},f=l.reduce(function(p,x){var v,w=(v=x.type)!==null&&v!==void 0&&v.defaultProps?dr(dr({},x.type.defaultProps),x.props):x.props,b=w.stackId,g=w.hide;if(g)return p;var k=w[n],A=p[k]||{hasStack:!1,stackGroups:{}};if(Dr(b)){var S=A.stackGroups[b]||{numericAxisId:n,cateAxisId:a,items:[]};S.items.push(x),A.hasStack=!0,A.stackGroups[b]=S}else A.stackGroups[_o("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[x]};return dr(dr({},p),{},fl({},k,A))},u),d={};return Object.keys(f).reduce(function(p,x){var v=f[x];if(v.hasStack){var w={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(b,g){var k=v.stackGroups[g];return dr(dr({},b),{},fl({},g,{numericAxisId:n,cateAxisId:a,items:k.items,stackedData:wY(t,k.items,i)}))},w)}return dr(dr({},p),{},fl({},x,v))},d)},SY=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,s=r.originalDomain,l=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(i&&a==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var f=t.domain();if(!f.length)return null;var d=FX(f,i,l);return t.domain([Wh(d),us(d)]),{niceTicks:d}}if(i&&a==="number"){var p=t.domain(),x=MX(p,i,l);return{niceTicks:x}}return null};function Sl(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!yt(a[t.dataKey])){var l=bd(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var u=Mr(a,yt(s)?t.dataKey:s);return yt(u)?null:t.scale(u)}var Hj=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,s=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+a:null;var u=Mr(s,r.dataKey,r.domain[l]);return yt(u)?null:r.scale(u)-i/2+a},kY=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},TY=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?dr(dr({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Dr(i)){var s=r[i];if(s){var l=s.items.indexOf(t);return l>=0?s.stackedData[l]:null}}return null},AY=function(t){return t.reduce(function(r,n){return[Wh(n.concat([r[0]]).filter(Ve)),us(n.concat([r[1]]).filter(Ve))]},[1/0,-1/0])},zD=function(t,r,n){return Object.keys(t).reduce(function(a,i){var s=t[i],l=s.stackedData,u=l.reduce(function(f,d){var p=AY(d.slice(r,n+1));return[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(u[0],a[0]),Math.max(u[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},qj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Y1=function(t,r,n){if(St(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Ve(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(qj.test(t[0])){var i=+qj.exec(t[0])[1];a[0]=r[0]-i}else St(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Ve(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Vj.test(t[1])){var s=+Vj.exec(t[1])[1];a[1]=r[1]+s}else St(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Kd=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Cw(r,function(p){return p.coordinate}),s=1/0,l=1,u=i.length;ls&&(f=2*Math.PI-f),{radius:l,angle:NY(f),angleInRadian:f}},DY=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),s=Math.min(a,i);return{startAngle:r-s*360,endAngle:n-s*360}},FY=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),s=Math.floor(a/360),l=Math.min(i,s);return t+l*360},Yj=function(t,r){var n=t.x,a=t.y,i=CY({x:n,y:a},r),s=i.radius,l=i.angle,u=r.innerRadius,f=r.outerRadius;if(sf)return!1;if(s===0)return!0;var d=DY(r),p=d.startAngle,x=d.endAngle,v=l,w;if(p<=x){for(;v>x;)v-=360;for(;v=p&&v<=x}else{for(;v>p;)v-=360;for(;v=x&&v<=p}return w?Xj(Xj({},r),{},{radius:s,angle:FY(v,r)}):null};function Gu(e){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}var MY=["offset"];function IY(e){return $Y(e)||BY(e)||LY(e)||RY()}function RY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LY(e,t){if(e){if(typeof e=="string")return Z1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z1(e,t)}}function BY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $Y(e){if(Array.isArray(e))return Z1(e)}function Z1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Zj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t=0?1:-1,S,N;a==="insideStart"?(S=v+A*s,N=b):a==="insideEnd"?(S=w-A*s,N=!b):a==="end"&&(S=w+A*s,N=b),N=k<=0?N:!N;var T=Qr(f,d,g,S),E=Qr(f,d,g,S+(N?1:-1)*359),j="M".concat(T.x,",").concat(T.y,` + A`).concat(g,",").concat(g,",0,1,").concat(N?0:1,`, + `).concat(E.x,",").concat(E.y),D=yt(t.id)?_o("recharts-radial-line-"):t.id;return ue.createElement("text",Xu({},n,{dominantBaseline:"central",className:Ot("recharts-radial-bar-label",l)}),ue.createElement("defs",null,ue.createElement("path",{id:D,d:j})),ue.createElement("textPath",{xlinkHref:"#".concat(D)},r))},XY=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,s=i.cx,l=i.cy,u=i.innerRadius,f=i.outerRadius,d=i.startAngle,p=i.endAngle,x=(d+p)/2;if(a==="outside"){var v=Qr(s,l,f+n,x),w=v.x,b=v.y;return{x:w,y:b,textAnchor:w>=s?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"end"};var g=(u+f)/2,k=Qr(s,l,g,x),A=k.x,S=k.y;return{x:A,y:S,textAnchor:"middle",verticalAnchor:"middle"}},YY=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,s=r,l=s.x,u=s.y,f=s.width,d=s.height,p=d>=0?1:-1,x=p*a,v=p>0?"end":"start",w=p>0?"start":"end",b=f>=0?1:-1,g=b*a,k=b>0?"end":"start",A=b>0?"start":"end";if(i==="top"){var S={x:l+f/2,y:u-p*a,textAnchor:"middle",verticalAnchor:v};return Nr(Nr({},S),n?{height:Math.max(u-n.y,0),width:f}:{})}if(i==="bottom"){var N={x:l+f/2,y:u+d+x,textAnchor:"middle",verticalAnchor:w};return Nr(Nr({},N),n?{height:Math.max(n.y+n.height-(u+d),0),width:f}:{})}if(i==="left"){var T={x:l-g,y:u+d/2,textAnchor:k,verticalAnchor:"middle"};return Nr(Nr({},T),n?{width:Math.max(T.x-n.x,0),height:d}:{})}if(i==="right"){var E={x:l+f+g,y:u+d/2,textAnchor:A,verticalAnchor:"middle"};return Nr(Nr({},E),n?{width:Math.max(n.x+n.width-E.x,0),height:d}:{})}var j=n?{width:f,height:d}:{};return i==="insideLeft"?Nr({x:l+g,y:u+d/2,textAnchor:A,verticalAnchor:"middle"},j):i==="insideRight"?Nr({x:l+f-g,y:u+d/2,textAnchor:k,verticalAnchor:"middle"},j):i==="insideTop"?Nr({x:l+f/2,y:u+x,textAnchor:"middle",verticalAnchor:w},j):i==="insideBottom"?Nr({x:l+f/2,y:u+d-x,textAnchor:"middle",verticalAnchor:v},j):i==="insideTopLeft"?Nr({x:l+g,y:u+x,textAnchor:A,verticalAnchor:w},j):i==="insideTopRight"?Nr({x:l+f-g,y:u+x,textAnchor:k,verticalAnchor:w},j):i==="insideBottomLeft"?Nr({x:l+g,y:u+d-x,textAnchor:A,verticalAnchor:v},j):i==="insideBottomRight"?Nr({x:l+f-g,y:u+d-x,textAnchor:k,verticalAnchor:v},j):Vl(i)&&(Ve(i.x)||Gs(i.x))&&(Ve(i.y)||Gs(i.y))?Nr({x:l+co(i.x,f),y:u+co(i.y,d),textAnchor:"end",verticalAnchor:"end"},j):Nr({x:l+f/2,y:u+d/2,textAnchor:"middle",verticalAnchor:"middle"},j)},ZY=function(t){return"cx"in t&&Ve(t.cx)};function un(e){var t=e.offset,r=t===void 0?5:t,n=UY(e,MY),a=Nr({offset:r},n),i=a.viewBox,s=a.position,l=a.value,u=a.children,f=a.content,d=a.className,p=d===void 0?"":d,x=a.textBreakAll;if(!i||yt(l)&&yt(u)&&!Q.isValidElement(f)&&!St(f))return null;if(Q.isValidElement(f))return Q.cloneElement(f,a);var v;if(St(f)){if(v=Q.createElement(f,a),Q.isValidElement(v))return v}else v=VY(a);var w=ZY(i),b=wt(a,!0);if(w&&(s==="insideStart"||s==="insideEnd"||s==="end"))return GY(a,v,b);var g=w?XY(a):YY(a);return ue.createElement(Cd,Xu({className:Ot("recharts-label",p)},b,g,{breakAll:x}),v)}un.displayName="Label";var HD=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,s=t.endAngle,l=t.r,u=t.radius,f=t.innerRadius,d=t.outerRadius,p=t.x,x=t.y,v=t.top,w=t.left,b=t.width,g=t.height,k=t.clockWise,A=t.labelViewBox;if(A)return A;if(Ve(b)&&Ve(g)){if(Ve(p)&&Ve(x))return{x:p,y:x,width:b,height:g};if(Ve(v)&&Ve(w))return{x:v,y:w,width:b,height:g}}return Ve(p)&&Ve(x)?{x:p,y:x,width:0,height:0}:Ve(r)&&Ve(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:s||a||0,innerRadius:f||0,outerRadius:d||u||l||0,clockWise:k}:t.viewBox?t.viewBox:{}},JY=function(t,r){return t?t===!0?ue.createElement(un,{key:"label-implicit",viewBox:r}):Dr(t)?ue.createElement(un,{key:"label-implicit",viewBox:r,value:t}):Q.isValidElement(t)?t.type===un?Q.cloneElement(t,{key:"label-implicit",viewBox:r}):ue.createElement(un,{key:"label-implicit",content:t,viewBox:r}):St(t)?ue.createElement(un,{key:"label-implicit",content:t,viewBox:r}):Vl(t)?ue.createElement(un,Xu({viewBox:r},t,{key:"label-implicit"})):null:null},QY=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=HD(t),s=Mn(a,un).map(function(u,f){return Q.cloneElement(u,{viewBox:r||i,key:"label-".concat(f)})});if(!n)return s;var l=JY(t.label,r||i);return[l].concat(IY(s))};un.parseViewBox=HD;un.renderCallByParent=QY;var by,Jj;function eZ(){if(Jj)return by;Jj=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return by=e,by}var tZ=eZ();const rZ=Gt(tZ);function Yu(e){"@babel/helpers - typeof";return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}var nZ=["valueAccessor"],aZ=["data","dataKey","clockWise","id","textBreakAll"];function iZ(e){return cZ(e)||lZ(e)||oZ(e)||sZ()}function sZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oZ(e,t){if(e){if(typeof e=="string")return J1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J1(e,t)}}function lZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cZ(e){if(Array.isArray(e))return J1(e)}function J1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var pZ=function(t){return Array.isArray(t.value)?rZ(t.value):t.value};function lt(e){var t=e.valueAccessor,r=t===void 0?pZ:t,n=tO(e,nZ),a=n.data,i=n.dataKey,s=n.clockWise,l=n.id,u=n.textBreakAll,f=tO(n,aZ);return!a||!a.length?null:ue.createElement($t,{className:"recharts-label-list"},a.map(function(d,p){var x=yt(i)?r(d,p):Mr(d&&d.payload,i),v=yt(l)?{}:{id:"".concat(l,"-").concat(p)};return ue.createElement(un,Xd({},wt(d,!0),f,v,{parentViewBox:d.parentViewBox,value:x,textBreakAll:u,viewBox:un.parseViewBox(yt(s)?d:eO(eO({},d),{},{clockWise:s})),key:"label-".concat(p),index:p}))}))}lt.displayName="LabelList";function mZ(e,t){return e?e===!0?ue.createElement(lt,{key:"labelList-implicit",data:t}):ue.isValidElement(e)||St(e)?ue.createElement(lt,{key:"labelList-implicit",data:t,content:e}):Vl(e)?ue.createElement(lt,Xd({data:t},e,{key:"labelList-implicit"})):null:null}function xZ(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Mn(n,lt).map(function(s,l){return Q.cloneElement(s,{data:t,key:"labelList-".concat(l)})});if(!r)return a;var i=mZ(e.label,t);return[i].concat(iZ(a))}lt.renderCallByParent=xZ;function Zu(e){"@babel/helpers - typeof";return Zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(s>f),`, + `).concat(p.x,",").concat(p.y,` + `);if(a>0){var v=Qr(r,n,a,s),w=Qr(r,n,a,f);x+="L ".concat(w.x,",").concat(w.y,` + A `).concat(a,",").concat(a,`,0, + `).concat(+(Math.abs(u)>180),",").concat(+(s<=f),`, + `).concat(v.x,",").concat(v.y," Z")}else x+="L ".concat(r,",").concat(n," Z");return x},wZ=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,f=t.startAngle,d=t.endAngle,p=Ca(d-f),x=G0({cx:r,cy:n,radius:i,angle:f,sign:p,cornerRadius:s,cornerIsExternal:u}),v=x.circleTangency,w=x.lineTangency,b=x.theta,g=G0({cx:r,cy:n,radius:i,angle:d,sign:-p,cornerRadius:s,cornerIsExternal:u}),k=g.circleTangency,A=g.lineTangency,S=g.theta,N=u?Math.abs(f-d):Math.abs(f-d)-b-S;if(N<0)return l?"M ".concat(w.x,",").concat(w.y,` + a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 + a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 + `):qD({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:f,endAngle:d});var T="M ".concat(w.x,",").concat(w.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(v.x,",").concat(v.y,` + A`).concat(i,",").concat(i,",0,").concat(+(N>180),",").concat(+(p<0),",").concat(k.x,",").concat(k.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(A.x,",").concat(A.y,` + `);if(a>0){var E=G0({cx:r,cy:n,radius:a,angle:f,sign:p,isExternal:!0,cornerRadius:s,cornerIsExternal:u}),j=E.circleTangency,D=E.lineTangency,P=E.theta,H=G0({cx:r,cy:n,radius:a,angle:d,sign:-p,isExternal:!0,cornerRadius:s,cornerIsExternal:u}),U=H.circleTangency,B=H.lineTangency,V=H.theta,W=u?Math.abs(f-d):Math.abs(f-d)-P-V;if(W<0&&s===0)return"".concat(T,"L").concat(r,",").concat(n,"Z");T+="L".concat(B.x,",").concat(B.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(U.x,",").concat(U.y,` + A`).concat(a,",").concat(a,",0,").concat(+(W>180),",").concat(+(p>0),",").concat(j.x,",").concat(j.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(D.x,",").concat(D.y,"Z")}else T+="L".concat(r,",").concat(n,"Z");return T},_Z={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},VD=function(t){var r=nO(nO({},_Z),t),n=r.cx,a=r.cy,i=r.innerRadius,s=r.outerRadius,l=r.cornerRadius,u=r.forceCornerRadius,f=r.cornerIsExternal,d=r.startAngle,p=r.endAngle,x=r.className;if(s0&&Math.abs(d-p)<360?g=wZ({cx:n,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(b,w/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:d,endAngle:p}):g=qD({cx:n,cy:a,innerRadius:i,outerRadius:s,startAngle:d,endAngle:p}),ue.createElement("path",Q1({},wt(r,!0),{className:v,d:g,role:"img"}))};function Ju(e){"@babel/helpers - typeof";return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;tFZ.call(e,t));function To(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const RZ="__v",LZ="__o",BZ="_owner",{getOwnPropertyDescriptor:fO,keys:dO}=Object;function $Z(e,t){return e.byteLength===t.byteLength&&Yd(new Uint8Array(e),new Uint8Array(t))}function UZ(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function zZ(e,t){return e.byteLength===t.byteLength&&Yd(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function WZ(e,t){return To(e.getTime(),t.getTime())}function HZ(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function qZ(e,t){return e===t}function hO(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const a=new Array(n),i=e.entries();let s,l,u=0;for(;(s=i.next())&&!s.done;){const f=t.entries();let d=!1,p=0;for(;(l=f.next())&&!l.done;){if(a[p]){p++;continue}const x=s.value,v=l.value;if(r.equals(x[0],v[0],u,p,e,t,r)&&r.equals(x[1],v[1],x[0],v[0],e,t,r)){d=a[p]=!0;break}p++}if(!d)return!1;u++}return!0}const VZ=To;function KZ(e,t,r){const n=dO(e);let a=n.length;if(dO(t).length!==a)return!1;for(;a-- >0;)if(!KD(e,t,r,n[a]))return!1;return!0}function Hc(e,t,r){const n=uO(e);let a=n.length;if(uO(t).length!==a)return!1;let i,s,l;for(;a-- >0;)if(i=n[a],!KD(e,t,r,i)||(s=fO(e,i),l=fO(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function GZ(e,t){return To(e.valueOf(),t.valueOf())}function XZ(e,t){return e.source===t.source&&e.flags===t.flags}function pO(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const a=new Array(n),i=e.values();let s,l;for(;(s=i.next())&&!s.done;){const u=t.values();let f=!1,d=0;for(;(l=u.next())&&!l.done;){if(!a[d]&&r.equals(s.value,l.value,s.value,l.value,e,t,r)){f=a[d]=!0;break}d++}if(!f)return!1}return!0}function Yd(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function YZ(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function KD(e,t,r,n){return(n===BZ||n===LZ||n===RZ)&&(e.$$typeof||t.$$typeof)?!0:IZ(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const ZZ="[object ArrayBuffer]",JZ="[object Arguments]",QZ="[object Boolean]",eJ="[object DataView]",tJ="[object Date]",rJ="[object Error]",nJ="[object Map]",aJ="[object Number]",iJ="[object Object]",sJ="[object RegExp]",oJ="[object Set]",lJ="[object String]",cJ={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},uJ="[object URL]",fJ=Object.prototype.toString;function dJ({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:f,areRegExpsEqual:d,areSetsEqual:p,areTypedArraysEqual:x,areUrlsEqual:v,unknownTagComparators:w}){return function(g,k,A){if(g===k)return!0;if(g==null||k==null)return!1;const S=typeof g;if(S!==typeof k)return!1;if(S!=="object")return S==="number"?l(g,k,A):S==="function"?i(g,k,A):!1;const N=g.constructor;if(N!==k.constructor)return!1;if(N===Object)return u(g,k,A);if(Array.isArray(g))return t(g,k,A);if(N===Date)return n(g,k,A);if(N===RegExp)return d(g,k,A);if(N===Map)return s(g,k,A);if(N===Set)return p(g,k,A);const T=fJ.call(g);if(T===tJ)return n(g,k,A);if(T===sJ)return d(g,k,A);if(T===nJ)return s(g,k,A);if(T===oJ)return p(g,k,A);if(T===iJ)return typeof g.then!="function"&&typeof k.then!="function"&&u(g,k,A);if(T===uJ)return v(g,k,A);if(T===rJ)return a(g,k,A);if(T===JZ)return u(g,k,A);if(cJ[T])return x(g,k,A);if(T===ZZ)return e(g,k,A);if(T===eJ)return r(g,k,A);if(T===QZ||T===aJ||T===lJ)return f(g,k,A);if(w){let E=w[T];if(!E){const j=MZ(g);j&&(E=w[j])}if(E)return E(g,k,A)}return!1}}function hJ({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:$Z,areArraysEqual:r?Hc:UZ,areDataViewsEqual:zZ,areDatesEqual:WZ,areErrorsEqual:HZ,areFunctionsEqual:qZ,areMapsEqual:r?ky(hO,Hc):hO,areNumbersEqual:VZ,areObjectsEqual:r?Hc:KZ,arePrimitiveWrappersEqual:GZ,areRegExpsEqual:XZ,areSetsEqual:r?ky(pO,Hc):pO,areTypedArraysEqual:r?ky(Yd,Hc):Yd,areUrlsEqual:YZ,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const a=Y0(n.areArraysEqual),i=Y0(n.areMapsEqual),s=Y0(n.areObjectsEqual),l=Y0(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return n}function pJ(e){return function(t,r,n,a,i,s,l){return e(t,r,l)}}function mJ({circular:e,comparator:t,createState:r,equals:n,strict:a}){if(r)return function(l,u){const{cache:f=e?new WeakMap:void 0,meta:d}=r();return t(l,u,{cache:f,equals:n,meta:d,strict:a})};if(e)return function(l,u){return t(l,u,{cache:new WeakMap,equals:n,meta:void 0,strict:a})};const i={cache:void 0,equals:n,meta:void 0,strict:a};return function(l,u){return t(l,u,i)}}const xJ=As();As({strict:!0});As({circular:!0});As({circular:!0,strict:!0});As({createInternalComparator:()=>To});As({strict:!0,createInternalComparator:()=>To});As({circular:!0,createInternalComparator:()=>To});As({circular:!0,createInternalComparator:()=>To,strict:!0});function As(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:a=!1}=e,i=hJ(e),s=dJ(i),l=r?r(s):pJ(s);return mJ({circular:t,comparator:s,createState:n,equals:l,strict:a})}function vJ(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function mO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):vJ(a)};requestAnimationFrame(n)}function tb(e){"@babel/helpers - typeof";return tb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tb(e)}function gJ(e){return _J(e)||wJ(e)||bJ(e)||yJ()}function yJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bJ(e,t){if(e){if(typeof e=="string")return xO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xO(e,t)}}function xO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:k<0?0:k},b=function(k){for(var A=k>1?1:k,S=A,N=0;N<8;++N){var T=p(S)-A,E=v(S);if(Math.abs(T-A)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,s=t.dt,l=s===void 0?17:s,u=function(d,p,x){var v=-(d-p)*n,w=x*i,b=x+(v-w)*l/1e3,g=x*l/1e3+d;return Math.abs(g-p)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QJ(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}function Ty(e){return nQ(e)||rQ(e)||tQ(e)||eQ()}function eQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tQ(e,t){if(e){if(typeof e=="string")return sb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sb(e,t)}}function rQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nQ(e){if(Array.isArray(e))return sb(e)}function sb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qd(e){return Qd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qd(e)}var Fa=(function(e){lQ(r,e);var t=cQ(r);function r(n,a){var i;aQ(this,r),i=t.call(this,n,a);var s=i.props,l=s.isActive,u=s.attributeName,f=s.from,d=s.to,p=s.steps,x=s.children,v=s.duration;if(i.handleStyleChange=i.handleStyleChange.bind(cb(i)),i.changeStyle=i.changeStyle.bind(cb(i)),!l||v<=0)return i.state={style:{}},typeof x=="function"&&(i.state={style:d}),lb(i);if(p&&p.length)i.state={style:p[0].style};else if(f){if(typeof x=="function")return i.state={style:f},lb(i);i.state={style:u?tu({},u,f):f}}else i.state={style:{}};return i}return sQ(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,s=a.canBegin;this.mounted=!0,!(!i||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,s=i.isActive,l=i.canBegin,u=i.attributeName,f=i.shouldReAnimate,d=i.to,p=i.from,x=this.state.style;if(l){if(!s){var v={style:u?tu({},u,d):d};this.state&&x&&(u&&x[u]!==d||!u&&x!==d)&&this.setState(v);return}if(!(xJ(a.to,d)&&a.canBegin&&a.isActive)){var w=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=w||f?p:a.to;if(this.state&&x){var g={style:u?tu({},u,b):b};(u&&x[u]!==b||!u&&x!==b)&&this.setState(g)}this.runAnimation(Ta(Ta({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,s=a.from,l=a.to,u=a.duration,f=a.easing,d=a.begin,p=a.onAnimationEnd,x=a.onAnimationStart,v=YJ(s,l,BJ(f),u,this.changeStyle),w=function(){i.stopJSAnimation=v()};this.manager.start([x,d,w,u,p])}},{key:"runStepAnimation",value:function(a){var i=this,s=a.steps,l=a.begin,u=a.onAnimationStart,f=s[0],d=f.style,p=f.duration,x=p===void 0?0:p,v=function(b,g,k){if(k===0)return b;var A=g.duration,S=g.easing,N=S===void 0?"ease":S,T=g.style,E=g.properties,j=g.onAnimationEnd,D=k>0?s[k-1]:g,P=E||Object.keys(T);if(typeof N=="function"||N==="spring")return[].concat(Ty(b),[i.runJSAnimation.bind(i,{from:D.style,to:T,duration:A,easing:N}),A]);var H=yO(P,A,N),U=Ta(Ta(Ta({},D.style),T),{},{transition:H});return[].concat(Ty(b),[U,A,j]).filter(EJ)};return this.manager.start([u].concat(Ty(s.reduce(v,[d,Math.max(x,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=SJ());var i=a.begin,s=a.duration,l=a.attributeName,u=a.to,f=a.easing,d=a.onAnimationStart,p=a.onAnimationEnd,x=a.steps,v=a.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(a);return}if(x.length>1){this.runStepAnimation(a);return}var b=l?tu({},l,u):u,g=yO(Object.keys(b),s,f);w.start([d,i,Ta(Ta({},b),{},{transition:g}),s,p])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var s=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var u=JJ(a,ZJ),f=Q.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!l||f===0||s<=0)return i;var p=function(v){var w=v.props,b=w.style,g=b===void 0?{}:b,k=w.className,A=Q.cloneElement(v,Ta(Ta({},u),{},{style:Ta(Ta({},g),d),className:k}));return A};return f===1?p(Q.Children.only(i)):ue.createElement("div",null,Q.Children.map(i,function(x){return p(x)}))}}]),r})(Q.PureComponent);Fa.displayName="Animate";Fa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Fa.propTypes={from:zt.oneOfType([zt.object,zt.string]),to:zt.oneOfType([zt.object,zt.string]),attributeName:zt.string,duration:zt.number,begin:zt.number,easing:zt.oneOfType([zt.string,zt.func]),steps:zt.arrayOf(zt.shape({duration:zt.number.isRequired,style:zt.object.isRequired,easing:zt.oneOfType([zt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),zt.func]),properties:zt.arrayOf("string"),onAnimationEnd:zt.func})),children:zt.oneOfType([zt.node,zt.func]),isActive:zt.bool,canBegin:zt.bool,onAnimationEnd:zt.func,shouldReAnimate:zt.bool,onAnimationStart:zt.func,onAnimationReStart:zt.func};function tf(e){"@babel/helpers - typeof";return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}function eh(){return eh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,u=n>=0?1:-1,f=a>=0&&n>=0||a<0&&n<0?1:0,d;if(s>0&&i instanceof Array){for(var p=[0,0,0,0],x=0,v=4;xs?s:i[x];d="M".concat(t,",").concat(r+l*p[0]),p[0]>0&&(d+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(f,",").concat(t+u*p[0],",").concat(r)),d+="L ".concat(t+n-u*p[1],",").concat(r),p[1]>0&&(d+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(f,`, + `).concat(t+n,",").concat(r+l*p[1])),d+="L ".concat(t+n,",").concat(r+a-l*p[2]),p[2]>0&&(d+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(f,`, + `).concat(t+n-u*p[2],",").concat(r+a)),d+="L ".concat(t+u*p[3],",").concat(r+a),p[3]>0&&(d+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(f,`, + `).concat(t,",").concat(r+a-l*p[3])),d+="Z"}else if(s>0&&i===+i&&i>0){var w=Math.min(s,i);d="M ".concat(t,",").concat(r+l*w,` + A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+u*w,",").concat(r,` + L `).concat(t+n-u*w,",").concat(r,` + A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+n,",").concat(r+l*w,` + L `).concat(t+n,",").concat(r+a-l*w,` + A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+n-u*w,",").concat(r+a,` + L `).concat(t+u*w,",").concat(r+a,` + A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t,",").concat(r+a-l*w," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return d},yQ=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,s=r.y,l=r.width,u=r.height;if(Math.abs(l)>0&&Math.abs(u)>0){var f=Math.min(i,i+l),d=Math.max(i,i+l),p=Math.min(s,s+u),x=Math.max(s,s+u);return n>=f&&n<=d&&a>=p&&a<=x}return!1},bQ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},s2=function(t){var r=EO(EO({},bQ),t),n=Q.useRef(),a=Q.useState(-1),i=fQ(a,2),s=i[0],l=i[1];Q.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var N=n.current.getTotalLength();N&&l(N)}catch{}},[]);var u=r.x,f=r.y,d=r.width,p=r.height,x=r.radius,v=r.className,w=r.animationEasing,b=r.animationDuration,g=r.animationBegin,k=r.isAnimationActive,A=r.isUpdateAnimationActive;if(u!==+u||f!==+f||d!==+d||p!==+p||d===0||p===0)return null;var S=Ot("recharts-rectangle",v);return A?ue.createElement(Fa,{canBegin:s>0,from:{width:d,height:p,x:u,y:f},to:{width:d,height:p,x:u,y:f},duration:b,animationEasing:w,isActive:A},function(N){var T=N.width,E=N.height,j=N.x,D=N.y;return ue.createElement(Fa,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:b,isActive:k,easing:w},ue.createElement("path",eh({},wt(r,!0),{className:S,d:jO(j,D,T,E,x),ref:n})))}):ue.createElement("path",eh({},wt(r,!0),{className:S,d:jO(u,f,d,p,x)}))};function ub(){return ub=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function EQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var jQ=function(t,r,n,a,i,s){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(s,",").concat(r,"h").concat(n)},OQ=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.top,l=s===void 0?0:s,u=t.left,f=u===void 0?0:u,d=t.width,p=d===void 0?0:d,x=t.height,v=x===void 0?0:x,w=t.className,b=AQ(t,wQ),g=_Q({x:n,y:i,top:l,left:f,width:p,height:v},b);return!Ve(n)||!Ve(i)||!Ve(p)||!Ve(v)||!Ve(l)||!Ve(f)?null:ue.createElement("path",fb({},wt(g,!0),{className:Ot("recharts-cross",w),d:jQ(n,i,p,v,l,f)}))},Ay,NO;function NQ(){if(NO)return Ay;NO=1;var e=wC(),t=e(Object.getPrototypeOf,Object);return Ay=t,Ay}var Ey,PO;function PQ(){if(PO)return Ey;PO=1;var e=Oi(),t=NQ(),r=Ni(),n="[object Object]",a=Function.prototype,i=Object.prototype,s=a.toString,l=i.hasOwnProperty,u=s.call(Object);function f(d){if(!r(d)||e(d)!=n)return!1;var p=t(d);if(p===null)return!0;var x=l.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&s.call(x)==u}return Ey=f,Ey}var CQ=PQ();const DQ=Gt(CQ);var jy,CO;function FQ(){if(CO)return jy;CO=1;var e=Oi(),t=Ni(),r="[object Boolean]";function n(a){return a===!0||a===!1||t(a)&&e(a)==r}return jy=n,jy}var MQ=FQ();const IQ=Gt(MQ);function nf(e){"@babel/helpers - typeof";return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(e)}function th(){return th=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:x,x:u,y:f},to:{upperWidth:d,lowerWidth:p,height:x,x:u,y:f},duration:b,animationEasing:w,isActive:k},function(S){var N=S.upperWidth,T=S.lowerWidth,E=S.height,j=S.x,D=S.y;return ue.createElement(Fa,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:b,easing:w},ue.createElement("path",th({},wt(r,!0),{className:A,d:IO(j,D,N,T,E),ref:n})))}):ue.createElement("g",null,ue.createElement("path",th({},wt(r,!0),{className:A,d:IO(u,f,d,p,x)})))},KQ=["option","shapeType","propTransformer","activeClassName","isActive"];function af(e){"@babel/helpers - typeof";return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}function GQ(e,t){if(e==null)return{};var r=XQ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function RO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rh(e){for(var t=1;t0&&n.handleDrag(a.changedTouches[0])}),zn(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,s=a.onDragEnd,l=a.startIndex;s==null||s({endIndex:i,startIndex:l})}),n.detachDragEndListener()}),zn(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),zn(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),zn(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),zn(n,"handleSlideDragStart",function(a){var i=KO(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return _ee(t,e),gee(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,s=this.state.scaleValues,l=this.props,u=l.gap,f=l.data,d=f.length-1,p=Math.min(a,i),x=Math.max(a,i),v=t.getIndexInRange(s,p),w=t.getIndexInRange(s,x);return{startIndex:v-v%u,endIndex:w===d?d:w-w%u}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,s=a.tickFormatter,l=a.dataKey,u=Mr(i[n],l,n);return St(s)?s(u,n):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,s=a.startX,l=a.endX,u=this.props,f=u.x,d=u.width,p=u.travellerWidth,x=u.startIndex,v=u.endIndex,w=u.onChange,b=n.pageX-i;b>0?b=Math.min(b,f+d-p-l,f+d-p-s):b<0&&(b=Math.max(b,f-s,f-l));var g=this.getIndex({startX:s+b,endX:l+b});(g.startIndex!==x||g.endIndex!==v)&&w&&w(g),this.setState({startX:s+b,endX:l+b,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=KO(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,s=a.movingTravellerId,l=a.endX,u=a.startX,f=this.state[s],d=this.props,p=d.x,x=d.width,v=d.travellerWidth,w=d.onChange,b=d.gap,g=d.data,k={startX:this.state.startX,endX:this.state.endX},A=n.pageX-i;A>0?A=Math.min(A,p+x-v-f):A<0&&(A=Math.max(A,p-f)),k[s]=f+A;var S=this.getIndex(k),N=S.startIndex,T=S.endIndex,E=function(){var D=g.length-1;return s==="startX"&&(l>u?N%b===0:T%b===0)||lu?T%b===0:N%b===0)||l>u&&T===D};this.setState(zn(zn({},s,f+A),"brushMoveStartX",n.pageX),function(){w&&E()&&w(S)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,s=this.state,l=s.scaleValues,u=s.startX,f=s.endX,d=this.state[a],p=l.indexOf(d);if(p!==-1){var x=p+n;if(!(x===-1||x>=l.length)){var v=l[x];a==="startX"&&v>=f||a==="endX"&&v<=u||this.setState(zn({},a,v),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,u=n.fill,f=n.stroke;return ue.createElement("rect",{stroke:f,fill:u,x:a,y:i,width:s,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,u=n.data,f=n.children,d=n.padding,p=Q.Children.only(f);return p?ue.cloneElement(p,{x:a,y:i,width:s,height:l,margin:d,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,s,l=this,u=this.props,f=u.y,d=u.travellerWidth,p=u.height,x=u.traveller,v=u.ariaLabel,w=u.data,b=u.startIndex,g=u.endIndex,k=Math.max(n,this.props.x),A=Dy(Dy({},wt(this.props,!1)),{},{x:k,y:f,width:d,height:p}),S=v||"Min value: ".concat((i=w[b])===null||i===void 0?void 0:i.name,", Max value: ").concat((s=w[g])===null||s===void 0?void 0:s.name);return ue.createElement($t,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),l.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(x,A))}},{key:"renderSlide",value:function(n,a){var i=this.props,s=i.y,l=i.height,u=i.stroke,f=i.travellerWidth,d=Math.min(n,a)+f,p=Math.max(Math.abs(a-n)-f,0);return ue.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:d,y:s,width:p,height:l})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,s=n.y,l=n.height,u=n.travellerWidth,f=n.stroke,d=this.state,p=d.startX,x=d.endX,v=5,w={pointerEvents:"none",fill:f};return ue.createElement($t,{className:"recharts-brush-texts"},ue.createElement(Cd,ah({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,x)-v,y:s+l/2},w),this.getTextOfTick(a)),ue.createElement(Cd,ah({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,x)+u+v,y:s+l/2},w),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,s=n.children,l=n.x,u=n.y,f=n.width,d=n.height,p=n.alwaysShowText,x=this.state,v=x.startX,w=x.endX,b=x.isTextActive,g=x.isSlideMoving,k=x.isTravellerMoving,A=x.isTravellerFocused;if(!a||!a.length||!Ve(l)||!Ve(u)||!Ve(f)||!Ve(d)||f<=0||d<=0)return null;var S=Ot("recharts-brush",i),N=ue.Children.count(s)===1,T=xee("userSelect","none");return ue.createElement($t,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),N&&this.renderPanorama(),this.renderSlide(v,w),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(w,"endX"),(b||g||k||A||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,s=n.width,l=n.height,u=n.stroke,f=Math.floor(i+l/2)-1;return ue.createElement(ue.Fragment,null,ue.createElement("rect",{x:a,y:i,width:s,height:l,fill:u,stroke:"none"}),ue.createElement("line",{x1:a+1,y1:f,x2:a+s-1,y2:f,fill:"none",stroke:"#fff"}),ue.createElement("line",{x1:a+1,y1:f+2,x2:a+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return ue.isValidElement(n)?i=ue.cloneElement(n,a):St(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,s=n.width,l=n.x,u=n.travellerWidth,f=n.updateId,d=n.startIndex,p=n.endIndex;if(i!==a.prevData||f!==a.prevUpdateId)return Dy({prevData:i,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:s},i&&i.length?kee({data:i,width:s,x:l,travellerWidth:u,startIndex:d,endIndex:p}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||l!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([l,l+s-u]);var x=a.scale.domain().map(function(v){return a.scale(v)});return{prevData:i,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:s,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:x}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,s=0,l=i-1;l-s>1;){var u=Math.floor((s+l)/2);n[u]>a?l=u:s=u}return a>=n[l]?l:s}}])})(Q.PureComponent);zn(Al,"displayName","Brush");zn(Al,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Fy,GO;function Tee(){if(GO)return Fy;GO=1;var e=Pw();function t(r,n){var a;return e(r,function(i,s,l){return a=n(i,s,l),!a}),!!a}return Fy=t,Fy}var My,XO;function Aee(){if(XO)return My;XO=1;var e=pC(),t=_s(),r=Tee(),n=In(),a=Ih();function i(s,l,u){var f=n(s)?e:r;return u&&a(s,l,u)&&(l=void 0),f(s,t(l,3))}return My=i,My}var Eee=Aee();const jee=Gt(Eee);var Xa=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Iy,YO;function Oee(){if(YO)return Iy;YO=1;var e=CC();function t(r,n,a){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return Iy=t,Iy}var Ry,ZO;function Nee(){if(ZO)return Ry;ZO=1;var e=Oee(),t=NC(),r=_s();function n(a,i){var s={};return i=r(i,3),t(a,function(l,u,f){e(s,u,i(l,u,f))}),s}return Ry=n,Ry}var Pee=Nee();const Cee=Gt(Pee);var Ly,JO;function Dee(){if(JO)return Ly;JO=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Wee(e,t){var r=e.x,n=e.y,a=Uee(e,Ree),i="".concat(r),s=parseInt(i,10),l="".concat(n),u=parseInt(l,10),f="".concat(t.height||a.height),d=parseInt(f,10),p="".concat(t.width||a.width),x=parseInt(p,10);return qc(qc(qc(qc(qc({},t),a),s?{x:s}:{}),u?{y:u}:{}),{},{height:d,width:x,name:t.name,radius:t.radius})}function rN(e){return ue.createElement(db,pb({shapeType:"rectangle",propTransformer:Wee,activeClassName:"recharts-active-bar"},e))}var Hee=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=Ve(n)||ZU(n);return i?t(n,a):(i||ho(),r)}},qee=["value","background"],i5;function El(e){"@babel/helpers - typeof";return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(e)}function Vee(e,t){if(e==null)return{};var r=Kee(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sh(){return sh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(W)0&&(V=Math.min((F||0)-(W[R-1]||0),V))}),Number.isFinite(V)){var G=V/B,ne=b.layout==="vertical"?n.height:n.width;if(b.padding==="gap"&&(j=G*ne/2),b.padding==="no-gap"){var te=co(t.barCategoryGap,G*ne),oe=G*ne/2;j=oe-te-(oe-te)/ne*te}}}a==="xAxis"?D=[n.left+(S.left||0)+(j||0),n.left+n.width-(S.right||0)-(j||0)]:a==="yAxis"?D=u==="horizontal"?[n.top+n.height-(S.bottom||0),n.top+(S.top||0)]:[n.top+(S.top||0)+(j||0),n.top+n.height-(S.bottom||0)-(j||0)]:D=b.range,T&&(D=[D[1],D[0]]);var z=pY(b,i,x),ie=z.scale,K=z.realScaleType;ie.domain(k).range(D),mY(ie);var C=SY(ie,Aa(Aa({},b),{},{realScaleType:K}));a==="xAxis"?(U=g==="top"&&!N||g==="bottom"&&N,P=n.left,H=p[E]-U*b.height):a==="yAxis"&&(U=g==="left"&&!N||g==="right"&&N,P=p[E]-U*b.width,H=n.top);var re=Aa(Aa(Aa({},b),C),{},{realScaleType:K,x:P,y:H,scale:ie,width:a==="xAxis"?n.width:b.width,height:a==="yAxis"?n.height:b.height});return re.bandSize=Kd(re,C),!b.hide&&a==="xAxis"?p[E]+=(U?-1:1)*re.height:b.hide||(p[E]+=(U?-1:1)*re.width),Aa(Aa({},v),{},Xh({},w,re))},{})},u5=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return{x:Math.min(n,i),y:Math.min(a,s),width:Math.abs(i-n),height:Math.abs(s-a)}},ate=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return u5({x:r,y:n},{x:a,y:i})},f5=(function(){function e(t){tte(this,e),this.scale=t}return rte(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(a){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])})();Xh(f5,"EPS",1e-4);var o2=function(t){var r=Object.keys(t).reduce(function(n,a){return Aa(Aa({},n),{},Xh({},a,f5.create(t[a])))},{});return Aa(Aa({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.bandAware,l=i.position;return Cee(a,function(u,f){return r[f].apply(u,{bandAware:s,position:l})})},isInRange:function(a){return a5(a,function(i,s){return r[s].isInRange(i)})}})};function ite(e){return(e%180+180)%180}var ste=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=ite(a),s=i*Math.PI/180,l=Math.atan(n/r),u=s>l&&s-1?u[f?i[d]:d]:void 0}}return Uy=n,Uy}var zy,lN;function lte(){if(lN)return zy;lN=1;var e=e5();function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return zy=t,zy}var Wy,cN;function cte(){if(cN)return Wy;cN=1;var e=TC(),t=_s(),r=lte(),n=Math.max;function a(i,s,l){var u=i==null?0:i.length;if(!u)return-1;var f=l==null?0:r(l);return f<0&&(f=n(u+f,0)),e(i,t(s,3),f)}return Wy=a,Wy}var Hy,uN;function ute(){if(uN)return Hy;uN=1;var e=ote(),t=cte(),r=e(t);return Hy=r,Hy}var fte=ute();const dte=Gt(fte);var hte=$3();const pte=Gt(hte);var mte=pte(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),l2=Q.createContext(void 0),c2=Q.createContext(void 0),d5=Q.createContext(void 0),h5=Q.createContext({}),p5=Q.createContext(void 0),m5=Q.createContext(0),x5=Q.createContext(0),fN=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,s=t.clipPathId,l=t.children,u=t.width,f=t.height,d=mte(i);return ue.createElement(l2.Provider,{value:n},ue.createElement(c2.Provider,{value:a},ue.createElement(h5.Provider,{value:i},ue.createElement(d5.Provider,{value:d},ue.createElement(p5.Provider,{value:s},ue.createElement(m5.Provider,{value:f},ue.createElement(x5.Provider,{value:u},l)))))))},xte=function(){return Q.useContext(p5)},v5=function(t){var r=Q.useContext(l2);r==null&&ho();var n=r[t];return n==null&&ho(),n},vte=function(){var t=Q.useContext(l2);return os(t)},gte=function(){var t=Q.useContext(c2),r=dte(t,function(n){return a5(n.domain,Number.isFinite)});return r||os(t)},g5=function(t){var r=Q.useContext(c2);r==null&&ho();var n=r[t];return n==null&&ho(),n},yte=function(){var t=Q.useContext(d5);return t},bte=function(){return Q.useContext(h5)},u2=function(){return Q.useContext(x5)},f2=function(){return Q.useContext(m5)};function jl(e){"@babel/helpers - typeof";return jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(e)}function wte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _te(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function nre(e,t){return T5(e,t+1)}function are(e,t,r,n,a){for(var i=(n||[]).slice(),s=t.start,l=t.end,u=0,f=1,d=s,p=function(){var w=n==null?void 0:n[u];if(w===void 0)return{v:T5(n,f)};var b=u,g,k=function(){return g===void 0&&(g=r(w,b)),g},A=w.coordinate,S=u===0||fh(e,A,k,d,l);S||(u=0,d=s,f+=1),S&&(d=A+e*(k()/2+a),u+=f)},x;f<=i.length;)if(x=p(),x)return x.v;return[]}function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}function yN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ln(e){for(var t=1;t0?v.coordinate-g*e:v.coordinate})}else i[x]=v=ln(ln({},v),{},{tickCoord:v.coordinate});var k=fh(e,v.tickCoord,b,l,u);k&&(u=v.tickCoord-e*(b()/2+a),i[x]=ln(ln({},v),{},{isShow:!0}))},d=s-1;d>=0;d--)f(d);return i}function cre(e,t,r,n,a,i){var s=(n||[]).slice(),l=s.length,u=t.start,f=t.end;if(i){var d=n[l-1],p=r(d,l-1),x=e*(d.coordinate+e*p/2-f);s[l-1]=d=ln(ln({},d),{},{tickCoord:x>0?d.coordinate-x*e:d.coordinate});var v=fh(e,d.tickCoord,function(){return p},u,f);v&&(f=d.tickCoord-e*(p/2+a),s[l-1]=ln(ln({},d),{},{isShow:!0}))}for(var w=i?l-1:l,b=function(A){var S=s[A],N,T=function(){return N===void 0&&(N=r(S,A)),N};if(A===0){var E=e*(S.coordinate-e*T()/2-u);s[A]=S=ln(ln({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else s[A]=S=ln(ln({},S),{},{tickCoord:S.coordinate});var j=fh(e,S.tickCoord,T,u,f);j&&(u=S.tickCoord+e*(T()/2+a),s[A]=ln(ln({},S),{},{isShow:!0}))},g=0;g=2?Ca(a[1].coordinate-a[0].coordinate):1,k=rre(i,g,v);return u==="equidistantPreserveStart"?are(g,k,b,a,s):(u==="preserveStart"||u==="preserveStartEnd"?x=cre(g,k,b,a,s,u==="preserveStartEnd"):x=lre(g,k,b,a,s),x.filter(function(A){return A.isShow}))}var ure=["viewBox"],fre=["viewBox"],dre=["ticks"];function Pl(e){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hre(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wN(e,t){for(var r=0;r0?u(this.props):u(v)),s<=0||l<=0||!w||!w.length?null:ue.createElement($t,{className:Ot("recharts-cartesian-axis",f),ref:function(g){n.layerReference=g}},i&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),un.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var s,l=Ot(a.className,"recharts-cartesian-axis-tick-value");return ue.isValidElement(n)?s=ue.cloneElement(n,Or(Or({},a),{},{className:l})):St(n)?s=n(Or(Or({},a),{},{className:l})):s=ue.createElement(Cd,nl({},a,{className:"recharts-cartesian-axis-tick-value"}),i),s}}])})(Q.Component);p2(Ql,"displayName","CartesianAxis");p2(Ql,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var wre=["x1","y1","x2","y2","key"],_re=["offset"];function po(e){"@babel/helpers - typeof";return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},po(e)}function _N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Are(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ere=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,s=t.width,l=t.height,u=t.ry;return ue.createElement("rect",{x:a,y:i,ry:u,width:s,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function j5(e,t){var r;if(ue.isValidElement(e))r=ue.cloneElement(e,t);else if(St(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,s=t.y2,l=t.key,u=SN(t,wre),f=wt(u,!1);f.offset;var d=SN(f,_re);r=ue.createElement("line",Zs({},d,{x1:n,y1:a,x2:i,y2:s,fill:"none",key:l}))}return r}function jre(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,u){var f=fn(fn({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(u),index:u});return j5(a,f)});return ue.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Ore(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,u){var f=fn(fn({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(u),index:u});return j5(a,f)});return ue.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function Nre(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,s=e.height,l=e.horizontalPoints,u=e.horizontal,f=u===void 0?!0:u;if(!f||!t||!t.length)return null;var d=l.map(function(x){return Math.round(x+a-a)}).sort(function(x,v){return x-v});a!==d[0]&&d.unshift(0);var p=d.map(function(x,v){var w=!d[v+1],b=w?a+s-x:d[v+1]-x;if(b<=0)return null;var g=v%t.length;return ue.createElement("rect",{key:"react-".concat(v),y:x,x:n,height:b,width:i,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return ue.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function Pre(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,s=e.y,l=e.width,u=e.height,f=e.verticalPoints;if(!r||!n||!n.length)return null;var d=f.map(function(x){return Math.round(x+i-i)}).sort(function(x,v){return x-v});i!==d[0]&&d.unshift(0);var p=d.map(function(x,v){var w=!d[v+1],b=w?i+l-x:d[v+1]-x;if(b<=0)return null;var g=v%n.length;return ue.createElement("rect",{key:"react-".concat(v),x,y:s,width:b,height:u,stroke:"none",fill:n[g],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return ue.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Cre=function(t,r){var n=t.xAxis,a=t.width,i=t.height,s=t.offset;return UD(h2(fn(fn(fn({},Ql.defaultProps),n),{},{ticks:gi(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.left,s.left+s.width,r)},Dre=function(t,r){var n=t.yAxis,a=t.width,i=t.height,s=t.offset;return UD(h2(fn(fn(fn({},Ql.defaultProps),n),{},{ticks:gi(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.top,s.top+s.height,r)},Jo={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ya(e){var t,r,n,a,i,s,l=u2(),u=f2(),f=bte(),d=fn(fn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Jo.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Jo.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Jo.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Jo.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Jo.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:Jo.verticalFill,x:Ve(e.x)?e.x:f.left,y:Ve(e.y)?e.y:f.top,width:Ve(e.width)?e.width:f.width,height:Ve(e.height)?e.height:f.height}),p=d.x,x=d.y,v=d.width,w=d.height,b=d.syncWithTicks,g=d.horizontalValues,k=d.verticalValues,A=vte(),S=gte();if(!Ve(v)||v<=0||!Ve(w)||w<=0||!Ve(p)||p!==+p||!Ve(x)||x!==+x)return null;var N=d.verticalCoordinatesGenerator||Cre,T=d.horizontalCoordinatesGenerator||Dre,E=d.horizontalPoints,j=d.verticalPoints;if((!E||!E.length)&&St(T)){var D=g&&g.length,P=T({yAxis:S?fn(fn({},S),{},{ticks:D?g:S.ticks}):void 0,width:l,height:u,offset:f},D?!0:b);_i(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(po(P),"]")),Array.isArray(P)&&(E=P)}if((!j||!j.length)&&St(N)){var H=k&&k.length,U=N({xAxis:A?fn(fn({},A),{},{ticks:H?k:A.ticks}):void 0,width:l,height:u,offset:f},H?!0:b);_i(Array.isArray(U),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(po(U),"]")),Array.isArray(U)&&(j=U)}return ue.createElement("g",{className:"recharts-cartesian-grid"},ue.createElement(Ere,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),ue.createElement(jre,Zs({},d,{offset:f,horizontalPoints:E,xAxis:A,yAxis:S})),ue.createElement(Ore,Zs({},d,{offset:f,verticalPoints:j,xAxis:A,yAxis:S})),ue.createElement(Nre,Zs({},d,{horizontalPoints:E})),ue.createElement(Pre,Zs({},d,{verticalPoints:j})))}Ya.displayName="CartesianGrid";var Fre=["type","layout","connectNulls","ref"],Mre=["key"];function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function kN(e,t){if(e==null)return{};var r=Ire(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ire(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function xu(){return xu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rp){v=[].concat(Qo(u.slice(0,w)),[p-b]);break}var g=v.length%2===0?[0,x]:[x];return[].concat(Qo(t.repeat(u,d)),Qo(v),g).map(function(k){return"".concat(k,"px")}).join(", ")}),Ea(r,"id",_o("recharts-line-")),Ea(r,"pathRef",function(s){r.mainCurve=s}),Ea(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Ea(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Vre(t,e),zre(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.points,l=i.xAxis,u=i.yAxis,f=i.layout,d=i.children,p=Mn(d,Jl);if(!p)return null;var x=function(b,g){return{x:b.x,y:b.y,value:b.value,errorVal:Mr(b.payload,g)}},v={clipPath:n?"url(#clipPath-".concat(a,")"):null};return ue.createElement($t,v,p.map(function(w){return ue.cloneElement(w,{key:"bar-".concat(w.props.dataKey),data:s,xAxis:l,yAxis:u,layout:f,dataPointFormatter:x})}))}},{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var l=this.props,u=l.dot,f=l.points,d=l.dataKey,p=wt(this.props,!1),x=wt(u,!0),v=f.map(function(b,g){var k=Un(Un(Un({key:"dot-".concat(g),r:3},p),x),{},{index:g,cx:b.x,cy:b.y,value:b.value,dataKey:d,payload:b.payload,points:f});return t.renderDotItem(u,k)}),w={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return ue.createElement($t,xu({className:"recharts-line-dots",key:"dots"},w),v)}},{key:"renderCurveStatically",value:function(n,a,i,s){var l=this.props,u=l.type,f=l.layout,d=l.connectNulls;l.ref;var p=kN(l,Fre),x=Un(Un(Un({},wt(p,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},s),{},{type:u,layout:f,connectNulls:d});return ue.createElement(ao,xu({},x,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,u=s.strokeDasharray,f=s.isAnimationActive,d=s.animationBegin,p=s.animationDuration,x=s.animationEasing,v=s.animationId,w=s.animateNewValues,b=s.width,g=s.height,k=this.state,A=k.prevPoints,S=k.totalLength;return ue.createElement(Fa,{begin:d,duration:p,isActive:f,easing:x,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(N){var T=N.t;if(A){var E=A.length/l.length,j=l.map(function(B,V){var W=Math.floor(V*E);if(A[W]){var G=A[W],ne=gr(G.x,B.x),te=gr(G.y,B.y);return Un(Un({},B),{},{x:ne(T),y:te(T)})}if(w){var oe=gr(b*2,B.x),z=gr(g/2,B.y);return Un(Un({},B),{},{x:oe(T),y:z(T)})}return Un(Un({},B),{},{x:B.x,y:B.y})});return i.renderCurveStatically(j,n,a)}var D=gr(0,S),P=D(T),H;if(u){var U="".concat(u).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});H=i.getStrokeDasharray(P,S,U)}else H=i.generateSimpleStrokeDasharray(S,P);return i.renderCurveStatically(l,n,a,{strokeDasharray:H})})}},{key:"renderCurve",value:function(n,a){var i=this.props,s=i.points,l=i.isAnimationActive,u=this.state,f=u.prevPoints,d=u.totalLength;return l&&s&&s.length&&(!f&&d>0||!uo(f,s))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,u=a.className,f=a.xAxis,d=a.yAxis,p=a.top,x=a.left,v=a.width,w=a.height,b=a.isAnimationActive,g=a.id;if(i||!l||!l.length)return null;var k=this.state.isAnimationFinished,A=l.length===1,S=Ot("recharts-line",u),N=f&&f.allowDataOverflow,T=d&&d.allowDataOverflow,E=N||T,j=yt(g)?this.id:g,D=(n=wt(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},P=D.r,H=P===void 0?3:P,U=D.strokeWidth,B=U===void 0?2:U,V=q3(s)?s:{},W=V.clipDot,G=W===void 0?!0:W,ne=H*2+B;return ue.createElement($t,{className:S},N||T?ue.createElement("defs",null,ue.createElement("clipPath",{id:"clipPath-".concat(j)},ue.createElement("rect",{x:N?x:x-v/2,y:T?p:p-w/2,width:N?v:v*2,height:T?w:w*2})),!G&&ue.createElement("clipPath",{id:"clipPath-dots-".concat(j)},ue.createElement("rect",{x:x-ne/2,y:p-ne/2,width:v+ne,height:w+ne}))):null,!A&&this.renderCurve(E,j),this.renderErrorBar(E,j),(A||s)&&this.renderDots(E,G,j),(!b||k)&<.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Qo(n),[0]):n,s=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Yre(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Js(){return Js=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!uo(d,s)||!uo(p,l))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(s,l,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,u=a.className,f=a.top,d=a.left,p=a.xAxis,x=a.yAxis,v=a.width,w=a.height,b=a.isAnimationActive,g=a.id;if(i||!l||!l.length)return null;var k=this.state.isAnimationFinished,A=l.length===1,S=Ot("recharts-area",u),N=p&&p.allowDataOverflow,T=x&&x.allowDataOverflow,E=N||T,j=yt(g)?this.id:g,D=(n=wt(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},P=D.r,H=P===void 0?3:P,U=D.strokeWidth,B=U===void 0?2:U,V=q3(s)?s:{},W=V.clipDot,G=W===void 0?!0:W,ne=H*2+B;return ue.createElement($t,{className:S},N||T?ue.createElement("defs",null,ue.createElement("clipPath",{id:"clipPath-".concat(j)},ue.createElement("rect",{x:N?d:d-v/2,y:T?f:f-w/2,width:N?v:v*2,height:T?w:w*2})),!G&&ue.createElement("clipPath",{id:"clipPath-dots-".concat(j)},ue.createElement("rect",{x:d-ne/2,y:f-ne/2,width:v+ne,height:w+ne}))):null,A?null:this.renderArea(E,j),(s||A)&&this.renderDots(E,G,j),(!b||k)&<.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(Q.PureComponent);P5=Ao;Ka(Ao,"displayName","Area");Ka(Ao,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ss.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ka(Ao,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,s=t.props.baseValue,l=s??i;if(Ve(l)&&typeof l=="number")return l;var u=a==="horizontal"?n:r,f=u.scale.domain();if(u.type==="number"){var d=Math.max(f[0],f[1]),p=Math.min(f[0],f[1]);return l==="dataMin"?p:l==="dataMax"||d<0?d:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});Ka(Ao,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,u=e.dataKey,f=e.stackedData,d=e.dataStartIndex,p=e.displayedData,x=e.offset,v=t.layout,w=f&&f.length,b=P5.getBaseValue(t,r,n,a),g=v==="horizontal",k=!1,A=p.map(function(N,T){var E;w?E=f[d+T]:(E=Mr(N,u),Array.isArray(E)?k=!0:E=[b,E]);var j=E[1]==null||w&&Mr(N,u)==null;return g?{x:Sl({axis:n,ticks:i,bandSize:l,entry:N,index:T}),y:j?null:a.scale(E[1]),value:E,payload:N}:{x:j?null:n.scale(E[1]),y:Sl({axis:a,ticks:s,bandSize:l,entry:N,index:T}),value:E,payload:N}}),S;return w||k?S=A.map(function(N){var T=Array.isArray(N.value)?N.value[0]:null;return g?{x:N.x,y:T!=null&&N.y!=null?a.scale(T):null}:{x:T!=null?n.scale(T):null,y:N.y}}):S=g?a.scale(b):n.scale(b),as({points:A,baseLine:S,layout:v,isRange:k},x)});Ka(Ao,"renderDotItem",function(e,t){var r;if(ue.isValidElement(e))r=ue.cloneElement(e,t);else if(St(e))r=e(t);else{var n=Ot("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=C5(t,Xre);r=ue.createElement(Vh,Js({},i,{key:a,className:n}))}return r});function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function ane(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ine(e,t){for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pne(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mne(e){var t=e.option,r=e.isActive,n=hne(e,dne);return typeof t=="string"?Q.createElement(db,vu({option:Q.createElement(Dh,vu({type:t},n)),isActive:r,shapeType:"symbols"},n)):Q.createElement(db,vu({option:t,isActive:r,shapeType:"symbols"},n))}function Ml(e){"@babel/helpers - typeof";return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hae(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?s:t&&t.length&&Ve(a)&&Ve(i)?t.slice(a,i+1):[]};function J5(e){return e==="number"?[0,"auto"]:void 0}var Ib=function(t,r,n,a){var i=t.graphicalItems,s=t.tooltipAxis,l=Qh(r,t);return n<0||!i||!i.length||n>=l.length?null:i.reduce(function(u,f){var d,p=(d=f.props.data)!==null&&d!==void 0?d:r;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var x;if(s.dataKey&&!s.allowDuplicatedCategory){var v=p===void 0?l:p;x=bd(v,s.dataKey,a)}else x=p&&p[n]||l[n];return x?[].concat(Bl(u),[WD(f,x)]):u},[])},RN=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},s=Tae(i,n),l=t.orderedTooltipTicks,u=t.tooltipAxis,f=t.tooltipTicks,d=lY(s,l,f,u);if(d>=0&&f){var p=f[d]&&f[d].value,x=Ib(t,r,d,p),v=Aae(n,l,d,i);return{activeTooltipIndex:d,activeLabel:p,activePayload:x,activeCoordinate:v}}return null},Eae=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,f=r.dataEndIndex,d=t.layout,p=t.children,x=t.stackOffset,v=$D(d,i);return n.reduce(function(w,b){var g,k=b.type.defaultProps!==void 0?je(je({},b.type.defaultProps),b.props):b.props,A=k.type,S=k.dataKey,N=k.allowDataOverflow,T=k.allowDuplicatedCategory,E=k.scale,j=k.ticks,D=k.includeHidden,P=k[s];if(w[P])return w;var H=Qh(t.data,{graphicalItems:a.filter(function(C){var re,F=s in C.props?C.props[s]:(re=C.type.defaultProps)===null||re===void 0?void 0:re[s];return F===P}),dataStartIndex:u,dataEndIndex:f}),U=H.length,B,V,W;Qne(k.domain,N,A)&&(B=Y1(k.domain,null,N),v&&(A==="number"||E!=="auto")&&(W=pu(H,S,"category")));var G=J5(A);if(!B||B.length===0){var ne,te=(ne=k.domain)!==null&&ne!==void 0?ne:G;if(S){if(B=pu(H,S,A),A==="category"&&v){var oe=QU(B);T&&oe?(V=B,B=nh(0,U)):T||(B=Kj(te,B,b).reduce(function(C,re){return C.indexOf(re)>=0?C:[].concat(Bl(C),[re])},[]))}else if(A==="category")T?B=B.filter(function(C){return C!==""&&!yt(C)}):B=Kj(te,B,b).reduce(function(C,re){return C.indexOf(re)>=0||re===""||yt(re)?C:[].concat(Bl(C),[re])},[]);else if(A==="number"){var z=hY(H,a.filter(function(C){var re,F,R=s in C.props?C.props[s]:(re=C.type.defaultProps)===null||re===void 0?void 0:re[s],Y="hide"in C.props?C.props.hide:(F=C.type.defaultProps)===null||F===void 0?void 0:F.hide;return R===P&&(D||!Y)}),S,i,d);z&&(B=z)}v&&(A==="number"||E!=="auto")&&(W=pu(H,S,"category"))}else v?B=nh(0,U):l&&l[P]&&l[P].hasStack&&A==="number"?B=x==="expand"?[0,1]:zD(l[P].stackGroups,u,f):B=BD(H,a.filter(function(C){var re=s in C.props?C.props[s]:C.type.defaultProps[s],F="hide"in C.props?C.props.hide:C.type.defaultProps.hide;return re===P&&(D||!F)}),A,d,!0);if(A==="number")B=Db(p,B,P,i,j),te&&(B=Y1(te,B,N));else if(A==="category"&&te){var ie=te,K=B.every(function(C){return ie.indexOf(C)>=0});K&&(B=ie)}}return je(je({},w),{},ht({},P,je(je({},k),{},{axisType:i,domain:B,categoricalDomain:W,duplicateDomain:V,originalDomain:(g=k.domain)!==null&&g!==void 0?g:G,isCategorical:v,layout:d})))},{})},jae=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,f=r.dataEndIndex,d=t.layout,p=t.children,x=Qh(t.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:f}),v=x.length,w=$D(d,i),b=-1;return n.reduce(function(g,k){var A=k.type.defaultProps!==void 0?je(je({},k.type.defaultProps),k.props):k.props,S=A[s],N=J5("number");if(!g[S]){b++;var T;return w?T=nh(0,v):l&&l[S]&&l[S].hasStack?(T=zD(l[S].stackGroups,u,f),T=Db(p,T,S,i)):(T=Y1(N,BD(x,n.filter(function(E){var j,D,P=s in E.props?E.props[s]:(j=E.type.defaultProps)===null||j===void 0?void 0:j[s],H="hide"in E.props?E.props.hide:(D=E.type.defaultProps)===null||D===void 0?void 0:D.hide;return P===S&&!H}),"number",d),a.defaultProps.allowDataOverflow),T=Db(p,T,S,i)),je(je({},g),{},ht({},S,je(je({axisType:i},a.defaultProps),{},{hide:!0,orientation:da(Sae,"".concat(i,".").concat(b%2),null),domain:T,originalDomain:N,isCategorical:w,layout:d})))}return g},{})},Oae=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,s=r.graphicalItems,l=r.stackGroups,u=r.dataStartIndex,f=r.dataEndIndex,d=t.children,p="".concat(a,"Id"),x=Mn(d,i),v={};return x&&x.length?v=Eae(t,{axes:x,graphicalItems:s,axisType:a,axisIdKey:p,stackGroups:l,dataStartIndex:u,dataEndIndex:f}):s&&s.length&&(v=jae(t,{Axis:i,graphicalItems:s,axisType:a,axisIdKey:p,stackGroups:l,dataStartIndex:u,dataEndIndex:f})),v},Nae=function(t){var r=os(t),n=gi(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Cw(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Kd(r,n)}},LN=function(t){var r=t.children,n=t.defaultShowTooltip,a=Wn(r,Al),i=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(s=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},Pae=function(t){return!t||!t.length?!1:t.some(function(r){var n=wi(r&&r.type);return n&&n.indexOf("Bar")>=0})},BN=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Cae=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,s=i===void 0?{}:i,l=t.yAxisMap,u=l===void 0?{}:l,f=n.width,d=n.height,p=n.children,x=n.margin||{},v=Wn(p,Al),w=Wn(p,cl),b=Object.keys(u).reduce(function(T,E){var j=u[E],D=j.orientation;return!j.mirror&&!j.hide?je(je({},T),{},ht({},D,T[D]+j.width)):T},{left:x.left||0,right:x.right||0}),g=Object.keys(s).reduce(function(T,E){var j=s[E],D=j.orientation;return!j.mirror&&!j.hide?je(je({},T),{},ht({},D,da(T,"".concat(D))+j.height)):T},{top:x.top||0,bottom:x.bottom||0}),k=je(je({},g),b),A=k.bottom;v&&(k.bottom+=v.props.height||Al.defaultProps.height),w&&r&&(k=fY(k,a,n,r));var S=f-k.left-k.right,N=d-k.top-k.bottom;return je(je({brushBottom:A},k),{},{width:Math.max(S,0),height:Math.max(N,0)})},Dae=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Q5=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,u=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,p=t.defaultProps,x=function(k,A){var S=A.graphicalItems,N=A.stackGroups,T=A.offset,E=A.updateId,j=A.dataStartIndex,D=A.dataEndIndex,P=k.barSize,H=k.layout,U=k.barGap,B=k.barCategoryGap,V=k.maxBarSize,W=BN(H),G=W.numericAxisName,ne=W.cateAxisName,te=Pae(S),oe=[];return S.forEach(function(z,ie){var K=Qh(k.data,{graphicalItems:[z],dataStartIndex:j,dataEndIndex:D}),C=z.type.defaultProps!==void 0?je(je({},z.type.defaultProps),z.props):z.props,re=C.dataKey,F=C.maxBarSize,R=C["".concat(G,"Id")],Y=C["".concat(ne,"Id")],fe={},ce=u.reduce(function(ut,it){var _t=A["".concat(it.axisType,"Map")],Lt=C["".concat(it.axisType,"Id")];_t&&_t[Lt]||it.axisType==="zAxis"||ho();var Tt=_t[Lt];return je(je({},ut),{},ht(ht({},it.axisType,Tt),"".concat(it.axisType,"Ticks"),gi(Tt)))},fe),se=ce[ne],he=ce["".concat(ne,"Ticks")],Ce=N&&N[R]&&N[R].hasStack&&TY(z,N[R].stackGroups),I=wi(z.type).indexOf("Bar")>=0,qe=Kd(se,he),Ne=[],De=te&&cY({barSize:P,stackGroups:N,totalSize:Dae(ce,ne)});if(I){var Fe,Se,Je=yt(F)?V:F,pt=(Fe=(Se=Kd(se,he,!0))!==null&&Se!==void 0?Se:Je)!==null&&Fe!==void 0?Fe:0;Ne=uY({barGap:U,barCategoryGap:B,bandSize:pt!==qe?pt:qe,sizeList:De[Y],maxBarSize:Je}),pt!==qe&&(Ne=Ne.map(function(ut){return je(je({},ut),{},{position:je(je({},ut.position),{},{offset:ut.position.offset-pt/2})})}))}var Ge=z&&z.type&&z.type.getComposedData;Ge&&oe.push({props:je(je({},Ge(je(je({},ce),{},{displayedData:K,props:k,dataKey:re,item:z,bandSize:qe,barPosition:Ne,offset:T,stackedData:Ce,layout:H,dataStartIndex:j,dataEndIndex:D}))),{},ht(ht(ht({key:z.key||"item-".concat(ie)},G,ce[G]),ne,ce[ne]),"animationId",E)),childIndex:dz(z,k.children),item:z})}),oe},v=function(k,A){var S=k.props,N=k.dataStartIndex,T=k.dataEndIndex,E=k.updateId;if(!lA({props:S}))return null;var j=S.children,D=S.layout,P=S.stackOffset,H=S.data,U=S.reverseStackOrder,B=BN(D),V=B.numericAxisName,W=B.cateAxisName,G=Mn(j,n),ne=_Y(H,G,"".concat(V,"Id"),"".concat(W,"Id"),P,U),te=u.reduce(function(C,re){var F="".concat(re.axisType,"Map");return je(je({},C),{},ht({},F,Oae(S,je(je({},re),{},{graphicalItems:G,stackGroups:re.axisType===V&&ne,dataStartIndex:N,dataEndIndex:T}))))},{}),oe=Cae(je(je({},te),{},{props:S,graphicalItems:G}),A==null?void 0:A.legendBBox);Object.keys(te).forEach(function(C){te[C]=d(S,te[C],oe,C.replace("Map",""),r)});var z=te["".concat(W,"Map")],ie=Nae(z),K=x(S,je(je({},te),{},{dataStartIndex:N,dataEndIndex:T,updateId:E,graphicalItems:G,stackGroups:ne,offset:oe}));return je(je({formattedGraphicalItems:K,graphicalItems:G,offset:oe,stackGroups:ne},ie),te)},w=(function(g){function k(A){var S,N,T;return dae(this,k),T=mae(this,k,[A]),ht(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ht(T,"accessibilityManager",new Jne),ht(T,"handleLegendBBoxUpdate",function(E){if(E){var j=T.state,D=j.dataStartIndex,P=j.dataEndIndex,H=j.updateId;T.setState(je({legendBBox:E},v({props:T.props,dataStartIndex:D,dataEndIndex:P,updateId:H},je(je({},T.state),{},{legendBBox:E}))))}}),ht(T,"handleReceiveSyncEvent",function(E,j,D){if(T.props.syncId===E){if(D===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(j)}}),ht(T,"handleBrushChange",function(E){var j=E.startIndex,D=E.endIndex;if(j!==T.state.dataStartIndex||D!==T.state.dataEndIndex){var P=T.state.updateId;T.setState(function(){return je({dataStartIndex:j,dataEndIndex:D},v({props:T.props,dataStartIndex:j,dataEndIndex:D,updateId:P},T.state))}),T.triggerSyncEvent({dataStartIndex:j,dataEndIndex:D})}}),ht(T,"handleMouseEnter",function(E){var j=T.getMouseInfo(E);if(j){var D=je(je({},j),{},{isTooltipActive:!0});T.setState(D),T.triggerSyncEvent(D);var P=T.props.onMouseEnter;St(P)&&P(D,E)}}),ht(T,"triggeredAfterMouseMove",function(E){var j=T.getMouseInfo(E),D=j?je(je({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(D),T.triggerSyncEvent(D);var P=T.props.onMouseMove;St(P)&&P(D,E)}),ht(T,"handleItemMouseEnter",function(E){T.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),ht(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),ht(T,"handleMouseMove",function(E){E.persist(),T.throttleTriggeredAfterMouseMove(E)}),ht(T,"handleMouseLeave",function(E){T.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};T.setState(j),T.triggerSyncEvent(j);var D=T.props.onMouseLeave;St(D)&&D(j,E)}),ht(T,"handleOuterEvent",function(E){var j=fz(E),D=da(T.props,"".concat(j));if(j&&St(D)){var P,H;/.*touch.*/i.test(j)?H=T.getMouseInfo(E.changedTouches[0]):H=T.getMouseInfo(E),D((P=H)!==null&&P!==void 0?P:{},E)}}),ht(T,"handleClick",function(E){var j=T.getMouseInfo(E);if(j){var D=je(je({},j),{},{isTooltipActive:!0});T.setState(D),T.triggerSyncEvent(D);var P=T.props.onClick;St(P)&&P(D,E)}}),ht(T,"handleMouseDown",function(E){var j=T.props.onMouseDown;if(St(j)){var D=T.getMouseInfo(E);j(D,E)}}),ht(T,"handleMouseUp",function(E){var j=T.props.onMouseUp;if(St(j)){var D=T.getMouseInfo(E);j(D,E)}}),ht(T,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),ht(T,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseDown(E.changedTouches[0])}),ht(T,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseUp(E.changedTouches[0])}),ht(T,"handleDoubleClick",function(E){var j=T.props.onDoubleClick;if(St(j)){var D=T.getMouseInfo(E);j(D,E)}}),ht(T,"handleContextMenu",function(E){var j=T.props.onContextMenu;if(St(j)){var D=T.getMouseInfo(E);j(D,E)}}),ht(T,"triggerSyncEvent",function(E){T.props.syncId!==void 0&&Ky.emit(Gy,T.props.syncId,E,T.eventEmitterSymbol)}),ht(T,"applySyncEvent",function(E){var j=T.props,D=j.layout,P=j.syncMethod,H=T.state.updateId,U=E.dataStartIndex,B=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)T.setState(je({dataStartIndex:U,dataEndIndex:B},v({props:T.props,dataStartIndex:U,dataEndIndex:B,updateId:H},T.state)));else if(E.activeTooltipIndex!==void 0){var V=E.chartX,W=E.chartY,G=E.activeTooltipIndex,ne=T.state,te=ne.offset,oe=ne.tooltipTicks;if(!te)return;if(typeof P=="function")G=P(oe,E);else if(P==="value"){G=-1;for(var z=0;z=0){var Ce,I;if(V.dataKey&&!V.allowDuplicatedCategory){var qe=typeof V.dataKey=="function"?he:"payload.".concat(V.dataKey.toString());Ce=bd(z,qe,G),I=ie&&K&&bd(K,qe,G)}else Ce=z==null?void 0:z[W],I=ie&&K&&K[W];if(Y||R){var Ne=E.props.activeIndex!==void 0?E.props.activeIndex:W;return[Q.cloneElement(E,je(je(je({},P.props),ce),{},{activeIndex:Ne})),null,null]}if(!yt(Ce))return[se].concat(Bl(T.renderActivePoints({item:P,activePoint:Ce,basePoint:I,childIndex:W,isRange:ie})))}else{var De,Fe=(De=T.getItemByXY(T.state.activeCoordinate))!==null&&De!==void 0?De:{graphicalItem:se},Se=Fe.graphicalItem,Je=Se.item,pt=Je===void 0?E:Je,Ge=Se.childIndex,ut=je(je(je({},P.props),ce),{},{activeIndex:Ge});return[Q.cloneElement(pt,ut),null,null]}return ie?[se,null,null]:[se,null]}),ht(T,"renderCustomized",function(E,j,D){return Q.cloneElement(E,je(je({key:"recharts-customized-".concat(D)},T.props),T.state))}),ht(T,"renderMap",{CartesianGrid:{handler:J0,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:J0},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:J0},YAxis:{handler:J0},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((S=A.id)!==null&&S!==void 0?S:_o("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=LC(T.triggeredAfterMouseMove,(N=A.throttleDelay)!==null&&N!==void 0?N:1e3/60),T.state={},T}return gae(k,g),pae(k,[{key:"componentDidMount",value:function(){var S,N;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,N=S.children,T=S.data,E=S.height,j=S.layout,D=Wn(N,Jr);if(D){var P=D.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var H=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,U=Ib(this.state,T,P,H),B=this.state.tooltipTicks[P].coordinate,V=(this.state.offset.top+E)/2,W=j==="horizontal",G=W?{x:B,y:V}:{y:B,x:V},ne=this.state.formattedGraphicalItems.find(function(oe){var z=oe.item;return z.type.name==="Scatter"});ne&&(G=je(je({},G),ne.props.points[P].tooltipPosition),U=ne.props.points[P].tooltipPayload);var te={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:H,activePayload:U,activeCoordinate:G};this.setState(te),this.renderCursor(D),this.accessibilityManager.setIndex(P)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,N){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==N.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var T,E;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(S){g1([Wn(S.children,Jr)],[Wn(this.props.children,Jr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Wn(this.props.children,Jr);if(S&&typeof S.props.shared=="boolean"){var N=S.props.shared?"axis":"item";return l.indexOf(N)>=0?N:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var N=this.container,T=N.getBoundingClientRect(),E=Jq(T),j={chartX:Math.round(S.pageX-E.left),chartY:Math.round(S.pageY-E.top)},D=T.width/N.offsetWidth||1,P=this.inRange(j.chartX,j.chartY,D);if(!P)return null;var H=this.state,U=H.xAxisMap,B=H.yAxisMap,V=this.getTooltipEventType(),W=RN(this.state,this.props.data,this.props.layout,P);if(V!=="axis"&&U&&B){var G=os(U).scale,ne=os(B).scale,te=G&&G.invert?G.invert(j.chartX):null,oe=ne&&ne.invert?ne.invert(j.chartY):null;return je(je({},j),{},{xValue:te,yValue:oe},W)}return W?je(je({},j),W):null}},{key:"inRange",value:function(S,N){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,j=S/T,D=N/T;if(E==="horizontal"||E==="vertical"){var P=this.state.offset,H=j>=P.left&&j<=P.left+P.width&&D>=P.top&&D<=P.top+P.height;return H?{x:j,y:D}:null}var U=this.state,B=U.angleAxisMap,V=U.radiusAxisMap;if(B&&V){var W=os(B);return Yj({x:j,y:D},W)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,N=this.getTooltipEventType(),T=Wn(S,Jr),E={};T&&N==="axis"&&(T.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=wd(this.props,this.handleOuterEvent);return je(je({},j),E)}},{key:"addListener",value:function(){Ky.on(Gy,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Ky.removeListener(Gy,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,N,T){for(var E=this.state.formattedGraphicalItems,j=0,D=E.length;j\s]/g,"").toLowerCase()}function Mae(e,t){const r=new Date(e,t-1,1);let n=0;for(;r.getMonth()===t-1;){const a=r.getDay();a>0&&a<6&&n++,r.setDate(r.getDate()+1)}return n}function Vc(e,t){const[r,n]=t.split("-").map(Number);return e/5*Mae(r,n)}const Iae=`Name,Department,Email,Availability Hour (per week) +Yves Le Breton,,YvesLeBreton@insideideas.agency, +Valeria Pizarro,,ValeriaPizarro@insideideas.co.uk, +Monika Singh,,monik, +Franklin Elango,,, +Derick Baretto ,,, +Sarah Gomes,,sarahboniface.gomes@brandtech.plus, +Sathiyaraj Sundaraj,,, +Nosipho Nyide,,NosiphoNyide@brandtech.plus, +Mert Dincerler,,MertDincerler@oliver.agency, +Paul Johns,,PaulJohns@oliver.agency, +James Royce ,,JamesRoyce@oliver.agency, +Philip Dore,,PhilipDore@oliver.agency, +Volha Schastnaya,,, +Dharini Jain,,DhariniJain@Oliver.agency, +Shubhashish Sarkar,,subhashishsarkar@oliver.agency,40 +Celina Fernandes,,celinafernandes@oliver.agency,40 +Jef Lima De Lima Silva,,, +Rong Chen ,,RongChen@oliver.agency>, +Sara Menor,,SaraMenorMartin@brandtech.plus, +Samara Ghori,,SamaraGhori@oliver.agency, +Maggie Tran,,maggietran@insideideas.agency, +Sriza,,, +Sze,,, +Daniel Carter,,,40 +sarah,,,40 +twi,,,40 +yashashree,,,40 +Monika,,,40 +monika ,,,40 +twi,,,40 +twi,,,40 +Sameer Kumar,Creative Team,sameerkumar@oliver.agency,40 +Diksha Panchal,Creative Team,diksha.panchal@brandtech.plus,40 +Sneha Pathak,Creative Team,SnehaPathak@oliver.agency,40 +Sneha Iyer,Creative Team,SnehaIyer@oliver.agency,40 +Akanksha Gupta - FRL,Creative Team,AkankshaGupta@oliver.agency,40 +Balaji Kamraj - FRL,Creative Team,BalajiKamaraj@oliver.agency,40 +Amir Syafiq Nordin,Creative Team,AmirSyafiq@oliver.agency,40 +Ruben Roa,Creative Team,RubenRoa@oliver.agency,40 +Vedant Rode,Creative Team,vedantrode@oliver.agency,40 +Andrew Briffett ,Creative Team,AndrewBriffett@oliver.agency,40 +Cheng Kah Yean - FRL,Creative Team,chengkahyean@brandtech.plus,40 +Naveen Kumar - FRL,Creative Team,Naveenkumar@oliver.agency,40 +Geraldine Tan Jing Wen - FRL,Creative Team,geraldinetan.jingwen@brandtech.plus,40 +Yashashree G,Creative Team,YashashreeG@oliver.agency,40 +Michael Cheang - FRL,Creative Team,michaelcheang@brandtech.plus,40 +Noah Lee - FRL,Creative Team,noahlee@brandtech.plus,40 +Eric Ting - FRL,Creative Team,eric.ting@brandtech.plus,40 +Deepshika Das,Creative Team,DeepshikhaDas@oliver.agency,40 +Jayce Davin,Creative Team,jaycedavin@brandtech.plus,40 +Annu Singh,Creative Team,annusingh@oliver.agency,40 +Narelle Beristain,Creative Team,NarelleElenaCruzBeristain@oliver.agency,40 +Rajni Goswami - FRL,Creative Team,rajnigoswami@oliver.agency,40 +Chinna Anto - FRL,Creative Team,Chinnaanto@oliver.agency,40 +Prajakta Giri,Creative Team,prajakta.giri@brandtech.plus,40 +Kushagra Tayal,Creative Team,KushagraTayal@Oliver.agency,40 +Farid Rahman Hadi - FRL,Creative Team,faridrahmanhadi@brandtech.plus,40 +Pravin Prabakaran,Creative Team,PravinPrabakaran@oliver.agency,40 +Leke Ho - FRL,Creative Team,Leke.Ho@brandtech.plus,40 +Paula Clark,Creative Team,paulaclark@oliver.agency,40 +Samruddhi Jajal,Creative Team,SamruddhiJajal@oliver.agency,40 +Michelle Ng - FRL,Creative Team,MichelleNg@oliver.agency,40 +Siva Kumar - FRL,Creative Team,Sivakumar@oliver.agency,40 +Antony Varghese ,Creative Team,AntonyVarghese@oliver.agency,40 +Muhammad Ameen,Creative Team,MuhammedAmeen@Oliver.Agency,40 +Akshaya K,Creative Team,AkshayaK@oliver.agency ,40 +Liam Chetty,Creative Team,LiamChetty@brandtech.plus ,40 +Low Hui Yen - FRL,Creative Team,LowHuiYen@oliver.agency,40 +Zwivhuya Maise - FRL,Creative Team,zwivhuyamaise@brandtech.plus,40 +João Zambom,Creative Team,joaozambom@oliver.agency,40 +Vyomica Vasistha,Creative Team,VyomicaVasistha@oliver.agency ,40 +Rohan Ganguly,Creative Team,RohanGanguly@oliver.agency,40 +Jyoti Negi - FRL,Creative Team,JyotiNegi@oliver.agency,40 +Saurabh Acharya - FRL,Creative Team,SaurabhAcharya@oliver.agency,40 +Denvour Dcruz,Creative Team,DenvourDcruz@Oliver.agency,40 +Sreekumar V S,Creative Team,SreekumarVS@oliver.agency,40 +Mohd Anas Siddiqui - FRL,Creative Team,mohammadanassiddiqui@oliver.agency,40 +Rupali patel,Creative Team,RupaliPatel@oliver.agency,40 +James Rowland,Creative Team,JamesRowland@oliver.agency,40 +Tarana Purohit,Creative Team,TaranaPurohit@oliver.agency,40 +Lindsay Dhludhlu,Creative Team,LindsayDhludhlu@oliver.agency,40 +Melissa Cramer,Creative Team,melissacramer@oliver.agency,40 +Shiamak Chappger - FRL,Creative Team,shiamakchappger@oliver.agency,40 +Akshat Bhatnagar,Creative Team,akshatbhatnagar@oliver.agency,40 +Cynthia Morales,Creative Team,CynthiaMorales@oliver.agency,40 +Aadesh Khale,Creative Team,aadeshkhale@oliver.agency,40 +Rhea Seth,Creative Team,Rheaseth@oliver.agency,40 +Nosipho Nyide,Creative Team,NosiphoNyide@Oliver.agency,40 +Derick Baretto,Creative Team,derickbaretto@oliver.agency,40 +Monika Singh,Creative Team,monikasingh@oliver.agency,40 +Ameya Thakur,Creative Team,ameyathakur@oliver.agency,40 +Karan Kadam,Creative Team,karankadam@oliver.agency,40 +Bhakti Doshi,Creative Team,bhaktidoshi@oliver.agency,40 +Sahil Pujari,Project Management Team,sahilpujari@oliver.agency,40 +Nishtha Sharma,Project Management Team,NishthaSharma@oliver.agency,40 +Sanjana Maindoliya,Project Management Team,sanjana.maindoliya@brandtech.plus,40 +Ruchika Saini,Project Management Team,RuchikaSaini@Oliver.agency,40 +Circé Langrée Le Coq,Project Management Team,CirceLangreeLeCoq@oliver.agency,40 +Priya Chaurasia,Project Management Team,PriyaChaursia@oliver.agency,40 +Marta Fernández Echevarría ,Project Management Team,MartaEchevarria@oliver.agency,40 +Wamika Chopra - FRL,Project Management Team,Wamika.Chopra@brandtech.plus,40 +Annalisa Tozzi,Project Management Team,annalisatozzi@oliver.agency,40 +Meghav Bhatt,Project Management Team,MeghavBhatt@oliver.agency,40 +Thando Ndashe,Project Management Team,ThandoNdashe@oliver.agency,40 +Seatile Molotsane,Project Management Team,SeatileMolotsane@brandtech.plus,40 +Carly Josias,Project Management Team,CarlyVanWyk@brandtech.plus,40 +Khyati Bagadia,Project Management Team,khyati.bagadia@brandtech.plus,40 +Abhishek Khare,Project Management Team,AbhishekKhare@oliver.agency,40 +Anushka Saraiya,Project Management Team,AnushkaSaraiya@oliver.agency,40 +Mansi Vasani,Project Management Team,MansisVasani@oliver.agency,40 +Jahanvi Jain,Project Management Team,JahanviJain@oliver.agency,40 +Vaishali Singh,Project Management Team,VaishaliSingh@oliver.agency,40 +Aniket Sawant,Project Management Team,aniketsawant@oliver.agency,40 +Deepanjan Sarkar,Project Management Team,DeepanjanSarkar@oliver.agency,40 +Ashwini Patil,Project Management Team,AshwiniPatil@oliver.agency,40 +Ankita Hazra,Project Management Team,AnkitaHazra@oliver.agency,40 +Medhavi Thakur - FRL,Project Management Team,MedhaviThakur@oliver.agency,40 +Lisa Peignon,Project Management Team,LisaPeignon@oliver.agency,40 +Amy Zhang,Project Management Team,AmyZhang@oliver.agency,40 +Bhuhari Sujathali,Project Management Team,BhuhariSujathali@oliver.agency,40 +Sonia Dougherty,Project Management Team,soniadoughertydemiguel@oliver.agency,40 +Mbulelo Jili,Project Management Team,MbuleloJili@oliver.agency,40 +Ankit Dobhal,Project Management Team,ankitdobhal@oliver.agency,40 +Busi Nako,Project Management Team,Busisiwe.Nako@brandtech.plus,40 +Ana Carro,Project Management Team,AnaCarro@oliver.agency,40 +Keerthi Manogharan,Project Management Team,KeerthikaManogharan@oliver.agency,40 +Charlotte McNeil,Project Management Team,charlottemcneil@oliver.agency,40 +Linda Kunene,Project Management Team,lindakunene@oliver.agency,40 +Megha Sarin,Project Management Team,MeghaSarin@oliver.agency,40 +Raghav Agarwal - FRL,Project Management Team,RaghavAgarwal@oliver.agency,40 +Mahima Bhatia - FRL,Project Management Team,Mahima.Bhatia@brandtech.plus,40 +Mernoly Simba,Project Management Team,Mernoly.Simba@brandtech.plus,40 +Jaimin Ramwani,Project Management Team,JaiminRamwani@oliver.agency,40 +Kritika Iyer,Project Management Team,KritikaIyer@oliver.agency,40 +Sarah Erdmann Burns,Project Management Team,SarahErdmann-Burns@oliver.agency,40 +Trusha Parekh,Project Management Team,TrushaParekh@oliver.agency,40 +Minal Dhumak,Project Management Team,minaldhumak@oliver.agency,40 +Meghna Moza,Project Management Team,meghnamoza@oliver.agency,40 +Pooja Pereira,Project Management Team,PoojaPereira@oliver.agency,40 +Zahra Arsiwala,Syndication Team,ZehraArsiwala@oliver.agency,40 +Jumana Bohra,Syndication Team,JumanaBohra@oliver.agency,40 +Neelima Dsouza,Syndication Team,NeelimaDSouza@oliver.agency,40 +Saakshi Kudtakar,Syndication Team,saakshikudtarkar@oliver.agency,40 +Sreoshree Talkudar,Syndication Team,SreoshreeTalukdar@oliver.agency,40 +Celina Dsouza,Syndication Team,CelinaDsouza@oliver.agency,40 +Pooja Sharma,Syndication Team,pooja.sharma@oliver.agency,40 +Philipus Sekotlong,Syndication Team,phillipussekotlong@oliver.agency,40 +Sagar Rane,Syndication Team,sagar.rane@brandtech.plus,40 +Carolina Diaz Concha,Syndication Team,CarolinaDiazConcha@oliver.agency,40 +Alex Pye,Syndication Team,AlexPye@oliver.agency,40 +Insiya Kanchwala,Syndication Team,insiyakanchwala@oliver.agency,40 +Drupti Shetty,Syndication Team,druptishetty@oliver.agency,40 +Aditi Thakare,Syndication Team,AditiThakare@oliver.agency,40 +Prathamesh Patil,Syndication Team,prathamesh.patil@brandtech.plus,40 +Ailen Sol Presta,Syndication Team,AilenSolPresta@oliver.agency,40 +Dóra Tolnai,Transcreation Team,DoraTolnai@oliver.agency,40 +Ross Arroyo Wheeldon,Transcreation Team,RossWheeldon@oliver.agency,40 +Denisa Demian,Transcreation Team,DenisaDemian@oliver.agency,40 +Angela Pantaleo,Transcreation Team,AngelaPantaleo@oliver.agency,40 +Żaneta Kośla,Transcreation Team,zanetaKosla@oliver.agency,40 +Marta Flieger,Transcreation Team,MartaFlieger@oliver.agency ,40 +Agata Pankow,Transcreation Team,AgataPankow@oliver.agency,40 +Karan Kapur ,Opera Upload Team,KaranKapur@Oliver.agency,40 +Tony Coppola,Operation Team,tonycoppola@oliver.agency,40 +Sue Lin Tan,Operation Team,TanSueLin@oliver.agency,40`;function Rae(e){var n,a,i,s;const t=e.replace(/^/,"").split(` +`).slice(1),r=[];for(const l of t){const u=l.trim();if(!u)continue;const f=u.split(","),d=((n=f[0])==null?void 0:n.trim())??"";if(!d)continue;const p=((a=f[1])==null?void 0:a.trim())||"Unknown",x=((i=f[2])==null?void 0:i.trim())??"",v=((s=f[3])==null?void 0:s.trim())??"",w=Jt(x),b=parseInt(v,10);r.push({name:d,department:p,email:w.includes("@")?w:"",availHoursPerWeek:isNaN(b)||b<=0?40:b})}return r}const $l=Rae(Iae);function eF(){const e=new Map,t=[...$l].sort((r,n)=>r.department==="Unknown"&&n.department!=="Unknown"?-1:r.department!=="Unknown"&&n.department==="Unknown"?1:0);for(const r of t)r.email&&e.set(r.email,r);return e}function pi(e,t){if(!e||!t)return 0;const r=new Date(e+"T00:00:00"),n=new Date(t+"T00:00:00");if(isNaN(r.getTime())||isNaN(n.getTime())||r>n)return 0;let a=0;const i=new Date(r);for(;i<=n;){const s=i.getDay();s!==0&&s!==6&&a++,i.setDate(i.getDate()+1)}return a}function tF(e){var i,s;const t=eF(),r=new Map;for(const l of e){const u=l.projectNumber||l.projectTitle;if(!u||!l.projectType)continue;r.has(u)||r.set(u,{projectNumber:l.projectNumber,projectType:l.projectType,projectTitle:l.projectTitle,status:l.projectStatus,assetCount:l.assetCount,startDate:l.projectStartDate,endDate:l.projectEndDate,totalHours:0,deptHours:new Map,divisionHours:new Map});const f=r.get(u);f.totalHours+=l.hoursLogged,l.projectStatus==="COMPLETE"&&(f.status="COMPLETE"),!f.startDate&&l.projectStartDate&&(f.startDate=l.projectStartDate),!f.endDate&&l.projectEndDate&&(f.endDate=l.projectEndDate),f.assetCount===null&&l.assetCount!==null&&(f.assetCount=l.assetCount);const d=((i=t.get(Jt(l.submitterEmail||"")))==null?void 0:i.department)??"Unknown";f.deptHours.set(d,(f.deptHours.get(d)??0)+l.hoursLogged);const p=l.division||"Unknown";f.divisionHours.set(p,(f.divisionHours.get(p)??0)+l.hoursLogged)}const n=new Date().toISOString().split("T")[0],a=[];for(const[,l]of r){if(l.status!=="COMPLETE"||!l.assetCount||l.assetCount<=0||l.totalHours<=0||!l.endDate||l.endDate>n)continue;const u={};for(const[p,x]of l.deptHours)u[p]=x;const d=((s=Array.from(l.divisionHours.entries()).sort((p,x)=>x[1]-p[1])[0])==null?void 0:s[0])??"Unknown";a.push({projectNumber:l.projectNumber,projectType:l.projectType,projectTitle:l.projectTitle,division:d,assetCount:l.assetCount,totalHours:l.totalHours,startDate:l.startDate,endDate:l.endDate,durationDays:pi(l.startDate,l.endDate),hoursPerAsset:l.totalHours/l.assetCount,completionMonth:l.endDate.slice(0,7),deptHours:u})}return a.sort((l,u)=>l.completionMonth.localeCompare(u.completionMonth))}const Yy="Globally Initiated",Zy="Locally Initiated",rF=e=>/global.*initiat/i.test(e),nF=e=>/local.*initiat/i.test(e);function $N(e,t){if(t.length===1)return{...t[0],projectType:e};const r=t.reduce((x,v)=>x+v.count,0),n=t.reduce((x,v)=>x+v.totalHours,0),a=t.reduce((x,v)=>x+v.totalAssets,0),i=r>0?t.reduce((x,v)=>x+v.avgHoursPerAsset*v.count,0)/r:0,s=r>0?t.reduce((x,v)=>x+v.avgDuration*v.count,0)/r:0,l=t.map(x=>x.minDuration).filter(x=>x>0),u=l.length>0?Math.min(...l):0,f=Math.max(...t.map(x=>x.maxDuration),0),d={};for(const x of t)for(const[v,w]of Object.entries(x.deptHours))d[v]=(d[v]??0)+w;const p=new Map;for(const x of t)for(const v of x.monthlyStats){const w=p.get(v.month);if(!w)p.set(v.month,{...v,deptHours:{...v.deptHours},divisionCounts:{...v.divisionCounts}});else{const b=w.projectCount+v.projectCount;w.avgHoursPerAsset=b>0?(w.avgHoursPerAsset*w.projectCount+v.avgHoursPerAsset*v.projectCount)/b:0;const g=w.avgDuration>0?w.projectCount:0,k=v.avgDuration>0?v.projectCount:0,A=g+k;w.avgDuration=A>0?(w.avgDuration*g+v.avgDuration*k)/A:0,w.totalHours+=v.totalHours,w.projectCount=b;for(const[S,N]of Object.entries(v.deptHours))w.deptHours[S]=(w.deptHours[S]??0)+N;for(const[S,N]of Object.entries(v.divisionCounts))w.divisionCounts[S]=(w.divisionCounts[S]??0)+N}}return{projectType:e,count:r,avgHoursPerAsset:i,avgDuration:s,minDuration:u,maxDuration:f,totalHours:n,totalAssets:a,deptHours:d,monthlyStats:Array.from(p.values()).sort((x,v)=>x.month.localeCompare(v.month))}}function aF(e){const t=[],r=[],n=[];for(const s of e.values())rF(s.projectType)?t.push(s):nF(s.projectType)?r.push(s):n.push(s);const a=new Map;for(const s of t)a.set(s.projectType,Yy);for(const s of r)a.set(s.projectType,Zy);const i=new Map;for(const s of n)i.set(s.projectType,s);return t.length>0&&i.set(Yy,$N(Yy,t)),r.length>0&&i.set(Zy,$N(Zy,r)),{mergedMap:i,aliasMap:a}}function iF(e){const t=new Map;for(const n of e){if(!n.projectType)continue;t.has(n.projectType)||t.set(n.projectType,{ps:[],dh:new Map});const a=t.get(n.projectType);a.ps.push(n);for(const[i,s]of Object.entries(n.deptHours))a.dh.set(i,(a.dh.get(i)??0)+s)}const r=new Map;for(const[n,{ps:a,dh:i}]of t){const s=a.filter(d=>d.durationDays>0).map(d=>d.durationDays),l=new Map;for(const d of a)l.has(d.completionMonth)||l.set(d.completionMonth,[]),l.get(d.completionMonth).push(d);const u=Array.from(l.entries()).sort(([d],[p])=>d.localeCompare(p)).map(([d,p])=>{const x={};for(const b of p)for(const[g,k]of Object.entries(b.deptHours))x[g]=(x[g]??0)+k;const v={};for(const b of p)v[b.division]=(v[b.division]??0)+1;const w=p.filter(b=>b.durationDays>0).map(b=>b.durationDays);return{month:d,projectCount:p.length,avgHoursPerAsset:p.reduce((b,g)=>b+g.hoursPerAsset,0)/p.length,avgDuration:w.length>0?w.reduce((b,g)=>b+g,0)/w.length:0,totalHours:p.reduce((b,g)=>b+g.totalHours,0),deptHours:x,divisionCounts:v}}),f={};for(const[d,p]of i)f[d]=p;r.set(n,{projectType:n,count:a.length,avgHoursPerAsset:a.reduce((d,p)=>d+p.hoursPerAsset,0)/a.length,avgDuration:s.length>0?s.reduce((d,p)=>d+p,0)/s.length:0,minDuration:s.length>0?Math.min(...s):0,maxDuration:s.length>0?Math.max(...s):0,totalHours:a.reduce((d,p)=>d+p.totalHours,0),totalAssets:a.reduce((d,p)=>d+p.assetCount,0),deptHours:f,monthlyStats:u})}return r}const UN=["#6366f1","#8b5cf6","#ec4899","#f59e0b","#10b981","#3b82f6","#ef4444","#14b8a6","#f97316","#84cc16","#06b6d4","#d946ef","#64748b","#a16207"],Q0=["#f43f5e","#6366f1","#f59e0b","#10b981","#3b82f6","#d946ef","#14b8a6","#f97316","#84cc16","#8b5cf6","#06b6d4","#ec4899","#a16207","#64748b"],ed=e=>`dv_${e.replace(/[\s()/-]+/g,"_").toLowerCase()}`,yu={"Creative Team":"#818cf8","Project Management Team":"#f472b6","Syndication Team":"#34d399","Transcreation Team":"#fbbf24","Opera Upload Team":"#60a5fa","Operation Team":"#f87171",Unknown:"#64748b"},vs=["Creative Team","Project Management Team","Syndication Team","Transcreation Team","Opera Upload Team","Operation Team","Unknown"],Jy=e=>e.replace(/[\s()/-]+/g,"_").toLowerCase();function Lae(e){const[t,r]=e.split("-");return new Date(+t,+r-1).toLocaleString("default",{month:"short",year:"2-digit"})}const Qy=e=>e&&e.length>=10?`${e.slice(8,10)}/${e.slice(5,7)}/${e.slice(0,4)}`:e??"—",td=["country pull-simple","country pull-adaptation","country pull-creation","country retailer request","global push-pdp","local push-pdp","global push-eventing","local push-eventing"];function zN(e){const t=e.toLowerCase().trim(),r=td.indexOf(t);return r>=0?r:rF(e)?td.length:nF(e)?td.length+1:td.length+2}function Bae(e){const t=[],r=e.monthlyStats.slice(-3).filter(i=>i.projectCount>0);if(r.length>=2){const i=r.reduce((l,u)=>l+u.avgHoursPerAsset,0)/r.length,s=i/e.avgHoursPerAsset;s>1.25?t.push({type:"action",text:`Efficiency declining: last ${r.length}-month avg is ${i.toFixed(1)}h/asset — ${((s-1)*100).toFixed(0)}% above the ${e.avgHoursPerAsset.toFixed(1)}h overall benchmark. Review project complexity or team allocation.`}):s<.8&&t.push({type:"good",text:`Efficiency improving recently: last ${r.length}-month avg ${i.toFixed(1)}h/asset is ${((1-s)*100).toFixed(0)}% better than the ${e.avgHoursPerAsset.toFixed(1)}h overall avg.`})}e.maxDuration>0&&e.avgDuration>0&&e.maxDuration>e.avgDuration*2.5&&t.push({type:"warning",text:`Duration outlier: longest project was ${e.maxDuration} working days vs avg ${Math.round(e.avgDuration)}d. Investigate what caused the extended timeline on those projects.`});const n=e.monthlyStats.slice(-3).filter(i=>i.avgDuration>0);if(n.length>=2&&e.avgDuration>0){const i=n.reduce((s,l)=>s+l.avgDuration,0)/n.length;i>e.avgDuration*1.3?t.push({type:"warning",text:`Projects taking longer recently: last ${n.length}-month avg ${Math.round(i)}d vs overall avg ${Math.round(e.avgDuration)}d. Check if project scope is growing or if blockers are causing delays.`}):ii+s,0);if(a>0){const i=vs.reduce((l,u)=>(e.deptHours[u]??0)>(e.deptHours[l]??0)?u:l,vs[0]),s=(e.deptHours[i]??0)/a*100;s>85&&t.push({type:"warning",text:`${s.toFixed(0)}% of hours concentrated in ${i}. High single-team dependency — consider cross-department cover or risk-planning if that team's capacity changes.`})}return e.count<5&&t.push({type:"warning",text:`Only ${e.count} completed projects — benchmark averages may not yet be statistically reliable. Interpret with caution until more projects complete.`}),e.avgHoursPerAsset<.5&&t.push({type:"warning",text:`Avg h/asset is very low (${e.avgHoursPerAsset.toFixed(2)}h) — verify the "No. of Assets" column is not inflated or double-counted in the source data.`}),t.length===0&&t.push({type:"good",text:`No anomalies detected. Benchmark looks stable across ${e.count} completed projects with consistent efficiency and duration trends.`}),t}function $ae({stats:e}){const t=Q.useMemo(()=>Bae(e),[e]),r=n=>({good:{bg:"bg-emerald-950/60",border:"border-emerald-800/60",dot:"bg-emerald-400",label:"Good",text:"text-emerald-400"},warning:{bg:"bg-amber-950/50",border:"border-amber-800/60",dot:"bg-amber-400",label:"Watch",text:"text-amber-400"},action:{bg:"bg-red-950/50",border:"border-red-800/60",dot:"bg-red-400",label:"Action",text:"text-red-400"}})[n];return h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[h.jsx("h3",{className:"text-sm font-semibold text-white",children:"Insights & Recommended Actions"}),h.jsxs("span",{className:"text-[10px] bg-slate-800 text-slate-400 px-2 py-0.5 rounded-full",children:[e.count," projects · ",e.totalHours.toFixed(0),"h · ",e.totalAssets.toLocaleString()," assets"]})]}),h.jsx("div",{className:"space-y-2.5",children:t.map((n,a)=>{const i=r(n.type);return h.jsxs("div",{className:`flex items-start gap-3 px-4 py-3 rounded-lg border ${i.bg} ${i.border}`,children:[h.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 mt-0.5",children:[h.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${i.dot}`}),h.jsx("span",{className:`text-[10px] font-bold uppercase tracking-wide ${i.text}`,children:i.label})]}),h.jsx("p",{className:"text-xs text-slate-300 leading-relaxed",children:n.text})]},a)})})]})}function Uae({stats:e,selected:t,onClick:r}){const n=Object.values(e.deptHours).reduce((a,i)=>a+i,0);return h.jsxs("div",{className:`bg-slate-900 border rounded-xl p-4 cursor-pointer transition-all group ${t?"border-indigo-500 ring-1 ring-indigo-500/30 bg-slate-800/50":"border-slate-800 hover:border-indigo-500/50"}`,onClick:r,children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsx("h3",{className:"text-sm font-semibold text-white leading-snug pr-2",children:e.projectType}),h.jsxs("span",{className:"text-xs bg-slate-800 text-slate-400 px-2 py-0.5 rounded-full shrink-0 whitespace-nowrap",children:[e.count," projects"]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-0.5",children:"avg h / asset"}),h.jsxs("div",{className:"text-2xl font-bold text-indigo-300",children:[e.avgHoursPerAsset.toFixed(1),"h"]})]}),h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-0.5",children:"avg duration"}),h.jsx("div",{className:"text-2xl font-bold text-emerald-300",children:e.avgDuration>0?`${Math.round(e.avgDuration)}d`:"—"}),e.minDuration>0&&e.minDuration0&&h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] text-slate-500 mb-1",children:"Dept hours"}),h.jsx("div",{className:"flex h-6 rounded overflow-hidden gap-px",children:vs.filter(a=>(e.deptHours[a]??0)>0).map(a=>{const i=e.deptHours[a]??0,s=i/n*100;return h.jsx("div",{style:{width:`${s}%`,background:yu[a]},className:"flex items-center justify-center overflow-hidden",title:`${a}: ${i.toFixed(0)}h (${s.toFixed(0)}%)`,children:s>=8&&h.jsxs("span",{className:"text-[9px] font-bold text-slate-900 whitespace-nowrap leading-none px-0.5",children:[Math.round(i),"h"]})},a)})}),h.jsx("div",{className:"flex flex-wrap gap-x-2 gap-y-0.5 mt-1",children:vs.filter(a=>(e.deptHours[a]??0)>0).map(a=>h.jsxs("span",{className:"flex items-center gap-0.5 text-[9px] text-slate-500",children:[h.jsx("span",{className:"w-1.5 h-1.5 rounded-sm",style:{background:yu[a]}}),a.replace(" Team","").replace("Project Management","PM").replace("Opera Upload","Opera")," ",((e.deptHours[a]??0)/n*100).toFixed(0),"%"]},a))}),e.totalAssets>0&&h.jsxs("div",{className:"mt-2 pt-2 border-t border-slate-800",children:[h.jsx("div",{className:"text-[9px] text-slate-600 uppercase tracking-wide mb-1",children:"Dept h / asset"}),h.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-0.5",children:vs.filter(a=>(e.deptHours[a]??0)>0).map(a=>{const i=(e.deptHours[a]??0)/e.totalAssets;return h.jsxs("span",{className:"flex items-center gap-0.5 text-[9px]",style:{color:yu[a]},children:[h.jsxs("span",{className:"text-slate-500",children:[a.replace(" Team","").replace("Project Management","PM").replace("Opera Upload","Opera"),":"]})," ",i.toFixed(1),"h"]},a)})})]})]}),t?h.jsxs("div",{className:"mt-3 flex items-center justify-center gap-1.5 text-[10px] text-indigo-400 font-semibold",children:[h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-indigo-400"}),"Viewing"]}):h.jsx("div",{className:"mt-3 text-[10px] text-center text-slate-600 group-hover:text-indigo-400 transition-colors",children:"Click to view"})]})}function e1({label:e,value:t,options:r,onChange:n}){return h.jsxs("label",{className:"flex flex-col text-[10px] text-slate-400 gap-0.5",children:[e,h.jsx("select",{value:t,onChange:a=>n(a.target.value),className:"bg-slate-800 border border-slate-600 rounded px-2 py-1 text-slate-200 text-xs min-w-[110px]",children:r.map(a=>h.jsx("option",{children:a},a))})]})}function rd({label:e,value:t,onChange:r,placeholder:n}){return h.jsxs("label",{className:"flex flex-col text-[10px] text-slate-400 gap-0.5",children:[e,h.jsx("input",{type:"text",value:t,onChange:a=>r(a.target.value),placeholder:n,className:"bg-slate-800 border border-slate-600 rounded px-2 py-1 text-slate-200 text-xs min-w-[110px] placeholder:text-slate-600"})]})}const zae=[{label:"Division",key:"division"},{label:"Project Number",key:"projectNumber"},{label:"Project Title",key:"projectTitle"},{label:"Project Status",key:"projectStatus"},{label:"User Role",key:"userRole"},{label:"Time Submitter",key:"submitter"},{label:"Time Log Start",key:"timeLogStartDisplay"},{label:"Project End Date",key:"projectEndDate"},{label:"Time Logged",key:"hoursLogged",right:!0}];function Wae({logs:e,month:t,projectType:r,onClose:n}){const[a,i]=Q.useState("All"),[s,l]=Q.useState(""),[u,f]=Q.useState(""),[d,p]=Q.useState("All"),[x,v]=Q.useState("All"),[w,b]=Q.useState(""),[g,k]=Q.useState(""),[A,S]=Q.useState(null),N=Q.useMemo(()=>["All",...Array.from(new Set(e.map(V=>V.division).filter(Boolean))).sort()],[e]),T=Q.useMemo(()=>["All",...Array.from(new Set(e.map(V=>V.projectStatus).filter(Boolean))).sort()],[e]),E=Q.useMemo(()=>["All",...Array.from(new Set(e.map(V=>V.userRole).filter(Boolean))).sort()],[e]),j=Q.useMemo(()=>e.filter(V=>!(a!=="All"&&V.division!==a||d!=="All"&&V.projectStatus!==d||x!=="All"&&V.userRole!==x||s&&!V.projectNumber.toLowerCase().includes(s.toLowerCase())||u&&!V.projectTitle.toLowerCase().includes(u.toLowerCase())||w&&!V.submitter.toLowerCase().includes(w.toLowerCase())||g&&!Qy(V.timeLogStartDisplay).toLowerCase().includes(g.toLowerCase())&&!V.timeLogStartDisplay.toLowerCase().includes(g.toLowerCase()))),[e,a,s,u,d,x,w,g]),D=Q.useMemo(()=>A?[...j].sort((V,W)=>{const G=V[A.key]??"",ne=W[A.key]??"",te=typeof G=="number"&&typeof ne=="number"?G-ne:String(G).localeCompare(String(ne));return A.dir==="asc"?te:-te}):j,[j,A]),P=Q.useMemo(()=>j.reduce((V,W)=>V+W.hoursLogged,0),[j]),H=Q.useMemo(()=>{const[V,W]=t.split("-");return new Date(+V,+W-1).toLocaleString("default",{month:"long",year:"numeric"})},[t]),U=V=>{S(W=>!W||W.key!==V?{key:V,dir:"asc"}:W.dir==="asc"?{key:V,dir:"desc"}:null)},B=()=>{i("All"),l(""),f(""),p("All"),v("All"),b(""),k("")};return h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",onClick:V=>{V.target===V.currentTarget&&n()},children:h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-700 w-full max-w-7xl max-h-[90vh] flex flex-col shadow-2xl",children:[h.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-800 shrink-0",children:[h.jsxs("div",{children:[h.jsxs("h3",{className:"text-base font-bold text-white",children:["Time Log Detail — ",H]}),h.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:r})]}),h.jsxs("div",{className:"flex items-center gap-5",children:[h.jsxs("div",{className:"text-right",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide",children:"Total Logged Hours"}),h.jsxs("div",{className:"text-xl font-bold text-teal-300",children:[P.toFixed(1),"h"]})]}),h.jsx("button",{onClick:n,className:"p-2 text-slate-400 hover:text-white rounded-lg hover:bg-slate-800 transition-colors text-lg leading-none",children:"✕"})]})]}),h.jsxs("div",{className:"px-6 py-3 border-b border-slate-800 shrink-0 flex flex-wrap gap-2 items-end",children:[h.jsx(e1,{label:"Division",value:a,options:N,onChange:i}),h.jsx(e1,{label:"Project Status",value:d,options:T,onChange:p}),h.jsx(e1,{label:"User Role",value:x,options:E,onChange:v}),h.jsx(rd,{label:"Project No.",value:s,onChange:l,placeholder:"search…"}),h.jsx(rd,{label:"Project Title",value:u,onChange:f,placeholder:"search…"}),h.jsx(rd,{label:"Submitter",value:w,onChange:b,placeholder:"search…"}),h.jsx(rd,{label:"Time Log Start",value:g,onChange:k,placeholder:"search…"}),h.jsx("button",{onClick:B,className:"text-xs text-slate-400 hover:text-slate-200 mt-4 px-2 py-1",children:"Reset"}),h.jsxs("span",{className:"text-xs text-slate-600 ml-auto mt-4",children:[j.length.toLocaleString()," rows"]})]}),h.jsx("div",{className:"overflow-auto flex-1",children:h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{className:"sticky top-0 z-10",style:{background:"#1e3a5f"},children:h.jsx("tr",{children:zae.map(V=>{const W=(A==null?void 0:A.key)===V.key,G=W?A.dir==="asc"?"↑":"↓":"↕";return h.jsx("th",{onClick:()=>U(V.key),className:`px-3 py-3 font-semibold text-white whitespace-nowrap cursor-pointer select-none hover:bg-white/10 transition-colors ${V.right?"text-right":"text-left"}`,children:h.jsxs("span",{className:"inline-flex items-center gap-1",children:[V.label,h.jsx("span",{className:`text-[10px] ${W?"text-amber-300":"text-slate-500"}`,children:G})]})},V.key)})})}),h.jsxs("tbody",{children:[D.map((V,W)=>h.jsxs("tr",{className:W%2===0?"bg-slate-800/40":"bg-slate-900/40",children:[h.jsx("td",{className:"px-3 py-2 text-slate-300 whitespace-nowrap",children:V.division||"—"}),h.jsx("td",{className:"px-3 py-2 text-indigo-300 font-mono whitespace-nowrap",children:V.projectNumber||"—"}),h.jsx("td",{className:"px-3 py-2 text-slate-200 max-w-[180px] truncate",title:V.projectTitle,children:V.projectTitle||"—"}),h.jsx("td",{className:"px-3 py-2 whitespace-nowrap",children:h.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-semibold ${V.projectStatus==="COMPLETE"?"bg-emerald-900/60 text-emerald-300":V.projectStatus==="IN PROGRESS"?"bg-blue-900/60 text-blue-300":V.projectStatus==="ON HOLD"?"bg-amber-900/60 text-amber-300":"bg-slate-800 text-slate-400"}`,children:V.projectStatus||"—"})}),h.jsx("td",{className:"px-3 py-2 text-slate-300 whitespace-nowrap",children:V.userRole||"—"}),h.jsx("td",{className:"px-3 py-2 text-slate-300 whitespace-nowrap",children:V.submitter||"—"}),h.jsx("td",{className:"px-3 py-2 text-slate-400 whitespace-nowrap",children:Qy(V.timeLogStartDisplay)}),h.jsx("td",{className:"px-3 py-2 text-slate-400 whitespace-nowrap",children:Qy(V.projectEndDate)}),h.jsxs("td",{className:"px-3 py-2 text-amber-300 font-semibold whitespace-nowrap text-right",children:[V.hoursLogged.toFixed(1),"h"]})]},W)),D.length===0&&h.jsx("tr",{children:h.jsx("td",{colSpan:9,className:"px-3 py-10 text-center text-slate-500",children:"No matching records"})})]})]})})]})})}function Hae({stats:e,allLogs:t}){const[r,n]=Q.useState(null),a=Q.useMemo(()=>{const d=new Set;for(const p of e.monthlyStats)for(const x of Object.keys(p.divisionCounts))d.add(x);return Array.from(d).sort()},[e]),i=Q.useMemo(()=>r?t.filter(d=>{var p;return((p=d.projectEndDate)==null?void 0:p.slice(0,7))===r}):[],[r,t]),s=Q.useMemo(()=>e.monthlyStats.map(d=>{const p={monthLabel:Lae(d.month),_month:d.month,avgHPA:+d.avgHoursPerAsset.toFixed(2),avgDur:d.avgDuration>0?+d.avgDuration.toFixed(1):0,projectCount:d.projectCount,totalHours:+d.totalHours.toFixed(0),_zero:0,_divTop:0};for(const x of vs)p[Jy(x)]=+(d.deptHours[x]??0).toFixed(1);for(const x of a){const v=d.divisionCounts[x]??0,w=d.projectCount>0?v/d.projectCount:0;p[ed(x)]=d.projectCount>0?+(w*d.avgHoursPerAsset).toFixed(3):0,p[`cnt_${ed(x)}`]=v}return p}),[e,a]),l=({active:d,payload:p,label:x})=>{if(!d||!(p!=null&&p.length))return null;const v=p[0].payload,w=Number(v.avgHPA),b=w-e.avgHoursPerAsset;return h.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-lg p-3 text-xs shadow-xl min-w-[190px]",children:[h.jsx("div",{className:"font-semibold text-white mb-2",children:x}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsxs("div",{className:"flex justify-between gap-6",children:[h.jsx("span",{className:"text-slate-400",children:"Avg h / asset"}),h.jsxs("span",{className:"text-indigo-300 font-bold",children:[w.toFixed(2),"h"]})]}),h.jsxs("div",{className:"flex justify-between gap-6",children:[h.jsxs("span",{className:"text-slate-400",children:["vs overall avg (",e.avgHoursPerAsset.toFixed(1),"h)"]}),h.jsxs("span",{className:b>0?"text-red-400 font-semibold":"text-emerald-400 font-semibold",children:[b>0?"▲":"▼"," ",Math.abs(b).toFixed(2),"h"]})]}),h.jsxs("div",{className:"border-t border-slate-700 pt-1.5 flex justify-between gap-6",children:[h.jsx("span",{className:"text-slate-400",children:"Projects completed"}),h.jsx("span",{className:"text-amber-300 font-semibold",children:Number(v.projectCount)})]}),h.jsxs("div",{className:"flex justify-between gap-6",children:[h.jsx("span",{className:"text-slate-400",children:"Total hours"}),h.jsxs("span",{className:"text-teal-300",children:[Number(v.totalHours).toFixed(0),"h"]})]})]})]})},u=({active:d,payload:p,label:x})=>{if(!d||!(p!=null&&p.length))return null;const v=p[0].payload,w=Number(v.avgDur),b=w-e.avgDuration;return h.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-lg p-3 text-xs shadow-xl min-w-[200px]",children:[h.jsx("div",{className:"font-semibold text-white mb-2",children:x}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsxs("div",{className:"flex justify-between gap-6",children:[h.jsx("span",{className:"text-slate-400",children:"Avg duration"}),h.jsxs("span",{className:"text-emerald-300 font-bold",children:[Math.round(w)," working days"]})]}),h.jsxs("div",{className:"flex justify-between gap-6",children:[h.jsxs("span",{className:"text-slate-400",children:["vs overall avg (",Math.round(e.avgDuration),"d)"]}),h.jsxs("span",{className:b>0?"text-red-400 font-semibold":"text-emerald-400 font-semibold",children:[b>0?"▲":"▼"," ",Math.abs(Math.round(b)),"d"]})]}),h.jsxs("div",{className:"border-t border-slate-700 pt-1.5 flex justify-between gap-6",children:[h.jsx("span",{className:"text-slate-400",children:"Projects completed"}),h.jsx("span",{className:"text-amber-300 font-semibold",children:Number(v.projectCount)})]})]})]})},f=({active:d,payload:p,label:x})=>{if(!d||!(p!=null&&p.length))return null;const v=p.filter(b=>b.value>0&&b.name!==""),w=v.reduce((b,g)=>b+g.value,0);return h.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-lg p-3 text-xs shadow-xl min-w-[210px]",children:[h.jsx("div",{className:"font-semibold text-white mb-1",children:x}),h.jsxs("div",{className:"text-slate-400 mb-2",children:["Total: ",h.jsxs("span",{className:"text-white font-bold",children:[w.toFixed(0),"h"]})]}),h.jsx("div",{className:"space-y-1",children:v.map(b=>h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("span",{className:"flex items-center gap-1.5 truncate",children:[h.jsx("span",{className:"w-2 h-2 rounded-sm shrink-0",style:{background:b.fill}}),h.jsx("span",{style:{color:b.fill},children:b.name.replace(" Team","").replace("Project Management","PM").replace("Opera Upload","Opera")})]}),h.jsxs("span",{className:"text-slate-300 shrink-0",children:[b.value.toFixed(0),"h · ",w>0?(b.value/w*100).toFixed(0):0,"%"]})]},b.name))})]})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200 mb-0.5",children:"Panel 1 — Avg h / asset by completion month"}),h.jsxs("p",{className:"text-xs text-slate-500 mb-4",children:["Stacked by division (proportional to project count) · Bar label = avg h/asset · Dashed = overall avg (",e.avgHoursPerAsset.toFixed(1),"h) · Click a bar to drill into time logs"]}),h.jsx(to,{width:"100%",height:320,children:h.jsxs(xs,{data:s,margin:{top:28,right:80,left:10,bottom:50},onClick:d=>{var v,w,b;const p=d,x=(b=(w=(v=p==null?void 0:p.activePayload)==null?void 0:v[0])==null?void 0:w.payload)==null?void 0:b._month;x&&n(x)},style:{cursor:"pointer"},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"monthLabel",tick:{fill:"#94a3b8",fontSize:10},angle:-35,textAnchor:"end",interval:0}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:10},label:{value:"h / asset",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:10,offset:10}}),h.jsx(Jr,{content:h.jsx(l,{})}),h.jsx(ms,{y:e.avgHoursPerAsset,stroke:"#fbbf24",strokeDasharray:"5 4",label:{value:`${e.avgHoursPerAsset.toFixed(1)}h avg`,position:"right",fill:"#fbbf24",fontSize:10}}),a.map((d,p)=>h.jsx(jt,{dataKey:ed(d),stackId:"divs",fill:Q0[p%Q0.length],name:d,maxBarSize:44,children:h.jsx(lt,{dataKey:`cnt_${ed(d)}`,position:"center",style:{fill:"#fff",fontSize:9,fontWeight:700},formatter:x=>x>=1?`${x} Pr`:""})},d)),h.jsx(jt,{dataKey:"_divTop",stackId:"divs",fill:"transparent",stroke:"none",isAnimationActive:!1,maxBarSize:44,legendType:"none",name:"",children:h.jsx(lt,{dataKey:"avgHPA",position:"top",style:{fill:"#a5b4fc",fontSize:10,fontWeight:700},formatter:d=>d>0?d.toFixed(1):""})})]})}),h.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 mt-3",children:a.map((d,p)=>h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm shrink-0",style:{background:Q0[p%Q0.length]}}),d]},d))})]}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200 mb-0.5",children:"Panel 2 — Avg working days (duration) by completion month"}),h.jsxs("p",{className:"text-xs text-slate-500 mb-4",children:["Project start → end date, Mon–Fri only · Dashed = overall avg (",Math.round(e.avgDuration),"d)"]}),h.jsx(to,{width:"100%",height:320,children:h.jsxs(xs,{data:s,margin:{top:28,right:80,left:10,bottom:50},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"monthLabel",tick:{fill:"#94a3b8",fontSize:10},angle:-35,textAnchor:"end",interval:0}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:10},label:{value:"Days",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:10,offset:10}}),h.jsx(Jr,{content:h.jsx(u,{})}),h.jsx(ms,{y:e.avgDuration,stroke:"#34d399",strokeDasharray:"5 4",label:{value:`${Math.round(e.avgDuration)}d avg`,position:"right",fill:"#34d399",fontSize:10}}),h.jsx(jt,{dataKey:"avgDur",name:"avgDur",fill:"#0d9488",maxBarSize:44,radius:[3,3,0,0],children:h.jsx(lt,{dataKey:"avgDur",position:"top",style:{fill:"#5eead4",fontSize:10,fontWeight:700},formatter:d=>d>0?`${Math.round(d)}d`:""})})]})})]}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200 mb-0.5",children:"Panel 3 — Department hours by completion month"}),h.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"Which teams logged time on projects completing each month · Segment labels shown when ≥ 20h"}),h.jsx(to,{width:"100%",height:340,children:h.jsxs(xs,{data:s,margin:{top:28,right:20,left:10,bottom:50},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"monthLabel",tick:{fill:"#94a3b8",fontSize:10},angle:-35,textAnchor:"end",interval:0}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:10},label:{value:"Hours",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:10,offset:10}}),h.jsx(Jr,{content:h.jsx(f,{})}),vs.map(d=>h.jsx(jt,{dataKey:Jy(d),stackId:"a",fill:yu[d],name:d,maxBarSize:56,children:h.jsx(lt,{dataKey:Jy(d),position:"center",style:{fill:"#fff",fontSize:9,fontWeight:700},formatter:p=>p>=20?`${Math.round(p)}h`:""})},d)),h.jsx(jt,{dataKey:"_zero",stackId:"a",fill:"transparent",stroke:"none",isAnimationActive:!1,maxBarSize:56,legendType:"none",name:"",children:h.jsx(lt,{dataKey:"totalHours",position:"top",style:{fill:"#e2e8f0",fontSize:10,fontWeight:700},formatter:d=>d>0?`${Math.round(d)}h`:""})})]})}),h.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 mt-3",children:vs.map(d=>h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm shrink-0",style:{background:yu[d]}}),d.replace(" Team","").replace("Project Management","PM").replace("Opera Upload","Opera")]},d))})]})]}),r&&h.jsx(Wae,{logs:i,month:r,projectType:e.projectType,onClose:()=>n(null)})]})}function qae({active:e,payload:t}){if(!e||!(t!=null&&t.length))return null;const r=t[0].payload;return h.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-lg p-3 text-xs shadow-xl max-w-[220px]",children:[h.jsx("div",{className:"font-bold text-white mb-1 truncate",children:String(r.projectNumber||"—")}),h.jsx("div",{className:"text-slate-400 truncate mb-2",children:String(r.projectTitle||"")}),h.jsxs("div",{className:"space-y-0.5",children:[h.jsxs("div",{className:"text-slate-300",children:["h / asset: ",h.jsx("span",{className:"text-indigo-300 font-semibold",children:Number(r.y).toFixed(2)})]}),h.jsxs("div",{className:"text-slate-300",children:["Duration: ",h.jsxs("span",{className:"text-emerald-300 font-semibold",children:[Number(r.x)," working days"]})]}),h.jsxs("div",{className:"text-slate-300",children:["Total hours: ",h.jsxs("span",{className:"text-teal-300 font-semibold",children:[Number(r.totalHours).toFixed(0),"h"]})]}),h.jsxs("div",{className:"text-slate-300",children:["Assets: ",h.jsx("span",{className:"text-amber-300 font-semibold",children:Number(r.assetCount)})]})]})]})}function Vae({logs:e}){const[t,r]=Q.useState(null),n=Q.useMemo(()=>tF(e),[e]),a=Q.useMemo(()=>iF(n),[n]),{mergedStatsMap:i,typeAliasMap:s,mergedStatsList:l}=Q.useMemo(()=>{const{mergedMap:v,aliasMap:w}=aF(a),b=Array.from(v.values()).sort((g,k)=>{const A=zN(g.projectType)-zN(k.projectType);return A!==0?A:k.count-g.count});return{mergedStatsMap:v,typeAliasMap:w,mergedStatsList:b}},[a]),u=Q.useMemo(()=>{const v=new Map;for(const w of n){const b=s.get(w.projectType)??w.projectType;v.has(b)||v.set(b,[]),v.get(b).push({x:w.durationDays,y:+w.hoursPerAsset.toFixed(2),z:Math.max(20,w.totalHours),projectNumber:w.projectNumber,projectTitle:w.projectTitle,projectType:b,assetCount:w.assetCount,totalHours:w.totalHours})}return v},[n,s]),f=Q.useMemo(()=>Array.from(u.keys()).sort(),[u]),d=Q.useMemo(()=>{var w,b;if(!t)return((w=l[0])==null?void 0:w.projectType)??null;if(i.has(t))return t;const v=s.get(t);return v&&i.has(v)?v:((b=l[0])==null?void 0:b.projectType)??null},[t,i,l,s]),p=Q.useMemo(()=>d?e.filter(v=>(s.get(v.projectType)??v.projectType)===d&&v.projectStatus==="COMPLETE"):[],[d,e,s]),x=v=>{r(v)};return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-bold text-white",children:"Project Type Benchmark"}),h.jsxs("p",{className:"text-xs text-slate-400 mt-0.5",children:["Based on ",h.jsx("span",{className:"text-emerald-400 font-semibold",children:"Project Status = COMPLETE"})," · ","Completion month derived from ",h.jsx("span",{className:"text-indigo-300 font-semibold",children:"Project End Date"})]})]}),n.length===0?h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-12 text-center",children:[h.jsx("p",{className:"text-slate-400 text-sm",children:"No COMPLETE projects with asset counts found."}),h.jsx("p",{className:"text-slate-600 text-xs mt-2",children:'Ensure the CSV has "Project Status" (COMPLETE), "No. of Assets", "Project Start Date", and "Project End Date" columns.'})]}):h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 overflow-hidden",children:[h.jsxs("div",{className:"px-5 py-3 border-b border-slate-800",children:[h.jsx("h3",{className:"text-sm font-semibold text-white",children:"Summary by Project Type"}),h.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"All COMPLETE projects · Avg/month based on active months only · Click a row to select type below"})]}),h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{children:h.jsxs("tr",{style:{background:"#1e3a5f"},children:[h.jsx("th",{className:"px-4 py-2.5 text-left text-white font-semibold whitespace-nowrap",children:"Project Type"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Projects"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Assets"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Hours"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Avg h / asset"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Avg assets / month"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Avg assets / week"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Avg projects / month"}),h.jsx("th",{className:"px-4 py-2.5 text-right text-white font-semibold whitespace-nowrap",children:"Avg projects / week"})]})}),h.jsxs("tbody",{children:[l.map((v,w)=>{const b=v.monthlyStats.filter(T=>T.projectCount>0).length||1,g=b*4.33,k=v.totalAssets/b,A=v.totalAssets/g,S=v.count/b,N=v.count/g;return h.jsxs("tr",{className:`cursor-pointer transition-colors ${d===v.projectType?"bg-indigo-900/30":w%2===0?"bg-slate-800/20 hover:bg-slate-800/50":"bg-slate-900/40 hover:bg-slate-800/50"}`,onClick:()=>x(v.projectType),children:[h.jsx("td",{className:"px-4 py-2.5 text-white font-medium whitespace-nowrap",children:v.projectType}),h.jsx("td",{className:"px-4 py-2.5 text-right text-amber-300 font-semibold tabular-nums",children:v.count.toLocaleString()}),h.jsx("td",{className:"px-4 py-2.5 text-right text-teal-300 tabular-nums",children:v.totalAssets.toLocaleString()}),h.jsxs("td",{className:"px-4 py-2.5 text-right text-indigo-300 tabular-nums",children:[v.totalHours.toFixed(0),"h"]}),h.jsxs("td",{className:"px-4 py-2.5 text-right text-slate-300 tabular-nums",children:[v.avgHoursPerAsset.toFixed(1),"h"]}),h.jsx("td",{className:"px-4 py-2.5 text-right text-emerald-300 tabular-nums",children:k.toFixed(1)}),h.jsx("td",{className:"px-4 py-2.5 text-right text-emerald-200 tabular-nums",children:Math.round(A)}),h.jsx("td",{className:"px-4 py-2.5 text-right text-sky-300 tabular-nums",children:S.toFixed(1)}),h.jsx("td",{className:"px-4 py-2.5 text-right text-sky-200 tabular-nums",children:N.toFixed(1)})]},v.projectType)}),(()=>{const v=l.reduce((w,b)=>{const g=b.monthlyStats.filter(A=>A.projectCount>0).length||1,k=g*4.33;return{count:w.count+b.count,assets:w.assets+b.totalAssets,hours:w.hours+b.totalHours,avgAssets:w.avgAssets+b.totalAssets/g,avgAssetsWkRounded:w.avgAssetsWkRounded+Math.round(b.totalAssets/k),avgProjects:w.avgProjects+b.count/g,avgProjectsWk:w.avgProjectsWk+b.count/k}},{count:0,assets:0,hours:0,avgAssets:0,avgAssetsWkRounded:0,avgProjects:0,avgProjectsWk:0});return h.jsxs("tr",{className:"border-t-2 border-slate-600",style:{background:"#1a2740"},children:[h.jsx("td",{className:"px-4 py-2.5 text-slate-200 font-bold whitespace-nowrap",children:"Total"}),h.jsx("td",{className:"px-4 py-2.5 text-right text-amber-300 font-bold tabular-nums",children:v.count.toLocaleString()}),h.jsx("td",{className:"px-4 py-2.5 text-right text-teal-300 font-bold tabular-nums",children:v.assets.toLocaleString()}),h.jsxs("td",{className:"px-4 py-2.5 text-right text-indigo-300 font-bold tabular-nums",children:[v.hours.toFixed(0),"h"]}),h.jsx("td",{className:"px-4 py-2.5 text-right text-slate-400 tabular-nums",children:"—"}),h.jsx("td",{className:"px-4 py-2.5 text-right text-emerald-300 font-bold tabular-nums",children:v.avgAssets.toFixed(1)}),h.jsx("td",{className:"px-4 py-2.5 text-right text-emerald-200 font-bold tabular-nums",children:v.avgAssetsWkRounded.toLocaleString()}),h.jsx("td",{className:"px-4 py-2.5 text-right text-sky-300 font-bold tabular-nums",children:v.avgProjects.toFixed(1)}),h.jsx("td",{className:"px-4 py-2.5 text-right text-sky-200 font-bold tabular-nums",children:v.avgProjectsWk.toFixed(1)})]})})()]})]})})]}),h.jsxs("div",{className:"flex gap-5 items-start",children:[h.jsx("div",{className:"w-[295px] shrink-0",style:{position:"sticky",top:"1rem"},children:h.jsx("div",{className:"overflow-y-auto space-y-3 pr-0.5",style:{maxHeight:"calc(100vh - 210px)"},children:l.map(v=>h.jsx(Uae,{stats:v,selected:d===v.projectType,onClick:()=>x(v.projectType)},v.projectType))})}),h.jsx("div",{className:"flex-1 min-w-0 space-y-5",children:d&&i.has(d)&&h.jsxs(h.Fragment,{children:[h.jsx($ae,{stats:i.get(d)}),h.jsx(Hae,{stats:i.get(d),allLogs:p}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200 mb-0.5",children:"Panel 4 — Duration vs Efficiency"}),h.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"Each dot = 1 project · X = working days · Y = h/asset (lower = more efficient) · Bubble size ∝ hours logged"}),h.jsx(to,{width:"100%",height:440,children:h.jsxs(Fae,{margin:{top:20,right:30,bottom:50,left:20},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{type:"number",dataKey:"x",name:"Duration (days)",tick:{fill:"#94a3b8",fontSize:10},label:{value:"Duration (working days)",position:"insideBottom",offset:-10,fill:"#64748b",fontSize:11}}),h.jsx(Xn,{type:"number",dataKey:"y",name:"h/asset",tick:{fill:"#94a3b8",fontSize:10},label:{value:"h / asset",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:11,dy:30}}),h.jsx(ec,{type:"number",dataKey:"z",range:[30,300],name:"Total hours"}),h.jsx(Jr,{content:h.jsx(qae,{}),cursor:{strokeDasharray:"3 3"}}),d&&h.jsx(tc,{name:d,data:u.get(d)??[],fill:UN[f.indexOf(d)%UN.length],opacity:.8})]})})]})]})})]})]})]})}const t1=e=>{var t,r;return((t=e.timeLogStartDisplay)==null?void 0:t.slice(0,10))||((r=e.date)==null?void 0:r.slice(0,10))||""},Kae=/\b(sick(ness)?( leave)?|annual leave|bank holiday|personal leave|compassionate leave|maternity|paternity|public holiday)\b/i;function WN(e){const t=`${e.taskDescription||""} ${e.projectTitle||""} ${e.projectNumber||""} ${e.projectBillingType||""}`.toLowerCase();return Kae.test(t)}const HN=new Set($l.filter(e=>e.department==="Operation Team").map(e=>Jt(e.email)));function r1(e){const t=e.toUpperCase();return t==="APPROVED"||t==="COMPLETE"||t==="CANCELLED"||t==="REJECTED"||t==="DECLINED"}function nd(e){const[t,r]=e.split("-W").map(Number),n=new Date(Date.UTC(t,0,4)),a=n.getUTCDay()||7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-(a-1)+(r-1)*7),i.toISOString().split("T")[0]}const qN=["#10b981","#6366f1","#f97316","#f59e0b","#3b82f6","#06b6d4","#8b5cf6","#ec4899","#ef4444","#84cc16","#d946ef","#64748b","#14b8a6","#a16207"],Gae=[["country pull-simple","#10b981"],["country pull-adaptation","#6366f1"],["country pull-creation","#f97316"],["country retailer request","#f59e0b"],["global push-pdp","#3b82f6"],["local push-pdp","#06b6d4"],["global push-eventing","#8b5cf6"],["local push-eventing","#ec4899"],["globally initiated","#ef4444"],["locally initiated","#84cc16"]];function es(e,t){const r=e.toLowerCase();for(const[n,a]of Gae)if(r===n||r.startsWith(n))return a;return qN[t%qN.length]}function Xae(e){const t=(e||"").trim();return t==="Global Initiated"||t==="Globally Initiated"?"Globally Initiated":t==="Local Initiated"||t==="Locally Initiated"?"Locally Initiated":t}const ad=["COUNTRY PULL - SIMPLE","COUNTRY PULL - ADAPTATION","COUNTRY PULL - CREATION","GLOBAL PUSH - PDP","LOCAL PUSH - PDP","GLOBAL PUSH - EVENTING","LOCAL PUSH - EVENTING","Globally Initiated","Locally Initiated"];function bn(e){const t=new Date(e+"T00:00:00Z"),r=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-r);const n=new Date(Date.UTC(t.getUTCFullYear(),0,1)),a=Math.ceil(((t.getTime()-n.getTime())/864e5+1)/7);return`${t.getUTCFullYear()}-W${String(a).padStart(2,"0")}`}function ts(e){const[t,r]=e.split("-W").map(Number),n=new Date(Date.UTC(t,0,4)),a=n.getUTCDay()||7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-(a-1)+(r-1)*7),`${String(i.getUTCDate()).padStart(2,"0")}/${String(i.getUTCMonth()+1).padStart(2,"0")}`}const VN=e=>e&&e.length>=10?`${e.slice(8,10)}/${e.slice(5,7)}/${e.slice(0,4)}`:e;function Yae({active:e,payload:t,label:r}){if(!e||!(t!=null&&t.length))return null;const n=t.filter(l=>l.name&&!String(l.name).startsWith("_")&&l.name!==""),a=t.find(l=>l.name==="_dynamicThreshold"),i=t.find(l=>l.name==="_dueAssets"),s=n.reduce((l,u)=>l+(Number(u.value)||0),0);return h.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-lg p-3 text-xs shadow-xl min-w-[200px]",children:[h.jsx("div",{className:"font-semibold text-white mb-2",children:r}),n.filter(l=>l.value>0).map(l=>h.jsxs("div",{className:"flex justify-between gap-6",children:[h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"w-2 h-2 rounded-sm shrink-0",style:{background:l.fill}}),h.jsx("span",{className:"text-slate-300 truncate max-w-[140px]",children:l.name})]}),h.jsx("span",{className:"text-white font-semibold",children:Number(l.value).toLocaleString()})]},l.name)),a&&h.jsxs("div",{className:"flex justify-between gap-6 border-t border-slate-700 mt-1.5 pt-1.5",children:[h.jsx("span",{className:"text-rose-400",children:"Dynamic capacity"}),h.jsx("span",{className:"text-rose-300 font-semibold",children:Number(a.value).toFixed(0)})]}),i&&Number(i.value)>0&&h.jsxs("div",{className:"flex justify-between gap-6 border-t border-slate-700 mt-1.5 pt-1.5",children:[h.jsx("span",{className:"text-violet-400",children:"Assets due"}),h.jsx("span",{className:"text-violet-300 font-semibold",children:Number(i.value).toLocaleString()})]}),h.jsxs("div",{className:"flex justify-between gap-6 border-t border-slate-700 mt-1.5 pt-1.5",children:[h.jsx("span",{className:"text-slate-400",children:"Total assets"}),h.jsx("span",{className:"text-emerald-300 font-bold",children:s.toLocaleString()})]})]})}function Zae({logs:e,deliverables:t}){const[r,n]=Q.useState("weekly"),[a,i]=Q.useState(!0),[s,l]=Q.useState(!0),[u,f]=Q.useState(!0),[d,p]=Q.useState(!1),x=Q.useMemo(()=>tF(e),[e]),v=Q.useMemo(()=>iF(x),[x]),w=Q.useMemo(()=>aF(v).mergedMap,[v]),b=Q.useMemo(()=>Array.from(v.values()).sort((F,R)=>R.totalAssets-F.totalAssets),[v]),g=Q.useMemo(()=>{let F=0,R=0;for(const Y of v.values())F+=Y.totalHours,R+=Y.totalAssets;return R>0?F/R:0},[v]),k=Q.useMemo(()=>{const F=new Map;for(const R of e){const Y=R.projectNumber||R.projectTitle;if(!Y)continue;F.has(Y)||F.set(Y,{assetCount:0,projectType:R.projectType,endDate:R.projectEndDate??""});const fe=F.get(Y);R.assetCount!==null&&R.assetCount>fe.assetCount&&(fe.assetCount=R.assetCount),R.projectEndDate&&R.projectEndDate>fe.endDate&&(fe.endDate=R.projectEndDate)}return F},[e]),A=Q.useMemo(()=>{const F=new Map;for(const[,R]of k)!R.endDate||R.assetCount<=0||F.set(R.endDate,(F.get(R.endDate)??0)+R.assetCount);return F},[k]),S=Q.useMemo(()=>{const F=new Map;for(const R of e){const Y=t1(R);if(!Y)continue;F.has(Y)||F.set(Y,{projects:new Set,hours:0,people:new Set});const fe=F.get(Y),ce=R.projectNumber||R.projectTitle;ce&&fe.projects.add(ce),fe.hours+=R.hoursLogged,HN.has(Jt(R.submitterEmail||""))||fe.people.add(R.submitterEmail||R.submitter)}return Array.from(F.entries()).sort(([R],[Y])=>R.localeCompare(Y)).map(([R,{projects:Y,hours:fe,people:ce}])=>{const se={};let he=0;for(const Ce of Y){const I=k.get(Ce);if(!I||I.assetCount<=0)continue;const qe=I.projectType||"Unknown";se[qe]=(se[qe]??0)+I.assetCount,he+=I.assetCount}return{date:R,byType:se,hours:fe,people:ce.size,totalAssets:he,dueAssets:A.get(R)??0}})},[e,k,A]),N=Q.useMemo(()=>{const F=new Map;for(const Y of e){const fe=t1(Y);if(!fe)continue;const ce=bn(fe);F.has(ce)||F.set(ce,{projects:new Set,hours:0,people:new Set});const se=F.get(ce),he=Y.projectNumber||Y.projectTitle;he&&se.projects.add(he),se.hours+=Y.hoursLogged,HN.has(Jt(Y.submitterEmail||""))||se.people.add(Y.submitterEmail||Y.submitter)}const R=new Map;for(const[Y,fe]of A){const ce=bn(Y);R.set(ce,(R.get(ce)??0)+fe)}return Array.from(F.entries()).sort(([Y],[fe])=>Y.localeCompare(fe)).map(([Y,{projects:fe,hours:ce,people:se}])=>{const he={};let Ce=0;for(const I of fe){const qe=k.get(I);if(!qe||qe.assetCount<=0)continue;const Ne=qe.projectType||"Unknown";he[Ne]=(he[Ne]??0)+qe.assetCount,Ce+=qe.assetCount}return{week:Y,label:ts(Y),byType:he,hours:ce,people:se.size,totalAssets:Ce,dueAssets:R.get(Y)??0}})},[e,k,A]),T=Q.useMemo(()=>S.reduce((F,R)=>Math.max(F,R.people),0),[S]),E=g>0?T*8*5/g:0,j=r==="daily"?g>0?T*8/g:0:E,D=Q.useMemo(()=>{const F=new Set;for(const R of S)Object.keys(R.byType).forEach(Y=>F.add(Y));return Array.from(F).sort()},[S]),P="2025-01-01",H=Q.useMemo(()=>{if(!(t!=null&&t.length))return null;const F=new Date().toISOString().split("T")[0],R=new Map;for(const Y of t){if(!Y.deliverableEndDate||r1(Y.deliverableStatus)||Y.projectStatus==="COMPLETE"||Y.projectStatus==="DECLINED")continue;const fe=bn(Y.deliverableEndDate);R.has(fe)||R.set(fe,{byType:{},total:0});const ce=R.get(fe),se=Y.projectType||"Unknown";ce.byType[se]=(ce.byType[se]??0)+1,ce.total++}return Array.from(R.entries()).filter(([Y])=>Y>=bn(P)).sort(([Y],[fe])=>Y.localeCompare(fe)).map(([Y,{byType:fe,total:ce}])=>({week:Y,label:ts(Y),byType:fe,total:ce,isFuture:nd(Y)>F}))},[t]),U=Q.useMemo(()=>{if(!(t!=null&&t.length))return null;const F=new Date().toISOString().split("T")[0],R=t.filter(ce=>!r1(ce.deliverableStatus)&&ce.projectStatus!=="COMPLETE"&&ce.projectStatus!=="DECLINED"&&ce.deliverableStartDate<=F&&ce.deliverableEndDate>=F),Y={};for(const ce of R){const se=ce.projectType||"Unknown";Y[se]=(Y[se]??0)+1}const fe=t.filter(ce=>!r1(ce.deliverableStatus)&&ce.projectStatus!=="COMPLETE"&&ce.projectStatus!=="DECLINED"&&ce.deliverableStartDate>F).length;return{count:R.length,byType:Y,upcoming:fe}},[t]),B=Q.useMemo(()=>{if(!H)return[];const F=new Set;for(const R of H)Object.keys(R.byType).forEach(Y=>F.add(Y));return Array.from(F).sort()},[H]),V=Q.useMemo(()=>{if(H){const fe=new Date().toISOString().split("T")[0];return H.filter(ce=>ce.week>=bn(P)).map(ce=>({label:ce.label,_totalAssets:ce.total,_zero:0,_dynamicThreshold:0,_dueAssets:0,_today:ce.week===bn(fe)?ce.total:null,...ce.byType}))}const F=S.filter(fe=>fe.date>=P),R=N.filter(fe=>fe.week>=bn(P));return(r==="daily"?F:R).map(fe=>({label:r==="daily"?VN(fe.date):fe.label,_dynamicThreshold:g>0?fe.hours/g:0,_dueAssets:fe.dueAssets,_totalAssets:fe.totalAssets,_zero:0,...fe.byType}))},[H,r,S,N,g]),W=H?B:D,G=Q.useMemo(()=>{const F={};for(const R of $l)R.department&&R.department!=="Unknown"&&R.department!=="Operation Team"&&(F[R.department]=(F[R.department]??0)+1);return F},[]),ne=Q.useMemo(()=>{if(!(H!=null&&H.length))return null;const F=new Date().toISOString().split("T")[0],R=bn(F),Y=(ce,se)=>{const he=new Date(nd(ce)+"T00:00:00Z");return he.setUTCDate(he.getUTCDate()+se*7),bn(he.toISOString().split("T")[0])},fe=ce=>H.find(se=>se.week===ce);return[{label:`This week (${ts(R)})`,wk:R,entry:fe(R),isThisWeek:!0},{label:`Next week (${ts(Y(R,1))})`,wk:Y(R,1),entry:fe(Y(R,1)),isThisWeek:!1},{label:ts(Y(R,2)),wk:Y(R,2),entry:fe(Y(R,2)),isThisWeek:!1},{label:ts(Y(R,3)),wk:Y(R,3),entry:fe(Y(R,3)),isThisWeek:!1}]},[H]),te=Q.useMemo(()=>{const F=new Date().toISOString().split("T")[0],R=nd(bn(F)),Y=new Set;let fe=0;const ce=F.slice(0,7);let se=0;const he=new Set;for(const ut of e){const it=t1(ut);if(it&&(it>=R&&it<=F&&(WN(ut)||(fe+=ut.hoursLogged),Y.add(it)),it.slice(0,7)===ce)){WN(ut)||(se+=ut.hoursLogged);const _t=ut.projectNumber||ut.projectTitle;_t&&he.add(_t)}}const Ce=Y.size,I=T*8,qe=I*5,Ne=qe>0?fe/qe*100:0,De=Math.max(0,qe-fe),Fe=new Date(F+"T12:00:00").getDay(),Se=Fe>=1&&Fe<=5?5-Fe:0,[Je,pt]=ce.split("-").map(Number),Ge=new Date(Je,pt-1).toLocaleString("default",{month:"long",year:"numeric"});return{dailyCapHours:I,weeklyCapHours:qe,weeklyFixedCapHours:qe,hoursThisWeek:fe,monthlyHoursLogged:se,elapsedCapHours:Ce*I,workingDaysElapsed:Ce,workingDaysLeftThisWeek:Se,remainingDays:Se,remainingHours:De,utilisationPct:Ne,periodLabel:Ge,activeProjectCount:he.size,assetsRunningThisWeek:0,assetsByTypeThisWeek:{},latestLogDate:F,refWkMonday:R}},[e,T]),oe=Q.useMemo(()=>{if(!(t!=null&&t.length))return null;const F=new Date,R=F.getDay(),Y=new Date(F);Y.setDate(F.getDate()-(R===0?6:R-1));const fe=Ne=>Ne.toISOString().split("T")[0],ce=Array.from({length:4},(Ne,De)=>{const Fe=new Date(Y);Fe.setDate(Y.getDate()+De*7);const Se=new Date(Fe);return Se.setDate(Fe.getDate()+6),{label:De===0?"This Week":De===1?"Next Week":`Week +${De}`,ukRange:`${Fe.getDate()}/${Fe.getMonth()+1} – ${Se.getDate()}/${Se.getMonth()+1}`,start:fe(Fe),end:fe(Se)}}),se=ce.map(Ne=>{const De={},Fe={};let Se=0,Je=0;for(const Ge of t){const ut=Ge.deliverableStartDate,it=Ge.deliverableEndDate;if(!ut||!it||ut>it)continue;const _t=Xae(Ge.projectType),Lt=Math.max(1,Math.round((new Date(it+"T00:00:00Z").getTime()-new Date(ut+"T00:00:00Z").getTime())/864e5)+1),Tt=utNe.end?Ne.end:it;if(Tt>Tr)continue;const qt=(Math.round((new Date(Tr+"T00:00:00Z").getTime()-new Date(Tt+"T00:00:00Z").getTime())/864e5)+1)/Lt;De[_t]=(De[_t]??0)+qt,Se+=qt,it>=Ne.start&&it<=Ne.end&&(Fe[_t]=(Fe[_t]??0)+1,Je++)}const pt={};for(const[Ge,ut]of Object.entries(De))pt[Ge]=Math.round(ut);return{...Ne,typeActive:pt,typeExiting:Fe,totalActive:Math.round(Se),totalExiting:Je,exitRate:Se>0?Je/Se*100:0}}),he=ce[1],Ce=t.filter(Ne=>Ne.deliverableStartDate>=he.start&&Ne.deliverableStartDate<=he.end).length,I=se[1].totalActive,qe=se.map(Ne=>({label:Ne.label,ukRange:Ne.ukRange,_exiting:Ne.totalExiting,...Object.fromEntries(ad.map(De=>[De,Ne.typeActive[De]??0]))}));return{weeks:se,newStartsNextWeek:Ce,activeNextWeek:I,chartData:qe}},[t]),z=Q.useMemo(()=>{var Ne;const F=(U==null?void 0:U.byType)??{};let R=0;if(U)for(const[De,Fe]of Object.entries(F)){const Se=((Ne=v.get(De))==null?void 0:Ne.avgHoursPerAsset)??0;R+=Fe*Se}const Y=te.weeklyCapHours,fe=Math.max(0,Y-(R>0?R:te.hoursThisWeek)),ce=new Set([...Array.from(v.keys()),...Object.keys(F)]),se=Array.from(ce).map(De=>{var Ar,ot,At;const Fe=F[De]??0,Se=v.get(De),Je=(Se==null?void 0:Se.avgHoursPerAsset)??0,pt=[];if(Se&&Se.totalAssets>0){for(const[er,Bt]of Object.entries(Se.deptHours)){const vn=Bt/Se.totalAssets;if(vn<=0)continue;const Ia=G[er]??0;Ia<=0||pt.push({dept:er,maxAssets:Math.round(Ia*8*5/vn),headcount:Ia})}pt.sort((er,Bt)=>er.maxAssets-Bt.maxAssets)}const Ge=((Ar=pt[0])==null?void 0:Ar.maxAssets)??0,ut=((ot=pt[0])==null?void 0:ot.dept)??"",it=((At=pt[0])==null?void 0:At.headcount)??0,_t=Je>0?Math.floor(fe/Je):0,Lt=Ge>0?Math.max(0,Ge-Fe):0,Tt=Ge>0?Math.min(_t,Lt):_t,Tr=Ge>0&&Fe>Ge,Rr=Tr?Fe-Ge:0,qt=Ge>0?Fe/Ge:0;return{type:De,active:Fe,hoursPerAsset:Je,deptCapacity:Ge,bottleneckDept:ut,bottleneckHeadcount:it,deptBreakdown:pt,hoursBasedMax:_t,canTakeOn:Tt,isOver:Tr,moveOut:Rr,pct:qt,hasActiveDelivs:Fe>0,hasBenchmark:!!Se}});se.sort((De,Fe)=>De.isOver!==Fe.isOver?De.isOver?-1:1:De.hasActiveDelivs!==Fe.hasActiveDelivs?De.hasActiveDelivs?-1:1:Math.abs(Fe.pct-De.pct)>.001?Fe.pct-De.pct:Fe.active-De.active);const he=se.filter(De=>De.isOver),Ce=se.filter(De=>De.bottleneckDept.toLowerCase().includes("opera")),I=Ce.length>0?` Opera Upload Team (1 person) is the bottleneck for ${Ce.length} type${Ce.length>1?"s":""} — even small spikes will overflow.`:"",qe=(()=>{if(!se.length)return"";if(he.length>0){const Fe=he.slice(0,2).map(Se=>Se.type).join(", ");return`${he.length} type${he.length>1?"s are":" is"} over weekly dept capacity: ${Fe}. These assets need to be moved out or timelines extended.${I}`}const De=se.find(Fe=>Fe.hasActiveDelivs&&Fe.deptCapacity>0);return De?`All active types are within capacity. ${De.type} is the most loaded at ${(De.pct*100).toFixed(0)}% — ${De.canTakeOn} more assets can be taken on before hitting the ${De.bottleneckDept} limit.${I}`:`Benchmark loaded for ${se.length} project types. Upload the deliverable CSV to see live active counts vs department capacity.`})();return{typeRows:se,insight:qe,totalCommittedHours:R}},[U,v,G,te]),ie=Q.useMemo(()=>{const F=[];for(const[fe,ce]of w){if(ce.totalAssets<=0)continue;const se=ce.monthlyStats.filter(De=>De.projectCount>0).length||1,he=ce.totalAssets/se,Ce=he/4.33;let I=0,qe="",Ne=1/0;for(const[De,Fe]of Object.entries(ce.deptHours)){const Se=Fe/ce.totalAssets;if(Se<=0)continue;const Je=G[De]??0;if(Je<=0)continue;const pt=Math.round(Je*8*5/Se);ptce.avgPerWeek-fe.avgPerWeek);const R=F.reduce((fe,ce)=>fe+ce.avgPerWeek,0),Y=F.reduce((fe,ce)=>fe+(ce.deptCapPerWeek||0),0);return{rows:F,totalAvgPerWeek:R,totalCapPerWeek:Y}},[w,G]),K=(()=>{if(b.length===0)return"";const F=b.filter(ce=>ce.avgHoursPerAsset>0);if(F.length===0)return"";const R=F.reduce((ce,se)=>se.avgHoursPerAssetse.avgHoursPerAsset>ce.avgHoursPerAsset?se:ce,F[0]);if(R.projectType===Y.projectType)return`One type benchmarked: ${R.projectType} at ${R.avgHoursPerAsset.toFixed(1)}h/asset.`;const fe=(Y.avgHoursPerAsset/R.avgHoursPerAsset).toFixed(1);return`${R.projectType} is the lightest at ${R.avgHoursPerAsset.toFixed(1)}h/asset; ${Y.projectType} requires ${Y.avgHoursPerAsset.toFixed(1)}h — ${fe}× more intensive. When capacity is tight, prioritise lighter types to maximise throughput.`})(),C=(()=>{if(H!=null&&H.length){const ce=new Date().toISOString().split("T")[0],se=bn(ce),he=new Date(nd(se)+"T00:00:00Z");he.setUTCDate(he.getUTCDate()+7);const Ce=bn(he.toISOString().split("T")[0]),I=H.find(Je=>Je.week===se),qe=H.find(Je=>Je.week===Ce),Ne=H.reduce((Je,pt)=>pt.total>Je.total?pt:Je,H[0]),De=H.filter(Je=>E>0&&Je.total>E),Fe=De.length>0?`${De.length} week${De.length>1?"s exceed":" exceeds"} the ceiling of ${Math.round(E)} assets/wk`:`no weeks exceed the ceiling of ${Math.round(E)} assets/wk`,Se=I||qe?` This week: ${(I==null?void 0:I.total)??0} due; next week: ${(qe==null?void 0:qe.total)??0}.`:"";return`Pipeline peaks at ${Ne.total.toLocaleString()} assets in week ${Ne.label}, and ${Fe}.${Se}`}const F=r==="daily"?S.filter(ce=>ce.date>=P).map(ce=>({totalAssets:ce.totalAssets,label:VN(ce.date)})):N.filter(ce=>ce.week>=bn(P)).map(ce=>({totalAssets:ce.totalAssets,label:ce.label}));if(!F.length)return"";const R=F.reduce((ce,se)=>se.totalAssets>ce.totalAssets?se:ce,F[0]),Y=F.filter(ce=>j>0&&ce.totalAssets>j),fe=Y.length>0?`${Y.length} ${r==="daily"?"day":"week"}${Y.length!==1?"s":""} exceeded the ceiling`:"no periods exceeded the ceiling";return`Peak was ${R.totalAssets.toLocaleString()} assets in ${R.label}, and ${fe} of ${Math.round(j)} assets.`})(),re=(()=>{const F=ce=>`${parseInt(ce.slice(8,10))}/${parseInt(ce.slice(5,7))}`,R=te.refWkMonday,Y=new Date(R+"T00:00:00Z");Y.setUTCDate(Y.getUTCDate()+4);const fe=Y.toISOString().split("T")[0];return`${F(R)} – ${F(fe)}`})();return x.length===0?h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-12 text-center",children:[h.jsx("p",{className:"text-slate-400 text-sm",children:"No completed projects with asset counts found in the time log."}),h.jsx("p",{className:"text-slate-600 text-xs mt-2",children:"Benchmark requires projects with Status = COMPLETE, a No. of Assets value, and project dates."})]}):h.jsxs("div",{className:"flex gap-5 items-start",children:[h.jsxs("div",{className:"flex-1 min-w-0 space-y-6",children:[h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 overflow-hidden",children:[h.jsxs("div",{className:"px-5 py-3 border-b border-slate-800 flex items-center justify-between gap-3 flex-wrap",children:[h.jsxs("div",{children:[h.jsxs("p",{className:"text-sm font-semibold text-slate-200",children:["This Week's Capacity Status · ",re]}),h.jsxs("p",{className:"text-[10px] text-slate-500 mt-0.5",children:["Mon–to-yesterday actual hours ·"," ",h.jsx("span",{className:"text-amber-500/80",children:"timesheet & deliverable data are both 1 day delayed"})]})]}),U?h.jsx("span",{className:"text-[10px] bg-emerald-900/40 text-emerald-400 border border-emerald-700/40 px-2 py-0.5 rounded-full",children:"Deliverable CSV loaded"}):h.jsx("span",{className:"text-[10px] bg-amber-900/30 text-amber-500 border border-amber-700/30 px-2 py-0.5 rounded-full",children:"Upload Deliverable CSV for live counts"})]}),(()=>{const F=te.weeklyCapHours,R=te.utilisationPct,Y=oe==null?void 0:oe.weeks[0],fe=ie.rows.reduce((Se,Je)=>Se+Math.round(Je.avgPerWeek),0),ce=(Y==null?void 0:Y.totalActive)??0,se=Math.max(0,fe-ce),he=(Y==null?void 0:Y.totalExiting)??0,Ce=(Y==null?void 0:Y.exitRate)??0,I=(oe==null?void 0:oe.activeNextWeek)??0,qe=(()=>{var Je;if(!Y)return U?z.totalCommittedHours:0;let Se=0;for(const[pt,Ge]of Object.entries(Y.typeActive)){const ut=((Je=v.get(pt))==null?void 0:Je.avgHoursPerAsset)??g;Se+=Ge*ut}return Se})(),Ne=(Y==null?void 0:Y.totalActive)??(U==null?void 0:U.count)??0,De=F>0?qe/F*100:0,Fe=Math.max(0,F-qe);return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 divide-x divide-y lg:divide-y-0 divide-slate-800",children:[h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-3",children:"Weekly Team Capacity"}),h.jsxs("div",{className:"text-3xl font-black text-slate-200",children:[F.toLocaleString(),h.jsx("span",{className:"text-lg font-normal text-slate-500",children:"h"})]}),h.jsxs("div",{className:"text-[10px] text-slate-600 mt-2 leading-relaxed",children:[T," ppl × 8h × 5 days"]})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-3",children:"Forecast Hours Needed This Week"}),h.jsxs("div",{className:`text-3xl font-black ${Y||U?qe>F?"text-rose-400":"text-amber-400":"text-slate-600"}`,children:[Y||U?qe.toFixed(0):"—",(Y||U)&&h.jsx("span",{className:"text-lg font-normal text-slate-500",children:"h"})]}),h.jsx("div",{className:"text-[10px] text-slate-600 mt-2 leading-relaxed",children:Y||U?`${Ne.toLocaleString()} weighted assets × h/asset`:"upload deliverable CSV"})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-3",children:"Hours Logged This Week"}),h.jsxs("div",{className:"text-3xl font-black text-cyan-400",children:[te.hoursThisWeek.toFixed(0),h.jsx("span",{className:"text-lg font-normal text-slate-500",children:"h"})]}),h.jsxs("div",{className:"text-[10px] text-slate-600 mt-2 leading-relaxed",children:["wk ",ts(bn(te.latestLogDate)),te.workingDaysElapsed>0?` · ${te.workingDaysElapsed}d data`:""]})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-3",children:"Available Hours This Week"}),h.jsxs("div",{className:`text-3xl font-black ${(U?Fe:te.remainingHours)>0?"text-emerald-400":"text-rose-400"}`,children:[U?Fe.toFixed(0):te.remainingHours.toFixed(0),h.jsx("span",{className:"text-lg font-normal text-slate-500",children:"h"})]}),h.jsxs("div",{className:"text-[10px] text-slate-600 mt-2 leading-relaxed",children:[te.workingDaysLeftThisWeek," day",te.workingDaysLeftThisWeek!==1?"s":""," left this week"]})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-1",children:"This Week Utilisation"}),h.jsx("div",{className:"text-[9px] text-amber-400 uppercase tracking-widest mb-2 font-semibold",children:"Forecast"}),h.jsx("div",{className:`text-3xl font-black ${U?De>85?"text-rose-400":De>60?"text-amber-400":"text-emerald-400":"text-slate-600"}`,children:U?`${De.toFixed(0)}%`:"—"}),h.jsx("div",{className:"text-[10px] text-slate-600 mt-2 leading-relaxed",children:"Team capacity vs forecast hours"})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-1",children:"This Week Utilisation"}),h.jsx("div",{className:"text-[9px] text-cyan-400 uppercase tracking-widest mb-2 font-semibold",children:"Actual"}),h.jsxs("div",{className:`text-3xl font-black ${R>85?"text-rose-400":R>60?"text-amber-400":"text-emerald-400"}`,children:[R.toFixed(0),"%"]}),h.jsx("div",{className:"text-[10px] text-slate-600 mt-2 leading-relaxed",children:"Team capacity vs hours logged"})]})]}),h.jsxs("div",{className:"border-t border-slate-700 grid grid-cols-6 divide-x divide-slate-700/60",style:{background:"#0d1629"},children:[h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-400 uppercase tracking-wide mb-3",children:"Weekly Total Asset Forecast"}),h.jsx("div",{className:"text-4xl font-black text-amber-400",children:x.length>0?fe.toLocaleString():"—"}),h.jsxs("button",{onClick:()=>p(Se=>!Se),className:"flex items-center gap-1.5 mt-2 text-[10px] text-slate-500 hover:text-slate-300 transition-colors group",children:["Avg deliverables/wk (historical)",h.jsx("svg",{className:`w-3 h-3 shrink-0 transition-transform duration-200 ${d?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),d&&ie.rows.length>0&&h.jsx("div",{className:"mt-3 pt-3 border-t border-slate-700/50 space-y-1",children:ie.rows.map((Se,Je)=>h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-slate-500 truncate",children:[h.jsx("span",{className:"w-1.5 h-1.5 rounded-sm shrink-0",style:{background:es(Se.type,Je)}}),Se.type]}),h.jsx("span",{className:"text-[10px] font-semibold text-amber-300 shrink-0 tabular-nums",children:Math.round(Se.avgPerWeek).toLocaleString()})]},Se.type))})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-400 uppercase tracking-wide mb-3",children:"Active Asset In Flight"}),h.jsx("div",{className:"text-4xl font-black text-cyan-400",children:oe?ce.toLocaleString():"—"}),h.jsx("div",{className:"text-[10px] text-slate-500 mt-2 leading-relaxed",children:"Weighted daily count (start–end overlap)"})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-400 uppercase tracking-wide mb-3",children:"Available Asset to Take On"}),h.jsx("div",{className:`text-4xl font-black ${oe?se>0?"text-emerald-400":"text-rose-400":"text-slate-600"}`,children:oe?se.toLocaleString():"—"}),h.jsx("div",{className:"text-[10px] text-slate-500 mt-2 leading-relaxed",children:"Forecast − active in flight"})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-400 uppercase tracking-wide mb-3",children:"Exiting This Week"}),h.jsx("div",{className:"text-4xl font-black text-rose-400",children:oe?he.toLocaleString():"—"}),h.jsx("div",{className:"text-[10px] text-slate-500 mt-2 leading-relaxed",children:"Assets whose end date falls this week"})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-400 uppercase tracking-wide mb-3",children:"Exiting Rate"}),h.jsx("div",{className:`text-4xl font-black ${oe?"text-rose-400":"text-slate-600"}`,children:oe?`${Ce.toFixed(0)}%`:"—"}),h.jsx("div",{className:"text-[10px] text-slate-500 mt-2 leading-relaxed",children:"Exiting ÷ active in flight"})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"text-[10px] text-slate-400 uppercase tracking-wide mb-3",children:"Active Next Week"}),h.jsx("div",{className:`text-4xl font-black ${oe?"text-violet-400":"text-slate-600"}`,children:oe?I.toLocaleString():"—"}),h.jsxs("div",{className:"text-[10px] text-slate-500 mt-2 leading-relaxed",children:[(oe==null?void 0:oe.weeks[1].ukRange)??"upload deliverable CSV",oe&&oe.newStartsNextWeek>0&&h.jsxs("span",{className:"ml-1 text-emerald-400",children:["· ",oe.newStartsNextWeek," new"]})]})]})]})]})})()]}),oe&&h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5 space-y-5",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200",children:"Weekly Pipeline — Active & Exiting Assets"}),h.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Active = proportional daily weight (days in week ÷ total asset duration). Exiting = deliverable end date falls within the week."})]}),h.jsxs("div",{children:[h.jsx("div",{style:{height:380},children:h.jsx(to,{width:"100%",height:"100%",children:h.jsxs(xs,{data:oe.chartData,margin:{top:24,right:60,left:0,bottom:10},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"label",tick:F=>{var R;return h.jsxs("g",{transform:`translate(${F.x},${F.y})`,children:[h.jsx("text",{x:0,y:0,dy:14,textAnchor:"middle",fill:"#94a3b8",fontSize:12,children:F.payload.value}),h.jsx("text",{x:0,y:0,dy:27,textAnchor:"middle",fill:"#64748b",fontSize:10,children:((R=oe.chartData[F.index])==null?void 0:R.ukRange)??""})]})},height:45}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:11},tickFormatter:F=>F>=1e3?`${(F/1e3).toFixed(0)}k`:String(F)}),h.jsx(Jr,{contentStyle:{background:"#0f172a",border:"1px solid #334155",borderRadius:8,fontSize:12},formatter:(F,R)=>R==="_exiting"?[Number(F).toLocaleString(),"Exiting"]:[Number(F).toLocaleString(),R],labelFormatter:(F,R)=>{var Y,fe;return`${F} · ${((fe=(Y=R==null?void 0:R[0])==null?void 0:Y.payload)==null?void 0:fe.ukRange)??""}`}}),ad.map((F,R)=>h.jsx(jt,{dataKey:F,stackId:"active",fill:es(F,R),name:F,maxBarSize:80},F)),ie.totalAvgPerWeek>0&&h.jsx(ms,{y:ie.totalAvgPerWeek,stroke:"#06b6d4",strokeDasharray:"6 4",strokeWidth:1.5,label:{value:`Forecast avg · ${Math.round(ie.totalAvgPerWeek).toLocaleString()} assets/wk`,position:"insideTopLeft",fill:"#06b6d4",fontSize:11,fontWeight:600}}),h.jsx(Hr,{type:"monotone",dataKey:"_exiting",name:"_exiting",stroke:"#f43f5e",strokeWidth:2.5,dot:{r:5,fill:"#f43f5e",strokeWidth:0},activeDot:{r:7},legendType:"none",children:h.jsx(lt,{dataKey:"_exiting",position:"top",offset:8,style:{fill:"#f43f5e",fontSize:11,fontWeight:700},formatter:F=>F>0?F.toLocaleString():""})})]})})}),h.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 mt-3",children:[ad.map((F,R)=>h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm shrink-0",style:{background:es(F,R)}}),F]},F)),h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-rose-400",children:[h.jsx("span",{className:"w-5 border-t-2 border-solid border-rose-400 inline-block"})," Exiting"]}),ie.totalAvgPerWeek>0&&h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-cyan-400",children:[h.jsx("span",{className:"w-5 border-t-2 border-dashed border-cyan-400 inline-block"})," Forecast avg"]})]})]}),h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-xs border-collapse min-w-[680px]",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"border-b border-slate-700",children:[h.jsx("th",{className:"text-left py-2 pr-4 text-slate-400 font-medium w-48",children:"Project Type"}),oe.weeks.map(F=>h.jsxs(Q.Fragment,{children:[h.jsxs("th",{className:"text-right py-2 px-3 text-amber-400/80 font-medium whitespace-nowrap",children:[F.label,h.jsx("br",{}),h.jsx("span",{className:"text-slate-500 font-normal text-[10px]",children:F.ukRange})]}),h.jsx("th",{className:"text-right py-2 px-3 text-rose-400/80 font-medium whitespace-nowrap",children:"Exit"})]},F.label))]})}),h.jsxs("tbody",{children:[ad.map((F,R)=>h.jsxs("tr",{className:`border-b border-slate-800/40 ${R%2===1?"bg-slate-800/20":""}`,children:[h.jsx("td",{className:"py-2 pr-4 text-slate-300 whitespace-nowrap",children:h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx("span",{className:"w-2 h-2 rounded-sm shrink-0",style:{background:es(F,R)}}),F]})}),oe.weeks.map(Y=>h.jsxs(Q.Fragment,{children:[h.jsx("td",{className:"py-2 px-3 text-right text-amber-300/90 font-medium tabular-nums",children:(Y.typeActive[F]??0).toLocaleString()}),h.jsx("td",{className:"py-2 px-3 text-right text-rose-300/80 tabular-nums",children:(Y.typeExiting[F]??0)>0?Y.typeExiting[F].toLocaleString():"—"})]},Y.label))]},F)),h.jsxs("tr",{className:"border-t-2 border-slate-600 font-semibold",children:[h.jsx("td",{className:"py-2.5 pr-4 text-slate-200",children:"Total"}),oe.weeks.map(F=>h.jsxs(Q.Fragment,{children:[h.jsx("td",{className:"py-2.5 px-3 text-right text-amber-300 tabular-nums",children:F.totalActive.toLocaleString()}),h.jsx("td",{className:"py-2.5 px-3 text-right text-rose-300 tabular-nums",children:F.totalExiting.toLocaleString()})]},F.label))]})]})]})})]}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 overflow-hidden",children:[h.jsxs("div",{className:"px-5 py-3 border-b border-slate-800",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200",children:"Can We Take On More This Week? — by Project Type"}),h.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:["Each row shows: active deliverables now → dept capacity limit → hours pool limit →"," ",h.jsx("span",{className:"text-slate-300 font-medium",children:"final decision (take on / move out)"})]}),!(t!=null&&t.length)&&h.jsx("p",{className:"text-[10px] text-amber-500/80 mt-1",children:"Showing hours-based limits only · upload Deliverable CSV to add live active counts"})]}),h.jsxs("div",{className:"hidden lg:grid lg:grid-cols-[minmax(160px,1fr)_64px_96px_96px_96px_180px] gap-x-4 px-5 py-2 border-b border-slate-800/50 text-[10px] text-slate-600 uppercase tracking-wide",children:[h.jsx("span",{children:"Project Type"}),h.jsx("span",{className:"text-right",children:"h/asset"}),h.jsx("span",{className:"text-right",children:"Active now"}),h.jsx("span",{className:"text-right",children:"Dept cap/wk"}),h.jsx("span",{className:"text-right",children:"Hours limit"}),h.jsx("span",{className:"text-right pr-1",children:"This week decision"})]}),h.jsx("div",{className:"divide-y divide-slate-800/40",children:z.typeRows.map(({type:F,active:R,hoursPerAsset:Y,deptCapacity:fe,bottleneckDept:ce,deptBreakdown:se,hoursBasedMax:he,canTakeOn:Ce,isOver:I,moveOut:qe,pct:Ne,hasActiveDelivs:De,hasBenchmark:Fe},Se)=>{const Je=fe>0?Math.min(R/fe*100,100):0,pt=I?"#ef4444":Ne>.75?"#f59e0b":"#10b981";return h.jsxs("div",{className:`px-5 py-4 ${I?"bg-rose-950/10 border-l-2 border-l-rose-600":""}`,children:[h.jsxs("div",{className:"lg:grid lg:grid-cols-[minmax(160px,1fr)_64px_96px_96px_96px_180px] gap-x-4 items-start",children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0 mb-2 lg:mb-0",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm shrink-0 mt-0.5",style:{background:es(F,Se)}}),h.jsx("span",{className:"text-xs font-semibold text-slate-200 leading-tight",children:F}),I&&h.jsx("span",{className:"text-[9px] bg-rose-900/60 text-rose-300 border border-rose-700/50 px-1.5 py-0.5 rounded-full shrink-0 font-bold",children:"OVER"})]}),h.jsx("div",{className:"hidden lg:block text-right text-xs text-slate-400",children:Y>0?`${Y.toFixed(1)}h`:h.jsx("span",{className:"text-slate-700",children:"—"})}),h.jsx("div",{className:"hidden lg:block text-right",children:De?h.jsx("span",{className:"text-sm font-bold text-slate-100",children:R.toLocaleString()}):h.jsx("span",{className:"text-slate-700 text-xs",children:"—"})}),h.jsx("div",{className:"hidden lg:block text-right",children:fe>0?h.jsx("span",{className:"text-xs text-slate-300",children:fe.toLocaleString()}):h.jsx("span",{className:"text-slate-700 text-xs",children:"—"})}),h.jsx("div",{className:"hidden lg:block text-right",children:he>0?h.jsx("span",{className:"text-xs text-slate-400",children:he.toLocaleString()}):h.jsx("span",{className:"text-slate-700 text-xs",children:"—"})}),h.jsx("div",{className:"lg:text-right",children:Fe?I?h.jsxs("div",{children:[h.jsxs("div",{className:"text-base font-black text-rose-400",children:["Move out ",qe.toLocaleString()]}),h.jsxs("div",{className:"text-[10px] text-rose-600/80 mt-0.5",children:[R," active vs ",fe,"/wk · over by ",((Ne-1)*100).toFixed(0),"%"]})]}):h.jsxs("div",{children:[h.jsx("div",{className:`text-base font-black ${Ce>0?"text-emerald-400":"text-slate-500"}`,children:Ce>0?`✓ Take on ${Ce.toLocaleString()} more`:"At capacity"}),h.jsx("div",{className:"text-[10px] text-slate-600 mt-0.5",children:De&&fe>0?`${R} active · ${fe}/wk dept cap · ${(Ne*100).toFixed(0)}% loaded`:Y>0?`${he} from hours pool · ${Y.toFixed(1)}h/asset`:"no active deliverables"})]}):h.jsx("span",{className:"text-[10px] text-slate-600",children:"No benchmark data yet"})})]}),De&&fe>0&&h.jsx("div",{className:"mt-3 ml-4",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"flex-1 h-2 bg-slate-800 rounded-full overflow-hidden",children:h.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${Math.max(Je,.3)}%`,background:pt}})}),h.jsxs("span",{className:"text-[10px] text-slate-500 w-9 text-right shrink-0",children:[(Ne*100).toFixed(0),"%"]})]})}),se.length>0&&h.jsxs("div",{className:"mt-2 ml-4 flex flex-wrap gap-x-4 gap-y-0.5 items-center",children:[se.map(({dept:Ge,maxAssets:ut,headcount:it})=>h.jsxs("span",{className:`text-[10px] ${Ge===ce?"text-rose-400 font-semibold":"text-slate-600"}`,children:[Ge===ce?"⚠ ":"",Ge,": ",ut.toLocaleString(),"/wk (",it,"p)"]},Ge)),he>0&&h.jsxs("span",{className:"text-[10px] text-indigo-400/60",children:["hours pool → ",he.toLocaleString()," max"]})]})]},F)})}),z.insight&&h.jsx("div",{className:"mx-5 mb-5 mt-3 bg-indigo-950/30 border border-indigo-800/30 rounded-lg px-4 py-3",children:h.jsxs("p",{className:"text-xs text-indigo-200 leading-relaxed",children:[h.jsx("span",{className:"text-indigo-400 font-semibold",children:"Insight · "}),z.insight]})})]}),ne&&h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200 mb-1",children:"What's Coming — Next 4 Weeks"}),h.jsxs("p",{className:"text-xs text-slate-500 mb-4",children:["Deliverables due by end date · capacity ceiling = ",Math.round(E).toLocaleString()," assets/wk"]}),h.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:ne.map(({label:F,entry:R,isThisWeek:Y})=>{const fe=(R==null?void 0:R.total)??0,ce=E>0&&fe>E;return h.jsxs("div",{className:`rounded-xl p-4 ${Y?"bg-amber-900/20 border border-amber-700/40":"bg-slate-800/40 border border-slate-700/40"}`,children:[h.jsx("div",{className:`text-[10px] font-medium mb-2 ${Y?"text-amber-400":"text-slate-500"}`,children:F}),h.jsx("div",{className:`text-3xl font-black mb-1 ${ce?"text-rose-400":Y?"text-amber-300":"text-slate-200"}`,children:fe>0?fe.toLocaleString():h.jsx("span",{className:"text-slate-600",children:"—"})}),h.jsxs("div",{className:"text-[10px] text-slate-500",children:[fe>0?"assets due":"none due",ce&&h.jsx("span",{className:"ml-1 text-rose-400 font-bold",children:"↑ over cap"})]}),fe>0&&R&&h.jsx("div",{className:"mt-2 space-y-0.5 border-t border-slate-700/40 pt-2",children:Object.entries(R.byType).sort(([,se],[,he])=>he-se).slice(0,3).map(([se,he])=>h.jsxs("div",{className:"flex justify-between text-[9px]",children:[h.jsx("span",{className:"text-slate-500 truncate mr-1",children:se}),h.jsx("span",{className:"text-slate-400 font-semibold shrink-0",children:he})]},se))})]},F)})})]}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsxs("div",{className:"flex items-start justify-between mb-4 flex-wrap gap-3",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200",children:H?"Full Pipeline — Assets Due per Week":"Assets in Production — Historical"}),h.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:H?"Each bar = deliverables due that week (by end date) · stacked by project type · dashed line = capacity ceiling":`Asset count per ${r==="daily"?"day":"week"} · stacked by project type`})]}),h.jsxs("div",{className:"flex items-center gap-3 flex-wrap text-xs",children:[!H&&h.jsx("div",{className:"flex gap-1 bg-slate-800 rounded-lg p-1",children:["weekly","daily"].map(F=>h.jsx("button",{onClick:()=>n(F),className:`px-3 py-1 rounded-md transition-colors ${r===F?"bg-indigo-600 text-white":"text-slate-400 hover:text-slate-200"}`,children:F==="weekly"?"By Week":"By Day"},F))}),h.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none text-slate-400",children:[h.jsx("input",{type:"checkbox",checked:a,onChange:F=>i(F.target.checked),className:"accent-slate-400"}),h.jsx("span",{className:"w-5 border-t-2 border-dashed border-slate-400 inline-block"}),"Ceiling (",Math.round(j).toLocaleString(),")"]}),!H&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none text-slate-400",children:[h.jsx("input",{type:"checkbox",checked:s,onChange:F=>l(F.target.checked),className:"accent-rose-400"}),h.jsx("span",{className:"w-5 border-t-2 border-solid border-rose-400 inline-block"}),"Dynamic"]}),h.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none text-slate-400",children:[h.jsx("input",{type:"checkbox",checked:u,onChange:F=>f(F.target.checked),className:"accent-violet-400"}),h.jsx("span",{className:"w-5 border-t-2 border-dashed border-violet-400 inline-block"}),"Assets due"]})]})]})]}),h.jsx(to,{width:"100%",height:380,children:h.jsxs(xs,{data:V,margin:{top:20,right:100,left:10,bottom:H?55:r==="daily"?85:55},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"label",tick:{fill:"#94a3b8",fontSize:10},angle:-30,textAnchor:"end",interval:H?Math.max(0,Math.floor(V.length/30)):r==="daily"?Math.max(0,Math.floor(V.length/28)):0}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:10},label:{value:"Assets",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:10,offset:10}}),h.jsx(Yae,{}),H&&h.jsx(ms,{x:ts(bn(new Date().toISOString().split("T")[0])),stroke:"#f59e0b",strokeWidth:2,strokeDasharray:"4 2",label:{value:"Today",position:"insideTopLeft",fill:"#f59e0b",fontSize:9}}),W.map((F,R)=>h.jsx(jt,{dataKey:F,stackId:"s",name:F,fill:es(F,R),maxBarSize:52,children:h.jsx(lt,{dataKey:F,position:"inside",style:{fill:"#fff",fontSize:8,fontWeight:700},formatter:Y=>Y>=100?Y.toLocaleString():""})},F)),h.jsx(jt,{dataKey:"_zero",stackId:"s",fill:"transparent",stroke:"none",legendType:"none",name:"",maxBarSize:52,isAnimationActive:!1,children:h.jsx(lt,{dataKey:"_totalAssets",position:"top",style:{fill:"#e2e8f0",fontSize:9,fontWeight:700},formatter:F=>F>0?F.toLocaleString():""})}),a&&j>0&&h.jsx(ms,{y:j,stroke:"#94a3b8",strokeDasharray:"6 3",strokeWidth:1.5,label:{value:`Ceiling ${Math.round(j).toLocaleString()}`,position:"insideTopRight",fill:"#94a3b8",fontSize:9}}),!H&&s&&h.jsx(Hr,{type:"monotone",dataKey:"_dynamicThreshold",name:"_dynamicThreshold",stroke:"#f43f5e",strokeWidth:2,dot:!1,legendType:"none"}),!H&&u&&h.jsx(Hr,{type:"monotone",dataKey:"_dueAssets",name:"_dueAssets",stroke:"#a78bfa",strokeWidth:2,strokeDasharray:"4 3",dot:{r:3,fill:"#a78bfa",strokeWidth:0},legendType:"none",connectNulls:!1})]})}),h.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 mt-3",children:[W.map((F,R)=>h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm shrink-0",style:{background:es(F,R)}}),F]},F)),a&&h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[h.jsx("span",{className:"w-5 border-t-2 border-dashed border-slate-400 inline-block"})," Ceiling"]}),!H&&s&&h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[h.jsx("span",{className:"w-5 border-t-2 border-solid border-rose-400 inline-block"})," Dynamic"]}),!H&&u&&h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[h.jsx("span",{className:"w-5 border-t-2 border-dashed border-violet-400 inline-block"})," Assets due"]}),H&&h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-amber-400",children:[h.jsx("span",{className:"w-5 border-t-2 border-dashed border-amber-400 inline-block"})," Today"]})]}),C&&h.jsx("div",{className:"mt-4 bg-indigo-950/30 border border-indigo-800/30 rounded-lg px-4 py-3",children:h.jsxs("p",{className:"text-xs text-indigo-200 leading-relaxed",children:[h.jsx("span",{className:"text-indigo-400 font-semibold",children:"Insight · "}),C]})})]}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-5",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200 mb-0.5",children:"Benchmark — Hours per Asset by Project Type"}),h.jsxs("p",{className:"text-xs text-slate-500 mb-4",children:["Source: ",x.length," completed projects · lower h/asset = faster throughput = more assets from the same capacity pool"]}),h.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3",children:b.map((F,R)=>h.jsxs("div",{className:"bg-slate-800/40 rounded-lg p-3 border border-slate-700/40",children:[h.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[h.jsx("span",{className:"w-2 h-2 rounded-sm shrink-0",style:{background:es(F.projectType,R)}}),h.jsx("span",{className:"text-[11px] text-slate-300 font-medium leading-tight",children:F.projectType})]}),h.jsxs("div",{className:"text-2xl font-bold text-indigo-300",children:[F.avgHoursPerAsset.toFixed(1),"h"]}),h.jsxs("div",{className:"text-[10px] text-slate-500 mt-1",children:["per asset · ",F.count," projects"]}),h.jsxs("div",{className:"text-[10px] text-slate-500",children:[F.totalAssets.toLocaleString()," total assets"]}),F.avgDuration>0&&h.jsxs("div",{className:"text-[10px] text-teal-400 mt-1",children:[Math.round(F.avgDuration),"d avg duration"]})]},F.projectType))}),h.jsxs("div",{className:"mt-4 pt-3 border-t border-slate-800 text-[10px] text-slate-500 leading-relaxed",children:[h.jsx("span",{className:"text-slate-400 font-semibold",children:"Capacity ceiling: "}),T," peak people × 8h × 5 days = ",te.weeklyFixedCapHours.toFixed(0),"h ÷ ",g.toFixed(2),"h weighted avg = ",h.jsxs("span",{className:"text-slate-300 font-semibold",children:[Math.round(E)," assets/wk"]})]}),K&&h.jsx("div",{className:"mt-4 bg-indigo-950/30 border border-indigo-800/30 rounded-lg px-4 py-3",children:h.jsxs("p",{className:"text-xs text-indigo-200 leading-relaxed",children:[h.jsx("span",{className:"text-indigo-400 font-semibold",children:"Insight · "}),K]})})]})]}),h.jsxs("div",{className:"w-72 shrink-0 bg-slate-900 border border-slate-800 rounded-xl p-5 space-y-4 text-[11px]",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-slate-100 mb-1",children:"How this forecast is built"}),h.jsx("p",{className:"text-slate-500 leading-relaxed",children:"Each number below comes from live data — no manual inputs required."})]}),h.jsxs("div",{className:"space-y-4 divide-y divide-slate-800",children:[h.jsxs("div",{className:"pt-4 first:pt-0",children:[h.jsx("p",{className:"font-semibold text-indigo-300 mb-1.5",children:"Weekly Team Capacity"}),h.jsx("p",{className:"text-slate-400 leading-relaxed",children:"Peak headcount (excl. Operations) × 8h/day × 5 days. Headcount is the highest number of active staff who logged time on a single day. Operations is excluded because they handle internal work and don't contribute to client deliverable throughput."})]}),h.jsxs("div",{className:"pt-4",children:[h.jsx("p",{className:"font-semibold text-amber-300 mb-1.5",children:"Active Assets In Flight"}),h.jsx("p",{className:"text-slate-400 leading-relaxed",children:"From the Deliverable CSV. Each open deliverable is weighted by how many days it overlaps with the week divided by its total duration. A 10-day asset that overlaps 3 days contributes 0.3 to the count. Stacked bars show the breakdown by project type."})]}),h.jsxs("div",{className:"pt-4",children:[h.jsx("p",{className:"font-semibold text-emerald-300 mb-1.5",children:"Available Asset to Take On"}),h.jsx("p",{className:"text-slate-400 leading-relaxed",children:"Historical weekly throughput average (from completed projects in the time log) minus active assets in flight. Represents the remaining capacity before hitting the historical ceiling."})]}),h.jsxs("div",{className:"pt-4",children:[h.jsx("p",{className:"font-semibold text-rose-300 mb-1.5",children:"Exiting This Week / Exit Rate"}),h.jsx("p",{className:"text-slate-400 leading-relaxed",children:"Exiting = deliverables whose end date falls within this week. Exit Rate = Exiting ÷ Active In Flight. A higher exit rate means more capacity opening up next week. The red line on the chart tracks exits week by week."})]}),h.jsxs("div",{className:"pt-4",children:[h.jsx("p",{className:"font-semibold text-cyan-300 mb-1.5",children:"Forecast Average line"}),h.jsx("p",{className:"text-slate-400 leading-relaxed",children:"Dashed blue line = historical average assets delivered per week, calculated from all completed projects in the time log. This is the sustainable throughput benchmark."})]})]}),h.jsx("div",{className:"pt-3 border-t border-slate-800 text-[10px] text-slate-600 leading-relaxed",children:"Data sources: Zoho timesheet export · Deliverable CSV · Airtable Resource & Booking"})]})]})}const Jae="https://api.airtable.com/v0";function Qae(){return{token:"patHABoVdJg18sxzI.9b7c12b3e28c2fa2339772f46310067b0bb83cb25d35b8440d92d28e4c4505a3",baseId:"appoByydxIQANKtSh"}}async function sF(e,t,r){const{token:n,baseId:a}=Qae();if(n.startsWith("your_"))return[];const i=[];let s;do{const l=new URLSearchParams;t.forEach(d=>l.append("fields[]",d)),r&&l.set("filterByFormula",r),s&&l.set("offset",s),l.set("pageSize","100");const u=await fetch(`${Jae}/${a}/${encodeURIComponent(e)}?${l}`,{headers:{Authorization:`Bearer ${n}`}});if(!u.ok){const d=await u.text().catch(()=>"");throw new Error(`Airtable ${e} ${u.status}: ${d.slice(0,120)}`)}const f=await u.json();i.push(...f.records),s=f.offset}while(s);return i}async function eie(){return(await sF("Resource",["Name","Department","Email","Role","Inactive","Availability Hour (per week)","Start Date","End Date","Employment Type","Country"])).map(t=>{const r=t.fields;return{recordId:t.id,name:String(r.Name??"").trim(),email:Jt(String(r.Email??"")),department:String(r.Department??"").trim(),roles:r.Role??[],inactive:!!r.Inactive,availHoursPerWeek:Number(r["Availability Hour (per week)"]??40),startDate:String(r["Start Date"]??""),endDate:String(r["End Date"]??""),employmentType:String(r["Employment Type"]??"").trim(),country:String(r.Country??"").trim()}})}async function tie(e,t){const r=`AND({Booking Status}!='',NOT(IS_AFTER({Start Date},'${t}')),NOT(IS_BEFORE({End Date},'${e}')))`;return(await sF("Booking Resource",["Task","Start Date","End Date","Resource Name","Project Number (from Master)","Project Name (from Master)","Department (from Resource Name)","Division","Hours Selection","Total Hours Booked","Booking Status","Placeholder"],r)).map(a=>{const i=a.fields,s=i["Hours Selection"]??[];return{id:a.id,task:String(i.Task??""),startDate:String(i["Start Date"]??""),endDate:String(i["End Date"]??""),resourceRecordIds:i["Resource Name"]??[],department:(i["Department (from Resource Name)"]??[])[0]??"",projectNumber:(i["Project Number (from Master)"]??[])[0]??"",projectName:(i["Project Name (from Master)"]??[])[0]??"",division:String(i.Division??""),hoursPerDay:s.length,totalHours:Number(i["Total Hours Booked"]??0),status:String(i["Booking Status"]??""),placeholder:!!i.Placeholder}})}const sr=[{id:"houseAdmin",label:"House Admin",key:"bg_0",color:"#fbbf24"},{id:"idle",label:"Idle Time",key:"bg_idle",color:"#fb923c"},{id:"clientRelated",label:"Client Related (Non Project Related)",key:"bg_1",color:"#c084fc"},{id:"feeRelated",label:"Fee Related",key:"bg_2",color:"#4ade80"},{id:"other",label:"Other",key:"bg_3",color:"#94a3b8"}],rie=/\b(sick(ness)?( leave)?|annual leave|bank holiday|public holiday|personal leave|compassionate leave|maternity|paternity|corona(virus)?( sickness)?)\b/i,id=e=>e.replace(/[   \t]+/g," ").toLowerCase().trim();function Hn(e){const t=id(e.taskDescription),r=id(e.projectTitle),n=id(e.projectBillingType),a=id(e.projectNumber||""),i=`${t} ${r} ${a} ${n}`;return rie.test(i)?"leave":n.includes("house admin")?i.includes("idle")?"idle":"houseAdmin":i.includes("client related (non project related)")?"clientRelated":n.includes("fee")||i.includes("fee related")?"feeRelated":n.includes("chargeable work")?"clientRelated":n==="default"?i.includes("idle")?"idle":"houseAdmin":"other"}const Rb={houseAdmin:"bg_0",idle:"bg_idle",clientRelated:"bg_1",feeRelated:"bg_2",other:"bg_3"},rs=e=>/freelan/i.test(e),KN=["Creative Team","Project Management Team","Syndication Team","Transcreation Team","Opera Upload Team","Operation Team","Unknown"],Kc={"Creative Team":"Creative","Project Management Team":"PM Team","Syndication Team":"Syndication","Transcreation Team":"Transcreation","Opera Upload Team":"Opera Upload","Operation Team":"Operations",Unknown:"Unknown"};function bu(e){const[t,r]=e.split("-").map(Number);return new Date(t,r-1,1).toLocaleDateString("en-GB",{month:"short",year:"2-digit"})}function n1(e){const t=e.replace(/\s*-\s*FRL\s*$/i,"").trim(),r=t.split(/\s+/);return r.length<=2?t:`${r[0]} ${r[1]}`}function GN(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n).toLocaleDateString("en-GB",{day:"numeric",month:"short"})}const ru=e=>e>100?"#f87171":e>85?"#fbbf24":"#34d399",ct=e=>e.toLocaleString("en-GB",{minimumFractionDigits:1,maximumFractionDigits:1}),Yr=e=>e.date.slice(0,7),qa=e=>{var t,r;return((t=e.timeLogStartDisplay)==null?void 0:t.slice(0,10))||((r=e.date)==null?void 0:r.slice(0,10))||""};function nie(e){const t=new Date,r=t.getDay(),n=new Date(t);n.setDate(t.getDate()-(r===0?6:r-1)+e*7);const a=new Date(n);a.setDate(n.getDate()+6);const i=l=>l.toISOString().split("T")[0],s=`${n.getDate()} ${n.toLocaleString("en-GB",{month:"short"})}–${a.getDate()} ${a.toLocaleString("en-GB",{month:"short"})}`;return{from:i(n),to:i(a),label:s}}function aie(e,t){const r=["Project Number","Project Title","Project Billing Type","Task Description","Time Log Start","Time Logged"],n=e.map(s=>[s.projectNumber,s.projectTitle,s.projectBillingType,s.taskDescription,s.timeLogStartDisplay,s.hoursLogged.toString()].map(l=>`"${String(l??"").replace(/"/g,'""')}"`).join(",")),a=[r.join(","),...n].join(` +`),i=document.createElement("a");i.href=URL.createObjectURL(new Blob([a],{type:"text/csv"})),i.download=`${t.replace(/\s+/g,"_")}_time_logs.csv`,i.click(),URL.revokeObjectURL(i.href)}const oF=(e,t,r)=>{var a,i,s,l,u;if(t==="utilisationLine")return[`${(((a=r==null?void 0:r.payload)==null?void 0:a.utilisationPct)??e).toFixed(1)}%`,"Utilisation"];if(t==="forecastLine")return[`${(((i=r==null?void 0:r.payload)==null?void 0:i.forecastPct)??e).toFixed(1)}%`,"Forecast (Booked %)"];if(t==="feeRelatedLine")return[`${(((s=r==null?void 0:r.payload)==null?void 0:s.feeRelatedPct)??e).toFixed(1)}%`,"Billable — Fee Related"];if(t==="clientRelatedLine")return[`${(((l=r==null?void 0:r.payload)==null?void 0:l.clientRelatedPct)??e).toFixed(1)}%`,"Billable — Client Related"];if(t==="nonBillableLine")return[`${(((u=r==null?void 0:r.payload)==null?void 0:u.nonBillablePct)??e).toFixed(1)}%`,"Non-Billable"];if(t==="allocated")return[`${ct(e)}h`,"Allocated (net of leave)"];const n=sr.find(f=>f.key===t);return[`${ct(e)}h`,(n==null?void 0:n.label)??t]};function iie({data:e,onBarClick:t,hidden:r}){const n=a=>i=>t({email:i.email,name:i.fullName,billingId:a});return h.jsx("div",{style:{width:"100%",height:540},children:h.jsx(to,{width:"100%",height:540,children:h.jsxs(xs,{data:e,margin:{top:24,right:60,left:8,bottom:80},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"name",tick:{fill:"#94a3b8",fontSize:12},angle:-30,textAnchor:"end",interval:0}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:11},tickFormatter:a=>a>=1e3?`${(a/1e3).toFixed(0)}k`:String(a),label:{value:"Hours",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:11,offset:10}}),h.jsx(Jr,{contentStyle:{background:"#0f172a",border:"1px solid #334155",borderRadius:8,fontSize:12},labelFormatter:(a,i)=>{var s,l;return`${((l=(s=i==null?void 0:i[0])==null?void 0:s.payload)==null?void 0:l.fullName)??""} — click to drill into department`},formatter:oF}),h.jsx(jt,{dataKey:"softBooked",name:"softBooked",stackId:"booked",fill:"#0891b2",maxBarSize:72,hide:r.has("softBooked"),radius:[0,0,0,0],children:h.jsx(lt,{dataKey:"softBooked",position:"center",style:{fill:"#ede9fe",fontSize:11,fontWeight:700},formatter:a=>a>=50?ct(a):""})}),h.jsxs(jt,{dataKey:"activeBooked",name:"activeBooked",stackId:"booked",fill:"#4f46e5",maxBarSize:72,hide:r.has("activeBooked"),radius:[2,2,0,0],children:[h.jsx(lt,{dataKey:"activeBooked",position:"center",style:{fill:"#e0e7ff",fontSize:11,fontWeight:700},formatter:a=>a>=50?ct(a):""}),h.jsx(lt,{dataKey:"totalBooked",position:"top",offset:4,style:{fill:"#67e8f9",fontSize:11,fontWeight:700},formatter:a=>a>0?ct(a):""})]}),h.jsx(jt,{dataKey:"allocated",name:"allocated",fill:"#1e3a5f",hide:r.has("allocated"),style:{cursor:"pointer"},maxBarSize:72,radius:[2,2,0,0],onClick:n(null),children:h.jsx(lt,{dataKey:"allocated",position:"top",style:{fill:"#93c5fd",fontSize:11},formatter:a=>a>0?ct(a):""})}),h.jsx(jt,{dataKey:"bg_0",name:"bg_0",stackId:"logged",fill:sr[0].color,maxBarSize:72,hide:r.has("houseAdmin"),style:{cursor:"pointer"},onClick:n("houseAdmin"),children:h.jsx(lt,{dataKey:"bg_0",position:"center",style:{fill:"#0f172a",fontSize:11,fontWeight:700},formatter:a=>a>=50?ct(a):""})}),h.jsx(jt,{dataKey:"bg_idle",name:"bg_idle",stackId:"logged",fill:sr[1].color,maxBarSize:72,hide:r.has("idle"),style:{cursor:"pointer"},onClick:n("idle"),children:h.jsx(lt,{dataKey:"bg_idle",position:"center",style:{fill:"#0f172a",fontSize:11,fontWeight:700},formatter:a=>a>=50?ct(a):""})}),h.jsx(jt,{dataKey:"bg_1",name:"bg_1",stackId:"logged",fill:sr[2].color,maxBarSize:72,hide:r.has("clientRelated"),style:{cursor:"pointer"},onClick:n("clientRelated"),children:h.jsx(lt,{dataKey:"bg_1",position:"center",style:{fill:"#0f172a",fontSize:11,fontWeight:700},formatter:a=>a>=50?ct(a):""})}),h.jsx(jt,{dataKey:"bg_2",name:"bg_2",stackId:"logged",fill:sr[3].color,maxBarSize:72,hide:r.has("feeRelated"),style:{cursor:"pointer"},onClick:n("feeRelated"),children:h.jsx(lt,{dataKey:"bg_2",position:"center",style:{fill:"#0f172a",fontSize:11,fontWeight:700},formatter:a=>a>=50?ct(a):""})}),h.jsxs(jt,{dataKey:"bg_3",name:"bg_3",stackId:"logged",fill:sr[4].color,maxBarSize:72,hide:r.has("other"),style:{cursor:"pointer"},onClick:n("other"),children:[h.jsx(lt,{dataKey:"bg_3",position:"top",offset:2,style:{fill:"#cbd5e1",fontSize:11,fontWeight:700},formatter:a=>a>=50?ct(a):""}),h.jsx(lt,{dataKey:"totalLogged",position:"top",offset:16,style:{fill:"#e2e8f0",fontSize:11,fontWeight:700},formatter:a=>a>0?ct(a):""})]}),h.jsx(Hr,{dataKey:"utilisationLine",name:"utilisationLine",stroke:"#f43f5e",hide:r.has("utilisation"),strokeWidth:2.5,dot:{fill:"#f43f5e",r:4,strokeWidth:0},activeDot:{r:6},type:"monotone",children:h.jsx(lt,{dataKey:"utilisationPct",position:"top",offset:14,style:{fill:"#f43f5e",fontSize:11,fontWeight:700},formatter:a=>a>0?`${a.toFixed(1)}%`:""})}),h.jsx(Hr,{dataKey:"feeRelatedLine",name:"feeRelatedLine",stroke:"#fde047",hide:r.has("feeRelated_line"),strokeWidth:2,strokeDasharray:"6 3",dot:{fill:"#fde047",r:3,strokeWidth:0},activeDot:{r:5},type:"monotone",children:h.jsx(lt,{dataKey:"feeRelatedPct",position:"insideTopRight",offset:6,style:{fill:"#fde047",fontSize:10,fontWeight:700},formatter:a=>a>0?`${a.toFixed(0)}%`:""})}),h.jsx(Hr,{dataKey:"clientRelatedLine",name:"clientRelatedLine",stroke:"#38bdf8",hide:r.has("clientRelated_line"),strokeWidth:2,strokeDasharray:"6 3",dot:{fill:"#38bdf8",r:3,strokeWidth:0},activeDot:{r:5},type:"monotone",children:h.jsx(lt,{dataKey:"clientRelatedPct",position:"insideTopLeft",offset:6,style:{fill:"#38bdf8",fontSize:10,fontWeight:700},formatter:a=>a>0?`${a.toFixed(0)}%`:""})}),h.jsx(Hr,{dataKey:"nonBillableLine",name:"nonBillableLine",stroke:"#f472b6",hide:r.has("nonBillable"),strokeWidth:2,strokeDasharray:"6 3",dot:{fill:"#f472b6",r:3,strokeWidth:0},activeDot:{r:5},type:"monotone",children:h.jsx(lt,{dataKey:"nonBillablePct",position:"insideTopLeft",offset:6,style:{fill:"#f472b6",fontSize:10,fontWeight:700},formatter:a=>a>0?`${a.toFixed(0)}%`:""})}),h.jsx(Hr,{dataKey:"forecastLine",name:"forecastLine",stroke:"#fb923c",hide:r.has("forecast"),strokeWidth:2,strokeDasharray:"4 4",dot:{fill:"#fb923c",r:3,strokeWidth:0},activeDot:{r:5},type:"monotone",children:h.jsx(lt,{dataKey:"forecastPct",position:"top",offset:6,style:{fill:"#fb923c",fontSize:10,fontWeight:700},formatter:a=>a>0?`${a.toFixed(0)}%`:""})})]})})})}function XN({data:e,width:t,height:r,onBarClick:n,hidden:a,onPersonClick:i,onBookingClick:s,showDeptLabel:l}){const u=d=>p=>n({email:p.email,name:p.fullName,billingId:d}),f=d=>s==null?void 0:s(d.email,d.fullName);return h.jsxs(xs,{width:t,height:r,data:e,margin:{top:20,right:20,left:10,bottom:l?110:90},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"name",interval:0,tick:d=>{const p=e.find(w=>w.name===d.payload.value),x=!!i&&!!p,v=l?String((p==null?void 0:p.deptLabel)??""):"";return h.jsxs("g",{transform:`translate(${d.x},${d.y})`,children:[h.jsx("text",{x:0,y:0,dy:4,textAnchor:"end",transform:"rotate(-35)",fill:x?"#60a5fa":"#94a3b8",fontSize:9,style:x?{cursor:"pointer",textDecoration:"underline"}:{},onClick:x?()=>i(String(p.email),String(p.fullName)):void 0,children:d.payload.value}),v&&h.jsx("text",{x:0,y:0,dy:16,textAnchor:"end",transform:"rotate(-35)",fill:"#6366f1",fontSize:8,style:{fontStyle:"italic"},children:v})]})}}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:10},tickFormatter:d=>d>=1e3?`${(d/1e3).toFixed(0)}k`:String(d),label:{value:"Hours",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:10,offset:10}}),h.jsx(Jr,{contentStyle:{background:"#0f172a",border:"1px solid #334155",borderRadius:8,fontSize:12},labelFormatter:(d,p)=>{var x,v;return`${((v=(x=p==null?void 0:p[0])==null?void 0:x.payload)==null?void 0:v.fullName)??""} — click segment to drill down`},formatter:oF}),h.jsx(jt,{dataKey:"softBooked",name:"softBooked",stackId:"booked",fill:"#0891b2",maxBarSize:52,hide:a.has("softBooked"),radius:[0,0,0,0],style:{cursor:s?"pointer":"default"},onClick:f,children:h.jsx(lt,{dataKey:"softBooked",position:"center",style:{fill:"#ede9fe",fontSize:9,fontWeight:700},formatter:d=>d>=8?ct(d):""})}),h.jsxs(jt,{dataKey:"activeBooked",name:"activeBooked",stackId:"booked",fill:"#4f46e5",maxBarSize:52,hide:a.has("activeBooked"),radius:[2,2,0,0],style:{cursor:s?"pointer":"default"},onClick:f,children:[h.jsx(lt,{dataKey:"activeBooked",position:"center",style:{fill:"#e0e7ff",fontSize:9,fontWeight:700},formatter:d=>d>=8?ct(d):""}),h.jsx(lt,{dataKey:"totalBooked",position:"top",offset:4,style:{fill:"#67e8f9",fontSize:10,fontWeight:700},formatter:d=>d>0?ct(d):""})]}),h.jsx(jt,{dataKey:"allocated",name:"allocated",fill:"#1e3a5f",hide:a.has("allocated"),style:{cursor:"pointer"},maxBarSize:52,radius:[2,2,0,0],onClick:u(null),children:h.jsx(lt,{dataKey:"allocated",position:"top",style:{fill:"#93c5fd",fontSize:10},formatter:d=>d>0?ct(d):""})}),h.jsx(jt,{dataKey:"bg_0",name:"bg_0",stackId:"logged",fill:sr[0].color,maxBarSize:52,hide:a.has("houseAdmin"),style:{cursor:"pointer"},onClick:u("houseAdmin"),children:h.jsx(lt,{dataKey:"bg_0",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:d=>d>=8?ct(d):""})}),h.jsx(jt,{dataKey:"bg_idle",name:"bg_idle",stackId:"logged",fill:sr[1].color,maxBarSize:52,hide:a.has("idle"),style:{cursor:"pointer"},onClick:u("idle"),children:h.jsx(lt,{dataKey:"bg_idle",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:d=>d>=8?ct(d):""})}),h.jsx(jt,{dataKey:"bg_1",name:"bg_1",stackId:"logged",fill:sr[2].color,maxBarSize:52,hide:a.has("clientRelated"),style:{cursor:"pointer"},onClick:u("clientRelated"),children:h.jsx(lt,{dataKey:"bg_1",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:d=>d>=8?ct(d):""})}),h.jsx(jt,{dataKey:"bg_2",name:"bg_2",stackId:"logged",fill:sr[3].color,maxBarSize:52,hide:a.has("feeRelated"),style:{cursor:"pointer"},onClick:u("feeRelated"),children:h.jsx(lt,{dataKey:"bg_2",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:d=>d>=8?ct(d):""})}),h.jsxs(jt,{dataKey:"bg_3",name:"bg_3",stackId:"logged",fill:sr[4].color,maxBarSize:52,hide:a.has("other"),style:{cursor:"pointer"},onClick:u("other"),children:[h.jsx(lt,{dataKey:"bg_3",position:"top",offset:2,style:{fill:"#cbd5e1",fontSize:10,fontWeight:700},formatter:d=>d>=8?ct(d):""}),h.jsx(lt,{dataKey:"totalLogged",position:"top",offset:16,style:{fill:"#e2e8f0",fontSize:10,fontWeight:700},formatter:d=>d>0?ct(d):""})]}),h.jsx(Hr,{dataKey:"utilisationLine",name:"utilisationLine",stroke:"#f43f5e",hide:a.has("utilisation"),strokeWidth:2.5,dot:{fill:"#f43f5e",r:3,strokeWidth:0},activeDot:{r:5},type:"monotone",children:h.jsx(lt,{dataKey:"utilisationPct",position:"top",offset:14,style:{fill:"#f43f5e",fontSize:10,fontWeight:700},formatter:d=>d>0?`${d.toFixed(0)}%`:""})}),h.jsx(Hr,{dataKey:"feeRelatedLine",name:"feeRelatedLine",stroke:"#fde047",hide:a.has("feeRelated_line"),strokeWidth:1.8,strokeDasharray:"6 3",dot:{fill:"#fde047",r:2.5,strokeWidth:0},activeDot:{r:4},type:"monotone",children:h.jsx(lt,{dataKey:"feeRelatedPct",position:"insideTopRight",offset:5,style:{fill:"#fde047",fontSize:9,fontWeight:700},formatter:d=>d>0?`${d.toFixed(0)}%`:""})}),h.jsx(Hr,{dataKey:"clientRelatedLine",name:"clientRelatedLine",stroke:"#38bdf8",hide:a.has("clientRelated_line"),strokeWidth:1.8,strokeDasharray:"6 3",dot:{fill:"#38bdf8",r:2.5,strokeWidth:0},activeDot:{r:4},type:"monotone",children:h.jsx(lt,{dataKey:"clientRelatedPct",position:"insideTopLeft",offset:5,style:{fill:"#38bdf8",fontSize:9,fontWeight:700},formatter:d=>d>0?`${d.toFixed(0)}%`:""})}),h.jsx(Hr,{dataKey:"nonBillableLine",name:"nonBillableLine",stroke:"#f472b6",hide:a.has("nonBillable"),strokeWidth:1.8,strokeDasharray:"6 3",dot:{fill:"#f472b6",r:2.5,strokeWidth:0},activeDot:{r:4},type:"monotone",children:h.jsx(lt,{dataKey:"nonBillablePct",position:"insideTopLeft",offset:5,style:{fill:"#f472b6",fontSize:9,fontWeight:700},formatter:d=>d>0?`${d.toFixed(0)}%`:""})}),h.jsx(Hr,{dataKey:"forecastLine",name:"forecastLine",stroke:"#fb923c",hide:a.has("forecast"),strokeWidth:1.8,strokeDasharray:"4 4",dot:{fill:"#fb923c",r:2.5,strokeWidth:0},activeDot:{r:4},type:"monotone",children:h.jsx(lt,{dataKey:"forecastPct",position:"top",offset:5,style:{fill:"#fb923c",fontSize:9,fontWeight:700},formatter:d=>d>0?`${d.toFixed(0)}%`:""})})]})}function Lb({hidden:e,onToggle:t}){return h.jsxs("div",{className:"flex flex-wrap gap-x-5 gap-y-1.5 mt-4 px-1",children:[h.jsx(hi,{id:"allocated",color:"#1e3a5f",label:"Allocated hours",swatch:"rect",hidden:e.has("allocated"),onToggle:t}),sr.map(r=>h.jsx(hi,{id:r.id,color:r.color,label:r.label,swatch:"rect",hidden:e.has(r.id),onToggle:t},r.id)),h.jsx(hi,{id:"utilisation",color:"#f43f5e",label:"Avg % utilisation",swatch:"line",hidden:e.has("utilisation"),onToggle:t}),h.jsx(hi,{id:"feeRelated_line",color:"#fde047",label:"Billable — Fee Related %",swatch:"line",hidden:e.has("feeRelated_line"),onToggle:t}),h.jsx(hi,{id:"clientRelated_line",color:"#38bdf8",label:"Billable — Client Related %",swatch:"line",hidden:e.has("clientRelated_line"),onToggle:t}),h.jsx(hi,{id:"nonBillable",color:"#f472b6",label:"Non-billable %",swatch:"line",hidden:e.has("nonBillable"),onToggle:t}),h.jsx(hi,{id:"forecast",color:"#fb923c",label:"Forecast Utilisation %",swatch:"line",hidden:e.has("forecast"),onToggle:t}),h.jsx(hi,{id:"activeBooked",color:"#4f46e5",label:"Active Booked (h)",swatch:"rect",hidden:e.has("activeBooked"),onToggle:t}),h.jsx(hi,{id:"softBooked",color:"#0891b2",label:"Soft Booked (h)",swatch:"rect",hidden:e.has("softBooked"),onToggle:t})]})}function hi({id:e,color:t,label:r,swatch:n,hidden:a,onToggle:i}){return h.jsxs("button",{onClick:()=>i(e),className:`flex items-center gap-1.5 text-xs select-none transition-opacity cursor-pointer ${a?"opacity-40":""}`,children:[n==="rect"?h.jsx("span",{className:"w-3 h-3 rounded-sm shrink-0 transition-colors",style:{background:a?"#475569":t}}):h.jsxs("span",{className:"relative inline-flex items-center w-6 shrink-0",children:[h.jsx("span",{className:"w-full h-0.5 rounded",style:{background:a?"#475569":t}}),a&&h.jsx("span",{className:"absolute inset-x-0 top-1/2 h-px bg-slate-500 rotate-45"})]}),h.jsx("span",{className:a?"text-slate-500 line-through":"text-slate-300",children:r})]})}function sie({person:e,allLogs:t,initialBillingId:r,onClose:n}){const[a,i]=Q.useState(r??"all"),[s,l]=Q.useState(""),[u,f]=Q.useState("hoursLogged"),[d,p]=Q.useState("desc"),x=T=>{u===T?p(E=>E==="asc"?"desc":"asc"):(f(T),p("desc"))},v=T=>T===u?d==="asc"?" ↑":" ↓":" ↕",w=Q.useMemo(()=>t.filter(T=>{const E=Hn(T);if(a!=="all"&&E!==a)return!1;if(s){const j=s.toLowerCase();if(!T.taskDescription.toLowerCase().includes(j)&&!T.projectTitle.toLowerCase().includes(j)&&!T.projectNumber.toLowerCase().includes(j))return!1}return!0}),[t,a,s]),b=Q.useMemo(()=>{const T=[...w];return T.sort((E,j)=>{let D,P;switch(u){case"projectNumber":D=E.projectNumber,P=j.projectNumber;break;case"projectTitle":D=E.projectTitle,P=j.projectTitle;break;case"projectBillingType":D=E.projectBillingType,P=j.projectBillingType;break;case"taskDescription":D=E.taskDescription,P=j.taskDescription;break;case"timeLogStartDisplay":D=E.timeLogStartDisplay,P=j.timeLogStartDisplay;break;default:D=E.hoursLogged,P=j.hoursLogged}return typeof D=="string"&&typeof P=="string"?d==="asc"?D.localeCompare(P):P.localeCompare(D):d==="asc"?D-P:P-D}),T},[w,u,d]),g=w.reduce((T,E)=>T+E.hoursLogged,0),k=e.name.replace(/\s*-\s*FRL\s*$/i,""),A=e.utilisationPct,S=ru(A),N=a==="leave"?{label:"Leave / Non-working",color:"#ef4444"}:sr.find(T=>T.id===a)?{label:sr.find(T=>T.id===a).label,color:sr.find(T=>T.id===a).color}:null;return h.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/75 p-4",onClick:T=>T.target===T.currentTarget&&n(),children:h.jsxs("div",{className:"flex flex-col bg-slate-950 border border-slate-700 rounded-xl w-full max-w-6xl shadow-2xl max-h-[85vh]",children:[h.jsxs("div",{className:"px-5 py-4 border-b border-slate-700 bg-[#162032] rounded-t-xl",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-base font-bold text-white",children:k}),h.jsxs("div",{className:"flex items-center gap-4 mt-1 text-xs text-slate-400",children:[h.jsxs("span",{className:"text-blue-300",children:[ct(e.allocated),"h allocated (net)"]}),h.jsxs("span",{className:"text-teal-400",children:[ct(e.logged),"h logged (net)"]}),e.leaveHours>0&&h.jsxs("span",{className:"text-red-400",children:[ct(e.leaveHours),"h leave deducted"]}),h.jsxs("span",{className:"font-semibold",style:{color:S},children:[A.toFixed(1),"% utilisation"]})]})]}),h.jsx("button",{onClick:n,className:"ml-4 px-3 py-1.5 text-xs text-slate-400 hover:text-white hover:bg-slate-700 rounded-lg border border-slate-600 transition-colors",children:"✕ Close"})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[h.jsx("span",{className:"text-xs text-slate-400 shrink-0",children:"Filter:"}),h.jsxs("select",{value:a,onChange:T=>i(T.target.value),className:"bg-slate-800 border border-slate-600 rounded px-2 py-1 text-xs text-slate-200 min-w-[200px]",children:[h.jsx("option",{value:"all",children:"All Billing Types"}),sr.map(T=>h.jsx("option",{value:T.id,children:T.label},T.id)),h.jsx("option",{value:"leave",children:"Leave / Non-working"})]}),h.jsx("input",{value:s,onChange:T=>l(T.target.value),placeholder:"Search task / project…",className:"bg-slate-800 border border-slate-600 rounded px-2 py-1 text-xs text-slate-200 placeholder-slate-500 flex-1 min-w-[160px]"}),h.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[h.jsxs("span",{className:"text-xs text-slate-400",children:["Total: ",h.jsxs("span",{className:"font-semibold text-teal-300",children:[ct(g),"h"]}),h.jsxs("span",{className:"text-slate-500 ml-1",children:["(",w.length," entries)"]})]}),h.jsxs("button",{onClick:()=>aie(w,k),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs bg-indigo-700 hover:bg-indigo-600 text-white rounded-lg transition-colors",children:[h.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download CSV"]})]})]}),N&&h.jsxs("div",{className:"mt-2 flex items-center gap-1.5",children:[h.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:N.color}}),h.jsxs("span",{className:"text-xs text-slate-300",children:["Showing: ",N.label]}),h.jsx("button",{onClick:()=>i("all"),className:"text-[10px] text-slate-500 hover:text-slate-300 ml-1",children:"✕ clear"})]})]}),h.jsx("div",{className:"overflow-y-auto overflow-x-auto flex-1 rounded-b-xl",children:w.length===0?h.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-slate-500",children:"No entries match the current filter."}):h.jsxs("table",{className:"w-full min-w-[860px] text-xs border-collapse",children:[h.jsx("thead",{className:"sticky top-0 z-10",children:h.jsx("tr",{style:{background:"#1e3a5f"},children:[["projectNumber","Project Number","text-left"],["projectTitle","Project Title","text-left"],["projectBillingType","Project Billing Type","text-left"],["taskDescription","Task Description","text-left"],["timeLogStartDisplay","Time Log Start","text-left"],["hoursLogged","Time Logged","text-right"]].map(([T,E,j])=>h.jsxs("th",{className:`${j} px-4 py-3 font-semibold whitespace-nowrap border-b border-[#2d5a8e] cursor-pointer select-none hover:bg-[#2d5a8e] transition-colors`,style:{color:u===T?"#93c5fd":"#fff"},onClick:()=>x(T),children:[E,h.jsx("span",{className:"text-slate-400 text-[10px]",children:v(T)})]},T))})}),h.jsx("tbody",{children:b.map((T,E)=>{const j=Hn(T),D=j!=="leave"?sr.find(H=>H.id===j):null,P=j==="leave";return h.jsxs("tr",{className:"border-b border-slate-800/60 hover:bg-slate-700/30",style:{background:E%2===0?"#0f172a":"#1e293b"},children:[h.jsx("td",{className:"px-4 py-2.5 font-mono text-cyan-400 whitespace-nowrap",children:T.projectNumber||"—"}),h.jsx("td",{className:"px-4 py-2.5 text-slate-200 max-w-[200px]",children:h.jsx("span",{className:"block truncate",title:T.projectTitle,children:T.projectTitle||"—"})}),h.jsx("td",{className:"px-4 py-2.5 whitespace-nowrap",children:h.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-medium",style:P?{background:"#ef444422",color:"#ef4444",border:"1px solid #ef444444"}:{background:(D==null?void 0:D.color)+"22",color:D==null?void 0:D.color,border:`1px solid ${D==null?void 0:D.color}44`},children:T.projectBillingType||"—"})}),h.jsx("td",{className:"px-4 py-2.5 text-slate-400 max-w-[220px]",children:h.jsx("span",{className:"block truncate",title:T.taskDescription,children:T.taskDescription||"—"})}),h.jsx("td",{className:"px-4 py-2.5 text-slate-400 whitespace-nowrap font-mono text-[11px]",children:T.timeLogStartDisplay||"—"}),h.jsxs("td",{className:"px-4 py-2.5 text-right font-semibold whitespace-nowrap",style:{color:P?"#f87171":"#2dd4bf"},children:[ct(T.hoursLogged),"h"]})]},E)})})]})})]})})}function oie({active:e,payload:t,label:r}){if(!e||!(t!=null&&t.length))return null;const n=t[0].payload;return h.jsxs("div",{style:{background:"#0f172a",border:"1px solid #334155",borderRadius:8,fontSize:13,padding:"10px 14px",minWidth:230},children:[h.jsx("div",{style:{color:"#e2e8f0",fontWeight:700,marginBottom:8},children:r}),t.map((a,i)=>{let s="",l="",u=a.fill??"#94a3b8";if(a.dataKey==="allocated")s="Allocated (net of leave)",l=`${ct(a.value)}h`,u="#60a5fa";else if(a.dataKey==="utilisationLine")s="Utilisation",l=`${Number(n.utilisationPct).toFixed(1)}%`,u="#f43f5e";else{const f=sr.find(d=>d.key===a.dataKey);if(!f)return null;s=f.label,l=`${ct(a.value)}h`,u=f.color}return h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:5},children:[h.jsx("span",{style:{width:9,height:9,borderRadius:2,background:u,flexShrink:0}}),h.jsx("span",{style:{color:u,flex:1,fontSize:12},children:s}),h.jsx("span",{style:{color:"#e2e8f0",fontWeight:600},children:l})]},i)})]})}function lie({name:e,bookings:t,calcMonths:r,weekRange:n,onClose:a}){let i,s;if(n)i=n.from,s=n.to;else{i=r.length?r[0]+"-01":"";const[d,p]=r.length?r[r.length-1].split("-").map(Number):[0,0];s=r.length?new Date(d,p,0).toISOString().split("T")[0]:""}const l=t.filter(d=>d.status==="Active"||d.status==="Soft-Booking").map(d=>{const p=i&&d.startDates?s:d.endDate,v=i&&s?pi(p,x):0,w=+(v*d.hoursPerDay).toFixed(1);return{bk:d,overlapStart:p,overlapEnd:x,wDays:v,periodHrs:w}}).sort((d,p)=>d.bk.status!==p.bk.status?d.bk.status==="Active"?-1:1:p.periodHrs-d.periodHrs),u=l.filter(d=>d.bk.status==="Active").reduce((d,p)=>d+p.periodHrs,0),f=l.filter(d=>d.bk.status==="Soft-Booking").reduce((d,p)=>d+p.periodHrs,0);return h.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-black/85 p-4",onClick:d=>d.target===d.currentTarget&&a(),children:h.jsxs("div",{className:"flex flex-col bg-slate-950 border border-slate-700 rounded-xl w-full max-w-3xl shadow-2xl max-h-[85vh]",children:[h.jsxs("div",{className:"px-5 py-4 border-b border-slate-700 rounded-t-xl",style:{background:"#12173a"},children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("p",{className:"text-base font-bold text-white",children:[e," — Airtable Bookings"]}),h.jsx("button",{onClick:a,className:"px-3 py-1.5 text-xs text-slate-400 hover:text-white hover:bg-slate-700 rounded-lg border border-slate-600 transition-colors",children:"✕ Close"})]}),h.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[u>0&&h.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-semibold",style:{background:"#4f46e522",border:"1px solid #4f46e5",color:"#818cf8"},children:[h.jsx("span",{className:"w-2 h-2 rounded-sm inline-block",style:{background:"#4f46e5"}}),"Active Booked: ",ct(u),"h"]}),f>0&&h.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-semibold",style:{background:"#0891b222",border:"1px solid #0891b2",color:"#67e8f9"},children:[h.jsx("span",{className:"w-2 h-2 rounded-sm inline-block",style:{background:"#0891b2"}}),"Soft Booked: ",ct(f),"h"]}),l.length===0&&h.jsx("span",{className:"text-xs text-slate-500 italic",children:"No bookings found for this period"})]})]}),h.jsx("div",{className:"overflow-y-auto flex-1",children:l.length===0?h.jsx("p",{className:"text-slate-500 text-sm text-center py-10",children:"No Active or Soft bookings in the selected period."}):h.jsxs("table",{className:"w-full text-xs border-collapse",children:[h.jsx("thead",{className:"sticky top-0",style:{background:"#0f1a2e"},children:h.jsxs("tr",{className:"border-b border-slate-700 text-slate-400",children:[h.jsx("th",{className:"text-left px-4 py-2.5 font-medium whitespace-nowrap",children:"Status"}),h.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Task"}),h.jsx("th",{className:"text-left px-3 py-2.5 font-medium whitespace-nowrap",children:"Project"}),h.jsx("th",{className:"text-left px-3 py-2.5 font-medium whitespace-nowrap",children:"Division"}),h.jsx("th",{className:"text-left px-3 py-2.5 font-medium whitespace-nowrap",children:"Dates"}),h.jsx("th",{className:"text-right px-3 py-2.5 font-medium whitespace-nowrap",children:"h/day"}),h.jsx("th",{className:"text-right px-4 py-2.5 font-medium whitespace-nowrap",children:"Period Hours"})]})}),h.jsx("tbody",{children:l.map((d,p)=>{const x=d.bk.status==="Active",v=x?{background:"#4f46e522",border:"1px solid #4f46e5",color:"#818cf8"}:{background:"#0891b222",border:"1px solid #0891b2",color:"#67e8f9"};return h.jsxs("tr",{className:`border-b border-slate-800/50 ${p%2===1?"bg-slate-800/20":""}`,children:[h.jsx("td",{className:"px-4 py-2.5",children:h.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold whitespace-nowrap",style:v,children:x?"Active":"Soft Booking"})}),h.jsx("td",{className:"px-3 py-2.5 text-slate-300 max-w-[180px]",children:h.jsx("span",{className:"block truncate",title:d.bk.task,children:d.bk.task||"—"})}),h.jsxs("td",{className:"px-3 py-2.5 whitespace-nowrap",children:[d.bk.projectNumber&&h.jsx("span",{className:"font-mono text-cyan-400 mr-1",children:d.bk.projectNumber}),h.jsx("span",{className:"text-slate-400 max-w-[120px] truncate block",title:d.bk.projectName,children:d.bk.projectName||"—"})]}),h.jsx("td",{className:"px-3 py-2.5 text-slate-500 whitespace-nowrap",children:d.bk.division||"—"}),h.jsxs("td",{className:"px-3 py-2.5 text-slate-400 whitespace-nowrap text-[10px]",children:[d.bk.startDate," → ",d.bk.endDate]}),h.jsx("td",{className:"px-3 py-2.5 text-right text-slate-300 tabular-nums",children:d.bk.hoursPerDay}),h.jsx("td",{className:"px-4 py-2.5 text-right font-semibold tabular-nums",style:{color:x?"#818cf8":"#67e8f9"},children:d.periodHrs>0?`${ct(d.periodHrs)}h`:"—"})]},d.bk.id)})})]})})]})})}function cie({personEmail:e,personName:t,logs:r,selectedMonths:n,weekRange:a,activeBooked:i,softBooked:s,personBookings:l,personStartDate:u,onClose:f}){var H,U,B,V;const d=Q.useMemo(()=>$l.find(W=>Jt(W.email)===Jt(e)),[e]),p=d?d.availHoursPerWeek/5:8,x=Q.useMemo(()=>{const W=new Set;for(const G of r)if(Jt(G.submitterEmail||"")===Jt(e)){if(a){const ne=qa(G);if(nea.to)continue}else if(n.size>0&&!n.has(Yr(G)))continue;W.add(Yr(G))}return a&&W.size===0&&(W.add(a.from.slice(0,7)),a.to.slice(0,7)!==a.from.slice(0,7)&&W.add(a.to.slice(0,7))),Array.from(W).sort()},[r,e,a,n]),v=Q.useMemo(()=>{let W,G;if(a)W=new Date(a.from),G=new Date(a.to);else{if(!x.length)return[];const[oe,z]=x[0].split("-").map(Number),[ie,K]=x[x.length-1].split("-").map(Number);W=new Date(oe,z-1,1),G=new Date(ie,K,0)}const ne=[],te=new Date(W);for(;te<=G;){const oe=te.getDay();if(oe>=1&&oe<=5){const z=te.getFullYear(),ie=String(te.getMonth()+1).padStart(2,"0"),K=String(te.getDate()).padStart(2,"0");ne.push(`${z}-${ie}-${K}`)}te.setDate(te.getDate()+1)}return ne},[a,x]),w=Q.useMemo(()=>r.filter(W=>{if(Jt(W.submitterEmail||"")!==Jt(e))return!1;if(a){const G=qa(W);if(Ga.to)return!1}else if(n.size>0&&!n.has(Yr(W)))return!1;return Hn(W)!=="leave"}),[r,e,a,n]),b=Q.useMemo(()=>r.filter(W=>{if(Jt(W.submitterEmail||"")!==Jt(e))return!1;if(a){const G=qa(W);if(Ga.to)return!1}else if(n.size>0&&!n.has(Yr(W)))return!1;return Hn(W)==="leave"}),[r,e,a,n]),[g,k]=Q.useState(null),A=Q.useMemo(()=>{const W=new Map;if(!(l!=null&&l.length))return W;for(const G of l)if(!(G.status!=="Active"&&G.status!=="Soft-Booking")&&!(!G.startDate||!G.endDate||G.hoursPerDay<=0)){for(const ne of v)if(ne>=G.startDate&&ne<=G.endDate){const te=W.get(ne)??{active:0,soft:0};G.status==="Active"?te.active+=G.hoursPerDay:te.soft+=G.hoursPerDay,W.set(ne,te)}}return W},[l,v]),S=Q.useMemo(()=>{const W=new Map;if(!(l!=null&&l.length))return W;for(const G of l)if(!(G.status!=="Active"&&G.status!=="Soft-Booking")&&!(!G.startDate||!G.endDate||G.hoursPerDay<=0))for(const ne of v)ne>=G.startDate&&ne<=G.endDate&&(W.has(ne)||W.set(ne,[]),W.get(ne).push(G));return W},[l,v]),[N,T]=Q.useMemo(()=>{const W=new Map;for(const ie of v)W.set(ie,{bg_0:0,bg_idle:0,bg_1:0,bg_2:0,bg_3:0});const G=ie=>{const K=ie.slice(0,10);if(W.has(K))return K;const[C,re,F]=K.split("-").map(Number);if(!C||!re||!F)return;const R=new Date(C,re-1,F);if(!isNaN(R.getTime()))for(let Y=1;Y<=3;Y++)for(const fe of[1,-1]){const ce=new Date(R);ce.setDate(R.getDate()+Y*fe);const se=`${ce.getFullYear()}-${String(ce.getMonth()+1).padStart(2,"0")}-${String(ce.getDate()).padStart(2,"0")}`;if(W.has(se))return se}},ne=(ie,K)=>{let C;if(ie&&ie.length>=10&&(C=G(ie),!C)){const re=ie.slice(0,10).split("-");if(re.length===3&&re[0].length===4){const F=`${re[0]}-${re[2].padStart(2,"0")}-${re[1].padStart(2,"0")}`;C=G(F)}}return C??v.find(re=>re.startsWith(K))??v[0]},te=new Map;for(const ie of b){const K=ne(ie.timeLogStartDisplay,Yr(ie));K&&te.set(K,(te.get(K)??0)+ie.hoursLogged)}for(const ie of w){const K=ne(ie.timeLogStartDisplay,Yr(ie));if(K&&W.has(K)){const C=W.get(K);C[Rb[Hn(ie)]]+=ie.hoursLogged}}const oe=new Map;for(const ie of[...w,...b]){const K=ne(ie.timeLogStartDisplay,Yr(ie));K&&(oe.has(K)||oe.set(K,[]),oe.get(K).push(ie))}return[v.map(ie=>{const K=W.get(ie)||{bg_0:0,bg_idle:0,bg_1:0,bg_2:0,bg_3:0},C=+(K.bg_0+K.bg_idle+K.bg_1+K.bg_2+K.bg_3).toFixed(1),re=te.get(ie)??0,R=!!(u&&ie0?+(C/R*100).toFixed(1):0,fe=A.get(ie)??{active:0,soft:0};return{name:GN(ie),fullName:ie,email:e,allocated:R,utilisationLine:C,utilisationPct:Y,totalLogged:C,bg_0:+K.bg_0.toFixed(1),bg_idle:+K.bg_idle.toFixed(1),bg_1:+K.bg_1.toFixed(1),bg_2:+K.bg_2.toFixed(1),bg_3:+K.bg_3.toFixed(1),activeBooked:+fe.active.toFixed(1),softBooked:+fe.soft.toFixed(1),totalBooked:+(fe.active+fe.soft).toFixed(1)}}),oe]},[w,b,v,p,e,A]),E=Math.max(805,v.length*60),j=g?(H=N.find(W=>W.fullName===g))==null?void 0:H.name:void 0,D=t.replace(/\s*-\s*FRL\s*$/i,""),P=x.length===1?new Date(Number(x[0].split("-")[0]),Number(x[0].split("-")[1])-1,1).toLocaleDateString("en-GB",{month:"long",year:"numeric"}):x.length>1?`${bu(x[0])} – ${bu(x[x.length-1])}`:"—";return h.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/85 p-4",onClick:W=>W.target===W.currentTarget&&f(),children:h.jsxs("div",{className:"flex flex-col bg-slate-950 border border-slate-700 rounded-xl w-full max-w-5xl shadow-2xl max-h-[90vh]",children:[h.jsxs("div",{className:"px-5 py-4 border-b border-slate-700 bg-[#162032] rounded-t-xl",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsxs("p",{className:"text-base font-bold text-white",children:[D," — Daily Breakdown"]}),h.jsxs("p",{className:"text-xs text-slate-400 mt-0.5",children:[P," · ",v.length," weekdays · Daily capacity: ",ct(p),"h/day",u&&h.jsxs("span",{className:"text-slate-500",children:[" · started ",u]})]})]}),h.jsx("button",{onClick:f,className:"px-3 py-1.5 text-xs text-slate-400 hover:text-white hover:bg-slate-700 rounded-lg border border-slate-600 transition-colors",children:"✕ Close"})]}),(i!=null||s!=null)&&h.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[(i??0)>0&&h.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-semibold",style:{background:"#4f46e522",border:"1px solid #4f46e5",color:"#818cf8"},children:[h.jsx("span",{className:"w-2 h-2 rounded-sm inline-block",style:{background:"#4f46e5"}}),"Active Booked: ",ct(i??0),"h"]}),(s??0)>0&&h.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-semibold",style:{background:"#0891b222",border:"1px solid #0891b2",color:"#67e8f9"},children:[h.jsx("span",{className:"w-2 h-2 rounded-sm inline-block",style:{background:"#0891b2"}}),"Soft Booked: ",ct(s??0),"h"]}),(i??0)===0&&(s??0)===0&&h.jsx("span",{className:"text-xs text-slate-500 italic",children:"No bookings in Airtable for this period"})]})]}),h.jsx("div",{className:"overflow-x-auto flex-1 p-5",children:v.length===0?h.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-slate-500",children:"No data for this period."}):h.jsxs(xs,{width:E,height:460,data:N,margin:{top:48,right:40,left:10,bottom:80},onClick:W=>{var te,oe,z;const G=W,ne=(z=(oe=(te=G==null?void 0:G.activePayload)==null?void 0:te[0])==null?void 0:oe.payload)==null?void 0:z.fullName;ne&&k(ie=>ie===ne?null:ne)},style:{cursor:"pointer"},children:[h.jsx(Ya,{strokeDasharray:"3 3",stroke:"#1e293b"}),h.jsx(Gn,{dataKey:"name",tick:{fill:"#94a3b8",fontSize:11},angle:-35,textAnchor:"end",interval:0}),h.jsx(Xn,{tick:{fill:"#94a3b8",fontSize:11},tickFormatter:W=>W>=1e3?`${(W/1e3).toFixed(0)}k`:String(W),label:{value:"Hours",angle:-90,position:"insideLeft",fill:"#64748b",fontSize:11,offset:10}}),h.jsx(Jr,{content:h.jsx(oie,{})}),h.jsx(jt,{dataKey:"softBooked",name:"softBooked",stackId:"booked",fill:"#0891b2",maxBarSize:32,radius:[0,0,0,0],children:h.jsx(lt,{dataKey:"softBooked",position:"center",style:{fill:"#ede9fe",fontSize:10,fontWeight:700},formatter:W=>W>=1?ct(W):""})}),h.jsx(jt,{dataKey:"activeBooked",name:"activeBooked",stackId:"booked",fill:"#4f46e5",maxBarSize:32,radius:[2,2,0,0],children:h.jsx(lt,{dataKey:"activeBooked",position:"center",style:{fill:"#e0e7ff",fontSize:10,fontWeight:700},formatter:W=>W>=1?ct(W):""})}),h.jsx(jt,{dataKey:"allocated",name:"allocated",fill:"#1e3a5f",maxBarSize:32,radius:[2,2,0,0]}),h.jsx(jt,{dataKey:"bg_0",name:"bg_0",stackId:"logged",fill:sr[0].color,maxBarSize:32,children:h.jsx(lt,{dataKey:"bg_0",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:W=>W>=1?ct(W):""})}),h.jsx(jt,{dataKey:"bg_idle",name:"bg_idle",stackId:"logged",fill:sr[1].color,maxBarSize:32,children:h.jsx(lt,{dataKey:"bg_idle",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:W=>W>=1?ct(W):""})}),h.jsx(jt,{dataKey:"bg_1",name:"bg_1",stackId:"logged",fill:sr[2].color,maxBarSize:32,children:h.jsx(lt,{dataKey:"bg_1",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:W=>W>=1?ct(W):""})}),h.jsx(jt,{dataKey:"bg_2",name:"bg_2",stackId:"logged",fill:sr[3].color,maxBarSize:32,children:h.jsx(lt,{dataKey:"bg_2",position:"center",style:{fill:"#0f172a",fontSize:10,fontWeight:700},formatter:W=>W>=1?ct(W):""})}),h.jsxs(jt,{dataKey:"bg_3",name:"bg_3",stackId:"logged",fill:sr[4].color,maxBarSize:32,children:[h.jsx(lt,{dataKey:"bg_3",position:"top",offset:2,style:{fill:"#cbd5e1",fontSize:10,fontWeight:700},formatter:W=>W>=1?ct(W):""}),h.jsx(lt,{dataKey:"totalLogged",position:"top",offset:16,style:{fill:"#e2e8f0",fontSize:10,fontWeight:700},formatter:W=>W>0?ct(W):""})]}),h.jsx(Hr,{dataKey:"utilisationLine",name:"utilisationLine",stroke:"#f43f5e",strokeWidth:2.5,dot:{fill:"#f43f5e",r:3,strokeWidth:0},activeDot:{r:5},type:"monotone",children:h.jsx(lt,{dataKey:"utilisationPct",position:"top",offset:30,style:{fill:"#f43f5e",fontSize:10,fontWeight:700},formatter:W=>W>0?`${W.toFixed(0)}%`:""})}),j&&h.jsx(Tf,{x1:j,x2:j,fill:"#e879f9",fillOpacity:.18})]})}),g&&h.jsxs("div",{className:"border-t border-slate-700 px-5 py-3 overflow-y-auto flex-shrink-0",style:{maxHeight:"320px"},children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("p",{className:"text-xs font-semibold text-slate-200",children:GN(g)}),h.jsx("button",{onClick:()=>k(null),className:"text-xs text-slate-500 hover:text-slate-300 px-2 py-0.5 rounded hover:bg-slate-700",children:"✕ close"})]}),(((U=S.get(g))==null?void 0:U.length)??0)>0&&h.jsxs("div",{className:"mb-3",children:[h.jsxs("p",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wide mb-1.5",children:["Airtable Bookings — ",S.get(g).length," booking",S.get(g).length>1?"s":""]}),h.jsxs("table",{className:"w-full text-xs border-collapse",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"text-slate-500 border-b border-slate-800",children:[h.jsx("th",{className:"text-left pb-1 pr-3 font-medium whitespace-nowrap",children:"Status"}),h.jsx("th",{className:"text-left pb-1 pr-3 font-medium",children:"Task"}),h.jsx("th",{className:"text-left pb-1 pr-3 font-medium whitespace-nowrap",children:"Project"}),h.jsx("th",{className:"text-left pb-1 pr-3 font-medium whitespace-nowrap",children:"Dates"}),h.jsx("th",{className:"text-right pb-1 font-medium whitespace-nowrap",children:"h/day"})]})}),h.jsx("tbody",{children:S.get(g).map((W,G)=>{const ne=W.status==="Active",te=ne?{background:"#4f46e522",border:"1px solid #4f46e5",color:"#818cf8"}:{background:"#0891b222",border:"1px solid #0891b2",color:"#67e8f9"};return h.jsxs("tr",{className:"border-b border-slate-800/30",children:[h.jsx("td",{className:"pr-3 py-1.5",children:h.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-semibold whitespace-nowrap",style:te,children:ne?"Active":"Soft"})}),h.jsx("td",{className:"pr-3 py-1.5 text-slate-300 max-w-[200px]",children:h.jsx("span",{className:"block truncate",title:W.task,children:W.task||"—"})}),h.jsxs("td",{className:"pr-3 py-1.5 whitespace-nowrap",children:[W.projectNumber&&h.jsx("span",{className:"font-mono text-cyan-400 mr-1",children:W.projectNumber}),h.jsx("span",{className:"text-slate-400 max-w-[120px] truncate inline-block align-bottom",title:W.projectName,children:W.projectName||"—"})]}),h.jsxs("td",{className:"pr-3 py-1.5 text-slate-500 whitespace-nowrap text-[10px]",children:[W.startDate," → ",W.endDate]}),h.jsxs("td",{className:"py-1.5 text-right font-semibold whitespace-nowrap",style:{color:ne?"#818cf8":"#67e8f9"},children:[W.hoursPerDay,"h"]})]},G)})})]})]}),h.jsxs("p",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wide mb-1.5",children:["Time Logs — ",(((B=T.get(g))==null?void 0:B.length)??0)===0?"No entries":`${T.get(g).length} entr${T.get(g).length===1?"y":"ies"}`]}),(V=T.get(g))!=null&&V.length?h.jsxs("table",{className:"w-full text-xs border-collapse",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"text-slate-400 border-b border-slate-700",children:[h.jsx("th",{className:"text-left pb-1.5 pr-3 font-medium whitespace-nowrap",children:"Project"}),h.jsx("th",{className:"text-left pb-1.5 pr-3 font-medium",children:"Task"}),h.jsx("th",{className:"text-left pb-1.5 pr-3 font-medium whitespace-nowrap",children:"Type"}),h.jsx("th",{className:"text-right pb-1.5 font-medium whitespace-nowrap",children:"Hours"})]})}),h.jsx("tbody",{children:(T.get(g)??[]).map((W,G)=>{const ne=Hn(W),te=ne==="leave",oe=te?null:sr.find(z=>z.id===ne);return h.jsxs("tr",{className:"border-b border-slate-800/40",children:[h.jsx("td",{className:"pr-3 py-1.5 font-mono text-cyan-400 whitespace-nowrap",children:W.projectNumber||"—"}),h.jsx("td",{className:"pr-3 py-1.5 text-slate-400 max-w-[220px]",children:h.jsx("span",{className:"block truncate",title:W.taskDescription||W.projectTitle,children:W.taskDescription||W.projectTitle||"—"})}),h.jsx("td",{className:"pr-3 py-1.5 whitespace-nowrap",children:h.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium",style:te?{background:"#ef444422",color:"#ef4444"}:{background:((oe==null?void 0:oe.color)??"#94a3b8")+"22",color:(oe==null?void 0:oe.color)??"#94a3b8"},children:te?"Leave":(oe==null?void 0:oe.label)??ne})}),h.jsxs("td",{className:"py-1.5 text-right font-semibold whitespace-nowrap",style:{color:te?"#f87171":"#2dd4bf"},children:[ct(W.hoursLogged),"h"]})]},G)})})]}):h.jsx("p",{className:"text-xs text-slate-500 italic",children:"No time logged on this day — check if leave was missed."})]}),h.jsx("div",{className:"px-5 pb-4",children:h.jsx(Lb,{hidden:new Set,onToggle:()=>{}})})]})})}function uie({logs:e}){var ri,ni;const[t,r]=Q.useState(null),[n,a]=Q.useState(()=>new Set([new Date().toISOString().slice(0,7)])),[i,s]=Q.useState(null),[l,u]=Q.useState(!1),[f,d]=Q.useState(null),[p,x]=Q.useState(new Set(["feeRelated_line","clientRelated_line","nonBillable","forecast"])),[v,w]=Q.useState(null),[b,g]=Q.useState(null),[k,A]=Q.useState(null),[S,N]=Q.useState(!0),[T,E]=Q.useState(new Set),[j,D]=Q.useState(!1),[P,H]=Q.useState(""),[U,B]=Q.useState(""),[V,W]=Q.useState(""),[G,ne]=Q.useState(""),[te,oe]=Q.useState([]),[z,ie]=Q.useState([]),[K,C]=Q.useState(!1),[re,F]=Q.useState(null),[R,Y]=Q.useState(null);Q.useEffect(()=>{Promise.all([Qk("airtable_resources"),Qk("airtable_bookings")]).then(([le,me])=>{var ke,Te;(ke=le==null?void 0:le.data)!=null&&ke.length&&(oe(le.data),F(new Date(le.savedAt))),(Te=me==null?void 0:me.data)!=null&&Te.length&&ie(me.data)}).catch(console.error)},[]);const fe=Q.useCallback(async()=>{C(!0),Y(null);try{const le=new Date(Date.now()-15552e6).toISOString().split("T")[0],me=new Date(Date.now()+90*864e5).toISOString().split("T")[0],[ke,Te]=await Promise.all([eie(),tie(le,me)]);oe(ke),ie(Te),F(new Date),await Promise.all([Jk("airtable_resources",ke),Jk("airtable_bookings",Te)])}catch(le){Y(String(le))}finally{C(!1)}},[]),ce=le=>{s(null),a(me=>{const ke=new Set(me);return ke.has(le)?ke.delete(le):ke.add(le),ke})},se=le=>x(me=>{const ke=new Set(me);return ke.has(le)?ke.delete(le):ke.add(le),ke}),he=Q.useMemo(()=>{const le=new Map;for(const me of te)le.set(me.recordId,me);return le},[te]),Ce=Q.useMemo(()=>{const le=new Map;for(const me of te)me.email&&le.set(me.email,me.startDate);return le},[te]),I=Q.useMemo(()=>{const le=eF();for(const me of te){if(!me.email)continue;const ke=le.get(me.email);ke?(me.department&&(ke.department=me.department),me.availHoursPerWeek&&(ke.availHoursPerWeek=me.availHoursPerWeek)):le.set(me.email,{name:me.name,email:me.email,department:me.department||"Unknown",availHoursPerWeek:me.availHoursPerWeek||40})}return le},[te]),qe=Q.useMemo(()=>{const le=new Map;for(const me of te)me.email&&me.employmentType&&le.set(me.email,me.employmentType);return le},[te]),Ne=Q.useMemo(()=>Array.from(new Set(e.map(le=>le.division).filter(Boolean))).sort(),[e]),De=Q.useMemo(()=>Array.from(new Set(e.map(le=>le.brand).filter(Boolean))).sort(),[e]),Fe=Q.useMemo(()=>Array.from(new Set(te.map(le=>le.employmentType).filter(Boolean))).sort(),[te]),Se=Q.useMemo(()=>{var me;const le=new Set;for(const ke of e){if(i){const ze=qa(ke);if(zei.to)continue}else if(n.size>0&&!n.has(Yr(ke)))continue;if(U&&ke.division!==U||V&&ke.brand!==V)continue;const Te=(me=ke.submitter)==null?void 0:me.trim();Te&&le.add(Te)}return Array.from(le).sort((ke,Te)=>ke.localeCompare(Te))},[e,i,n,U,V]),Je=Q.useCallback(le=>{var ke,Te;const me=new Set(T);if(me.has(le)?me.delete(le):me.add(le),E(me),me.size>0){const ze=new Set;for(const Ze of me){const Oe=te.find(Le=>Le.name===Ze);if(Oe!=null&&Oe.email){const Le=((ke=I.get(Oe.email))==null?void 0:ke.department)??Oe.department;Le&&Le!=="Unknown"&&ze.add(Le)}else{const Le=e.find(Me=>Me.submitter===Ze);if(Le){const Me=Jt(Le.submitterEmail||""),Ae=(Te=I.get(Me))==null?void 0:Te.department;Ae&&Ae!=="Unknown"&&ze.add(Ae)}}}ze.size===1?r(Array.from(ze)[0]):ze.size>1&&r(null)}},[T,te,I,e]),pt=Q.useMemo(()=>{const le=new Date().toISOString().slice(0,7),me=e.map(vt=>Yr(vt)).filter(vt=>/^\d{4}-\d{2}$/.test(vt)&&vt<=le);if(!me.length)return[];const ke=Array.from(new Set(me)).sort(),[Te,ze]=[ke[0],ke[ke.length-1]],[Ze,Oe]=Te.split("-").map(Number),[Le,Me]=ze.split("-").map(Number),Ae=[];let Pe=Ze,et=Oe;for(;Pe12&&(et=1,Pe++);return Ae},[e]),Ge=Q.useMemo(()=>{if(i){const le=new Set([i.from.slice(0,7),i.to.slice(0,7)]);return Array.from(le).sort()}return n.size===0?pt:Array.from(n).sort()},[i,n,pt]),ut=Q.useMemo(()=>{const le=new Set($l.map(me=>me.department));return KN.filter(me=>le.has(me))},[]),it=Q.useMemo(()=>{var ze,Ze,Oe,Le;const le=new Map;for(const Me of e){const Ae=Jt(Me.submitterEmail||"");if(!Ae)continue;if(i){const vt=qa(Me);if(vti.to)continue}else if(n.size>0&&!n.has(Yr(Me)))continue;if(U&&Me.division!==U||V&&Me.brand!==V)continue;const Pe=Hn(Me)==="leave",et=le.get(Ae);et?(et.hours+=Me.hoursLogged,Pe&&(et.leaveHours+=Me.hoursLogged)):le.set(Ae,{hours:Me.hoursLogged,name:Me.submitter,leaveHours:Pe?Me.hoursLogged:0})}const me=new Date().toISOString().split("T")[0],ke=[],Te=new Set;for(const Me of $l){if(Me.email){if(Te.has(Me.email))continue;Te.add(Me.email)}const Ae=Me.email?Ce.get(Me.email):void 0;if(Ae&&Ae>me)continue;const Pe=Me.email?le.get(Me.email):void 0;if(!Pe){if(!i)continue;if(Me.email){const J=te.find(ee=>Jt(ee.email)===Me.email);if(J!=null&&J.inactive||J!=null&&J.endDate&&J.endDate0&&!T.has(et))continue;const vt=Me.email?qe.get(Me.email)??"":"";if(G&&vt!==G)continue;const Qe=((ze=I.get(Me.email))==null?void 0:ze.department)||Me.department||"Unknown",Nt=((Ze=I.get(Me.email))==null?void 0:Ze.availHoursPerWeek)??Me.availHoursPerWeek;let M;if(i){const J=Ae&&Ae>i.from?Ae:i.from;M=(J<=i.to?pi(J,i.to):0)*Nt/5}else{const J=Ae?Ae.slice(0,7):null;M=(J?Ge.filter(xe=>xe>=J):Ge).reduce((xe,Ee)=>xe+Vc(Nt,Ee),0)}const Z=(Pe==null?void 0:Pe.leaveHours)??0,q=Math.max(0,M-Z),X=Math.max(0,((Pe==null?void 0:Pe.hours)??0)-Z);ke.push({name:Me.name.trim(),email:Me.email,department:Qe,allocated:q,logged:X,utilisationPct:q>0?X/q*100:0,leaveHours:Z})}for(const[Me,{hours:Ae,name:Pe,leaveHours:et}]of le){if(Te.has(Me)||T.size>0&&!T.has(Pe))continue;const vt=qe.get(Me)??"";if(G&&vt!==G)continue;const Qe=I.get(Me),Nt=(Qe==null?void 0:Qe.department)||"Unknown",M=(Qe==null?void 0:Qe.availHoursPerWeek)??0,Z=Ce.get(Me);let q;if(i){const xe=Z&&Z>i.from?Z:i.from,Ee=xe<=i.to?pi(xe,i.to):0;q=M>0?Ee*M/5:0}else{const xe=Z?Z.slice(0,7):null,Ee=xe?Ge.filter(ge=>ge>=xe):Ge;q=M>0?Ee.reduce((ge,be)=>ge+Vc(M,be),0):0}const X=et,J=Math.max(0,q-X),ee=Math.max(0,Ae-X);ke.push({name:Pe,email:Me,department:Nt,allocated:J,logged:ee,utilisationPct:J>0?ee/J*100:0,leaveHours:X})}if(i&&te.length)for(const Me of te){if(!Me.email||Te.has(Me.email)||Me.inactive||Me.startDate&&Me.startDate>i.to||Me.endDate&&Me.endDate0&&!T.has(Me.name))continue;const Ae=Me.employmentType??"";if(G&&Ae!==G)continue;const Pe=((Oe=I.get(Me.email))==null?void 0:Oe.department)??Me.department??"Unknown",et=((Le=I.get(Me.email))==null?void 0:Le.availHoursPerWeek)??Me.availHoursPerWeek,vt=Me.startDate&&Me.startDate>i.from?Me.startDate:i.from,Nt=(vt<=i.to?pi(vt,i.to):0)*et/5;Nt<=0||(ke.push({name:Me.name,email:Me.email,department:Pe,allocated:Nt,logged:0,utilisationPct:0,leaveHours:0}),Te.add(Me.email))}return ke},[e,i,te,I,Ce,qe,Ge,n,T,U,V,G]),_t=Q.useMemo(()=>{if(!z.length||!he.size)return new Map;if(!Ge.length&&!i)return new Map;let le,me;if(i)le=i.from,me=i.to;else{le=Ge[0]+"-01";const[Te,ze]=Ge[Ge.length-1].split("-").map(Number);me=new Date(Te,ze,0).toISOString().split("T")[0]}const ke=new Map;for(const Te of z){if(Te.placeholder||Te.status!=="Active"&&Te.status!=="Soft-Booking"||!Te.startDate||!Te.endDate||Te.hoursPerDay<=0)continue;const ze=Te.startDate>le?Te.startDate:le,Ze=Te.endDateZe)continue;const Oe=pi(ze,Ze);if(Oe<=0)continue;const Le=Oe*Te.hoursPerDay;for(const Me of Te.resourceRecordIds){const Ae=he.get(Me);if(!(Ae!=null&&Ae.email))continue;const Pe=ke.get(Ae.email)??{active:0,soft:0};Te.status==="Active"?Pe.active+=Le:Pe.soft+=Le,ke.set(Ae.email,Pe)}}return ke},[z,he,Ge,i]),Lt=Q.useMemo(()=>{if(!te.length)return[];let le,me;if(i)le=i.from,me=i.to;else{le=Ge.length?Ge[0]+"-01":null;const[Te,ze]=Ge.length?Ge[Ge.length-1].split("-").map(Number):[0,0];me=Ge.length&&Te?new Date(Te,ze,0).toISOString().split("T")[0]:null}const ke=new Set(it.map(Te=>Te.email).filter(Boolean));return te.filter(Te=>{var ze;return!Te.email||t&&(((ze=I.get(Te.email))==null?void 0:ze.department)??Te.department)!==t||le&&Te.endDate&&Te.endDateme?!1:_t.has(Te.email)||!Te.inactive||ke.has(Te.email)})},[te,Ge,i,_t,it,t,I]),Tt=Q.useMemo(()=>{const le=Lt.filter(Qe=>!rs(Qe.employmentType)),me=Lt.filter(Qe=>rs(Qe.employmentType)),ke=new Set(le.map(Qe=>Qe.email)),Te=new Set(me.map(Qe=>Qe.email)),ze=t?it.filter(Qe=>Qe.department===t):it,Ze=ze.filter(Qe=>ke.has(Qe.email)),Oe=ze.filter(Qe=>Te.has(Qe.email)),Le=Ze.reduce((Qe,Nt)=>Qe+Nt.allocated,0),Me=Ze.reduce((Qe,Nt)=>Qe+Nt.logged,0),Ae=Oe.reduce((Qe,Nt)=>Qe+Nt.allocated,0),Pe=Oe.reduce((Qe,Nt)=>Qe+Nt.logged,0),et=Ze.reduce((Qe,Nt)=>{const M=_t.get(Nt.email)??{active:0,soft:0};return Qe+M.active+M.soft},0),vt=Oe.reduce((Qe,Nt)=>{const M=_t.get(Nt.email)??{active:0,soft:0};return Qe+M.active+M.soft},0);return{fteCount:le.length,fteUtil:Le>0?Me/Le*100:0,fteLogged:Me,fteAlloc:Le,fteBooked:et,fteForecastPct:Le>0?et/Le*100:0,frlCount:me.length,frlUtil:Ae>0?Pe/Ae*100:0,frlLogged:Pe,frlAlloc:Ae,frlBooked:vt,frlForecastPct:Ae>0?vt/Ae*100:0}},[Lt,it,t,_t]),Tr=Q.useMemo(()=>{const le=new Map;for(const me of e){const ke=Jt(me.submitterEmail||""),Te=I.get(ke),ze=Te?Te.department:"Unknown";if(!ut.includes(ze))continue;if(i){const Le=qa(me);if(Lei.to)continue}else if(n.size>0&&!n.has(Yr(me)))continue;le.has(ze)||le.set(ze,{bg_0:0,bg_idle:0,bg_1:0,bg_2:0,bg_3:0});const Ze=le.get(ze),Oe=Hn(me);Oe!=="leave"&&(Ze[Rb[Oe]]+=me.hoursLogged)}return ut.map(me=>{var et;const ke=it.filter(vt=>vt.department===me),Te=ke.reduce((vt,Qe)=>vt+Qe.allocated,0),ze=ke.reduce((vt,Qe)=>vt+Qe.logged,0),Ze=le.get(me)??{bg_0:0,bg_idle:0,bg_1:0,bg_2:0,bg_3:0},Oe=Math.round(Ze.bg_2),Le=Math.round(Ze.bg_1),Me=Math.round(Ze.bg_0+Ze.bg_idle+Ze.bg_3);let Ae=0,Pe=0;for(const[vt,Qe]of _t)(((et=I.get(vt))==null?void 0:et.department)??"Unknown")===me&&(Ae+=Qe.active,Pe+=Qe.soft);return{name:Kc[me]??me,fullName:me,email:me,allocated:Math.round(Te),utilisationLine:Math.round(ze),utilisationPct:Te>0?+(ze/Te*100).toFixed(1):0,totalLogged:Math.round(ze),bg_0:Math.round(Ze.bg_0),bg_idle:Math.round(Ze.bg_idle),bg_1:Math.round(Ze.bg_1),bg_2:Math.round(Ze.bg_2),bg_3:Math.round(Ze.bg_3),feeRelatedLine:Oe,feeRelatedPct:Te>0?+(Oe/Te*100).toFixed(1):0,clientRelatedLine:Le,clientRelatedPct:Te>0?+(Le/Te*100).toFixed(1):0,nonBillableLine:Me,nonBillablePct:Te>0?+(Me/Te*100).toFixed(1):0,activeBooked:Math.round(Ae),softBooked:Math.round(Pe),totalBooked:Math.round(Ae+Pe),forecastLine:Ae+Pe,forecastPct:Te>0?+((Ae+Pe)/Te*100).toFixed(1):0}})},[it,ut,e,I,i,n,_t]),Rr=Q.useMemo(()=>{var Ze;const le=T.size>0&&!t;if(!t&&!le)return[];const me=le?new Set(it.map(Oe=>Oe.email)):null,ke=new Map;for(const Oe of e){const Le=Jt(Oe.submitterEmail||"");if(t){const Pe=I.get(Le);if(((Pe==null?void 0:Pe.department)||"Unknown")!==t)continue}else if(me&&!me.has(Le))continue;if(i){const Pe=qa(Oe);if(Pei.to)continue}else if(n.size>0&&!n.has(Yr(Oe)))continue;ke.has(Le)||ke.set(Le,{bg_0:0,bg_idle:0,bg_1:0,bg_2:0,bg_3:0});const Me=ke.get(Le),Ae=Hn(Oe);Ae!=="leave"&&(Me[Rb[Ae]]+=Oe.hoursLogged)}const Te=t?it.filter(Oe=>Oe.department===t):it.slice(),ze=new Set(Te.map(Oe=>Oe.email));for(const Oe of Lt){if(!Oe.email||ze.has(Oe.email))continue;const Le=((Ze=I.get(Oe.email))==null?void 0:Ze.department)??Oe.department??"Unknown";if(t&&Le!==t||G&&Oe.employmentType!==G||T.size>0&&!T.has(Oe.name))continue;let Me;if(i){const Ae=Oe.startDate&&Oe.startDate>i.from?Oe.startDate:i.from,Pe=Ae<=i.to?pi(Ae,i.to):0;Me=Math.round(Pe*Oe.availHoursPerWeek/5)}else{const Ae=Oe.startDate?Oe.startDate.slice(0,7):null,Pe=Ae?Ge.filter(et=>et>=Ae):Ge;Me=Math.round(Pe.reduce((et,vt)=>et+Vc(Oe.availHoursPerWeek,vt),0))}Te.push({name:Oe.name,email:Oe.email,department:Le,allocated:Me,logged:0,utilisationPct:0,leaveHours:0})}return Te.sort((Oe,Le)=>!t&&T.size>0&&Oe.department!==Le.department?Oe.department.localeCompare(Le.department):Oe.logged!==Le.logged?Le.logged-Oe.logged:Oe.name.localeCompare(Le.name)),Te.map(Oe=>{const Le=ke.get(Oe.email)??{bg_0:0,bg_idle:0,bg_1:0,bg_2:0,bg_3:0},Me=Math.round(Le.bg_2),Ae=Math.round(Le.bg_1),Pe=Math.round(Le.bg_0+Le.bg_idle+Le.bg_3),et=_t.get(Oe.email)??{active:0,soft:0};return{name:n1(Oe.name),fullName:Oe.name,email:Oe.email,deptLabel:Kc[Oe.department]??Oe.department,allocated:Math.round(Oe.allocated),utilisationLine:Math.round(Oe.logged),utilisationPct:Oe.allocated>0?+(Oe.logged/Oe.allocated*100).toFixed(1):0,totalLogged:Math.round(Oe.logged),bg_0:Math.round(Le.bg_0),bg_idle:Math.round(Le.bg_idle),bg_1:Math.round(Le.bg_1),bg_2:Math.round(Le.bg_2),bg_3:Math.round(Le.bg_3),feeRelatedLine:Me,feeRelatedPct:Oe.allocated>0?+(Me/Oe.allocated*100).toFixed(1):0,clientRelatedLine:Ae,clientRelatedPct:Oe.allocated>0?+(Ae/Oe.allocated*100).toFixed(1):0,nonBillableLine:Pe,nonBillablePct:Oe.allocated>0?+(Pe/Oe.allocated*100).toFixed(1):0,activeBooked:Math.round(et.active),softBooked:Math.round(et.soft),totalBooked:Math.round(et.active+et.soft),forecastLine:et.active+et.soft,forecastPct:Oe.allocated>0?+((et.active+et.soft)/Oe.allocated*100).toFixed(1):0}})},[it,t,T,G,e,I,i,n,_t,Lt,Ge]),qt=Q.useMemo(()=>f!=null&&f.email?e.filter(le=>{if(Jt(le.submitterEmail||"")!==f.email)return!1;if(i){const ke=qa(le);return ke>=i.from&&ke<=i.to}return!(n.size>0&&!n.has(Yr(le)))}).sort((le,me)=>me.hoursLogged-le.hoursLogged):[],[e,f,i,n]),Ar=Q.useMemo(()=>f?it.find(le=>le.email===f.email&&le.department===t)??null:null,[f,it,t]),ot=Q.useMemo(()=>{const le=t?it.filter(ze=>ze.department===t):it,me=le.reduce((ze,Ze)=>ze+Ze.allocated,0),ke=le.reduce((ze,Ze)=>ze+Ze.logged,0),Te=le.reduce((ze,Ze)=>{const Oe=_t.get(Ze.email)??{active:0,soft:0};return ze+Oe.active+Oe.soft},0);return{allocated:me,logged:ke,pct:me>0?ke/me*100:0,active:new Set(le.filter(ze=>ze.logged>0).map(ze=>ze.email||ze.name)).size,forecastPct:me>0?Te/me*100:0,totalBooked:Te}},[it,t,_t]),At=Q.useMemo(()=>{const me=(t?it.filter(Oe=>Oe.department===t):it).reduce((Oe,Le)=>Oe+Le.allocated,0);let ke=0,Te=0,ze=0;for(const Oe of e){const Le=Jt(Oe.submitterEmail||""),Me=I.get(Le);if(t&&((Me==null?void 0:Me.department)??"Unknown")!==t)continue;if(i){const Pe=qa(Oe);if(Pei.to)continue}else if(n.size>0&&!n.has(Yr(Oe)))continue;const Ae=Hn(Oe);Ae!=="leave"&&(Ae==="feeRelated"?ke+=Oe.hoursLogged:Ae==="clientRelated"?Te+=Oe.hoursLogged:ze+=Oe.hoursLogged)}const Ze=(t?it.filter(Oe=>Oe.department===t):it).reduce((Oe,Le)=>Oe+Le.leaveHours,0);return{feeRelatedPct:me>0?ke/me*100:0,clientRelatedPct:me>0?Te/me*100:0,nonBillablePct:me>0?ze/me*100:0,leaveHours:Ze,leavePct:me>0?Ze/me*100:0}},[e,I,t,i,n,it]),er=Q.useMemo(()=>{if(!te.length)return[];const le="2026-04-01",me=new Date().toISOString().split("T")[0];return te.filter(ke=>!(!ke.startDate||ke.inactive||ke.startDate>me||ke.endDate&&ke.endDate{var Me,Ae;const ze=rs(ke.employmentType),Ze=rs(Te.employmentType);if(ze!==Ze)return ze?1:-1;const Oe=((Me=I.get(ke.email))==null?void 0:Me.department)??ke.department??"",Le=((Ae=I.get(Te.email))==null?void 0:Ae.department)??Te.department??"";return Oe!==Le?Oe.localeCompare(Le):ke.name.localeCompare(Te.name)})},[te,I]),Bt=Q.useMemo(()=>{if(!b)return[];const le=e.filter(ke=>{var ze;if(Jt(ke.submitterEmail||"")!==b.email)return!1;if(i){const Ze=((ze=ke.date)==null?void 0:ze.slice(0,10))??"";if(Zei.to)return!1}else if(n.size>0&&!n.has(Yr(ke)))return!1;return ke.projectNumber&&!["leave","idle","houseAdmin"].includes(Hn(ke))}),me=new Map;for(const ke of le){const Te=ke.projectNumber;me.has(Te)||me.set(Te,{number:Te,title:ke.projectTitle||"",type:ke.projectType||"",hours:0}),me.get(Te).hours+=ke.hoursLogged}return Array.from(me.values()).sort((ke,Te)=>Te.hours-ke.hours)},[b,e,i,n]),vn=Q.useMemo(()=>{if(!k)return[];const le=new Set(te.filter(Te=>Te.email===k.email).map(Te=>Te.recordId));if(!le.size)return[];let me,ke;if(i)me=i.from,ke=i.to;else{me=Ge.length?Ge[0]+"-01":"";const[Te,ze]=Ge.length?Ge[Ge.length-1].split("-").map(Number):[0,0];ke=Ge.length?new Date(Te,ze,0).toISOString().split("T")[0]:""}return z.filter(Te=>!(Te.placeholder||Te.status!=="Active"&&Te.status!=="Soft-Booking"||!Te.resourceRecordIds.some(ze=>le.has(ze))||me&&Te.endDateke))},[k,z,te,i,Ge]),Ia=Q.useMemo(()=>{if(!v)return[];const le=new Set(te.filter(me=>me.email===v.email).map(me=>me.recordId));return le.size?z.filter(me=>me.placeholder||me.status!=="Active"&&me.status!=="Soft-Booking"?!1:me.resourceRecordIds.some(ke=>le.has(ke))):[]},[v,z,te]),Es=Math.max(760,Rr.length*100),js=Math.max(1400,Rr.length*150),Ci=Q.useMemo(()=>(t?[t]:ut).map(me=>{const ke=e.filter(Pe=>{const et=Jt(Pe.submitterEmail||""),vt=I.get(et);if(((vt==null?void 0:vt.department)??"Unknown")!==me)return!1;if(i){const Qe=qa(Pe);if(Qei.to)return!1}else if(n.size>0&&!n.has(Yr(Pe)))return!1;return!0}),Te=Array.from(new Set(ke.map(Pe=>Jt(Pe.submitterEmail||"")).filter(Boolean))),ze=Te.length||1,Ze=new Set(ke.map(Pe=>Pe.date)).size||1,Oe=new Set(ke.map(Pe=>Yr(Pe))).size||1,Le=Oe*4.33,Me=Te.map(Pe=>{const et=ke.filter(M=>Jt(M.submitterEmail||"")===Pe),Qe=new Set(et.filter(M=>M.projectNumber&&!["leave","idle","houseAdmin"].includes(Hn(M))).map(M=>M.projectNumber)).size,Nt=I.get(Pe);return{email:Pe,name:Nt?n1(Nt.name):Pe,projectsTotal:Qe,perMonth:Qe/Oe,perWeek:Qe/Le,perDay:Qe/Ze}}).sort((Pe,et)=>et.projectsTotal-Pe.projectsTotal),Ae=new Set(ke.filter(Pe=>Pe.projectNumber&&!["leave","idle","houseAdmin"].includes(Hn(Pe))).map(Pe=>Pe.projectNumber)).size;return{dept:me,short:Kc[me]??me,headcount:ze,totalProjects:Ae,avgProjectsPerPersonPerMonth:Me.reduce((Pe,et)=>Pe+et.perMonth,0)/ze,avgProjectsPerPersonPerWeek:Me.reduce((Pe,et)=>Pe+et.perWeek,0)/ze,avgProjectsPerPersonPerDay:Me.reduce((Pe,et)=>Pe+et.perDay,0)/ze,uniqueDays:Ze,uniqueMonths:Oe,weeksInPeriod:Math.round(Le*10)/10,personRows:Me}}),[e,I,t,ut,i,n]);return h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{className:"flex items-center gap-3 bg-slate-900/60 rounded-xl border border-slate-800 px-4 py-2.5",children:[h.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[h.jsx("span",{className:`w-2 h-2 rounded-full ${te.length?"bg-emerald-400":"bg-slate-600"}`}),h.jsx("span",{className:"text-xs text-slate-400 font-medium",children:"Airtable"})]}),te.length>0?h.jsxs("span",{className:"text-xs text-slate-500",children:[te.length," resources · ",z.length," bookings",re&&` · synced ${re.toLocaleDateString()} ${re.toLocaleTimeString()}`]}):h.jsx("span",{className:"text-xs text-slate-500",children:"Not synced — click Sync to load resource & booking data"}),R&&h.jsxs("span",{className:"text-xs text-red-400 truncate max-w-xs",title:R,children:["⚠ ",R.slice(0,80)]}),h.jsx("button",{onClick:fe,disabled:K,className:`ml-auto flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors disabled:opacity-50 + bg-indigo-900/40 border-indigo-700/60 text-indigo-300 hover:bg-indigo-900/70`,children:K?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"w-3 h-3 border border-indigo-400 border-t-transparent rounded-full animate-spin"}),"Syncing…"]}):"↻ Sync Airtable"})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2 bg-slate-900/60 rounded-xl border border-slate-800 px-4 py-3",children:[h.jsxs("div",{className:"relative",children:[h.jsxs("button",{onClick:()=>D(le=>!le),className:"flex items-center gap-1.5 bg-slate-800 border border-slate-700 rounded text-xs text-slate-200 px-2 py-0.5 cursor-pointer min-w-[160px] max-w-[220px]",children:[h.jsx("span",{className:"text-[10px] text-slate-500 uppercase tracking-wide shrink-0",children:"Name"}),h.jsx("span",{className:"flex-1 text-left truncate",children:T.size===0?"All":T.size===1?Array.from(T)[0]:`${T.size} selected`}),h.jsx("span",{className:"text-slate-500 shrink-0",children:"▾"})]}),j&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>{D(!1),H("")}}),h.jsxs("div",{className:"absolute top-full left-0 mt-1 z-50 bg-slate-900 border border-slate-700 rounded-lg shadow-xl min-w-[240px] flex flex-col",style:{maxHeight:320},children:[h.jsx("div",{className:"p-2 border-b border-slate-700 shrink-0",children:h.jsxs("div",{className:"flex items-center gap-2 bg-slate-800 border border-slate-600 rounded px-2 py-1.5",children:[h.jsx("svg",{className:"w-3 h-3 text-slate-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z"})}),h.jsx("input",{autoFocus:!0,type:"text",value:P,onChange:le=>H(le.target.value),placeholder:"Search…",className:"bg-transparent text-xs text-slate-200 placeholder-slate-500 outline-none w-full",onClick:le=>le.stopPropagation()}),P&&h.jsx("button",{onClick:()=>H(""),className:"text-slate-500 hover:text-slate-300 text-[10px] shrink-0",children:"✕"})]})}),h.jsxs("div",{className:"overflow-y-auto flex-1 p-1",children:[!P&&h.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 hover:bg-slate-800 rounded cursor-pointer text-xs border-b border-slate-800 mb-1",children:[h.jsx("input",{type:"checkbox",checked:T.size===0,onChange:()=>E(new Set),className:"accent-indigo-500 cursor-pointer"}),h.jsx("span",{className:"text-slate-400 italic",children:"All Names"})]}),Se.filter(le=>!P||le.toLowerCase().includes(P.toLowerCase())).map(le=>h.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 hover:bg-slate-800 rounded cursor-pointer text-xs",children:[h.jsx("input",{type:"checkbox",checked:T.has(le),onChange:()=>Je(le),className:"accent-indigo-500 cursor-pointer"}),h.jsx("span",{className:T.has(le)?"text-indigo-300 font-medium":"text-slate-200",children:le})]},le)),P&&Se.filter(le=>le.toLowerCase().includes(P.toLowerCase())).length===0&&h.jsxs("p",{className:"text-xs text-slate-500 italic text-center py-3",children:['No names match "',P,'"']})]})]})]})]}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"text-[10px] text-slate-500 shrink-0 uppercase tracking-wide",children:"Division"}),h.jsxs("select",{value:U,onChange:le=>B(le.target.value),className:"bg-slate-800 border border-slate-700 rounded text-xs text-slate-200 px-2 py-0.5 outline-none cursor-pointer max-w-[140px]",children:[h.jsx("option",{value:"",children:"All"}),Ne.map(le=>h.jsx("option",{value:le,children:le},le))]})]}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"text-[10px] text-slate-500 shrink-0 uppercase tracking-wide",children:"Brand"}),h.jsxs("select",{value:V,onChange:le=>W(le.target.value),className:"bg-slate-800 border border-slate-700 rounded text-xs text-slate-200 px-2 py-0.5 outline-none cursor-pointer max-w-[140px]",children:[h.jsx("option",{value:"",children:"All"}),De.map(le=>h.jsx("option",{value:le,children:le},le))]})]}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"text-[10px] text-slate-500 shrink-0 uppercase tracking-wide",children:"Employment"}),h.jsxs("select",{value:G,onChange:le=>ne(le.target.value),className:"bg-slate-800 border border-slate-700 rounded text-xs text-slate-200 px-2 py-0.5 outline-none cursor-pointer max-w-[140px]",children:[h.jsx("option",{value:"",children:"All"}),Fe.map(le=>h.jsx("option",{value:le,children:le},le))]})]}),(T.size>0||U||V||G)&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-px h-4 bg-slate-700 shrink-0"}),h.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[Array.from(T).map(le=>h.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 bg-indigo-900/50 border border-indigo-700/60 text-indigo-300 rounded text-[10px]",children:[le,h.jsx("button",{onClick:()=>Je(le),className:"hover:text-white",children:"✕"})]},le)),U&&h.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 bg-indigo-900/50 border border-indigo-700/60 text-indigo-300 rounded text-[10px]",children:[U,h.jsx("button",{onClick:()=>B(""),className:"hover:text-white",children:"✕"})]}),V&&h.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 bg-indigo-900/50 border border-indigo-700/60 text-indigo-300 rounded text-[10px]",children:[V,h.jsx("button",{onClick:()=>W(""),className:"hover:text-white",children:"✕"})]}),G&&h.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 bg-indigo-900/50 border border-indigo-700/60 text-indigo-300 rounded text-[10px]",children:[G,h.jsx("button",{onClick:()=>ne(""),className:"hover:text-white",children:"✕"})]})]}),h.jsx("button",{onClick:()=>{E(new Set),B(""),W(""),ne("")},className:"ml-auto text-[10px] text-slate-500 hover:text-slate-300 border border-slate-700 rounded px-2 py-0.5 transition-colors shrink-0",children:"Reset all"})]})]}),h.jsxs("div",{className:"flex flex-wrap gap-1",children:[h.jsx(YN,{active:!t,onClick:()=>r(null),children:"All Departments"}),ut.map(le=>h.jsx(YN,{active:t===le,onClick:()=>r(le),children:Kc[le]??le},le))]}),h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsx("span",{className:"text-xs text-slate-400 shrink-0",children:"Week:"}),[-1,0,1].map(le=>{const me=nie(le),ke=le===-1?"Last Week":le===0?"This Week":"Next Week",Te=(i==null?void 0:i.from)===me.from;return h.jsxs("button",{onClick:()=>{Te?s(null):(s(me),a(new Set))},className:`flex items-center gap-1.5 px-2.5 py-0.5 text-xs rounded-full border transition-colors ${Te?"bg-emerald-600 border-emerald-500 text-white":"bg-slate-800 border-slate-700 text-slate-400 hover:text-slate-200"}`,children:[ke,h.jsx("span",{className:`text-[10px] ${Te?"text-emerald-200":"text-slate-500"}`,children:me.label})]},le)})]}),h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsx("span",{className:"text-xs text-slate-400 shrink-0",children:"Month:"}),h.jsx("button",{onClick:()=>{s(null),a(new Set)},className:`px-2.5 py-0.5 text-xs rounded-full border transition-colors ${!i&&n.size===0?"bg-violet-600 border-violet-500 text-white":"bg-slate-800 border-slate-700 text-slate-400 hover:text-slate-200"}`,children:"All Months"}),pt.map(le=>h.jsx("button",{onClick:()=>ce(le),className:`px-2.5 py-0.5 text-xs rounded-full border transition-colors ${!i&&n.has(le)?"bg-violet-600 border-violet-500 text-white":"bg-slate-800 border-slate-700 text-slate-400 hover:text-slate-200"}`,children:bu(le)},le))]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("p",{className:"text-[10px] font-semibold text-slate-500 uppercase tracking-widest px-0.5",children:"Hours & Utilisation"}),h.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:[h.jsx(Wa,{label:"Allocated (net)",value:`${ct(ot.allocated)}h`}),h.jsx(Wa,{label:"Time Logged (net)",value:`${ct(ot.logged)}h`,vc:"text-teal-400"}),h.jsx(Wa,{label:"Active People (logged)",value:ot.active.toString(),sub:Lt.length?`${Lt.length} active in Airtable`:void 0}),h.jsx(Wa,{label:"Actual Utilisation",value:`${ot.pct.toFixed(1)}%`,vc:ot.pct>100?"text-red-400":ot.pct>85?"text-amber-400":"text-emerald-400",sub:"based on time logged"}),h.jsx(Wa,{label:"Forecast Utilisation",value:`${ot.forecastPct.toFixed(1)}%`,vc:ot.forecastPct>100?"text-red-400":ot.forecastPct>85?"text-amber-400":"text-orange-400",sub:`${ct(ot.totalBooked)}h booked`,accent:!0}),h.jsx(Wa,{label:"Leave Hours",vc:"text-red-400",value:`${ct(At.leaveHours)}h`,sub:At.leavePct>0?`${At.leavePct.toFixed(1)}% of allocated`:void 0})]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("p",{className:"text-[10px] font-semibold text-slate-500 uppercase tracking-widest px-0.5",children:"Billability Breakdown"}),h.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[h.jsx(Wa,{label:"Fee Related",value:`${At.feeRelatedPct.toFixed(1)}%`,vc:"text-green-400",sub:"billable %"}),h.jsx(Wa,{label:"Client Related",value:`${At.clientRelatedPct.toFixed(1)}%`,vc:"text-purple-400",sub:"billable %"}),h.jsx(Wa,{label:"Non-Billable",value:`${At.nonBillablePct.toFixed(1)}%`,vc:"text-fuchsia-400",sub:"house admin · idle · other"}),h.jsx(Wa,{label:"Total Billable",value:`${(At.feeRelatedPct+At.clientRelatedPct).toFixed(1)}%`,vc:"text-cyan-400",sub:"fee + client combined"})]})]}),te.length>0&&h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("p",{className:"text-[10px] font-semibold text-slate-500 uppercase tracking-widest px-0.5",children:"FTE vs Freelancer"}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[h.jsxs("div",{className:"rounded-xl border border-blue-800/50 p-4",style:{background:"#0a1628"},children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-semibold text-blue-300",children:"Full-Time Employees"}),h.jsx("div",{className:"text-[10px] text-blue-500 mt-0.5",children:"active in period · excl. freelancers"})]}),h.jsx("div",{className:"text-3xl font-black text-white",children:Tt.fteCount})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[h.jsxs("div",{className:"bg-blue-900/20 rounded-lg p-3 border border-blue-800/30",children:[h.jsx("div",{className:"text-[10px] text-blue-400 mb-1",children:"Actual Utilisation"}),h.jsxs("div",{className:`text-2xl font-bold ${Tt.fteUtil>100?"text-red-400":Tt.fteUtil>85?"text-amber-400":"text-emerald-400"}`,children:[Tt.fteUtil.toFixed(1),"%"]}),h.jsxs("div",{className:"text-[10px] text-blue-500 mt-1",children:[ct(Tt.fteLogged),"h logged · ",ct(Tt.fteAlloc),"h avail"]})]}),h.jsxs("div",{className:"bg-orange-900/20 rounded-lg p-3 border border-orange-800/30",children:[h.jsx("div",{className:"text-[10px] text-orange-400 mb-1",children:"Forecast Utilisation"}),h.jsxs("div",{className:`text-2xl font-bold ${Tt.fteForecastPct>100?"text-red-400":Tt.fteForecastPct>85?"text-amber-400":"text-orange-400"}`,children:[Tt.fteForecastPct.toFixed(1),"%"]}),h.jsxs("div",{className:"text-[10px] text-orange-500 mt-1",children:[ct(Tt.fteBooked),"h booked in Airtable"]})]})]})]}),h.jsxs("div",{className:"rounded-xl border border-purple-800/50 p-4",style:{background:"#130a28"},children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-semibold text-purple-300",children:"Freelancers"}),h.jsx("div",{className:"text-[10px] text-purple-500 mt-0.5",children:"active in period · 3-point check"})]}),h.jsx("div",{className:"text-3xl font-black text-white",children:Tt.frlCount})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[h.jsxs("div",{className:"bg-purple-900/20 rounded-lg p-3 border border-purple-800/30",children:[h.jsx("div",{className:"text-[10px] text-purple-400 mb-1",children:"Actual Utilisation"}),h.jsxs("div",{className:`text-2xl font-bold ${Tt.frlUtil>100?"text-red-400":Tt.frlUtil>85?"text-amber-400":"text-emerald-400"}`,children:[Tt.frlUtil.toFixed(1),"%"]}),h.jsxs("div",{className:"text-[10px] text-purple-500 mt-1",children:[ct(Tt.frlLogged),"h logged · ",ct(Tt.frlAlloc),"h avail"]})]}),h.jsxs("div",{className:"bg-orange-900/20 rounded-lg p-3 border border-orange-800/30",children:[h.jsx("div",{className:"text-[10px] text-orange-400 mb-1",children:"Forecast Utilisation"}),h.jsxs("div",{className:`text-2xl font-bold ${Tt.frlForecastPct>100?"text-red-400":Tt.frlForecastPct>85?"text-amber-400":"text-orange-400"}`,children:[Tt.frlForecastPct.toFixed(1),"%"]}),h.jsxs("div",{className:"text-[10px] text-orange-500 mt-1",children:[ct(Tt.frlBooked),"h booked in Airtable"]})]})]})]})]})]}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 p-4",children:[(()=>{const le=!!t||T.size>0,me=T.size>0&&!t,ke=i?"Weekly Utilisation":"Monthly Utilisation",Te=t?`${t} — ${ke}`:T.size>0?`${T.size} ${T.size===1?"person":"people"} selected — Cross-Department View`:`All Departments — ${ke}`,ze=le?" · Click a name to see daily breakdown · Click bar segment for project logs":" · Click a department bar to drill in · Allocated & logged are net of leave";return h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200",children:Te}),h.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:[i?`Week: ${i.label}`:n.size===0?"All Months":Array.from(n).sort().map(bu).join(", "),ze,me&&h.jsx("span",{className:"text-indigo-400",children:" · dept shown in italic below name"})]})]}),le&&h.jsxs("button",{onClick:()=>u(!0),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs bg-slate-800 hover:bg-slate-700 text-slate-300 rounded-lg border border-slate-700 transition-colors shrink-0 ml-4",children:[h.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})}),"Expand"]})]})})(),t||T.size>0?h.jsx("div",{className:"overflow-x-auto",children:h.jsx(XN,{data:Rr,width:Es,height:440,onBarClick:d,hidden:p,showDeptLabel:T.size>0&&!t,onPersonClick:(le,me)=>w({email:le,name:me}),onBookingClick:(le,me)=>A({email:le,name:me})})}):h.jsx(iie,{data:Tr,onBarClick:le=>r(le.name),hidden:p}),h.jsx(Lb,{hidden:p,onToggle:se})]}),h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 overflow-hidden",children:[h.jsxs("div",{className:"px-5 py-3 border-b border-slate-800",children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200",children:"Project Load per Person"}),h.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:["Unique projects touched per person · averaged over ",i?`week: ${i.label}`:n.size>0?`${n.size} selected month${n.size>1?"s":""}`:"all months"]})]}),Ci.map(le=>h.jsxs("div",{className:"border-b border-slate-800 last:border-b-0",children:[h.jsxs("div",{className:"px-5 py-4 flex flex-wrap gap-6 items-start",children:[h.jsxs("div",{className:"min-w-[140px]",children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-1",children:le.short}),h.jsxs("div",{className:"text-xs text-slate-400",children:[le.headcount," people · ",le.totalProjects," unique projects"]})]}),h.jsxs("div",{className:"flex gap-8 flex-wrap",children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-1",children:"Avg / person / month"}),h.jsx("div",{className:"text-2xl font-black text-indigo-400",children:le.avgProjectsPerPersonPerMonth.toFixed(1)}),h.jsx("div",{className:"text-[10px] text-slate-600 mt-0.5",children:"projects"})]}),h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-1",children:"Avg / person / week"}),h.jsx("div",{className:"text-2xl font-black text-amber-400",children:le.avgProjectsPerPersonPerWeek.toFixed(1)}),h.jsxs("div",{className:"text-[10px] text-slate-600 mt-0.5",children:["projects · ",le.uniqueMonths," mo × 4.33"]})]}),h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] text-slate-500 uppercase tracking-wide mb-1",children:"Avg / person / day"}),h.jsx("div",{className:"text-2xl font-black text-emerald-400",children:le.avgProjectsPerPersonPerDay.toFixed(1)}),h.jsxs("div",{className:"text-[10px] text-slate-600 mt-0.5",children:["projects · ",le.uniqueDays," days data"]})]})]})]}),h.jsx("div",{className:"px-5 pb-4 overflow-x-auto",children:h.jsxs("table",{className:"w-full text-xs border-collapse min-w-[520px]",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"border-b border-slate-800 text-slate-500",children:[h.jsx("th",{className:"text-left py-1.5 pr-4 font-medium",children:"Person"}),h.jsx("th",{className:"text-right py-1.5 px-3 font-medium",children:"Total projects"}),h.jsx("th",{className:"text-right py-1.5 px-3 font-medium",children:"Per month"}),h.jsx("th",{className:"text-right py-1.5 px-3 font-medium",children:"Per week"}),h.jsx("th",{className:"text-right py-1.5 px-3 font-medium",children:"Per day"})]})}),h.jsx("tbody",{children:le.personRows.map((me,ke)=>h.jsxs("tr",{onClick:()=>g({email:me.email,name:me.name}),className:`border-b border-slate-800/40 cursor-pointer hover:bg-indigo-900/20 transition-colors ${ke%2===1?"bg-slate-800/20":""}`,children:[h.jsxs("td",{className:"py-1.5 pr-4 text-slate-300 whitespace-nowrap",children:[me.name,h.jsx("span",{className:"ml-1.5 text-[9px] text-slate-600",children:"↗"})]}),h.jsx("td",{className:"py-1.5 px-3 text-right text-slate-300 font-medium tabular-nums",children:me.projectsTotal}),h.jsx("td",{className:"py-1.5 px-3 text-right text-indigo-300 tabular-nums",children:me.perMonth.toFixed(1)}),h.jsx("td",{className:"py-1.5 px-3 text-right text-amber-300 tabular-nums",children:me.perWeek.toFixed(1)}),h.jsx("td",{className:"py-1.5 px-3 text-right text-emerald-300 tabular-nums",children:me.perDay.toFixed(1)})]},ke))})]})})]},le.dept))]}),te.length>0&&h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 overflow-hidden",children:[h.jsxs("div",{className:"px-5 py-3 border-b border-slate-800 flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200",children:"Booking vs Actual Utilisation"}),h.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:["Booked hours (Active + Soft) from Airtable vs actual logged hours · ",i?`week: ${i.label}`:n.size>0?`${n.size} selected month${n.size>1?"s":""}`:"all months"]})]}),h.jsxs("div",{className:"flex items-center gap-4 text-[10px] shrink-0",children:[h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm bg-indigo-500"}),"Active booked"]}),h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm bg-cyan-600/70"}),"Soft-booked"]}),h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"w-2.5 h-2.5 rounded-sm bg-teal-500"}),"Actual logged"]})]})]}),(()=>{const le=KN.filter(ke=>ke!=="Unknown"),me=new Date().toISOString().split("T")[0];return le.map(ke=>{const Te=te.filter(Ae=>Ae.department===ke&&!Ae.inactive&&(!Ae.startDate||Ae.startDate<=me)&&(!Ae.endDate||Ae.endDate>=me));if(!Te.length)return null;const ze=Te.map(Ae=>{const Pe=i?pi(i.from,i.to)*Ae.availHoursPerWeek/5:Ge.reduce((Z,q)=>Z+Vc(Ae.availHoursPerWeek,q),0),et=_t.get(Ae.email)??{active:0,soft:0},vt=(()=>{const Z=it.find(q=>q.email===Ae.email);return Z?Z.logged:0})(),Qe=et.active+et.soft,Nt=Pe>0?Qe/Pe*100:0,M=Pe>0?vt/Pe*100:0;return{r:Ae,avail:Pe,active:et.active,soft:et.soft,bookedTotal:Qe,actual:vt,bookedPct:Nt,actualPct:M}}).sort((Ae,Pe)=>Pe.bookedTotal-Ae.bookedTotal),Ze=ze.reduce((Ae,Pe)=>Ae+Pe.avail,0),Oe=ze.reduce((Ae,Pe)=>Ae+Pe.active,0),Le=ze.reduce((Ae,Pe)=>Ae+Pe.soft,0),Me=ze.reduce((Ae,Pe)=>Ae+Pe.actual,0);return h.jsxs("div",{className:"border-b border-slate-800 last:border-0",children:[h.jsxs("div",{className:"px-5 py-2 bg-slate-800/30 flex items-center gap-4",children:[h.jsx("span",{className:"text-xs font-semibold text-slate-200",children:Kc[ke]??ke}),h.jsxs("span",{className:"text-[10px] text-slate-500",children:[ze.length," active people"]}),h.jsxs("span",{className:"text-[10px] text-indigo-300 ml-auto",children:["Booked ",Oe>0||Le>0?`${Math.round(Oe+Le)}h`:"—",Le>0&&h.jsxs("span",{className:"text-cyan-400",children:[" (",Math.round(Le),"h soft)"]})," · ","Actual ",Math.round(Me),"h",Ze>0&&h.jsxs("span",{className:"text-slate-500",children:[" · Avail ",Math.round(Ze),"h"]})]})]}),h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{children:h.jsxs("tr",{style:{background:"#1e3a5f"},children:[h.jsx("th",{className:"px-4 py-2 text-left text-white font-semibold",children:"Name"}),h.jsx("th",{className:"px-3 py-2 text-right text-white font-semibold whitespace-nowrap",children:"Available h"}),h.jsx("th",{className:"px-3 py-2 text-right text-white font-semibold whitespace-nowrap",children:"Active Booked"}),h.jsx("th",{className:"px-3 py-2 text-right text-white font-semibold whitespace-nowrap",children:"Soft-Booked"}),h.jsx("th",{className:"px-3 py-2 text-right text-white font-semibold whitespace-nowrap",children:"Total Booked"}),h.jsx("th",{className:"px-3 py-2 text-right text-white font-semibold whitespace-nowrap",children:"Booked %"}),h.jsx("th",{className:"px-3 py-2 text-right text-white font-semibold whitespace-nowrap",children:"Actual Logged"}),h.jsx("th",{className:"px-3 py-2 text-right text-white font-semibold whitespace-nowrap",children:"Actual %"}),h.jsx("th",{className:"px-3 py-2 text-left text-white font-semibold whitespace-nowrap",children:"Visual"})]})}),h.jsxs("tbody",{children:[ze.map((Ae,Pe)=>{const et=Math.max(Ae.bookedPct,Ae.actualPct,100),vt=Math.min(100,Ae.bookedTotal/(et/100*Ae.avail||1)*100),Qe=Ae.bookedTotal>0?Ae.active/Ae.bookedTotal*vt:0,Nt=Ae.bookedTotal>0?Ae.soft/Ae.bookedTotal*vt:0,M=Math.min(100,Ae.avail>0?Ae.actual/Ae.avail*100:0);return h.jsxs("tr",{className:Pe%2===0?"bg-slate-800/20":"bg-slate-900/40",children:[h.jsx("td",{className:"px-4 py-2 text-slate-200 whitespace-nowrap",children:n1(Ae.r.name)}),h.jsxs("td",{className:"px-3 py-2 text-right text-slate-400 tabular-nums",children:[Math.round(Ae.avail),"h"]}),h.jsx("td",{className:"px-3 py-2 text-right text-indigo-300 tabular-nums",children:Ae.active>0?`${Math.round(Ae.active)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-cyan-400 tabular-nums",children:Ae.soft>0?`${Math.round(Ae.soft)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-slate-200 font-semibold tabular-nums",children:Ae.bookedTotal>0?`${Math.round(Ae.bookedTotal)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right tabular-nums font-semibold",style:{color:Ae.bookedPct>100?"#f87171":Ae.bookedPct>85?"#fbbf24":"#34d399"},children:Ae.avail>0?`${Ae.bookedPct.toFixed(0)}%`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-teal-300 tabular-nums",children:Ae.actual>0?`${Math.round(Ae.actual)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right tabular-nums font-semibold",style:{color:Ae.actualPct>100?"#f87171":Ae.actualPct>85?"#fbbf24":"#34d399"},children:Ae.avail>0?`${Ae.actualPct.toFixed(0)}%`:"—"}),h.jsx("td",{className:"px-3 py-2 w-32",children:h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsxs("div",{className:"h-2 bg-slate-700 rounded-full overflow-hidden flex",children:[h.jsx("div",{style:{width:`${Qe}%`},className:"h-full bg-indigo-500 shrink-0"}),h.jsx("div",{style:{width:`${Nt}%`},className:"h-full bg-cyan-600/70 shrink-0"})]}),h.jsx("div",{className:"h-2 bg-slate-700 rounded-full overflow-hidden",children:h.jsx("div",{style:{width:`${M}%`,background:ru(Ae.actualPct)},className:"h-full rounded-full"})})]})})]},Ae.r.email)}),h.jsxs("tr",{className:"border-t border-slate-700",style:{background:"#1a2740"},children:[h.jsx("td",{className:"px-4 py-2 text-slate-200 font-bold",children:"Total"}),h.jsxs("td",{className:"px-3 py-2 text-right text-slate-400 font-bold tabular-nums",children:[Math.round(Ze),"h"]}),h.jsx("td",{className:"px-3 py-2 text-right text-indigo-300 font-bold tabular-nums",children:Oe>0?`${Math.round(Oe)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-cyan-400 font-bold tabular-nums",children:Le>0?`${Math.round(Le)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-slate-200 font-bold tabular-nums",children:Oe+Le>0?`${Math.round(Oe+Le)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right font-bold tabular-nums",style:{color:Ze>0?ru((Oe+Le)/Ze*100):"#94a3b8"},children:Ze>0?`${((Oe+Le)/Ze*100).toFixed(0)}%`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-teal-300 font-bold tabular-nums",children:Me>0?`${Math.round(Me)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right font-bold tabular-nums",style:{color:Ze>0?ru(Me/Ze*100):"#94a3b8"},children:Ze>0?`${(Me/Ze*100).toFixed(0)}%`:"—"}),h.jsx("td",{})]})]})]})]},ke)})})()]}),te.length>0&&er.length>0&&h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 overflow-hidden",children:[h.jsxs("div",{className:"px-5 py-3 border-b border-slate-800 flex items-center justify-between cursor-pointer",onClick:()=>N(le=>!le),children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-slate-200",children:"Resource Availability — Active from April 2026"}),h.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:[er.filter(le=>!rs(le.employmentType)).length," FTE ·"," ",er.filter(le=>rs(le.employmentType)).length," freelancers ·"," ","started & no end date (or ending Apr 2026+) · bookings reflect selected period"]})]}),h.jsx("span",{className:"text-xs text-slate-500 hover:text-slate-300 transition-colors shrink-0 ml-4",children:S?"▲ Collapse":"▼ Expand"})]}),S&&(()=>{const le=er.filter(Te=>!rs(Te.employmentType)),me=er.filter(Te=>rs(Te.employmentType)),ke=(Te,ze,Ze,Oe)=>Te.length?h.jsxs("div",{className:"border-b border-slate-800 last:border-0",children:[h.jsxs("div",{className:"px-5 py-2 flex items-center gap-3",style:{background:"#0f172a"},children:[h.jsx("span",{className:"text-xs font-semibold",style:{color:Oe},children:ze}),h.jsxs("span",{className:"text-[10px] text-slate-500",children:[Te.length," people"]})]}),h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-xs min-w-[900px]",children:[h.jsx("thead",{children:h.jsxs("tr",{style:{background:Ze},children:[h.jsx("th",{className:"text-left px-4 py-2 text-white font-semibold whitespace-nowrap",children:"Name"}),h.jsx("th",{className:"text-left px-3 py-2 text-white font-semibold whitespace-nowrap",children:"Dept"}),h.jsx("th",{className:"text-left px-3 py-2 text-white font-semibold whitespace-nowrap",children:"Start Date"}),h.jsx("th",{className:"text-left px-3 py-2 text-white font-semibold whitespace-nowrap",children:"End Date"}),h.jsx("th",{className:"text-right px-3 py-2 text-white font-semibold whitespace-nowrap",children:"h/wk"}),h.jsx("th",{className:"text-right px-3 py-2 text-white font-semibold whitespace-nowrap",children:"Active Booked"}),h.jsx("th",{className:"text-right px-3 py-2 text-white font-semibold whitespace-nowrap",children:"Soft Booked"}),h.jsx("th",{className:"text-right px-3 py-2 text-white font-semibold whitespace-nowrap",children:"Booked %"}),h.jsx("th",{className:"text-right px-3 py-2 text-white font-semibold whitespace-nowrap",children:"Logged"}),h.jsx("th",{className:"text-left px-3 py-2 text-white font-semibold",children:"Status"})]})}),h.jsx("tbody",{children:Te.map((Le,Me)=>{var q,X;const Ae=_t.get(Le.email)??{active:0,soft:0},Pe=i?pi(i.from,i.to)*Le.availHoursPerWeek/5:Ge.reduce((J,ee)=>J+Vc(Le.availHoursPerWeek,ee),0),et=((q=it.find(J=>J.email===Le.email))==null?void 0:q.logged)??0,vt=Ae.active+Ae.soft,Qe=Pe>0?vt/Pe*100:0,Nt=((X=I.get(Le.email))==null?void 0:X.department)??Le.department??"—",M=Qe>=85?"Fully Booked":vt>0?"Partially Booked":"Available",Z=Qe>=85?"#f87171":vt>0?"#fbbf24":"#34d399";return h.jsxs("tr",{className:Me%2===0?"bg-slate-800/20":"bg-slate-900/40",children:[h.jsx("td",{className:"px-4 py-2 text-slate-200 whitespace-nowrap",children:Le.name}),h.jsx("td",{className:"px-3 py-2 text-slate-400 whitespace-nowrap",children:Nt}),h.jsx("td",{className:"px-3 py-2 text-slate-400 font-mono text-[11px] whitespace-nowrap",children:Le.startDate||"—"}),h.jsx("td",{className:"px-3 py-2 whitespace-nowrap",children:Le.endDate?h.jsx("span",{className:"font-mono text-[11px] text-amber-400",children:Le.endDate}):h.jsx("span",{className:"text-slate-600 italic text-[11px]",children:"ongoing"})}),h.jsx("td",{className:"px-3 py-2 text-right text-slate-400 tabular-nums",children:Le.availHoursPerWeek}),h.jsx("td",{className:"px-3 py-2 text-right text-indigo-300 tabular-nums",children:Ae.active>0?`${Math.round(Ae.active)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-cyan-400 tabular-nums",children:Ae.soft>0?`${Math.round(Ae.soft)}h`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right tabular-nums font-semibold",style:{color:Pe>0?Z:"#64748b"},children:Pe>0?`${Qe.toFixed(0)}%`:"—"}),h.jsx("td",{className:"px-3 py-2 text-right text-teal-300 tabular-nums",children:et>0?`${Math.round(et)}h`:"—"}),h.jsx("td",{className:"px-3 py-2",children:h.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold whitespace-nowrap",style:{color:Z,background:Z+"22",border:`1px solid ${Z}44`},children:M})})]},Le.email)})})]})})]},ze):null;return h.jsxs(h.Fragment,{children:[ke(le,"Full-Time Employees","#1e3a5f","#93c5fd"),ke(me,"Freelancers","#2d1a5f","#c084fc")]})})()]}),b&&h.jsx("div",{className:"fixed inset-0 z-50 bg-black/80 flex items-center justify-center p-4",onClick:le=>le.target===le.currentTarget&&g(null),children:h.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-xl w-full max-w-2xl max-h-[80vh] flex flex-col shadow-2xl",children:[h.jsxs("div",{className:"px-5 py-4 border-b border-slate-800 flex items-center justify-between shrink-0",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-white",children:b.name}),h.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:[Bt.length," projects ·"," ",Bt.reduce((le,me)=>le+me.hours,0).toFixed(1),"h total logged",n.size>0?` · ${n.size} selected month${n.size>1?"s":""}`:" · all months"]})]}),h.jsx("button",{onClick:()=>g(null),className:"text-slate-500 hover:text-slate-200 transition-colors p-1",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),h.jsx("div",{className:"overflow-y-auto flex-1",children:Bt.length===0?h.jsx("p",{className:"text-slate-500 text-sm text-center py-10",children:"No project logs found for this period."}):h.jsxs("table",{className:"w-full text-xs border-collapse",children:[h.jsx("thead",{className:"sticky top-0 bg-slate-900/95",children:h.jsxs("tr",{className:"border-b border-slate-700 text-slate-500",children:[h.jsx("th",{className:"text-left px-5 py-2.5 font-medium",children:"Project No."}),h.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Project Title"}),h.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Type"}),h.jsx("th",{className:"text-right px-5 py-2.5 font-medium",children:"Hours Logged"})]})}),h.jsx("tbody",{children:Bt.map((le,me)=>h.jsxs("tr",{className:`border-b border-slate-800/50 ${me%2===1?"bg-slate-800/20":""}`,children:[h.jsx("td",{className:"px-5 py-2 font-mono text-cyan-400 whitespace-nowrap",children:le.number}),h.jsx("td",{className:"px-3 py-2 text-slate-300 max-w-[220px]",children:h.jsx("span",{className:"block truncate",title:le.title,children:le.title||"—"})}),h.jsx("td",{className:"px-3 py-2 text-slate-500 whitespace-nowrap",children:le.type||"—"}),h.jsxs("td",{className:"px-5 py-2 text-right font-semibold text-teal-400 tabular-nums",children:[le.hours.toFixed(1),"h"]})]},me))})]})})]})}),t&&h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-800 overflow-hidden",children:[h.jsxs("div",{className:"px-4 py-3 border-b border-slate-800 flex items-center justify-between",children:[h.jsxs("p",{className:"text-xs font-semibold text-slate-300",children:[t," — Individual Detail"]}),h.jsxs("p",{className:"text-xs text-slate-500",children:[it.filter(le=>le.department===t).length," members · click row to drill down"]})]}),h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"border-b border-slate-700 text-slate-400 bg-slate-800/40",children:[h.jsx("th",{className:"text-left px-4 py-2",children:"Name"}),h.jsx("th",{className:"text-right px-4 py-2",children:"Allocated (net)"}),h.jsx("th",{className:"text-right px-4 py-2",children:"Leave"}),h.jsx("th",{className:"text-right px-4 py-2",children:"Logged (net)"}),h.jsx("th",{className:"text-right px-4 py-2",children:"Utilisation"}),h.jsx("th",{className:"px-4 py-2 w-36",children:"Capacity"})]})}),h.jsx("tbody",{children:it.filter(le=>le.department===t).sort((le,me)=>me.logged-le.logged).map((le,me)=>{const ke=le.utilisationPct,Te=ru(ke),ze=e.some(Ze=>Jt(Ze.submitterEmail||"")===le.email);return h.jsxs("tr",{onClick:()=>ze&&d({email:le.email,name:le.name,billingId:null}),className:`border-b border-slate-800/40 transition-colors ${ze?"cursor-pointer hover:bg-slate-800/40":"opacity-60"}`,children:[h.jsxs("td",{className:"px-4 py-2 text-slate-200 font-medium",children:[le.name.replace(/\s*-\s*FRL\s*$/i,""),ze&&h.jsx("span",{className:"ml-1 text-[10px] text-slate-500",children:"↗"})]}),h.jsxs("td",{className:"px-4 py-2 text-right text-slate-400",children:[ct(le.allocated),"h"]}),h.jsx("td",{className:"px-4 py-2 text-right text-red-400/80 text-[11px]",children:le.leaveHours>0?`-${ct(le.leaveHours)}h`:"—"}),h.jsxs("td",{className:"px-4 py-2 text-right text-teal-400 font-medium",children:[ct(le.logged),"h"]}),h.jsx("td",{className:"px-4 py-2 text-right font-semibold",style:{color:Te},children:le.allocated>0?`${ke.toFixed(1)}%`:"—"}),h.jsxs("td",{className:"px-4 py-2",children:[h.jsx("div",{className:"h-1.5 bg-slate-700 rounded-full overflow-hidden",children:h.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(100,ke)}%`,background:Te}})}),ke>100&&h.jsxs("span",{className:"text-[9px] text-red-400",children:["+",(ke-100).toFixed(0),"% over"]})]})]},me)})})]})]}),l&&(t||T.size>0)&&h.jsx("div",{className:"fixed inset-0 z-50 bg-black/85 flex items-start justify-center p-4 overflow-auto",onClick:le=>le.target===le.currentTarget&&u(!1),children:h.jsxs("div",{className:"bg-slate-900 rounded-xl border border-slate-700 w-full max-w-[96vw] my-4 shadow-2xl",children:[h.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-slate-700",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-white",children:t??`${T.size} people — Cross-Department`}),h.jsxs("p",{className:"text-xs text-slate-400 mt-0.5",children:[i?`Week: ${i.label}`:n.size===0?"All Months":Array.from(n).sort().map(bu).join(", ")," · ",Rr.length," people · click any bar segment to drill into individual logs"]})]}),h.jsxs("button",{onClick:()=>u(!1),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs bg-slate-800 hover:bg-red-900/40 hover:text-red-300 text-slate-300 rounded-lg border border-slate-700 transition-colors",children:[h.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Close"]})]}),h.jsxs("div",{className:"p-5",children:[h.jsx("div",{className:"overflow-x-auto",children:h.jsx(XN,{data:Rr,width:js,height:650,onBarClick:d,hidden:p,showDeptLabel:T.size>0&&!t,onPersonClick:(le,me)=>w({email:le,name:me}),onBookingClick:(le,me)=>A({email:le,name:me})})}),h.jsx(Lb,{hidden:p,onToggle:se})]})]})}),f&&Ar&&h.jsx(sie,{person:Ar,allLogs:qt,initialBillingId:f.billingId,onClose:()=>d(null)}),v&&h.jsx(cie,{personEmail:v.email,personName:v.name,logs:e,selectedMonths:n,weekRange:i,activeBooked:(ri=_t.get(v.email))==null?void 0:ri.active,softBooked:(ni=_t.get(v.email))==null?void 0:ni.soft,personBookings:Ia,personStartDate:Ce.get(v.email),onClose:()=>w(null)}),k&&h.jsx(lie,{name:k.name,bookings:vn,calcMonths:Ge,weekRange:i,onClose:()=>A(null)})]})}function YN({active:e,onClick:t,children:r}){return h.jsx("button",{onClick:t,className:`px-3 py-1.5 text-xs rounded-lg font-medium transition-colors ${e?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,children:r})}function Wa({label:e,value:t,vc:r="text-white",sub:n,accent:a}){return h.jsxs("div",{className:`rounded-xl border p-4 ${a?"border-orange-800/50":"border-slate-800 bg-slate-900"}`,style:a?{background:"#1a0e00"}:void 0,children:[h.jsx("div",{className:`text-xs ${a?"text-orange-400":"text-slate-400"}`,children:e}),h.jsx("div",{className:`text-2xl font-bold mt-1 ${r}`,children:t}),n&&h.jsx("div",{className:`text-[10px] mt-0.5 ${a?"text-orange-600":"text-slate-500"}`,children:n})]})}if(typeof document<"u"&&!document.getElementById("tut-kf")){const e=document.createElement("style");e.id="tut-kf",e.textContent=` + @keyframes tutFade { from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)} } + @keyframes tutPop { from{opacity:0;transform:scale(.92) translateY(6px)}to{opacity:1;transform:scale(1) translateY(0)} } + @keyframes tutRing { 0%{box-shadow:0 0 0 0 rgba(99,102,241,.8)}100%{box-shadow:0 0 0 14px rgba(99,102,241,0)} } + @keyframes tutRingG { 0%{box-shadow:0 0 0 0 rgba(16,185,129,.8)}100%{box-shadow:0 0 0 14px rgba(16,185,129,0)} } + @keyframes tutRingA { 0%{box-shadow:0 0 0 0 rgba(245,158,11,.8)}100%{box-shadow:0 0 0 14px rgba(245,158,11,0)} } + @keyframes tutPulse { 0%,100%{opacity:1}50%{opacity:0.4} } + @keyframes tutClick { 0%,100%{transform:scale(1) rotate(0)}30%{transform:scale(0.72) rotate(-8deg)} } + @keyframes tutHiBlink { 0%,100%{opacity:.7}50%{opacity:1} } + @keyframes tutSpin { from{transform:rotate(0)}to{transform:rotate(360deg)} } + @keyframes tutBarGrow { from{width:0}to{width:var(--tw,80%)} } + `,document.head.appendChild(e)}const Ws=[{id:1,phase:"Setup",title:"Export Time Log from Zoho",desc:"Go to the L'Oréal MASTER MI Dashboard in Zoho → Resourcing tab. Right-click any data table → More → Export → Export as CSV. This gives you the time log file the dashboard needs."},{id:2,phase:"Setup",title:"Upload the Time Log",desc:'Click the "↑ Time Log" button in the top-right header. Select the CSV you exported from Zoho. Data loads instantly and is saved locally — no need to re-upload next session.'},{id:3,phase:"Setup",title:"Sync Airtable Bookings",desc:'Click "Sync Airtable" on the Department tab. This pulls all live bookings (Active and Soft-Booking) from your Airtable resourcing tracker. Without this, the forecast and booking bars will be empty.'},{id:4,phase:"Navigation",title:"Navigate to the Department Tab",desc:'Click "Department" in the nav bar. Use the month pills or This Week / Last Week / Next Week buttons to change the time window. Every chart and KPI card updates instantly.'},{id:5,phase:"Chart",title:"Reading the Utilisation Chart",desc:"Each stacked bar shows how a person's hours were spent: grey = allocated, colours = actual logged hours by category (Fee Related, Idle Time, House Admin, etc.). The red line = average utilisation %. Aim for 75–85%."},{id:6,phase:"Chart",title:"Spotting Resource Issues",desc:"Low bars with high Idle Time (yellow) = underutilised. Bars over the allocated cap = overscheduled. No bar at all = the person hasn't submitted timesheets. All are actionable."},{id:7,phase:"Chart",title:"Active & Soft-Booked Hours",desc:"Indigo bars = Active Bookings, teal bars = Soft Bookings from Airtable. Compare these to logged hours to see whether actual work matches what was planned."},{id:8,phase:"Drill-In",title:"Click a Bar for Hour Breakdown",desc:"Click any coloured bar segment to see a breakdown of which projects and categories contributed those hours. Click a person's name to open their Daily Breakdown — a day-by-day view. Inside, click any booking bar to see the Airtable project behind it."},{id:9,phase:"Advanced",title:"Forecast Line & Filters",desc:"The dashed orange Forecast Utilisation line shows projected util based on confirmed bookings. Toggle it via the legend. Use the name and employment-type filters at the top to focus on specific people or compare FTE vs Freelancer."}],fie=9e3;function die(){const[e,t]=Q.useState(0),[r,n]=Q.useState(!0),[a,i]=Q.useState(0),[s,l]=Q.useState(0),u=Q.useCallback(x=>{t(x),i(0),l(v=>v+1)},[]),f=Q.useCallback(()=>u((e+1)%Ws.length),[e,u]),d=Q.useCallback(()=>u((e-1+Ws.length)%Ws.length),[e,u]);Q.useEffect(()=>{if(!r)return;const x=Date.now(),v=setInterval(()=>{const w=Math.min(100,(Date.now()-x)/fie*100);i(w),w>=100&&(clearInterval(v),f())},60);return()=>clearInterval(v)},[r,e,f]);const p=Ws[e];return h.jsxs("div",{className:"max-w-5xl mx-auto",children:[h.jsxs("div",{className:"text-center mb-5",children:[h.jsxs("div",{className:"inline-flex items-center gap-2 bg-indigo-950 border border-indigo-800 rounded-full px-4 py-1.5 mb-3",children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-indigo-400",style:{animation:"tutPulse 1.5s ease-in-out infinite"}}),h.jsx("span",{className:"text-xs text-indigo-300 font-medium",children:"Step-by-Step Guide · Department Tab"})]}),h.jsx("h2",{className:"text-2xl font-bold text-white",children:"Interactive Walkthrough"}),h.jsxs("p",{className:"text-slate-400 text-sm mt-1",children:["Step ",p.id," of ",Ws.length," · ",p.phase]})]}),h.jsx("div",{className:"h-0.5 bg-slate-800 rounded-full mb-4 overflow-hidden",children:h.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-none",style:{width:`${a}%`}})}),h.jsx("div",{className:"flex justify-center gap-1.5 mb-5",children:Ws.map((x,v)=>h.jsx("button",{onClick:()=>u(v),className:`rounded-full transition-all duration-200 ${v===e?"w-6 h-2 bg-indigo-500":"w-2 h-2 bg-slate-700 hover:bg-slate-500"}`},v))}),h.jsxs("div",{className:"bg-slate-900 border border-slate-800 rounded-2xl overflow-hidden",style:{animation:"tutFade 0.35s ease-out"},children:[h.jsxs("div",{className:"bg-slate-800/60 border-b border-slate-700 px-6 py-2 flex items-center gap-3",children:[h.jsx("span",{className:"bg-indigo-600 text-white text-[11px] font-bold px-2.5 py-0.5 rounded-full",children:p.id}),h.jsx("span",{className:"text-slate-400 text-xs font-medium uppercase tracking-wider",children:p.phase}),h.jsx("span",{className:"ml-auto text-[11px] text-slate-500",children:p.title})]}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5",children:[h.jsxs("div",{className:"md:col-span-2 p-8 flex flex-col justify-center border-r border-slate-800",children:[h.jsx("h3",{className:"text-lg font-bold text-white mb-3",children:p.title}),h.jsx("p",{className:"text-slate-300 text-sm leading-relaxed",children:p.desc})]}),h.jsx("div",{className:"md:col-span-3 bg-slate-950/50 flex items-center justify-center min-h-[320px] p-5",children:h.jsx(hie,{step:e,animKey:s})})]})]},s),h.jsxs("div",{className:"flex items-center justify-between mt-4",children:[h.jsx("button",{onClick:d,className:"text-slate-400 hover:text-white text-sm px-4 py-2 rounded-lg bg-slate-800 hover:bg-slate-700 transition-colors",children:"← Previous"}),h.jsx("button",{onClick:()=>n(x=>!x),className:"text-sm px-5 py-2 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white transition-colors",children:r?"⏸ Pause":"▶ Play"}),h.jsx("button",{onClick:f,className:"text-slate-400 hover:text-white text-sm px-4 py-2 rounded-lg bg-slate-800 hover:bg-slate-700 transition-colors",children:"Next →"})]}),h.jsxs("div",{className:"mt-6 border border-slate-800 rounded-xl p-4",children:[h.jsx("p",{className:"text-[11px] text-slate-500 font-semibold uppercase tracking-wider mb-3",children:"Jump to any step"}),h.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-5 gap-2",children:Ws.map((x,v)=>h.jsxs("button",{onClick:()=>u(v),className:`text-left rounded-lg border p-2.5 text-xs transition-colors ${v===e?"border-indigo-600 bg-indigo-950 text-indigo-300":"border-slate-800 bg-slate-900 text-slate-500 hover:border-slate-600 hover:text-slate-300"}`,children:[h.jsxs("div",{className:"font-bold mb-0.5",children:[x.id,". ",x.phase]}),h.jsx("div",{className:"text-[10px] leading-tight opacity-70",children:x.title})]},v))})]})]})}function hie({step:e,animKey:t}){switch(e){case 0:return h.jsx(pie,{},t);case 1:return h.jsx(mie,{},t);case 2:return h.jsx(xie,{},t);case 3:return h.jsx(vie,{},t);case 4:return h.jsx(gie,{},t);case 5:return h.jsx(yie,{},t);case 6:return h.jsx(bie,{},t);case 7:return h.jsx(wie,{},t);case 8:return h.jsx(_ie,{},t);default:return null}}function pie(){return h.jsxs("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:[h.jsx("img",{src:"/tutorial/zoho-export.png",alt:"Zoho export",className:"w-full rounded-lg border border-slate-700 shadow-xl opacity-90"}),h.jsx("p",{className:"text-[10px] text-slate-500 text-center mt-2",children:'Your Zoho screen — click "Export as CSV"'})]})}function mie(){const[e,t]=Q.useState(!1);return Q.useEffect(()=>{const r=setTimeout(()=>t(!0),2e3);return()=>clearTimeout(r)},[]),h.jsx("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:h.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[h.jsxs("div",{className:"bg-slate-700/60 px-4 py-3 flex items-center justify-between",children:[h.jsx("div",{className:"text-xs font-bold text-white",children:"L'Oréal Utilisation Dashboard"}),h.jsx("div",{className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-500 ${e?"bg-emerald-600 text-white":"bg-indigo-600 text-white"}`,style:e?{}:{animation:"tutRing 1.2s ease-out infinite"},children:e?"✓ Time Log":"↑ Time Log"})]}),h.jsx("div",{className:"p-4 text-center",children:e?h.jsxs("div",{style:{animation:"tutPop 0.3s ease-out"},children:[h.jsx("p",{className:"text-emerald-400 text-xs font-medium",children:"58,834 entries loaded"}),h.jsx("p",{className:"text-slate-500 text-[10px] mt-1",children:"Saved locally — no re-upload needed"})]}):h.jsx("p",{className:"text-slate-500 text-xs",children:"Uploading CSV…"})})]})})}function xie(){const[e,t]=Q.useState(0);return Q.useEffect(()=>{const r=setTimeout(()=>t(1),800),n=setTimeout(()=>t(2),3e3);return()=>{clearTimeout(r),clearTimeout(n)}},[]),h.jsxs("div",{className:"w-full max-w-xs space-y-3",style:{animation:"tutFade 0.4s ease-out"},children:[h.jsx("div",{className:`w-full py-2.5 rounded-xl text-sm font-medium text-center border transition-all duration-700 ${e===2?"bg-emerald-900/40 border-emerald-600 text-emerald-300":e===1?"bg-slate-800 border-slate-600 text-slate-300":"bg-indigo-600 border-indigo-500 text-white"}`,style:e===0?{animation:"tutRing 1.2s ease-out infinite"}:{},children:e===2?"✓ Airtable synced":e===1?h.jsxs("span",{className:"flex items-center justify-center gap-2",children:[h.jsx("span",{className:"w-3 h-3 border-2 border-white border-t-transparent rounded-full inline-block",style:{animation:"tutSpin 0.7s linear infinite"}}),"Syncing…"]}):"↻ Sync Airtable"}),e===2&&h.jsx("div",{className:"space-y-1.5",style:{animation:"tutFade 0.3s ease-out"},children:[["Active bookings","387 records","text-emerald-400"],["Soft bookings","94 records","text-cyan-400"],["Resources","142 people","text-indigo-400"]].map(([r,n,a])=>h.jsxs("div",{className:"flex justify-between text-xs",children:[h.jsx("span",{className:"text-slate-500",children:r}),h.jsx("span",{className:`font-medium ${a}`,children:n})]},r))})]})}function vie(){const[e,t]=Q.useState(!1),[r,n]=Q.useState("");return Q.useEffect(()=>{const a=setTimeout(()=>t(!0),700),i=setTimeout(()=>n("This Week"),2200);return()=>{clearTimeout(a),clearTimeout(i)}},[]),h.jsx("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:h.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[h.jsx("div",{className:"flex gap-1 px-3 pt-3 flex-wrap",children:["Forecast","Project Type","Time Log","Department","📖 Guide"].map(a=>h.jsx("div",{className:`px-2.5 py-1.5 text-[11px] font-medium rounded-t-md transition-all ${a==="Department"&&e?"bg-slate-800 text-white border-t border-x border-slate-600":a==="Department"?"text-indigo-400":"text-slate-500"}`,style:a==="Department"&&!e?{animation:"tutPulse 1s ease-in-out infinite"}:{},children:a},a))}),h.jsx("div",{className:"bg-slate-900/50 px-3 py-3 border-t border-slate-700",children:e&&h.jsxs("div",{className:"flex flex-wrap gap-1.5",style:{animation:"tutFade 0.3s ease-out"},children:[["Jan","Feb","Mar","Apr","May"].map(a=>h.jsx("div",{className:"px-2 py-0.5 bg-slate-700 rounded-full text-[10px] text-slate-400",children:a},a)),["Last Week","This Week","Next Week"].map(a=>h.jsx("div",{className:`px-2 py-0.5 rounded-full text-[10px] font-medium border transition-all duration-300 ${r===a?"bg-indigo-600 border-indigo-500 text-white":"bg-slate-700 border-slate-600 text-slate-400"}`,children:a},a))]})})]})})}function gie(){const[e,t]=Q.useState(0),r=[{color:"#4b5563",label:"Allocated hours"},{color:"#f59e0b",label:"House Admin"},{color:"#eab308",label:"Idle Time"},{color:"#22c55e",label:"Fee Related"},{color:"#ef4444",label:"Avg util %"}];Q.useEffect(()=>{const a=setInterval(()=>t(i=>(i+1)%r.length),1200);return()=>clearInterval(a)},[r.length]);const n=[{name:"Creative",alloc:92,logged:68},{name:"Design",alloc:80,logged:74},{name:"Production",alloc:70,logged:52},{name:"Operations",alloc:65,logged:61}];return h.jsxs("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:[h.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 p-3 space-y-2 mb-3",children:[n.map((a,i)=>h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-16 text-[10px] text-slate-400 text-right",children:a.name}),h.jsxs("div",{className:"flex-1 h-4 bg-slate-600/40 rounded overflow-hidden relative",children:[h.jsx("div",{className:"absolute inset-0 bg-slate-600 rounded",style:{width:`${a.alloc}%`}}),h.jsx("div",{className:"absolute top-0 left-0 h-full bg-indigo-500/80 rounded",style:{width:`${a.logged}%`,animation:`tutBarGrow 0.6s ease-out ${i*.1}s both`}})]}),h.jsxs("div",{className:"text-[10px] text-slate-400 w-7",children:[Math.round(a.logged/a.alloc*100),"%"]})]},a.name)),h.jsx("div",{className:"relative h-px bg-red-500/40 mt-1",children:h.jsx("div",{className:"absolute -right-1 -top-2 text-[9px] text-red-400",children:"avg"})})]}),h.jsx("div",{className:"flex flex-wrap gap-2 justify-center",children:r.map((a,i)=>h.jsxs("div",{className:`flex items-center gap-1 px-2 py-0.5 rounded-full border text-[10px] transition-all duration-300 ${i===e?"border-white/50 bg-white/10 text-white scale-105":"border-transparent text-slate-500"}`,children:[h.jsx("div",{className:"w-2.5 h-2.5 rounded-sm",style:{background:a.color}}),a.label]},a.label))})]})}function yie(){const[e,t]=Q.useState(0);Q.useEffect(()=>{const a=setTimeout(()=>t(1),600),i=setTimeout(()=>t(2),2e3),s=setTimeout(()=>t(3),3400);return()=>{clearTimeout(a),clearTimeout(i),clearTimeout(s)}},[]);const r=[{name:"Sneha Pathak",pct:82,idle:5},{name:"Akashaya K.",pct:8,idle:60},{name:"Lian Chetty",pct:108,idle:2},{name:"Bhakti Doshi",pct:27,idle:15}],n=[null,"red","amber","red"];return h.jsxs("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:[h.jsx("div",{className:"bg-slate-800 rounded-xl border border-slate-700 p-3 space-y-2",children:r.map((a,i)=>h.jsxs("div",{className:`flex items-center gap-2 rounded-lg p-1 transition-all duration-500 ${e>i&&n[i]==="red"?"bg-red-950/40 border border-red-800/30":e>i&&n[i]==="amber"?"bg-amber-950/40 border border-amber-800/30":""}`,children:[h.jsx("div",{className:"w-20 text-[10px] text-slate-400 text-right truncate",children:a.name}),h.jsxs("div",{className:"flex-1 h-3.5 bg-slate-700 rounded overflow-hidden relative",children:[a.pct>100&&h.jsx("div",{className:"absolute inset-0 bg-amber-500/20 rounded"}),h.jsx("div",{className:`h-full rounded ${a.pct>100?"bg-amber-500":a.idle>30?"bg-yellow-500/70":"bg-indigo-500/80"}`,style:{width:`${Math.min(a.pct,100)}%`}})]}),h.jsxs("div",{className:`text-[10px] font-bold w-8 ${a.pct>100?"text-amber-400":a.pct<30?"text-red-400":"text-slate-400"}`,children:[a.pct,"%"]})]},a.name))}),e>=2&&h.jsxs("div",{className:"mt-2 space-y-1",style:{animation:"tutPop 0.3s ease-out"},children:[h.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[h.jsx("span",{className:"text-red-400",children:"●"}),h.jsx("span",{className:"text-slate-400",children:"Near-zero logged → no timesheets submitted"})]}),h.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[h.jsx("span",{className:"text-amber-400",children:"●"}),h.jsx("span",{className:"text-slate-400",children:"Over 100% → logged more than allocated"})]})]})]})}function bie(){const[e,t]=Q.useState(0);return Q.useEffect(()=>{const r=setTimeout(()=>t(1),600),n=setTimeout(()=>t(2),2200);return()=>{clearTimeout(r),clearTimeout(n)}},[]),h.jsxs("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:[h.jsx("div",{className:"bg-slate-800 rounded-xl border border-slate-700 p-3 space-y-2",children:[{name:"Sneha Pathak",logged:65,active:78,soft:40},{name:"Sameer Kumar",logged:71,active:60,soft:20},{name:"Deepshika Das",logged:55,active:65,soft:30}].map(r=>h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] text-slate-500 mb-1",children:r.name}),h.jsxs("div",{className:"relative h-4 bg-slate-700 rounded overflow-hidden",children:[h.jsx("div",{className:"absolute top-0 left-0 h-full bg-indigo-500/80 rounded",style:{width:`${r.logged}%`}}),e>=1&&h.jsx("div",{className:"absolute top-0 left-0 h-full bg-indigo-700/60",style:{width:`${r.active}%`,animation:"tutFade 0.4s ease-out",mixBlendMode:"screen"}}),e>=2&&h.jsx("div",{className:"absolute top-0 left-0 h-full bg-cyan-500/50",style:{width:`${r.soft}%`,animation:"tutFade 0.4s ease-out",mixBlendMode:"screen"}})]})]},r.name))}),e>=1&&h.jsxs("div",{className:"mt-2 flex gap-3 justify-center flex-wrap",style:{animation:"tutFade 0.3s ease-out"},children:[h.jsxs("div",{className:"flex items-center gap-1 text-[10px]",children:[h.jsx("div",{className:"w-3 h-2 rounded bg-indigo-600"}),h.jsx("span",{className:"text-slate-400",children:"Active Booked"})]}),h.jsxs("div",{className:"flex items-center gap-1 text-[10px]",children:[h.jsx("div",{className:"w-3 h-2 rounded bg-cyan-500/70"}),h.jsx("span",{className:"text-slate-400",children:"Soft Booked"})]})]})]})}function wie(){const[e,t]=Q.useState(0);return Q.useEffect(()=>{const r=setTimeout(()=>t(1),500),n=setTimeout(()=>t(2),1800),a=setTimeout(()=>t(3),3200);return()=>{clearTimeout(r),clearTimeout(n),clearTimeout(a)}},[]),h.jsxs("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:[h.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 p-3 mb-2",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-20 text-[10px] text-slate-300 text-right",children:"Sneha Iyer"}),h.jsxs("div",{className:"flex-1 h-4 bg-slate-700 rounded overflow-hidden relative cursor-pointer",style:e<1?{animation:"tutRing 1.2s ease-out infinite"}:{},children:[h.jsx("div",{className:"h-full bg-indigo-500/80 rounded",style:{width:"54%"}}),e>=1&&h.jsx("div",{className:"absolute top-0 left-0 h-full w-3 bg-white/20",style:{left:"20%",animation:"tutPulse 0.8s ease-out 3"}})]}),h.jsx("div",{className:"text-[10px] text-amber-400 w-7",children:"54%"})]}),h.jsx("p",{className:"text-[9px] text-slate-500 text-center mt-1",children:"← click bar segment"})]}),e>=2&&h.jsxs("div",{className:"bg-slate-900 border border-indigo-700/50 rounded-xl p-3",style:{animation:"tutPop 0.35s ease-out"},children:[h.jsx("div",{className:"text-[10px] text-indigo-400 font-semibold mb-2",children:"Sneha Iyer — Hour Breakdown"}),[["Fee Related","62.0h","text-emerald-400"],["Client Related","18.0h","text-purple-400"],["House Admin","5.0h","text-amber-400"],["Total logged","85.0h","text-white font-bold"],["Allocated","158.0h","text-slate-400"],["Utilisation","54%","text-amber-400 font-bold"]].map(([r,n,a])=>h.jsxs("div",{className:"flex justify-between text-[10px]",children:[h.jsx("span",{className:"text-slate-500",children:r}),h.jsx("span",{className:a,children:n})]},r))]})]})}function _ie(){const[e,t]=Q.useState(!1);return Q.useEffect(()=>{const r=setTimeout(()=>t(!0),800),n=setTimeout(()=>t(!1),2400),a=setTimeout(()=>t(!0),3800);return()=>{clearTimeout(r),clearTimeout(n),clearTimeout(a)}},[]),h.jsxs("div",{className:"w-full max-w-xs",style:{animation:"tutFade 0.4s ease-out"},children:[h.jsx("div",{className:"flex justify-center mb-3",children:h.jsxs("button",{onClick:()=>t(r=>!r),className:`flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs border transition-all duration-300 ${e?"border-orange-500/50 bg-orange-950/40 text-orange-400":"border-slate-700 bg-slate-800 text-slate-500 line-through"}`,children:[h.jsx("svg",{width:"16",height:"8",children:h.jsx("line",{x1:"0",y1:"4",x2:"16",y2:"4",stroke:e?"#f97316":"#64748b",strokeWidth:"1.5",strokeDasharray:"3 2"})}),"Forecast Utilisation"]})}),h.jsx("div",{className:"bg-slate-800 rounded-xl border border-slate-700 p-3 relative",style:{height:110},children:h.jsxs("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 220 90",preserveAspectRatio:"none",children:[[20,55,90,125,160,195].map((r,n)=>h.jsx("rect",{x:r-10,y:90-[50,62,45,70,55,48][n],width:"20",height:[50,62,45,70,55,48][n],fill:"#6366f1",opacity:"0.7",rx:"3"},r)),h.jsx("polyline",{points:"20,44 55,33 90,50 125,26 160,38 195,47",fill:"none",stroke:"#f97316",strokeWidth:"2",strokeDasharray:"5 3",style:{opacity:e?1:0,transition:"opacity 0.5s ease-out"}})]})}),h.jsxs("p",{className:"text-[10px] text-slate-500 text-center mt-2",children:[e?"Forecast line visible":"Forecast line hidden"," — click button to toggle"]})]})}const a1=[{from:0,to:5,bg:"title",caption:"",cursorX:50,cursorY:50},{from:5,to:10,bg:"/tutorial/zoho-export.png",caption:"Step 1 — Zoho Analytics: go to the Resourcing tab at the top of the dashboard",cursorX:71,cursorY:9,highlights:[{x:68,y:7,w:12,h:5,color:"amber",label:"Resourcing tab"}]},{from:10,to:14,bg:"/tutorial/zoho-export.png",caption:'Right-click any data table → click "More" in the toolbar',cursorX:30,cursorY:30,clicking:!0,highlights:[{x:26,y:27,w:8,h:5,color:"amber",label:"More"}]},{from:14,to:20,bg:"/tutorial/zoho-export.png",caption:'Export → "Export as CSV" — save this file to your desktop then come back to the dashboard',cursorX:60,cursorY:36,clicking:!0,highlights:[{x:37,y:31,w:10,h:6,color:"indigo",label:"Export ›"},{x:54,y:34,w:18,h:5,color:"emerald",label:"← Export as CSV"}]},{from:20,to:30,bg:"mock:upload",caption:'Step 2 — Click "↑ Time Log" in the header and select the CSV you just exported',cursorX:80,cursorY:18,highlights:[{x:68,y:10,w:22,h:12,color:"indigo",label:"Click to upload"}]},{from:30,to:40,bg:"mock:sync",caption:'Step 3 — On the Department tab, click "Sync Airtable" to pull live bookings from your resourcing tracker',cursorX:50,cursorY:45},{from:40,to:46,bg:"mock:nav",caption:'Step 4 — Click "Department" tab. Then select a month or use the week shortcut buttons',cursorX:60,cursorY:30,clicking:!0,highlights:[{x:48,y:23,w:18,h:8,color:"indigo",label:"Department tab"}]},{from:46,to:54,bg:"/tutorial/chart-no-forecast.png",caption:"Step 5 — Reading the chart: grey = allocated capacity, coloured stacks = logged hours by category",cursorX:10,cursorY:88,highlights:[{x:0,y:85,w:14,h:7,color:"indigo",label:"Allocated hours"}]},{from:54,to:60,bg:"/tutorial/chart-no-forecast.png",caption:"Yellow bars = House Admin / Idle Time. High idle = underutilised. Red line = average utilisation %",cursorX:25,cursorY:88,highlights:[{x:14,y:85,w:9,h:7,color:"amber",label:"House Admin"},{x:24,y:85,w:8,h:7,color:"amber",label:"Idle Time"}]},{from:60,to:66,bg:"/tutorial/chart-no-forecast.png",caption:"Green = Fee Related (billable). Red line = avg util — the goal is 75–85%. Too low or too high needs action",cursorX:50,cursorY:50,highlights:[{x:43,y:85,w:10,h:7,color:"emerald",label:"Fee Related"}],callouts:[{x:2,y:40,text:`Red line = avg util % +Target: 75–85%`}]},{from:66,to:73,bg:"/tutorial/chart-full.png",caption:"Step 6 — Spot issues: this person has near-zero hours logged vs their allocated capacity",cursorX:36,cursorY:55,highlights:[{x:32,y:15,w:4,h:72,color:"red",label:"Near-zero logged!"}]},{from:73,to:79,bg:"/tutorial/chart-full.png",caption:"This person is over 100% — logged more than their allocated hours. Check and rebalance the schedule",cursorX:73,cursorY:20,highlights:[{x:70,y:5,w:4,h:55,color:"amber",label:"Over allocated!"}]},{from:79,to:87,bg:"/tutorial/chart-no-forecast.png",caption:"Step 7 — Click any coloured bar segment to see which projects those hours came from",cursorX:3,cursorY:42,clicking:!0,highlights:[{x:0,y:20,w:6,h:68,color:"indigo",label:"Click bar"}],callouts:[{x:8,y:18,text:`Fee Related: 62h +Client Related: 18h +Total: 85h logged +Allocated: 158h +Util: 54%`}]},{from:87,to:93,bg:"/tutorial/chart-full.png",caption:"Step 8 — Indigo = Active Booked, Teal = Soft Booked (Airtable). Compare to logged hours to spot planning gaps",cursorX:15,cursorY:92,highlights:[{x:0,y:89,w:18,h:6,color:"indigo",label:"Active Booked (h)"},{x:19,y:89,w:14,h:6,color:"cyan",label:"Soft Booked (h)"}]},{from:93,to:100,bg:"/tutorial/chart-full.png",caption:"Step 9 — The dashed orange line = Forecast Utilisation (bookings ÷ capacity). Click the legend button to toggle it",cursorX:84,cursorY:91,clicking:!0,highlights:[{x:73,y:88,w:24,h:7,color:"amber",label:"Toggle forecast line"}]},{from:100,to:104,bg:"end",caption:"",cursorX:50,cursorY:50}],ns=104;function Sie(e){return a1.find(t=>e>=t.from&&e{t(p=>p>=ns?(n(!1),ns):+(p+.1).toFixed(1))},[]);Q.useEffect(()=>(r?a.current=setInterval(s,100):a.current&&clearInterval(a.current),()=>{a.current&&clearInterval(a.current)}),[r,s]);const l=Sie(e),u=e/ns*100,f=p=>{var v;const x=(v=i.current)==null?void 0:v.getBoundingClientRect();x&&t(Math.max(0,Math.min(ns,(p.clientX-x.left)/x.width*ns)))},d=[{label:"Zoho export",t:5},{label:"Upload",t:20},{label:"Airtable sync",t:30},{label:"Chart overview",t:46},{label:"Spot errors",t:66},{label:"Click bars",t:79},{label:"Bookings",t:87},{label:"Forecast",t:93}];return h.jsxs("div",{className:"max-w-5xl mx-auto",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-2xl font-bold text-white",children:"Video Walkthrough"}),h.jsxs("p",{className:"text-slate-400 text-xs mt-0.5",children:["Auto-plays through all 9 steps · ",i1(ns)," total"]})]}),h.jsx("button",{onClick:()=>{t(0),n(!0)},className:"flex items-center gap-2 bg-indigo-600 hover:bg-indigo-500 text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors",children:"▶ Watch from start"})]}),h.jsx("div",{className:"rounded-2xl overflow-hidden border border-slate-700 shadow-2xl bg-black",style:{aspectRatio:"16/9",position:"relative"},children:h.jsx(Tie,{scene:l,t:e})}),h.jsxs("div",{className:"bg-slate-900 border border-slate-800 rounded-xl mt-2 px-4 py-3",children:[h.jsxs("div",{ref:i,className:"h-2 bg-slate-700 rounded-full cursor-pointer mb-3 relative",onClick:f,children:[h.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-none",style:{width:`${u}%`}}),d.map((p,x)=>h.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full bg-slate-400 hover:bg-white cursor-pointer z-10",style:{left:`${p.t/ns*100}%`},onClick:v=>{v.stopPropagation(),t(p.t),n(!0)},title:p.label},x)),h.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 w-3.5 h-3.5 rounded-full bg-white shadow transition-none pointer-events-none",style:{left:`calc(${u}% - 7px)`}})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("button",{onClick:()=>n(p=>!p),className:"flex items-center justify-center w-9 h-9 rounded-full bg-slate-700 hover:bg-slate-600 text-white transition-colors",children:r?h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:[h.jsx("rect",{x:"1",y:"0",width:"4",height:"12",rx:"1"}),h.jsx("rect",{x:"7",y:"0",width:"4",height:"12",rx:"1"})]}):h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:h.jsx("path",{d:"M2 1l10 5.5-10 5.5z"})})}),h.jsxs("span",{className:"text-xs text-slate-400 font-mono",children:[i1(e)," / ",i1(ns)]}),h.jsx("div",{className:"flex gap-1 ml-auto flex-wrap",children:d.map(p=>h.jsx("button",{onClick:()=>{t(p.t),n(!0)},className:`px-2 py-0.5 rounded text-[10px] font-medium border transition-colors ${e>=p.t&&eh.jsx(Eie,{h:u},f)),(l=e.callouts)==null?void 0:l.map((u,f)=>h.jsx(jie,{c:u},f)),!n&&!a&&h.jsx(Aie,{x:e.cursorX,y:e.cursorY,clicking:e.clicking??!1}),e.caption&&h.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-4 py-2.5",style:{background:"linear-gradient(to top,rgba(2,6,23,.9) 0%,transparent 100%)"},children:h.jsx("p",{className:"text-xs text-slate-200 leading-snug",style:{animation:"tutFade 0.3s ease-out"},children:e.caption},e.from)})]})}function Aie({x:e,y:t,clicking:r}){return h.jsx("div",{className:"absolute pointer-events-none z-50",style:{left:`${e}%`,top:`${t}%`,transition:"left 1.1s ease-in-out, top 1.1s ease-in-out"},children:h.jsx("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",style:r?{animation:"tutClick 0.4s ease-out infinite"}:{},children:h.jsx("path",{d:"M5 3l16 10-8 1.5-4.5 8L5 3z",fill:r?"#818cf8":"white",stroke:r?"#3730a3":"#1e293b",strokeWidth:"1.5",strokeLinejoin:"round"})})})}function Eie({h:e}){const r={indigo:{bg:"rgba(99,102,241,0.25)",border:"#6366f1",lbl:"bg-indigo-600"},emerald:{bg:"rgba(16,185,129,0.25)",border:"#10b981",lbl:"bg-emerald-600"},amber:{bg:"rgba(245,158,11,0.25)",border:"#f59e0b",lbl:"bg-amber-600"},cyan:{bg:"rgba(8,145,178,0.25)",border:"#0891b2",lbl:"bg-cyan-600"},red:{bg:"rgba(239,68,68,0.25)",border:"#ef4444",lbl:"bg-red-600"}}[e.color??"indigo"];return h.jsx("div",{className:"absolute pointer-events-none z-40",style:{left:`${e.x}%`,top:`${e.y}%`,width:`${e.w}%`,height:`${e.h}%`,background:r.bg,border:`2px solid ${r.border}`,borderRadius:5,animation:"tutHiBlink 1.8s ease-in-out infinite"},children:e.label&&h.jsx("div",{className:`absolute -top-5 left-0 text-[9px] font-bold text-white px-1 py-0.5 rounded whitespace-nowrap ${r.lbl}`,children:e.label})})}function jie({c:e}){return h.jsx("div",{className:"absolute pointer-events-none z-50",style:{left:`${e.x}%`,top:`${e.y}%`,animation:"tutPop 0.4s ease-out 0.4s both",opacity:0},children:h.jsx("div",{className:"bg-slate-950/95 border border-indigo-500 rounded-xl px-3 py-2 shadow-2xl max-w-[180px]",children:e.text.split(` +`).map((t,r)=>h.jsx("p",{className:`text-[10px] leading-snug ${r===0?"text-indigo-300 font-semibold":"text-slate-300"}`,children:t},r))})})}function Oie({id:e,t,scene:r}){return e==="upload"?h.jsx(Nie,{t,scene:r}):e==="sync"?h.jsx(Pie,{t,scene:r}):e==="nav"?h.jsx(Cie,{t,scene:r}):null}function Nie({t:e,scene:t}){const r=e-t.from,n=r>5,a=r>7;return h.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-6",style:{background:"linear-gradient(135deg,#0f172a 0%,#1e1b4b 100%)"},children:h.jsx("div",{className:"w-full max-w-lg",children:h.jsxs("div",{className:"bg-slate-900 rounded-2xl border border-slate-700 overflow-hidden shadow-2xl",children:[h.jsxs("div",{className:"bg-slate-800 px-5 py-4 flex items-center justify-between border-b border-slate-700",children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold text-white",children:"L'Oréal Utilisation Dashboard"}),a?h.jsx("div",{className:"text-[11px] text-emerald-400 mt-0.5",style:{animation:"tutFade 0.4s ease-out"},children:"Loreal_Timelog_May2026.csv · 58,834 entries"}):h.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:"No file uploaded yet"})]}),h.jsx("div",{className:`px-4 py-2 rounded-lg text-sm font-medium transition-all duration-500 ${n?"bg-emerald-600 text-white":"bg-indigo-600 text-white"}`,style:n?{}:{animation:"tutRing 1.2s ease-out infinite"},children:a?"✓ Time Log":n?"↑ Uploading…":"↑ Time Log"})]}),h.jsx("div",{className:"px-5 py-8 text-center",children:a?h.jsxs("div",{style:{animation:"tutFade 0.4s ease-out"},children:[h.jsx("div",{className:"text-emerald-400 text-2xl mb-2",children:"✓"}),h.jsx("p",{className:"text-white font-semibold text-sm",children:"Data loaded successfully"}),h.jsx("p",{className:"text-slate-400 text-xs mt-1",children:"Saved locally — no re-upload needed"}),h.jsx("div",{className:"flex justify-center gap-6 mt-4 text-xs",children:[["Entries","58,834"],["People","142"],["Date range","Jan–May 2026"]].map(([i,s])=>h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"text-white font-bold",children:s}),h.jsx("div",{className:"text-slate-500",children:i})]},i))})]}):h.jsx("p",{className:"text-slate-500 text-sm",children:"Upload the time log file to begin"})})]})})})}function Pie({t:e,scene:t}){const r=e-t.from,n=r>2,a=r>5;return h.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-6",style:{background:"linear-gradient(135deg,#0f172a 0%,#1e293b 100%)"},children:h.jsx("div",{className:"w-full max-w-md",children:h.jsxs("div",{className:"bg-slate-900 rounded-2xl border border-slate-700 p-5 shadow-2xl",children:[h.jsx("div",{className:"text-sm font-bold text-white mb-1",children:"Department Tab"}),h.jsx("div",{className:"text-xs text-slate-500 mb-4",children:"Airtable bookings panel"}),h.jsx("div",{className:`w-full py-3 rounded-xl text-sm font-medium text-center border transition-all duration-700 ${a?"bg-emerald-900/40 border-emerald-600 text-emerald-300":n?"bg-slate-800 border-slate-600 text-slate-300":"bg-indigo-600 border-indigo-500 text-white"}`,style:n?{}:{animation:"tutRing 1.2s ease-out infinite"},children:a?"✓ Airtable synced":n?h.jsxs("span",{className:"flex items-center justify-center gap-2",children:[h.jsx("span",{className:"w-3 h-3 border-2 border-white border-t-transparent rounded-full inline-block",style:{animation:"tutSpin 0.7s linear infinite"}}),"Syncing bookings…"]}):"↻ Sync Airtable"}),a&&h.jsx("div",{className:"mt-4 space-y-2",style:{animation:"tutFade 0.4s ease-out"},children:[["Active bookings pulled","387 records","text-emerald-400"],["Soft bookings","94 records","text-cyan-400"],["Resources","142 people","text-indigo-400"],["Period covered","Jan–Jun 2026","text-slate-300"]].map(([i,s,l])=>h.jsxs("div",{className:"flex justify-between text-xs",children:[h.jsx("span",{className:"text-slate-500",children:i}),h.jsx("span",{className:`font-medium ${l}`,children:s})]},i))})]})})})}function Cie({t:e,scene:t}){const r=e-t.from>2;return h.jsxs("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg,#0f172a 0%,#1e293b 100%)"},children:[h.jsx("div",{className:"absolute top-0 left-0 right-0 bg-slate-900 border-b border-slate-700",children:h.jsx("div",{className:"flex gap-1 px-6 pt-4",children:["Forecast","Project Type","Role × Project","Time Log","Department","📖 Guide"].map(n=>h.jsx("div",{className:`px-3 py-2 text-xs font-medium rounded-t-lg transition-all ${n==="Department"&&r?"bg-slate-800 text-white border-t border-x border-slate-600":n==="Department"?"text-indigo-400":"text-slate-500"}`,style:n==="Department"&&!r?{animation:"tutPulse 1s ease-in-out infinite"}:{},children:n},n))})}),r&&h.jsx("div",{className:"absolute top-14 left-6 right-6",style:{animation:"tutFade 0.4s ease-out"},children:h.jsx("div",{className:"bg-slate-800 border border-slate-700 rounded-xl p-3",children:h.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[h.jsx("span",{className:"text-xs text-slate-500 mr-2",children:"Filter:"}),["Jan","Feb","Mar","Apr","May"].map(n=>h.jsx("div",{className:"px-2.5 py-1 bg-slate-700 rounded-full text-xs text-slate-400",children:n},n)),h.jsx("div",{className:"h-4 w-px bg-slate-600 mx-1"}),["Last Week","This Week","Next Week"].map(n=>h.jsx("div",{className:`px-3 py-1 rounded-full text-xs font-medium border ${n==="This Week"?"bg-indigo-600 border-indigo-500 text-white":"bg-slate-700 border-slate-600 text-slate-400"}`,children:n},n))]})})})]})}function Die(){return h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center px-8",style:{background:"linear-gradient(135deg,#0f172a 0%,#1e1b4b 50%,#0f172a 100%)"},children:[h.jsxs("div",{className:"inline-flex items-center gap-2 bg-indigo-950 border border-indigo-700 rounded-full px-4 py-1.5 mb-5",style:{animation:"tutFade 0.5s ease-out"},children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-indigo-400",style:{animation:"tutPulse 1.5s ease-in-out infinite"}}),h.jsx("span",{className:"text-xs text-indigo-300 font-medium",children:"L'Oréal Utilisation Dashboard"})]}),h.jsx("h1",{className:"text-3xl font-bold text-white mb-3",style:{animation:"tutFade 0.5s ease-out 0.2s both",opacity:0},children:"How to Use the Department Tab"}),h.jsx("p",{className:"text-slate-400 text-sm max-w-md leading-relaxed",style:{animation:"tutFade 0.5s ease-out 0.4s both",opacity:0},children:"From exporting your Zoho time log to spotting resource issues and reading bookings vs actuals"}),h.jsxs("div",{className:"mt-8 flex gap-6 text-xs text-slate-500",style:{animation:"tutFade 0.5s ease-out 0.7s both",opacity:0},children:[h.jsx("span",{children:"9 steps"}),h.jsx("span",{children:"·"}),h.jsx("span",{children:"1 min 44 sec"}),h.jsx("span",{children:"·"}),h.jsx("span",{children:"Press ▶ to watch"})]})]})}function Fie(){return h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center px-8",style:{background:"linear-gradient(135deg,#0f172a 0%,#052e16 50%,#0f172a 100%)"},children:[h.jsx("div",{className:"text-4xl mb-4",style:{animation:"tutFade 0.5s ease-out"},children:"✓"}),h.jsx("h2",{className:"text-2xl font-bold text-white mb-3",style:{animation:"tutFade 0.5s ease-out 0.2s both",opacity:0},children:"You're ready to go"}),h.jsx("div",{className:"grid grid-cols-3 gap-3 mt-4 max-w-md w-full",style:{animation:"tutFade 0.5s ease-out 0.4s both",opacity:0},children:[["1–3","Export Zoho + Upload + Sync Airtable"],["4–7","Read chart, spot errors, see bookings"],["8–9","Click bars & toggle forecast line"]].map(([e,t])=>h.jsxs("div",{className:"bg-slate-900/80 border border-slate-700 rounded-xl p-3",children:[h.jsx("div",{className:"text-indigo-400 font-bold text-lg",children:e}),h.jsx("div",{className:"text-slate-400 text-[10px] mt-1 leading-snug",children:t})]},e))}),h.jsx("p",{className:"text-slate-500 text-xs mt-5",style:{animation:"tutFade 0.5s ease-out 0.7s both",opacity:0},children:"Use the chapter buttons to replay any section"})]})}function Mie(){return h.jsxs("div",{className:"space-y-16 pb-16",children:[h.jsx("section",{className:"px-6 pt-8",children:h.jsx(die,{})}),h.jsx("div",{className:"px-6",children:h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"flex-1 h-px bg-slate-800"}),h.jsx("div",{className:"bg-slate-800 border border-slate-700 rounded-full px-4 py-1.5 text-xs text-slate-400 font-medium whitespace-nowrap",children:"↓ Video Walkthrough below"}),h.jsx("div",{className:"flex-1 h-px bg-slate-800"})]})}),h.jsx("section",{className:"px-6",children:h.jsx(kie,{})})]})}function Iie(){const[e,t]=Q.useState([]),[r,n]=Q.useState(!0),[a,i]=Q.useState(null),[s,l]=Q.useState(null),[u,f]=Q.useState("forecast"),[d,p]=Q.useState([]),[x,v]=Q.useState(null),[w,b]=Q.useState("All"),[g,k]=Q.useState("All"),[A,S]=Q.useState("All"),[N,T]=Q.useState("All"),[E,j]=Q.useState(""),[D,P]=Q.useState("");Q.useEffect(()=>{Promise.all([sU(),lU()]).then(([z,ie])=>{z&&(t(F3(z.buf,z.name)),i(z.name),l(new Date(z.savedAt))),ie&&(p(Zk(ie.buf,ie.name)),v(ie.name))}).catch(console.error).finally(()=>n(!1))},[]);const H=Q.useCallback(async z=>{var K;const ie=(K=z.target.files)==null?void 0:K[0];if(ie){n(!0);try{const[C]=await Promise.all([nU(ie),iU(ie)]);t(C),i(ie.name),l(new Date)}finally{n(!1),z.target.value=""}}},[]),U=Q.useCallback(async z=>{var K;const ie=(K=z.target.files)==null?void 0:K[0];if(ie){n(!0);try{const[C]=await Promise.all([ie.arrayBuffer().then(re=>Zk(re,ie.name)),oU(ie)]);p(C),v(ie.name)}finally{n(!1),z.target.value=""}}},[]),B=Q.useMemo(()=>["All",...Array.from(new Set(e.map(z=>z.brand))).sort()],[e]),V=Q.useMemo(()=>["All",...Array.from(new Set(e.map(z=>z.division))).sort()],[e]),W=Q.useMemo(()=>["All",...Array.from(new Set(e.map(z=>z.hub))).sort()],[e]),G=Q.useMemo(()=>["All",...Array.from(new Set(e.map(z=>z.userRole))).sort()],[e]),ne=Q.useMemo(()=>e.filter(z=>!(w!=="All"&&z.brand!==w||g!=="All"&&z.division!==g||A!=="All"&&z.hub!==A||N!=="All"&&z.userRole!==N||E&&z.dateD)),[e,w,g,A,N,E,D]),te=Q.useMemo(()=>e.map(z=>z.date).sort()[0]??"",[e]),oe=Q.useMemo(()=>e.map(z=>z.date).sort().at(-1)??"",[e]);return r?h.jsx("div",{className:"min-h-screen bg-slate-950 flex items-center justify-center text-slate-400",children:h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("div",{className:"w-8 h-8 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin mx-auto"}),h.jsx("p",{className:"text-sm",children:"Loading saved data…"})]})}):h.jsxs("div",{className:"min-h-screen bg-slate-950 text-slate-100",children:[h.jsxs("header",{className:"bg-slate-900 border-b border-slate-700 px-6 py-4 flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-bold text-white",children:"L'Oréal Utilisation Dashboard"}),a&&s?h.jsxs("p",{className:"text-xs text-slate-400 mt-0.5",children:[a," · last updated ",s.toLocaleDateString()," ",s.toLocaleTimeString()]}):h.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Daily capacity & project intake analysis"})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("label",{className:"cursor-pointer",children:[h.jsx("input",{type:"file",accept:".xlsx,.xls,.csv",onChange:H,className:"hidden"}),h.jsx("span",{className:"inline-flex items-center gap-2 bg-indigo-600 hover:bg-indigo-500 text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors",children:e.length?"↑ Time Log":"Upload Time Log"})]}),h.jsxs("label",{className:"cursor-pointer",children:[h.jsx("input",{type:"file",accept:".csv",onChange:U,className:"hidden"}),h.jsx("span",{className:`inline-flex items-center gap-2 text-sm font-medium px-4 py-2 rounded-lg border transition-colors ${d.length?"bg-emerald-700/30 border-emerald-500/50 text-emerald-300 hover:bg-emerald-700/50":"bg-slate-700 border-slate-600 text-slate-300 hover:bg-slate-600"}`,children:d.length?`✓ ${d.length.toLocaleString()} deliverables`:"↑ Deliverable CSV"})]}),x&&h.jsx("span",{className:"text-[10px] text-slate-500 max-w-[160px] truncate",children:x})]})]}),e.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center h-[80vh] gap-4 text-slate-400",children:[h.jsx("svg",{className:"w-16 h-16 opacity-30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414A1 1 0 0121 9.414V19a2 2 0 01-2 2z"})}),h.jsx("p",{className:"text-lg",children:"Upload the Loreal Time Summary Excel file to begin"}),h.jsx("p",{className:"text-sm text-slate-500",children:"Data will be saved locally — no need to re-upload next time"})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"bg-slate-900/50 border-b border-slate-800 px-6 py-3 flex gap-8 text-sm",children:[h.jsx(Gc,{label:"Time Entries",value:ne.length.toLocaleString()}),h.jsx(Gc,{label:"People",value:new Set(ne.map(z=>z.submitterEmail||z.submitter)).size.toLocaleString()}),h.jsx(Gc,{label:"Projects",value:new Set(ne.map(z=>z.projectTitle)).size.toLocaleString()}),h.jsx(Gc,{label:"Total Hours",value:ne.reduce((z,ie)=>z+ie.hoursLogged,0).toFixed(0)}),h.jsx(Gc,{label:"Date Range",value:`${te} → ${oe}`})]}),h.jsxs("div",{className:"bg-slate-900/30 border-b border-slate-800 px-6 py-3 flex flex-wrap gap-3 items-center",children:[h.jsx(sd,{label:"Division",value:g,options:V,onChange:k}),h.jsx(sd,{label:"Brand",value:w,options:B,onChange:b}),h.jsx(sd,{label:"Hub / Market",value:A,options:W,onChange:S}),h.jsx(sd,{label:"Role",value:N,options:G,onChange:T}),h.jsxs("label",{className:"flex flex-col text-xs text-slate-400 gap-1",children:["From",h.jsx("input",{type:"date",value:E,onChange:z=>j(z.target.value),className:"bg-slate-800 border border-slate-600 rounded px-2 py-1 text-slate-200 text-xs"})]}),h.jsxs("label",{className:"flex flex-col text-xs text-slate-400 gap-1",children:["To",h.jsx("input",{type:"date",value:D,onChange:z=>P(z.target.value),className:"bg-slate-800 border border-slate-600 rounded px-2 py-1 text-slate-200 text-xs"})]}),h.jsx("button",{onClick:()=>{b("All"),k("All"),S("All"),T("All"),j(""),P("")},className:"text-xs text-slate-400 hover:text-slate-200 mt-4",children:"Reset"})]}),h.jsx("nav",{className:"flex gap-1 px-6 pt-4 border-b border-slate-800",children:[["forecast","Forecast"],["project-type","Project Type Summary"],["logs","Time Log Detail"],["department","Department"],["tutorial","📖 Dept Guide"]].map(([z,ie])=>h.jsx("button",{onClick:()=>f(z),className:`px-4 py-2 text-sm font-medium rounded-t-lg transition-colors ${u===z?"bg-slate-800 text-white border-t border-x border-slate-700":"text-slate-400 hover:text-slate-200"}`,children:ie},z))}),h.jsxs("main",{className:"px-6 py-6",children:[u==="forecast"&&h.jsx(Zae,{logs:ne,deliverables:d.length?d:void 0}),u==="project-type"&&h.jsx(Vae,{logs:ne}),u==="logs"&&h.jsx(uU,{logs:ne}),u==="department"&&h.jsx(uie,{logs:ne}),u==="tutorial"&&h.jsx(Mie,{})]})]})]})}function Gc({label:e,value:t}){return h.jsxs("div",{children:[h.jsx("div",{className:"text-xs text-slate-400",children:e}),h.jsx("div",{className:"font-semibold text-white",children:t})]})}function sd({label:e,value:t,options:r,onChange:n}){return h.jsxs("label",{className:"flex flex-col text-xs text-slate-400 gap-1",children:[e,h.jsx("select",{value:t,onChange:a=>n(a.target.value),className:"bg-slate-800 border border-slate-600 rounded px-2 py-1 text-slate-200 text-xs min-w-[130px]",children:r.map(a=>h.jsx("option",{children:a},a))})]})}e8.createRoot(document.getElementById("root")).render(h.jsx(Q.StrictMode,{children:h.jsx(Iie,{})})); diff --git a/assets/index-DtJOecoO.css b/assets/index-DtJOecoO.css new file mode 100644 index 0000000..8ee6431 --- /dev/null +++ b/assets/index-DtJOecoO.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.-right-1{right:-.25rem}.-top-2{top:-.5rem}.-top-5{top:-1.25rem}.bottom-0{bottom:0}.left-0{left:0}.left-6{left:1.5rem}.right-0{right:0}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-full{top:100%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.z-\[80\]{z-index:80}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[80vh\]{height:80vh}.h-full{height:100%}.h-px{height:1px}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.min-h-\[320px\]{min-height:320px}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[295px\]{width:295px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[110px\]{min-width:110px}.min-w-\[130px\]{min-width:130px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.min-w-\[190px\]{min-width:190px}.min-w-\[200px\]{min-width:200px}.min-w-\[210px\]{min-width:210px}.min-w-\[240px\]{min-width:240px}.min-w-\[520px\]{min-width:520px}.min-w-\[680px\]{min-width:680px}.min-w-\[860px\]{min-width:860px}.min-w-\[900px\]{min-width:900px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[96vw\]{max-width:96vw}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-px{gap:1px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-y-0\.5{row-gap:.125rem}.gap-y-1\.5{row-gap:.375rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-700\/60>:not([hidden])~:not([hidden]){border-color:#33415599}.divide-slate-800>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 41 59 / var(--tw-divide-opacity, 1))}.divide-slate-800\/40>:not([hidden])~:not([hidden]){border-color:#1e293b66}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-\[\#2d5a8e\]{--tw-border-opacity: 1;border-color:rgb(45 90 142 / var(--tw-border-opacity, 1))}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-amber-700\/30{border-color:#b453094d}.border-amber-700\/40{border-color:#b4530966}.border-amber-800\/30{border-color:#92400e4d}.border-amber-800\/60{border-color:#92400e99}.border-blue-800\/30{border-color:#1e40af4d}.border-blue-800\/50{border-color:#1e40af80}.border-cyan-400{--tw-border-opacity: 1;border-color:rgb(34 211 238 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-emerald-500\/30{border-color:#10b9814d}.border-emerald-500\/50{border-color:#10b98180}.border-emerald-600{--tw-border-opacity: 1;border-color:rgb(5 150 105 / var(--tw-border-opacity, 1))}.border-emerald-700\/40{border-color:#04785766}.border-emerald-800\/60{border-color:#065f4699}.border-indigo-400{--tw-border-opacity: 1;border-color:rgb(129 140 248 / var(--tw-border-opacity, 1))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-indigo-500\/30{border-color:#6366f14d}.border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.border-indigo-700{--tw-border-opacity: 1;border-color:rgb(67 56 202 / var(--tw-border-opacity, 1))}.border-indigo-700\/50{border-color:#4338ca80}.border-indigo-700\/60{border-color:#4338ca99}.border-indigo-800{--tw-border-opacity: 1;border-color:rgb(55 48 163 / var(--tw-border-opacity, 1))}.border-indigo-800\/30{border-color:#3730a34d}.border-orange-500\/50{border-color:#f9731680}.border-orange-800\/30{border-color:#9a34124d}.border-orange-800\/50{border-color:#9a341280}.border-purple-800\/30{border-color:#6b21a84d}.border-purple-800\/50{border-color:#6b21a880}.border-red-800\/30{border-color:#991b1b4d}.border-red-800\/60{border-color:#991b1b99}.border-rose-400{--tw-border-opacity: 1;border-color:rgb(251 113 133 / var(--tw-border-opacity, 1))}.border-rose-500\/30{border-color:#f43f5e4d}.border-rose-700\/50{border-color:#be123c80}.border-slate-400{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-700\/40{border-color:#33415566}.border-slate-700\/50{border-color:#33415580}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.border-slate-800\/30{border-color:#1e293b4d}.border-slate-800\/40{border-color:#1e293b66}.border-slate-800\/50{border-color:#1e293b80}.border-slate-800\/60{border-color:#1e293b99}.border-transparent{border-color:transparent}.border-violet-400{--tw-border-opacity: 1;border-color:rgb(167 139 250 / var(--tw-border-opacity, 1))}.border-violet-500{--tw-border-opacity: 1;border-color:rgb(139 92 246 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-white\/50{border-color:#ffffff80}.border-l-rose-600{--tw-border-opacity: 1;border-left-color:rgb(225 29 72 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-\[\#162032\]{--tw-bg-opacity: 1;background-color:rgb(22 32 50 / var(--tw-bg-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.bg-amber-900\/20{background-color:#78350f33}.bg-amber-900\/30{background-color:#78350f4d}.bg-amber-900\/60{background-color:#78350f99}.bg-amber-950\/40{background-color:#451a0366}.bg-amber-950\/50{background-color:#451a0380}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/70{background-color:#000000b3}.bg-black\/75{background-color:#000000bf}.bg-black\/80{background-color:#000c}.bg-black\/85{background-color:#000000d9}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-blue-900\/60{background-color:#1e3a8a99}.bg-cyan-500\/50{background-color:#06b6d480}.bg-cyan-500\/70{background-color:#06b6d4b3}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity, 1))}.bg-cyan-600\/70{background-color:#0891b2b3}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-emerald-700\/30{background-color:#0478574d}.bg-emerald-900\/40{background-color:#064e3b66}.bg-emerald-900\/60{background-color:#064e3b99}.bg-emerald-950\/60{background-color:#022c2299}.bg-indigo-400{--tw-bg-opacity: 1;background-color:rgb(129 140 248 / var(--tw-bg-opacity, 1))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-indigo-500\/10{background-color:#6366f11a}.bg-indigo-500\/80{background-color:#6366f1cc}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-indigo-700{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.bg-indigo-700\/60{background-color:#4338ca99}.bg-indigo-900\/30{background-color:#312e814d}.bg-indigo-900\/40{background-color:#312e8166}.bg-indigo-900\/50{background-color:#312e8180}.bg-indigo-950{--tw-bg-opacity: 1;background-color:rgb(30 27 75 / var(--tw-bg-opacity, 1))}.bg-indigo-950\/30{background-color:#1e1b4b4d}.bg-orange-900\/20{background-color:#7c2d1233}.bg-orange-950\/40{background-color:#43140766}.bg-purple-900\/20{background-color:#581c8733}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/40{background-color:#ef444466}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-950\/40{background-color:#450a0a66}.bg-red-950\/50{background-color:#450a0a80}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-500\/10{background-color:#f43f5e1a}.bg-rose-900\/60{background-color:#88133799}.bg-rose-950\/10{background-color:#4c05191a}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-600{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.bg-slate-600\/40{background-color:#47556966}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-slate-700\/60{background-color:#33415599}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-800\/20{background-color:#1e293b33}.bg-slate-800\/30{background-color:#1e293b4d}.bg-slate-800\/40{background-color:#1e293b66}.bg-slate-800\/50{background-color:#1e293b80}.bg-slate-800\/60{background-color:#1e293b99}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-900\/30{background-color:#0f172a4d}.bg-slate-900\/40{background-color:#0f172a66}.bg-slate-900\/50{background-color:#0f172a80}.bg-slate-900\/60{background-color:#0f172a99}.bg-slate-900\/80{background-color:#0f172acc}.bg-slate-900\/95{background-color:#0f172af2}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-slate-950\/20{background-color:#02061733}.bg-slate-950\/50{background-color:#02061780}.bg-slate-950\/95{background-color:#020617f2}.bg-teal-500{--tw-bg-opacity: 1;background-color:rgb(20 184 166 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-violet-600{--tw-bg-opacity: 1;background-color:rgb(124 58 237 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-yellow-500\/70{background-color:#eab308b3}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-16{padding-bottom:4rem}.pb-4{padding-bottom:1rem}.pr-0\.5{padding-right:.125rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-300\/90{color:#fcd34de6}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-400\/80{color:#fbbf24cc}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-500\/80{color:#f59e0bcc}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-emerald-200{--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-fuchsia-400{--tw-text-opacity: 1;color:rgb(232 121 249 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-indigo-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-indigo-400\/60{color:#818cf899}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-purple-300{--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-400\/80{color:#f87171cc}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-300\/80{color:#fda4afcc}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-rose-400\/80{color:#fb7185cc}.text-rose-600\/80{color:#e11d48cc}.text-sky-200{--tw-text-opacity: 1;color:rgb(186 230 253 / var(--tw-text-opacity, 1))}.text-sky-300{--tw-text-opacity: 1;color:rgb(125 211 252 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-teal-300{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.accent-indigo-500{accent-color:#6366f1}.accent-rose-400{accent-color:#fb7185}.accent-slate-400{accent-color:#94a3b8}.accent-violet-400{accent-color:#a78bfa}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-indigo-500\/30{--tw-ring-color: rgb(99 102 241 / .3)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-none{transition-property:none}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}body{background-color:#0f172a;color:#e2e8f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.placeholder\:text-slate-600::-moz-placeholder{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.placeholder\:text-slate-600::placeholder{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.first\:pt-0:first-child{padding-top:0}.last\:border-0:last-child{border-width:0px}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:border-indigo-500\/50:hover{border-color:#6366f180}.hover\:border-slate-500:hover{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.hover\:border-slate-600:hover{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#2d5a8e\]:hover{--tw-bg-opacity: 1;background-color:rgb(45 90 142 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-700\/50:hover{background-color:#04785780}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-600:hover{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-900\/20:hover{background-color:#312e8133}.hover\:bg-indigo-900\/70:hover{background-color:#312e81b3}.hover\:bg-red-900\/40:hover{background-color:#7f1d1d66}.hover\:bg-slate-500:hover{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-700:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-700\/30:hover{background-color:#3341554d}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800\/30:hover{background-color:#1e293b4d}.hover\:bg-slate-800\/40:hover{background-color:#1e293b66}.hover\:bg-slate-800\/50:hover{background-color:#1e293b80}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}@media(min-width:640px){.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(min-width:768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-3{grid-column:span 3 / span 3}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(min-width:1024px){.lg\:mb-0{margin-bottom:0}.lg\:block{display:block}.lg\:grid{display:grid}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(160px\,1fr\)_64px_96px_96px_96px_180px\]{grid-template-columns:minmax(160px,1fr) 64px 96px 96px 96px 180px}.lg\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}.lg\:text-right{text-align:right}}@media(min-width:1280px){.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}} diff --git a/index.html b/index.html index 1f30119..f1ba5bc 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,8 @@ L'Oréal Utilisation Dashboard - - + +