1var Wie=Object.defineProperty;var Vie=(e,t,r)=>t in e?Wie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Gie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wn=(e,t,r)=>Vie(e,typeof t!="symbol"?t+"":t,r);var Snt=Gie((Wnt,On)=>{(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 kv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f2={exports:{}},e0={},h2={exports:{}},dr={};
vendor: 4,443 bytes, lines 1-9
1/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var PD;function Kie(){if(PD)return dr;PD=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"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function p(F){return F===null||typeof F!="object"?null:(F=f&&F[f]||F["@@iterator"],typeof F=="function"?F:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function v(F,ne,H){this.props=F,this.context=ne,this.refs=y,this.updater=H||m}v.prototype.isReactComponent={},v.prototype.setState=function(F,ne){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,ne,"setState")},v.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function b(){}b.prototype=v.prototype;function w(F,ne,H){this.props=F,this.context=ne,this.refs=y,this.updater=H||m}var S=w.prototype=new b;S.constructor=w,x(S,v.prototype),S.isPureReactComponent=!0;var j=Array.isArray,k=Object.prototype.hasOwnProperty,E={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function O(F,ne,H){var B,X={},Y=null,ae=null;if(ne!=null)for(B in ne.ref!==void 0&&(ae=ne.ref),ne.key!==void 0&&(Y=""+ne.key),ne)k.call(ne,B)&&!T.hasOwnProperty(B)&&(X[B]=ne[B]);var fe=arguments.length-2;if(fe===1)X.children=H;else if(1<fe){for(var ue=Array(fe),oe=0;oe<fe;oe++)ue[oe]=arguments[oe+2];X.children=ue}if(F&&F.defaultProps)for(B in fe=F.defaultProps,fe)X[B]===void 0&&(X[B]=fe[B]);return{$$typeof:e,type:F,key:Y,ref:ae,props:X,_owner:E.current}}function A(F,ne){return{$$typeof:e,type:F.type,key:ne,ref:F.ref,props:F.props,_owner:F._owner}}function P(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function I(F){var ne={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(H){return ne[H]})}var R=/\/+/g;function M(F,ne){return typeof F=="object"&&F!==null&&F.key!=null?I(""+F.key):ne.toString(36)}function L(F,ne,H,B,X){var Y=typeof F;(Y==="undefined"||Y==="boolean")&&(F=null);var ae=!1;if(F===null)ae=!0;else switch(Y){case"string":case"number":ae=!0;break;case"object":switch(F.$$typeof){case e:case t:ae=!0}}if(ae)return ae=F,X=X(ae),F=B===""?"."+M(ae,0):B,j(X)?(H="",F!=null&&(H=F.replace(R,"$&/")+"/"),L(X,ne,H,"",function(oe){return oe})):X!=null&&(P(X)&&(X=A(X,H+(!X.key||ae&&ae.key===X.key?"":(""+X.key).replace(R,"$&/")+"/")+F)),ne.push(X)),1;if(ae=0,B=B===""?".":B+":",j(F))for(var fe=0;fe<F.length;fe++){Y=F[fe];var ue=B+M(Y,fe);ae+=L(Y,ne,H,ue,X)}else if(ue=p(F),typeof ue=="function")for(F=ue.call(F),fe=0;!(Y=F.next()).done;)Y=Y.value,ue=B+M(Y,fe++),ae+=L(Y,ne,H,ue,X);else if(Y==="object")throw ne=String(F),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.");return ae}function U(F,ne,H){if(F==null)return F;var B=[],X=0;return L(F,B,"","",function(Y){return ne.call(H,Y,X++)}),B}function W(F){if(F._status===-1){var ne=F._result;ne=ne(),ne.then(function(H){(F._status===0||F._status===-1)&&(F._status=1,F._result=H)},function(H){(F._status===0||F._status===-1)&&(F._status=2,F._result=H)}),F._status===-1&&(F._status=0,F._result=ne)}if(F._status===1)return F._result.default;throw F._result}var V={current:null},G={transition:null},K={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:G,ReactCurrentOwner:E};return dr.Children={map:U,forEach:function(F,ne,H){U(F,function(){ne.apply(this,arguments)},H)},count:function(F){var ne=0;return U(F,function(){ne++}),ne},toArray:function(F){return U(F,function(ne){return ne})||[]},only:function(F){if(!P(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},dr.Component=v,dr.Fragment=r,dr.Profiler=a,dr.PureComponent=w,dr.StrictMode=n,dr.Suspense=c,dr.__SECRET_INT
vendor: 3,265 bytes, lines 9-17
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,dr.cloneElement=function(F,ne,H){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var B=x({},F.props),X=F.key,Y=F.ref,ae=F._owner;if(ne!=null){if(ne.ref!==void 0&&(Y=ne.ref,ae=E.current),ne.key!==void 0&&(X=""+ne.key),F.type&&F.type.defaultProps)var fe=F.type.defaultProps;for(ue in ne)k.call(ne,ue)&&!T.hasOwnProperty(ue)&&(B[ue]=ne[ue]===void 0&&fe!==void 0?fe[ue]:ne[ue])}var ue=arguments.length-2;if(ue===1)B.children=H;else if(1<ue){fe=Array(ue);for(var oe=0;oe<ue;oe++)fe[oe]=arguments[oe+2];B.children=fe}return{$$typeof:e,type:F.type,key:X,ref:Y,props:B,_owner:ae}},dr.createContext=function(F){return F={$$typeof:s,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:i,_context:F},F.Consumer=F},dr.createElement=O,dr.createFactory=function(F){var ne=O.bind(null,F);return ne.type=F,ne},dr.createRef=function(){return{current:null}},dr.forwardRef=function(F){return{$$typeof:l,render:F}},dr.isValidElement=P,dr.lazy=function(F){return{$$typeof:d,_payload:{_status:-1,_result:F},_init:W}},dr.memo=function(F,ne){return{$$typeof:u,type:F,compare:ne===void 0?null:ne}},dr.startTransition=function(F){var ne=G.transition;G.transition={};try{F()}finally{G.transition=ne}},dr.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},dr.useCallback=function(F,ne){return V.current.useCallback(F,ne)},dr.useContext=function(F){return V.current.useContext(F)},dr.useDebugValue=function(){},dr.useDeferredValue=function(F){return V.current.useDeferredValue(F)},dr.useEffect=function(F,ne){return V.current.useEffect(F,ne)},dr.useId=function(){return V.current.useId()},dr.useImperativeHandle=function(F,ne,H){return V.current.useImperativeHandle(F,ne,H)},dr.useInsertionEffect=function(F,ne){return V.current.useInsertionEffect(F,ne)},dr.useLayoutEffect=function(F,ne){return V.current.useLayoutEffect(F,ne)},dr.useMemo=function(F,ne){return V.current.useMemo(F,ne)},dr.useReducer=function(F,ne,H){return V.current.useReducer(F,ne,H)},dr.useRef=function(F){return V.current.useRef(F)},dr.useState=function(F){return V.current.useState(F)},dr.useSyncExternalStore=function(F,ne,H){return V.current.useSyncExternalStore(F,ne,H)},dr.useTransition=function(){return V.current.useTransition()},dr.version="18.2.0",dr}var RD;function lR(){return RD||(RD=1,h2.exports=Kie()),h2.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var ID;function Yie(){if(ID)return e0;ID=1;var e=lR(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(l,c,u){var d,f={},p=null,m=null;u!==void 0&&(p=""+u),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(d in c)n.call(c,d)&&!i.hasOwnProperty(d)&&(f[d]=c[d]);if(l&&l.defaultProps)for(d in c=l.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);
vendor: 5,673 bytes, lines 17-33
17return{$$typeof:t,type:l,key:p,ref:m,props:f,_owner:a.current}}return e0.Fragment=r,e0.jsx=s,e0.jsxs=s,e0}var FD;function Xie(){return FD||(FD=1,f2.exports=Yie()),f2.exports}var o=Xie(),N=lR();const se=tr(N);var Nv={},p2={exports:{}},Pi={},m2={exports:{}},g2={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var MD;function Jie(){return MD||(MD=1,(function(e){function t(G,K){var F=G.length;G.push(K);e:for(;0<F;){var ne=F-1>>>1,H=G[ne];if(0<a(H,K))G[ne]=K,G[F]=H,F=ne;else break e}}function r(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var K=G[0],F=G.pop();if(F!==K){G[0]=F;e:for(var ne=0,H=G.length,B=H>>>1;ne<B;){var X=2*(ne+1)-1,Y=G[X],ae=X+1,fe=G[ae];if(0>a(Y,F))ae<H&&0>a(fe,Y)?(G[ne]=fe,G[ae]=F,ne=ae):(G[ne]=Y,G[X]=F,ne=X);else if(ae<H&&0>a(fe,F))G[ne]=fe,G[ae]=F,ne=ae;else break e}}return K}function a(G,K){var F=G.sortIndex-K.sortIndex;return F!==0?F:G.id-K.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 c=[],u=[],d=1,f=null,p=3,m=!1,x=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=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(G){for(var K=r(u);K!==null;){if(K.callback===null)n(u);else if(K.startTime<=G)n(u),K.sortIndex=K.expirationTime,t(c,K);else break;K=r(u)}}function j(G){if(y=!1,S(G),!x)if(r(c)!==null)x=!0,W(k);else{var K=r(u);K!==null&&V(j,K.startTime-G)}}function k(G,K){x=!1,y&&(y=!1,b(O),O=-1),m=!0;var F=p;try{for(S(K),f=r(c);f!==null&&(!(f.expirationTime>K)||G&&!I());){var ne=f.callback;if(typeof ne=="function"){f.callback=null,p=f.priorityLevel;var H=ne(f.expirationTime<=K);K=e.unstable_now(),typeof H=="function"?f.callback=H:f===r(c)&&n(c),S(K)}else n(c);f=r(c)}if(f!==null)var B=!0;else{var X=r(u);X!==null&&V(j,X.startTime-K),B=!1}return B}finally{f=null,p=F,m=!1}}var E=!1,T=null,O=-1,A=5,P=-1;function I(){return!(e.unstable_now()-P<A)}function R(){if(T!==null){var G=e.unstable_now();P=G;var K=!0;try{K=T(!0,G)}finally{K?M():(E=!1,T=null)}}else E=!1}var M;if(typeof w=="function")M=function(){w(R)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,U=L.port2;L.port1.onmessage=R,M=function(){U.postMessage(null)}}else M=function(){v(R,0)};function W(G){T=G,E||(E=!0,M())}function V(G,K){O=v(function(){G(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){x||m||(x=!0,W(k))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(G){switch(p){case 1:case 2:case 3:var K=3;break;default:K=p}var F=p;p=K;try{return G()}finally{p=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,K){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var F=p;p=G;try{return K()}finally{p=F}},e.unstable_scheduleCallback=function(G,K,F){var ne=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ne+F:ne):F=ne,G){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=F+H,G={id:d++,callback:K,priorityLevel:G,startTime:F,expirationTime:H,sortIndex:-1},F>ne?(G.sortIndex=F,t(u,G),r(c)===null&&G===r(u)&&(y?(b(O),O=-1):y=!0,V(j,F-ne))):(G.sortIndex=H,t(c,G),x||m||(x=!0,W(k))),G},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(G){var K=p;return function(){var F=p;p=K;try{return G.apply(this,arguments)}finally{p=F}}}})(g2)),g2}var DD;function Qie(){return DD||(DD=1,m2.exports=Jie()),m2.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var LD;function Zie(){if(LD)return Pi;LD=1;var e=lR(),t=Qie();function r(h){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+h,_=1;_<arguments.length;_++)g+="&args[]="+encodeURIComponent(arguments[_]);return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function i(h,g){s(h,g),s(h+"Capture",g)}function s(h,g){for(a[h]=g,h=0;h<g.length;h++)n.add(g[h])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[: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={},f={};
vendor: 14,007 bytes, lines 33-37
33function p(h){return c.call(f,h)?!0:c.call(d,h)?!1:u.test(h)?f[h]=!0:(d[h]=!0,!1)}function m(h,g,_,C){if(_!==null&&_.type===0)return!1;switch(typeof g){case"function":case"symbol":return!0;case"boolean":return C?!1:_!==null?!_.acceptsBooleans:(h=h.toLowerCase().slice(0,5),h!=="data-"&&h!=="aria-");default:return!1}}function x(h,g,_,C){if(g===null||typeof g>"u"||m(h,g,_,C))return!0;if(C)return!1;if(_!==null)switch(_.type){case 3:return!g;case 4:return g===!1;case 5:return isNaN(g);case 6:return isNaN(g)||1>g}return!1}function y(h,g,_,C,D,z,ee){this.acceptsBooleans=g===2||g===3||g===4,this.attributeName=C,this.attributeNamespace=D,this.mustUseProperty=_,this.propertyName=h,this.type=g,this.sanitizeURL=z,this.removeEmptyString=ee}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(h){v[h]=new y(h,0,!1,h,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(h){var g=h[0];v[g]=new y(g,1,!1,h[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(h){v[h]=new y(h,2,!1,h.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(h){v[h]=new y(h,2,!1,h,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(h){v[h]=new y(h,3,!1,h.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(h){v[h]=new y(h,3,!0,h,null,!1,!1)}),["capture","download"].forEach(function(h){v[h]=new y(h,4,!1,h,null,!1,!1)}),["cols","rows","size","span"].forEach(function(h){v[h]=new y(h,6,!1,h,null,!1,!1)}),["rowSpan","start"].forEach(function(h){v[h]=new y(h,5,!1,h.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function w(h){return h[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(h){var g=h.replace(b,w);v[g]=new y(g,1,!1,h,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(h){var g=h.replace(b,w);v[g]=new y(g,1,!1,h,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(h){var g=h.replace(b,w);v[g]=new y(g,1,!1,h,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(h){v[h]=new y(h,1,!1,h.toLowerCase(),null,!1,!1)}),v.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(h){v[h]=new y(h,1,!1,h.toLowerCase(),null,!0,!0)});function S(h,g,_,C){var D=v.hasOwnProperty(g)?v[g]:null;(D!==null?D.type!==0:C||!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(x(g,_,D,C)&&(_=null),C||D===null?p(g)&&(_===null?h.removeAttribute(g):h.setAttribute(g,""+_)):D.mustUseProperty?h[D.propertyName]=_===null?D.type===3?!1:"":_:(g=D.attributeName,C=D.attributeNamespace,_===null?h.removeAttribute(g):(D=D.type,_=D===3||D===4&&_===!0?"":""+_,C?h.setAttributeNS(C,g,_):h.setAttribute(g,_))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),E=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),I=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),G=Symbol.iterator;function K(h){return h===null||typeof h!="object"?null:(h=G&&h[G]||h["@@iterator"],typeof h=="function"?h:null)}var F=Object.assign,ne;function H(h){if(ne===void 0)try{throw Error()}catch(_){var g=_.stack.trim().match(/\n( *(at )?)/);ne=g&&g[1]||""}return` 34`+ne+h}var B=!1;function X(h,g){if(!h||B)return"";B=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(g)if(g=function(){throw Error()},Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(Le){var C=Le}Reflect.construct(h,[],g)}else{try{g.call()}catch(Le){C=Le}h.call(g.prototype)}else{try{throw Error()}catch(Le){C=Le}h()}}catch(Le){if(Le&&C&&typeof Le.stack=="string"){for(var D=Le.stack.split(` 35`),z=C.stack.split(` 36`),ee=D.length-1,_e=z.length-1;1<=ee&&0<=_e&&D[ee]!==z[_e];)_e--;for(;1<=ee&&0<=_e;ee--,_e--)if(D[ee]!==z[_e]){if(ee!==1||_e!==1)do if(ee--,_e--,0>_e||D[ee]!==z[_e]){var Ne=` 37`+D[ee].replace(" at new "," at ");return h.displayName&&Ne.includes("<anonymous>")&&(Ne=Ne.replace("<anonymous>",h.displayName)),Ne}while(1<=ee&&0<=_e);break}}}finally{B=!1,Error.prepareStackTrace=_}return(h=h?h.displayName||h.name:"")?H(h):""}function Y(h){switch(h.tag){case 5:return H(h.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return h=X(h.type,!1),h;case 11:return h=X(h.type.render,!1),h;case 1:return h=X(h.type,!0),h;default:return""}}function ae(h){if(h==null)return null;if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case T:return"Fragment";case E:return"Portal";case A:return"Profiler";case O:return"StrictMode";case M:return"Suspense";case L:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case I:return(h.displayName||"Context")+".Consumer";case P:return(h._context.displayName||"Context")+".Provider";case R:var g=h.render;return h=h.displayName,h||(h=g.displayName||g.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case U:return g=h.displayName||null,g!==null?g:ae(h.type)||"Memo";case W:g=h._payload,h=h._init;try{return ae(h(g))}catch{}}return null}function fe(h){var g=h.type;switch(h.tag){case 24:return"Cache";case 9:return(g.displayName||"Context")+".Consumer";case 10:return(g._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return h=g.render,h=h.displayName||h.name||"",g.displayName||(h!==""?"ForwardRef("+h+")":"ForwardRef");case 7:return"Fragment";case 5:return g;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(g);case 8:return g===O?"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 g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g}return null}function ue(h){switch(typeof h){case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function oe(h){var g=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function Z(h){var g=oe(h)?"checked":"value",_=Object.getOwnPropertyDescriptor(h.constructor.prototype,g),C=""+h[g];if(!h.hasOwnProperty(g)&&typeof _<"u"&&typeof _.get=="function"&&typeof _.set=="function"){var D=_.get,z=_.set;return Object.defineProperty(h,g,{configurable:!0,get:function(){return D.call(this)},set:function(ee){C=""+ee,z.call(this,ee)}}),Object.defineProperty(h,g,{enumerable:_.enumerable}),{getValue:function(){return C},setValue:function(ee){C=""+ee},stopTracking:function(){h._valueTracker=null,delete h[g]}}}}function ce(h){h._valueTracker||(h._valueTracker=Z(h))}function q(h){if(!h)return!1;var g=h._valueTracker;if(!g)return!0;var _=g.getValue(),C="";return h&&(C=oe(h)?h.checked?"true":"false":h.value),h=C,h!==_?(g.setValue(h),!0):!1}function xe(h){if(h=h||(typeof document<"u"?document:void 0),typeof h>"u")return null;try{return h.activeElement||h.body}catch{return h.body}}function pe(h,g){var _=g.checked;return F({},g,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:_??h._wrapperState.initialChecked})}function Se(h,g){var _=g.defaultValue==null?"":g.defaultValue,C=g.checked!=null?g.checked:g.defaultChecked;_=ue(g.value!=null?g.value:_),h._wrapperState={initialChecked:C,initialValue:_,controlled:g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null}}function he(h,g){g=g.checked,g!=null&&S(h,"checked",g,!1)}function ie(h,g){he(h,g);var _=ue(g.value),C=g.type;if(_!=null)C==="number"?(_===0&&h.value===""||h.value!=_)&&(h.value=""+_):h.value!==""+_&&(h.value=""+_);else if(C==="submit"||C==="reset"){h.removeAttribute("value");return}g.hasOwnProperty("value")?ke(h,g.type,_):g.hasOwnProperty("defaultValue")&&ke(h,g.type,ue(g.defaultValue)),g.checked==null&&g.defaultChecked!=null&&(h.defaultChecked=!!g.defaultChecked)}function we(h,g,_){if(g.hasOwnProperty("value")||g.hasOwnProperty("defaultValue")){var C=g.type;if(!(C!=="submit"&&C!=="reset"||g.value!==void 0&&g.value!==null))return;g=""+h._wrapperState.initialValue,_||g===h.value||(h.value=g),h.defaultValue=g}_=h.name,_!==""&&(h.name=""),h.defaultChecked=!!h._wrapperState.initialChecked,_!==""&&(h.name=_)}function ke(h,g,_){(g!=="number"||xe(h.ownerDocument)!==h)&&(_==null?h.defaultValue=""+h._wrapperState.initialValue:h.defaultValue!==""+_&&(h.defaultValue=""+_))}var Oe=Array.isArray;function Ue(h,g,_,C){if(h=h.options,g){g={};for(var D=0;D<_.length;D++)g["$"+_[D]]=!0;for(_=0;_<h.length;_++)D=g.hasOwnProperty("$"+h[_].value),h[_].selected!==D&&(h[_].selected=D),D&&C&&(h[_].defaultSelected=!0)}else{for(_=""+ue(_),g=null,D=0;D<h.length;D++){if(h[D].value===_){h[D].selected=!0,C&&(h[D].defaultSelected=!0);return}g!==null||h[D].disabled||(g=h[D])}g!==null&&(g.selected=!0)}}function Je(h,g){if(g.dangerouslySetInnerHTML!=null)throw Error(r(91));return F({},g,{value:void 0,defaultValue:void 0,children:""+h._wrapperState.initialValue})}function Ze(h,g){var _=g.value;if(_==null){if(_=g.children,g=g.defaultValue,_!=null){if(g!=null)throw Error(r(92));if(Oe(_)){if(1<_.length)throw Error(r(93));_=_[0]}g=_}g==null&&(g=""),_=g}h._wrapperState={initialValue:ue(_)}}function te(h,g){var _=ue(g.value),C=ue(g.defaultValue);_!=null&&(_=""+_,_!==h.value&&(h.value=_),g.defaultValue==null&&h.defaultValue!==_&&(h.defaultValue=_)),C!=null&&(h.defaultValue=""+C)}function ve(h){var g=h.textContent;g===h._wrapperState.initialValue&&g!==""&&g!==null&&(h.value=g)}function J(h){switch(h){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(h,g){return h==null||h==="http://www.w3.org/1999/xhtml"?J(g):h==="http://www.w3.org/2000/svg"&&g==="foreignObject"?"http://www.w3.org/1999/xhtml":h}var Ee,Me=(function(h){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(g,_,C,D){MSApp.execUnsafeLocalFunction(function(){return h(g,_,C,D)})}:h})(function(h,g){if(h.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in h)h.innerHTML=g;else{for(Ee=Ee||document.createElement("div"),Ee.innerHTML="<svg>"+g.valueOf().toString()+"</svg>",g=Ee.firstChild;h.firstChild;)h.removeChild(h.firstChild);for(;g.firstChild;)h.appendChild(g.firstChild)}});function Ae(h,g){if(g){var _=h.firstChild;if(_&&_===h.lastChild&&_.nodeType===3){_.nodeValue=g;return}}h.textContent=g}var Ke={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},jt=["Webkit","ms","Moz","O"];Object.keys(Ke).forEach(function(h){jt.forEach(function(g){g=g+h.charAt(0).toUpperCase()+h.substring(1),Ke[g]=Ke[h]})});function Ce(h,g,_){return g==null||typeof g=="boolean"||g===""?"":_||typeof g!="number"||g===0||Ke.hasOwnProperty(h)&&Ke[h]?(""+g).trim():g+"px"}function xt(h,g){h=h.style;for(var _ in g)if(g.hasOwnProperty(_)){var C=_.indexOf("--")===0,D=Ce(_,g[_],C);_==="float"&&(_="cssFloat"),C?h.setProperty(_,D):h[_]=D}}var bt=F({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 Pt(h,g){if(g){if(bt[h]&&(g.children!=null||g.dangerouslySetInnerHTML!=null))throw Error(r(137,h));if(g.dangerouslySetInnerHTML!=null){if(g.children!=null)throw Error(r(60));if(typeof g.dangerouslySetInnerHTML!="object"||!("__html"in g.dangerouslySetInnerHTML))throw Error(r(61))}if(g.style!=null&&typeof g.style!="object")throw Error(r(62))}}function _r(h,g){if(h.indexOf("-")===-1)return typeof g.is=="str
37ing";switch(h){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 Ht=null;function Zr(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var ai=null,Ia=null,Ki=null;function fa(h){if(h=$m(h)){if(typeof ai!="function")throw Error(r(280));var g=h.stateNode;g&&(g=By(g),ai(h.stateNode,h.type,g))}}function xs(h){Ia?Ki?Ki.push(h):Ki=[h]:Ia=h}function Hn(){if(Ia){var h=Ia,g=Ki;if(Ki=Ia=null,fa(h),g)for(h=0;h<g.length;h++)fa(g[h])}}function gn(h,g){return h(g)}function Rn(){}var ys=!1;function Lo(h,g,_){if(ys)return h(g,_);ys=!0;try{return gn(h,g,_)}finally{ys=!1,(Ia!==null||Ki!==null)&&(Rn(),Hn())}}function Fa(h,g){var _=h.stateNode;if(_===null)return null;var C=By(_);if(C===null)return null;_=C[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(C=!C.disabled)||(h=h.type,C=!(h==="button"||h==="input"||h==="select"||h==="textarea")),h=!C;break e;default:h=!1}if(h)return null;if(_&&typeof _!="function")throw Error(r(231,g,typeof _));return _}var no=!1;if(l)try{var vs={};Object.defineProperty(vs,"passive",{get:function(){no=!0}}),window.addEventListener("test",vs,vs),window.removeEventListener("test",vs,vs)}catch{no=!1}function Ac(h,g,_,C,D,z,ee,_e,Ne){var Le=Array.prototype.slice.call(arguments,3);try{g.apply(_,Le)}catch(Qe){this.onError(Qe)}}var jl=!1,bs=null,re=!1,ge=null,le={onError:function(h){jl=!0,bs=h}};function de(h,g,_,C,D,z,ee,_e,Ne){jl=!1,bs=null,Ac.apply(le,arguments)}function ye(h,g,_,C,D,z,ee,_e,Ne){if(de.apply(this,arguments),jl){if(jl){var Le=bs;jl=!1,bs=null}else throw Error(r(198));re||(re=!0,ge=Le)}}function be(h){var g=h,_=h;if(h.alternate)for(;g.return;)g=g.return;else{h=g;do g=h,(g.flags&4098)!==0&&(_=g.return),h=g.return;while(h)}return g.tag===3?_:null}function Ie(h){if(h.tag===13){var g=h.memoizedState;if(g===null&&(h=h.alternate,h!==null&&(g=h.memoizedState)),g!==null)return g.dehydrated}return null}function qe(h){if(be(h)!==h)throw Error(r(188))}function Re(h){var g=h.alternate;if(!g){if(g=be(h),g===null)throw Error(r(188));return g!==h?null:h}for(var _=h,C=g;;){var D=_.return;if(D===null)break;var z=D.alternate;if(z===null){if(C=D.return,C!==null){_=C;continue}break}if(D.child===z.child){for(z=D.child;z;){if(z===_)return qe(D),h;if(z===C)return qe(D),g;z=z.sibling}throw Error(r(188))}if(_.return!==C.return)_=D,C=z;else{for(var ee=!1,_e=D.child;_e;){if(_e===_){ee=!0,_=D,C=z;break}if(_e===C){ee=!0,C=D,_=z;break}_e=_e.sibling}if(!ee){for(_e=z.child;_e;){if(_e===_){ee=!0,_=z,C=D;break}if(_e===C){ee=!0,C=z,_=D;break}_e=_e.sibling}if(!ee)throw Error(r(189))}}if(_.alternate!==C)throw Error(r(190))}if(_.tag!==3)throw Error(r(188));return _.stateNode.current===_?h:g}function Fe(h){return h=Re(h),h!==null?De(h):null}function De(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){var g=De(h);if(g!==null)return g;h=h.sibling}return null}var et=t.unstable_scheduleCallback,dt=t.unstable_cancelCallback,mt=t.unstable_shouldYield,st=t.unstable_requestPaint,nt=t.unstable_now,Kt=t.unstable_getCurrentPriorityLevel,$r=t.unstable_ImmediatePriority,qr=t.unstable_UserBlockingPriority,In=t.unstable_NormalPriority,Ku=t.unstable_LowPriority,Cc=t.unstable_IdlePriority,$o=null,ha=null;function bm(h){if(ha&&typeof ha.onCommitFiberRoot=="function")try{ha.onCommitFiberRoot($o,h,void 0,(h.current.flags&128)===128)}catch{}}var Fn=Math.clz32?Math.clz32:cae,oae=Math.log,lae=Math.LN2;function cae(h){return h>>>=0,h===0?32:31-(oae(h)/lae|0)|0}var _y=64,Sy=4194304;function wm(h){switch(h&-h){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 h&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function Ey(h,g){var _=h.pendingLanes;if(_===0)return 0;var C=0,D=h.suspendedLanes,z=h.pingedLanes,ee=_&268435455;if(ee!==0){var _e=ee&~D;_e!==0?C=wm(_e):(z&=ee,z!==0&&(C=wm(z)))}else ee=_&~D,ee!==0?C=wm(ee):z!==0&&(C=wm(z));if(C===0)return 0;if(g!==0&&g!==C&&(g&D)===0&&(D=C&-C,z=g&-g,D>=z||D===16&&(z&4194240)!==0))return g;if((C&4)!==0&&(C|=_&16),g=h.entangledLanes,g!==0)for(h=h.entanglements,g&=C;0<g;)_=31-Fn(g),D=1<<_,C|=h[_],g&=~D;return C}function uae(h,g){switch(h){case 1:case 2:case 4:return g+250;case 8:case 16:case 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 g+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dae(h,g){for(var _=h.suspendedLanes,C=h.pingedLanes,D=h.expirationTimes,z=h.pendingLanes;0<z;
vendor: 70,584 bytes, lines 37-40
37){var ee=31-Fn(z),_e=1<<ee,Ne=D[ee];Ne===-1?((_e&_)===0||(_e&C)!==0)&&(D[ee]=uae(_e,g)):Ne<=g&&(h.expiredLanes|=_e),z&=~_e}}function RS(h){return h=h.pendingLanes&-1073741825,h!==0?h:h&1073741824?1073741824:0}function lF(){var h=_y;return _y<<=1,(_y&4194240)===0&&(_y=64),h}function IS(h){for(var g=[],_=0;31>_;_++)g.push(h);return g}function _m(h,g,_){h.pendingLanes|=g,g!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,g=31-Fn(g),h[g]=_}function fae(h,g){var _=h.pendingLanes&~g;h.pendingLanes=g,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=g,h.mutableReadLanes&=g,h.entangledLanes&=g,g=h.entanglements;var C=h.eventTimes;for(h=h.expirationTimes;0<_;){var D=31-Fn(_),z=1<<D;g[D]=0,C[D]=-1,h[D]=-1,_&=~z}}function FS(h,g){var _=h.entangledLanes|=g;for(h=h.entanglements;_;){var C=31-Fn(_),D=1<<C;D&g|h[C]&g&&(h[C]|=g),_&=~D}}var Or=0;function cF(h){return h&=-h,1<h?4<h?(h&268435455)!==0?16:536870912:4:1}var uF,MS,dF,fF,hF,DS=!1,ky=[],Oc=null,Pc=null,Rc=null,Sm=new Map,Em=new Map,Ic=[],hae="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pF(h,g){switch(h){case"focusin":case"focusout":Oc=null;break;case"dragenter":case"dragleave":Pc=null;break;case"mouseover":case"mouseout":Rc=null;break;case"pointerover":case"pointerout":Sm.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":Em.delete(g.pointerId)}}function km(h,g,_,C,D,z){return h===null||h.nativeEvent!==z?(h={blockedOn:g,domEventName:_,eventSystemFlags:C,nativeEvent:z,targetContainers:[D]},g!==null&&(g=$m(g),g!==null&&MS(g)),h):(h.eventSystemFlags|=C,g=h.targetContainers,D!==null&&g.indexOf(D)===-1&&g.push(D),h)}function pae(h,g,_,C,D){switch(g){case"focusin":return Oc=km(Oc,h,g,_,C,D),!0;case"dragenter":return Pc=km(Pc,h,g,_,C,D),!0;case"mouseover":return Rc=km(Rc,h,g,_,C,D),!0;case"pointerover":var z=D.pointerId;return Sm.set(z,km(Sm.get(z)||null,h,g,_,C,D)),!0;case"gotpointercapture":return z=D.pointerId,Em.set(z,km(Em.get(z)||null,h,g,_,C,D)),!0}return!1}function mF(h){var g=Yu(h.target);if(g!==null){var _=be(g);if(_!==null){if(g=_.tag,g===13){if(g=Ie(_),g!==null){h.blockedOn=g,hF(h.priority,function(){dF(_)});return}}else if(g===3&&_.stateNode.current.memoizedState.isDehydrated){h.blockedOn=_.tag===3?_.stateNode.containerInfo:null;return}}}h.blockedOn=null}function Ny(h){if(h.blockedOn!==null)return!1;for(var g=h.targetContainers;0<g.length;){var _=$S(h.domEventName,h.eventSystemFlags,g[0],h.nativeEvent);if(_===null){_=h.nativeEvent;var C=new _.constructor(_.type,_);Ht=C,_.target.dispatchEvent(C),Ht=null}else return g=$m(_),g!==null&&MS(g),h.blockedOn=_,!1;g.shift()}return!0}function gF(h,g,_){Ny(h)&&_.delete(g)}function mae(){DS=!1,Oc!==null&&Ny(Oc)&&(Oc=null),Pc!==null&&Ny(Pc)&&(Pc=null),Rc!==null&&Ny(Rc)&&(Rc=null),Sm.forEach(gF),Em.forEach(gF)}function Nm(h,g){h.blockedOn===g&&(h.blockedOn=null,DS||(DS=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,mae)))}function Tm(h){function g(D){return Nm(D,h)}if(0<ky.length){Nm(ky[0],h);for(var _=1;_<ky.length;_++){var C=ky[_];C.blockedOn===h&&(C.blockedOn=null)}}for(Oc!==null&&Nm(Oc,h),Pc!==null&&Nm(Pc,h),Rc!==null&&Nm(Rc,h),Sm.forEach(g),Em.forEach(g),_=0;_<Ic.length;_++)C=Ic[_],C.blockedOn===h&&(C.blockedOn=null);for(;0<Ic.length&&(_=Ic[0],_.blockedOn===null);)mF(_),_.blockedOn===null&&Ic.shift()}var Af=j.ReactCurrentBatchConfig,Ty=!0;function gae(h,g,_,C){var D=Or,z=Af.transition;Af.transition=null;try{Or=1,LS(h,g,_,C)}finally{Or=D,Af.transition=z}}function xae(h,g,_,C){var D=Or,z=Af.transition;Af.transition=null;try{Or=4,LS(h,g,_,C)}finally{Or=D,Af.transition=z}}function LS(h,g,_,C){if(Ty){var D=$S(h,g,_,C);if(D===null)rE(h,g,C,jy,_),pF(h,C);else if(pae(D,h,g,_,C))C.stopPropagation();else if(pF(h,C),g&4&&-1<hae.indexOf(h)){for(;D!==null;){var z=$m(D);if(z!==null&&uF(z),z=$S(h,g,_,C),z===null&&rE(h,g,C,jy,_),z===D)break;D=z}D!==null&&C.stopPropagation()}else rE(h,g,C,null,_)}}var jy=null;function $S(h,g,_,C){if(jy=null,h=Zr(C),h=Yu(h),h!==null)if(g=be(h),g===null)h=null;else if(_=g.tag,_===13){if(h=Ie(g),h!==null)return h;h=null}else if(_===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;h=null}else g!==h&&(h=null);return jy=h,null}function xF(h){switch(h){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Kt()){case $r:return 1;case qr:return 4;case In:case Ku:return 16;case Cc:return 536870912;default:return 16}default:return 16}}var Fc=null,BS=null,Ay=null;function yF(){if(Ay)return Ay;var h,g=BS,_=g.length,C,D="value"in Fc?Fc.value:Fc.textContent,z=D.length;for(h=0;h<_&&g[h]===D[h];h++);var ee=_-h;for(C=1;C<=ee&&g[_-C]===D[z-C];C++);return Ay=D.slice(h,1<C?1-C:void 0)}function Cy(h){var g=h.keyCode;return"charCode"in h?(h=h.charCode,h===0&&g===13&&(h=13)):h=g,h===10&&(h=13),32<=h||h===13?h:0}function Oy(){return!0}function vF(){return!1}function Yi(h){function g(_,C,D,z,ee){this._reactName=_,this._targetInst=D,this.type=C,this.nativeEvent=z,this.target=ee,this.currentTarget=null;for(var _e in h)h.hasOwnProperty(_e)&&(_=h[_e],this[_e]=_?_(z):z[_e]);return this.isDefaultPrevented=(z.defaultPrevented!=null?z.defaultPrevented:z.returnValue===!1)?Oy:vF,this.isPropagationStopped=vF,this}return F(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var _=this.nativeEvent;_&&(_.preventDefault?_.preventDefault():typeof _.returnValue!="unknown"&&(_.returnValue=!1),this.isDefaultPrevented=Oy)},stopPropagation:function(){var _=this.nativeEvent;_&&(_.stopPropagation?_.stopPropagation():typeof _.cancelBubble!="unknown"&&(_.cancelBubble=!0),this.isPropagationStopped=Oy)},persist:function(){},isPersistent:Oy}),g}var Cf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(h){return h.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},US=Yi(Cf),jm=F({},Cf,{view:0,detail:0}),yae=Yi(jm),zS,HS,Am,Py=F({},jm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:WS,button:0,buttons:0,relatedTarget:function(h){return h.relatedTarget===void 0?h.fromElement===h.srcElement?h.toElement:h.fromElement:h.relatedTarget},movementX:function(h){return"movementX"in h?h.movementX:(h!==Am&&(Am&&h.type==="mousemove"?(zS=h.screenX-Am.screenX,HS=h.screenY-Am.screenY):HS=zS=0,Am=h),zS)},movementY:function(h){return"movementY"in h?h.movementY:HS}}),bF=Yi(Py),vae=F({},Py,{dataTransfer:0}),bae=Yi(vae),wae=F({},jm,{relatedTarget:0}),qS=Yi(wae),_ae=F({},Cf,{animationName:0,elapsedTime:0,pseudoElement:0}),Sae=Yi(_ae),Eae=F({},Cf,{clipboardData:function(h){return"clipboardData"in h?h.clipboardData:window.clipboardData}}),kae=Yi(Eae),Nae=F({},Cf,{data:0}),wF=Yi(Nae),Tae={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jae={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Aae={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cae(h){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(h):(h=Aae[h])?!!g[h]:!1}function WS(){return Cae}var Oae=F({},jm,{key:function(h){if(h.key){var g=Tae[h.key]||h.key;if(g!=="Unidentified")return g}return h.type==="keypress"?(h=Cy(h),h===13?"Enter":String.fromCharCode(h)):h.type==="keydown"||h.type==="keyup"?jae[h.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:WS,charCode:function(h){return h.type==="keypress"?Cy(h):0},keyCode:function(h){return h.type==="keydown"||h.type==="keyup"?h.keyCode:0},which:function(h){return h.type==="keypress"?Cy(h):h.type==="keydown"||h.type==="keyup"?h.keyCode:0}}),Pae=Yi(Oae),Rae=F({},Py,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_F=Yi(Rae),Iae=F({},jm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:WS}),Fae=Yi(Iae),Mae=F({},Cf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dae=Yi(Mae),Lae=F({},Py,{deltaX:function(h){return"deltaX"in h?h.deltaX:"wheelDeltaX"in h?-h.wheelDeltaX:0},deltaY:function(h){return"deltaY"in h?h.deltaY:"wheelDeltaY"in h?-h.wheelDeltaY:"wheelDelta"in h?-h.wheelDelta:0},deltaZ:0,deltaMode:0}),$ae=Yi(Lae),Bae=[9,13,27,32],VS=l&&"CompositionEvent"in window,Cm=null;l&&"documentMode"in document&&(Cm=document.documentMode);var Uae=l&&"TextEvent"in window&&!Cm,SF=l&&(!VS||Cm&&8<Cm&&11>=Cm),EF=" ",kF=!1;function NF(h,g){switch(h){case"keyup":return Bae.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TF(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var Of=!1;function zae(h,g){switch(h){case"compositionend":return TF(g);case"keypress":return g.which!==32?null:(kF=!0,EF);case"textInput":return h=g.data,h===EF&&kF?null:h;default:return null}}function Hae(h,g){if(Of)return h==="compositionend"||!VS&&NF(h,g)?(h=yF(),Ay=BS=Fc=null,Of=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return SF&&g.locale!=="ko"?null:g.data;default:return null}}var qae={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jF(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g==="input"?!!qae[h.type]:g==="textarea"}function AF(h,g,_,C){xs(C),g=Dy(g,"onChange"),0<g.length&&(_=new US("onChange","change",null,_,C),h.push({event:_,listeners:g}))}var Om=null,Pm=null;function Wae(h){GF(h,0)}function Ry(h){var g=Mf(h);if(q(g))return h}function Vae(h,g){if(h==="change")return g}var CF=!1;if(l){var GS;if(l){var KS="oninput"in document;if(!KS){var OF=document.createElement("div");OF.setAttribute("oninput","return;"),KS=typeof OF.oninput=="function"}GS=KS}else GS=!1;CF=GS&&(!document.documentMode||9<document.documentMode)}function PF(){Om&&(Om.detachEvent("onpropertychange",RF),Pm=Om=null)}function RF(h){if(h.propertyName==="value"&&Ry(Pm)){var g=[];AF(g,Pm,h,Zr(h)),Lo(Wae,g)}}function Gae(h,g,_){h==="focusin"?(PF(),Om=g,Pm=_,Om.attachEvent("onpropertychange",RF)):h==="focusout"&&PF()}function Kae(h){if(h==="selectionchange"||h==="keyup"||h==="keydown")return Ry(Pm)}function Yae(h,g){if(h==="click")return Ry(g)}function Xae(h,g){if(h==="input"||h==="change")return Ry(g)}function Jae(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var ao=typeof Object.is=="function"?Object.is:Jae;function Rm(h,g){if(ao(h,g))return!0;if(typeof h!="object"||h===null||typeof g!="object"||g===null)return!1;var _=Object.keys(h),C=Object.keys(g);if(_.length!==C.length)return!1;for(C=0;C<_.length;C++){var D=_[C];if(!c.call(g,D)||!ao(h[D],g[D]))return!1}return!0}function IF(h){for(;h&&h.firstChild;)h=h.firstChild;return h}function FF(h,g){var _=IF(h);h=0;for(var C;_;){if(_.nodeType===3){if(C=h+_.textContent.length,h<=g&&C>=g)return{node:_,offset:g-h};h=C}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=IF(_)}}function MF(h,g){return h&&g?h===g?!0:h&&h.nodeType===3?!1:g&&g.nodeType===3?MF(h,g.parentNode):"contains"in h?h.contains(g):h.compareDocumentPosition?!!(h.compareDocumentPosition(g)&16):!1:!1}function DF(){for(var h=window,g=xe();g instanceof h.HTMLIFrameElement;){try{var _=typeof g.contentWindow.location.href=="string"}catch{_=!1}if(_)h=g.contentWindow;else break;g=xe(h.document)}return g}function YS(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g&&(g==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||g==="textarea"||h.contentEditable==="true")}function Qae(h){var g=DF(),_=h.focusedElem,C=h.selectionRange;if(g!==_&&_&&_.ownerDocument&&MF(_.ownerDocument.documentElement,_)){if(C!==null&&YS(_)){if(g=C.start,h=C.end,h===void 0&&(h=g),"selectionStart"in _)_.selectionStart=g,_.selectionEnd=Math.min(h,_.value.length);else if(h=(g=_.ownerDocument||document)&&g.defaultView||window,h.getSelection){h=h.getSelection();var D=_.textContent.length,z=Math.min(C.start,D);C=C.end===void 0?z:Math.min(C.end,D),!h.extend&&z>C&&(D=C,C=z,z=D),D=FF(_,z);var ee=FF(_,C);D&&ee&&(h.rangeCount!==1||h.anchorNode!==D.node||h.anchorOffset!==D.offset||h.focusNode!==ee.node||h.focusOffset!==ee.offset)&&(g=g.createRange(),g.setStart(D.node,D.offset),h.removeAllRanges(),z>C?(h.addRange(g),h.extend(ee.node,ee.offset)):(g.setEnd(ee.node,ee.offset),h.addRange(g)))}}for(g=[],h=_;h=h.parentNode;)h.nodeType===1&&g.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<g.length;_++)h=g[_],h.element.scrollLeft=h.left,h.element.scrollTop=h.top}}var Zae=l&&"documentMode"in document&&11>=document.documentMode,Pf=null,XS=null,Im=null,JS=!1;function LF(h,g,_){var C=_.window===_?_.document:_.nodeType===9?_:_.ownerDocument;JS||Pf==null||Pf!==xe(C)||(C=Pf,"selectionStart"in C&&YS(C)?C={start:C.selectionStart,end:C.selectionEnd}:(C=(C.ownerDocument&&C.ownerDocument.defaultView||window).getSelection(),C={anchorNode:C.anchorNode,anchorOffset:C.anchorOffset,focusNode:C.focusNode,focusOffset:C.focusOffset}),Im&&Rm(Im,C)||(Im=C,C=Dy(XS,"onSelect"),0<C.length&&(g=new US("onSelect","select",null,g,_),h.push({event:g,listeners:C}),g.target=Pf)))}function Iy(h,g){var _={};return _[h.toLowerCase()]=g.toLowerCase(),_["Webkit"+h]="webkit"+g,_["Moz"+h]="moz"+g,_}var Rf={animationend:Iy("Animation","AnimationEnd"),animationiteration:Iy("Animation","AnimationIteration"),animationstart:Iy("Animation","AnimationStart"),transitionend:Iy("Transition","TransitionEnd")},QS={},$F={};l&&($F=document.createElement("div").style,"AnimationEvent"in window||(delete Rf.animationend.animation,delete Rf.animationiteration.animation,delete Rf.animationstart.animation),"TransitionEvent"in window||delete Rf.transitionend.transition);function Fy(h){if(QS[h])return QS[h];if(!Rf[h])return h;var g=Rf[h],_;for(_ in g)if(g.hasOwnProperty(_)&&_ in $F)return QS[h]=g[_];return h}var BF=Fy("animationend"),UF=Fy("animationiteration"),zF=Fy("animationstart"),HF=Fy("transitionend"),qF=new Map,WF="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mc(h,g){qF.set(h,g),i(g,[h])}for(var ZS=0;ZS<WF.length;ZS++){var eE=WF[ZS],eie=eE.toLowerCase(),tie=eE[0].toUpperCase()+eE.slice(1);Mc(eie,"on"+tie)}Mc(BF,"onAnimationEnd"),Mc(UF,"onAnimationIteration"),Mc(zF,"onAnimationStart"),Mc("dblclick","onDoubleClick"),Mc("focusin","onFocus"),Mc("focusout","onBlur"),Mc(HF,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fm="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),rie=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fm));function VF(h,g,_){var C=h.type||"unknown-event";h.currentTarget=_,ye(C,g,void 0,h),h.currentTarget=null}function GF(h,g){g=(g&4)!==0;for(var _=0;_<h.length;_++){var C=h[_],D=C.event;C=C.listeners;e:{var z=void 0;if(g)for(var ee=C.length-1;0<=ee;ee--){var _e=C[ee],Ne=_e.instance,Le=_e.currentTarget;if(_e=_e.listener,Ne!==z&&D.isPropagationStopped())break e;VF(D,_e,Le),z=Ne}else for(ee=0;ee<C.length;ee++){if(_e=C[ee],Ne=_e.instance,Le=_e.currentTarget,_e=_e.listener,Ne!==z&&D.isPropagationStopped())break e;VF(D,_e,Le),z=Ne}}}if(re)throw h=ge,re=!1,ge=null,h}function en(h,g){var _=g[lE];_===void 0&&(_=g[lE]=new Set);var C=h+"__bubble";_.has(C)||(KF(g,h,2,!1),_.add(C))}function tE(h,g,_){var C=0;g&&(C|=4),KF(_,h,C,g)}var My="_reactListening"+Math.random().toString(36).slice(2);function Mm(h){if(!h[My]){h[My]=!0,n.forEach(function(_){_!=="selectionchange"&&(rie.has(_)||tE(_,!1,h),tE(_,!0,h))});var g=h.nodeType===9?h:h.ownerDocument;g===null||g[My]||(g[My]=!0,tE("selectionchange",!1,g))}}function KF(h,g,_,C){switch(xF(g)){case 1:var D=gae;break;case 4:D=xae;break;default:D=LS}_=D.bind(null,g,_,h),D=void 0,!no||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(D=!0),C?D!==void 0?h.addEventListener(g,_,{capture:!0,passive:D}):h.addEventListener(g,_,!0):D!==void 0?h.addEventListener(g,_,{passive:D}):h.addEventListener(g,_,!1)}function rE(h,g,_,C,D){var z=C;if((g&1)===0&&(g&2)===0&&C!==null)e:for(;;){if(C===null)return;var ee=C.tag;if(ee===3||ee===4){var _e=C.stateNode.containerInfo;if(_e===D||_e.nodeType===8&&_e.parentNode===D)break;if(ee===4)for(ee=C.return;ee!==null;){var Ne=ee.tag;if((Ne===3||Ne===4)&&(Ne=ee.stateNode.containerInfo,Ne===D||Ne.nodeType===8&&Ne.parentNode===D))return;ee=ee.return}for(;_e!==null;){if(ee=Yu(_e),ee===null)return;if(Ne=ee.tag,Ne===5||Ne===6){C=z=ee;continue e}_e=_e.parentNode}}C=C.return}Lo(function(){var Le=z,Qe=Zr(_),tt=[];e:{var Ye=qF.get(h);if(Ye!==void 0){var pt=US,wt=h;switch(h){case"keypress":if(Cy(_)===0)break e;case"keydown":case"keyup":pt=Pae;break;case"focusin":wt="focus",pt=qS;break;case"focusout":wt="blur",pt=qS;break;case"beforeblur":case"afterblur":pt=qS;break;case"click":if(_.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pt=bF;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pt=bae;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pt=Fae;break;case BF:case UF:case zF:pt=Sae;break;case HF:pt=Dae;break;case"scroll":pt=yae;break;case"wheel":pt=$ae;break;case"copy":case"cut":case"paste":pt=kae;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pt=_F}var Et=(g&4)!==0,Mn=!Et&&h==="scroll",je=Et?Ye!==null?Ye+"Capture":null:Ye;Et=[];for(var Te=Le,Pe;Te!==null;){Pe=Te;var ot=Pe.stateNode;if(Pe.tag===5&&ot!==null&&(Pe=ot,je!==null&&(ot=Fa(Te,je),ot!=null&&Et.push(Dm(Te,ot,Pe)))),Mn)break;Te=Te.return}0<Et.length&&(Ye=new pt(Ye,wt,null,_,Qe),tt.push({event:Ye,listeners:Et}))}}if((g&7)===0){e:{if(Ye=h==="mouseover"||h==="pointerover",pt=h==="mouseout"||h==="pointerout",Ye&&_!==Ht&&(wt=_.relatedTarget||_.fromElement)&&(Yu(wt)||wt[Al]))break e;if((pt||Ye)&&(Ye=Qe.window===Qe?Qe:(Ye=Qe.ownerDocument)?Ye.defaultView||Ye.parentWindow:window,pt?(wt=_.relatedTarget||_.toElement,pt=Le,wt=wt?Yu(wt):null,wt!==null&&(Mn=be(wt),wt!==Mn||wt.tag!==5&&wt.tag!==6)&&(wt=null)):(pt=null,wt=Le),pt!==wt)){if(Et=bF,ot="onMouseLeave",je="onMouseEnter",Te="mouse",(h==="pointerout"||h==="pointerover")&&(Et=_F,ot="onPointerLeave",je="onPointerEnter",Te="pointer"),Mn=pt==null?Ye:Mf(pt),Pe=wt==null?Ye:Mf(wt),Ye=new Et(ot,Te+"leave",pt,_,Qe),Ye.target=Mn,Ye.relatedTarget=Pe,ot=null,Yu(Qe)===Le&&(Et=new Et(je,Te+"enter",wt,_,Qe),Et.target=Pe,Et.relatedTarget=Mn,ot=Et),Mn=ot,pt&&wt)t:{for(Et=pt,je=wt,Te=0,Pe=Et;Pe;Pe=If(Pe))Te++;for(Pe=0,ot=je;ot;ot=If(ot))Pe++;for(;0<Te-Pe;)Et=If(Et),Te--;for(;0<Pe-Te;)je=If(je),Pe--;for(;Te--;){if(Et===je||je!==null&&Et===je.alternate)break t;Et=If(Et),je=If(je)}Et=null}else Et=null;pt!==null&&YF(tt,Ye,pt,Et,!1),wt!==null&&Mn!==null&&YF(tt,Mn,wt,Et,!0)}}e:{if(Ye=Le?Mf(Le):window,pt=Ye.nodeName&&Ye.nodeName.toLowerCase(),pt==="select"||pt==="input"&&Ye.type==="file")var Tt=Vae;else if(jF(Ye))if(CF)Tt=Xae;else{Tt=Kae;var Rt=Gae}else(pt=Ye.nodeName)&&pt.toLowerCase()==="input"&&(Ye.type==="checkbox"||Ye.type==="radio")&&(Tt=Yae);if(Tt&&(Tt=Tt(h,Le))){AF(tt,Tt,_,Qe);break e}Rt&&Rt(h,Ye,Le),h==="focusout"&&(Rt=Ye._wrapperState)&&Rt.controlled&&Ye.type==="number"&&ke(Ye,"number",Ye.value)}switch(Rt=Le?Mf(Le):window,h){case"focusin":(jF(Rt)||Rt.contentEditable==="true")&&(Pf=Rt,XS=Le,Im=null);break;case"focusout":Im=XS=Pf=null;break;case"mousedown":JS=!0;break;case"contextmenu":case"mouseup":case"dragend":JS=!1,LF(tt,_,Qe);break;case"selectionchange":if(Zae)break;case"keydown":case"keyup":LF(tt,_,Qe)}var It;if(VS)e:{switch(h){case"compositionstart":var Vt="onCompositionStart";break e;case"compositionend":Vt="onCompositionEnd";break e;case"compositionupdate":Vt="onCompositionUpdate";break e}Vt=void 0}else Of?NF(h,_)&&(Vt="onCompositionEnd"):h==="keydown"&&_.keyCode===229&&(Vt="onCompositionStart");Vt&&(SF&&_.locale!=="ko"&&(Of||Vt!=="onCompositionStart"?Vt==="onCompositionEnd"&&Of&&(It=yF()):(Fc=Qe,BS="value"in Fc?Fc.value:Fc.textContent,Of=!0)),Rt=Dy(Le,Vt),0<Rt.length&&(Vt=new wF(Vt,h,null,_,Qe),tt.push({event:Vt,listeners:Rt}),It?Vt.data=It:(It=TF(_),It!==null&&(Vt.data=It)))),(It=Uae?zae(h,_):Hae(h,_))&&(Le=Dy(Le,"onBeforeInput"),0<Le.length&&(Qe=new wF("onBeforeInput","beforeinput",null,_,Qe),tt.push({event:Qe,listeners:Le}),Qe.data=It))}GF(tt,g)})}function Dm(h,g,_){return{instance:h,listener:g,currentTarget:_}}function Dy(h,g){for(var _=g+"Capture",C=[];h!==null;){var D=h,z=D.stateNode;D.tag===5&&z!==null&&(D=z,z=Fa(h,_),z!=null&&C.unshift(Dm(h,z,D)),z=Fa(h,g),z!=null&&C.push(Dm(h,z,D))),h=h.return}return C}function If(h){if(h===null)return null;do h=h.return;while(h&&h.tag!==5);return h||null}function YF(h,g,_,C,D){for(var z=g._reactName,ee=[];_!==null&&_!==C;){var _e=_,Ne=_e.alternate,Le=_e.stateNode;if(Ne!==null&&Ne===C)break;_e.tag===5&&Le!==null&&(_e=Le,D?(Ne=Fa(_,z),Ne!=null&&ee.unshift(Dm(_,Ne,_e))):D||(Ne=Fa(_,z),Ne!=null&&ee.push(Dm(_,Ne,_e)))),_=_.return}ee.length!==0&&h.push({event:g,listeners:ee})}var nie=/\r\n?/g,aie=/\u0000|\uFFFD/g;function XF(h){return(typeof h=="string"?h:""+h).replace(nie,` 38`).replace(aie,"")}function Ly(h,g,_){if(g=XF(g),XF(h)!==g&&_)throw Error(r(425))}function $y(){}var nE=null,aE=null;function iE(h,g){return h==="textarea"||h==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var sE=typeof setTimeout=="function"?setTimeout:void 0,iie=typeof clearTimeout=="function"?clearTimeout:void 0,JF=typeof Promise=="function"?Promise:void 0,sie=typeof queueMicrotask=="function"?queueMicrotask:typeof JF<"u"?function(h){return JF.resolve(null).then(h).catch(oie)}:sE;function oie(h){setTimeout(function(){throw h})}function oE(h,g){var _=g,C=0;do{var D=_.nextSibling;if(h.removeChild(_),D&&D.nodeType===8)if(_=D.data,_==="/$"){if(C===0){h.removeChild(D),Tm(g);return}C--}else _!=="$"&&_!=="$?"&&_!=="$!"||C++;_=D}while(_);Tm(g)}function Dc(h){for(;h!=null;h=h.nextSibling){var g=h.nodeType;if(g===1||g===3)break;if(g===8){if(g=h.data,g==="$"||g==="$!"||g==="$?")break;if(g==="/$")return null}}return h}function QF(h){h=h.previousSibling;for(var g=0;h;){if(h.nodeType===8){var _=h.data;if(_==="$"||_==="$!"||_==="$?"){if(g===0)return h;g--}else _==="/$"&&g++}h=h.previousSibling}return null}var Ff=Math.random().toString(36).slice(2),Bo="__reactFiber$"+Ff,Lm="__reactProps$"+Ff,Al="__reactContainer$"+Ff,lE="__reactEvents$"+Ff,lie="__reactListeners$"+Ff,cie="__reactHandles$"+Ff;function Yu(h){var g=h[Bo];if(g)return g;for(var _=h.parentNode;_;){if(g=_[Al]||_[Bo]){if(_=g.alternate,g.child!==null||_!==null&&_.child!==null)for(h=QF(h);h!==null;){if(_=h[Bo])return _;h=QF(h)}return g}h=_,_=h.parentNode}return null}function $m(h){return h=h[Bo]||h[Al],!h||h.tag!==5&&h.tag!==6&&h.tag!==13&&h.tag!==3?null:h}function Mf(h){if(h.tag===5||h.tag===6)return h.stateNode;throw Error(r(33))}function By(h){return h[Lm]||null}var cE=[],Df=-1;function Lc(h){return{current:h}}function tn(h){0>Df||(h.current=cE[Df],cE[Df]=null,Df--)}function Wr(h,g){Df++,cE[Df]=h.current,h.current=g}var $c={},Ma=Lc($c),Ti=Lc(!1),Xu=$c;function Lf(h,g){var _=h.type.contextTypes;if(!_)return $c;var C=h.stateNode;if(C&&C.__reactInternalMemoizedUnmaskedChildContext===g)return C.__reactInternalMemoizedMaskedChildContext;var D={},z;for(z in _)D[z]=g[z];return C&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=g,h.__reactInternalMemoizedMaskedChildContext=D),D}function ji(h){return h=h.childContextTypes,h!=null}function Uy(){tn(Ti),tn(Ma)}function ZF(h,g,_){if(Ma.current!==$c)throw Error(r(168));Wr(Ma,g),Wr(Ti,_)}function eM(h,g,_){var C=h.stateNode;if(g=g.childContextTypes,typeof C.getChildContext!="function")return _;C=C.getChildContext();for(var D in C)if(!(D in g))throw Error(r(108,fe(h)||"Unknown",D));return F({},_,C)}function zy(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||$c,Xu=Ma.current,Wr(Ma,h),Wr(Ti,Ti.current),!0}function tM(h,g,_){var C=h.stateNode;if(!C)throw Error(r(169));_?(h=eM(h,g,Xu),C.__reactInternalMemoizedMergedChildContext=h,tn(Ti),tn(Ma),Wr(Ma,h)):tn(Ti),Wr(Ti,_)}var Cl=null,Hy=!1,uE=!1;function rM(h){Cl===null?Cl=[h]:Cl.push(h)}function uie(h){Hy=!0,rM(h)}function Bc(){if(!uE&&Cl!==null){uE=!0;var h=0,g=Or;try{var _=Cl;for(Or=1;h<_.length;h++){var C=_[h];do C=C(!0);while(C!==null)}Cl=null,Hy=!1}catch(D){throw Cl!==null&&(Cl=Cl.slice(h+1)),et($r,Bc),D}finally{Or=g,uE=!1}}return null}var $f=[],Bf=0,qy=null,Wy=0,ws=[],_s=0,Ju=null,Ol=1,Pl="";function Qu(h,g){$f[Bf++]=Wy,$f[Bf++]=qy,qy=h,Wy=g}function nM(h,g,_){ws[_s++]=Ol,ws[_s++]=Pl,ws[_s++]=Ju,Ju=h;var C=Ol;h=Pl;var D=32-Fn(C)-1;C&=~(1<<D),_+=1;var z=32-Fn(g)+D;if(30<z){var ee=D-D%5;z=(C&(1<<ee)-1).toString(32),C>>=ee,D-=ee,Ol=1<<32-Fn(g)+D|_<<D|C,Pl=z+h}else Ol=1<<z|_<<D|C,Pl=h}function dE(h){h.return!==null&&(Qu(h,1),nM(h,1,0))}function fE(h){for(;h===qy;)qy=$f[--Bf],$f[Bf]=null,Wy=$f[--Bf],$f[Bf]=null;for(;h===Ju;)Ju=ws[--_s],ws[_s]=null,Pl=ws[--_s],ws[_s]=null,Ol=ws[--_s],ws[_s]=null}var Xi=null,Ji=null,un=!1,io=null;function aM(h,g){var _=Ns(5,null,null,0);_.elementType="DELETED",_.stateNode=g,_.return=h,g=h.deletions,g===null?(h.deletions=[_],h.flags|=16):g.push(_)}function iM(h,g){switch(h.tag){case 5:var _=h.type;return g=g.nodeType!==1||_.toLowerCase()!==g.nodeName.toLowerCase()?null:g,g!==null?(h.stateNode=g,Xi=h,Ji=Dc(g.firstChild),!0):!1;case 6:return g=h.pendingProps===""||g.nodeType!==3?null:g,g!==null?(h.stateNode=g,Xi=h,Ji=null,!0):!1;case 13:return g=g.nodeType!==8?null:g,g!==null?(_=Ju!==null?{id:Ol,overflow:Pl}:null,h.memoizedState={dehydrated:g,treeContext:_,retryLane:1073741824},_=Ns(18,null,null,0),_.stateNode=g,_.return=h,h.child=_,Xi=h,Ji=null,!0):!1;default:return!1}}function hE(h){return(h.mode&1)!==0&&(h.flags&128)===0}function pE(h){if(un){var g=Ji;if(g){var _=g;if(!iM(h,g)){if(hE(h))throw Error(r(418));g=Dc(_.nextSibling);var C=Xi;g&&iM(h,g)?aM(C,_):(h.flags=h.flags&-4097|2,un=!1,Xi=h)}}else{if(hE(h))throw Error(r(418));h.flags=h.flags&-4097|2,un=!1,Xi=h}}}function sM(h){for(h=h.return;h!==null&&h.tag!==5&&h.tag!==3&&h.tag!==13;)h=h.return;Xi=h}function Vy(h){if(h!==Xi)return!1;if(!un)return sM(h),un=!0,!1;var g;if((g=h.tag!==3)&&!(g=h.tag!==5)&&(g=h.type,g=g!=="head"&&g!=="body"&&!iE(h.type,h.memoizedProps)),g&&(g=Ji)){if(hE(h))throw oM(),Error(r(418));for(;g;)aM(h,g),g=Dc(g.nextSibling)}if(sM(h),h.tag===13){if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));e:{for(h=h.nextSibling,g=0;h;){if(h.nodeType===8){var _=h.data;if(_==="/$"){if(g===0){Ji=Dc(h.nextSibling);break e}g--}else _!=="$"&&_!=="$!"&&_!=="$?"||g++}h=h.nextSibling}Ji=null}}else Ji=Xi?Dc(h.stateNode.nextSibling):null;return!0}function oM(){for(var h=Ji;h;)h=Dc(h.nextSibling)}function Uf(){Ji=Xi=null,un=!1}function mE(h){io===null?io=[h]:io.push(h)}var die=j.ReactCurrentBatchConfig;function so(h,g){if(h&&h.defaultProps){g=F({},g),h=h.defaultProps;for(var _ in h)g[_]===void 0&&(g[_]=h[_]);return g}return g}var Gy=Lc(null),Ky=null,zf=null,gE=null;function xE(){gE=zf=Ky=null}function yE(h){var g=Gy.current;tn(Gy),h._currentValue=g}function vE(h,g,_){for(;h!==null;){var C=h.alternate;if((h.childLanes&g)!==g?(h.childLanes|=g,C!==null&&(C.childLanes|=g)):C!==null&&(C.childLanes&g)!==g&&(C.childLanes|=g),h===_)break;h=h.return}}function Hf(h,g){Ky=h,gE=zf=null,h=h.dependencies,h!==null&&h.firstContext!==null&&((h.lanes&g)!==0&&(Ai=!0),h.firstContext=null)}function Ss(h){var g=h._currentValue;if(gE!==h)if(h={context:h,memoizedValue:g,next:null},zf===null){if(Ky===null)throw Error(r(308));zf=h,Ky.dependencies={lanes:0,firstContext:h}}else zf=zf.next=h;return g}var Zu=null;function bE(h){Zu===null?Zu=[h]:Zu.push(h)}function lM(h,g,_,C){var D=g.interleaved;return D===null?(_.next=_,bE(g)):(_.next=D.next,D.next=_),g.interleaved=_,Rl(h,C)}function Rl(h,g){h.lanes|=g;var _=h.alternate;for(_!==null&&(_.lanes|=g),_=h,h=h.return;h!==null;)h.childLanes|=g,_=h.alternate,_!==null&&(_.childLanes|=g),_=h,h=h.return;return _.tag===3?_.stateNode:null}var Uc=!1;function wE(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cM(h,g){h=h.updateQueue,g.updateQueue===h&&(g.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects})}function Il(h,g){return{eventTime:h,lane:g,tag:0,payload:null,callback:null,next:null}}function zc(h,g,_){var C=h.updateQueue;if(C===null)return null;if(C=C.shared,(yr&2)!==0){var D=C.pending;return D===null?g.next=g:(g.next=D.next,D.next=g),C.pending=g,Rl(h,_)}return D=C.interleaved,D===null?(g.next=g,bE(C)):(g.next=D.next,D.next=g),C.interleaved=g,Rl(h,_)}function Yy(h,g,_){if(g=g.updateQueue,g!==null&&(g=g.shared,(_&4194240)!==0)){var C=g.lanes;C&=h.pendingLanes,_|=C,g.lanes=_,FS(h,_)}}function uM(h,g){var _=h.updateQueue,C=h.alternate;if(C!==null&&(C=C.updateQueue,_===C)){var D=null,z=null;if(_=_.firstBaseUpdate,_!==null){do{var ee={eventTime:_.eventTime,lane:_.lane,tag:_.tag,payload:_.payload,callback:_.callback,next:null};z===null?D=z=ee:z=z.next=ee,_=_.next}while(_!==null);z===null?D=z=g:z=z.next=g}else D=z=g;_={baseState:C.baseState,firstBaseUpdate:D,lastBaseUpdate:z,shared:C.shared,effects:C.effects},h.updateQueue=_;return}h=_.lastBaseUpdate,h===null?_.firstBaseUpdate=g:h.next=g,_.lastBaseUpdate=g}function Xy(h,g,_,C){var D=h.updateQueue;Uc=!1;var z=D.firstBaseUpdate,ee=D.lastBaseUpdate,_e=D.shared.pending;if(_e!==null){D.shared.pending=null;var Ne=_e,Le=Ne.next;Ne.next=null,ee===null?z=Le:ee.next=Le,ee=Ne;var Qe=h.alternate;Qe!==null&&(Qe=Qe.updateQueue,_e=Qe.lastBaseUpdate,_e!==ee&&(_e===null?Qe.firstBaseUpdate=Le:_e.next=Le,Qe.lastBaseUpdate=Ne))}if(z!==null){var tt=D.baseState;ee=0,Qe=Le=Ne=null,_e=z;do{var Ye=_e.lane,pt=_e.eventTime;if((C&Ye)===Ye){Qe!==null&&(Qe=Qe.next={eventTime:pt,lane:0,tag:_e.tag,payload:_e.payload,callback:_e.callback,next:null});e:{var wt=h,Et=_e;switch(Ye=g,pt=_,Et.tag){case 1:if(wt=Et.payload,typeof wt=="function"){tt=wt.call(pt,tt,Ye);break e}tt=wt;break e;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=Et.payload,Ye=typeof wt=="function"?wt.call(pt,tt,Ye):wt,Ye==null)break e;tt=F({},tt,Ye);break e;case 2:Uc=!0}}_e.callback!==null&&_e.lane!==0&&(h.flags|=64,Ye=D.effects,Ye===null?D.effects=[_e]:Ye.push(_e))}else pt={eventTime:pt,lane:Ye,tag:_e.tag,payload:_e.payload,callback:_e.callback,next:null},Qe===null?(Le=Qe=pt,Ne=tt):Qe=Qe.next=pt,ee|=Ye;if(_e=_e.next,_e===null){if(_e=D.shared.pending,_e===null)break;Ye=_e,_e=Ye.next,Ye.next=null,D.lastBaseUpdate=Ye,D.shared.pending=null}}while(!0);if(Qe===null&&(Ne=tt),D.baseState=Ne,D.firstBaseUpdate=Le,D.lastBaseUpdate=Qe,g=D.shared.interleaved,g!==null){D=g;do ee|=D.lane,D=D.next;while(D!==g)}else z===null&&(D.shared.lanes=0);rd|=ee,h.lanes=ee,h.memoizedState=tt}}function dM(h,g,_){if(h=g.effects,g.effects=null,h!==null)for(g=0;g<h.length;g++){var C=h[g],D=C.callback;if(D!==null){if(C.callback=null,C=_,typeof D!="function")throw Error(r(191,D));D.call(C)}}}var fM=new e.Component().refs;function _E(h,g,_,C){g=h.memoizedState,_=_(C,g),_=_==null?g:F({},g,_),h.memoizedState=_,h.lanes===0&&(h.updateQueue.baseState=_)}var Jy={isMounted:function(h){return(h=h._reactInternals)?be(h)===h:!1},enqueueSetState:function(h,g,_){h=h._reactInternals;var C=si(),D=Vc(h),z=Il(C,D);z.payload=g,_!=null&&(z.callback=_),g=zc(h,z,D),g!==null&&(co(g,h,D,C),Yy(g,h,D))},enqueueReplaceState:function(h,g,_){h=h._reactInternals;var C=si(),D=Vc(h),z=Il(C,D);z.tag=1,z.payload=g,_!=null&&(z.callback=_),g=zc(h,z,D),g!==null&&(co(g,h,D,C),Yy(g,h,D))},enqueueForceUpdate:function(h,g){h=h._reactInternals;var _=si(),C=Vc(h),D=Il(_,C);D.tag=2,g!=null&&(D.callback=g),g=zc(h,D,C),g!==null&&(co(g,h,C,_),Yy(g,h,C))}};function hM(h,g,_,C,D,z,ee){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(C,z,ee):g.prototype&&g.prototype.isPureReactComponent?!Rm(_,C)||!Rm(D,z):!0}function pM(h,g,_){var C=!1,D=$c,z=g.contextType;return typeof z=="object"&&z!==null?z=Ss(z):(D=ji(g)?Xu:Ma.current,C=g.contextTypes,z=(C=C!=null)?Lf(h,D):$c),g=new g(_,z),h.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Jy,h.stateNode=g,g._reactInternals=h,C&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=D,h.__reactInternalMemoizedMaskedChildContext=z),g}function mM(h,g,_,C){h=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(_,C),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(_,C),g.state!==h&&Jy.enqueueReplaceState(g,g.state,null)}function SE(h,g,_,C){var D=h.stateNode;D.props=_,D.state=h.memoizedState,D.refs=fM,wE(h);var z=g.contextType;typeof z=="object"&&z!==null?D.context=Ss(z):(z=ji(g)?Xu:Ma.current,D.context=Lf(h,z)),D.state=h.memoizedState,z=g.getDerivedStateFromProps,typeof z=="function"&&(_E(h,g,z,_),D.state=h.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(g=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),g!==D.state&&Jy.enqueueReplaceState(D,D.state,null),Xy(h,_,D,C),D.state=h.memoizedState),typeof D.componentDidMount=="function"&&(h.flags|=4194308)}function Bm(h,g,_){if(h=_.ref,h!==null&&typeof h!="function"&&typeof h!="object"){if(_._owner){if(_=_._owner,_){if(_.tag!==1)throw Error(r(309));var C=_.stateNode}if(!C)throw Error(r(147,h));var D=C,z=""+h;return g!==null&&g.ref!==null&&typeof g.ref=="function"&&g.ref._stringRef===z?g.ref:(g=function(ee){var _e=D.refs;_e===fM&&(_e=D.refs={}),ee===null?delete _e[z]:_e[z]=ee},g._stringRef=z,g)}if(typeof h!="string")throw Error(r(284));if(!_._owner)throw Error(r(290,h))}return h}function Qy(h,g){throw h=Object.prototype.toString.call(g),Error(r(31,h==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":h))}function gM(h){var g=h._init;return g(h._payload)}function xM(h){function g(je,Te){if(h){var Pe=je.deletions;Pe===null?(je.deletions=[Te],je.flags|=16):Pe.push(Te)}}function _(je,Te){if(!h)return null;for(;Te!==null;)g(je,Te),Te=Te.sibling;return null}function C(je,Te){for(je=new Map;Te!==null;)Te.key!==null?je.set(Te.key,Te):je.set(Te.index,Te),Te=Te.sibling;return je}function D(je,Te){return je=Kc(je,Te),je.index=0,je.sibling=null,je}function z(je,Te,Pe){return je.index=Pe,h?(Pe=je.alternate,Pe!==null?(Pe=Pe.index,Pe<Te?(je.flags|=2,Te):Pe):(je.flags|=2,Te)):(je.flags|=1048576,Te)}function ee(je){return h&&je.alternate===null&&(je.flags|=2),je}function _e(je,Te,Pe,ot){return Te===null||Te.tag!==6?(Te=s2(Pe,je.mode,ot),Te.return=je,Te):(Te=D(Te,Pe),Te.return=je,Te)}function Ne(je,Te,Pe,ot){var Tt=Pe.type;return Tt===T?Qe(je,Te,Pe.props.children,ot,Pe.key):Te!==null&&(Te.elementType===Tt||typeof Tt=="object"&&Tt!==null&&Tt.$$typeof===W&&gM(Tt)===Te.type)?(ot=D(Te,Pe.props),ot.ref=Bm(je,Te,Pe),ot.return=je,ot):(ot=xv(Pe.type,Pe.key,Pe.props,null,je.mode,ot),ot.ref=Bm(je,Te,Pe),ot.return=je,ot)}function Le(je,Te,Pe,ot){return Te===null||Te.tag!==4||Te.stateNode.containerInfo!==Pe.containerInfo||Te.stateNode.implementation!==Pe.implementation?(Te=o2(Pe,je.mode,ot),Te.return=je,Te):(Te=D(Te,Pe.children||[]),Te.return=je,Te)}function Qe(je,Te,Pe,ot,Tt){return Te===null||Te.tag!==7?(Te=sd(Pe,je.mode,ot,Tt),Te.return=je,Te):(Te=D(Te,Pe),Te.return=je,Te)}function tt(je,Te,Pe){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return Te=s2(""+Te,je.mode,Pe),Te.return=je,Te;if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case k:return Pe=xv(Te.type,Te.key,Te.props,null,je.mode,Pe),Pe.ref=Bm(je,null,Te),Pe.return=je,Pe;case E:return Te=o2(Te,je.mode,Pe),Te.return=je,Te;case W:var ot=Te._init;return tt(je,ot(Te._payload),Pe)}if(Oe(Te)||K(Te))return Te=sd(Te,je.mode,Pe,null),Te.return=je,Te;Qy(je,Te)}return null}function Ye(je,Te,Pe,ot){var Tt=Te!==null?Te.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number")return Tt!==null?null:_e(je,Te,""+Pe,ot);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case k:return Pe.key===Tt?Ne(je,Te,Pe,ot):null;case E:return Pe.key===Tt?Le(je,Te,Pe,ot):null;case W:return Tt=Pe._init,Ye(je,Te,Tt(Pe._payload),ot)}if(Oe(Pe)||K(Pe))return Tt!==null?null:Qe(je,Te,Pe,ot,null);Qy(je,Pe)}return null}function pt(je,Te,Pe,ot,Tt){if(typeof ot=="string"&&ot!==""||typeof ot=="number")return je=je.get(Pe)||null,_e(Te,je,""+ot,Tt);if(typeof ot=="object"&&ot!==null){switch(ot.$$typeof){case k:return je=je.get(ot.key===null?Pe:ot.key)||null,Ne(Te,je,ot,Tt);case E:return je=je.get(ot.key===null?Pe:ot.key)||null,Le(Te,je,ot,Tt);case W:var Rt=ot._init;return pt(je,Te,Pe,Rt(ot._payload),Tt)}if(Oe(ot)||K(ot))return je=je.get(Pe)||null,Qe(Te,je,ot,Tt,null);Qy(Te,ot)}return null}function wt(je,Te,Pe,ot){for(var Tt=null,Rt=null,It=Te,Vt=Te=0,ga=null;It!==null&&Vt<Pe.length;Vt++){It.index>Vt?(ga=It,It=null):ga=It.sibling;var Sr=Ye(je,It,Pe[Vt],ot);if(Sr===null){It===null&&(It=ga);break}h&&It&&Sr.alternate===null&&g(je,It),Te=z(Sr,Te,Vt),Rt===null?Tt=Sr:Rt.sibling=Sr,Rt=Sr,It=ga}if(Vt===Pe.length)return _(je,It),un&&Qu(je,Vt),Tt;if(It===null){for(;Vt<Pe.length;Vt++)It=tt(je,Pe[Vt],ot),It!==null&&(Te=z(It,Te,Vt),Rt===null?Tt=It:Rt.sibling=It,Rt=It);return un&&Qu(je,Vt),Tt}for(It=C(je,It);Vt<Pe.length;Vt++)ga=pt(It,je,Vt,Pe[Vt],ot),ga!==null&&(h&&ga.alternate!==null&&It.delete(ga.key===null?Vt:ga.key),Te=z(ga,Te,Vt),Rt===null?Tt=ga:Rt.sibling=ga,Rt=ga);return h&&It.forEach(function(Yc){return g(je,Yc)}),un&&Qu(je,Vt),Tt}function Et(je,Te,Pe,ot){var Tt=K(Pe);if(typeof Tt!="function")throw Error(r(150));if(Pe=Tt.call(Pe),Pe==null)throw Error(r(151));for(var Rt=Tt=null,It=Te,Vt=Te=0,ga=null,Sr=Pe.next();It!==null&&!Sr.done;Vt++,Sr=Pe.next()){It.index>Vt?(ga=It,It=null):ga=It.sibling;var Yc=Ye(je,It,Sr.value,ot);if(Yc===null){It===null&&(It=ga);break}h&&It&&Yc.alternate===null&&g(je,It),Te=z(Yc,Te,Vt),Rt===null?Tt=Yc:Rt.sibling=Yc,Rt=Yc,It=ga}if(Sr.done)return _(je,It),un&&Qu(je,Vt),Tt;if(It===null){for(;!Sr.done;Vt++,Sr=Pe.next())Sr=tt(je,Sr.value,ot),Sr!==null&&(Te=z(Sr,Te,Vt),Rt===null?Tt=Sr:Rt.sibling=Sr,Rt=Sr);return un&&Qu(je,Vt),Tt}for(It=C(je,It);!Sr.done;Vt++,Sr=Pe.next())Sr=pt(It,je,Vt,Sr.value,ot),Sr!==null&&(h&&Sr.alternate!==null&&It.delete(Sr.key===null?Vt:Sr.key),Te=z(Sr,Te,Vt),Rt===null?Tt=Sr:Rt.sibling=Sr,Rt=Sr);return h&&It.forEach(function(qie){return g(je,qie)}),un&&Qu(je,Vt),Tt}function Mn(je,Te,Pe,ot){if(typeof Pe=="object"&&Pe!==null&&Pe.type===T&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case k:e:{for(var Tt=Pe.key,Rt=Te;Rt!==null;){if(Rt.key===Tt){if(Tt=Pe.type,Tt===T){if(Rt.tag===7){_(je,Rt.sibling),Te=D(Rt,Pe.props.children),Te.return=je,je=Te;break e}}else if(Rt.elementType===Tt||typeof Tt=="object"&&Tt!==null&&Tt.$$typeof===W&&gM(Tt)===Rt.type){_(je,Rt.sibling),Te=D(Rt,Pe.props),Te.ref=Bm(je,Rt,Pe),Te.return=je,je=Te;break e}_(je,Rt);break}else g(je,Rt);Rt=Rt.sibling}Pe.type===T?(Te=sd(Pe.props.children,je.mode,ot,Pe.key),Te.return=je,je=Te):(ot=xv(Pe.type,Pe.key,Pe.props,null,je.mode,ot),ot.ref=Bm(je,Te,Pe),ot.return=je,je=ot)}return ee(je);case E:e:{for(Rt=Pe.key;Te!==null;){if(Te.key===Rt)if(Te.tag===4&&Te.stateNode.containerInfo===Pe.containerInfo&&Te.stateNode.implementation===Pe.implementation){_(je,Te.sibling),Te=D(Te,Pe.children||[]),Te.return=je,je=Te;break e}else{_(je,Te);break}else g(je,Te);Te=Te.sibling}Te=o2(Pe,je.mode,ot),Te.return=je,je=Te}return ee(je);case W:return Rt=Pe._init,Mn(je,Te,Rt(Pe._payload),ot)}if(Oe(Pe))return wt(je,Te,Pe,ot);if(K(Pe))return Et(je,Te,Pe,ot);Qy(je,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"?(Pe=""+Pe,Te!==null&&Te.tag===6?(_(je,Te.sibling),Te=D(Te,Pe),Te.return=je,je=Te):(_(je,Te),Te=s2(Pe,je.mode,ot),Te.return=je,je=Te),ee(je)):_(je,Te)}return Mn}var qf=xM(!0),yM=xM(!1),Um={},Uo=Lc(Um),zm=Lc(Um),Hm=Lc(Um);function ed(h){if(h===Um)throw Error(r(174));return h}function EE(h,g){switch(Wr(Hm,g),Wr(zm,h),Wr(Uo,Um),h=g.nodeType,h){case 9:case 11:g=(g=g.documentElement)?g.namespaceURI:me(null,"");break;default:h=h===8?g.parentNode:g,g=h.namespaceURI||null,h=h.tagName,g=me(g,h)}tn(Uo),Wr(Uo,g)}function Wf(){tn(Uo),tn(zm),tn(Hm)}function vM(h){ed(Hm.current);var g=ed(Uo.current),_=me(g,h.type);g!==_&&(Wr(zm,h),Wr(Uo,_))}function kE(h){zm.current===h&&(tn(Uo),tn(zm))}var xn=Lc(0);function Zy(h){for(var g=h;g!==null;){if(g.tag===13){var _=g.memoizedState;if(_!==null&&(_=_.dehydrated,_===null||_.data==="$?"||_.data==="$!"))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var NE=[];function TE(){for(var h=0;h<NE.length;h++)NE[h]._workInProgressVersionPrimary=null;NE.length=0}var ev=j.ReactCurrentDispatcher,jE=j.ReactCurrentBatchConfig,td=0,yn=null,Zn=null,pa=null,tv=!1,qm=!1,Wm=0,fie=0;function Da(){throw Error(r(321))}function AE(h,g){if(g===null)return!1;for(var _=0;_<g.length&&_<h.length;_++)if(!ao(h[_],g[_]))return!1;return!0}function CE(h,g,_,C,D,z){if(td=z,yn=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,ev.current=h===null||h.memoizedState===null?gie:xie,h=_(C,D),qm){z=0;do{if(qm=!1,Wm=0,25<=z)throw Error(r(301));z+=1,pa=Zn=null,g.updateQueue=null,ev.current=yie,h=_(C,D)}while(qm)}if(ev.current=av,g=Zn!==null&&Zn.next!==null,td=0,pa=Zn=yn=null,tv=!1,g)throw Error(r(300));return h}function OE(){var h=Wm!==0;return Wm=0,h}function zo(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pa===null?yn.memoizedState=pa=h:pa=pa.next=h,pa}function Es(){if(Zn===null){var h=yn.alternate;h=h!==null?h.memoizedState:null}else h=Zn.next;var g=pa===null?yn.memoizedState:pa.next;if(g!==null)pa=g,Zn=h;else{if(h===null)throw Error(r(310));Zn=h,h={memoizedState:Zn.memoizedState,baseState:Zn.baseState,baseQueue:Zn.baseQueue,queue:Zn.queue,next:null},pa===null?yn.memoizedState=pa=h:pa=pa.next=h}return pa}function Vm(h,g){return typeof g=="function"?g(h):g}function PE(h){var g=Es(),_=g.queue;if(_===null)throw Error(r(311));_.lastRenderedReducer=h;var C=Zn,D=C.baseQueue,z=_.pending;if(z!==null){if(D!==null){var ee=D.next;D.next=z.next,z.next=ee}C.baseQueue=D=z,_.pending=null}if(D!==null){z=D.next,C=C.baseState;var _e=ee=null,Ne=null,Le=z;do{var Qe=Le.lane;if((td&Qe)===Qe)Ne!==null&&(Ne=Ne.next={lane:0,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null}),C=Le.hasEagerState?Le.eagerState:h(C,Le.action);else{var tt={lane:Qe,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null};Ne===null?(_e=Ne=tt,ee=C):Ne=Ne.next=tt,yn.lanes|=Qe,rd|=Qe}Le=Le.next}while(Le!==null&&Le!==z);Ne===null?ee=C:Ne.next=_e,ao(C,g.memoizedState)||(Ai=!0),g.memoizedState=C,g.baseState=ee,g.baseQueue=Ne,_.lastRenderedState=C}if(h=_.interleaved,h!==null){D=h;do z=D.lane,yn.lanes|=z,rd|=z,D=D.next;while(D!==h)}else D===null&&(_.lanes=0);return[g.memoizedState,_.dispatch]}function RE(h){var g=Es(),_=g.queue;if(_===null)throw Error(r(311));_.lastRenderedReducer=h;var C=_.dispatch,D=_.pending,z=g.memoizedState;if(D!==null){_.pending=null;var ee=D=D.next;do z=h(z,ee.action),ee=ee.next;while(ee!==D);ao(z,g.memoizedState)||(Ai=!0),g.memoizedState=z,g.baseQueue===null&&(g.baseState=z),_.lastRenderedState=z}return[z,C]}function bM(){}function wM(h,g){var _=yn,C=Es(),D=g(),z=!ao(C.memoizedState,D);if(z&&(C.memoizedState=D,Ai=!0),C=C.queue,IE(EM.bind(null,_,C,h),[h]),C.getSnapshot!==g||z||pa!==null&&pa.memoizedState.tag&1){if(_.flags|=2048,Gm(9,SM.bind(null,_,C,D,g),void 0,null),ma===null)throw Error(r(349));(td&30)!==0||_M(_,g,D)}return D}function _M(h,g,_){h.flags|=16384,h={getSnapshot:g,value:_},g=yn.updateQueue,g===null?(g={lastEffect:null,stores:null},yn.updateQueue=g,g.stores=[h]):(_=g.stores,_===null?g.stores=[h]:_.push(h))}function SM(h,g,_,C){g.value=_,g.getSnapshot=C,kM(g)&&NM(h)}function EM(h,g,_){return _(function(){kM(g)&&NM(h)})}function kM(h){var g=h.getSnapshot;h=h.value;try{var _=g();return!ao(h,_)}catch{return!0}}function NM(h){var g=Rl(h,1);g!==null&&co(g,h,1,-1)}function TM(h){var g=zo();return typeof h=="function"&&(h=h()),g.memoizedState=g.baseState=h,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vm,lastRenderedState:h},g.queue=h,h=h.dispatch=mie.bind(null,yn,h),[g.memoizedState,h]}function Gm(h,g,_,C){return h={tag:h,create:g,destroy:_,deps:C,next:null},g=yn.updateQueue,g===null?(g={lastEffect:null,stores:null},yn.updateQueue=g,g.lastEffect=h.next=h):(_=g.lastEffect,_===null?g.lastEffect=h.next=h:(C=_.next,_.next=h,h.next=C,g.lastEffect=h)),h}function jM(){return Es().memoizedState}function rv(h,g,_,C){var D=zo();yn.flags|=h,D.memoizedState=Gm(1|g,_,void 0,C===void 0?null:C)}function nv(h,g,_,C){var D=Es();C=C===void 0?null:C;var z=void 0;if(Zn!==null){var ee=Zn.memoizedState;if(z=ee.destroy,C!==null&&AE(C,ee.deps)){D.memoizedState=Gm(g,_,z,C);return}}yn.flags|=h,D.memoizedState=Gm(1|g,_,z,C)}function AM(h,g){return rv(8390656,8,h,g)}function IE(h,g){return nv(2048,8,h,g)}function CM(h,g){return nv(4,2,h,g)}function OM(h,g){return nv(4,4,h,g)}function PM(h,g){if(typeof g=="function")return h=h(),g(h),function(){g(null)};if(g!=null)return h=h(),g.current=h,function(){g.current=null}}function RM(h,g,_){return _=_!=null?_.concat([h]):null,nv(4,4,PM.bind(null,g,h),_)}function FE(){}function IM(h,g){var _=Es();g=g===void 0?null:g;var C=_.memoizedState;return C!==null&&g!==null&&AE(g,C[1])?C[0]:(_.memoizedState=[h,g],h)}function FM(h,g){var _=Es();g=g===void 0?null:g;var C=_.memoizedState;return C!==null&&g!==null&&AE(g,C[1])?C[0]:(h=h(),_.memoizedState=[h,g],h)}function MM(h,g,_){return(td&21)===0?(h.baseState&&(h.baseState=!1,Ai=!0),h.memoizedState=_):(ao(_,g)||(_=lF(),yn.lanes|=_,rd|=_,h.baseState=!0),g)}function hie(h,g){var _=Or;Or=_!==0&&4>_?_:4,h(!0);var C=jE.transition;jE.transition={};try{h(!1),g()}finally{Or=_,jE.transition=C}}function DM(){return Es().memoizedState}function pie(h,g,_){var C=Vc(h);if(_={lane:C,action:_,hasEagerState:!1,eagerState:null,next:null},LM(h))$M(g,_);else if(_=lM(h,g,_,C),_!==null){var D=si();co(_,h,C,D),BM(_,g,C)}}function mie(h,g,_){var C=Vc(h),D={lane:C,action:_,hasEagerState:!1,eagerState:null,next:null};if(LM(h))$M(g,D);else{var z=h.alternate;if(h.lanes===0&&(z===null||z.lanes===0)&&(z=g.lastRenderedReducer,z!==null))try{var ee=g.lastRenderedState,_e=z(ee,_);if(D.hasEagerState=!0,D.eagerState=_e,ao(_e,ee)){var Ne=g.interleaved;Ne===null?(D.next=D,bE(g)):(D.next=Ne.next,Ne.next=D),g.interleaved=D;return}}catch{}finally{}_=lM(h,g,D,C),_!==null&&(D=si(),co(_,h,C,D),BM(_,g,C))}}function LM(h){var g=h.alternate;return h===yn||g!==null&&g===yn}function $M(h,g){qm=tv=!0;var _=h.pending;_===null?g.next=g:(g.next=_.next,_.next=g),h.pending=g}function BM(h,g,_){if((_&4194240)!==0){var C=g.lanes;C&=h.pendingLanes,_|=C,g.lanes=_,FS(h,_)}}var av={readContext:Ss,useCallback:Da,useContext:Da,useEffect:Da,useImperativeHandle:Da,useInsertionEffect:Da,useLayoutEffect:Da,useMemo:Da,useReducer:Da,useRef:Da,useState:Da,useDebugValue:Da,useDeferredValue:Da,useTransition:Da,useMutableSource:Da,useSyncExternalStore:Da,useId:Da,unstable_isNewReconciler:!1},gie={readContext:Ss,useCallback:function(h,g){return zo().memoizedState=[h,g===void 0?null:g],h},useContext:Ss,useEffect:AM,useImperativeHandle:function(h,g,_){return _=_!=null?_.concat([h]):null,rv(4194308,4,PM.bind(null,g,h),_)},useLayoutEffect:function(h,g){return rv(4194308,4,h,g)},useInsertionEffect:function(h,g){return rv(4,2,h,g)},useMemo:function(h,g){var _=zo();return g=g===void 0?null:g,h=h(),_.memoizedState=[h,g],h},useReducer:function(h,g,_){var C=zo();return g=_!==void 0?_(g):g,C.memoizedState=C.baseState=g,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:g},C.queue=h,h=h.dispatch=pie.bind(null,yn,h),[C.memoizedState,h]},useRef:function(h){var g=zo();return h={current:h},g.memoizedState=h},useState:TM,useDebugValue:FE,useDeferredValue:function(h){return zo().memoizedState=h},useTransition:function(){var h=TM(!1),g=h[0];return h=hie.bind(null,h[1]),zo().memoizedState=h,[g,h]},useMutableSource:function(){},useSyncExternalStore:function(h,g,_){var C=yn,D=zo();if(un){if(_===void 0)throw Error(r(407));_=_()}else{if(_=g(),ma===null)throw Error(r(349));(td&30)!==0||_M(C,g,_)}D.memoizedState=_;var z={value:_,getSnapshot:g};return D.queue=z,AM(EM.bind(null,C,z,h),[h]),C.flags|=2048,Gm(9,SM.bind(null,C,z,_,g),void 0,null),_},useId:function(){var h=zo(),g=ma.identifierPrefix;if(un){var _=Pl,C=Ol;_=(C&~(1<<32-Fn(C)-1)).toString(32)+_,g=":"+g+"R"+_,_=Wm++,0<_&&(g+="H"+_.toString(32)),g+=":"}else _=fie++,g=":"+g+"r"+_.toString(32)+":";return h.memoizedState=g},unstable_isNewReconciler:!1},xie={readContext:Ss,useCallback:IM,useContext:Ss,useEffect:IE,useImperativeHandle:RM,useInsertionEffect:CM,useLayoutEffect:OM,useMemo:FM,useReducer:PE,useRef:jM,useState:function(){return PE(Vm)},useDebugValue:FE,useDeferredValue:function(h){var g=Es();return MM(g,Zn.memoizedState,h)},useTransition:function(){var h=PE(Vm)[0],g=Es().memoizedState;return[h,g]},useMutableSource:bM,useSyncExternalStore:wM,useId:DM,unstable_isNewReconciler:!1},yie={readContext:Ss,useCallback:IM,useContext:Ss,useEffect:IE,useImperativeHandle:RM,useInsertionEffect:CM,useLayoutEffect:OM,useMemo:FM,useReducer:RE,useRef:jM,useState:function(){return RE(Vm)},useDebugValue:FE,useDeferredValue:function(h){var g=Es();return Zn===null?g.memoizedState=h:MM(g,Zn.memoizedState,h)},useTransition:function(){var h=RE(Vm)[0],g=Es().memoizedState;return[h,g]},useMutableSource:bM,useSyncExternalStore:wM,useId:DM,unstable_isNewReconciler:!1};function Vf(h,g){try{var _="",C=g;do _+=Y(C),C=C.return;while(C);var D=_}catch(z){D=` 39Error generating stack: `+z.message+` 40`+z.stack}return{value:h,source:g,stack:D,digest:null}}function ME(h,g,_){return{value:h,source:null,stack:_??null,digest:g??null}}function DE(h,g){try{console.error(g.value)}catch(_){setTimeout(function(){throw _})}}var vie=typeof WeakMap=="function"?WeakMap:Map;function UM(h,g,_){_=Il(-1,_),_.tag=3,_.payload={element:null};var C=g.value;return _.callback=function(){dv||(dv=!0,QE=C),DE(h,g)},_}function zM(h,g,_){_=Il(-1,_),_.tag=3;var C=h.type.getDerivedStateFromError;if(typeof C=="function"){var D=g.value;_.payload=function(){return C(D)},_.callback=function(){DE(h,g)}}var z=h.stateNode;return z!==null&&typeof z.componentDidCatch=="function"&&(_.callback=function(){DE(h,g),typeof C!="function"&&(qc===null?qc=new Set([this]):qc.add(this));var ee=g.stack;this.componentDidCatch(g.value,{componentStack:ee!==null?ee:""})}),_}function HM(h,g,_){var C=h.pingCache;if(C===null){C=h.pingCache=new vie;var D=new Set;C.set(g,D)}else D=C.get(g),D===void 0&&(D=new Set,C.set(g,D));D.has(_)||(D.add(_),h=Rie.bind(null,h,g,_),g.then(h,h))}function qM(h){do{var g;if((g=h.tag===13)&&(g=h.memoizedState,g=g!==null?g.dehydrated!==null:!0),g)return h;h=h.return}while(h!==null);return null}function WM(h,g,_,C,D){return(h.mode&1)===0?(h===g?h.flags|=65536:(h.flags|=128,_.flags|=131072,_.flags&=-52805,_.tag===1&&(_.alternate===null?_.tag=17:(g=Il(-1,1),g.tag=2,zc(_,g,1))),_.lanes|=1),h):(h.flags|=65536,h.lanes=D,h)}var bie=j.ReactCurrentOwner,Ai=!1;function ii(h,g,_,C){g.child=h===null?yM(g,null,_,C):qf(g,h.child,_,C)}function VM(h,g,_,C,D){_=_.render;var z=g.ref;return Hf(g,D),C=CE(h,g,_,C,z,D),_=OE(),h!==null&&!Ai?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~D,Fl(h,g,D)):(un&&_&&dE(g),g.flags|=1,ii(h,g,C,D),g.child)}function GM(h,g,_,C,D){if(h===null){var z=_.type;return typeof z=="function"&&!i2(z)&&z.defaultProps===void 0&&_.compare===null&&_.defaultProps===void 0?(g.tag=15,g.type=z,KM(h,g,z,C,D)):(h=xv(_.type,null,C,g,g.mode,D),h.ref=g.ref,h.return=g,g.child=h)}if(z=h.child,(h.lanes&D)===0){var ee=z.memoizedProps;if(_=_.compare,_=_!==null?_:Rm,_(ee,C)&&h.ref===g.ref)return Fl(h,g,D)}return g.flags|=1,h=Kc(z,C),h.ref=g.ref,h.return=g,g.child=h}function KM(h,g,_,C,D){if(h!==null){var z=h.memoizedProps;if(Rm(z,C)&&h.ref===g.ref)if(Ai=!1,g.pendingProps=C=z,(h.lanes&D)!==0)(h.flags&131072)!==0&&(Ai=!0);else return g.lanes=h.lanes,Fl(h,g,D)}return LE(h,g,_,C,D)}function YM(h,g,_){var C=g.pendingProps,D=C.children,z=h!==null?h.memoizedState:null;if(C.mode==="hidden")if((g.mode&1)===0)g.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wr(Kf,Qi),Qi|=_;else{if((_&1073741824)===0)return h=z!==null?z.baseLanes|_:_,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:h,cachePool:null,transitions:null},g.updateQueue=null,Wr(Kf,Qi),Qi|=h,null;g.memoizedState={baseLanes:0,cachePool:null,transitions:null},C=z!==null?z.baseLanes:_,Wr(Kf,Qi),Qi|=C}else z!==null?(C=z.baseLanes|_,g.memoizedState=null):C=_,Wr(Kf,Qi),Qi|=C;return ii(h,g,D,_),g.child}function XM(h,g){var _=g.ref;(h===null&&_!==null||h!==null&&h.ref!==_)&&(g.flags|=512,g.flags|=2097152)}function LE(h,g,_,C,D){var z=ji(_)?Xu:Ma.current;return z=Lf(g,z),Hf(g,D),_=CE(h,g,_,C,z,D),C=OE(),h!==null&&!Ai?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~D,Fl(h,g,D)):(un&&C&&dE(g),g.flags|=1,ii(h,g,_,D),g.child)}function JM(h,g,_,C,D){if(ji(_)){var z=!0;zy(g)}else z=!1;if(Hf(g,D),g.stateNode===null)sv(h,g),pM(g,_,C),SE(g,_,C,D),C=!0;else if(h===null){var ee=g.stateNode,_e=g.memoizedProps;ee.props=_e;var Ne=ee.context,Le=_.contextType;typeof Le=="object"&&Le!==null?Le=Ss(Le):(Le=ji(_)?Xu:Ma.current,Le=Lf(g,Le));var Qe=_.getDerivedStateFromProps,tt=typeof Qe=="function"||typeof ee.getSnapshotBeforeUpdate=="function";tt||typeof ee.UNSAFE_componentWillReceiveProps!="function"&&typeof ee.componentWillReceiveProps!="function"||(_e!==C||Ne!==Le)&&mM(g,ee,C,Le),Uc=!1;var Ye=g.memoizedState;ee.state=Ye,Xy(g,C,ee,D),Ne=g.memoizedState,_e!==C||Ye!==Ne||Ti.current||Uc?(typeof Qe=="function"&&(_E(g,_,Qe,C),Ne=g.memoizedState),(_e=Uc||hM(g,_,_e,C,Ye,Ne,Le))?(tt||typeof ee.UNSAFE_componentWillMount!="function"&&typeof ee.componentWillMount!="function"||(typeof ee.componentWillMount=="function"&&ee.componentWillMount(),typeof ee.UNSAFE_componentWillMount=="function"&&ee.UNSAFE_componentWillMount()),typeof ee.componentDidMount=="function"&&(g.flags|=4194308)):(typeof ee.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=C,g.memoizedState=Ne),ee.props=C,ee.state=Ne,ee.context=Le,C=_e):(typeof ee.componentDidMount=="function"&&(g.flags|=4194308),C=!1)}else{ee=g.stateNode,cM(h,g),_e=g.memoizedProps,Le=g.type===g.elementType?_e:so(g.type,_e),ee.props=Le,tt=g.pendingProps,Ye=ee.context,Ne=_.contextType,typeof Ne=="object"&&Ne!==null?Ne=Ss(Ne):(Ne=ji(_)?Xu:Ma.current,Ne=Lf(g,Ne));var pt=_.getDerivedStateFromProps;(Qe=typeof pt=="function"||typeof ee.getSnapshotBeforeUpdate=="function")||typeof ee.UNSAFE_componentWillReceiveProps!="function"&&typeof ee.componentWillReceiveProps!="function"||(_e!==tt||Ye!==Ne)&&mM(g,ee,C,Ne),Uc=!1,Ye=g.memoizedState,ee.state=Ye,Xy(g,C,ee,D);var wt=g.memoizedState;_e!==tt||Ye!==wt||Ti.current||Uc?(typeof pt=="function"&&(_E(g,_,pt,C),wt=g.memoizedState),(Le=Uc||hM(g,_,Le,C,Ye,wt,Ne)||!1)?(Qe||typeof ee.UNSAFE_componentWillUpdate!="function"&&typeof ee.componentWillUpdate!="function"||(typeof ee.componentWillUpdate=="function"&&ee.componentWillUpdate(C,wt,Ne),typeof ee.UNSAFE_componentWillUpdate=="function"&&ee.UNSAFE_componentWillUpdate(C,wt,Ne)),typeof ee.componentDidUpdate=="function"&&(g.flags|=4),typeof ee.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof ee.componentDidUpdate!="function"||_e===h.memoizedProps&&Ye===h.memoizedState||(g.flags|=4),typeof ee.getSnapshotBeforeUpdate!="function"||_e===h.memoizedProps&&Ye===h.memoizedState||(g.flags|=1024),g.memoizedProps=C,g.memoizedState=wt),ee.props=C,ee.state=wt,ee.context=Ne,C=Le):(typeof ee.componentDidUpdate!="function"||_e===h.memoizedProps&&Ye===h.memoizedState||(g.flags|=4),typeof ee.getSnapshotBeforeUpdate!="function"||_e===h.memoizedProps&&Ye===h.memoizedState||(g.flags|=1024),C=!1)}return $E(h,g,_,C,z,D)}function $E(h,g,_,C,D,z){XM(h,g);var ee=(g.flags&128)!==0;if(!C&&!ee)return D&&tM(g,_,!1),Fl(h,g,z);C=g.stateNode,bie.current=g;var _e=ee&&typeof _.getDerivedStateFromError!="function"?null:C.render();return g.flags|=1,h!==null&&ee?(g.child=qf(g,h.child,null,z),g.child=qf(g,null,_e,z)):ii(h,g,_e,z),g.memoizedState=C.state,D&&tM(g,_,!0),g.child}function QM(h){var g=h.stateNode;g.pendingContext?ZF(h,g.pendingContext,g.pendingContext!==g.context):g.context&&ZF(h,g.context,!1),EE(h,g.containerInfo)}function ZM(h,g,_,C,D){return Uf(),mE(D),g.flags|=256,ii(h,g,_,C),g.child}var BE={dehydrated:null,treeContext:null,retryLane:0};function UE(h){return{baseLanes:h,cachePool:null,transitions:null}}function eD(h,g,_){var C=g.pendingProps,D=xn.current,z=!1,ee=(g.flags&128)!==0,_e;if((_e=ee)||(_e=h!==null&&h.memoizedState===null?!1:(D&2)!==0),_e?(z=!0,g.flags&=-129):(h===null||h.memoizedState!==null)&&(D|=1),Wr(xn,D&1),h===null)return pE(g),h=g.memoizedState,h!==null&&(h=h.dehydrated,h!==null)?((g.mode&1)===0?g.lanes=1:h.data==="$!"?g.lanes=8:g.lanes=1073741824,null):(ee=C.children,h=C.fallback,z?(C=g.mode,z=g.child,ee={mode:"hidden",children:ee},(C&1)===0&&z!==null?(z.childLanes=0,z.pendingProps=ee):z=yv(ee,C,0,null),h=sd(h,C,_,null),z.return=g,h.return=g,z.sibling=h,g.child=z,g.child.memoizedState=UE(_),g.memoizedState=BE,h):zE(g,ee));if(D=h.memoizedState,D!==null&&(_e=D.dehydrated,_e!==null))return wie(h,g,ee,C,_e,D,_);if(z){z=C.fallback,ee=g.mode,D=h.child,_e=D.sibling;var Ne={mode:"hidden",children:C.children};return(ee&1)===0&&g.child!==D?(C=g.child,C.childLanes=0,C.pendingProps=Ne,g.deletions=null):(C=Kc(D,Ne),C.subtreeFlags=D.subtreeFlags&14680064),_e!==null?z=Kc(_e,z):(z=sd(z,ee,_,null),z.flags|=2),z.return=g,C.return=g,C.sibling=z,g.child=C,C=z,z=g.child,ee=h.child.memoizedState,ee=ee===null?UE(_):{baseLanes:ee.baseLanes|_,cachePool:null,transitions:ee.transitions},z.memoizedState=ee,z.childLanes=h.childLanes&~_,g.memoizedState=BE,C}return z=h.child,h=z.sibling,C=Kc(z,{mode:"visible",children:C.children}),(g.mode&1)===0&&(C.lanes=_),C.return=g,C.sibling=null,h!==null&&(_=g.deletions,_===null?(g.deletions=[h],g.flags|=16):_.push(h)),g.child=C,g.memoizedState=null,C}function zE(h,g){return g=yv({mode:"visible",children:g},h.mode,0,null),g.return=h,h.child=g}function iv(h,g,_,C){return C!==null&&mE(C),qf(g,h.child,null,_),h=zE(g,g.pendingProps.children),h.flags|=2,g.memoizedState=null,h}function wie(h,g,_,C,D,z,ee){if(_)return g.flags&256?(g.flags&=-257,C=ME(Error(r(422))),iv(h,g,ee,C)):g.memoizedState!==null?(g.child=h.child,g.flags|=128,null):(z=C.fallback,D=g.mode,C=yv({mode:"visible",children:C.children},D,0,null),z=sd(z,D,ee,null),z.flags|=2,C.return=g,z.return=g,C.sibling=z,g.child=C,(g.mode&1)!==0&&qf(g,h.child,null,ee),g.child.memoizedState=UE(ee),g.memoizedState=BE,z);if((g.mode&1)===0)return iv(h,g,ee,null);if(D.data==="$!"){if(C=D.nextSibling&&D.nextSibling.dataset,C)var _e=C.dgst;return C=_e,z=Error(r(419)),C=ME(z,C,void 0),iv(h,g,ee,C)}if(_e=(ee&h.childLanes)!==0,Ai||_e){if(C=ma,C!==null){switch(ee&-ee){case 4:D=2;break;case 16:D=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:D=32;break;case 536870912:D=268435456;break;default:D=0}D=(D&(C.suspendedLanes|ee))!==0?0:D,D!==0&&D!==z.retryLane&&(z.retryLane=D,Rl(h,D),co(C,h,D,-1))}return a2(),C=ME(Error(r(421))),iv(h,g,ee,C)}return D.data==="$?"?(g.flags|=128,g.child=h.child,g=Iie.bind(null,h),D._reactRetry=g,null):(h=z.treeContext,Ji=Dc(D.nextSibling),Xi=g,un=!0,io=null,h!==null&&(ws[_s++]=Ol,ws[_s++]=Pl,ws[_s++]=Ju,Ol=h.id,Pl=h.overflow,Ju=g),g=zE(g,C.children),g.flags|=4096,g)}function tD(h,g,_){h.lanes|=g;var C=h.alternate;C!==null&&(C.lanes|=g),vE(h.return,g,_)}function HE(h,g,_,C,D){var z=h.memoizedState;z===null?h.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:C,tail:_,tailMode:D}:(z.isBackwards=g,z.rendering=null,z.renderingStartTime=0,z.last=C,z.tail=_,z.tailMode=D)}function rD(h,g,_){var C=g.pendingProps,D=C.revealOrder,z=C.tail;if(ii(h,g,C.children,_),C=xn.current,(C&2)!==0)C=C&1|2,g.flags|=128;else{if(h!==null&&(h.flags&128)!==0)e:for(h=g.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&tD(h,_,g);else if(h.tag===19)tD(h,_,g);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===g)break e;for(;h.sibling===null;){if(h.return===null||h.return===g)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}C&=1}if(Wr(xn,C),(g.mode&1)===0)g.memoizedState=null;else switch(D){case"forwards":for(_=g.child,D=null;_!==null;)h=_.alternate,h!==null&&Zy(h)===null&&(D=_),_=_.sibling;_=D,_===null?(D=g.child,g.child=null):(D=_.sibling,_.sibling=null),HE(g,!1,D,_,z);break;case"backwards":for(_=null,D=g.child,g.child=null;D!==null;){if(h=D.alternate,h!==null&&Zy(h)===null){g.child=D;break}h=D.sibling,D.sibling=_,_=D,D=h}HE(g,!0,_,null,z);break;case"together":HE(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function sv(h,g){(g.mode&1)===0&&h!==null&&(h.alternate=null,g.alternate=null,g.flags|=2)}function Fl(h,g,_){if(h!==null&&(g.dependencies=h.dependencies),rd|=g.lanes,(_&g.childLanes)===0)return null;if(h!==null&&g.child!==h.child)throw Error(r(153));if(g.child!==null){for(h=g.child,_=Kc(h,h.pendingProps),g.child=_,_.return=g;h.sibling!==null;)h=h.sibling,_=_.sibling=Kc(h,h.pendingProps),_.return=g;_.sibling=null}return g.child}function _ie(h,g,_){switch(g.tag){case 3:QM(g),Uf();break;case 5:vM(g);break;case 1:ji(g.type)&&zy(g);break;case 4:EE(g,g.stateNode.containerInfo);break;case 10:var C=g.type._context,D=g.memoizedProps.value;Wr(Gy,C._currentValue),C._currentValue=D;break;case 13:if(C=g.memoizedState,C!==null)return C.dehydrated!==null?(Wr(xn,xn.current&1),g.flags|=128,null):(_&g.child.childLanes)!==0?eD(h,g,_):(Wr(xn,xn.current&1),h=Fl(h,g,_),h!==null?h.sibling:null);Wr(xn,xn.current&1);break;case 19:if(C=(_&g.childLanes)!==0,(h.flags&128)!==0){if(C)return rD(h,g,_);g.flags|=128}if(D=g.memoizedState,D!==null&&(D.rendering=null,D.tail=null,D.lastEffect=null),Wr(xn,xn.current),C)break;return null;case 22:case 23:return g.lanes=0,YM(h,g,_)}return Fl(h,g,_)}var nD,qE,aD,iD;nD=function(h,g){for(var _=g.child;_!==null;){if(_.tag===5||_.tag===6)h.appendChild(_.stateNode);else if(_.tag!==4&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===g)break;for(;_.sibling===null;){if(_.return===null||_.return===g)return;_=_.return}_.sibling.return=_.return,_=_.sibling}},qE=function(){},aD=function(h,g,_,C){var D=h.memoizedProps;if(D!==C){h=g.stateNode,ed(Uo.current);var z=null;switch(_){case"input":D=pe(h,D),C=pe(h,C),z=[];break;case"select":D=F({},D,{value:void 0}),C=F({},C,{value:void 0}),z=[];break;case"textarea":D=Je(h,D),C=Je(h,C),z=[];break;default:typeof D.onClick!="function"&&typeof C.onClick=="function"&&(h.onclick=$y)}Pt(_,C);var ee;_=null;for(Le in D)if(!C.hasOwnProperty(Le)&&D.hasOwnProperty(Le)&&D[Le]!=null)if(Le==="style"){var _e=D[Le];for(ee in _e)_e.hasOwnProperty(ee)&&(_||(_={}),_[ee]="")}else Le!=="dangerouslySetInnerHTML"&&Le!=="children"&&Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&Le!=="autoFocus"&&(a.hasOwnProperty(Le)?z||(z=[]):(z=z||[]).push(Le,null));for(Le in C){var Ne=C[Le];if(_e=D!=null?D[Le]:void 0,C.hasOwnProperty(Le)&&Ne!==_e&&(Ne!=null||_e!=null))if(Le==="style")if(_e){for(ee in _e)!_e.hasOwnProperty(ee)||Ne&&Ne.hasOwnProperty(ee)||(_||(_={}),_[ee]="");for(ee in Ne)Ne.hasOwnProperty(ee)&&_e[ee]!==Ne[ee]&&(_||(_={}),_[ee]=Ne[ee])}else _||(z||(z=[]),z.push(Le,_)),_=Ne;else Le==="dangerouslySetInnerHTML"?(Ne=Ne?Ne.__html:void 0,_e=_e?_e.__html:void 0,Ne!=null&&_e!==Ne&&(z=z||[]).push(Le,Ne)):Le==="children"?typeof Ne!="string"&&typeof Ne!="number"||(z=z||[]).push(Le,""+Ne):Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&(a.hasOwnProperty(Le)?(Ne!=null&&Le==="onScroll"&&en("scroll",h),z||_e===Ne||(z=[])):(z=z||[]).push(Le,Ne))}_&&(z=z||[]).push("style",_);var Le=z;(g.updateQueue=Le)&&(g.flags|=4)}},iD=function(h,g,_,C){_!==C&&(g.flags|=4)};function Km(h,g){if(!un)switch(h.tailMode){case"hidden":g=h.tail;for(var _=null;g!==null;)g.alternate!==null&&(_=g),g=g.sibling;_===null?h.tail=null:_.sibling=null;break;case"collapsed":_=h.tail;for(var C=null;_!==null;)_.alternate!==null&&(C=_),_=_.sibling;C===null?g||h.tail===null?h.tail=null:h.tail.sibling=null:C.sibling=null}}function La(h){var g=h.alternate!==null&&h.alternate.child===h.child,_=0,C=0;if(g)for(var D=h.child;D!==null;)_|=D.lanes|D.childLanes,C|=D.subtreeFlags&14680064,C|=D.flags&14680064,D.return=h,D=D.sibling;else for(D=h.child;D!==null;)_|=D.lanes|D.childLanes,C|=D.subtreeFlags,C|=D.flags,D.return=h,D=D.sibling;return h.subtreeFlags|=C,h.childLanes=_,g}function Sie(h,g,_){var C=g.pendingProps;switch(fE(g),g.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return La(g),null;case 1:return ji(g.type)&&Uy(),La(g),null;case 3:return C=g.stateNode,Wf(),tn(Ti),tn(Ma),TE(),C.pendingContext&&(C.context=C.pendingContext,C.pendingContext=null),(h===null||h.child===null)&&(Vy(g)?g.flags|=4:h===null||h.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,io!==null&&(t2(io),io=null))),qE(h,g),La(g),null;case 5:kE(g);var D=ed(Hm.current);if(_=g.type,h!==null&&g.stateNode!=null)aD(h,g,_,C,D),h.ref!==g.ref&&(g.flags|=512,g.flags|=2097152);else{if(!C){if(g.stateNode===null)throw Error(r(166));return La(g),null}if(h=ed(Uo.current),Vy(g)){C=g.stateNode,_=g.type;var z=g.memoizedProps;switch(C[Bo]=g,C[Lm]=z,h=(g.mode&1)!==0,_){case"dialog":en("cancel",C),en("close",C);break;case"iframe":case"object":case"embed":en("load",C);break;case"video":case"audio":for(D=0;D<Fm.length;D++)en(Fm[D],C);break;case"source":en("error",C);break;case"img":case"image":case"link":en("error",C),en("load",C);break;case"details":en("toggle",C);break;case"input":Se(C,z),en("invalid",C);break;case"select":C._wrapperState={wasMultiple:!!z.multiple},en("invalid",C);break;case"textarea":Ze(C,z),en("invalid",C)}Pt(_,z),D=null;for(var ee in z)if(z.hasOwnProperty(ee)){var _e=z[ee];ee==="children"?typeof _e=="string"?C.textContent!==_e&&(z.suppressHydrationWarning!==!0&&Ly(C.textContent,_e,h),D=["children",_e]):typeof _e=="number"&&C.textContent!==""+_e&&(z.suppressHydrationWarning!==!0&&Ly(C.textContent,_e,h),D=["children",""+_e]):a.hasOwnProperty(ee)&&_e!=null&&ee==="onScroll"&&en("scroll",C)}switch(_){case"input":ce(C),we(C,z,!0);break;case"textarea":ce(C),ve(C);break;case"select":case"option":break;default:typeof z.onClick=="function"&&(C.onclick=$y)}C=D,g.updateQueue=C,C!==null&&(g.flags|=4)}else{ee=D.nodeType===9?D:D.ownerDocument,h==="http://www.w3.org/1999/xhtml"&&(h=J(_)),h==="http://www.w3.org/1999/xhtml"?_==="script"?(h=ee.createElement("div"),h.innerHTML="<script><\/script>
40",h=h.removeChild(h.firstChild)):typeof C.is=="string"?h=ee.createElement(_,{is:C.is}):(h=ee.createElement(_),_==="select"&&(ee=h,C.multiple?ee.multiple=!0:C.size&&(ee.size=C.size))):h=ee.createElementNS(h,_),h[Bo]=g,h[Lm]=C,nD(h,g,!1,!1),g.stateNode=h;e:{switch(ee=_r(_,C),_){case"dialog":en("cancel",h),en("close",h),D=C;break;case"iframe":case"object":case"embed":en("load",h),D=C;break;case"video":case"audio":for(D=0;D<Fm.length;D++)en(Fm[D],h);D=C;break;case"source":en("error",h),D=C;break;case"img":case"image":case"link":en("error",h),en("load",h),D=C;break;case"details":en("toggle",h),D=C;break;case"input":Se(h,C),D=pe(h,C),en("invalid",h);break;case"option":D=C;break;case"select":h._wrapperState={wasMultiple:!!C.multiple},D=F({},C,{value:void 0}),en("invalid",h);break;case"textarea":Ze(h,C),D=Je(h,C),en("invalid",h);break;default:D=C}Pt(_,D),_e=D;for(z in _e)if(_e.hasOwnProperty(z)){var Ne=_e[z];z==="style"?xt(h,Ne):z==="dangerouslySetInnerHTML"?(Ne=Ne?Ne.__html:void 0,Ne!=null&&Me(h,Ne)):z==="children"?typeof Ne=="string"?(_!=="textarea"||Ne!=="")&&Ae(h,Ne):typeof Ne=="number"&&Ae(h,""+Ne):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(a.hasOwnProperty(z)?Ne!=null&&z==="onScroll"&&en("scroll",h):Ne!=null&&S(h,z,Ne,ee))}switch(_){case"input":ce(h),we(h,C,!1);break;case"textarea":ce(h),ve(h);break;case"option":C.value!=null&&h.setAttribute("value",""+ue(C.value));break;case"select":h.multiple=!!C.multiple,z=C.value,z!=null?Ue(h,!!C.multiple,z,!1):C.defaultValue!=null&&Ue(h,!!C.multiple,C.defaultValue,!0);break;default:typeof D.onClick=="function"&&(h.onclick=$y)}switch(_){case"button":case"input":case"select":case"textarea":C=!!C.autoFocus;break e;case"img":C=!0;break e;default:C=!1}}C&&(g.flags|=4)}g.ref!==null&&(g.flags|=512,g.flags|=2097152)}return La(g),null;case 6:if(h&&g.stateNode!=null)iD(h,g,h.memoizedProps,C);else{if(typeof C!="string"&&g.stateNode===null)throw Error(r(166));if(_=ed(Hm.current),ed(Uo.current),Vy(g)){if(C=g.stateNode,_=g.memoizedProps,C[Bo]=g,(z=C.nodeValue!==_)&&(h=Xi,h!==null))switch(h.tag){case 3:Ly(C.nodeValue,_,(h.mode&1)!==0);break;case 5:h.memoizedProps.suppressHydrationWarning!==!0&&Ly(C.nodeValue,_,(h.mode&1)!==0)}z&&(g.flags|=4)}else C=(_.nodeType===9?_:_.ownerDocument).createTextNode(C),C[Bo]=g,g.stateNode=C}return La(g),null;case 13:if(tn(xn),C=g.memoizedState,h===null||h.memoizedState!==null&&h.memoizedState.dehydrated!==null){if(un&&Ji!==null&&(g.mode&1)!==0&&(g.flags&128)===0)oM(),Uf(),g.flags|=98560,z=!1;else if(z=Vy(g),C!==null&&C.dehydrated!==null){if(h===null){if(!z)throw Error(r(318));if(z=g.memoizedState,z=z!==null?z.dehydrated:null,!z)throw Error(r(317));z[Bo]=g}else Uf(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;La(g),z=!1}else io!==null&&(t2(io),io=null),z=!0;if(!z)return g.flags&65536?g:null}return(g.flags&128)!==0?(g.lanes=_,g):(C=C!==null,C!==(h!==null&&h.memoizedState!==null)&&C&&(g.child.flags|=8192,(g.mode&1)!==0&&(h===null||(xn.current&1)!==0?ea===0&&(ea=3):a2())),g.updateQueue!==null&&(g.flags|=4),La(g),null);case 4:return Wf(),qE(h,g),h===null&&Mm(g.stateNode.containerInfo),La(g),null;case 10:return yE(g.type._context),La(g),null;case 17:return ji(g.type)&&Uy(),La(g),null;case 19:if(tn(xn),z=g.memoizedState,z===null)return La(g),null;if(C=(g.flags&128)!==0,ee=z.rendering,ee===null)if(C)Km(z,!1);else{if(ea!==0||h!==null&&(h.flags&128)!==0)for(h=g.child;h!==null;){if(ee=Zy(h),ee!==null){for(g.flags|=128,Km(z,!1),C=ee.updateQueue,C!==null&&(g.updateQueue=C,g.flags|=4),g.subtreeFlags=0,C=_,_=g.child;_!==null;)z=_,h=C,z.flags&=14680066,ee=z.alternate,ee===null?(z.childLanes=0,z.lanes=h,z.child=null,z.subtreeFlags=0,z.memoizedProps=null,z.memoizedState=null,z.updateQueue=null,z.dependencies=null,z.stateNode=null):(z.childLanes=ee.childLanes,z.lanes=ee.lanes,z.child=ee.child,z.subtreeFlags=0,z.deletions=null,z.memoizedProps=ee.memoizedProps,z.memoizedState=ee.memoizedState,z.updateQueue=ee.updateQueue,z.type=ee.type,h=ee.dependencies,z.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),_=_.sibling;return Wr(xn,xn.current&1|2),g.child}h=h.sibling}z.tail!==null&&nt()>Yf&&(g.flags|=128,C=!0,Km(z,!1),g.lanes=4194304)}else{if(!C)if(h=Zy(ee),h!==null){if(g.flags|=128,C=!0,_=h.updateQueue,_!==null&&(g.updateQueue=_,g.flags|=4),Km(z,!0),z.tail===null&&z.tailMode==="hidden"&&!ee.alternate&&!un)return La(g),null}else 2*nt()-z.renderingStartTime>Yf&&_!==1073741824&&(g.flags|=128,C=!0,Km(z,!1),g.lanes=4194304);z.isBackwards?(ee.sibling=g.child,g.child=ee):(_=z.last,_!==null?_.sibling=ee:g.child=ee,z.last=ee)}return z.tail!==null?(g=z.tail,z.rendering=g,z.tail=g.sibling,z.renderingStartTime=nt(),g.sibling=null,_=xn.current,Wr(xn,C?_&1|2:_&1),g):(La(g),null);case 22:case 23:return n2(),C=g.memoizedState!==null,h!==null&&h.memoizedState!==null!==C&&(g.flags|=8192),C&&(g.mode&1)!==0?(Qi&1073741824)!==0&&(La(g),g.subtreeFlags&6&&(g.flags|=8192)):La(g),null;case 24:return null;case 25:return null}throw Error(r(156,g.tag))}function Eie(h,g){switch(fE(g),g.tag){case 1:return ji(g.type)&&Uy(),h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 3:return Wf(),tn(Ti),tn(Ma),TE(),h=g.flags,(h&65536)!==0&&(h&128)===0?(g.flags=h&-65537|128,g):null;case 5:return kE(g),null;case 13:if(tn(xn),h=g.memoizedState,h!==null&&h.dehydrated!==null){if(g.alternate===null)throw Error(r(340));Uf()}return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 19:return tn(xn),null;case 4:return Wf(),null;case 10:return yE(g.type._context),null;case 22:case 23:return n2(),null;case 24:return null;default:return null}}var ov=!1,$a=!1,kie=typeof WeakSet=="function"?WeakSet:Set,yt=null;function Gf(h,g){var _=h.ref;if(_!==null)if(typeof _=="function")try{_(null)}catch(C){En(h,g,C)}else _.current=null}function WE(h,g,_){try{_()}catch(C){En(h,g,C)}}var sD=!1;function Nie(h,g){if(nE=Ty,h=DF(),YS(h)){if("selectionStart"in h)var _={start:h.selectionStart,end:h.selectionEnd};else e:{_=(_=h.ownerDocument)&&_.defaultView||window;var C=_.getSelection&&_.getSelection();if(C&&C.rangeCount!==0){_=C.anchorNode;var D=C.anchorOffset,z=C.focusNode;C=C.focusOffset;try{_.nodeType,z.nodeType}catch{_=null;break e}var ee=0,_e=-1,Ne=-1,Le=0,Qe=0,tt=h,Ye=null;t:for(;;){for(var pt;tt!==_||D!==0&&tt.nodeType!==3||(_e=ee+D),tt!==z||C!==0&&tt.nodeType!==3||(Ne=ee+C),tt.nodeType===3&&(ee+=tt.nodeValue.length),(pt=tt.firstChild)!==null;)Ye=tt,tt=pt;for(;;){if(tt===h)break t;if(Ye===_&&++Le===D&&(_e=ee),Ye===z&&++Qe===C&&(Ne=ee),(pt=tt.nextSibling)!==null)break;tt=Ye,Ye=tt.parentNode}tt=pt}
vendor: 16,830 bytes, line 40
40_=_e===-1||Ne===-1?null:{start:_e,end:Ne}}else _=null}_=_||{start:0,end:0}}else _=null;for(aE={focusedElem:h,selectionRange:_},Ty=!1,yt=g;yt!==null;)if(g=yt,h=g.child,(g.subtreeFlags&1028)!==0&&h!==null)h.return=g,yt=h;else for(;yt!==null;){g=yt;try{var wt=g.alternate;if((g.flags&1024)!==0)switch(g.tag){case 0:case 11:case 15:break;case 1:if(wt!==null){var Et=wt.memoizedProps,Mn=wt.memoizedState,je=g.stateNode,Te=je.getSnapshotBeforeUpdate(g.elementType===g.type?Et:so(g.type,Et),Mn);je.__reactInternalSnapshotBeforeUpdate=Te}break;case 3:var Pe=g.stateNode.containerInfo;Pe.nodeType===1?Pe.textContent="":Pe.nodeType===9&&Pe.documentElement&&Pe.removeChild(Pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ot){En(g,g.return,ot)}if(h=g.sibling,h!==null){h.return=g.return,yt=h;break}yt=g.return}return wt=sD,sD=!1,wt}function Ym(h,g,_){var C=g.updateQueue;if(C=C!==null?C.lastEffect:null,C!==null){var D=C=C.next;do{if((D.tag&h)===h){var z=D.destroy;D.destroy=void 0,z!==void 0&&WE(g,_,z)}D=D.next}while(D!==C)}}function lv(h,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var _=g=g.next;do{if((_.tag&h)===h){var C=_.create;_.destroy=C()}_=_.next}while(_!==g)}}function VE(h){var g=h.ref;if(g!==null){var _=h.stateNode;switch(h.tag){case 5:h=_;break;default:h=_}typeof g=="function"?g(h):g.current=h}}function oD(h){var g=h.alternate;g!==null&&(h.alternate=null,oD(g)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(g=h.stateNode,g!==null&&(delete g[Bo],delete g[Lm],delete g[lE],delete g[lie],delete g[cie])),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function lD(h){return h.tag===5||h.tag===3||h.tag===4}function cD(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||lD(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function GE(h,g,_){var C=h.tag;if(C===5||C===6)h=h.stateNode,g?_.nodeType===8?_.parentNode.insertBefore(h,g):_.insertBefore(h,g):(_.nodeType===8?(g=_.parentNode,g.insertBefore(h,_)):(g=_,g.appendChild(h)),_=_._reactRootContainer,_!=null||g.onclick!==null||(g.onclick=$y));else if(C!==4&&(h=h.child,h!==null))for(GE(h,g,_),h=h.sibling;h!==null;)GE(h,g,_),h=h.sibling}function KE(h,g,_){var C=h.tag;if(C===5||C===6)h=h.stateNode,g?_.insertBefore(h,g):_.appendChild(h);else if(C!==4&&(h=h.child,h!==null))for(KE(h,g,_),h=h.sibling;h!==null;)KE(h,g,_),h=h.sibling}var Na=null,oo=!1;function Hc(h,g,_){for(_=_.child;_!==null;)uD(h,g,_),_=_.sibling}function uD(h,g,_){if(ha&&typeof ha.onCommitFiberUnmount=="function")try{ha.onCommitFiberUnmount($o,_)}catch{}switch(_.tag){case 5:$a||Gf(_,g);case 6:var C=Na,D=oo;Na=null,Hc(h,g,_),Na=C,oo=D,Na!==null&&(oo?(h=Na,_=_.stateNode,h.nodeType===8?h.parentNode.removeChild(_):h.removeChild(_)):Na.removeChild(_.stateNode));break;case 18:Na!==null&&(oo?(h=Na,_=_.stateNode,h.nodeType===8?oE(h.parentNode,_):h.nodeType===1&&oE(h,_),Tm(h)):oE(Na,_.stateNode));break;case 4:C=Na,D=oo,Na=_.stateNode.containerInfo,oo=!0,Hc(h,g,_),Na=C,oo=D;break;case 0:case 11:case 14:case 15:if(!$a&&(C=_.updateQueue,C!==null&&(C=C.lastEffect,C!==null))){D=C=C.next;do{var z=D,ee=z.destroy;z=z.tag,ee!==void 0&&((z&2)!==0||(z&4)!==0)&&WE(_,g,ee),D=D.next}while(D!==C)}Hc(h,g,_);break;case 1:if(!$a&&(Gf(_,g),C=_.stateNode,typeof C.componentWillUnmount=="function"))try{C.props=_.memoizedProps,C.state=_.memoizedState,C.componentWillUnmount()}catch(_e){En(_,g,_e)}Hc(h,g,_);break;case 21:Hc(h,g,_);break;case 22:_.mode&1?($a=(C=$a)||_.memoizedState!==null,Hc(h,g,_),$a=C):Hc(h,g,_);break;default:Hc(h,g,_)}}function dD(h){var g=h.updateQueue;if(g!==null){h.updateQueue=null;var _=h.stateNode;_===null&&(_=h.stateNode=new kie),g.forEach(function(C){var D=Fie.bind(null,h,C);_.has(C)||(_.add(C),C.then(D,D))})}}function lo(h,g){var _=g.deletions;if(_!==null)for(var C=0;C<_.length;C++){var D=_[C];try{var z=h,ee=g,_e=ee;e:for(;_e!==null;){switch(_e.tag){case 5:Na=_e.stateNode,oo=!1;break e;case 3:Na=_e.stateNode.containerInfo,oo=!0;break e;case 4:Na=_e.stateNode.containerInfo,oo=!0;break e}_e=_e.return}if(Na===null)throw Error(r(160));uD(z,ee,D),Na=null,oo=!1;var Ne=D.alternate;Ne!==null&&(Ne.return=null),D.return=null}catch(Le){En(D,g,Le)}}if(g.subtreeFlags&12854)for(g=g.child;g!==null;)fD(g,h),g=g.sibling}function fD(h,g){var _=h.alternate,C=h.flags;switch(h.tag){case 0:case 11:case 14:case 15:if(lo(g,h),Ho(h),C&4){try{Ym(3,h,h.return),lv(3,h)}catch(Et){En(h,h.return,Et)}try{Ym(5,h,h.return)}catch(Et){En(h,h.return,Et)}}break;case 1:lo(g,h),Ho(h),C&512&&_!==null&&Gf(_,_.return);break;case 5:if(lo(g,h),Ho(h),C&512&&_!==null&&Gf(_,_.return),h.flags&32){var D=h.stateNode;try{Ae(D,"")}catch(Et){En(h,h.return,Et)}}if(C&4&&(D=h.stateNode,D!=null)){var z=h.memoizedProps,ee=_!==null?_.memoizedProps:z,_e=h.type,Ne=h.updateQueue;if(h.updateQueue=null,Ne!==null)try{_e==="input"&&z.type==="radio"&&z.name!=null&&he(D,z),_r(_e,ee);var Le=_r(_e,z);for(ee=0;ee<Ne.length;ee+=2){var Qe=Ne[ee],tt=Ne[ee+1];Qe==="style"?xt(D,tt):Qe==="dangerouslySetInnerHTML"?Me(D,tt):Qe==="children"?Ae(D,tt):S(D,Qe,tt,Le)}switch(_e){case"input":ie(D,z);break;case"textarea":te(D,z);break;case"select":var Ye=D._wrapperState.wasMultiple;D._wrapperState.wasMultiple=!!z.multiple;var pt=z.value;pt!=null?Ue(D,!!z.multiple,pt,!1):Ye!==!!z.multiple&&(z.defaultValue!=null?Ue(D,!!z.multiple,z.defaultValue,!0):Ue(D,!!z.multiple,z.multiple?[]:"",!1))}D[Lm]=z}catch(Et){En(h,h.return,Et)}}break;case 6:if(lo(g,h),Ho(h),C&4){if(h.stateNode===null)throw Error(r(162));D=h.stateNode,z=h.memoizedProps;try{D.nodeValue=z}catch(Et){En(h,h.return,Et)}}break;case 3:if(lo(g,h),Ho(h),C&4&&_!==null&&_.memoizedState.isDehydrated)try{Tm(g.containerInfo)}catch(Et){En(h,h.return,Et)}break;case 4:lo(g,h),Ho(h);break;case 13:lo(g,h),Ho(h),D=h.child,D.flags&8192&&(z=D.memoizedState!==null,D.stateNode.isHidden=z,!z||D.alternate!==null&&D.alternate.memoizedState!==null||(JE=nt())),C&4&&dD(h);break;case 22:if(Qe=_!==null&&_.memoizedState!==null,h.mode&1?($a=(Le=$a)||Qe,lo(g,h),$a=Le):lo(g,h),Ho(h),C&8192){if(Le=h.memoizedState!==null,(h.stateNode.isHidden=Le)&&!Qe&&(h.mode&1)!==0)for(yt=h,Qe=h.child;Qe!==null;){for(tt=yt=Qe;yt!==null;){switch(Ye=yt,pt=Ye.child,Ye.tag){case 0:case 11:case 14:case 15:Ym(4,Ye,Ye.return);break;case 1:Gf(Ye,Ye.return);var wt=Ye.stateNode;if(typeof wt.componentWillUnmount=="function"){C=Ye,_=Ye.return;try{g=C,wt.props=g.memoizedProps,wt.state=g.memoizedState,wt.componentWillUnmount()}catch(Et){En(C,_,Et)}}break;case 5:Gf(Ye,Ye.return);break;case 22:if(Ye.memoizedState!==null){mD(tt);continue}}pt!==null?(pt.return=Ye,yt=pt):mD(tt)}Qe=Qe.sibling}e:for(Qe=null,tt=h;;){if(tt.tag===5){if(Qe===null){Qe=tt;try{D=tt.stateNode,Le?(z=D.style,typeof z.setProperty=="function"?z.setProperty("display","none","important"):z.display="none"):(_e=tt.stateNode,Ne=tt.memoizedProps.style,ee=Ne!=null&&Ne.hasOwnProperty("display")?Ne.display:null,_e.style.display=Ce("display",ee))}catch(Et){En(h,h.return,Et)}}}else if(tt.tag===6){if(Qe===null)try{tt.stateNode.nodeValue=Le?"":tt.memoizedProps}catch(Et){En(h,h.return,Et)}}else if((tt.tag!==22&&tt.tag!==23||tt.memoizedState===null||tt===h)&&tt.child!==null){tt.child.return=tt,tt=tt.child;continue}if(tt===h)break e;for(;tt.sibling===null;){if(tt.return===null||tt.return===h)break e;Qe===tt&&(Qe=null),tt=tt.return}Qe===tt&&(Qe=null),tt.sibling.return=tt.return,tt=tt.sibling}}break;case 19:lo(g,h),Ho(h),C&4&&dD(h);break;case 21:break;default:lo(g,h),Ho(h)}}function Ho(h){var g=h.flags;if(g&2){try{e:{for(var _=h.return;_!==null;){if(lD(_)){var C=_;break e}_=_.return}throw Error(r(160))}switch(C.tag){case 5:var D=C.stateNode;C.flags&32&&(Ae(D,""),C.flags&=-33);var z=cD(h);KE(h,z,D);break;case 3:case 4:var ee=C.stateNode.containerInfo,_e=cD(h);GE(h,_e,ee);break;default:throw Error(r(161))}}catch(Ne){En(h,h.return,Ne)}h.flags&=-3}g&4096&&(h.flags&=-4097)}function Tie(h,g,_){yt=h,hD(h)}function hD(h,g,_){for(var C=(h.mode&1)!==0;yt!==null;){var D=yt,z=D.child;if(D.tag===22&&C){var ee=D.memoizedState!==null||ov;if(!ee){var _e=D.alternate,Ne=_e!==null&&_e.memoizedState!==null||$a;_e=ov;var Le=$a;if(ov=ee,($a=Ne)&&!Le)for(yt=D;yt!==null;)ee=yt,Ne=ee.child,ee.tag===22&&ee.memoizedState!==null?gD(D):Ne!==null?(Ne.return=ee,yt=Ne):gD(D);for(;z!==null;)yt=z,hD(z),z=z.sibling;yt=D,ov=_e,$a=Le}pD(h)}else(D.subtreeFlags&8772)!==0&&z!==null?(z.return=D,yt=z):pD(h)}}function pD(h){for(;yt!==null;){var g=yt;if((g.flags&8772)!==0){var _=g.alternate;try{if((g.flags&8772)!==0)switch(g.tag){case 0:case 11:case 15:$a||lv(5,g);break;case 1:var C=g.stateNode;if(g.flags&4&&!$a)if(_===null)C.componentDidMount();else{var D=g.elementType===g.type?_.memoizedProps:so(g.type,_.memoizedProps);C.componentDidUpdate(D,_.memoizedState,C.__reactInternalSnapshotBeforeUpdate)}var z=g.updateQueue;z!==null&&dM(g,z,C);break;case 3:var ee=g.updateQueue;if(ee!==null){if(_=null,g.child!==null)switch(g.child.tag){case 5:_=g.child.stateNode;break;case 1:_=g.child.stateNode}dM(g,ee,_)}break;case 5:var _e=g.stateNode;if(_===null&&g.flags&4){_=_e;var Ne=g.memoizedProps;switch(g.type){case"button":case"input":case"select":case"textarea":Ne.autoFocus&&_.focus();break;case"img":Ne.src&&(_.src=Ne.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(g.memoizedState===null){var Le=g.alternate;if(Le!==null){var Qe=Le.memoizedState;if(Qe!==null){var tt=Qe.dehydrated;tt!==null&&Tm(tt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}$a||g.flags&512&&VE(g)}catch(Ye){En(g,g.return,Ye)}}if(g===h){yt=null;break}if(_=g.sibling,_!==null){_.return=g.return,yt=_;break}yt=g.return}}function mD(h){for(;yt!==null;){var g=yt;if(g===h){yt=null;break}var _=g.sibling;if(_!==null){_.return=g.return,yt=_;break}yt=g.return}}function gD(h){for(;yt!==null;){var g=yt;try{switch(g.tag){case 0:case 11:case 15:var _=g.return;try{lv(4,g)}catch(Ne){En(g,_,Ne)}break;case 1:var C=g.stateNode;if(typeof C.componentDidMount=="function"){var D=g.return;try{C.componentDidMount()}catch(Ne){En(g,D,Ne)}}var z=g.return;try{VE(g)}catch(Ne){En(g,z,Ne)}break;case 5:var ee=g.return;try{VE(g)}catch(Ne){En(g,ee,Ne)}}}catch(Ne){En(g,g.return,Ne)}if(g===h){yt=null;break}var _e=g.sibling;if(_e!==null){_e.return=g.return,yt=_e;break}yt=g.return}}var jie=Math.ceil,cv=j.ReactCurrentDispatcher,YE=j.ReactCurrentOwner,ks=j.ReactCurrentBatchConfig,yr=0,ma=null,qn=null,Ta=0,Qi=0,Kf=Lc(0),ea=0,Xm=null,rd=0,uv=0,XE=0,Jm=null,Ci=null,JE=0,Yf=1/0,Ml=null,dv=!1,QE=null,qc=null,fv=!1,Wc=null,hv=0,Qm=0,ZE=null,pv=-1,mv=0;function si(){return(yr&6)!==0?nt():pv!==-1?pv:pv=nt()}function Vc(h){return(h.mode&1)===0?1:(yr&2)!==0&&Ta!==0?Ta&-Ta:die.transition!==null?(mv===0&&(mv=lF()),mv):(h=Or,h!==0||(h=window.event,h=h===void 0?16:xF(h.type)),h)}function co(h,g,_,C){if(50<Qm)throw Qm=0,ZE=null,Error(r(185));_m(h,_,C),((yr&2)===0||h!==ma)&&(h===ma&&((yr&2)===0&&(uv|=_),ea===4&&Gc(h,Ta)),Oi(h,C),_===1&&yr===0&&(g.mode&1)===0&&(Yf=nt()+500,Hy&&Bc()))}function Oi(h,g){var _=h.callbackNode;dae(h,g);var C=Ey(h,h===ma?Ta:0);if(C===0)_!==null&&dt(_),h.callbackNode=null,h.callbackPriority=0;else if(g=C&-C,h.callbackPriority!==g){if(_!=null&&dt(_),g===1)h.tag===0?uie(yD.bind(null,h)):rM(yD.bind(null,h)),sie(function(){(yr&6)===0&&Bc()}),_=null;else{switch(cF(C)){case 1:_=$r;break;case 4:_=qr;break;case 16:_=In;break;case 536870912:_=Cc;break;default:_=In}_=ND(_,xD.bind(null,h))}h.callbackPriority=g,h.callbackNode=_}}function xD(h,g){if(pv=-1,mv=0,(yr&6)!==0)throw Error(r(327));var _=h.callbackNode;if(Xf()&&h.callbackNode!==_)return null;var C=Ey(h,h===ma?Ta:0);if(C===0)return null;if((C&30)!==0||(C&h.expiredLanes)!==0||g)g=gv(h,C);else{g=C;var D=yr;yr|=2;var z=bD();(ma!==h||Ta!==g)&&(Ml=null,Yf=nt()+500,ad(h,g));do try{Oie();break}catch(_e){vD(h,_e)}while(!0);xE(),cv.current=z,yr=D,qn!==null?g=0:(ma=null,Ta=0,g=ea)}if(g!==0){if(g===2&&(D=RS(h),D!==0&&(C=D,g=e2(h,D))),g===1)throw _=Xm,ad(h,0),Gc(h,C),Oi(h,nt()),_;if(g===6)Gc(h,C);else{if(D=h.current.alternate,(C&30)===0&&!Aie(D)&&(g=gv(h,C),g===2&&(z=RS(h),z!==0&&(C=z,g=e2(h,z))),g===1))throw _=Xm,ad(h,0),Gc(h,C),Oi(h,nt()),_;switch(h.finishedWork=D,h.finishedLanes=C,g){case 0:case 1:throw Error(r(345));case 2:id(h,Ci,Ml);break;case 3:if(Gc(h,C),(C&130023424)===C&&(g=JE+500-nt(),10<g)){if(Ey(h,0)!==0)break;if(D=h.suspendedLanes,(D&C)!==C){si(),h.pingedLanes|=h.suspendedLanes&D;break}h.timeoutHandle=sE(id.bind(null,h,Ci,Ml),g);break}id(h,Ci,Ml);break;case 4:if(Gc(h,C),(C&4194240)===C)break;for(g=h.eventTimes,D=-1;0<C;){var ee=31-Fn(C);z=1<<ee,ee=g[ee],ee>D&&(D=ee),C&=~z}if(C=D,C=nt()-C,C=(120>C?120:480>C?480:1080>C?1080:1920>C?1920:3e3>C?3e3:4320>C?4320:1960*jie(C/1960))-C,10<C){h.timeoutHandle=sE(id.bind(null,h,Ci,Ml),C);break}id(h,Ci,Ml);break;case 5:id(h,Ci,Ml);break;default:throw Error(r(329))}}}return Oi(h,nt()),h.callbackNode===_?xD.bind(null,h):null}function e2(h,g){var _=Jm;return h.current.memoizedState.isDehydrated&&(ad(h,g).flags|=256),h=gv(h,g),h!==2&&(g=Ci,Ci=_,g!==null&&t2(g)),h}function t2(h){Ci===null?Ci=h:Ci.push.apply(Ci,h)}function Aie(h){for(var g=h;;){if(g.flags&16384){var _=g.updateQueue;if(_!==null&&(_=_.stores,_!==null))for(var C=0;C<_.length;C++){var D=_[C],z=D.getSnapshot;D=D.value;try{if(!ao(z(),D))return!1}catch{return!1}}}if(_=g.child,g.subtreeFlags&16384&&_!==null)_.return=g,g=_;else{if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function Gc(h,g){for(g&=~XE,g&=~uv,h.suspendedLanes|=g,h.pingedLanes&=~g,h=h.expirationTimes;0<g;){var _=31-Fn(g),C=1<<_;h[_]=-1,g&=~C}}function yD(h){if((yr&6)!==0)throw Error(r(327));Xf();var g=Ey(h,0);if((g&1)===0)return Oi(h,nt()),null;var _=gv(h,g);if(h.tag!==0&&_===2){var C=RS(h);C!==0&&(g=C,_=e2(h,C))}if(_===1)throw _=Xm,ad(h,0),Gc(h,g),Oi(h,nt()),_;if(_===6)throw Error(r(345));return h.finishedWork=h.current.alternate,h.finishedLanes=g,id(h,Ci,Ml),Oi(h,nt()),null}function r2(h,g){var _=yr;yr|=1;try{return h(g)}finally{yr=_,yr===0&&(Yf=nt()+500,Hy&&Bc())}}function nd(h){Wc!==null&&Wc.tag===0&&(yr&6)===0&&Xf();var g=yr;yr|=1;var _=ks.transition,C=Or;try{if(ks.transition=null,Or=1,h)return h()}finally{Or=C,ks.transition=_,yr=g,(yr&6)===0&&Bc()}}function n2(){Qi=Kf.current,tn(Kf)}function ad(h,g){h.finishedWork=null,h.finishedLanes=0;var _=h.timeoutHandle;if(_!==-1&&(h.timeoutHandle=-1,iie(_)),qn!==null)for(_=qn.return;_!==null;){var C=_;switch(fE(C),C.tag){case 1:C=C.type.childContextTypes,C!=null&&Uy();break;case 3:Wf(),tn(Ti),tn(Ma),TE();break;case 5:kE(C);break;case 4:Wf();break;case 13:tn(xn);break;case 19:tn(xn);break;case 10:yE(C.type._context);break;case 22:case 23:n2()}_=_.return}if(ma=h,qn=h=Kc(h.current,null),Ta=Qi=g,ea=0,Xm=null,XE=uv=rd=0,Ci=Jm=null,Zu!==null){for(g=0;g<Zu.length;g++)if(_=Zu[g],C=_.interleaved,C!==null){_.interleaved=null;var D=C.next,z=_.pending;if(z!==null){var ee=z.next;z.next=D,C.next=ee}_.pending=C}Zu=null}return h}function vD(h,g){do{var _=qn;try{if(xE(),ev.current=av,tv){for(var C=yn.memoizedState;C!==null;){var D=C.queue;D!==null&&(D.pending=null),C=C.next}tv=!1}if(td=0,pa=Zn=yn=null,qm=!1,Wm=0,YE.current=null,_===null||_.return===null){ea=1,Xm=g,qn=null;break}e:{var z=h,ee=_.return,_e=_,Ne=g;if(g=Ta,_e.flags|=32768,Ne!==null&&typeof Ne=="object"&&typeof Ne.then=="function"){var Le=Ne,Qe=_e,tt=Qe.tag;if((Qe.mode&1)===0&&(tt===0||tt===11||tt===15)){var Ye=Qe.alternate;Ye?(Qe.updateQueue=Ye.updateQueue,Qe.memoizedState=Ye.memoizedState,Qe.lanes=Ye.lanes):(Qe.updateQueue=null,Qe.memoizedState=null)}var pt=qM(ee);if(pt!==null){pt.flags&=-257,WM(pt,ee,_e,z,g),pt.mode&1&&HM(z,Le,g),g=pt,Ne=Le;var wt=g.updateQueue;if(wt===null){var Et=new Set;Et.add(Ne),g.updateQueue=Et}else wt.add(Ne);break e}else{if((g&1)===0){HM(z,Le,g),a2();break e}Ne=Error(r(426))}}else if(un&&_e.mode&1){var Mn=qM(ee);if(Mn!==null){(Mn.flags&65536)===0&&(Mn.flags|=256),WM(Mn,ee,_e,z,g),mE(Vf(Ne,_e));break e}}z=Ne=Vf(Ne,_e),ea!==4&&(ea=2),Jm===null?Jm=[z]:Jm.push(z),z=ee;do{switch(z.tag){case 3:z.flags|=65536,g&=-g,z.lanes|=g;var je=UM(z,Ne,g);uM(z,je);break e;case 1:_e=Ne;var Te=z.type,Pe=z.stateNode;if((z.flags&128)===0&&(typeof Te.getDerivedStateFromError=="function"||Pe!==null&&typeof Pe.componentDidCatch=="function"&&(qc===null||!qc.has(Pe)))){z.flags|=65536,g&=-g,z.lanes|=g;var ot=zM(z,_e,g);uM(z,ot);break e}}z=z.return}while(z!==null)}_D(_)}catch(Tt){g=Tt,qn===_&&_!==null&&(qn=_=_.return);continue}break}while(!0)}function bD(){var h=cv.current;return cv.current=av,h===null?av:h}function a2(){(ea===0||ea===3||ea===2)&&(ea=4),ma===null||(rd&268435455)===0&&(uv&268435455)===0||Gc(ma,Ta)}
vendor: 4,516 bytes, line 40
40function gv(h,g){var _=yr;yr|=2;var C=bD();(ma!==h||Ta!==g)&&(Ml=null,ad(h,g));do try{Cie();break}catch(D){vD(h,D)}while(!0);if(xE(),yr=_,cv.current=C,qn!==null)throw Error(r(261));return ma=null,Ta=0,ea}function Cie(){for(;qn!==null;)wD(qn)}function Oie(){for(;qn!==null&&!mt();)wD(qn)}function wD(h){var g=kD(h.alternate,h,Qi);h.memoizedProps=h.pendingProps,g===null?_D(h):qn=g,YE.current=null}function _D(h){var g=h;do{var _=g.alternate;if(h=g.return,(g.flags&32768)===0){if(_=Sie(_,g,Qi),_!==null){qn=_;return}}else{if(_=Eie(_,g),_!==null){_.flags&=32767,qn=_;return}if(h!==null)h.flags|=32768,h.subtreeFlags=0,h.deletions=null;else{ea=6,qn=null;return}}if(g=g.sibling,g!==null){qn=g;return}qn=g=h}while(g!==null);ea===0&&(ea=5)}function id(h,g,_){var C=Or,D=ks.transition;try{ks.transition=null,Or=1,Pie(h,g,_,C)}finally{ks.transition=D,Or=C}return null}function Pie(h,g,_,C){do Xf();while(Wc!==null);if((yr&6)!==0)throw Error(r(327));_=h.finishedWork;var D=h.finishedLanes;if(_===null)return null;if(h.finishedWork=null,h.finishedLanes=0,_===h.current)throw Error(r(177));h.callbackNode=null,h.callbackPriority=0;var z=_.lanes|_.childLanes;if(fae(h,z),h===ma&&(qn=ma=null,Ta=0),(_.subtreeFlags&2064)===0&&(_.flags&2064)===0||fv||(fv=!0,ND(In,function(){return Xf(),null})),z=(_.flags&15990)!==0,(_.subtreeFlags&15990)!==0||z){z=ks.transition,ks.transition=null;var ee=Or;Or=1;var _e=yr;yr|=4,YE.current=null,Nie(h,_),fD(_,h),Qae(aE),Ty=!!nE,aE=nE=null,h.current=_,Tie(_),st(),yr=_e,Or=ee,ks.transition=z}else h.current=_;if(fv&&(fv=!1,Wc=h,hv=D),z=h.pendingLanes,z===0&&(qc=null),bm(_.stateNode),Oi(h,nt()),g!==null)for(C=h.onRecoverableError,_=0;_<g.length;_++)D=g[_],C(D.value,{componentStack:D.stack,digest:D.digest});if(dv)throw dv=!1,h=QE,QE=null,h;return(hv&1)!==0&&h.tag!==0&&Xf(),z=h.pendingLanes,(z&1)!==0?h===ZE?Qm++:(Qm=0,ZE=h):Qm=0,Bc(),null}function Xf(){if(Wc!==null){var h=cF(hv),g=ks.transition,_=Or;try{if(ks.transition=null,Or=16>h?16:h,Wc===null)var C=!1;else{if(h=Wc,Wc=null,hv=0,(yr&6)!==0)throw Error(r(331));var D=yr;for(yr|=4,yt=h.current;yt!==null;){var z=yt,ee=z.child;if((yt.flags&16)!==0){var _e=z.deletions;if(_e!==null){for(var Ne=0;Ne<_e.length;Ne++){var Le=_e[Ne];for(yt=Le;yt!==null;){var Qe=yt;switch(Qe.tag){case 0:case 11:case 15:Ym(8,Qe,z)}var tt=Qe.child;if(tt!==null)tt.return=Qe,yt=tt;else for(;yt!==null;){Qe=yt;var Ye=Qe.sibling,pt=Qe.return;if(oD(Qe),Qe===Le){yt=null;break}if(Ye!==null){Ye.return=pt,yt=Ye;break}yt=pt}}}var wt=z.alternate;if(wt!==null){var Et=wt.child;if(Et!==null){wt.child=null;do{var Mn=Et.sibling;Et.sibling=null,Et=Mn}while(Et!==null)}}yt=z}}if((z.subtreeFlags&2064)!==0&&ee!==null)ee.return=z,yt=ee;else e:for(;yt!==null;){if(z=yt,(z.flags&2048)!==0)switch(z.tag){case 0:case 11:case 15:Ym(9,z,z.return)}var je=z.sibling;if(je!==null){je.return=z.return,yt=je;break e}yt=z.return}}var Te=h.current;for(yt=Te;yt!==null;){ee=yt;var Pe=ee.child;if((ee.subtreeFlags&2064)!==0&&Pe!==null)Pe.return=ee,yt=Pe;else e:for(ee=Te;yt!==null;){if(_e=yt,(_e.flags&2048)!==0)try{switch(_e.tag){case 0:case 11:case 15:lv(9,_e)}}catch(Tt){En(_e,_e.return,Tt)}if(_e===ee){yt=null;break e}var ot=_e.sibling;if(ot!==null){ot.return=_e.return,yt=ot;break e}yt=_e.return}}if(yr=D,Bc(),ha&&typeof ha.onPostCommitFiberRoot=="function")try{ha.onPostCommitFiberRoot($o,h)}catch{}C=!0}return C}finally{Or=_,ks.transition=g}}return!1}function SD(h,g,_){g=Vf(_,g),g=UM(h,g,1),h=zc(h,g,1),g=si(),h!==null&&(_m(h,1,g),Oi(h,g))}function En(h,g,_){if(h.tag===3)SD(h,h,_);else for(;g!==null;){if(g.tag===3){SD(g,h,_);break}else if(g.tag===1){var C=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof C.componentDidCatch=="function"&&(qc===null||!qc.has(C))){h=Vf(_,h),h=zM(g,h,1),g=zc(g,h,1),h=si(),g!==null&&(_m(g,1,h),Oi(g,h));break}}g=g.return}}function Rie(h,g,_){var C=h.pingCache;C!==null&&C.delete(g),g=si(),h.pingedLanes|=h.suspendedLanes&_,ma===h&&(Ta&_)===_&&(ea===4||ea===3&&(Ta&130023424)===Ta&&500>nt()-JE?ad(h,0):XE|=_),Oi(h,g)}function ED(h,g){g===0&&((h.mode&1)===0?g=1:(g=Sy,Sy<<=1,(Sy&130023424)===0&&(Sy=4194304)));var _=si();h=Rl(h,g),h!==null&&(_m(h,g,_),Oi(h,_))}function Iie(h){var g=h.memoizedState,_=0;g!==null&&(_=g.retryLane),ED(h,_)}function Fie(h,g){var _=0;switch(h.tag){case 13:var C=h.stateNode,D=h.memoizedState;D!==null&&(_=D.retryLane);break;case 19:C=h.stateNode;break;default:throw Error(r(314))}C!==null&&C.delete(g),ED(h,_)}var kD;kD=function(h,g,_){if(h!==null)if(h.memoizedProps!==g.pendingProps||Ti.current)Ai=!0;
vendor: 11,645 bytes, line 40
40else{if((h.lanes&_)===0&&(g.flags&128)===0)return Ai=!1,_ie(h,g,_);Ai=(h.flags&131072)!==0}else Ai=!1,un&&(g.flags&1048576)!==0&&nM(g,Wy,g.index);switch(g.lanes=0,g.tag){case 2:var C=g.type;sv(h,g),h=g.pendingProps;var D=Lf(g,Ma.current);Hf(g,_),D=CE(null,g,C,h,D,_);var z=OE();return g.flags|=1,typeof D=="object"&&D!==null&&typeof D.render=="function"&&D.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,ji(C)?(z=!0,zy(g)):z=!1,g.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,wE(g),D.updater=Jy,g.stateNode=D,D._reactInternals=g,SE(g,C,h,_),g=$E(null,g,C,!0,z,_)):(g.tag=0,un&&z&&dE(g),ii(null,g,D,_),g=g.child),g;case 16:C=g.elementType;e:{switch(sv(h,g),h=g.pendingProps,D=C._init,C=D(C._payload),g.type=C,D=g.tag=Die(C),h=so(C,h),D){case 0:g=LE(null,g,C,h,_);break e;case 1:g=JM(null,g,C,h,_);break e;case 11:g=VM(null,g,C,h,_);break e;case 14:g=GM(null,g,C,so(C.type,h),_);break e}throw Error(r(306,C,""))}return g;case 0:return C=g.type,D=g.pendingProps,D=g.elementType===C?D:so(C,D),LE(h,g,C,D,_);case 1:return C=g.type,D=g.pendingProps,D=g.elementType===C?D:so(C,D),JM(h,g,C,D,_);case 3:e:{if(QM(g),h===null)throw Error(r(387));C=g.pendingProps,z=g.memoizedState,D=z.element,cM(h,g),Xy(g,C,null,_);var ee=g.memoizedState;if(C=ee.element,z.isDehydrated)if(z={element:C,isDehydrated:!1,cache:ee.cache,pendingSuspenseBoundaries:ee.pendingSuspenseBoundaries,transitions:ee.transitions},g.updateQueue.baseState=z,g.memoizedState=z,g.flags&256){D=Vf(Error(r(423)),g),g=ZM(h,g,C,_,D);break e}else if(C!==D){D=Vf(Error(r(424)),g),g=ZM(h,g,C,_,D);break e}else for(Ji=Dc(g.stateNode.containerInfo.firstChild),Xi=g,un=!0,io=null,_=yM(g,null,C,_),g.child=_;_;)_.flags=_.flags&-3|4096,_=_.sibling;else{if(Uf(),C===D){g=Fl(h,g,_);break e}ii(h,g,C,_)}g=g.child}return g;case 5:return vM(g),h===null&&pE(g),C=g.type,D=g.pendingProps,z=h!==null?h.memoizedProps:null,ee=D.children,iE(C,D)?ee=null:z!==null&&iE(C,z)&&(g.flags|=32),XM(h,g),ii(h,g,ee,_),g.child;case 6:return h===null&&pE(g),null;case 13:return eD(h,g,_);case 4:return EE(g,g.stateNode.containerInfo),C=g.pendingProps,h===null?g.child=qf(g,null,C,_):ii(h,g,C,_),g.child;case 11:return C=g.type,D=g.pendingProps,D=g.elementType===C?D:so(C,D),VM(h,g,C,D,_);case 7:return ii(h,g,g.pendingProps,_),g.child;case 8:return ii(h,g,g.pendingProps.children,_),g.child;case 12:return ii(h,g,g.pendingProps.children,_),g.child;case 10:e:{if(C=g.type._context,D=g.pendingProps,z=g.memoizedProps,ee=D.value,Wr(Gy,C._currentValue),C._currentValue=ee,z!==null)if(ao(z.value,ee)){if(z.children===D.children&&!Ti.current){g=Fl(h,g,_);break e}}else for(z=g.child,z!==null&&(z.return=g);z!==null;){var _e=z.dependencies;if(_e!==null){ee=z.child;for(var Ne=_e.firstContext;Ne!==null;){if(Ne.context===C){if(z.tag===1){Ne=Il(-1,_&-_),Ne.tag=2;var Le=z.updateQueue;if(Le!==null){Le=Le.shared;var Qe=Le.pending;Qe===null?Ne.next=Ne:(Ne.next=Qe.next,Qe.next=Ne),Le.pending=Ne}}z.lanes|=_,Ne=z.alternate,Ne!==null&&(Ne.lanes|=_),vE(z.return,_,g),_e.lanes|=_;break}Ne=Ne.next}}else if(z.tag===10)ee=z.type===g.type?null:z.child;else if(z.tag===18){if(ee=z.return,ee===null)throw Error(r(341));ee.lanes|=_,_e=ee.alternate,_e!==null&&(_e.lanes|=_),vE(ee,_,g),ee=z.sibling}else ee=z.child;if(ee!==null)ee.return=z;else for(ee=z;ee!==null;){if(ee===g){ee=null;break}if(z=ee.sibling,z!==null){z.return=ee.return,ee=z;break}ee=ee.return}z=ee}ii(h,g,D.children,_),g=g.child}return g;case 9:return D=g.type,C=g.pendingProps.children,Hf(g,_),D=Ss(D),C=C(D),g.flags|=1,ii(h,g,C,_),g.child;case 14:return C=g.type,D=so(C,g.pendingProps),D=so(C.type,D),GM(h,g,C,D,_);case 15:return KM(h,g,g.type,g.pendingProps,_);case 17:return C=g.type,D=g.pendingProps,D=g.elementType===C?D:so(C,D),sv(h,g),g.tag=1,ji(C)?(h=!0,zy(g)):h=!1,Hf(g,_),pM(g,C,D),SE(g,C,D,_),$E(null,g,C,!0,h,_);case 19:return rD(h,g,_);case 22:return YM(h,g,_)}throw Error(r(156,g.tag))};function ND(h,g){return et(h,g)}function Mie(h,g,_,C){this.tag=h,this.key=_,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=C,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ns(h,g,_,C){return new Mie(h,g,_,C)}function i2(h){return h=h.prototype,!(!h||!h.isReactComponent)}function Die(h){if(typeof h=="function")return i2(h)?1:0;if(h!=null){if(h=h.$$typeof,h===R)return 11;if(h===U)return 14}return 2}function Kc(h,g){var _=h.alternate;return _===null?(_=Ns(h.tag,g,h.key,h.mode),_.elementType=h.elementType,_.type=h.type,_.stateNode=h.stateNode,_.alternate=h,h.alternate=_):(_.pendingProps=g,_.type=h.type,_.flags=0,_.subtreeFlags=0,_.deletions=null),_.flags=h.flags&14680064,_.childLanes=h.childLanes,_.lanes=h.lanes,_.child=h.child,_.memoizedProps=h.memoizedProps,_.memoizedState=h.memoizedState,_.updateQueue=h.updateQueue,g=h.dependencies,_.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},_.sibling=h.sibling,_.index=h.index,_.ref=h.ref,_}function xv(h,g,_,C,D,z){var ee=2;if(C=h,typeof h=="function")i2(h)&&(ee=1);else if(typeof h=="string")ee=5;else e:switch(h){case T:return sd(_.children,D,z,g);case O:ee=8,D|=8;break;case A:return h=Ns(12,_,g,D|2),h.elementType=A,h.lanes=z,h;case M:return h=Ns(13,_,g,D),h.elementType=M,h.lanes=z,h;case L:return h=Ns(19,_,g,D),h.elementType=L,h.lanes=z,h;case V:return yv(_,D,z,g);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case P:ee=10;break e;case I:ee=9;break e;case R:ee=11;break e;case U:ee=14;break e;case W:ee=16,C=null;break e}throw Error(r(130,h==null?h:typeof h,""))}return g=Ns(ee,_,g,D),g.elementType=h,g.type=C,g.lanes=z,g}function sd(h,g,_,C){return h=Ns(7,h,C,g),h.lanes=_,h}function yv(h,g,_,C){return h=Ns(22,h,C,g),h.elementType=V,h.lanes=_,h.stateNode={isHidden:!1},h}function s2(h,g,_){return h=Ns(6,h,null,g),h.lanes=_,h}function o2(h,g,_){return g=Ns(4,h.children!==null?h.children:[],h.key,g),g.lanes=_,g.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},g}function Lie(h,g,_,C,D){this.tag=g,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=IS(0),this.expirationTimes=IS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=IS(0),this.identifierPrefix=C,this.onRecoverableError=D,this.mutableSourceEagerHydrationData=null}function l2(h,g,_,C,D,z,ee,_e,Ne){return h=new Lie(h,g,_,_e,Ne),g===1?(g=1,z===!0&&(g|=8)):g=0,z=Ns(3,null,null,g),h.current=z,z.stateNode=h,z.memoizedState={element:C,isDehydrated:_,cache:null,transitions:null,pendingSuspenseBoundaries:null},wE(z),h}function $ie(h,g,_){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:C==null?null:""+C,children:h,containerInfo:g,implementation:_}}function TD(h){if(!h)return $c;h=h._reactInternals;e:{if(be(h)!==h||h.tag!==1)throw Error(r(170));var g=h;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(ji(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(r(171))}if(h.tag===1){var _=h.type;if(ji(_))return eM(h,_,g)}return g}function jD(h,g,_,C,D,z,ee,_e,Ne){return h=l2(_,C,!0,h,D,z,ee,_e,Ne),h.context=TD(null),_=h.current,C=si(),D=Vc(_),z=Il(C,D),z.callback=g??null,zc(_,z,D),h.current.lanes=D,_m(h,D,C),Oi(h,C),h}function vv(h,g,_,C){var D=g.current,z=si(),ee=Vc(D);return _=TD(_),g.context===null?g.context=_:g.pendingContext=_,g=Il(z,ee),g.payload={element:h},C=C===void 0?null:C,C!==null&&(g.callback=C),h=zc(D,g,ee),h!==null&&(co(h,D,ee,z),Yy(h,D,ee)),ee}function bv(h){if(h=h.current,!h.child)return null;switch(h.child.tag){case 5:return h.child.stateNode;default:return h.child.stateNode}}function AD(h,g){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var _=h.retryLane;h.retryLane=_!==0&&_<g?_:g}}function c2(h,g){AD(h,g),(h=h.alternate)&&AD(h,g)}function Bie(){return null}var CD=typeof reportError=="function"?reportError:function(h){console.error(h)};function u2(h){this._internalRoot=h}wv.prototype.render=u2.prototype.render=function(h){var g=this._internalRoot;if(g===null)throw Error(r(409));vv(h,g,null,null)},wv.prototype.unmount=u2.prototype.unmount=function(){var h=this._internalRoot;if(h!==null){this._internalRoot=null;var g=h.containerInfo;nd(function(){vv(null,h,null,null)}),g[Al]=null}};function wv(h){this._internalRoot=h}wv.prototype.unstable_scheduleHydration=function(h){if(h){var g=fF();h={blockedOn:null,target:h,priority:g};for(var _=0;_<Ic.length&&g!==0&&g<Ic[_].priority;_++);Ic.splice(_,0,h),_===0&&mF(h)}};function d2(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function _v(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11&&(h.nodeType!==8||h.nodeValue!==" react-mount-point-unstable "))}function OD(){}function Uie(h,g,_,C,D){if(D){if(typeof C=="function"){var z=C;C=function(){var Le=bv(ee);z.call(Le)}}var ee=jD(g,C,h,0,null,!1,!1,"",OD);return h._reactRootContainer=ee,h[Al]=ee.current,Mm(h.nodeType===8?h.parentNode:h),nd(),ee}for(;D=h.lastChild;)h.removeChild(D);if(typeof C=="function"){var _e=C;C=function(){var Le=bv(Ne);_e.call(Le)}}var Ne=l2(h,0,!1,null,null,!1,!1,"",OD);return h._reactRootContainer=Ne,h[Al]=Ne.current,Mm(h.nodeType===8?h.parentNode:h),nd(function(){vv(g,Ne,_,C)}),Ne}function Sv(h,g,_,C,D){var z=_._reactRootContainer;if(z){var ee=z;if(typeof D=="function"){var _e=D;D=function(){var Ne=bv(ee);_e.call(Ne)}}vv(g,ee,h,D)}else ee=Uie(_,g,h,D,C);return bv(ee)}uF=function(h){switch(h.tag){case 3:var g=h.stateNode;if(g.current.memoizedState.isDehydrated){var _=wm(g.pendingLanes);_!==0&&(FS(g,_|1),Oi(g,nt()),(yr&6)===0&&(Yf=nt()+500,Bc()))}break;case 13:nd(function(){var C=Rl(h,1);if(C!==null){var D=si();co(C,h,1,D)}}),c2(h,1)}},MS=function(h){if(h.tag===13){var g=Rl(h,134217728);if(g!==null){var _=si();co(g,h,134217728,_)}c2(h,134217728)}},dF=function(h){if(h.tag===13){var g=Vc(h),_=Rl(h,g);if(_!==null){var C=si();co(_,h,g,C)}c2(h,g)}},fF=function(){return Or},hF=function(h,g){var _=Or;try{return Or=h,g()}finally{Or=_}},ai=function(h,g,_){switch(g){case"input":if(ie(h,_),g=_.name,_.type==="radio"&&g!=null){for(_=h;_.parentNode;)_=_.parentNode;for(_=_.querySelectorAll("input[name="+JSON.stringify(""+g)+'][type="radio"]'),g=0;g<_.length;g++){var C=_[g];if(C!==h&&C.form===h.form){var D=By(C);if(!D)throw Error(r(90));q(C),ie(C,D)}}}break;case"textarea":te(h,_);break;case"select":g=_.value,g!=null&&Ue(h,!!_.multiple,g,!1)}},gn=r2,Rn=nd;var zie={usingClientEntryPoint:!1,Events:[$m,Mf,By,xs,Hn,r2]},Zm={findFiberByHostInstance:Yu,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Hie={bundleType:Zm.bundleType,version:Zm.version,rendererPackageName:Zm.rendererPackageName,rendererConfig:Zm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(h){return h=Fe(h),h===null?null:h.stateNode},findFiberByHostInstance:Zm.findFiberByHostInstance||Bie,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ev=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ev.isDisabled&&Ev.supportsFiber)try{$o=Ev.inject(Hie),ha=Ev}catch{}}return Pi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zie,Pi.createPortal=function(h,g){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d2(g))throw Error(r(200));return $ie(h,g,null,_)},Pi.createRoot=function(h,g){if(!d2(h))throw Error(r(299));var _=!1,C="",D=CD;return g!=null&&(g.unstable_strictMode===!0&&(_=!0),g.identifierPrefix!==void 0&&(C=g.identifierPrefix),g.onRecoverableError!==void 0&&(D=g.onRecoverableError)),g=l2(h,1,!1,null,null,_,!1,C,D),h[Al]=g.current,Mm(h.nodeType===8?h.parentNode:h),new u2(g)},Pi.findDOMNode=function(h){if(h==null)return null;if(h.nodeType===1)return h;var g=h._reactInternals;if(g===void 0)throw typeof h.render=="function"?Error(r(188)):(h=Object.keys(h).join(","),Error(r(268,h)));return h=Fe(g),h=h===null?null:h.stateNode,h},Pi.flushSync=function(h){return nd(h)},Pi.hydrate=function(h,g,_){if(!_v(g))throw Error(r(200));return Sv(null,h,g,!0,_)},Pi.hydrateRoot=function(h,g,_){if(!d2(h))throw Error(r(405));var C=_!=null&&_.hydratedSources||null,D=!1,z="",ee=CD;if(_!=null&&(_.unstable_strictMode===!0&&(D=!0),_.identifierPrefix!==void 0&&(z=_.identifierPrefix),_.onRecoverableError!==void 0&&(ee=_.onRecoverableError)),g=jD(g,null,h,1,_??null,D,!1,z,ee),h[Al]=g.current,Mm(h),C)for(h=0;h<C.length;h++)_=C[h],D=_._getVersion,D=D(_._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[_,D]:g.mutableSourceEagerHydrationData.push(_,D);return new wv(g)},Pi.render=function(h,g,_){if(!_v(g))throw Error(r(200));return Sv(null,h,g,!1,_)},Pi.unmountComponentAtNode=function(h){if(!_v(h))throw Error(r(40));return h._reactRootContainer?(nd(function(){Sv(null,null,h,!1,function(){h._reactRootContainer=null,h[Al]=null})}),!0):!1},Pi.unstable_batchedUpdates=r2,Pi.unstable_renderSubtreeIntoContainer=function(h,g,_,C){if(!_v(_))throw Error(r(200));if(h==null||h._reactInternals===void 0)throw Error(r(38));return Sv(h,g,_,!1,C)},Pi.version="18.2.0-next-9e3b772b8-20220608",Pi}var $D;function IW(){if($D)return p2.exports;$D=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),p2.exports=Zie(),p2.exports}var BD;function ese(){if(BD)return Nv;BD=1;var e=IW();return Nv.createRoot=e.createRoot,Nv.hydrateRoot=e.hydrateRoot,Nv}var tse=ese();const rse=tr(tse);var x2,UD;function nse(){if(UD)return x2;UD=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function a(i,s){if(i===s)return!0;if(i&&s&&typeof i=="object"&&typeof s=="object"){if(i.constructor!==s.constructor)return!1;var l,c,u;if(Array.isArray(i)){if(l=i.length,l!=s.length)return!1;for(c=l;c--!==0;)if(!a(i[c],s[c]))return!1;return!0}var d;if(t&&i instanceof Map&&s instanceof Map){if(i.size!==s.size)return!1;for(d=i.entries();!(c=d.next()).done;)if(!s.has(c.value[0]))return!1;for(d=i.entries();!(c=d.next()).done;)if(!a(c.value[1],s.get(c.value[0])))return!1;return!0}if(r&&i instanceof Set&&s instanceof Set){if(i.size!==s.size)return!1;for(d=i.entries();!(c=d.next()).done;)if(!s.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(s)){if(l=i.length,l!=s.length)return!1;for(c=l;c--!==0;)if(i[c]!==s[c])return!1;return!0}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof s.valueOf=="function")return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof s.toString=="function")return i.toString()===s.toString();if(u=Object.keys(i),l=u.length,l!==Object.keys(s).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[c]))return!1;if(e&&i instanceof Element)return!1;for(c=l;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&i.$$typeof)&&!a(i[u[c]],s[u[c]]))return!1;return!0}return i!==i&&s!==s}return x2=function(s,l){try{return a(s,l)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},x2}var ase=nse();const ise=tr(ase);var y2,zD;function sse(){if(zD)return y2;zD=1;var e=function(t,r,n,a,i,s,l,c){if(!t){var u;if(r===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,a,i,s,l,c],f=0;u=new Error(r.replace(/%s/g,function(){return d[f++]}
40)),u.name="Invariant Violation"}throw u.framesToPop=1,u}};return y2=e,y2}var ose=sse();const HD=tr(ose);var v2,qD;function lse(){return qD||(qD=1,v2=function(t,r,n,a){var i=n?n.call(a,t,r):void 0;if(i!==void 0)return!!i;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var s=Object.keys(t),l=Object.keys(r);if(s.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<s.length;u++){var d=s[u];if(!c(d))return!1;var f=t[d],p=r[d];if(i=n?n.call(a,f,p,d):void 0,i===!1||i===void 0&&f!==p)return!1}return!0}),v2}var cse=lse();const use=tr(cse);var FW=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(FW||{}),b2={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},WD=Object.values(FW),cR={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},dse=Object.entries(cR).reduce((e,[t,r])=>(e[r]=t,e),{}),wo="data-rh",Ph={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Rh=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},fse=e=>{let t=Rh(e,"title");const r=Rh(e,Ph.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Rh(e,Ph.DEFAULT_TITLE);return t||n||void 0},hse=e=>Rh(e,Ph.ON_CHANGE_CLIENT_STATE)||(()=>{}),w2=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),pse=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const a=Object.keys(n);for(let i=0;i<a.length;i+=1){const l=a[i].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),mse=e=>console&&typeof console.warn=="function"&&console.warn(e),t0=(e,t,r)=>{const n={};return r.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&mse(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const s={};i.filter(c=>{let u;const d=Object.keys(c);for(let p=0;p<d.length;p+=1){const m=d[p],x=m.toLowerCase();t.indexOf(x)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(x==="rel"&&c[x].toLowerCase()==="stylesheet")&&(u=x),t.indexOf(m)!==-1&&(m==="innerHTML"||m==="cssText"||m==="itemprop")&&(u=m)}if(!u||!c[u])return!1;const f=c[u].toLowerCase();return n[u]||(n[u]={}),s[u]||(s[u]={}),n[u][f]?!1:(s[u][f]=!0,!0)}).reverse().forEach(c=>a.push(c));const l=Object.keys(s);for(let c=0;c<l.length;c+=1){const u=l[c],d={...n[u],...s[u]};n[u]=d}return a},[]).reverse()},gse=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},xse=e=>({baseTag:pse(["href"],e),bodyAttributes:w2("bodyAttributes",e),defer:Rh(e,Ph.DEFER),encode:Rh(e,Ph.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:w2("htmlAttributes",e),linkTags:t0("link",["rel","href"],e),metaTags:t0("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:t0("noscript",["innerHTML"],e),onChangeClientState:hse(e),scriptTags:t0("script",["src","innerHTML"],e),styleTags:t0("style",["cssText"],e),title:fse(e),titleAttributes:w2("titleAttributes",e),prioritizeSeoTags:gse(e,Ph.PRIORITIZE_SEO_TAGS)}),MW=e=>Array.isArray(e)?e.join(""):e,yse=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},_2=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(yse(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},VD=(e,t)=>({...e,[t]:void 0}),vse=["noscript","script","style"],JA=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),DW=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),bse=(e,t,r,n)=>{const a=DW(r),i=MW(t);return a?`<${e} ${wo}="true" ${a}>${JA(i,n)}</${e}>`:`<${e} ${wo}="true">${JA(i,n)}</${e}>`},wse=(e,t,r=!0)=>t.reduce((n,a)=>{const i=a,s=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const f=typeof i[d]>"u"?d:`${d}="${JA(i[d],r)}"`;return u?`${u} ${f}`:f},""),l=i.innerHTML||i.cssText||"",c=vse.indexOf(e)===-1;return`${n}<${e} ${wo}="true" ${s}${c?"/>":`>${l}</${e}>`}`},""),LW=(e,t={})=>Object.keys(e).reduce((r,n)=>{const a=cR[n];return r[a||n]=e[n],r},t),_se=(e,t,r)=>{const n={key:t,[wo]:!0},a=LW(r,n);return[se.createElement("title",a,t)]},Ib=(e,t)=>
40t.map((r,n)=>{const a={key:n,[wo]:!0};return Object.keys(r).forEach(i=>{const l=cR[i]||i;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:c}}else a[l]=r[i]}),se.createElement(e,a)}),Ds=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>_se(e,t.title,t.titleAttributes),toString:()=>bse(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>LW(t),toString:()=>DW(t)};default:return{toComponent:()=>Ib(e,t),toString:()=>wse(e,t,r)}}},Sse=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const a=_2(e,b2.meta),i=_2(t,b2.link),s=_2(r,b2.script);return{priorityMethods:{toComponent:()=>[...Ib("meta",a.priority),...Ib("link",i.priority),...Ib("script",s.priority)],toString:()=>`${Ds("meta",a.priority,n)} ${Ds("link",i.priority,n)} ${Ds("script",s.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:s.default}},Ese=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:s,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:f,scriptTags:p}=e,m={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:m,linkTags:d,metaTags:f,scriptTags:p}=Sse(e)),{priority:m,base:Ds("base",t,n),bodyAttributes:Ds("bodyAttributes",r,n),htmlAttributes:Ds("htmlAttributes",a,n),link:Ds("link",d,n),meta:Ds("meta",f,n),noscript:Ds("noscript",i,n),script:Ds("script",p,n),style:Ds("style",s,n),title:Ds("title",{title:l,titleAttributes:c},n)}},QA=Ese,Tv=[],$W=!!(typeof window<"u"&&window.document&&window.document.createElement),ZA=class{constructor(e,t){Wn(this,"instances",[]);Wn(this,"canUseDOM",$W);Wn(this,"context");Wn(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Tv:this.instances,add:e=>{(this.canUseDOM?Tv:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Tv:this.instances).indexOf(e);(this.canUseDOM?Tv:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=QA({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},kse={},BW=se.createContext(kse),Dd,UW=(Dd=class extends N.Component{constructor(r){super(r);Wn(this,"helmetData");this.helmetData=new ZA(this.props.context||{},Dd.canUseDOM)}render(){return se.createElement(BW.Provider,{value:this.helmetData.value},this.props.children)}},Wn(Dd,"canUseDOM",$W),Dd),Jf=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${wo}]`),a=[].slice.call(n),i=[];let s;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText")c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText));else{const d=u,f=typeof l[d]>"u"?"":l[d];c.setAttribute(u,f)}c.setAttribute(wo,"true"),a.some((u,d)=>(s=d,c.isEqualNode(u)))?a.splice(s,1):i.push(c)}),a.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),i.forEach(l=>r.appendChild(l)),{oldTags:a,newTags:i}},eC=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(wo),a=n?n.split(","):[],i=[...a],s=Object.keys(t);for(const l of s){const c=t[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),a.indexOf(l)===-1&&a.push(l);const u=i.indexOf(l);u!==-1&&i.splice(u,1)}for(let l=i.length-1;l>=0;l-=1)r.removeAttribute(i[l]);a.length===i.length?r.removeAttribute(wo):r.getAttribute(wo)!==s.join(",")&&r.setAttribute(wo,s.join(","))},Nse=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=MW(e)),eC("title",t)},GD=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:s,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:d,title:f,titleAttributes:p}=e;eC("body",n),eC("html",a),Nse(f,p);const m={baseTag:Jf("base",r),linkTags:Jf("link",i),metaTags:Jf("meta",s),noscriptTags:Jf("noscript",l),scriptTags:Jf("script",u),styleTags:Jf("style",d)},x={},y={};Object.keys(m).forEach(v=>{const{newTags:b,oldTags:w}=m[v];b.length&&(x[v]=b),w.length&&(y[v]=m[v].oldTags)}),t&&t(),c(e,x,y)},r0=null,Tse=e=>{r0&&cancelAnimationFrame(r0),e.defer?r0=requestAnimationFrame(()=>{GD(e,()=>{r0=null})}):(GD(e),r0=null)},jse=Tse,KD=class extends N.Component{constructor(){super(...arguments);Wn(this,"rendered",!1)}shouldComponentUpdate(t){return!use(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const a=xse(t.get().map(i=>{const s={...i.props};return delete s.context,s}));UW.canUseDOM?jse(a):QA&&(n=QA(a)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}}
40,XA,Ase=(XA=class extends N.Component{shouldComponentUpdate(e){return!ise(VD(this.props,"helmetData"),VD(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return HD(WD.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${WD.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),HD(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return se.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,s=Object.keys(i).reduce((c,u)=>(c[dse[u]||u]=i[u],c),{});let{type:l}=n;
40switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,a),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(a,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,s,a);break;default:t=this.mapObjectTypeChildren(n,t,s,a);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof ZA)){const a=n;n=new ZA(a.context,!0),delete r.helmetData}return n?se.createElement(KD,{...r,context:n.value}):se.createElement(BW.Consumer,null,a=>se.createElement(KD,{...r,context:a}))}},Wn(XA,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),XA);function Cse(e={}){const{nonce:t,locale:r,onScriptLoadSuccess:n,onScriptLoadError:a}=e,[i,s]=N.useState(!1),l=N.useRef(n);l.current=n;const c=N.useRef(a);return c.current=a,N.useEffect(()=>{const u=document.createElement("script");return u.src="https://accounts.google.com/gsi/client",r&&(u.src+=`?hl=${r}`),u.async=!0,u.defer=!0,u.nonce=t,u.onload=()=>{var d;s(!0),(d=l.current)===null||d===void 0||d.call(l)},u.onerror=()=>{var d;s(!1),(d=c.current)===null||d===void 0||d.call(c)},document.body.appendChild(u),()=>{document.body.removeChild(u)}},[t]),i}const zW=N.createContext(null);function Ose({clientId:e,nonce:t,locale:r,onScriptLoadSuccess:n,onScriptLoadError:a,children:i}){const s=Cse({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:a,locale:r}),l=N.useMemo(()=>({locale:r,clientId:e,scriptLoadedSuccessfully:s}),[e,s]);return se.createElement(zW.Provider,{value:l},i)}function Pse(){const e=N.useContext(zW);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function Rse(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const Ise={large:40,medium:32,small:20};function Fse({onSuccess:e,onError:t,useOneTap:r,promptMomentNotification:n,type:a="standard",theme:i="outline",size:s="large",text:l,shape:c,logo_alignment:u,width:d,click_listener:f,state:p,containerProps:m,...x}){const y=N.useRef(null),{clientId:v,locale:b,scriptLoadedSuccessfully:w}=Pse(),S=N.useRef(e);S.current=e;const j=N.useRef(t);j.current=t;const k=N.useRef(n);return k.current=n,N.useEffect(()=>{var E,T,O,A,P,I,R,M,L;if(w)return(O=(T=(E=window==null?void 0:window.google)===null||E===void 0?void 0:E.accounts)===null||T===void 0?void 0:T.id)===null||O===void 0||O.initialize({client_id:v,callback:U=>{var W;if(!(U!=null&&U.credential))return(W=j.current)===null||W===void 0?void 0:W.call(j);const{credential:V,select_by:G}=U;S.current({credential:V,clientId:Rse(U),select_by:G})},...x}),(I=(P=(A=window==null?void 0:window.google)===null||A===void 0?void 0:A.accounts)===null||P===void 0?void 0:P.id)===null||I===void 0||I.renderButton(y.current,{type:a,theme:i,size:s,text:l,shape:c,logo_alignment:u,width:d,locale:b,click_listener:f,state:p}),r&&((L=(M=(R=window==null?void 0:window.google)===null||R===void 0?void 0:R.accounts)===null||M===void 0?void 0:M.id)===null||L===void 0||L.prompt(k.current)),()=>{var U,W,V;r&&((V=(W=(U=window==null?void 0:window.google)===null||U===void 0?void 0:U.accounts)===null||W===void 0?void 0:W.id)===null||V===void 0||V.cancel())}},[v,w,r,a,i,s,l,c,u,d,b]),se.createElement("div",{...m,ref:y,style:{height:Ise[s],...m==null?void 0:m.style}})}/** 41 * react-router v7.13.1 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */var YD="popstate";function XD(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Mse(e={}){function t(n,a){var u;let i=(u=a.state)==null?void 0:u.masked,{pathname:s,search:l,hash:c}=i||n.location;return tC("",{pathname:s,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}
49function r(n,a){return typeof a=="string"?a:pg(a)}return Lse(t,r,null,e)}function mn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ys(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Dse(){return Math.random().toString(36).substring(2,10)}function JD(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function tC(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hp(t):t,state:r,key:t&&t.key||n||Dse(),unstable_mask:a}}function pg({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Hp(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Lse(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:i=!1}=n,s=a.history,l="POP",c=null,u=d();u==null&&(u=0,s.replaceState({...s.state,idx:u},""));function d(){return(s.state||{idx:null}).idx}function f(){l="POP";let v=d(),b=v==null?null:v-u;u=v,c&&c({action:l,location:y.location,delta:b})}function p(v,b){l="PUSH";let w=XD(v)?v:tC(y.location,v,b);u=d()+1;let S=JD(w,u),j=y.createHref(w.unstable_mask||w);try{s.pushState(S,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(j)}i&&c&&c({action:l,location:y.location,delta:1})}function m(v,b){l="REPLACE";let w=XD(v)?v:tC(y.location,v,b);u=d();let S=JD(w,u),j=y.createHref(w.unstable_mask||w);s.replaceState(S,"",j),i&&c&&c({action:l,location:y.location,delta:0})}function x(v){return $se(v)}let y={get action(){return l},get location(){return e(a,s)},listen(v){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(YD,f),c=v,()=>{a.removeEventListener(YD,f),c=null}},createHref(v){return t(a,v)},createURL:x,encodeLocation(v){let b=x(v);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:m,go(v){return s.go(v)}};return y}function $se(e,t=!1){let r="http://localhost";
49typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),mn(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:pg(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function HW(e,t,r="/"){return Bse(e,t,r,!1)}function Bse(e,t,r,n){let a=typeof t=="string"?Hp(t):t,i=lc(a.pathname||"/",r);if(i==null)return null;let s=qW(e);Use(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let u=Qse(i);l=Xse(s[c],u,n)}return l}function qW(e,t=[],r=[],n="",a=!1){let i=(s,l,c=a,u)=>{let d={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&c)return;mn(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let f=fl([n,d.relativePath]),p=r.concat(d);s.children&&s.children.length>0&&(mn(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),qW(s.children,t,p,f,c)),!(s.path==null&&!s.index)&&t.push({path:f,score:Kse(f,s.index),routesMeta:p})};return e.forEach((s,l)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))i(s,l);else for(let u of WW(s.path))i(s,l,!0,u)}),t}function WW(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let s=WW(n.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Use(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Yse(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var zse=/^:[\w-]+$/,Hse=3,qse=2,Wse=1,Vse=10,Gse=-2,QD=e=>e==="*";function Kse(e,t){let r=e.split("/"),n=r.length;return r.some(QD)&&(n+=Gse),t&&(n+=qse),r.filter(a=>!QD(a)).reduce((a,i)=>a+(zse.test(i)?Hse:i===""?Wse:Vse),n)}function Yse(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Xse(e,t,r=!1){let{routesMeta:n}=e,a={},i="/",s=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Xb({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),p=c.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Xb({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;
49Object.assign(a,f.params),s.push({params:a,pathname:fl([i,f.pathname]),pathnameBase:roe(fl([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=fl([i,f.pathnameBase]))}return s}function Xb(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Jse(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,{paramName:d,isOptional:f},p)=>{if(d==="*"){let x=l[p]||"";s=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const m=l[p];return f&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function Jse(e,t=!1,r=!0){Ys(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c,u,d)=>{if(n.push({paramName:l,isOptional:c!=null}),c){let f=d.charAt(u+s.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Qse(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ys(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function lc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var Zse=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function eoe(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Hp(e):e,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=ZD(r.substring(1),"/"):i=ZD(r,t)):i=t,{pathname:i,search:noe(n),hash:aoe(a)}}function ZD(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function S2(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function toe(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function uR(e){let t=toe(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Jw(e,t,r,n=!1){let a;typeof e=="string"?a=Hp(e):(a={...e},mn(!a.pathname||!a.pathname.includes("?"),S2("?","pathname","search",a)),mn(!a.pathname||!a.pathname.includes("#"),S2("#","pathname","hash",a)),mn(!a.search||!a.search.includes("#"),S2("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,l;if(s==null)l=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}l=f>=0?t[f]:"/"}let c=eoe(a,l),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var fl=e=>e.join("/").replace(/\/\/+/g,"/"),roe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),noe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,aoe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ioe=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function soe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ooe(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var VW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function GW(e,t){let r=e;if(typeof r!="string"||!Zse.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(VW)try{let i=new URL(window.location.href),s=r.startsWith("//")?new URL(i.protocol+r):new URL(r),l=lc(s.pathname,t);s.origin===i.origin&&l!=null?r=l+s.search+s.hash:a=!0}catch{Ys(!1,`<Link to="${r}">
49 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var KW=["POST","PUT","PATCH","DELETE"];new Set(KW);var loe=["GET",...KW];new Set(loe);var qp=N.createContext(null);qp.displayName="DataRouter";var Qw=N.createContext(null);Qw.displayName="DataRouterState";var coe=N.createContext(!1),YW=N.createContext({isTransitioning:!1});YW.displayName="ViewTransition";var uoe=N.createContext(new Map);uoe.displayName="Fetchers";var doe=N.createContext(null);doe.displayName="Await";var ms=N.createContext(null);ms.displayName="Navigation";var jx=N.createContext(null);jx.displayName="Location";var Ro=N.createContext({outlet:null,matches:[],isDataRoute:!1});Ro.displayName="Route";var dR=N.createContext(null);dR.displayName="RouteError";var XW="REACT_ROUTER_ERROR",foe="REDIRECT",hoe="ROUTE_ERROR_RESPONSE";function poe(e){if(e.startsWith(`${XW}:${foe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function moe(e){if(e.startsWith(`${XW}:${hoe}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ioe(t.status,t.statusText,t.data)}catch{}}function goe(e,{relative:t}={}){mn(Wp(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=N.useContext(ms),{hash:a,pathname:i,search:s}=Ax(e,{relative:t}),l=i;return r!=="/"&&(l=i==="/"?r:fl([r,i])),n.createHref({pathname:l,search:s,hash:a})}function Wp(){return N.useContext(jx)!=null}function Zs(){return mn(Wp(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(jx).location}var JW="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function QW(e){N.useContext(ms).static||N.useLayoutEffect(e)}function ei(){let{isDataRoute:e}=N.useContext(Ro);return e?Coe():xoe()}function xoe(){mn(Wp(),"useNavigate() may be used only in the context of a <Router> component.");let e=N.useContext(qp),{basename:t,navigator:r}=N.useContext(ms),{matches:n}=N.useContext(Ro),{pathname:a}=Zs(),i=JSON.stringify(uR(n)),s=N.useRef(!1);return QW(()=>{s.current=!0}),N.useCallback((c,u={})=>{if(Ys(s.current,JW),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=Jw(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:fl([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,i,a,e])}N.createContext(null);function yoe(){let{matches:e}=N.useContext(Ro),t=e[e.length-1];return t?t.params:{}}function Ax(e,{relative:t}={}){let{matches:r}=N.useContext(Ro),{pathname:n}=Zs(),a=JSON.stringify(uR(r));return N.useMemo(()=>Jw(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function voe(e,t){return ZW(e,t)}function ZW(e,t,r){var v;mn(Wp(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=N.useContext(ms),{matches:a}=N.useContext(Ro),i=a[a.length-1],s=i?i.params:{},l=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let b=u&&u.path||"";tV(l,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 50 51Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=Zs(),f;if(t){let b=typeof t=="string"?Hp(t):t;mn(c==="/"||((v=b.pathname)==null?void 0:v.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${b.pathname}" was given in the \`location\` prop.`),f=b}else f=d;let p=f.pathname||"/",m=p;if(c!=="/"){let b=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=HW(e,{pathname:m});Ys(u||x!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Ys(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=Eoe(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},s,b.params),pathname:fl([c,n.encodeLocation?n.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:fl([c,n.encodeLocation?n.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),a,r);return t&&y?N.createElement(jx.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...f},navigationType:"POP"}},y):y}function boe(){let e=Aoe(),t=soe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=N.createElement(N.Fragment,null,N.createElement("p",null,"ð¿ Hey developer ð"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:i},"ErrorBoundary")," or"," ",N.createElement("code",{style:i},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application
51Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),r?N.createElement("pre",{style:a},r):null,s)}var woe=N.createElement(boe,null),eV=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=moe(e.digest);r&&(e=r)}let t=e!==void 0?N.createElement(Ro.Provider,{value:this.props.routeContext},N.createElement(dR.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?N.createElement(_oe,{error:e},t):t}};eV.contextType=coe;var E2=new WeakMap;function _oe({children:e,error:t}){let{basename:r}=N.useContext(ms);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=poe(t.digest);if(n){let a=E2.get(t);if(a)throw a;let i=GW(n.location,r);if(VW&&!E2.get(t))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw E2.set(t,s),s}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Soe({routeContext:e,match:t,children:r}){let n=N.useContext(qp);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(Ro.Provider,{value:e},r)}function Eoe(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,i=n==null?void 0:n.errors;if(i!=null){let d=a.findIndex(f=>f.route.id&&(i==null?void 0:i[f.route.id])!==void 0);mn(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let s=!1,l=-1;if(r&&n){s=n.renderFallback;for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=d),f.route.id){let{loaderData:p,errors:m}=n,x=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!m||m[f.route.id]===void 0);if(f.route.lazy||x){r.isStatic&&(s=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let c=r==null?void 0:r.onError,u=n&&c?(d,f)=>{var p,m;c(d,{location:n.location,params:((m=(p=n.matches)==null?void 0:p[0])==null?void 0:m.params)??{},unstable_pattern:ooe(n.matches),errorInfo:f})}:void 0;return a.reduceRight((d,f,p)=>{let m,x=!1,y=null,v=null;n&&(m=i&&f.route.id?i[f.route.id]:void 0,y=f.route.errorElement||woe,s&&(l<0&&p===0?(tV("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,v=null):l===p&&(x=!0,v=f.route.hydrateFallbackElement||null)));let b=t.concat(a.slice(0,p+1)),w=()=>{let S;return m?S=y:x?S=v:f.route.Component?S=N.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=d,N.createElement(Soe,{match:f,routeContext:{outlet:d,matches:b,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?N.createElement(eV,{location:n.location,revalidation:n.revalidation,component:y,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0},onError:u}):w()},null)}function fR(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function koe(e){let t=N.useContext(qp);return mn(t,fR(e)),t}function Noe(e){let t=N.useContext(Qw);return mn(t,fR(e)),t}function Toe(e){let t=N.useContext(Ro);return mn(t,fR(e)),t}function hR(e){let t=Toe(e),r=t.matches[t.matches.length-1];return mn(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function joe(){return hR("useRouteId")}function Aoe(){var n;let e=N.useContext(dR),t=Noe("useRouteError"),r=hR("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Coe(){let{router:e}=koe("useNavigate"),t=hR("useNavigate"),r=N.useRef(!1);return QW(()=>{r.current=!0}),N.useCallback(async(a,i={})=>{Ys(r.current,JW),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var e5={};function tV(e,t,r){!t&&!e5[e]&&(e5[e]=!0,Ys(!1,r))}N.memo(Ooe);function Ooe({routes:e,future:t,state:r,isStatic:n,onError:a}){return ZW(e,void 0,{state:r,isStatic:n,onError:a})}function Poe({to:e,replace:t,state:r,relative:n}){mn(Wp(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=N.useContext(ms);Ys(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=N.useContext(Ro),{pathname:s}=Zs(),l=ei(),c=Jw(e,uR(i),s,n==="path"),u=JSON.stringify(c);return N.useEffect(()=>{l(JSON.parse(u),{replace:t,state:r,relative:n})},[l,u,n,t,r]),null}function Zi(e){mn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Roe({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:i=!1,unstable_useTransitions:s}){mn(!Wp(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=N.useMemo(()=>({basename:l,navigator:a,static:i,unstable_useTransitions:s,future:{}}),[l,a,i,s]);typeof r=="string"&&(r=Hp(r));
51let{pathname:u="/",search:d="",hash:f="",state:p=null,key:m="default",unstable_mask:x}=r,y=N.useMemo(()=>{let v=lc(u,l);return v==null?null:{location:{pathname:v,search:d,hash:f,state:p,key:m,unstable_mask:x},navigationType:n}},[l,u,d,f,p,m,n,x]);return Ys(y!=null,`<Router basename="${l}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:N.createElement(ms.Provider,{value:c},N.createElement(jx.Provider,{children:t,value:y}))}function Ioe({children:e,location:t}){return voe(rC(e),t)}function rC(e,t=[]){let r=[];return N.Children.forEach(e,(n,a)=>{if(!N.isValidElement(n))return;let i=[...t,a];if(n.type===N.Fragment){r.push.apply(r,rC(n.props.children,i));return}mn(n.type===Zi,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=rC(n.props.children,i)),r.push(s)}),r}var Fb="get",Mb="application/x-www-form-urlencoded";function Zw(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Foe(e){return Zw(e)&&e.tagName.toLowerCase()==="button"}function Moe(e){return Zw(e)&&e.tagName.toLowerCase()==="form"}function Doe(e){return Zw(e)&&e.tagName.toLowerCase()==="input"}function Loe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $oe(e,t){return e.button===0&&(!t||t==="_self")&&!Loe(e)}function nC(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Boe(e,t){let r=nC(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}var jv=null;function Uoe(){if(jv===null)try{new FormData(document.createElement("form"),0),jv=!1}catch{jv=!0}return jv}var zoe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function k2(e){return e!=null&&!zoe.has(e)?(Ys(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mb}"`),null):e}function Hoe(e,t){let r,n,a,i,s;if(Moe(e)){let l=e.getAttribute("action");n=l?lc(l,t):null,r=e.getAttribute("method")||Fb,a=k2(e.getAttribute("enctype"))||Mb,i=new FormData(e)}else if(Foe(e)||Doe(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(n=c?lc(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Fb,a=k2(e.getAttribute("formenctype"))||k2(l.getAttribute("enctype"))||Mb,i=new FormData(l,e),!Uoe()){let{name:u,type:d,value:f}=e;if(d==="image"){let p=u?`${u}.`:"";i.append(`${p}x`,"0"),i.append(`${p}y`,"0")}else u&&i.append(u,f)}}else{if(Zw(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Fb,n=null,a=Mb,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pR(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qoe(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&lc(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${n}`,a}async function Woe(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.
51isSpaMode,window.location.reload(),new Promise(()=>{})}}function Voe(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Goe(e,t,r){let n=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await Woe(i,r);return s.links?s.links():[]}return[]}));return Joe(n.flat(1).filter(Voe).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function t5(e,t,r,n,a,i){let s=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,l=(c,u)=>{var d;return r[u].pathname!==c.pathname||((d=r[u].route.path)==null?void 0:d.endsWith("*"))&&r[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>s(c,u)||l(c,u)):i==="data"?t.filter((c,u)=>{var f;let d=n.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(s(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Koe(e,t,{includeHydrateFallback:r}={}){return Yoe(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function Yoe(e){return[...new Set(e)]}function Xoe(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Joe(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let i=JSON.stringify(Xoe(a));return r.has(i)||(r.add(i),n.push({key:i,link:a})),n},[])}function rV(){let e=N.useContext(qp);return pR(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Qoe(){let e=N.useContext(Qw);return pR(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var mR=N.createContext(void 0);mR.displayName="FrameworkContext";function nV(){let e=N.useContext(mR);return pR(e,"You must render this element inside a <HydratedRouter> element"),e}function Zoe(e,t){let r=N.useContext(mR),[n,a]=N.useState(!1),[i,s]=N.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=N.useRef(null);N.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let y=b=>{b.forEach(w=>{s(w.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return p.current&&v.observe(p.current),()=>{v.disconnect()}}},[e]),N.useEffect(()=>{if(n){let y=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(y)}}},[n]);let m=()=>{a(!0)},x=()=>{a(!1),s(!1)};return r?e!=="intent"?[i,p,{}]:[i,p,{onFocus:n0(l,m),onBlur:n0(c,x),onMouseEnter:n0(u,m),onMouseLeave:n0(d,x),onTouchStart:n0(f,m)}]:[!1,p,{}]}function n0(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function ele({page:e,...t}){let{router:r}=rV(),n=N.useMemo(()=>HW(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?N.createElement(rle,{page:e,matches:n,...t}):null}function tle(e){let{manifest:t,routeModules:r}=nV(),[n,a]=N.useState([]);return N.useEffect(()=>{let i=!1;return Goe(e,t,r).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,r]),n}function rle({page:e,matches:t,...r}){let n=Zs(),{future:a,manifest:i,routeModules:s}=nV(),{basename:l}=rV(),{loaderData:c,matches:u}=Qoe(),d=N.useMemo(()=>t5(e,t,u,i,n,"data"),[e,t,u,i,n]),f=N.useMemo(()=>t5(e,t,u,i,n,"assets"),[e,t,u,i,n]),p=N.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,v=!1;if(t.forEach(w=>{var j;let S=i.routes[w.route.id];!S||!S.hasLoader||(!d.some(k=>k.route.id===w.route.id)&&w.route.id in c&&((j=s[w.route.id])!=null&&j.shouldRevalidate)||S.hasClientLoader?v=!0:y.add(w.route.id))}),y.size===0)return[];let b=qoe(e,l,a.unstable_trailingSlashAwareDataRequests,"data");return v&&y.size>0&&b.searchParams.set("_routes",t.filter(w=>y.has(w.route.id)).map(w=>w.route.id).join(",")),[b.pathname+b.search]},[l,a.unstable_trailingSlashAwareDataRequests,c,n,i,d,t,e,s]),m=N.useMemo(()=>Koe(f,i),[f,i]),x=tle(f);return N.createElement(N.Fragment,null,p.map(y=>N.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),m.map(y=>N.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),x.map(({key:y,link:v})=>N.createElement("link",{key:y,nonce:r.nonce,...v,crossOrigin:v.crossOrigin??r.crossOrigin})))}function nle(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var ale=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ale&&(window.__reactRouterVersion="7.13.1")}catch{}
51function ile({basename:e,children:t,unstable_useTransitions:r,window:n}){let a=N.useRef();a.current==null&&(a.current=Mse({window:n,v5Compat:!0}));let i=a.current,[s,l]=N.useState({action:i.action,location:i.location}),c=N.useCallback(u=>{r===!1?l(u):N.startTransition(()=>l(u))},[r]);return N.useLayoutEffect(()=>i.listen(c),[i,c]),N.createElement(Roe,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:r})}var aV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ra=N.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:i,replace:s,unstable_mask:l,state:c,target:u,to:d,preventScrollReset:f,viewTransition:p,unstable_defaultShouldRevalidate:m,...x},y){let{basename:v,navigator:b,unstable_useTransitions:w}=N.useContext(ms),S=typeof d=="string"&&aV.test(d),j=GW(d,v);d=j.to;let k=goe(d,{relative:a}),E=Zs(),T=null;if(l){let U=Jw(l,[],E.unstable_mask?E.unstable_mask.pathname:"/",!0);v!=="/"&&(U.pathname=U.pathname==="/"?v:fl([v,U.pathname])),T=b.createHref(U)}let[O,A,P]=Zoe(n,x),I=cle(d,{replace:s,unstable_mask:l,state:c,target:u,preventScrollReset:f,relative:a,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:w});function R(U){t&&t(U),U.defaultPrevented||I(U)}let M=!(j.isExternal||i),L=N.createElement("a",{...x,...P,href:(M?T:void 0)||j.absoluteURL||k,onClick:M?R:t,ref:nle(y,A),target:u,"data-discover":!S&&r==="render"?"true":void 0});return O&&!S?N.createElement(N.Fragment,null,L,N.createElement(ele,{page:k})):L});Ra.displayName="Link";var sle=N.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:i,to:s,viewTransition:l,children:c,...u},d){let f=Ax(s,{relative:u.relative}),p=Zs(),m=N.useContext(Qw),{navigator:x,basename:y}=N.useContext(ms),v=m!=null&&ple(f)&&l===!0,b=x.encodeLocation?x.encodeLocation(f).pathname:f.pathname,w=p.pathname,S=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(w=w.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&y&&(S=lc(S,y)||S);const j=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=w===b||!a&&w.startsWith(b)&&w.charAt(j)==="/",E=S!=null&&(S===b||!a&&S.startsWith(b)&&S.charAt(b.length)==="/"),T={isActive:k,isPending:E,isTransitioning:v},O=k?t:void 0,A;typeof n=="function"?A=n(T):A=[n,k?"active":null,E?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let P=typeof i=="function"?i(T):i;return N.createElement(Ra,{...u,"aria-current":O,className:A,ref:d,style:P,to:s,viewTransition:l},typeof c=="function"?c(T):c)});sle.displayName="NavLink";var ole=N.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:i,method:s=Fb,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...m},x)=>{let{unstable_useTransitions:y}=N.useContext(ms),v=fle(),b=hle(l,{relative:u}),w=s.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&aV.test(l),j=k=>{if(c&&c(k),k.defaultPrevented)return;k.preventDefault();let E=k.nativeEvent.submitter,T=(E==null?void 0:E.getAttribute("formmethod"))||s,O=()=>v(E||k.currentTarget,{fetcherKey:t,method:T,navigate:r,replace:a,state:i,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});y&&r!==!1?N.startTransition(()=>O()):O()};return N.createElement("form",{ref:x,method:w,action:b,onSubmit:n?c:j,...m,"data-discover":!S&&e==="render"?"true":void 0})});ole.displayName="Form";function lle(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iV(e){let t=N.useContext(qp);return mn(t,lle(e)),t}function cle(e,{target:t,replace:r,unstable_mask:n,state:a,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:u}={}){let d=ei(),f=Zs(),p=Ax(e,{relative:s});return N.useCallback(m=>{if($oe(m,t)){m.preventDefault();let x=r!==void 0?r:pg(f)===pg(p),y=()=>d(e,{replace:x,unstable_mask:n,state:a,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c});u?N.startTransition(()=>y()):y()}},[f,d,p,r,n,a,t,e,i,s,l,c,u])}function gR(e){Ys(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=N.useRef(nC(e)),r=N.useRef(!1),n=Zs(),a=N.useMemo(()=>Boe(n.search,r.current?null:t.current),[n.search]),i=ei(),s=N.useCallback((l,c)=>{const u=nC(typeof l=="function"?l(new URLSearchParams(a)):l);r.current=!0,i("?"+u,c)},[i,a]);return[a,s]}var ule=0,dle=()=>`__${String(++ule)}__`;function fle(){let{router:e}=iV("useSubmit"),{basename:t}=N.useContext(ms),r=joe(),n=e.fetch,a=e.navigate;return N.useCallback(async(i,s={})=>{let{action:l,method:c,encType:u,formData:d,body:f}=Hoe(i,t);if(s.navigate===!1){let p=s.fetcherKey||dle();await n(p,r,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:d,body:f,formMethod:s.method||c,formEncType:s.encType||u,flushSync:s.flushSync})}else await a(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:d,body:f,formMethod:s.method||c,formEncType:s.encType||u,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,t,r])}function hle(e,{relative:t}={}){let{basename:r}=N.useContext(ms),n=N.useContext(Ro);mn(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),i={...Ax(e||".",{relative:t})},s=Zs();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(f=>f).forEach(f=>l.append("index",f));let d=l.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:fl([r,i.pathname])),pg(i)}function ple(e,{relative:t}={}){let r=N.useContext(YW);mn(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=iV("useViewTransitionState"),a=Ax(e,{relative:t});if(!r.isTransitioning)return!1;let i=lc(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=lc(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Xb(a.pathname,s)!=null||Xb(a.pathname,i)!=null}var Ld=IW();const L0=tr(Ld);var N2={exports:{}},T2,r5;function mle(){if(r5)return T2;r5=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return T2=e,T2}var j2,n5;function gle(){if(n5)return j2;n5=1;var e=mle();function t(){}function r(){}return r.resetWarningCache=t,j2=function(){function n(s,l,c,u,d,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},j2}var a5;function xle(){return a5||(a5=1,N2.exports=gle()()),N2.exports}var yle=xle();const Q=tr(yle);function df(e,t,r,n){function a(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function l(d){try{u(n.next(d))}catch(f){s(f)}}function c(d){try{u(n.throw(d))}catch(f){s(f)}}function u(d){d.done?i(d.value):a(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}const vle
vendor: 41,168 bytes, line 51
51=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function
vendor: 7,620 bytes, lines 51-53
51Vh(e,t,r){const n=ble(e),{webkitRelativePath:a}=e,i=typeof t=="string"?t:typeof a=="string"&&a.length>0?a:`./${e.name}`;return typeof n.path!="string"&&i5(n,"path",i),i5(n,"relativePath",i),n}function ble(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),a=vle.get(n);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}function i5(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const wle=[".DS_Store","Thumbs.db"];function _le(e){return df(this,void 0,void 0,function*(){return Jb(e)&&Sle(e.dataTransfer)?Tle(e.dataTransfer,e.type):Ele(e)?kle(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Nle(e):[]})}function Sle(e){return Jb(e)}function Ele(e){return Jb(e)&&Jb(e.target)}function Jb(e){return typeof e=="object"&&e!==null}function kle(e){return aC(e.target.files).map(t=>Vh(t))}function Nle(e){return df(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>Vh(r))})}function Tle(e,t){return df(this,void 0,void 0,function*(){if(e.items){const r=aC(e.items).filter(a=>a.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(jle));return s5(sV(n))}return s5(aC(e.files).map(r=>Vh(r)))})}function s5(e){return e.filter(t=>wle.indexOf(t.name)===-1)}function aC(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function jle(e){if(typeof e.webkitGetAsEntry!="function")return o5(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?oV(t):o5(e,t)}function sV(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?sV(r):[r]],[])}function o5(e,t){return df(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const s=yield i.getFile();return s.handle=i,Vh(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return Vh(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Ale(e){return df(this,void 0,void 0,function*(){return e.isDirectory?oV(e):Cle(e)})}function oV(e){const t=e.createReader();return new Promise((r,n)=>{const a=[];function i(){t.readEntries(s=>df(this,void 0,void 0,function*(){if(s.length){const l=Promise.all(s.map(Ale));a.push(l),i()}else try{const l=yield Promise.all(a);r(l)}catch(l){n(l)}}),s=>{n(s)})}i()})}function Cle(e){return df(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const a=Vh(n,e.fullPath);t(a)},n=>{r(n)})})})}var Av={},l5;function Ole(){return l5||(l5=1,Av.__esModule=!0,Av.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",a=(e.type||"").toLowerCase(),i=a.replace(/\/.*$/,"");return r.some(function(s){var l=s.trim().toLowerCase();return l.charAt(0)==="."?n.toLowerCase().endsWith(l):l.endsWith("/*")?i===l.replace(/\/.*$/,""):a===l})}return!0}),Av}var Ple=Ole();const A2=tr(Ple);function c5(e){return Fle(e)||Ile(e)||cV(e)||Rle()}function Rle(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 52In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ile(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fle(e){if(Array.isArray(e))return iC(e)}function u5(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 d5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u5(Object(r),!0).forEach(function(n){lV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lV(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mg(e,t){return Lle(e)||Dle(e,t)||cV(e,t)||Mle()}function Mle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 53In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cV(e,t){if(e){if(typeof e=="string")return iC(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 iC(e,t)}}function iC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dle(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,i=!1,s,l;try{for(r=r.call(e);!(a=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));a=!0);}catch(c){i=!0,l=c}finally{try{!a&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Lle(e){if(Array.isArray(e))return e}var $le=typeof A2=="function"?A2:A2.default,Ble="file-invalid-type",Ule="file-too-large",zle="file-too-small",Hle="too-many-files",qle=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:Ble,message:"File type must be ".concat(n)}},f5=function(t){return{code:Ule,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},h5=function(t){return{code:zle,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Wle={code:Hle,message:"Too many files"};function uV(e,t){var r=e.type==="application/x-moz-file"||$le(e,t);return[r,r?null:qle(t)]}function dV(e,t,r){if(yd(e.size))if(yd(t)&&yd(r)){if(e.size>r)return[!1,f5(r)];if(e.size<t)return[!1,h5(t)]}else{if(yd(t)&&e.size<t)return[!1,h5(t)];if(yd(r)&&e.size>r)return[!1,f5(r)]}return[!0,null]}function yd(e){return e!=null}function Vle(e){var t=e.files,r=e.accept,n=e.minSize,a=e.maxSize,i=e.multiple,s=e.maxFiles,l=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(c){var u=uV(c,r),d=mg(u,1),f=d[0],p=dV(c,n,a),m=mg(p,1),x=m[0],y=l?l(c):null;return f&&x&&!y})}function Qb(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Cv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function p5(e){e.preventDefault()}function Gle(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Kle(e){return e.indexOf("Edge/")!==-1}function Yle(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Gle(e)||Kle(e)}function qo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];return t.some(function(l){return!Qb(n)&&l&&l.apply(void 0,[n].concat(i)),Qb(n)})}}function Xle(){return"showOpenFilePicker"in window}function Jle(e){if(yd(e)){var t=Object.entries(e).filter(function(r){var n=mg(r,2),a=n[0],i=n[1],s=!0;return fV(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(hV))&&(console.warn('Skipped "'.concat(a,'" because an invali
53d file extension was provided.')),s=!1),s}).reduce(function(r,n){var a=mg(n,2),i=a[0],s=a[1];return d5(d5({},r),{},lV({},i,s))},{});return[{description:"Files",accept:t}]}return e}function Qle(e){if(yd(e))return Object.entries(e).reduce(function(t,r){var n=mg(r,2),a=n[0],i=n[1];return[].concat(c5(t),[a],c5(i))},[]).filter(function(t){return fV(t)||hV(t)}).join(",")}function Zle(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ece(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function fV(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function hV(e){return/^.*\.[\w]+$/.test(e)}var tce=["children"],rce=["open"],nce=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ace=["refKey","onChange","onClick"];function ice(e){return lce(e)||oce(e)||pV(e)||sce()}function sce(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 54In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lce(e){if(Array.isArray(e))return sC(e)}function C2(e,t){return dce(e)||uce(e,t)||pV(e,t)||cce()}function cce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 55In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pV(e,t){if(e){if(typeof e=="string")return sC(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 sC(e,t)}}function sC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uce(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,i=!1,s,l;try{for(r=r.call(e);!(a=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));a=!0);}catch(c){i=!0,l=c}finally{try{!a&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function dce(e){if(Array.isArray(e))return e}function m5(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 vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m5(Object(r),!0).forEach(function(n){oC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zb(e,t){if(e==null)return{};var r=fce(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fce(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var xR=N.forwardRef(function(e,t){var r=e.children,n=Zb(e,tce),a=gV(n),i=a.open,s=Zb(a,rce);return N.useImperativeHandle(t,function(){return{open:i}},[i]),se.createElement(N.Fragment,null,r(vn(vn({},s),{},{open:i})))});xR.displayName="Dropzone";var mV={disabled:!1,getFilesFromEvent:_le,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};xR.defaultProps=mV;xR.propTypes={children:Q.func,accept:Q.objectOf(Q.arrayOf(Q.string)),multiple:Q.bool,preventDropOnDocument:Q.bool,noClick:Q.bool,noKeyboard:Q.bool,noDrag:Q.bool,noDragEventsBubbling:Q.bool,minSize:Q.number,maxSize:Q.number,maxFiles:Q.number,disabled:Q.bool,getFilesFromEvent:Q.func,onFileDialogCancel:Q.func,onFileDialogOpen:Q.func,useFsAccessApi:Q.bool,autoFocus:Q.bool,onDragEnter:Q.func,onDragLeave:Q.func,onDragOver:Q.func,onDrop:Q.func,onDropAccepted:Q.func,onDropRejected:Q.func,onError:Q.func,validator:Q.func};var lC={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function gV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vn(vn({},mV),e),r=t.accept,n=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,p=t.onDrop,m=t.onDropAccepted,x=t.onDropRejected,y=t.onFileDialogCancel,v=t.onFileDialogOpen,b=t.useFsAccessApi,w=t.autoF
vendor: 7,724 bytes, lines 55-75
55ocus,S=t.preventDropOnDocument,j=t.noClick,k=t.noKeyboard,E=t.noDrag,T=t.noDragEventsBubbling,O=t.onError,A=t.validator,P=N.useMemo(function(){return Qle(r)},[r]),I=N.useMemo(function(){return Jle(r)},[r]),R=N.useMemo(function(){return typeof v=="function"?v:g5},[v]),M=N.useMemo(function(){return typeof y=="function"?y:g5},[y]),L=N.useRef(null),U=N.useRef(null),W=N.useReducer(hce,lC),V=C2(W,2),G=V[0],K=V[1],F=G.isFocused,ne=G.isFileDialogActive,H=N.useRef(typeof window<"u"&&window.isSecureContext&&b&&Xle()),B=function(){!H.current&&ne&&setTimeout(function(){if(U.current){var ve=U.current.files;ve.length||(K({type:"closeDialog"}),M())}},300)};N.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[U,ne,M,H]);var X=N.useRef([]),Y=function(ve){L.current&&L.current.contains(ve.target)||(ve.preventDefault(),X.current=[])};N.useEffect(function(){return S&&(document.addEventListener("dragover",p5,!1),document.addEventListener("drop",Y,!1)),function(){S&&(document.removeEventListener("dragover",p5),document.removeEventListener("drop",Y))}},[L,S]),N.useEffect(function(){return!n&&w&&L.current&&L.current.focus(),function(){}},[L,w,n]);var ae=N.useCallback(function(te){O?O(te):console.error(te)},[O]),fe=N.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te),X.current=[].concat(ice(X.current),[te.target]),Cv(te)&&Promise.resolve(a(te)).then(function(ve){if(!(Qb(te)&&!T)){var J=ve.length,me=J>0&&Vle({files:ve,accept:P,minSize:s,maxSize:i,multiple:l,maxFiles:c,validator:A}),Ee=J>0&&!me;K({isDragAccept:me,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(te)}}).catch(function(ve){return ae(ve)})},[a,u,ae,T,P,s,i,l,c,A]),ue=N.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te);var ve=Cv(te);if(ve&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return ve&&f&&f(te),!1},[f,T]),oe=N.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te);var ve=X.current.filter(function(me){return L.current&&L.current.contains(me)}),J=ve.indexOf(te.target);J!==-1&&ve.splice(J,1),X.current=ve,!(ve.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Cv(te)&&d&&d(te))},[L,d,T]),Z=N.useCallback(function(te,ve){var J=[],me=[];te.forEach(function(Ee){var Me=uV(Ee,P),Ae=C2(Me,2),Ke=Ae[0],jt=Ae[1],Ce=dV(Ee,s,i),xt=C2(Ce,2),bt=xt[0],Pt=xt[1],_r=A?A(Ee):null;if(Ke&&bt&&!_r)J.push(Ee);else{var Ht=[jt,Pt];_r&&(Ht=Ht.concat(_r)),me.push({file:Ee,errors:Ht.filter(function(Zr){return Zr})})}}),(!l&&J.length>1||l&&c>=1&&J.length>c)&&(J.forEach(function(Ee){me.push({file:Ee,errors:[Wle]})}),J.splice(0)),K({acceptedFiles:J,fileRejections:me,isDragReject:me.length>0,type:"setFiles"}),p&&p(J,me,ve),me.length>0&&x&&x(me,ve),J.length>0&&m&&m(J,ve)},[K,l,P,s,i,c,p,m,x,A]),ce=N.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te),X.current=[],Cv(te)&&Promise.resolve(a(te)).then(function(ve){Qb(te)&&!T||Z(ve,te)}).catch(function(ve){return ae(ve)}),K({type:"reset"})},[a,Z,ae,T]),q=N.useCallback(function(){if(H.current){K({type:"openDialog"}),R();var te={multiple:l,types:I};window.showOpenFilePicker(te).then(function(ve){return a(ve)}).then(function(ve){Z(ve,null),K({type:"closeDialog"})}).catch(function(ve){Zle(ve)?(M(ve),K({type:"closeDialog"})):ece(ve)?(H.current=!1,U.current?(U.current.value=null,U.current.click()):ae(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ae(ve)});return}U.current&&(K({type:"openDialog"}),R(),U.current.value=null,U.current.click())},[K,R,M,b,Z,ae,I,l]),xe=N.useCallback(function(te){!L.current||!L.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),q())},[L,q]),pe=N.useCallback(function(){K({type:"focus"})},[]),Se=N.useCallback(function(){K({type:"blur"})},[]),he=N.useCallback(function(){j||(Yle()?setTimeout(q,0):q())},[j,q]),ie=function(ve){return n?null:ve},we=function(ve){return k?null:ie(ve)},ke=function(ve){return E?null:ie(ve)},Oe=function(ve){T&&ve.stopPropagation()},Ue=N.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ve=te.refKey,J=ve===void 0?"ref":ve,me=te.role,Ee=te.onKeyDown,Me=te.onFocus,Ae=te.onBlur,Ke=te.onClick,jt=te.onDragEnter,Ce=te.onDragOver,xt=te.onDragLeave,bt=te.onDrop,Pt=Zb(te,nce);return vn(vn(oC({onKeyDown:we(qo(Ee,xe)),onFocus:we(qo(Me,pe)),onBlur:we(qo(Ae,Se)),onClick:ie(qo(Ke,he)),onDragEnter:ke(qo(jt,fe)),onDragOver:ke(qo(Ce,ue)),onDragLeave:ke(qo(xt,oe)),onDrop:ke(qo(bt,ce)),role:typeof me=="string"&&me!==""?me:"presentation"},J,L),!n&&!k?{tabIndex:0}:{}),Pt)}},[L,xe,pe,Se,he,fe,ue,oe,ce,k,E,n]),Je=N.useCallback(function(te){te.stopPropagation()},[]),Ze=N.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ve=te.refKey,J=ve===void 0?"ref":ve,me=te.onChange,Ee=te.onClick,Me=Zb(te,ace),Ae=oC({accept:P,multiple:l,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ie(qo(me,ce)),onClick:ie(qo(Ee,Je)),tabIndex:-1},J,U);return vn(vn({},Ae),Me)}},[U,r,l,ce,n]);return vn(vn({},G),{},{isFocused:F&&!n,getRootProps:Ue,getInputProps:Ze,rootRef:L,inputRef:U,open:ie(q)})}function hce(e,t){switch(t.type){case"focus":return vn(vn({},e),{},{isFocused:!0});case"blur":return vn(vn({},e),{},{isFocused:!1});case"openDialog":return vn(vn({},lC),{},{isFileDialogActive:!0});case"closeDialog":return vn(vn({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vn(vn({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vn(vn({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vn({},lC);default:return e}}function g5(){}/** 56 * @license lucide-react v0.488.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const pce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mce=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),x5=e=>{const t=mce(e);return t.charAt(0).toUpperCase()+t.slice(1)},xV=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 61 * @license lucide-react v0.488.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */var gce={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 66 * @license lucide-react v0.488.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const xce=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...l},c)=>N.createElement("svg",{ref:c,...gce,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:xV("lucide",a),...l},[...s.map(([u,d])=>N.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 71 * @license lucide-react v0.488.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const ut=(e,t)=>{const r=N.forwardRef(({className:n,...a},i)=>N.createElement(xce,{ref:i,iconNode:t,className:xV(`lucide-${pce(x5(e))}`,`lucide-${e}`,n),...a}
75));return r.displayName=x5(e),r};/** 76 * @license lucide-react v0.488.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const yce=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],cC=ut("activity",yce);/** 81 * @license lucide-react v0.488.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const vce=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],bce=ut("arrow-down-wide-narrow",vce);/** 86 * @license lucide-react v0.488.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const wce=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],_ce=ut("arrow-down",wce);/** 91 * @license lucide-react v0.488.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const Sce=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],wu=ut("arrow-left",Sce);/** 96 * @license lucide-react v0.488.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const Ece=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],yV=ut("arrow-right",Ece);/** 101 * @license lucide-react v0.488.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const kce=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]],Nce=ut("arrow-up-narrow-wide",kce);/** 106 * @license lucide-react v0.488.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const Tce=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],jce=ut("arrow-up",Tce);/** 111 * @license lucide-react v0.488.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const Ace=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]],Cce=ut("bookmark-plus",Ace);/** 116 * @license lucide-react v0.488.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const Oce=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],yc=ut("brain",Oce);/** 121 * @license lucide-react v0.488.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const Pce=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
125],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],uC=ut("building-2",Pce);/** 126 * @license lucide-react v0.488.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const Rce=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],_i=ut("building",Rce);/** 131 * @license lucide-react v0.488.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const Ice=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],_u=ut("calendar",Ice);/** 136 * @license lucide-react v0.488.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const Fce=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],y5=ut("chart-column",Fce);/** 141 * @license lucide-react v0.488.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const Mce=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],yR=ut("chart-no-axes-column",Mce);/** 146 * @license lucide-react v0.488.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const Dce=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$n=ut("check",Dce);/** 151 * @license lucide-react v0.488.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const Lce=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kr=ut("chevron-down",Lce);/** 156 * @license lucide-react v0.488.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const $ce=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],vR=ut("chevron-left",$ce);/** 161 * @license lucide-react v0.488.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const Bce=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yl=ut("chevron-right",Bce);/** 166 * @license lucide-react v0.488.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const Uce=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],eo=ut("chevron-up",Uce);/** 171 * @license lucide-react v0.488.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const zce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Jr=ut("circle-alert",zce);/** 176 * @license lucide-react v0.488.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const Hce=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],vl=ut("circle-check-big",Hce);/** 181 * @license lucide-react v0.488.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const qce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],O2=ut("circle-check",qce);/** 186 * @license lucide-react v0.488.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const Wce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],v5=ut("circle-help",Wce);/** 191 * @license lucide-react v0.488.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const Vce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],$d=ut("circle-x",Vce);/** 196 * @license lucide-react v0.488.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const Gce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],P2=ut("circle",Gce);/** 201 * @license lucide-react v0.488.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const Kce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],$0=ut("clock",Kce);/** 206 * @license lucide-react v0.488.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const Yce=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],R2=ut("cloud-upload",Yce);/** 211 * @license lucide-react v0.488.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree.
215 */const Xce=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],e_=ut("columns-2",Xce);/** 216 * @license lucide-react v0.488.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const Jce=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Qce=ut("compass",Jce);/** 221 * @license lucide-react v0.488.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const Zce=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],dC=ut("credit-card",Zce);/** 226 * @license lucide-react v0.488.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const eue=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],bl=ut("dollar-sign",eue);/** 231 * @license lucide-react v0.488.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const tue=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],vc=ut("download",tue);/** 236 * @license lucide-react v0.488.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const rue=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],nue=ut("external-link",rue);/** 241 * @license lucide-react v0.488.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const aue=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],gg=ut("eye-off",aue);/** 246 * @license lucide-react v0.488.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const iue=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],cc=ut("eye",iue);/** 251 * @license lucide-react v0.488.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const sue=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]],b5=ut("file-chart-column-increasing",sue);/** 256 * @license lucide-react v0.488.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const oue=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],vV=ut("file-spreadsheet",oue);/** 261 * @license lucide-react v0.488.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const lue=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Sn=ut("file-text",lue);/** 266 * @license lucide-react v0.488.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const cue=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]],uue=ut("file-up",cue);/** 271 * @license lucide-react v0.488.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const due=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],fue=ut("file-x",due);/** 276 * @license lucide-react v0.488.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const hue=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],bV=ut("funnel",hue);/** 281 * @license lucide-react v0.488.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const pue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],mue=ut("globe",pue);/** 286 * @license lucide-react v0.488.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const gue=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Ru=ut("house",gue);/** 291 * @license lucide-react v0.488.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const xue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bR=ut("info",xue);/** 296 * @license lucide-react v0.488.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const yue=[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]],e1=ut("landmark",yue);/** 301 * @license lucide-react v0.488.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const vue=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],fC=ut("layers",vue);/** 306 * @license lucide-react v0.488.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const bue=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ar=ut("loader-circle",bue);/** 311 * @license lucide-react v0.488.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const wue=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],hC=ut("lock",wue);/** 316 * @license lucide-react v0.488.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const _ue=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Sue=ut("log-out",_ue);/** 321 * @license lucide-react v0.488.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const Eue=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],wV=ut("mail",Eue);/** 326 * @license lucide-react v0.488.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const kue=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],_V=ut("map-pin",kue);/** 331 * @license lucide-react v0.488.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const Nue=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],SV=ut("menu",Nue);/** 336 * @license lucide-react v0.488.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const Tue=[["path",{d:"M5 12h14",key:"1ays0h"}]],wR=ut("minus",Tue);/** 341 * @license lucide-react v0.488.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const jue=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],_R=ut("pen",jue);/** 346 * @license lucide-react v0.488.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const Aue=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],SR=ut("pencil",Aue);/** 351 * @license lucide-react v0.488.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const Cue=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],Oue=ut("phone",Cue);/** 356 * @license lucide-react v0.488.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const Pue=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Rue=ut("play",Pue);/** 361 * @license lucide-react v0.488.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const Iue=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],Fue=ut("refresh-ccw",Iue);/** 366 * @license lucide-react v0.488.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const Mue=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Gh=ut("refresh-cw",Mue);/** 371 * @license lucide-react v0.488.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const Due=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],EV=ut("rotate-ccw",Due);/** 376 * @license lucide-react v0.488.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const Lue=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Po=ut("save",Lue);/** 381 * @license lucide-react v0.488.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const $ue=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ER=ut("search",$ue);/** 386 * @license lucide-react v0.488.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const Bue=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Uue=ut("send",Bue);/** 391 * @license lucide-react v0.488.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const zue=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],uc=ut("settings",zue);/** 396 * @license lucide-react v0.488.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const Hue=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
400y:"oel41y"}]],que=ut("shield",Hue);/** 401 * @license lucide-react v0.488.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const Wue=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Cx=ut("sparkles",Wue);/** 406 * @license lucide-react v0.488.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const Vue=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Gue=ut("square-check-big",Vue);/** 411 * @license lucide-react v0.488.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const Kue=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],w5=ut("square-pen",Kue);/** 416 * @license lucide-react v0.488.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const Yue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Xue=ut("square",Yue);/** 421 * @license lucide-react v0.488.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const Jue=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Que=ut("star",Jue);/** 426 * @license lucide-react v0.488.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const Zue=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],kV=ut("table",Zue);/** 431 * @license lucide-react v0.488.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const ede=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],tde=ut("tag",ede);/** 436 * @license lucide-react v0.488.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const rde=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],wl=ut("trash-2",rde);/** 441 * @license lucide-react v0.488.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const nde=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],NV=ut("trending-down",nde);/** 446 * @license lucide-react v0.488.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const ade=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],Vp=ut("trending-up",ade);/** 451 * @license lucide-react v0.488.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const ide=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Bi=ut("triangle-alert",ide);/** 456 * @license lucide-react v0.488.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const sde=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],t1=ut("upload",sde);/** 461 * @license lucide-react v0.488.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const ode=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],pC=ut("user",ode);/** 466 * @license lucide-react v0.488.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const lde=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Gp=ut("users",lde);/** 471 * @license lucide-react v0.488.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const cde=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],TV=ut("wand-sparkles",cde);/** 476 * @license lucide-react v0.488.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const ude=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 21,380 bytes, lines 480-499
480],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ir=ut("x",ude);/** 481 * @license lucide-react v0.488.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const dde=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],mC=ut("zap",dde);var Db={exports:{}};/* @license 486Papa Parse 487v5.5.1 488https://github.com/mholt/PapaParse 489License: MIT 490*/var fde=Db.exports,_5;function hde(){return _5||(_5=1,(function(e,t){((r,n)=>{e.exports=n()})(fde,function r(){var n=typeof self<"u"?self:typeof window<"u"?window:n!==void 0?n:{},a,i=!n.document&&!!n.postMessage,s=n.IS_PAPA_WORKER||!1,l={},c=0,u={};function d(O){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(A){var P=k(A);P.chunkSize=parseInt(P.chunkSize),A.step||A.chunk||(P.chunkSize=null),this._handle=new y(P),(this._handle.streamer=this)._config=P}).call(this,O),this.parseChunk=function(A,P){var I=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<I){let M=this._config.newline;M||(R=this._config.quoteChar||'"',M=this._handle.guessLineEndings(A,R)),A=[...A.split(M).slice(I)].join(M)}this.isFirstChunk&&T(this._config.beforeFirstChunk)&&(R=this._config.beforeFirstChunk(A))!==void 0&&(A=R),this.isFirstChunk=!1,this._halted=!1;var I=this._partialLine+A,R=(this._partialLine="",this._handle.parse(I,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(A=R.meta.cursor,I=(this._finished||(this._partialLine=I.substring(A-this._baseIndex),this._baseIndex=A),R&&R.data&&(this._rowCount+=R.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),s)n.postMessage({results:R,workerId:u.WORKER_ID,finished:I});else if(T(this._config.chunk)&&!P){if(this._config.chunk(R,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=R=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(R.data),this._completeResults.errors=this._completeResults.errors.concat(R.errors),this._completeResults.meta=R.meta),this._completed||!I||!T(this._config.complete)||R&&R.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),I||R&&R.meta.paused||this._nextChunk(),R}this._halted=!0},this._sendError=function(A){T(this._config.error)?this._config.error(A):s&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:A,finished:!1})}}function f(O){var A;(O=O||{}).chunkSize||(O.chunkSize=u.RemoteChunkSize),d.call(this,O),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(P){this._input=P,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(A=new XMLHttpRequest,this._config.withCredentials&&(A.withCredentials=this._config.withCredentials),i||(A.onload=E(this._chunkLoaded,this),A.onerror=E(this._chunkError,this)),A.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var P,I=this._config.downloadRequestHeaders;for(P in I)A.setRequestHeader(P,I[P])}var R;this._config.chunkSize&&(R=this._start+this._config.chunkSize-1,A.setRequestHeader("Range","bytes="+this._start+"-"+R));try{A.send(this._config.downloadRequestBody)}catch(M){this._chunkError(M.message)}i&&A.status===0&&this._chunkError()}},this._chunkLoaded=function(){A.readyState===4&&(A.status<200||400<=A.status?this._chunkError():(this._start+=this._config.chunkSize||A.responseText.length,this._finished=!this._config.chunkSize||this._start>=(P=>(P=P.getResponseHeader("Content-Range"))!==null?parseInt(P.substring(P.lastIndexOf("/")+1)):-1)(A),this.parseChunk(A.responseText)))},this._chunkError=function(P){P=A.statusText||P,this._sendError(new Error(P))}}function p(O){(O=O||{}).chunkSize||(O.chunkSize=u.LocalChunkSize),d.call(this,O);var A,P,I=typeof FileReader<"u";this.stream=function(R){this._input=R,P=R.slice||R.webkitSlice||R.mozSlice,I?((A=new FileReader).onload=E(this._chunkLoaded,this),A.onerror=E(this._chunkError,this)):A=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var R=this._input,M=(this._config.chunkSize&&(M=Math.min(this._start+this._config.chunkSize,this._input.size),R=P.call(R,this._start,M)),A.readAsText(R,this._config.encoding));I||this._chunkLoaded({target:{result:M}})},this._chunkLoaded=function(R){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(R.target.result)},this._chunkError=function(){this._sendError(A.error)}}function m(O){var A;d.call(this,O=O||{}),this.stream=function(P){return A=P,this._nextChunk()},this._nextChunk=function(){var P,I;if(!this._finished)return P=this._config.chunkSize,A=P?(I=A.substring(0,P),A.substring(P)):(I=A,""),this._finished=!A,this.parseChunk(I)}}function x(O){d.call(this,O=O||{});var A=[],P=!0,I=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(R){this._input=R,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){I&&A.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),A.length?this.parseChunk(A.shift()):P=!0},this._streamData=E(function(R){try{A.push(typeof R=="string"?R:R.toString(this._config.encoding)),P&&(P=!1,this._checkIsFinished(),this.parseChunk(A.shift()))}catch(M){this._streamError(M)}},this),this._streamError=E(function(R){this._streamCleanUp(),this._sendError(R)},this),this._streamEnd=E(function(){this._streamCleanUp(),I=!0,this._streamData("")},this),this._streamCleanUp=E(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function y(O){var A,P,I,R,M=Math.pow(2,53),L=-M,U=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,W=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,V=this,G=0,K=0,F=!1,ne=!1,H=[],B={data:[],errors:[],meta:{}};function X(ue){return O.skipEmptyLines==="greedy"?ue.join("").trim()==="":ue.length===1&&ue[0].length===0}function Y(){if(B&&I&&(fe("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),I=!1),O.skipEmptyLines&&(B.data=B.data.filter(function(q){return!X(q)})),ae()){let q=function(xe,pe){T(O.transformHeader)&&(xe=O.transformHeader(xe,pe)),H.push(xe)};var ce=q;if(B)if(Array.isArray(B.data[0])){for(var ue=0;ae()&&ue<B.data.length;ue++)B.data[ue].forEach(q);B.data.splice(0,1)}else B.data.forEach(q)}function oe(q,xe){for(var pe=O.header?{}:[],Se=0;Se<q.length;Se++){var he=Se,ie=q[Se],ie=((we,ke)=>(Oe=>(O.dynamicTypingFunction&&O.dynamicTyping[Oe]===void 0&&(O.dynamicTyping[Oe]=O.dynamicTypingFunction(Oe)),(O.dynamicTyping[Oe]||O.dynamicTyping)===!0))(we)?ke==="true"||ke==="TRUE"||ke!=="false"&&ke!=="FALSE"&&((Oe=>{if(U.test(Oe)&&(Oe=parseFloat(Oe),L<Oe&&Oe<M))return 1})(ke)?parseFloat(ke):W.test(ke)?new Date(ke):ke===""?null:ke):ke)(he=O.header?Se>=H.length?"__parsed_extra":H[Se]:he,ie=O.transform?O.transform(ie,he):ie);he==="__parsed_extra"?(pe[he]=pe[he]||[],pe[he].push(ie)):pe[he]=ie}return O.header&&(Se>H.length?fe("FieldMismatch","TooManyFields","Too many fields: expected "+H.length+" fields but parsed "+Se,K+xe):Se<H.length&&fe("FieldMismatch","TooFewFields","Too few fields: expected "+H.length+" fields but parsed "+Se,K+xe)),pe}var Z;B&&(O.header||O.dynamicTyping||O.transform)&&(Z=1,!B.data.length||Array.isArray(B.data[0])?(B.data=B.data.map(oe),Z=B.data.length):B.data=oe(B.data,0),O.header&&B.meta&&(B.meta.fields=H),K+=Z)}function ae(){return O.header&&H.length===0}function fe(ue,oe,Z,ce){ue={type:ue,code:oe,message:Z},ce!==void 0&&(ue.row=ce),B.errors.push(ue)}T(O.step)&&(R=O.step,O.step=function(ue){B=ue,ae()?Y():(Y(),B.data.length!==0&&(G+=ue.data.length,O.preview&&G>O.preview?P.abort():(B.data=B.data[0],R(B,V))))}),this.parse=function(ue,oe,Z){var ce=O.quoteChar||'"',ce=(O.newline||(O.newline=this.guessLineEndings(ue,ce)),I=!1,O.delimiter?T(O.delimiter)&&(O.delimiter=O.delimiter(ue),B.meta.delimiter=O.delimiter):((ce=((q,xe,pe,Se,he)=>{var ie,we,ke,Oe;he=he||[","," ","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var Ue=0;Ue<he.length;Ue++){for(var Je,Ze=he[Ue],te=0,ve=0,J=0,me=(ke=void 0,new b({comments:Se,delimiter:Ze,newline:xe,preview:10}).parse(q)),Ee=0;Ee<me.data.length;Ee++)pe&&X(me.data[Ee])?J++:(Je=me.data[Ee].length,ve+=Je,ke===void 0?ke=Je:0<Je&&(te+=Math.abs(Je-ke),ke=Je));0<me.data.length&&(ve/=me.data.length-J),(we===void 0||te<=we)&&(Oe===void 0||Oe<ve)&&1.99<ve&&(we=te,ie=Ze,Oe=ve)}return{successful:!!(O.delimiter=ie),bestDelimiter:ie}})(ue,O.newline,O.skipEmptyLines,O.comments,O.delimitersToGuess)).successful?O.delimiter=ce.bestDelimiter:(I=!0,O.delimiter=u.DefaultDelimiter),B.meta.delimiter=O.delimiter),k(O));return O.preview&&O.header&&ce.preview++,A=ue,P=new b(ce),B=P.parse(A,oe,Z),Y(),F?{meta:{paused:!0}}:B||{meta:{paused:!1}}},this.paused=function(){return F},this.pause=function(){F=!0,P.abort(),A=T(O.chunk)?"":A.substring(P.getCharIndex())},this.resume=function(){V.streamer._halted?(F=!1,V.streamer.parseChunk(A,!0)):setTimeout(V.resume,3)},this.aborted=function(){return ne},this.abort=function(){ne=!0,P.abort(),B.meta.aborted=!0,T(O.complete)&&O.complete(B),A=""},this.guessLineEndings=function(q,ce){q=q.substring(0,1048576);var ce=new RegExp(v(ce)+"([^]*?)"+v(ce),"gm"),Z=(q=q.replace(ce,"")).split("\r"),ce=q.split(` 491`),q=1<ce.length&&ce[0].length<Z[0].length;if(Z.length===1||q)return` 492`;for(var xe=0,pe=0;pe<Z.length;pe++)Z[pe][0]===` 493`&&xe++;return xe>=Z.length/2?`\r 494`:"\r"}}function v(O){return O.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(O){var A=(O=O||{}).delimiter,P=O.newline,I=O.comments,R=O.step,M=O.preview,L=O.fastMode,U=null,W=O.quoteChar==null?'"':O.quoteChar,V=W;if(O.escapeChar!==void 0&&(V=O.escapeChar),(typeof A!="string"||-1<u.BAD_DELIMITERS.indexOf(A))&&(A=","),I===A)throw new Error("Comment character same as delimiter");I===!0?I="#":(typeof I!="string"||-1<u.BAD_DELIMITERS.indexOf(I))&&(I=!1),P!==` 495`&&P!=="\r"&&P!==`\r 496`&&(P=` 497`);var G=0,K=!1;this.parse=function(F,ne,H){if(typeof F!="string")throw new Error("Input must be a string");var B=F.length,X=A.length,Y=P.length,ae=I.length,fe=T(R),ue=[],oe=[],Z=[],ce=G=0;if(!F)return Ze();if(L||L!==!1&&F.indexOf(W)===-1){for(var q=F.split(P),xe=0;xe<q.length;xe++){if(Z=q[xe],G+=Z.length,xe!==q.length-1)G+=P.length;else if(H)return Ze();if(!I||Z.substring(0,ae)!==I){if(fe){if(ue=[],ke(Z.split(A)),te(),K)return Ze()}else ke(Z.split(A));if(M&&M<=xe)return ue=ue.slice(0,M),Ze(!0)}}return Ze()}for(var pe=F.indexOf(A,G),Se=F.indexOf(P,G),he=new RegExp(v(V)+v(W),"g"),ie=F.indexOf(W,G);;)if(F[G]===W)for(ie=G,G++;;){if((ie=F.indexOf(W,ie+1))===-1)return H||oe.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:ue.length,index:G}),Ue();if(ie===B-1)return Ue(F.substring(G,ie).replace(he,W));if(W===V&&F[ie+1]===V)ie++;else if(W===V||ie===0||F[ie-1]!==V){pe!==-1&&pe<ie+1&&(pe=F.indexOf(A,ie+1));var we=Oe((Se=Se!==-1&&Se<ie+1?F.indexOf(P,ie+1):Se)===-1?pe:Math.min(pe,Se));if(F.substr(ie+1+we,X)===A){Z.push(F.substring(G,ie).replace(he,W)),F[G=ie+1+we+X]!==W&&(ie=F.indexOf(W,G)),pe=F.indexOf(A,G),Se=F.indexOf(P,G);break}if(we=Oe(Se),F.substring(ie+1+we,ie+1+we+Y)===P){if(Z.push(F.substring(G,ie).replace(he,W)),Je(ie+1+we+Y),pe=F.indexOf(A,G),ie=F.indexOf(W,G),fe&&(te(),K))return Ze();if(M&&ue.length>=M)return Ze(!0);break}oe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:ue.length,index:G}),ie++}}else if(I&&Z.length===0&&F.substring(G,G+ae)===I){if(Se===-1)return Ze();G=Se+Y,Se=F.indexOf(P,G),pe=F.indexOf(A,G)}else if(pe!==-1&&(pe<Se||Se===-1))Z.push(F.substring(G,pe)),G=pe+X,pe=F.indexOf(A,G);else{if(Se===-1)break;if(Z.push(F.substring(G,Se)),Je(Se+Y),fe&&(te(),K))return Ze();if(M&&ue.length>=M)return Ze(!0)}return Ue();function ke(ve){ue.push(ve),ce=G}function Oe(ve){var J=0;return J=ve!==-1&&(ve=F.substring(ie+1,ve))&&ve.trim()===""?ve.length:J}function Ue(ve){return H||(ve===void 0&&(ve=F.substring(G)),Z.push(ve),G=B,ke(Z),fe&&te()),Ze()}function Je(ve){G=ve,ke(Z),Z=[],Se=F.indexOf(P,G)}function Ze(ve){if(O.header&&!ne&&ue.length){var J=ue[0],me={},Ee=new Set(J);let Me=!1;for(let Ae=0;Ae<J.length;Ae++){let Ke=J[Ae];if(me[Ke=T(O.transformHeader)?O.transformHeader(Ke,Ae):Ke]){let jt,Ce=me[Ke];for(;jt=Ke+"_"+Ce,Ce++,Ee.has(jt););Ee.add(jt),J[Ae]=jt,me[Ke]++,Me=!0,(U=U===null?{}:U)[jt]=Ke}else me[Ke]=1,J[Ae]=Ke;Ee.add(Ke)}Me&&console.warn("Duplicate headers found and renamed.")}return{data:ue,errors:oe,meta:{delimiter:A,linebreak:P,aborted:K,truncated:!!ve,cursor:ce+(ne||0),renamedHeaders:U}}}function te(){R(Ze()),ue=[],oe=[]}},this.abort=function(){K=!0},this.getCharIndex=function(){return G}}function w(O){var A=O.data,P=l[A.workerId],I=!1;if(A.error)P.userError(A.error,A.file);else if(A.results&&A.results.data){var R={abort:function(){I=!0,S(A.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:j,resume:j};if(T(P.userStep)){for(var M=0;M<A.results.data.length&&(P.userStep({data:A.results.data[M],errors:A.results.errors,meta:A.results.meta},R),!I);M++);delete A.results}else T(P.userChunk)&&(P.userChunk(A.results,R,A.file),delete A.results)}A.finished&&!I&&S(A.workerId,A.results)}function S(O,A){var P=l[O];T(P.userComplete)&&P.userComplete(A),P.terminate(),delete l[O]}function j(){throw new Error("Not implemented.")}function k(O){if(typeof O!="object"||O===null)return O;var A,P=Array.isArray(O)?[]:{};for(A in O)P[A]=k(O[A]);return P}function E(O,A){return function(){O.apply(A,arguments)}}function T(O){return typeof O=="function"}return u.parse=function(O,A){var P=(A=A||{}).dynamicTyping||!1;if(T(P)&&(A.dynamicTypingFunction=P,P={}),A.dynamicTyping=P,A.transform=!!T(A.transform)&&A.transform,!A.worker||!u.WORKERS_SUPPORTED)return P=null,u.NODE_STREAM_INPUT,typeof O=="string"?(O=(I=>I.charCodeAt(0)!==65279?I:I.slice(1))(O),P=new(A.download?f:m)(A)):O.readable===!0&&T(O.read)&&T(O.on)?P=new x(A):(n.File&&O instanceof File||O instanceof Object)&&(P=new p(A)),P.stream(O);(P=(()=>{var I;return!!u.WORKERS_SUPPORTED&&(I=(()=>{var R=n.URL||n.webkitURL||null,M=r.toString();return u.BLOB_URL||(u.BLOB_URL=R.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",M,")();"],{type:"text/javascript"})))})(),(I=new n.Worker(I)).onmessage=w,I.id=c++,l[I.id]=I)})()).userStep=A.step,P.userChunk=A.chunk,P.userComplete=A.complete,P.userError=A.error,A.step=T(A.step),A.chunk=T(A.chunk),A.complete=T(A.complete),A.error=T(A.error),delete A.worker,P.postMessage({input:O,config:A,workerId:P.id})},u.unparse=function(O,A){var P=!1,I=!0,R=",",M=`\r 498`,L='"',U=L+L,W=!1,V=null,G=!1,K=((()=>{if(typeof A=="object"){if(typeof A.delimiter!="string"||u.BAD_DELIMITERS.filter(function(H){return A.delimiter.indexOf(H)!==-1}).length||(R=A.delimiter),typeof A.quotes!="boolean"&&typeof A.quotes!="function"&&!Array.isArray(A.quotes)||(P=A.quotes),typeof A.skipEmptyLines!="boolean"&&typeof A.skipEmptyLines!="string"||(W=A.skipEmptyLines),typeof A.newline=="string"&&(M=A.newline),typeof A.quoteChar=="string"&&(L=A.quoteChar),typeof A.header=="boolean"&&(I=A.header),Array.isArray(A.columns)){if(A.columns.length===0)throw new Error("Option columns is empty");V=A.columns}A.escapeChar!==void 0&&(U=A.escapeChar+L),A.escapeFormulae instanceof RegExp?G=A.escapeFormulae:typeof A.escapeFormulae=="boolean"&&A.escapeFormulae&&(G=/^[=+\-@\t\r].*$/)}})(),new RegExp(v(L),"g"));if(typeof O=="string"&&(O=JSON.parse(O)),Array.isArray(O)){if(!O.length||Array.isArray(O[0]))return F(null,O,W);if(typeof O[0]=="object")return F(V||Object.keys(O[0]),O,W)}else if(typeof O=="object")return typeof O.data=="string"&&(O.data=JSON.parse(O.data)),Array.isArray(O.data)&&(O.fields||(O.fields=O.meta&&O.meta.fields||V),O.fields||(O.fields=Array.isArray(O.data[0])?O.fields:typeof O.data[0]=="object"?Object.keys(O.data[0]):[]),Array.isArray(O.data[0])||typeof O.data[0]=="object"||(O.data=[O.data])),F(O.fields||[],O.data||[],W);throw new Error("Unable to serialize unrecognized input");function F(H,B,X){var Y="",ae=(typeof H=="string"&&(H=JSON.parse(H)),typeof B=="string"&&(B=JSON.parse(B)),Array.isArray(H)&&0<H.length),fe=!Array.isArray(B[0]);if(ae&&I){for(var ue=0;ue<H.length;ue++)0<ue&&(Y+=R),Y+=ne(H[ue],ue);0<B.length&&(Y+=M)}for(var oe=0;oe<B.length;oe++){var Z=(ae?H:B[oe]).length,ce=!1,q=ae?Object.keys(B[oe]).length===0:B[oe].length===0;if(X&&!ae&&(ce=X==="greedy"?B[oe].join("").trim()==="":B[oe].length===1&&B[oe][0].length===0),X==="greedy"&&ae){for(var xe=[],pe=0;pe<Z;pe++){var Se=fe?H[pe]:pe;xe.push(B[oe][Se])}ce=xe.join("").trim()===""}if(!ce){for(var he=0;he<Z;he++){0<he&&!q&&(Y+=R);var ie=ae&&fe?H[he]:he;Y+=ne(B[oe][ie],he)}oe<B.length-1&&(!X||0<Z&&!q)&&(Y+=M)}}return Y}function ne(H,B){var X,Y;return H==null?"":H.constructor===Date?JSON.stringify(H).slice(1,25):(Y=!1,G&&typeof H=="string"&&G.test(H)&&(H="'"+H,Y=!0),X=H.toString().replace(K,U),(Y=Y||P===!0||typeof P=="function"&&P(H,B)||Array.isArray(P)&&P[B]||((ae,fe)=>{for(var ue=0;ue<fe.length;ue++)if(-1<ae.indexOf(fe[ue]))return!0;return!1})(X,u.BAD_DELIMITERS)||-1<X.indexOf(R)||X.charAt(0)===" "||X.charAt(X.length-1)===" ")?L+X+L:X)}},u.RECORD_SEP="�",u.UNIT_SEP="�",u.BYTE_ORDER_MARK="\uFEFF",u.BAD_DELIMITERS=["\r",` 499`,'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!i&&!!n.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=b,u.ParserHandle=y,u.NetworkStreamer=f,u.FileStreamer=p,u.StringStreamer=m,u.ReadableStreamStreamer=x,n.jQuery&&((a=n.jQuery).fn.parse=function(O){var A=O.config||{},P=[];return this.each(function(M){if(!(a(this).prop("tagName").toUpperCase()==="INPUT"&&a(this).attr("type").toLowerCase()==="file"&&n.FileReader)||!this.files||this.files.length===0)return!0;for(var L=0;L<this.files.length;L++)P.push({file:this.files[L],inputElem:this,instanceConfig:a.extend({},A)})}),I(),this;function I(){if(P.length===0)T(O.complete)&&O.complete();else{var M,L,U,W,V=P[0];if(T(O.before)){var G=O.before(V.file,V.inputElem);if(typeof G=="object"){if(G.action==="abort")return M="AbortError",L=V.file,U=V.inputElem,W=G.reason,void(T(O.error)&&O.error({name:M},L,U,W));if(G.action==="skip")return void R();typeof G.config=="object"&&(V.instanceConfig=a.extend(V.instanceConfig,G.config))}else if(G==="skip")return void R()}var K=V.instanceConfig.complete;V.instanceConfig.complete=function(F){T(K)&&K(F,V.file,V.inputElem),R()},u.parse(V.file,V.instanceConfig)}}function R(){P.splice(0,1),I()}}),s&&(n.onmessage=function(O){O=O.data,u.WORKER_ID===void 0&&O&&(u.WORKER_ID=O.workerId),typeof O.input=="string"?n.postMessage({workerId:u.WORKER_ID,results:u.parse(O.input,O.config),finished:!0}):(n.File&&O.input instanceof File||O.input instanceof Object)&&(O=u.parse(O.input,O.config))&&n.postMessage({workerId:u.WORKER_ID,results:O,finished:!0})}),(f.prototype=Object.create(d.prototype)).constructor=f,(p.prototype=Object.create(d.prototype)).constructor=p,(m.prototype=Object.create(m.prototype)).constructor=m,(x.prototype=Object.create(d.prototype)).constructor=x,u})})(Db)),Db.exports}var pde=hde();const mde=tr(pde);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var r1={};r1.version="0.18.5";var jV=1252,gde=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],kR={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},NR=function(e){gde.indexOf(e)!=-1&&(jV=kR[0]=e)};function xde(){NR(1252)}var _o=function(e){NR(e)};function TR(){_o(1200),xde()}function S5(e){for(var t=[],r=0,n=e.length;r<n;++r)t[r]=e.charCodeAt(r);return t}function yde(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function AV(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var O0=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?yde(e.slice(2)):t==254&&r==255?AV(e.slice(2)):t==65279?e.slice(1):e},Ov=function(t){return String.fromCharCode(t)},E5=function(t){return String.fromCharCode(t)},xg,lu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
499+/=";function yg(e){for(var t="",r=0,n=0,a=0,i=0,s=0,l=0,c=0,u=0;u<e.length;)r=e.charCodeAt(u++),i=r>>2,n=e.charCodeAt(u++),s=(r&3)<<4|n>>4,a=e.charCodeAt(u++),l=(n&15)<<2|a>>6,c=a&63,isNaN(n)?l=c=64:isNaN(a)&&(c=64),t+=lu.charAt(i)+lu.charAt(s)+lu.charAt(l)+lu.charAt(c);return t}function hs(e){var t="",r=0,n=0,a=0,i=0,s=0,l=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<e.length;)i=lu.indexOf(e.charAt(u++)),s=lu.indexOf(e.charAt(u++)),r=i<<2|s>>4,t+=String.fromCharCode(r),l=lu.indexOf(e.charAt(u++)),n=(s&15)<<4|l>>2,l!==64&&(t+=String.fromCharCode(n)),c=lu.indexOf(e.charAt(u++)),a=(l&3)<<6|c,c!==64&&(t+=String.fromCharCode(a));return t}var lr=(function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node})(),bc=(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 Su(e){return lr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function k5(e){return lr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var ls=function(t){return lr?bc(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function t_(e){if(typeof ArrayBuffer>"u")return ls(e);
499for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return t}function Iu(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function vde(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}function jR(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return jR(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var wa=lr?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:bc(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var n=new Uint8Array(r),a=0;for(t=0,r=0;t<e.length;r+=a,++t)if(a=e[t].length,e[t]instanceof Uint8Array)n.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";n.set(new Uint8Array(e[t]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function bde(e){for(var t=[],r=0,n=e.length+250,a=Su(e.length+255),i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)a[r++]=s;else if(s<2048)a[r++]=192|s>>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=Su(65535),n=65530)}return t.push(a.slice(0,r)),wa(t)}var Si=/\u0000/g,P0=/[\u0001-\u0006]/g;function Ih(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function So(e,t){var r=""+e;return r.length>=t?r:Tn("0",t-r.length)+r}function AR(e,t){var r=""+e;return r.length>=t?r:Tn(" ",t-r.length)+r}function n1(e,t){var r=""+e;return r.length>=t?r:r+Tn(" ",t-r.length)}function wde(e,t){var r=""+Math.round(e);return r.length>=t?r:Tn("0",t-r.length)+r}function _de(e,t){var r=""+e;return r.length>=t?r:Tn("0",t-r.length)+r}var N5=Math.pow(2,32);function Qf(e,t){if(e>N5||e<-N5)return wde(e,t);var r=Math.round(e);return _de(r,t)}function a1(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 T5=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],I2=[["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 Sde(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 Ut={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"ç§ "'},j5={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},Ede={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\\);
499_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function i1(e,t,r){for(var n=e<0?-1:1,a=e*n,i=0,s=1,l=0,c=1,u=0,d=0,f=Math.floor(a);u<t&&(f=Math.floor(a),l=f*s+i,d=f*u+c,!(a-f<5e-8));)a=1/(a-f),i=s,s=l,c=u,u=d;if(d>t&&(u>t?(d=c,l=i):(d=u,l=s)),!r)return[0,n*l,d];var p=Math.floor(n*l/d);return[p,n*l-p*d,d]}function wd(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 c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),s=[c.getFullYear(),c.getMonth()+1,c.getDate()],i=c.getDay(),n<60&&(i=(i+6)%7),r&&(i=Cde(c,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 CV=new Date(1899,11,31,0,0,0),kde=CV.getTime(),Nde=new Date(1900,2,1,0,0,0);function OV(e,t){var r=e.getTime();
vendor: 6,655 bytes, line 499
499return t?r-=1461*24*60*60*1e3:e>=Nde&&(r+=1440*60*1e3),(r-(kde+(e.getTimezoneOffset()-CV.getTimezoneOffset())*6e4))/(1440*60*1e3)}function CR(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Tde(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function jde(e){var t=e<0?12:11,r=CR(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function Ade(e){var t=CR(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function vg(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=jde(e):t===10?r=e.toFixed(10).substr(0,12):r=Ade(e),CR(Tde(r.toUpperCase()))}function Kd(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):vg(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return Xs(14,OV(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function Cde(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function Ode(e,t,r,n){var a="",i=0,s=0,l=r.y,c,u=0;switch(e){case 98:l=r.y+543;case 121:switch(t.length){case 1:case 2:c=l%100,u=2;break;default:c=l%1e4,u=4;break}break;case 109:switch(t.length){case 1:case 2:c=r.m,u=t.length;break;case 3:return I2[r.m-1][1];case 5:return I2[r.m-1][0];default:return I2[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=r.d,u=t.length;break;case 3:return T5[r.q][0];default:return T5[r.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(r.H+11)%12,u=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=r.H,u=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=r.M,u=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")?So(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=So(i,2+n),t==="ss"?a.substr(0,2):"."+a.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":c=r.D*24+r.H;break;case"[m]":case"[mm]":c=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":c=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}u=t.length===3?1:2;break;case 101:c=l,u=1;break}var d=u>0?So(c,u):"";return d}function cu(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 PV=/%/g;function Pde(e,t,r){var n=t.replace(PV,""),a=t.length-n.length;return tc(e,n,r*Math.pow(10,2*a))+Tn("%",a)}function Rde(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return tc(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function RV(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"-"+RV(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,c,u,d){return c+u+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 IV=/# (\?+)( ?)\/( ?)(\d+)/;function Ide(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?Tn(" ",e[1].length+1+e[4].length):AR(s,e[1].length)+e[2]+"/"+e[3]+So(l,e[4].length))}function Fde(e,t,r){return r+(t===0?"":""+t)+Tn(" ",e[1].length+2+e[4].length)}var FV=/^#*0*\.([0#]+)/,MV=/\).*[0#]/,DV=/\(###\) ###\\?-####/;function ui(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 A5(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function C5(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 Mde(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function Dde(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function Ps(e,t,r){if(e.charCodeAt(0)===40&&!t.match(MV)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Ps("n",n,r):"("+Ps("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return Rde(e,t,r);if(t.indexOf("%")!==-1)return Pde(e,t,r);if(t.indexOf("E")!==-1)return RV(t,r);if(t.charCodeAt(0)===36)return"$"+Ps(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,s,l,c=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+Qf(c,t.length);if(t.match(/^[#?]+$/))return a=Qf(r,0),a==="0"&&(a=""),a.length>t.length?a:ui(t.substr(0,t.length-a.length))+a;if(i=t.match(IV))return Ide(i,c,u);if(t.match(/^#+0+$/))return u+Qf(c,t.length-t.indexOf("0"));if(i=t.match(FV))return a=A5(r,i[1].length).replace(/^([^\.]+)$/,"$1."+ui(i[1])).replace(/\.$/,"."+ui(i[1])).replace(/\.(\d*)$/,function(x,y){return"."+y+Tn("0",ui(i[1]).length-y.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return u+A5(c,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 u+cu(Qf(c,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Ps(e,t,-r):cu(""+(Math.floor(r)+Mde(r,i[1].length)))+"."+So(C5(r,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return Ps(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Ih(Ps(e,t.replace(/[\\-]/g,""),r)),s=0,Ih(Ih(t.replace(/\\/g,"")).replace(/[0#]/g,function(x){return s<a.length?a.charAt(s++):x==="0"?"0":""}));if(t.match(DV))return a=Ps(e,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var d="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),l=i1(c,Math.pow(10,s)-1,!1),a=""+u,d=tc("n",i[1],l[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),a+=d+i[2]+"/"+i[3],d=n1(l[2],s),d.length<i[4].length&&(d=ui(i[4].substr(i[4].length-d.length))+d),a+=d,a;
vendor: 14,589 bytes, line 499
499if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),l=i1(c,Math.pow(10,s)-1,!0),u+(l[0]||(l[1]?"":"0"))+" "+(l[1]?AR(l[1],s)+i[2]+"/"+i[3]+n1(l[2],s):Tn(" ",2*s+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return a=Qf(r,0),t.length<=a.length?a:ui(t.substr(0,t.length-a.length))+a;if(i=t.match(/^([#0?]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=a.indexOf(".");var f=t.indexOf(".")-s,p=t.length-a.length-f;return ui(t.substr(0,f)+a+t.substr(t.length-p))}if(i=t.match(/^00,000\.([#0]*0)$/))return s=C5(r,i[1].length),r<0?"-"+Ps(e,t,-r):cu(Dde(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(x){return"00,"+(x.length<3?So(0,3-x.length):"")+x})+"."+So(s,i[1].length);switch(t){case"###,##0.00":return Ps(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var m=cu(Qf(c,0));return m!=="0"?u+m:"";case"###,###.00":return Ps(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return Ps(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function Lde(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return tc(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function $de(e,t,r){var n=t.replace(PV,""),a=t.length-n.length;return tc(e,n,r*Math.pow(10,2*a))+Tn("%",a)}function LV(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"-"+LV(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.match(/[Ee]/)){var s=Math.floor(Math.log(t)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,c,u,d){return c+u+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")}function Xo(e,t,r){if(e.charCodeAt(0)===40&&!t.match(MV)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Xo("n",n,r):"("+Xo("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return Lde(e,t,r);if(t.indexOf("%")!==-1)return $de(e,t,r);if(t.indexOf("E")!==-1)return LV(t,r);if(t.charCodeAt(0)===36)return"$"+Xo(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,s,l,c=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+So(c,t.length);if(t.match(/^[#?]+$/))return a=""+r,r===0&&(a=""),a.length>t.length?a:ui(t.substr(0,t.length-a.length))+a;if(i=t.match(IV))return Fde(i,c,u);if(t.match(/^#+0+$/))return u+So(c,t.length-t.indexOf("0"));if(i=t.match(FV))return a=(""+r).replace(/^([^\.]+)$/,"$1."+ui(i[1])).replace(/\.$/,"."+ui(i[1])),a=a.replace(/\.(\d*)$/,function(x,y){return"."+y+Tn("0",ui(i[1]).length-y.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return u+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return u+cu(""+c);if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Xo(e,t,-r):cu(""+r)+"."+Tn("0",i[1].length);if(i=t.match(/^#,#*,#0/))return Xo(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Ih(Xo(e,t.replace(/[\\-]/g,""),r)),s=0,Ih(Ih(t.replace(/\\/g,"")).replace(/[0#]/g,function(x){return s<a.length?a.charAt(s++):x==="0"?"0":""}));if(t.match(DV))return a=Xo(e,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var d="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),l=i1(c,Math.pow(10,s)-1,!1),a=""+u,d=tc("n",i[1],l[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),a+=d+i[2]+"/"+i[3],d=n1(l[2],s),d.length<i[4].length&&(d=ui(i[4].substr(i[4].length-d.length))+d),a+=d,a;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),l=i1(c,Math.pow(10,s)-1,!0),u+(l[0]||(l[1]?"":"0"))+" "+(l[1]?AR(l[1],s)+i[2]+"/"+i[3]+n1(l[2],s):Tn(" ",2*s+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return a=""+r,t.length<=a.length?a:ui(t.substr(0,t.length-a.length))+a;if(i=t.match(/^([#0]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=a.indexOf(".");var f=t.indexOf(".")-s,p=t.length-a.length-f;return ui(t.substr(0,f)+a+t.substr(t.length-p))}if(i=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+Xo(e,t,-r):cu(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(x){return"00,"+(x.length<3?So(0,3-x.length):"")+x})+"."+So(0,i[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=cu(""+c);return m!=="0"?u+m:"";default:if(t.match(/\.[0#?]*$/))return Xo(e,t.slice(0,t.lastIndexOf(".")),r)+ui(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function tc(e,t,r){return(r|0)===r?Xo(e,t,r):Ps(e,t,r)}function Bde(e){for(var t=[],r=!1,n=0,a=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:t[t.length]=e.substr(a,n-a),a=n+1}if(t[t.length]=e.substr(a),r===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var $V=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function Kp(e){for(var t=0,r="",n="";t<e.length;)switch(r=e.charAt(t)){case"G":a1(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"ä¸":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="ä¸å/ä¸å")return!0;++t;break;case"[":for(n=r;e.charAt(t++)!=="]"&&t<e.length;)n+=e.charAt(t);if(n.match($V))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-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<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function Ude(e,t,r,n){for(var a=[],i="",s=0,l="",c="t",u,d,f,p="H";s<e.length;)switch(l=e.charAt(s)){case"G":if(!a1(e,s))throw new Error("unrecognized character "+l+" in "+e);a[a.length]={t:"G",v:"General"},s+=7;break;case'"':for(i="";(f=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(f);a[a.length]={t:"t",v:i},++s;break;case"\\":var m=e.charAt(++s),x=m==="("||m===")"?m:"t";a[a.length]={t:x,v:m},++s;break;case"_":a[a.length]={t:"t",v:" "},s+=2;break;case"@":a[a.length]={t:"T",v:t},++s;break;case"B":case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(u==null&&(u=wd(t,r,e.charAt(s+1)==="2"),u==null))return"";a[a.length]={t:"X",v:e.substr(s,2)},c=l,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":l=l.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||u==null&&(u=wd(t,r),u==null))return"";for(i=l;++s<e.length&&e.charAt(s).toLowerCase()===l;)i+=l;l==="m"&&c.toLowerCase()==="h"&&(l="M"),l==="h"&&(l=p),a[a.length]={t:l,v:i},c=l;break;case"A":case"a":case"ä¸":var y={t:l,v:l};if(u==null&&(u=wd(t,r)),e.substr(s,3).toUpperCase()==="A/P"?(u!=null&&(y.v=u.H>=12?"P":"A"),y.t="T",p="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(u!=null&&(y.v=u.H>=12?"PM":"AM"),y.t="T",s+=5,p="h"):e.substr(s,5).toUpperCase()==="ä¸å/ä¸å"?(u!=null&&(y.v=u.H>=12?"ä¸å":"ä¸å"),y.t="T",s+=5,p="h"):(y.t="t",++s),u==null&&y.t==="T")return"";a[a.length]=y,c=l;break;case"[":for(i=l;e.charAt(s++)!=="]"&&s<e.length;)i+=e.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match($V)){if(u==null&&(u=wd(t,r),u==null))return"";a[a.length]={t:"Z",v:i.toLowerCase()},c=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",Kp(e)||(a[a.length]={t:"t",v:i}));break;case".":if(u!=null){for(i=l;++s<e.length&&(l=e.charAt(s))==="0";)i+=l;a[a.length]={t:"s",v:i};break}case"0":case"#":for(i=l;++s<e.length&&"0#?.,E+-%".indexOf(l=e.charAt(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},c=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<e.length&&"0123456789".indexOf(e.charAt(++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 v=0,b=0,w;for(s=a.length-1,c="t";s>=0;--s)switch(a[s].t){case"h":case"H":a[s].t=p,c="h",v<1&&(v=1);break;case"s":(w=a[s].v.match(/\.0+$/))&&(b=Math.max(b,w[0].length-1)),v<3&&(v=3);case"d":case"y":case"M":case"e":c=a[s].t;break;case"m":c==="s"&&(a[s].t="M",v<2&&(v=2));break;case"X":break;case"Z":v<1&&a[s].v.match(/[Hh]/)&&(v=1),v<2&&a[s].v.match(/[Mm]/)&&(v=2),v<3&&a[s].v.match(/[Ss]/)&&(v=3)}switch(v){case 0:break;case 1:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M),u.M>=60&&(u.M=0,++u.H);break;case 2:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M);break}var S="",j;for(s=0;s<a.length;++s)switch(a[s].t){case"t":case"T":case" ":case"D":break;case"X":a[s].v="",a[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":a[s].v=Ode(a[s].t.charCodeAt(0),a[s].v,u,b),a[s].t="t";break;case"n":case"?":for(j=s+1;a[j]!=null&&((l=a[j].t)==="?"||l==="D"||(l===" "||l==="t")&&a[j+1]!=null&&(a[j+1].t==="?"||a[j+1].t==="t"&&a[j+1].v==="/")||a[s].t==="("&&(l===" "||l==="n"||l===")")||l==="t"&&(a[j].v==="/"||a[j].v===" "&&a[j+1]!=null&&a[j+1].t=="?"));)a[s].v+=a[j].v,a[j]={v:"",t:";"},++j;S+=a[s].v,s=j-1;break;case"G":a[s].t="t",a[s].v=Kd(t,r);break}var k="",E,T;if(S.length>0){S.charCodeAt(0)==40?(E=t<0&&S.charCodeAt(0)===45?-t:t,T=tc("n",S,E)):(E=t<0&&n>1?-t:t,T=tc("n",S,E),E<0&&a[0]&&a[0].t=="t"&&(T=T.substr(1),a[0].v="-"+a[0].v)),j=T.length-1;var O=a.length;for(s=0;s<a.length;++s)if(a[s]!=null&&a[s].t!="t"&&a[s].v.indexOf(".")>-1){O=s;break}var A=a.length;if(O===a.length&&T.indexOf("E")===-1){for(s=a.length-1;s>=0;--s)a[s]==null||"n?".indexOf(a[s].t)===-1||(j>=a[s].v.length-1?(j-=a[s].v.length,a[s].v=T.substr(j+1,a[s].v.length)):j<0?a[s].v="":(a[s].v=T.substr(0,j+1),j=-1),a[s].t="t",A=s);j>=0&&A<a.length&&(a[A].v=T.substr(0,j+1)+a[A].v)}else if(O!==a.length&&T.indexOf("E")===-1){for(j=T.indexOf(".")-1,s=O;s>=0;--s)if(!(a[s]==null||"n?".indexOf(a[s].t)===-1)){for(d=a[s].v.indexOf(".")>-1&&s===O?a[s].v.indexOf(".")-1:a[s].v.length-1,k=a[s].v.substr(d+1);d>=0;--d)j>=0&&(a[s].v.charAt(d)==="0"||a[s].v.charAt(d)==="#")&&(k=T.charAt(j--)+k);a[s].v=k,a[s].t="t",A=s}for(j>=0&&A<a.length&&(a[A].v=T.substr(0,j+1)+a[A].v),j=T.indexOf(".")+1,s=O;s<a.length;++s)if(!(a[s]==null||"n?(".indexOf(a[s].t)===-1&&s!==O)){for(d=a[s].v.indexOf(".")>-1&&s===O?a[s].v.indexOf(".")+1:0,k=a[s].v.substr(0,d);d<a[s].v.length;++d)j<T.length&&(k+=T.charAt(j++));a[s].v=k,a[s].t="t",A=s}}}for(s=0;s<a.length;++s)a[s]!=null&&"n?".indexOf(a[s].t)>-1&&(E=n>1&&t<0&&s>0&&a[s-1].v==="-"?-t:t,a[s].v=tc(a[s].t,a[s].v,E),a[s].t="t");var P="";for(s=0;s!==a.length;++s)a[s]!=null&&(P+=a[s].v);return P}var O5=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function P5(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<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function zde(e,t){var r=Bde(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(O5),l=r[1].match(O5);return P5(t,s)?[n,r[0]]:P5(t,l)?[n,r[1]]:[n,r[s!=null&&l!=null?2:1]]}return[n,i]}function Xs(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:Ut)[e],n==null&&(n=r.table&&r.table[j5[e]]||Ut[j5[e]]),n==null&&(n=Ede[e]||"General");break}if(a1(n,0))return Kd(t,r);t instanceof Date&&(t=OV(t,r.date1904));var a=zde(n,t);if(a1(a[1]))return Kd(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return Ude(a[1],t,r,a[0])}function rc(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(Ut[r]==null){t<0&&(t=r);continue}if(Ut[r]==e){t=r;break}}t<0&&(t=391)}return Ut[t]=e,t}function r_(e){for(var t=0;t!=392;++t)e[t]!==void 0&&rc(e[t],t)}function Yp(){Ut=Sde()}var Hde={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"},BV=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function qde(e){var t=typeof e=="number"?Ut[e]:e;return t=t.replace(BV,"(\\d+)"),new RegExp("^"+t+"$")}function Wde(e,t,r){var n=-1,a=-1,i=-1,s=-1,l=-1,c=-1;
vendor: 6,679 bytes, line 499
499(t.match(BV)||[]).forEach(function(f,p){var m=parseInt(r[p+1],10);switch(f.toLowerCase().charAt(0)){case"y":n=m;break;case"d":i=m;break;case"h":s=m;break;case"s":c=m;break;case"m":s>=0?l=m:a=m;break}}),c>=0&&l==-1&&a>=0&&(l=a,a=-1);var u=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(a>=1?a:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);u.length==7&&(u="0"+u),u.length==8&&(u="20"+u);var d=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return s==-1&&l==-1&&c==-1?u:n==-1&&a==-1&&i==-1?d:u+"T"+d}var Vde=(function(){var e={};e.version="1.2.0";function t(){for(var T=0,O=new Array(256),A=0;A!=256;++A)T=A,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,O[A]=T;return typeof Int32Array<"u"?new Int32Array(O):O}var r=t();function n(T){var O=0,A=0,P=0,I=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(P=0;P!=256;++P)I[P]=T[P];for(P=0;P!=256;++P)for(A=T[P],O=256+P;O<4096;O+=256)A=I[O]=A>>>8^T[A&255];var R=[];for(P=1;P!=16;++P)R[P-1]=typeof Int32Array<"u"?I.subarray(P*256,P*256+256):I.slice(P*256,P*256+256);return R}var a=n(r),i=a[0],s=a[1],l=a[2],c=a[3],u=a[4],d=a[5],f=a[6],p=a[7],m=a[8],x=a[9],y=a[10],v=a[11],b=a[12],w=a[13],S=a[14];function j(T,O){for(var A=O^-1,P=0,I=T.length;P<I;)A=A>>>8^r[(A^T.charCodeAt(P++))&255];return~A}function k(T,O){for(var A=O^-1,P=T.length-15,I=0;I<P;)A=S[T[I++]^A&255]^w[T[I++]^A>>8&255]^b[T[I++]^A>>16&255]^v[T[I++]^A>>>24]^y[T[I++]]^x[T[I++]]^m[T[I++]]^p[T[I++]]^f[T[I++]]^d[T[I++]]^u[T[I++]]^c[T[I++]]^l[T[I++]]^s[T[I++]]^i[T[I++]]^r[T[I++]];for(P+=15;I<P;)A=A>>>8^r[(A^T[I++])&255];return~A}function E(T,O){for(var A=O^-1,P=0,I=T.length,R=0,M=0;P<I;)R=T.charCodeAt(P++),R<128?A=A>>>8^r[(A^R)&255]:R<2048?(A=A>>>8^r[(A^(192|R>>6&31))&255],A=A>>>8^r[(A^(128|R&63))&255]):R>=55296&&R<57344?(R=(R&1023)+64,M=T.charCodeAt(P++)&1023,A=A>>>8^r[(A^(240|R>>8&7))&255],A=A>>>8^r[(A^(128|R>>2&63))&255],A=A>>>8^r[(A^(128|M>>6&15|(R&3)<<4))&255],A=A>>>8^r[(A^(128|M&63))&255]):(A=A>>>8^r[(A^(224|R>>12&15))&255],A=A>>>8^r[(A^(128|R>>6&63))&255],A=A>>>8^r[(A^(128|R&63))&255]);return~A}return e.table=r,e.bstr=j,e.buf=k,e.str=E,e})(),At=(function(){var t={};t.version="1.2.1";function r(re,ge){for(var le=re.split("/"),de=ge.split("/"),ye=0,be=0,Ie=Math.min(le.length,de.length);ye<Ie;++ye){if(be=le[ye].length-de[ye].length)return be;if(le[ye]!=de[ye])return le[ye]<de[ye]?-1:1}return le.length-de.length}function n(re){if(re.charAt(re.length-1)=="/")return re.slice(0,-1).indexOf("/")===-1?re:n(re.slice(0,-1));var ge=re.lastIndexOf("/");return ge===-1?re:re.slice(0,ge+1)}function a(re){if(re.charAt(re.length-1)=="/")return a(re.slice(0,-1));var ge=re.lastIndexOf("/");return ge===-1?re:re.slice(ge+1)}function i(re,ge){typeof ge=="string"&&(ge=new Date(ge));var le=ge.getHours();le=le<<6|ge.getMinutes(),le=le<<5|ge.getSeconds()>>>1,re.write_shift(2,le);var de=ge.getFullYear()-1980;de=de<<4|ge.getMonth()+1,de=de<<5|ge.getDate(),re.write_shift(2,de)}function s(re){var ge=re.read_shift(2)&65535,le=re.read_shift(2)&65535,de=new Date,ye=le&31;le>>>=5;var be=le&15;le>>>=4,de.setMilliseconds(0),de.setFullYear(le+1980),de.setMonth(be-1),de.setDate(ye);var Ie=ge&31;ge>>>=5;var qe=ge&63;return ge>>>=6,de.setHours(ge),de.setMinutes(qe),de.setSeconds(Ie<<1),de}function l(re){Oa(re,0);for(var ge={},le=0;re.l<=re.length-4;){var de=re.read_shift(2),ye=re.read_shift(2),be=re.l+ye,Ie={};switch(de){case 21589:le=re.read_shift(1),le&1&&(Ie.mtime=re.read_shift(4)),ye>5&&(le&2&&(Ie.atime=re.read_shift(4)),le&4&&(Ie.ctime=re.read_shift(4))),Ie.mtime&&(Ie.mt=new Date(Ie.mtime*1e3));break}re.l=be,ge[de]=Ie}return ge}var c;function u(){return c||(c={})}function d(re,ge){if(re[0]==80&&re[1]==75)return ai(re,ge);if((re[0]|32)==109&&(re[1]|32)==105)return Lo(re,ge);if(re.length<512)throw new Error("CFB file size "+re.length+" < 512");var le=3,de=512,ye=0,be=0,Ie=0,qe=0,Re=0,Fe=[],De=re.slice(0,512);Oa(De,0);var et=f(De);switch(le=et[0],le){case 3:de=512;break;case 4:de=4096;break;case 0:if(et[1]==0)return ai(re,ge);default:throw new Error("Major Version: Expected 3 or 4 saw "+le)}de!==512&&(De=re.slice(0,de),Oa(De,28));var dt=re.slice(0,de);p(De,le);var mt=De.read_shift(4,"i");if(le===3&&mt!==0)throw new Error("# Directory Sectors: Expected 0 saw "+mt);De.l+=4,Ie=De.read_shift(4,"i"),De.l+=4,De.chk("00100000","Mini Stream Cutoff Size: "),qe=De.read_shift(4,"i"),ye=De.read_shift(4,"i"),Re=De.read_shift(4,"i"),be=De.read_shift(4,"i");for(var st=-1,nt=0;nt<109&&(st=De.read_shift(4,"i"),!(st<0));++nt)Fe[nt]=st;var Kt=m(re,de);v(Re,be,Kt,de,Fe);var $r=w(Kt,Ie,Fe,de);$r[Ie].name="!Directory",ye>0&&qe!==M&&($r[qe].name="!MiniFAT"),$r[Fe[0]].name="!FAT",$r.fat_addrs=Fe,$r.ssz=de;var qr={},In=[],Ku=[],Cc=[];S(Ie,$r,Kt,In,ye,qr,Ku,qe),x(Ku,Cc,In),In.shift();var $o={FileIndex:Ku,FullPaths:Cc};return ge&&ge.raw&&($o.raw={header:dt,sectors:Kt}),$o}function f(re){if(re[re.l]==80&&re[re.l+1]==75)return[0,0];re.chk(L,"Header Signature: "),re.l+=16;var ge=re.read_shift(2,"u");return[re.read_shift(2,"u"),ge]}function p(re,ge){var le=9;switch(re.l+=2,le=re.read_shift(2)){case 9:if(ge!=3)throw new Error("Sector Shift: Expected 9 saw "+le);break;case 12:if(ge!=4)throw new Error("Sector Shift: Expected 12 saw "+le);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+le)}re.chk("0600","Mini Sector Shift: "),re.chk("000000000000","Reserved: ")}function m(re,ge){for(var le=Math.ceil(re.length/ge)-1,de=[],ye=1;ye<le;++ye)de[ye-1]=re.slice(ye*ge,(ye+1)*ge);return de[le-1]=re.slice(le*ge),de}function x(re,ge,le){for(var de=0,ye=0,be=0,Ie=0,qe=0,Re=le.length,Fe=[],De=[];de<Re;++de)Fe[de]=De[de]=de,ge[de]=le[de];for(;qe<De.length;++qe)de=De[qe],ye=re[de].L,be=re[de].R,Ie=re[de].C,Fe[de]===de&&(ye!==-1&&Fe[ye]!==ye&&(Fe[de]=Fe[ye]),be!==-1&&Fe[be]!==be&&(Fe[de]=Fe[be])),Ie!==-1&&(Fe[Ie]=de),ye!==-1&&de!=Fe[de]&&(Fe[ye]=Fe[de],De.lastIndexOf(ye)<qe&&De.push(ye)),be!==-1&&de!=Fe[de]&&(Fe[be]=Fe[de],De.lastIndexOf(be)<qe&&De.push(be));for(de=1;de<Re;++de)Fe[de]===de&&(be!==-1&&Fe[be]!==be?Fe[de]=Fe[be]:ye!==-1&&Fe[ye]!==ye&&(Fe[de]=Fe[ye]));for(de=1;de<Re;++de)if(re[de].type!==0){if(qe=de,qe!=Fe[qe])do qe=Fe[qe],ge[de]=ge[qe]+"/"+ge[de];while(qe!==0&&Fe[qe]!==-1&&qe!=Fe[qe]);Fe[de]=-1}for(ge[0]+="/",de=1;de<Re;++de)re[de].type!==2&&(ge[de]+="/")}function y(re,ge,le){for(var de=re.start,ye=re.size,be=[],Ie=de;le&&ye>0&&Ie>=0;)be.push(ge.slice(Ie*R,Ie*R+R)),ye-=R,Ie=vd(le,Ie*4);return be.length===0?ze(0):wa(be).slice(0,re.size)}function v(re,ge,le,de,ye){var be=M;
vendor: 4,634 bytes, line 499
499if(re===M){if(ge!==0)throw new Error("DIFAT chain shorter than expected")}else if(re!==-1){var Ie=le[re],qe=(de>>>2)-1;if(!Ie)return;for(var Re=0;Re<qe&&(be=vd(Ie,Re*4))!==M;++Re)ye.push(be);v(vd(Ie,de-4),ge-1,le,de,ye)}}function b(re,ge,le,de,ye){var be=[],Ie=[];ye||(ye=[]);var qe=de-1,Re=0,Fe=0;for(Re=ge;Re>=0;){ye[Re]=!0,be[be.length]=Re,Ie.push(re[Re]);var De=le[Math.floor(Re*4/de)];if(Fe=Re*4&qe,de<4+Fe)throw new Error("FAT boundary crossed: "+Re+" 4 "+de);if(!re[De])break;Re=vd(re[De],Fe)}return{nodes:be,data:q5([Ie])}}function w(re,ge,le,de){var ye=re.length,be=[],Ie=[],qe=[],Re=[],Fe=de-1,De=0,et=0,dt=0,mt=0;for(De=0;De<ye;++De)if(qe=[],dt=De+ge,dt>=ye&&(dt-=ye),!Ie[dt]){Re=[];var st=[];for(et=dt;et>=0;){st[et]=!0,Ie[et]=!0,qe[qe.length]=et,Re.push(re[et]);var nt=le[Math.floor(et*4/de)];if(mt=et*4&Fe,de<4+mt)throw new Error("FAT boundary crossed: "+et+" 4 "+de);if(!re[nt]||(et=vd(re[nt],mt),st[et]))break}be[dt]={nodes:qe,data:q5([Re])}}return be}function S(re,ge,le,de,ye,be,Ie,qe){for(var Re=0,Fe=de.length?2:0,De=ge[re].data,et=0,dt=0,mt;et<De.length;et+=128){var st=De.slice(et,et+128);Oa(st,64),dt=st.read_shift(2),mt=DR(st,0,dt-Fe),de.push(mt);var nt={name:mt,type:st.read_shift(1),color:st.read_shift(1),L:st.read_shift(4,"i"),R:st.read_shift(4,"i"),C:st.read_shift(4,"i"),clsid:st.read_shift(16),state:st.read_shift(4,"i"),start:0,size:0},Kt=st.read_shift(2)+st.read_shift(2)+st.read_shift(2)+st.read_shift(2);Kt!==0&&(nt.ct=j(st,st.l-8));var $r=st.read_shift(2)+st.read_shift(2)+st.read_shift(2)+st.read_shift(2);$r!==0&&(nt.mt=j(st,st.l-8)),nt.start=st.read_shift(4,"i"),nt.size=st.read_shift(4,"i"),nt.size<0&&nt.start<0&&(nt.size=nt.type=0,nt.start=M,nt.name=""),nt.type===5?(Re=nt.start,ye>0&&Re!==M&&(ge[Re].name="!StreamData")):nt.size>=4096?(nt.storage="fat",ge[nt.start]===void 0&&(ge[nt.start]=b(le,nt.start,ge.fat_addrs,ge.ssz)),ge[nt.start].name=nt.name,nt.content=ge[nt.start].data.slice(0,nt.size)):(nt.storage="minifat",nt.size<0?nt.size=0:Re!==M&&nt.start!==M&&ge[Re]&&(nt.content=y(nt,ge[Re].data,(ge[qe]||{}).data))),nt.content&&Oa(nt.content,0),be[mt]=nt,Ie.push(nt)}}function j(re,ge){return new Date((is(re,ge+4)/1e7*Math.pow(2,32)+is(re,ge)/1e7-11644473600)*1e3)}function k(re,ge){return u(),d(c.readFileSync(re),ge)}function E(re,ge){var le=ge&&ge.type;switch(le||lr&&Buffer.isBuffer(re)&&(le="buffer"),le||"base64"){case"file":return k(re,ge);case"base64":return d(ls(hs(re)),ge);case"binary":return d(ls(re),ge)}return d(re,ge)}function T(re,ge){var le=ge||{},de=le.root||"Root Entry";if(re.FullPaths||(re.FullPaths=[]),re.FileIndex||(re.FileIndex=[]),re.FullPaths.length!==re.FileIndex.length)throw new Error("inconsistent CFB structure");re.FullPaths.length===0&&(re.FullPaths[0]=de+"/",re.FileIndex[0]={name:de,type:5}),le.CLSID&&(re.FileIndex[0].clsid=le.CLSID),O(re)}function O(re){var ge="�Sh33tJ5";if(!At.find(re,"/"+ge)){var le=ze(4);le[0]=55,le[1]=le[3]=50,le[2]=54,re.FileIndex.push({name:ge,type:2,content:le,size:4,L:69,R:69,C:69}),re.FullPaths.push(re.FullPaths[0]+ge),A(re)}}function A(re,ge){T(re);for(var le=!1,de=!1,ye=re.FullPaths.length-1;ye>=0;--ye){var be=re.FileIndex[ye];switch(be.type){case 0:de?le=!0:(re.FileIndex.pop(),re.FullPaths.pop());break;case 1:case 2:case 5:de=!0,isNaN(be.R*be.L*be.C)&&(le=!0),be.R>-1&&be.L>-1&&be.R==be.L&&(le=!0);break;default:le=!0;break}}if(!(!le&&!ge)){var Ie=new Date(1987,1,19),qe=0,Re=Object.create?Object.create(null):{},Fe=[];for(ye=0;ye<re.FullPaths.length;++ye)Re[re.FullPaths[ye]]=!0,re.FileIndex[ye].type!==0&&Fe.push([re.FullPaths[ye],re.FileIndex[ye]]);for(ye=0;ye<Fe.length;++ye){var De=n(Fe[ye][0]);de=Re[De],de||(Fe.push([De,{name:a(De).replace("/",""),type:1,clsid:W,ct:Ie,mt:Ie,content:null}]),Re[De]=!0)}for(Fe.sort(function(mt,st){return r(mt[0],st[0])}),re.FullPaths=[],re.FileIndex=[],ye=0;ye<Fe.length;++ye)re.FullPaths[ye]=Fe[ye][0],re.FileIndex[ye]=Fe[ye][1];for(ye=0;ye<Fe.length;++ye){var et=re.FileIndex[ye],dt=re.FullPaths[ye];if(et.name=a(dt).replace("/",""),et.L=et.R=et.C=-(et.color=1),et.size=et.content?et.content.length:0,et.start=0,et.clsid=et.clsid||W,ye===0)et.C=Fe.length>1?1:-1,et.size=0,et.type=5;else if(dt.slice(-1)=="/"){for(qe=ye+1;qe<Fe.length&&n(re.FullPaths[qe])!=dt;++qe);for(et.C=qe>=Fe.length?-1:qe,qe=ye+1;qe<Fe.length&&n(re.FullPaths[qe])!=n(dt);++qe);et.R=qe>=Fe.length?-1:qe,et.type=1}else n(re.FullPaths[ye+1]||"")==n(dt)&&(et.R=ye+1),et.type=2}}}function P(re,ge){var le=ge||{};if(le.fileType=="mad")return Fa(re,le);switch(A(re),le.fileType){case"zip":return Ki(re,le)}var de=(function(mt){for(var st=0,nt=0,Kt=0;Kt<mt.FileIndex.length;++Kt){var $r=mt.FileIndex[Kt];
vendor: 10,211 bytes, line 499
499if($r.content){var qr=$r.content.length;qr>0&&(qr<4096?st+=qr+63>>6:nt+=qr+511>>9)}}for(var In=mt.FullPaths.length+3>>2,Ku=st+7>>3,Cc=st+127>>7,$o=Ku+nt+In+Cc,ha=$o+127>>7,bm=ha<=109?0:Math.ceil((ha-109)/127);$o+ha+bm+127>>7>ha;)bm=++ha<=109?0:Math.ceil((ha-109)/127);var Fn=[1,bm,ha,Cc,In,nt,st,0];return mt.FileIndex[0].size=st<<6,Fn[7]=(mt.FileIndex[0].start=Fn[0]+Fn[1]+Fn[2]+Fn[3]+Fn[4]+Fn[5])+(Fn[6]+7>>3),Fn})(re),ye=ze(de[7]<<9),be=0,Ie=0;{for(be=0;be<8;++be)ye.write_shift(1,U[be]);for(be=0;be<8;++be)ye.write_shift(2,0);for(ye.write_shift(2,62),ye.write_shift(2,3),ye.write_shift(2,65534),ye.write_shift(2,9),ye.write_shift(2,6),be=0;be<3;++be)ye.write_shift(2,0);for(ye.write_shift(4,0),ye.write_shift(4,de[2]),ye.write_shift(4,de[0]+de[1]+de[2]+de[3]-1),ye.write_shift(4,0),ye.write_shift(4,4096),ye.write_shift(4,de[3]?de[0]+de[1]+de[2]-1:M),ye.write_shift(4,de[3]),ye.write_shift(-4,de[1]?de[0]-1:M),ye.write_shift(4,de[1]),be=0;be<109;++be)ye.write_shift(-4,be<de[2]?de[1]+be:-1)}if(de[1])for(Ie=0;Ie<de[1];++Ie){for(;be<236+Ie*127;++be)ye.write_shift(-4,be<de[2]?de[1]+be:-1);ye.write_shift(-4,Ie===de[1]-1?M:Ie+1)}var qe=function(mt){for(Ie+=mt;be<Ie-1;++be)ye.write_shift(-4,be+1);mt&&(++be,ye.write_shift(-4,M))};for(Ie=be=0,Ie+=de[1];be<Ie;++be)ye.write_shift(-4,V.DIFSECT);for(Ie+=de[2];be<Ie;++be)ye.write_shift(-4,V.FATSECT);qe(de[3]),qe(de[4]);for(var Re=0,Fe=0,De=re.FileIndex[0];Re<re.FileIndex.length;++Re)De=re.FileIndex[Re],De.content&&(Fe=De.content.length,!(Fe<4096)&&(De.start=Ie,qe(Fe+511>>9)));for(qe(de[6]+7>>3);ye.l&511;)ye.write_shift(-4,V.ENDOFCHAIN);for(Ie=be=0,Re=0;Re<re.FileIndex.length;++Re)De=re.FileIndex[Re],De.content&&(Fe=De.content.length,!(!Fe||Fe>=4096)&&(De.start=Ie,qe(Fe+63>>6)));for(;ye.l&511;)ye.write_shift(-4,V.ENDOFCHAIN);for(be=0;be<de[4]<<2;++be){var et=re.FullPaths[be];if(!et||et.length===0){for(Re=0;Re<17;++Re)ye.write_shift(4,0);for(Re=0;Re<3;++Re)ye.write_shift(4,-1);for(Re=0;Re<12;++Re)ye.write_shift(4,0);continue}De=re.FileIndex[be],be===0&&(De.start=De.size?De.start-1:M);var dt=be===0&&le.root||De.name;if(Fe=2*(dt.length+1),ye.write_shift(64,dt,"utf16le"),ye.write_shift(2,Fe),ye.write_shift(1,De.type),ye.write_shift(1,De.color),ye.write_shift(-4,De.L),ye.write_shift(-4,De.R),ye.write_shift(-4,De.C),De.clsid)ye.write_shift(16,De.clsid,"hex");else for(Re=0;Re<4;++Re)ye.write_shift(4,0);ye.write_shift(4,De.state||0),ye.write_shift(4,0),ye.write_shift(4,0),ye.write_shift(4,0),ye.write_shift(4,0),ye.write_shift(4,De.start),ye.write_shift(4,De.size),ye.write_shift(4,0)}for(be=1;be<re.FileIndex.length;++be)if(De=re.FileIndex[be],De.size>=4096)if(ye.l=De.start+1<<9,lr&&Buffer.isBuffer(De.content))De.content.copy(ye,ye.l,0,De.size),ye.l+=De.size+511&-512;else{for(Re=0;Re<De.size;++Re)ye.write_shift(1,De.content[Re]);for(;Re&511;++Re)ye.write_shift(1,0)}for(be=1;be<re.FileIndex.length;++be)if(De=re.FileIndex[be],De.size>0&&De.size<4096)if(lr&&Buffer.isBuffer(De.content))De.content.copy(ye,ye.l,0,De.size),ye.l+=De.size+63&-64;else{for(Re=0;Re<De.size;++Re)ye.write_shift(1,De.content[Re]);for(;Re&63;++Re)ye.write_shift(1,0)}if(lr)ye.l=ye.length;else for(;ye.l<ye.length;)ye.write_shift(1,0);return ye}function I(re,ge){var le=re.FullPaths.map(function(Re){return Re.toUpperCase()}),de=le.map(function(Re){var Fe=Re.split("/");return Fe[Fe.length-(Re.slice(-1)=="/"?2:1)]}),ye=!1;ge.charCodeAt(0)===47?(ye=!0,ge=le[0].slice(0,-1)+ge):ye=ge.indexOf("/")!==-1;var be=ge.toUpperCase(),Ie=ye===!0?le.indexOf(be):de.indexOf(be);if(Ie!==-1)return re.FileIndex[Ie];var qe=!be.match(P0);for(be=be.replace(Si,""),qe&&(be=be.replace(P0,"!")),Ie=0;Ie<le.length;++Ie)if((qe?le[Ie].replace(P0,"!"):le[Ie]).replace(Si,"")==be||(qe?de[Ie].replace(P0,"!"):de[Ie]).replace(Si,"")==be)return re.FileIndex[Ie];return null}var R=64,M=-2,L="d0cf11e0a1b11ae1",U=[208,207,17,224,161,177,26,225],W="00000000000000000000000000000000",V={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:M,FREESECT:-1,HEADER_SIGNATURE:L,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:W,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function G(re,ge,le){u();var de=P(re,le);c.writeFileSync(ge,de)}function K(re){for(var ge=new Array(re.length),le=0;le<re.length;++le)ge[le]=String.fromCharCode(re[le]);return ge.join("")}function F(re,ge){var le=P(re,ge);switch(ge&&ge.type||"buffer"){case"file":return u(),c.writeFileSync(ge.filename,le),le;case"binary":return typeof le=="string"?le:K(le);case"base64":return yg(typeof le=="string"?le:K(le));case"buffer":if(lr)return Buffer.isBuffer(le)?le:bc(le);case"array":return typeof le=="string"?ls(le):le}return le}var ne;function H(re){try{var ge=re.InflateRaw,le=new ge;if(le._processChunk(new Uint8Array([3,0]),le._finishFlushFlag),le.bytesRead)ne=re;else throw new Error("zlib does not expose bytesRead")}catch(de){console.error("cannot use native zlib: "+(de.message||de))}}function B(re,ge){if(!ne)return Ht(re,ge);var le=ne.InflateRaw,de=new le,ye=de._processChunk(re.slice(re.l),de._finishFlushFlag);return re.l+=de.bytesRead,ye}function X(re){return ne?ne.deflateRawSync(re):Ae(re)}var Y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ae=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],fe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function ue(re){var ge=(re<<1|re<<11)&139536|(re<<5|re<<15)&558144;return(ge>>16|ge>>8|ge)&255}for(var oe=typeof Uint8Array<"u",Z=oe?new Uint8Array(256):[],ce=0;ce<256;++ce)Z[ce]=ue(ce);function q(re,ge){var le=Z[re&255];return ge<=8?le>>>8-ge:(le=le<<8|Z[re>>8&255],ge<=16?le>>>16-ge:(le=le<<8|Z[re>>16&255],le>>>24-ge))}function xe(re,ge){var le=ge&7,de=ge>>>3;return(re[de]|(le<=6?0:re[de+1]<<8))>>>le&3}function pe(re,ge){var le=ge&7,de=ge>>>3;return(re[de]|(le<=5?0:re[de+1]<<8))>>>le&7}function Se(re,ge){var le=ge&7,de=ge>>>3;return(re[de]|(le<=4?0:re[de+1]<<8))>>>le&15}function he(re,ge){var le=ge&7,de=ge>>>3;return(re[de]|(le<=3?0:re[de+1]<<8))>>>le&31}function ie(re,ge){var le=ge&7,de=ge>>>3;return(re[de]|(le<=1?0:re[de+1]<<8))>>>le&127}function we(re,ge,le){var de=ge&7,ye=ge>>>3,be=(1<<le)-1,Ie=re[ye]>>>de;return le<8-de||(Ie|=re[ye+1]<<8-de,le<16-de)||(Ie|=re[ye+2]<<16-de,le<24-de)||(Ie|=re[ye+3]<<24-de),Ie&be}function ke(re,ge,le){var de=ge&7,ye=ge>>>3;return de<=5?re[ye]|=(le&7)<<de:(re[ye]|=le<<de&255,re[ye+1]=(le&7)>>8-de),ge+3}function Oe(re,ge,le){var de=ge&7,ye=ge>>>3;return le=(le&1)<<de,re[ye]|=le,ge+1}function Ue(re,ge,le){var de=ge&7,ye=ge>>>3;return le<<=de,re[ye]|=le&255,le>>>=8,re[ye+1]=le,ge+8}function Je(re,ge,le){var de=ge&7,ye=ge>>>3;return le<<=de,re[ye]|=le&255,le>>>=8,re[ye+1]=le&255,re[ye+2]=le>>>8,ge+16}function Ze(re,ge){var le=re.length,de=2*le>ge?2*le:ge+5,ye=0;if(le>=ge)return re;if(lr){var be=k5(de);if(re.copy)re.copy(be);else for(;ye<re.length;++ye)be[ye]=re[ye];return be}else if(oe){var Ie=new Uint8Array(de);if(Ie.set)Ie.set(re);else for(;ye<le;++ye)Ie[ye]=re[ye];return Ie}return re.length=de,re}function te(re){for(var ge=new Array(re),le=0;le<re;++le)ge[le]=0;return ge}function ve(re,ge,le){var de=1,ye=0,be=0,Ie=0,qe=0,Re=re.length,Fe=oe?new Uint16Array(32):te(32);for(be=0;be<32;++be)Fe[be]=0;for(be=Re;be<le;++be)re[be]=0;Re=re.length;var De=oe?new Uint16Array(Re):te(Re);for(be=0;be<Re;++be)Fe[ye=re[be]]++,de<ye&&(de=ye),De[be]=0;for(Fe[0]=0,be=1;be<=de;++be)Fe[be+16]=qe=qe+Fe[be-1]<<1;for(be=0;be<Re;++be)qe=re[be],qe!=0&&(De[be]=Fe[qe+16]++);var et=0;for(be=0;be<Re;++be)if(et=re[be],et!=0)for(qe=q(De[be],de)>>de-et,Ie=(1<<de+4-et)-1;Ie>=0;--Ie)ge[qe|Ie<<et]=et&15|be<<4;return de}var J=oe?new Uint16Array(512):te(512),me=oe?new Uint16Array(32):te(32);if(!oe){for(var Ee=0;Ee<512;++Ee)J[Ee]=0;for(Ee=0;Ee<32;++Ee)me[Ee]=0}(function(){for(var re=[],ge=0;ge<32;ge++)re.push(5);ve(re,me,32);var le=[];for(ge=0;ge<=143;ge++)le.push(8);for(;ge<=255;ge++)le.push(9);for(;ge<=279;ge++)le.push(7);for(;ge<=287;ge++)le.push(8);ve(le,J,288)})();var Me=(function(){for(var ge=oe?new Uint8Array(32768):[],le=0,de=0;le<fe.length-1;++le)for(;de<fe[le+1];++de)ge[de]=le;for(;de<32768;++de)ge[de]=29;var ye=oe?new Uint8Array(259):[];for(le=0,de=0;le<ae.length-1;++le)for(;de<ae[le+1];++de)ye[de]=le;function be(qe,Re){for(var Fe=0;Fe<qe.length;){var De=Math.min(65535,qe.length-Fe),et=Fe+De==qe.length;for(Re.write_shift(1,+et),Re.write_shift(2,De),Re.write_shift(2,~De&65535);De-- >0;)Re[Re.l++]=qe[Fe++]}return Re.l}function Ie(qe,Re){for(var Fe=0,De=0,et=oe?new Uint16Array(32768):[];De<qe.length;){var dt=Math.min(65535,qe.length-De);if(dt<10){for(Fe=ke(Re,Fe,+(De+dt==qe.length)),Fe&7&&(Fe+=8-(Fe&7)),Re.l=Fe/8|0,Re.write_shift(2,dt),Re.write_shift(2,~dt&65535);dt-- >0;)Re[Re.l++]=qe[De++];Fe=Re.l*8;continue}Fe=ke(Re,Fe,+(De+dt==qe.length)+2);for(var mt=0;dt-- >0;){var st=qe[De];mt=(mt<<5^st)&32767;var nt=-1,Kt=0;if((nt=et[mt])&&(nt|=De&-32768,nt>De&&(nt-=32768),nt<De))for(;qe[nt+Kt]==qe[De+Kt]&&Kt<250;)++Kt;if(Kt>2){st=ye[Kt],st<=22?Fe=Ue(Re,Fe,Z[st+1]>>1)-1:(Ue(Re,Fe,3),Fe+=5,Ue(Re,Fe,Z[st-23]>>5),Fe+=3);var $r=st<8?0:st-4>>2;$r>0&&(Je(Re,Fe,Kt-ae[st]),Fe+=$r),st=ge[De-nt],Fe=Ue(Re,Fe,Z[st]>>3),Fe-=3;var qr=st<4?0:st-2>>1;qr>0&&(Je(Re,Fe,De-nt-fe[st]),Fe+=qr);for(var In=0;In<Kt;++In)et[mt]=De&32767,mt=(mt<<5^qe[De])&32767,++De;dt-=Kt-1}else st<=143?st=st+48:Fe=Oe(Re,Fe,1),Fe=Ue(Re,Fe,Z[st]),et[mt]=De&32767,++De}Fe=Ue(Re,Fe,0)-1}return Re.l=(Fe+7)/8|0,Re.l}return function(Re,Fe){return Re.length<8?be(Re,Fe):Ie(Re,Fe)}})();function Ae(re){var ge=ze(50+Math.floor(re.length*1.1)),le=Me(re,ge);return ge.slice(0,le)}var Ke=oe?new Uint16Array(32768):te(32768),jt=oe?new Uint16Array(32768):te(32768),Ce=oe?new Uint16Array(128):te(128),xt=1,bt=1;function Pt(re,ge){var le=he(re,ge)+257;ge+=5;var de=he(re,ge)+1;ge+=5;var ye=Se(re,ge)+4;ge+=4;for(var be=0,Ie=oe?new Uint8Array(19):te(19),qe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Re=1,Fe=oe?new Uint8Array(8):te(8),De=oe?new Uint8Array(8):te(8),et=Ie.length,dt=0;dt<ye;++dt)Ie[Y[dt]]=be=pe(re,ge),Re<be&&(Re=be),Fe[be]++,ge+=3;var mt=0;for(Fe[0]=0,dt=1;dt<=Re;++dt)De[dt]=mt=mt+Fe[dt-1]<<1;for(dt=0;dt<et;++dt)(mt=Ie[dt])!=0&&(qe[dt]=De[mt]++);var st=0;for(dt=0;dt<et;++dt)if(st=Ie[dt],st!=0){mt=Z[qe[dt]]>>
vendor: 7,454 bytes, lines 499-507
4998-st;for(var nt=(1<<7-st)-1;nt>=0;--nt)Ce[mt|nt<<st]=st&7|dt<<3}var Kt=[];for(Re=1;Kt.length<le+de;)switch(mt=Ce[ie(re,ge)],ge+=mt&7,mt>>>=3){case 16:for(be=3+xe(re,ge),ge+=2,mt=Kt[Kt.length-1];be-- >0;)Kt.push(mt);break;case 17:for(be=3+pe(re,ge),ge+=3;be-- >0;)Kt.push(0);break;case 18:for(be=11+ie(re,ge),ge+=7;be-- >0;)Kt.push(0);break;default:Kt.push(mt),Re<mt&&(Re=mt);break}var $r=Kt.slice(0,le),qr=Kt.slice(le);for(dt=le;dt<286;++dt)$r[dt]=0;for(dt=de;dt<30;++dt)qr[dt]=0;return xt=ve($r,Ke,286),bt=ve(qr,jt,30),ge}function _r(re,ge){if(re[0]==3&&!(re[1]&3))return[Su(ge),2];for(var le=0,de=0,ye=k5(ge||1<<18),be=0,Ie=ye.length>>>0,qe=0,Re=0;(de&1)==0;){if(de=pe(re,le),le+=3,de>>>1)de>>1==1?(qe=9,Re=5):(le=Pt(re,le),qe=xt,Re=bt);else{le&7&&(le+=8-(le&7));var Fe=re[le>>>3]|re[(le>>>3)+1]<<8;if(le+=32,Fe>0)for(!ge&&Ie<be+Fe&&(ye=Ze(ye,be+Fe),Ie=ye.length);Fe-- >0;)ye[be++]=re[le>>>3],le+=8;continue}for(;;){!ge&&Ie<be+32767&&(ye=Ze(ye,be+32767),Ie=ye.length);var De=we(re,le,qe),et=de>>>1==1?J[De]:Ke[De];if(le+=et&15,et>>>=4,(et>>>8&255)===0)ye[be++]=et;else{if(et==256)break;et-=257;var dt=et<8?0:et-4>>2;dt>5&&(dt=0);var mt=be+ae[et];dt>0&&(mt+=we(re,le,dt),le+=dt),De=we(re,le,Re),et=de>>>1==1?me[De]:jt[De],le+=et&15,et>>>=4;var st=et<4?0:et-2>>1,nt=fe[et];for(st>0&&(nt+=we(re,le,st),le+=st),!ge&&Ie<mt&&(ye=Ze(ye,mt+100),Ie=ye.length);be<mt;)ye[be]=ye[be-nt],++be}}}return ge?[ye,le+7>>>3]:[ye.slice(0,be),le+7>>>3]}function Ht(re,ge){var le=re.slice(re.l||0),de=_r(le,ge);return re.l+=de[1],de[0]}function Zr(re,ge){if(re)typeof console<"u"&&console.error(ge);else throw new Error(ge)}function ai(re,ge){var le=re;Oa(le,0);var de=[],ye=[],be={FileIndex:de,FullPaths:ye};T(be,{root:ge.root});for(var Ie=le.length-4;(le[Ie]!=80||le[Ie+1]!=75||le[Ie+2]!=5||le[Ie+3]!=6)&&Ie>=0;)--Ie;le.l=Ie+4,le.l+=4;var qe=le.read_shift(2);le.l+=6;var Re=le.read_shift(4);for(le.l=Re,Ie=0;Ie<qe;++Ie){le.l+=20;var Fe=le.read_shift(4),De=le.read_shift(4),et=le.read_shift(2),dt=le.read_shift(2),mt=le.read_shift(2);le.l+=8;var st=le.read_shift(4),nt=l(le.slice(le.l+et,le.l+et+dt));le.l+=et+dt+mt;var Kt=le.l;le.l=st+4,Ia(le,Fe,De,be,nt),le.l=Kt}return be}function Ia(re,ge,le,de,ye){re.l+=2;var be=re.read_shift(2),Ie=re.read_shift(2),qe=s(re);if(be&8257)throw new Error("Unsupported ZIP encryption");for(var Re=re.read_shift(4),Fe=re.read_shift(4),De=re.read_shift(4),et=re.read_shift(2),dt=re.read_shift(2),mt="",st=0;st<et;++st)mt+=String.fromCharCode(re[re.l++]);if(dt){var nt=l(re.slice(re.l,re.l+dt));(nt[21589]||{}).mt&&(qe=nt[21589].mt),((ye||{})[21589]||{}).mt&&(qe=ye[21589].mt)}re.l+=dt;var Kt=re.slice(re.l,re.l+Fe);switch(Ie){case 8:Kt=B(re,De);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+Ie)}var $r=!1;be&8&&(Re=re.read_shift(4),Re==134695760&&(Re=re.read_shift(4),$r=!0),Fe=re.read_shift(4),De=re.read_shift(4)),Fe!=ge&&Zr($r,"Bad compressed size: "+ge+" != "+Fe),De!=le&&Zr($r,"Bad uncompressed size: "+le+" != "+De),vs(de,mt,Kt,{unsafe:!0,mt:qe})}function Ki(re,ge){var le=ge||{},de=[],ye=[],be=ze(1),Ie=le.compression?8:0,qe=0,Re=0,Fe=0,De=0,et=0,dt=re.FullPaths[0],mt=dt,st=re.FileIndex[0],nt=[],Kt=0;for(Re=1;Re<re.FullPaths.length;++Re)if(mt=re.FullPaths[Re].slice(dt.length),st=re.FileIndex[Re],!(!st.size||!st.content||mt=="�Sh33tJ5")){var $r=De,qr=ze(mt.length);for(Fe=0;Fe<mt.length;++Fe)qr.write_shift(1,mt.charCodeAt(Fe)&127);qr=qr.slice(0,qr.l),nt[et]=Vde.buf(st.content,0);var In=st.content;Ie==8&&(In=X(In)),be=ze(30),be.write_shift(4,67324752),be.write_shift(2,20),be.write_shift(2,qe),be.write_shift(2,Ie),st.mt?i(be,st.mt):be.write_shift(4,0),be.write_shift(-4,nt[et]),be.write_shift(4,In.length),be.write_shift(4,st.content.length),be.write_shift(2,qr.length),be.write_shift(2,0),De+=be.length,de.push(be),De+=qr.length,de.push(qr),De+=In.length,de.push(In),be=ze(46),be.write_shift(4,33639248),be.write_shift(2,0),be.write_shift(2,20),be.write_shift(2,qe),be.write_shift(2,Ie),be.write_shift(4,0),be.write_shift(-4,nt[et]),be.write_shift(4,In.length),be.write_shift(4,st.content.length),be.write_shift(2,qr.length),be.write_shift(2,0),be.write_shift(2,0),be.write_shift(2,0),be.write_shift(2,0),be.write_shift(4,0),be.write_shift(4,$r),Kt+=be.l,ye.push(be),Kt+=qr.length,ye.push(qr),++et}return be=ze(22),be.write_shift(4,101010256),be.write_shift(2,0),be.write_shift(2,0),be.write_shift(2,et),be.write_shift(2,et),be.write_shift(4,Kt),be.write_shift(4,De),be.write_shift(2,0),wa([wa(de),wa(ye),be])}var fa={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function xs(re,ge){if(re.ctype)return re.ctype;var le=re.name||"",de=le.match(/\.([^\.]+)$/);return de&&fa[de[1]]||ge&&(de=(le=ge).match(/[\.\\]([^\.\\])+$/),de&&fa[de[1]])?fa[de[1]]:"application/octet-stream"}function Hn(re){for(var ge=yg(re),le=[],de=0;de<ge.length;de+=76)le.push(ge.slice(de,de+76));return le.join(`\r 500`)+`\r 501`}function gn(re){var ge=re.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Fe){var De=Fe.charCodeAt(0).toString(16).toUpperCase();return"="+(De.length==1?"0"+De:De)});ge=ge.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),ge.charAt(0)==` 502`&&(ge="=0D"+ge.slice(1)),ge=ge.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,` 503=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var le=[],de=ge.split(`\r 504`),ye=0;ye<de.length;++ye){var be=de[ye];if(be.length==0){le.push("");continue}for(var Ie=0;Ie<be.length;){var qe=76,Re=be.slice(Ie,Ie+qe);Re.charAt(qe-1)=="="?qe--:Re.charAt(qe-2)=="="?qe-=2:Re.charAt(qe-3)=="="&&(qe-=3),Re=be.slice(Ie,Ie+qe),Ie+=qe,Ie<be.length&&(Re+="="),le.push(Re)}}return le.join(`\r 505`)}function Rn(re){for(var ge=[],le=0;le<re.length;++le){for(var de=re[le];le<=re.length&&de.charAt(de.length-1)=="=";)de=de.slice(0,de.length-1)+re[++le];ge.push(de)}for(var ye=0;ye<ge.length;++ye)ge[ye]=ge[ye].replace(/[=][0-9A-Fa-f]{2}/g,function(be){return String.fromCharCode(parseInt(be.slice(1),16))});return ls(ge.join(`\r 506`))}function ys(re,ge,le){for(var de="",ye="",be="",Ie,qe=0;qe<10;++qe){var Re=ge[qe];if(!Re||Re.match(/^\s*$/))break;var Fe=Re.match(/^(.*?):\s*([^\s].*)$/);if(Fe)switch(Fe[1].toLowerCase()){case"content-location":de=Fe[2].trim();break;case"content-type":be=Fe[2].trim();break;case"content-transfer-encoding":ye=Fe[2].trim();break}}switch(++qe,ye.toLowerCase()){case"base64":Ie=ls(hs(ge.slice(qe).join("")));break;case"quoted-printable":Ie=Rn(ge.slice(qe));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+ye)}var De=vs(re,de.slice(le.length),Ie,{unsafe:!0});be&&(De.ctype=be)}function Lo(re,ge){if(K(re.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var le=ge&&ge.root||"",de=(lr&&Buffer.isBuffer(re)?re.toString("binary"):K(re)).split(`\r 507`),ye=0,be="";for(ye=0;ye<de.length;++ye)if(be=de[ye],!!/^Content-Location:/i.test(be)&&(be=be.slice(be.indexOf("file")),le||(le=be.slice(0,be.lastIndexOf("/")+1)),be.slice(0,le.length)!=le))for(;le.length>0&&(le=le.slice(0,le.length-1),le=le.slice(0,le.lastIndexOf("/")+1),be.slice(0,le.length)!=le););var Ie=(de[1]||"").match(/boundary="(.*?)"/);if(!Ie)throw new Error("MAD cannot find boundary");var qe="--"+(Ie[1]||""),Re=[],Fe=[],De={FileIndex:Re,FullPaths:Fe};T(De);var et,dt=0;for(ye=0;ye<de.length;++ye){var mt=de[ye];mt!==qe&&mt!==qe+"--"||(dt++&&ys(De,de.slice(et,ye),le),et=ye)}return De}function Fa(re,ge){var le=ge||{}
507,de=le.boundary||"SheetJS";de="------="+de;for(var ye=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+de.slice(2)+'"',"","",""],be=re.FullPaths[0],Ie=be,qe=re.FileIndex[0],Re=1;Re<re.FullPaths.length;++Re)if(Ie=re.FullPaths[Re].slice(be.length),qe=re.FileIndex[Re],!(!qe.size||!qe.content||Ie=="�Sh33tJ5")){Ie=Ie.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(Kt){return"_x"+Kt.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(Kt){return"_u"+Kt.charCodeAt(0).toString(16)+"_"});for(var Fe=qe.content,De=lr&&Buffer.isBuffer(Fe)?Fe.toString("binary"):K(Fe),et=0,dt=Math.min(1024,De.length),mt=0,st=0;st<=dt;++st)(mt=De.charCodeAt(st))>=32&&mt<128&&++et;var nt=et>=dt*4/5;ye.push(de),ye.push("Content-Location: "+(le.root||"file:///C:/SheetJS/")+Ie),ye.push("Content-Transfer-Encoding: "+(nt?"quoted-printable":"base64")),ye.push("Content-Type: "+xs(qe,Ie)),ye.push(""),ye.push(nt?gn(De):Hn(De))}return ye.push(de+`--\r 508`),ye.join(`\r 509`)}function no(re){var ge={};return T(ge,re),ge}function vs(re,ge,le,de){var ye=de&&de.unsafe;ye||T(re);var be=!ye&&At.find(re,ge);if(!be){var Ie=re.FullPaths[0];ge.slice(0,Ie.length)==Ie?Ie=ge:(Ie.slice(-1)!="/"&&(Ie+="/"),Ie=(Ie+ge).replace("//","/")),be={name:a(ge),type:2},re.FileIndex.push(be),re.FullPaths.push(Ie),ye||At.utils.cfb_gc(re)}return be.content=le,be.size=le?le.length:0,de&&(de.CLSID&&(be.clsid=de.CLSID),de.mt&&(be.mt=de.mt),de.ct&&(be.ct=de.ct)),be}function Ac(re,ge){T(re);var le=At.find(re,ge);if(le){for(var de=0;de<re.FileIndex.length;++de)if(re.FileIndex[de]==le)return re.FileIndex.splice(de,1),re.FullPaths.splice(de,1),!0}return!1}function jl(re,ge,le){T(re);var de=At.find(re,ge);if(de){for(var ye=0;ye<re.FileIndex.length;++ye)if(re.FileIndex[ye]==de)return re.FileIndex[ye].name=a(le),re.FullPaths[ye]=le,!0}return!1}function bs(re){A(re,!0)}return t.find=I,t.read=E,t.parse=d,t.write=F,t.writeFile=G,t.utils={cfb_new:no,cfb_add:vs,cfb_del:Ac,cfb_mov:jl,cfb_gc:bs,ReadShift:B0,CheckField:lG,prep_blob:Oa,bconcat:wa,use_zlib:H,_deflateRaw:Ae,_inflateRaw:Ht,consts:V},t})();function Gde(e){return typeof e=="string"?t_(e):Array.isArray(e)?vde(e):e}function Ox(e,t,r){if(typeof Deno<"u"){if(r&&typeof t=="string")switch(r){case"utf8":t=new TextEncoder(r).encode(t);break;case"binary":t=t_(t);break;default:throw new Error("Unsupported encoding "+r)}return Deno.writeFileSync(e,t)}var n=r=="utf8"?sl(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var a=new Blob([Gde(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(a,e);if(typeof saveAs<"u")return saveAs(a,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var i=URL.createObjectURL(a);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(i)},6e4),chrome.downloads.download({url:i,filename:e,saveAs:!0});var s=document.createElement("a");if(s.download!=null)return s.download=e,s.href=i,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(i)},6e4),i}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var l=File(e);return l.open("w"),l.encoding="binary",Array.isArray(t)&&(t=Iu(t)),l.write(t),l.close(),t}catch(c){if(!c.message||!c.message.match(/onstruct/))throw c}throw new Error("cannot save file "+e)}function Kde(e){if(typeof Deno<"u")return Deno.readFileSync(e);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var t=File(e);t.open("r"),t.encoding="binary";var r=t.read();return t.close(),r}catch(n){if(!n.message||!n.message.match(/onstruct/))throw n}throw new Error("Cannot access file "+e)}function Pn(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function R5(e,t){for(var r=[],n=Pn(e),a=0;a!==n.length;++a)r[e[n[a]][t]]==null&&(r[e[n[a]][t]]=n[a]);return r}function n_(e){for(var t=[],r=Pn(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}function a_(e){for(var t=[],r=Pn(e),n=0;n!==r.length;++n)t[e[r[n]]]=parseInt(r[n],10);return t}function Yde(e){for(var t=[],r=Pn(e),n=0;n!==r.length;++n)t[e[r[n]]]==null&&(t[e[r[n]]]=[]),t[e[r[n]]].push(r[n]);return t}var s1=new Date(1899,11,30,0,0,0);function ua(e,t){var r=e.getTime(),n=s1.getTime()+(e.getTimezoneOffset()-s1.getTimezoneOffset())*6e4;return(r-n)/(1440*60*1e3)}var UV=new Date,Xde=s1.getTime()+(UV.getTimezoneOffset()-s1.getTimezoneOffset())*6e4,I5=UV.getTimezoneOffset();function i_(e){var t=new Date;return t.setTime(e*24*60*60*1e3+Xde),t.getTimezoneOffset()!==I5&&t.setTime(t.getTime()+(t.getTimezoneOffset()-I5)*6e4),t}function Jde(e){var t=0,r=0,n=!1,a=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!a)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var i=1;i!=a.length;++i)if(a[i]){switch(r=1,i>3&&(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}
509var F5=new Date("2017-02-19T19:06:09.000Z"),zV=isNaN(F5.getFullYear())?new Date("2/19/17"):F5,Qde=zV.getFullYear()==2017;function ln(e,t){var r=new Date(e);if(Qde)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(zV.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 Yd(e,t){if(lr&&Buffer.isBuffer(e)){if(t){if(e[0]==255&&e[1]==254)return sl(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return sl(AV(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(e[0]==255&&e[1]==254)return sl(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return sl(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 cn(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]=cn(e[r]));return t}function Tn(e,t){for(var r="";r.length<t;)r+=e;return r}function No(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,n=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(t=Number(n))||(n=n.replace(/[(](.*)[)]/,function(a,i){return r=-r,i}),!isNaN(t=Number(n)))?t/r:t}var Zde=["january","february","march","april","may","june","july","august","september","october","november","december"];function Kh(e){var t=new Date(e),r=new Date(NaN),n=t.getYear(),a=t.getMonth(),i=t.getDate();if(isNaN(i))return r;var s=e.toLowerCase();if(s.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(s=s.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),s.length>3&&Zde.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 efe=(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<i.length;++l)s.push(a),s.push(i[l]);return s}})();function HV(e){return e?e.content&&e.type?Yd(e.content,!0):e.data?O0(e.data):e.asNodeBuffer&&lr?O0(e.asNodeBuffer().toString("binary")):e.asBinary?O0(e.asBinary()):e._data&&e._data.getContent?O0(Yd(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function qV(e){if(!e)return null;if(e.data)return S5(e.data);if(e.asNodeBuffer&&lr)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return typeof t=="string"?S5(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function tfe(e){return e&&e.name.slice(-4)===".bin"?qV(e):HV(e)}function Ls(e,t){for(var r=e.FullPaths||Pn(e.files),n=t.toLowerCase().replace(/[\/]/g,"\\"),a=n.replace(/\\/g,"/"),i=0;i<r.length;++i){var s=r[i].replace(/^Root Entry[\/]/,"").toLowerCase();if(n==s||a==s)return e.files?e.files[r[i]]:e.FileIndex[i]}return null}function OR(e,t){var r=Ls(e,t);if(r==null)throw new Error("Cannot find file "+t+" in zip");return r}function Gn(e,t,r){if(!r)return tfe(OR(e,t));if(!t)return null;try{return Gn(e,t)}catch{return null}}function cs(e,t,r){if(!r)return HV(OR(e,t));if(!t)return null;try{return cs(e,t)}catch{return null}}function rfe(e,t,r){return qV(OR(e,t))}
509function M5(e){for(var t=e.FullPaths||Pn(e.files),r=[],n=0;n<t.length;++n)t[n].slice(-1)!="/"&&r.push(t[n].replace(/^Root Entry[\/]/,""));return r.sort()}function nr(e,t,r){if(e.FullPaths){if(typeof r=="string"){var n;return lr?n=bc(r):n=bde(r),At.utils.cfb_add(e,t,n)}At.utils.cfb_add(e,t,r)}else e.file(t,r)}function PR(){return At.utils.cfb_new()}function WV(e,t){switch(t.type){case"base64":return At.read(e,{type:"base64"});case"binary":return At.read(e,{type:"binary"});case"buffer":case"array":return At.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function R0(e,t){if(e.charAt(0)=="/")return e.slice(1);var r=t.split("/");t.slice(-1)!="/"&&r.pop();for(var n=e.split("/");n.length!==0;){var a=n.shift();a===".."?r.pop():a!=="."&&r.push(a)}return r.join("/")}var zn=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r 510`,nfe=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,D5=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,afe=/<[^>]*>/g,ti=zn.match(D5)?D5:afe,ife=/<\w*:/,sfe=/<(\/?)\w+:/;function qt(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(nfe),l=0,c="",u=0,d="",f="",p=1;if(s)for(u=0;u!=s.length;++u){for(f=s[u],i=0;i!=f.length&&f.charCodeAt(i)!==61;++i);for(d=f.slice(0,i).trim();f.charCodeAt(i+1)==32;)++i;for(p=(a=f.charCodeAt(i+1))==34||a==39?1:0,c=f.slice(i+1+p,f.length-p),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]=c,n[d.toLowerCase()]=c;else{var m=(l===5&&d.slice(0,5)==="xmlns"?"xmlns":"")+d.slice(l+1);if(n[m]&&d.slice(l-3,l)=="ext")continue;n[m]=c,n[m.toLowerCase()]=c}}return n}function Sl(e){return e.replace(sfe,"<$1")}var VV={""":'"',"'":"'",">":">","<":"<","&":"&"},RR=n_(VV),br=(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("<![CDATA[");if(i==-1)return a.replace(e,function(l,c){return VV[l]||String.fromCharCode(parseInt(c,l.indexOf("x")>-1?16:10))||l}).replace(t,function(l,c){return String.fromCharCode(parseInt(c,16))});var s=a.indexOf("]]>");return r(a.slice(0,i))+a.slice(i+9,s)+r(a.slice(s+3))}})(),IR=/[&<>'"]/g,ofe=/[\u0000-\u0008\u000b-\u001f]/g;function Fr(e){var t=e+"";return t.replace(IR,function(r){return RR[r]}).replace(ofe,function(r){return"_x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+"_"})}function L5(e){return Fr(e).replace(/ /g,"_x0020_")}var GV=/[\u0000-\u001f]/g;function FR(e){var t=e+"";return t.replace(IR,function(r){return RR[r]}).replace(/\n/g,"<br/>").replace(GV,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}function lfe(e){var t=e+"";return t.replace(IR,function(r){return RR[r]}).replace(GV,function(r){return"&#x"+r.charCodeAt(0).toString(16).toUpperCase()+";"})}var $5=(function(){var e=/&#(\d+);/g;function t(r,n){return String.fromCharCode(parseInt(n,10))}return function(n){return n.replace(e,t)}})();function cfe(e){return e.replace(/(\r\n|[\r\n])/g," ")}function an(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function F2(e){for(var t="",r=0,n=0,a=0,i=0,s=0,l=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(a=e.charCodeAt(r++),n>191&&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 B5(e){var t=Su(2*e.length),r,n,a=1,i=0,s=0,l;for(n=0;n<e.length;n+=a)a=1,(l=e.charCodeAt(n))<128?r=l:l<224?(r=(l&31)*64+(e.charCodeAt(n+1)&63),a=2):l<240?(r=(l&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),a=3):(a=4,r=(l&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,s=55296+(r>>>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 U5(e){return bc(e,"binary").toString("utf8")}var Pv="foo bar bazâÂÂð£",Lr=lr&&(U5(Pv)==F2(Pv)&&U5||B5(Pv)==F2(Pv)&&B5)||F2,sl=lr?function(e){return bc(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,a=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>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("")},bg=(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]*?)</(?:\\w+:)?'+r+">",n||"")}})(),KV=(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(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,` 511`).replace(/<[^>]*>/g,""),a=0;a<e.length;++a)n=n.replace(e[a][0],e[a][1]);return n}})(),ufe=(function(){var e={};return function(r){return e[r]!==void 0?e[r]:e[r]=new RegExp("<(?:vt:)?"+r+">([\\s\\S]*?)</(?:vt:)?"+r+">","g")}})(),dfe=/<\/?(?:vt:)?variant>/g,ffe=/<(?:vt:)([^>]*)>([\s\S]*)</;function z5(e,t){var r=qt(e),n=e.match(ufe(r.baseType))||[],a=[];if(n.length!=r.size){if(t.WTF)throw new Error("unexpected vector length "+n.length+" != "+r.size);return a}
511return n.forEach(function(i){var s=i.replace(dfe,"").match(ffe);s&&a.push({v:Lr(s[2]),t:s[1]})}),a}var YV=/(^\s|\s$|\n)/;function Pa(e,t){return"<"+e+(t.match(YV)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function wg(e){return Pn(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function lt(e,t,r){return"<"+e+(r!=null?wg(r):"")+(t!=null?(t.match(YV)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function gC(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(r){if(t)throw r}return""}function hfe(e,t){switch(typeof e){case"string":var r=lt("vt:lpwstr",Fr(e));return r=r.replace(/"/g,"_x0022_"),r;case"number":return lt((e|0)==e?"vt:i4":"vt:r8",Fr(String(e)));case"boolean":return lt("vt:bool",e?"true":"false")}if(e instanceof Date)return lt("vt:filetime",gC(e));throw new Error("Unable to serialize "+e)}function MR(e){if(lr&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return Lr(Iu(jR(e)));throw new Error("Bad input format: expected Buffer or string")}var _g=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/mg,sa={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},ff=["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"],as={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function pfe(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 mfe(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<Math.pow(2,52))?a=-1022:(i-=Math.pow(2,52),a+=1023)):(a=2047,i=isNaN(t)?26985:0);for(var l=0;l<=5;++l,i/=256)e[r+l]=i&255;e[r+6]=(a&15)<<4|i&15,e[r+7]=a>>4|n}var H5=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var a=0,i=e[0][n].length;a<i;a+=r)t.push.apply(t,e[0][n].slice(a,a+r));return t},q5=lr?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:bc(t)})):H5(e)}:H5,W5=function(e,t,r){for(var n=[],a=t;a<r;a+=2)n.push(String.fromCharCode(Kl(e,a)));return n.join("").replace(Si,"")},DR=lr?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(Si,""):W5(e,t,r)}
511:W5,V5=function(e,t,r){for(var n=[],a=t;a<t+r;++a)n.push(("0"+e[a].toString(16)).slice(-2));return n.join("")},XV=lr?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):V5(e,t,r)}:V5,G5=function(e,t,r){for(var n=[],a=t;a<r;a++)n.push(String.fromCharCode(ph(e,a)));return n.join("")},Px=lr?function(t,r,n){return Buffer.isBuffer(t)?t.toString("utf8",r,n):G5(t,r,n)}:G5,JV=function(e,t){var r=is(e,t);return r>0?Px(e,t+4,t+4+r-1):""},QV=JV,ZV=function(e,t){var r=is(e,t);return r>0?Px(e,t+4,t+4+r-1):""},eG=ZV,tG=function(e,t){var r=2*is(e,t);return r>0?Px(e,t+4,t+4+r-1):""},rG=tG,nG=function(t,r){var n=is(t,r);return n>0?DR(t,r+4,r+4+n):""},aG=nG,iG=function(e,t){var r=is(e,t);return r>0?Px(e,t+4,t+4+r):""},sG=iG,oG=function(e,t){return pfe(e,t)},o1=oG,LR=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};lr&&(QV=function(t,r){if(!Buffer.isBuffer(t))return JV(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},eG=function(t,r){if(!Buffer.isBuffer(t))return ZV(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},rG=function(t,r){if(!Buffer.isBuffer(t))return tG(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},aG=function(t,r){if(!Buffer.isBuffer(t))return nG(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},sG=function(t,r){if(!Buffer.isBuffer(t))return iG(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},o1=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):oG(t,r)},LR=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var ph=function(e,t){return e[t]},Kl=function(e,t){return e[t+1]*256+e[t]},gfe=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},is=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},vd=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},xfe=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function B0(e,t){var r="",n,a,i=[],s,l,c,u;switch(t){case"dbcs":if(u=this.l,lr&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c)r+=String.fromCharCode(Kl(this,u)),u+=2;e*=2;break;case"utf8":r=Px(this,this.l,this.l+e);break;case"utf16le":e*=2,r=DR(this,this.l,this.l+e);break;case"wstr":return B0.call(this,e,"dbcs");case"lpstr-ansi":r=QV(this,this.l),e=4+is(this,this.l);break;case"lpstr-cp":r=eG(this,this.l),e=4+is(this,this.l);break;case"lpwstr":r=rG(this,this.l),e=4+2*is(this,this.l);break;case"lpp4":e=4+is(this,this.l),r=aG(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+is(this,this.l),r=sG(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,r="";(s=ph(this,this.l+e++))!==0;)i.push(Ov(s));r=i.join("");break;case"_wstr":for(e=0,r="";(s=Kl(this,this.l+e))!==0;)i.push(Ov(s)),e+=2;e+=2,r=i.join("");break;case"dbcs-cont":for(r="",u=this.l,c=0;c<e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return s=ph(this,u),this.l=u+1,l=B0.call(this,e-c,s?"dbcs-cont":"sbcs-cont"),i.join("")+l;i.push(Ov(Kl(this,u))),u+=2}r=i.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(r="",u=this.l,c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return s=ph(this,u),this.l=u+1,l=B0.call(this,e-c,s?"dbcs-cont":"sbcs-cont"),i.join("")+l;i.push(Ov(ph(this,u))),u+=1}r=i.join("");break;default:switch(e){case 1:return n=ph(this,this.l),this.l++,n;case 2:return n=(t==="i"?gfe:Kl)(this,this.l),this.l+=2,n;case 4:case-4:return t==="i"||(this[this.l+3]&128)===0?(n=(e>0?vd:xfe)(this,this.l),this.l+=4,n):(a=is(this,this.l),this.l+=4,a);case 8:case-8:if(t==="f")return e==8?a=o1(this,this.l):a=o1([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=XV(this,this.l,e);break}}return this.l+=e,r}var yfe=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},vfe=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},bfe=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function wfe(e,t,r){var n=0,a=0;if(r==="dbcs"){for(a=0;a!=t.length;++a)bfe(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<e;++a)this[this.l++]=parseInt(t.slice(2*a,2*a+2),16)||0;return this}else if(r==="utf16le"){var i=Math.min(this.l+e,this.length);for(a=0;a<Math.min(t.length,e);++a){var s=t.charCodeAt(a);this[this.l++]=s&255,this[this.l++]=s>>8}for(;this.l<i;)this[this.l++]=0;return this}else switch(e){case 1:n=1,this[this.l]=t&255;break;case 2:n=2,this[this.l]=t&255,t>>>=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,yfe(this,t,this.l);break;case 8:if(n=8,r==="f"){mfe(this,t,this.l);break}case 16:break;case-4:n=4,vfe(this,t,this.l);break}return this.l+=n,this}function lG(e,t){var r=XV(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function Oa(e,t){e.l=t,e.read_shift=B0,e.chk=lG,e.write_shift=wfe}function Za(e,t){e.l+=t}function ze(e){var t=Su(e);return Oa(t,0),t}function wc(e,t,r){if(e){var n,a,i;Oa(e,e.l||0);for(var s=e.length,l=0,c=0;e.l<s;){l=e.read_shift(1),l&128&&(l=(l&127)+((e.read_shift(1)&127)<<7));var u=jg[l]||jg[65535];for(n=e.read_shift(1),i=n&127,a=1;a<4&&n&128;++a)i+=((n=e.read_shift(1))&127)<<7*a;c=e.l+i;var d=u.f&&u.f(e,i,r);if(e.l=c,t(d,u,l))return}}}function Ui(){var e=[],t=lr?256:2048,r=function(u){var d=ze(u);return Oa(d,0),d},n=r(t),a=function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},i=function(u){return n&&u<n.length-n.l?n:(a(),n=r(Math.max(u+1,t)))},s=function(){return a(),wa(e)},l=function(u){a(),n=u,n.l==null&&(n.l=n.length),i(t)};return{next:i,push:l,end:s,_bufs:e}}function Ge(e,t,r,n){var a=+t,i;if(!isNaN(a)){n||(n=jg[a].p||(r||[]).length||0),i=1+(a>=128?1:0)+1,n>=128&&++i,n>=16384&&++i,n>=2097152&&++i;var s=e.next(i);a<=127?s.write_shift(1,a):(s.write_shift(1,(a&127)+128),s.write_shift(1,a>>7));for(var l=0;l!=4;++l)if(n>=128)s.write_shift(1,(n&127)+128),n>>=7;else{s.write_shift(1,n);break}n>0&&LR(r)&&e.push(r)}}function U0(e,t,r){var n=cn(e);
vendor: 10,131 bytes, line 511
511if(t.s?(n.cRel&&(n.c+=t.s.c),n.rRel&&(n.r+=t.s.r)):(n.cRel&&(n.c+=t.c),n.rRel&&(n.r+=t.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function K5(e,t,r){var n=cn(e);return n.s=U0(n.s,t.s,r),n.e=U0(n.e,t.s,r),n}function z0(e,t){if(e.cRel&&e.c<0)for(e=cn(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=cn(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=zt(e);return!e.cRel&&e.cRel!=null&&(r=Efe(r)),!e.rRel&&e.rRel!=null&&(r=_fe(r)),r}function M2(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?"":"$")+wn(e.s.c)+":"+(e.e.cRel?"":"$")+wn(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+Bn(e.s.r)+":"+(e.e.rRel?"":"$")+Bn(e.e.r):z0(e.s,t.biff)+":"+z0(e.e,t.biff)}function $R(e){return parseInt(Sfe(e),10)-1}function Bn(e){return""+(e+1)}function _fe(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function Sfe(e){return e.replace(/\$(\d+)$/,"$1")}function BR(e){for(var t=kfe(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function wn(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 Efe(e){return e.replace(/^([A-Z])/,"$$$1")}function kfe(e){return e.replace(/^\$([A-Z])/,"$1")}function Nfe(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function _n(e){for(var t=0,r=0,n=0;n<e.length;++n){var a=e.charCodeAt(n);a>=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 zt(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 qi(e){var t=e.indexOf(":");return t==-1?{s:_n(e),e:_n(e)}:{s:_n(e.slice(0,t)),e:_n(e.slice(t+1))}}function Zt(e,t){return typeof t>"u"||typeof t=="number"?Zt(e.s,e.e):(typeof e!="string"&&(e=zt(e)),typeof t!="string"&&(t=zt(t)),e==t?e:e+":"+t)}function wr(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;n<i&&!((a=e.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(t.s.c=--r,r=0;n<i&&!((a=e.charCodeAt(n)-48)<0||a>9);++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 Y5(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=Xs(e.z,r?ua(t):t)}catch{}try{return e.w=Xs((e.XF||{}).numFmtId||(r?14:0),r?ua(t):t)}catch{return""+t}}function dc(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"?_c[e.v]||e.v:t==null?Y5(e,e.v):Y5(e,t))}function Fu(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function cG(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 c=typeof n.origin=="string"?_n(n.origin):n.origin;s=c.r,l=c.c}i["!ref"]||(i["!ref"]="A1:A1")}var u={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var d=wr(i["!ref"]);u.s.c=d.s.c,u.s.r=d.s.r,u.e.c=Math.max(u.e.c,d.e.c),u.e.r=Math.max(u.e.r,d.e.r),s==-1&&(u.e.r=s=d.e.r+1)}for(var f=0;f!=t.length;++f)if(t[f]){if(!Array.isArray(t[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var p=0;p!=t[f].length;++p)if(!(typeof t[f][p]>"u")){var m={v:t[f][p]},x=s+f,y=l+p;if(u.s.r>x&&(u.s.r=x),u.s.c>y&&(u.s.c=y),u.e.r<x&&(u.e.r=x),u.e.c<y&&(u.e.c=y),t[f][p]&&typeof t[f][p]=="object"&&!Array.isArray(t[f][p])&&!(t[f][p]instanceof Date))m=t[f][p];else if(Array.isArray(m.v)&&(m.f=t[f][p][1],m.v=m.v[0]),m.v===null)if(m.f)m.t="n";else if(n.nullError)m.t="e",m.v=0;else if(n.sheetStubs)m.t="z";else continue;else typeof m.v=="number"?m.t="n":typeof m.v=="boolean"?m.t="b":m.v instanceof Date?(m.z=n.dateNF||Ut[14],n.cellDates?(m.t="d",m.w=Xs(m.z,ua(m.v))):(m.t="n",m.v=ua(m.v),m.w=Xs(m.z,m.v))):m.t="s";if(a)i[x]||(i[x]=[]),i[x][y]&&i[x][y].z&&(m.z=i[x][y].z),i[x][y]=m;else{var v=zt({c:y,r:x});i[v]&&i[v].z&&(m.z=i[v].z),i[v]=m}}}return u.s.c<1e7&&(i["!ref"]=Zt(u)),i}function Xp(e,t){return cG(null,e,t)}function Tfe(e){return e.read_shift(4,"i")}function To(e,t){return t||(t=ze(4)),t.write_shift(4,e),t}function Qa(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function _a(e,t){var r=!1;return t==null&&(r=!0,t=ze(4+2*e.length)),t.write_shift(4,e.length),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}function jfe(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function Afe(e,t){return t||(t=ze(4)),t.write_shift(2,0),t.write_shift(2,0),t}function UR(e,t){var r=e.l,n=e.read_shift(1),a=Qa(e),i=[],s={t:a,h:a};if((n&1)!==0){for(var l=e.read_shift(4),c=0;c!=l;++c)i.push(jfe(e));s.r=i}else s.r=[{ich:0,ifnt:0}];return e.l=r+t,s}function Cfe(e,t){var r=!1;return t==null&&(r=!0,t=ze(15+4*e.t.length)),t.write_shift(1,0),_a(e.t,t),r?t.slice(0,t.l):t}var Ofe=UR;function Pfe(e,t){var r=!1;return t==null&&(r=!0,t=ze(23+4*e.t.length)),t.write_shift(1,1),_a(e.t,t),t.write_shift(4,1),Afe({},t),r?t.slice(0,t.l):t}function to(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function hf(e,t){return t==null&&(t=ze(8)),t.write_shift(-4,e.c),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}function pf(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}function mf(e,t){return t==null&&(t=ze(4)),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}var Rfe=Qa,uG=_a;function zR(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}function l1(e,t){var r=!1;return t==null&&(r=!0,t=ze(127)),t.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}var Ife=Qa,xC=zR,HR=l1;function qR(e){var t=e.slice(e.l,e.l+4),r=t[0]&1,n=t[0]&2;e.l+=4;var a=n===0?o1([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):vd(t,0)>>2;return r?a/100:a}function dG(e,t){t==null&&(t=ze(4));var r=0,n=0,a=e*100;if(e==(e|0)&&e>=-536870912&&e<1<<29?n=1:a==(a|0)&&a>=-536870912&&a<1<<29&&(n=1,r=1),n)t.write_shift(-4,((r?a:e)<<2)+(r+2));else throw new Error("unsupported RkNumber "+e)}function fG(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}function Ffe(e,t){return t||(t=ze(16)),t.write_shift(4,e.s.r),t.write_shift(4,e.e.r),t.write_shift(4,e.s.c),t.write_shift(4,e.e.c),t}var gf=fG,Jp=Ffe;function Ya(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function Xd(e,t){return(t||ze(8)).write_shift(8,e,"f")}function Mfe(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),c=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=a;var u=Bd[a];u&&(t.rgb=Eg(u));break;case 2:t.rgb=Eg([s,l,c]);break;case 3:t.theme=a;break}return i!=0&&(t.tint=i>0?i/32767:i/32768),t}function c1(e,t){if(t||(t=ze(8)),!e||e.auto)return t.write_shift(4,0),t.write_shift(4,0),t;e.index!=null?(t.write_shift(1,2),t.write_shift(1,e.index)):e.theme!=null?(t.write_shift(1,6),t.write_shift(1,e.theme)):(t.write_shift(1,5),t.write_shift(1,0));var r=e.tint||0;if(r>0?r*=32767:r<0&&(r*=32768),t.write_shift(2,r),!e.rgb||e.theme!=null)t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);else{var n=e.rgb||"FFFFFF";typeof n=="number"&&(n=("000000"+n.toString(16)).slice(-6)),t.write_shift(1,parseInt(n.slice(0,2),16)),t.write_shift(1,parseInt(n.slice(2,4),16)),t.write_shift(1,parseInt(n.slice(4,6),16)),t.write_shift(1,255)}return t}function Dfe(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 Lfe(e,t){t||(t=ze(2));var r=(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0);return t.write_shift(1,r),t.write_shift(1,0),t}function hG(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 $fe(e){return hG(e,1)}function Bfe(e){return hG(e,2)}var WR=2,Ii=3,Rv=11,X5=12,u1=19,Iv=64,Ufe=65,zfe=71,Hfe=4108,qfe=4126,ya=80,pG=81,Wfe=[ya,pG],yC={1:{n:"CodePage",t:WR},2:{n:"Category",t:ya},3:{n:"PresentationFormat",t:ya},4:{n:"ByteCount",t:Ii},5:{n:"LineCount",t:Ii},6:{n:"ParagraphCount",t:Ii},7:{n:"SlideCount",t:Ii},8:{n:"NoteCount",t:Ii},9:{n:"HiddenCount",t:Ii},10:{n:"MultimediaClipCount",t:Ii},11:{n:"ScaleCrop",t:Rv},12:{n:"HeadingPairs",t:Hfe},13:{n:"TitlesOfParts",t:qfe},14:{n:"Manager",t:ya},15:{n:"Company",t:ya},16:{n:"LinksUpToDate",t:Rv},17:{n:"CharacterCount",t:Ii},19:{n:"SharedDoc",t:Rv},22:{n:"HyperlinksChanged",t:Rv},23:{n:"AppVersion",t:Ii,p:"version"},24:{n:"DigSig",t:Ufe},26:{n:"ContentType",t:ya},27:{n:"ContentStatus",t:ya},28:{n:"Language",t:ya},29:{n:"Version",t:ya},255:{},2147483648:{n:"Locale",t:u1},2147483651:{n:"Behavior",t:u1},1919054434:{}},vC={1:{n:"CodePage",t:WR},2:{n:"Title",t:ya},3:{n:"Subject",t:ya},4:{n:"Author",t:ya},5:{n:"Keywords",t:ya},6:{n:"Comments",t:ya},7:{n:"Template",t:ya},8:{n:"LastAuthor",t:ya},9:{n:"RevNumber",t:ya},10:{n:"EditTime",t:Iv},11:{n:"LastPrinted",t:Iv},12:{n:"CreatedDate",t:Iv},13:{n:"ModifiedDate",t:Iv},14:{n:"PageCount",t:Ii},15:{n:"WordCount",t:Ii},16:{n:"CharCount",t:Ii},17:{n:"Thumbnail",t:zfe},18:{n:"Application",t:ya},19:{n:"DocSecurity",t:Ii},255:{},2147483648:{n:"Locale",t:u1},2147483651:{n:"Behavior",t:u1},1919054434:{}},J5={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"},Vfe=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","dar
511kVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function Gfe(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var Kfe=Gfe([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]),Bd=cn(Kfe),_c={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},mG={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},bC={"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"},Fv={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"}
vendor: 2,304 bytes, line 511
511,comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function VR(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function Yfe(e){var t=VR();if(!e||!e.match)return t;var r={};if((e.match(ti)||[]).forEach(function(n){var a=qt(n);switch(a[0].replace(ife,"<")){case"<?xml":break;case"<Types":t.xmlns=a["xmlns"+(a[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":r[a.Extension]=a.ContentType;break;case"<Override":t[bC[a.ContentType]]!==void 0&&t[bC[a.ContentType]].push(a.PartName);break}}),t.xmlns!==sa.CT)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>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}function gG(e,t){var r=Yde(bC),n=[],a;n[n.length]=zn,n[n.length]=lt("Types",null,{xmlns:sa.CT,"xmlns:xsd":sa.xsd,"xmlns:xsi":sa.xsi}),n=n.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["t
511if","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(c){return lt("Default",null,{Extension:c[0],ContentType:c[1]})}));var i=function(c){e[c]&&e[c].length>0&&(a=e[c][0],n[n.length]=lt("Override",null,{PartName:(a[0]=="/"?"":"/")+a,ContentType:Fv[c][t.bookType]||Fv[c].xlsx}))},s=function(c){(e[c]||[]).forEach(function(u){n[n.length]=lt("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:Fv[c][t.bookType]||Fv[c].xlsx})})},l=function(c){(e[c]||[]).forEach(function(u){n[n.length]=lt("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:r[c][0]})})};return i("workbooks"),s("sheets"),s("charts"),l("themes"),["strs","styles"].forEach(i),["coreprops","extprops","custprops"].forEach(l),l("vba"),l("comments"),l("threadedcomments"),l("drawings"),s("metadata"),l("people"),n.length>2&&(n[n.length]="</Types>",n[1]=n[1].replace("/>",">")),n.join("")}var ur
vendor: 2,399 bytes, line 511
511={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",
vendor: 21,746 bytes, lines 511-521
511VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function Sg(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function H0(e,t){var r={"!id":{}};if(!e)return r;t.charAt(0)!=="/"&&(t="/"+t);var n={};return(e.match(ti)||[]).forEach(function(a){var i=qt(a);if(i[0]==="<Relationship"){var s={};s.Type=i.Type,s.Target=i.Target,s.Id=i.Id,i.TargetMode&&(s.TargetMode=i.TargetMode);var l=i.TargetMode==="External"?i.Target:R0(i.Target,t);r[l]=s,n[i.Id]=s}}),r["!id"]=n,r}function Fh(e){var t=[zn,lt("Relationships",null,{xmlns:sa.RELS})];return Pn(e["!id"]).forEach(function(r){t[t.length]=lt("Relationship",null,e["!id"][r])}),t.length>2&&(t[t.length]="</Relationships>",t[1]=t[1].replace("/>",">")),t.join("")}function Rr(e,t,r,n,a,i){if(a||(a={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),t<0)for(t=e["!idx"];e["!id"]["rId"+t];++t);if(e["!idx"]=t+1,a.Id="rId"+t,a.Type=n,a.Target=r,[ur.HLINK,ur.XPATH,ur.XMISS].indexOf(a.Type)>-1&&(a.TargetMode="External"),e["!id"][a.Id])throw new Error("Cannot rewrite rId "+t);return e["!id"][a.Id]=a,e[("/"+a.Target).replace("//","/")]=a,t}var Xfe="application/vnd.oasis.opendocument.spreadsheet";function Jfe(e,t){for(var r=MR(e),n,a;n=_g.exec(r);)switch(n[3]){case"manifest":break;case"file-entry":if(a=qt(n[0],!1),a.path=="/"&&a.type!==Xfe)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw n}}function Qfe(e){var t=[zn];t.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2"> 512`),t.push(` <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/> 513`);for(var r=0;r<e.length;++r)t.push(' <manifest:file-entry manifest:full-path="'+e[r][0]+'" manifest:media-type="'+e[r][1]+`"/> 514`);return t.push("</manifest:manifest>"),t.join("")}function Q5(e,t,r){return[' <rdf:Description rdf:about="'+e+`"> 515`,' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(r||"odf")+"#"+t+`"/> 516`,` </rdf:Description> 517`].join("")}function Zfe(e,t){return[' <rdf:Description rdf:about="'+e+`"> 518`,' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+t+`"/> 519`,` </rdf:Description> 520`].join("")}function ehe(e){var t=[zn];t.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 521`);for(var r=0;r!=e.length;++r)t.push(Q5(e[r][0],e[r][1])),t.push(Zfe("",e[r][0]));return t.push(Q5("","Document","pkg")),t.push("</rdf:RDF>"),t.join("")}function xG(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+r1.version+"</meta:generator></office:meta></office:document-meta>"}var Ks=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],the=(function(){for(var e=new Array(Ks.length),t=0;t<Ks.length;++t){var r=Ks[t],n="(?:"+r[0].slice(0,r[0].indexOf(":"))+":)"+r[0].slice(r[0].indexOf(":")+1);e[t]=new RegExp("<"+n+"[^>]*>([\\s\\S]*?)</"+n+">")}return e})();function yG(e){var t={};e=Lr(e);for(var r=0;r<Ks.length;++r){var n=Ks[r],a=e.match(the[r]);a!=null&&a.length>0&&(t[n[1]]=br(a[1])),n[2]==="date"&&t[n[1]]&&(t[n[1]]=ln(t[n[1]]))}return t}function D2(e,t,r,n,a){a[e]!=null||t==null||t===""||(a[e]=t,t=Fr(t),n[n.length]=r?lt(e,t,r):Pa(e,t))}function vG(e,t){var r=t||{},n=[zn,lt("cp:coreProperties",null,{"xmlns:cp":sa.CORE_PROPS,"xmlns:dc":sa.dc,"xmlns:dcterms":sa.dcterms,"xmlns:dcmitype":sa.dcmitype,"xmlns:xsi":sa.xsi})],a={};if(!e&&!r.Props)return n.join("");e&&(e.CreatedDate!=null&&D2("dcterms:created",typeof e.CreatedDate=="string"?e.CreatedDate:gC(e.CreatedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,a),e.ModifiedDate!=null&&D2("dcterms:modified",typeof e.ModifiedDate=="string"?e.ModifiedDate:gC(e.ModifiedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,a));for(var i=0;i!=Ks.length;++i){var s=Ks[i],l=r.Props&&r.Props[s[1]]!=null?r.Props[s[1]]:e?e[s[1]]:null;l===!0?l="1":l===!1?l="0":typeof l=="number"&&(l=String(l)),l!=null&&D2(s[0],l,null,n,a)}return n.length>2&&(n[n.length]="</cp:coreProperties>",n[1]=n[1].replace("/>",">")),n.join("")}var Ud=[["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"]],bG=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function wG(e,t,r,n){var a=[];if(typeof e=="string")a=z5(e,n);else for(var i=0;i<e.length;++i)a=a.concat(e[i].map(function(d){return{v:d}}));var s=typeof t=="string"?z5(t,n).map(function(d){return d.v}):t,l=0,c=0;if(s.length>0)for(var u=0;u!==a.length;u+=2){switch(c=+a[u+1].v,a[u].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=c,r.SheetNames=s.slice(l,l+c);break;case"Named Ranges":case"Rangos con nombre":case"ååä»ãä¸è¦§":case"Benannte Bereiche":case"Navngivne omrÃ¥der":r.NamedRanges=c,r.DefinedNames=s.slice(l,l+c);break;case"Charts":case"Diagramme":r.Chartsheets=c,r.ChartNames=s.slice(l,l+c);break}l+=c}}function rhe(e,t,r){var n={};return t||(t={}),e=Lr(e),Ud.forEach(function(a){var i=(e.match(bg(a[0]))||[])[1];switch(a[2]){case"string":i&&(t[a[1]]=br(i));break;case"bool":t[a[1]]=i==="true";break;case"raw":var s=e.match(new RegExp("<"+a[0]+"[^>]*>([\\s\\S]*?)</"+a[0]+">"));s&&s.length>0&&(n[a[1]]=s[1]);break}}),n.HeadingPairs&&n.TitlesOfParts&&wG(n.HeadingPairs,n.TitlesOfParts,t,r),t}function _G(e){var t=[],r=lt;return e||(e={}),e.Application="SheetJS",t[t.length]=zn,t[t.length]=lt("Properties",null,{xmlns:sa.EXT_PROPS,"xmlns:vt":sa.vt}),Ud.forEach(function(n){if(e[n[1]]!==void 0){var a;switch(n[2]){case"string":a=Fr(String(e[n[1]]));break;case"bool":a=e[n[1]]?"true":"false";break}a!==void 0&&(t[t.length]=r(n[0],a))}}),t[t.length]=r("HeadingPairs",r("vt:vector",r("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+r("vt:variant",r("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=r("TitlesOfParts",r("vt:vector",e.SheetNames.map(function(n){return"<vt:lpstr>"+Fr(n)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var nhe=/<[^>]+>[^<]*/g;function ahe(e,t){var r={},n="",a=e.match(nhe);if(a)for(var i=0;i!=a.length;++i){var s=a[i],l=qt(s);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":n=br(l.name);break;case"</property>":n=null;break;default:if(s.indexOf("<vt:")===0){var c=s.split(">"),u=c[0].slice(4),d=c[1];switch(u){case"lpstr":case"bstr":case"lpwstr":r[n]=br(d);break;case"bool":r[n]=an(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]=ln(d);break;case"cy":case"error":r[n]=br(d);break;default:if(u.slice(-1)=="/")break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",s,u,c)}}else if(s.slice(0,2)!=="</"){if(t.WTF)throw new Error(s)}}}return r}function SG(e){var t=[zn,lt("Properties",null,{xmlns:sa.CUST_PROPS,"xmlns:vt":sa.vt})];if(!e)return t.join("");var r=1;return Pn(e).forEach(function(a){++r,t[t.length]=lt("property",hfe(e[a]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r,name:Fr(a)})}),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var wC={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"},L2;function ihe(e,t,r){L2||(L2=n_(wC)),t=L2[t]||t,e[t]=r}function she(e,t){var r=[];return Pn(wC).map(function(n){for(var a=0;a<Ks.length;++a)if(Ks[a][1]==n)return Ks[a];for(a=0;a<Ud.length;++a)if(Ud[a][1]==n)return Ud[a];throw n}).forEach(function(n){if(e[n[1]]!=null){var a=t&&t.Props&&t.Props[n[1]]!=null?t.Props[n[1]]:e[n[1]];switch(n[2]){case"date":a=new Date(a).toISOString().replace(/\.\d*Z/,"Z");break}typeof a=="number"?a=String(a):a===!0||a===!1?a=a?"1":"0":a instanceof Date&&(a=new Date(a).toISOString().replace(/\.\d*Z/,"")),r.push(Pa(wC[n[1]]||n[1],a))}}),lt("DocumentProperties",r.join(""),{xmlns:as.o})}function ohe(e,t){var r=["Worksheets","SheetNames"],n="CustomDocumentProperties",a=[];return e&&Pn(e).forEach(function(i){if(Object.prototype.hasOwnProperty.call(e,i)){for(var s=0;s<Ks.length;++s)if(i==Ks[s][1])return;for(s=0;s<Ud.length;++s)if(i==Ud[s][1])return;for(s=0;s<r.length;++s)if(i==r[s])return;var l=e[i],c="string";typeof l=="number"?(c="float",l=String(l)):l===!0||l===!1?(c="boolean",l=l?"1":"0"):l=String(l),a.push(lt(L5(i),l,{"dt:dt":c}))}}),t&&Pn(t).forEach(function(i){if(Object.prototype.hasOwnProperty.call(t,i)&&!(e&&Object.prototype.hasOwnProperty.call(e,i))){var s=t[i],l="string";typeof s=="number"?(l="float",s=String(s)):s===!0||s===!1?(l="boolean",s=s?"1":"0"):s instanceof Date?(l="dateTime.tz",s=s.toISOString()):s=String(s),a.push(lt(L5(i),s,{"dt:dt":l}))}}),"<"+n+' xmlns="'+as.o+'">'+a.join("")+"</"+n+">"}function GR(e){var t=e.read_shift(4),r=e.read_shift(4);return new Date((r/1e7*Math.pow(2,32)+t/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function lhe(e){var t=typeof e=="string"?new Date(Date.parse(e)):e,r=t.getTime()/1e3+11644473600,n=r%Math.pow(2,32),a=(r-n)/Math.pow(2,32);n*=1e7,a*=1e7;var i=n/Math.pow(2,32)|0;i>0&&(n=n%Math.pow(2,32),a+=i);var s=ze(8);return s.write_shift(4,n),s.write_shift(4,a),s}function EG(e,t,r){var n=e.l,a=e.read_shift(0,"lpstr-cp");if(r)for(;e.l-n&3;)++e.l;return a}function kG(e,t,r){var n=e.read_shift(0,"lpwstr");return n}function NG(e,t,r){return t===31?kG(e):EG(e,t,r)}function _C(e,t,r){return NG(e,t,r===!1?0:4)}function che(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return NG(e,t,0)}function uhe(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n){var a=e.l;r[n]=e.read_shift(0,"lpwstr").replace(Si,""),e.l-a&2&&(e.l+=2)}return r}function dhe(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n)r[n]=e.read_shift(0,"lpstr-cp").replace(Si,"");return r}function fhe(e){var t=e.l,r=d1(e,pG);e[e.l]==0&&e[e.l+1]==0&&e.l-t&2&&(e.l+=2);var n=d1(e,Ii);return[r,n]}function hhe(e){for(var t=e.read_shift(4),r=[],n=0;n<t/2;++n)r.push(fhe(e));return r}function Z5(e,t){for(var r=e.read_shift(4),n={},a=0;a!=r;++a){var i=e.read_shift(4),s=e.read_shift(4);n[i]=e.read_shift(s,t===1200?"utf16le":"utf8").replace(Si,"").replace(P0,"!"),t===1200&&s%2&&(e.l+=2)}return e.l&3&&(e.l=e.l>>3<<2),n}function TG(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 phe(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}function d1(e,t,r){var n=e.read_shift(2),a,i=r||{};if(e.l+=2,t!==X5&&n!==t&&Wfe.indexOf(t)===-1&&!((t&65534)==4126&&(n&65534)==4126))throw new Error("Expected type "+t+" saw "+n);switch(t===X5?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 EG(e,n,4).replace(Si,"");case 31:return kG(e);case 64:return GR(e);case 65:return TG(e);case 71:return phe(e);case 80:return _C(e,n,!i.raw).replace(Si,"");case 81:return che(e,n).replace(Si,"");case 4108:return hhe(e);case 4126:case 4127:return n==4127?uhe(e):dhe(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+n)}}function eL(e,t){var r=ze(4),n=ze(4);switch(r.write_shift(4,e==80?31:e),e){case 3:n.write_shift(-4,t);break;case 5:n=ze(8),n.write_shift(8,t,"f");break;case 11:n.write_shift(4,t?1:0);break;case 64:n=lhe(t);break;case 31:case 80:for(n=ze(4+2*(t.length+1)+(t.length%2?0:2)),n.write_shift(4,t.length+1),n.write_shift(0,t,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+t)}return wa([r,n])}function tL(e,t){var r=e.l,n=e.read_shift(4),a=e.read_shift(4),i=[],s=0,l=0,c=-1,u={};for(s=0;s!=a;++s){var d=e.read_shift(4),f=e.read_shift(4);i[s]=[d,f+r]}i.sort(function(w,S){return w[1]-S[1]});var p={};for(s=0;s!=a;++s){if(e.l!==i[s][1]){var m=!0;if(s>0&&t)switch(t[i[s-1][0]].t){case 2:e.l+2===i[s][1]&&(e.l+=2,m=!1);break;case 80:e.l<=i[s][1]&&(e.l=i[s][1],m=!1);break;case 4108:e.l<=i[s][1]&&(e.l=i[s][1],m=!1);break}if((!t||s==0)&&e.l<=i[s][1]&&(m=!1,e.l=i[s][1]),m)throw new Error("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(t){var x=t[i[s][0]];if(p[x.n]=d1(e,x.t,{raw:!0}),x.p==="version"&&(p[x.n]=String(p[x.n]>>16)+"."+("0000"+String(p[x.n]&65535)).slice(-4)),x.n=="CodePage")switch(p[x.n]){case 0:p[x.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:_o(l=p[x.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+p[x.n])}}else if(i[s][0]===1){if(l=p.CodePage=d1(e,WR),_o(l),c!==-1){var y=e.l;e.l=i[c][1],u=Z5(e,l),e.l=y}}else if(i[s][0]===0){if(l===0){c=s,e.l=i[s+1][1];continue}u=Z5(e,l)}else{var v=u[i[s][0]],b;switch(e[e.l]){case 65:e.l+=4,b=TG(e);break;case 30:e.l+=4,b=_C(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4,b=_C(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,b=e.read_shift(4,"i");break;case 19:e.l+=4,b=e.read_shift(4);break;case 5:e.l+=4,b=e.read_shift(8,"f");break;case 11:e.l+=4,b=Dn(e,4);break;case 64:e.l+=4,b=ln(GR(e));break;default:throw new Error("unparsed value: "+e[e.l])}p[v]=b}}return e.l=r+n,p}var jG=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function mhe(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break}return-1}function rL(e,t,r){var n=ze(8),a=[],i=[],s=8,l=0,c=ze(8),u=ze(8);if(c.write_shift(4,2),c.write_shift(4,1200),u.write_shift(4,1),i.push(c),a.push(u),s+=8+c.length,!t){u=ze(8),u.write_shift(4,0),a.unshift(u);var d=[ze(4)];for(d[0].write_shift(4,e.length),l=0;l<e.length;++l){var f=e[l][0];for(c=ze(8+2*(f.length+1)+(f.length%2?0:2)),c.write_shift(4,l+2),c.write_shift(4,f.length+1),c.write_shift(0,f,"dbcs");c.l!=c.length;)c.write_shift(1,0);d.push(c)}c=wa(d),i.unshift(c),s+=8+c.length}for(l=0;l<e.length;++l)if(!(t&&!t[e[l][0]])&&!(jG.indexOf(e[l][0])>-1||bG.indexOf(e[l][0])>-1)&&e[l][1]!=null){var p=e[l][1],m=0;if(t){m=+t[e[l][0]];var x=r[m];if(x.p=="version"&&typeof p=="string"){var y=p.split(".");p=(+y[0]<<16)+(+y[1]||0)}c=eL(x.t,p)}else{var v=mhe(p);v==-1&&(v=31,p=String(p)),c=eL(v,p)}i.push(c),u=ze(8),u.write_shift(4,t?m:2+l),a.push(u),s+=8+c.length}var b=8*(i.length+1);for(l=0;l<i.length;++l)a[l].write_shift(4,b),b+=i[l].length;return n.write_shift(4,s),n.write_shift(4,i.length),wa([n].concat(a).concat(i))}function nL(e,t,r){var n=e.content;if(!n)return{};Oa(n,0);var a,i,s,l,c=0;n.chk("feff","Byte Order: "),n.read_shift(2);var u=n.read_shift(4),d=n.read_shift(16);if(d!==At.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),c=n.read_shift(4));var f=tL(n,t),p={SystemIdentifier:u};for(var m in f)p[m]=f[m];if(p.FMTID=i,a===1)return p;if(c-n.l==2&&(n.l+=2),n.l!==c)throw new Error("Length mismatch 2: "+n.l+" !== "+c);var x;try{x=tL(n,null)}catch{}for(m in x)p[m]=x[m];return p.FMTID=[i,s],p}function aL(e,t,r,n,a,i){var s=ze(a?68:48),l=[s];s.write_shift(2,65534),s.write_shift(2,0),s.write_shift(4,842412599),s.write_shift(16,At.utils.consts.HEADER_CLSID,"hex"),s.write_shift(4,a?2:1),s.write_shift(16,t,"hex"),s.write_shift(4,a?68:48);var c=rL(e,r,n);if(l.push(c),a){var u=rL(a,null,null);s.write_shift(16,i,"hex"),s.write_shift(4,68+c.length),l.push(u)}return wa(l)}function Xc(e,t){return e.read_shift(t),null}function ghe(e,t){t||(t=ze(e));for(var r=0;r<e;++r)t.write_shift(1,0);return t}function xhe(e,t,r){for(var n=[],a=e.l+t;e.l<a;)n.push(r(e,a-e.l));if(a!==e.l)throw new Error("Slurp error");return n}function Dn(e,t){return e.read_shift(t)===1}function di(e,t){return t||(t=ze(2)),t.write_shift(2,+!!e),t}function Kn(e){return e.read_shift(2,"u")}function Bs(e,t){return t||(t=ze(2)),t.write_shift(2,e),t}function AG(e,t){return xhe(e,t,Kn)}function yhe(e){var t=e.read_shift(1),r=e.read_shift(1);return r===1?t:t===1}function CG(e,t,r){return r||(r=ze(2)),r.write_shift(1,t=="e"?+e:+!!e),r.write_shift(1,t=="e"?1:0),r}function Rx(e,t,r){var n=e.read_shift(r&&r.biff>=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 vhe(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,c={};a&&(s=e.read_shift(2)),n&&(l=e.read_shift(4));var u=i==2?"dbcs-cont":"sbcs-cont",d=t===0?"":e.read_shift(t,u);return a&&(e.l+=4*s),n&&(e.l+=l),c.t=d,a||(c.raw="<t>"+c.t+"</t>",c.r=c.t),c}function bhe(e){var t=e.t||"",r=ze(3);r.write_shift(2,t.length),r.write_shift(1,1);var n=ze(2*t.length);n.write_shift(2*t.length,t,"utf16le");var a=[r,n];return wa(a)}function Jd(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 Ix(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):Jd(e,n,r)}function xf(e,t,r){if(r.biff>5)return Ix(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 OG(e,t,r){return r||(r=ze(3+2*e.length)),r.write_shift(2,e.length),r.write_shift(1,1),r.write_shift(31,e,"utf16le"),r}function whe(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);return e.l+=2,[t,r]}function _he(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(Si,"");return n&&(e.l+=24),a}function She(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(Si,"");return r+s}function Ehe(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return _he(e);case"0303000000000000c000000000000046":return She(e);default:throw new Error("Unsupported Moniker "+r)}}function Mv(e){var t=e.read_shift(4),r=t>0?e.read_shift(t,"utf16le").replace(Si,""):"";return r}function iL(e,t){t||(t=ze(6+e.length*2)),t.write_shift(4,1+e.length);for(var r=0;r<e.length;++r)t.write_shift(2,e.charCodeAt(r));return t.write_shift(2,0),t}function khe(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,c,u="",d,f;a&16&&(i=Mv(e,r-e.l)),a&128&&(s=Mv(e,r-e.l)),(a&257)===257&&(l=Mv(e,r-e.l)),(a&257)===1&&(c=Ehe(e,r-e.l)),a&8&&(u=Mv(e,r-e.l)),a&32&&(d=e.read_shift(16)),a&64&&(f=GR(e)),e.l=r;var p=s||l||c||"";p&&u&&(p+="#"+u),p||(p="#"+u),a&2&&p.charAt(0)=="/"&&p.charAt(1)!="/"&&(p="file://"+p);var m={Target:p};return d&&(m.guid=d),f&&(m.time=f),i&&(m.Tooltip=i),m}function Nhe(e){var t=ze(512),r=0,n=e.Target;n.slice(0,7)=="file://"&&(n=n.slice(7));var a=n.indexOf("#"),i=a>-1?31:23;switch(n.charAt(0)){case"#":i=28;break;case".":i&=-3;break}t.write_shift(4,2),t.write_shift(4,i);var s=[8,6815827,6619237,4849780,83];for(r=0;r<s.length;++r)t.write_shift(4,s[r]);if(i==28)n=n.slice(1),iL(n,t);else if(i&2){for(s="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<s.length;++r)t.write_shift(1,parseInt(s[r],16));var l=a>-1?n.slice(0,a):n;for(t.write_shift(4,2*(l.length+1)),r=0;r<l.length;++r)t.write_shift(2,l.charCodeAt(r));t.write_shift(2,0),i&8&&iL(a>-1?n.slice(a+1):"",t)}else{for(s="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),r=0;r<s.length;++r)t.write_shift(1,parseInt(s[r],16));for(var c=0;n.slice(c*3,c*3+3)=="../"||n.slice(c*3,c*3+3)=="..\\";)++c;for(t.write_shift(2,c),t.write_shift(4,n.length-3*c+1),r=0;r<n.length-3*c;
521++r)t.write_shift(1,n.charCodeAt(r+3*c)&255);for(t.write_shift(1,0),t.write_shift(2,65535),t.write_shift(2,57005),r=0;r<6;++r)t.write_shift(4,0)}return t.slice(0,t.l)}function PG(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 RG(e,t){var r=PG(e);return r[3]=0,r}function El(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 Qd(e,t,r,n){return n||(n=ze(6)),n.write_shift(2,e),n.write_shift(2,t),n.write_shift(2,r||0),n}function The(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}function jhe(e,t,r){return t===0?"":xf(e,t,r)}function Ahe(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 IG(e){var t=e.read_shift(2),r=qR(e);return[t,r]}function Che(e,t,r){e.l+=4,t-=4;var n=e.l+t,a=Rx(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 s_(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 FG(e,t){return t||(t=ze(8)),t.write_shift(2,e.s.r),t.write_shift(2,e.e.r),t.write_shift(2,e.s.c),t.write_shift(2,e.e.c),t}function MG(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 Ohe=MG;function DG(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 Phe(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t}function Rhe(e){var t={};return e.l+=4,e.cf=e.read_shift(2),t}function Ba(e){e.l+=2,e.l+=e.read_shift(2)}var Ihe={0:Ba,4:Ba,5:Ba,6:Ba,7:Rhe,8:Ba,9:Ba,10:Ba,11:Ba,12:Ba,13:Phe,14:Ba,15:Ba,16:Ba,17:Ba,18:Ba,19:Ba,20:Ba,21:DG};function Fhe(e,t){for(var r=e.l+t,n=[];e.l<r;){var a=e.read_shift(2);e.l-=2;try{n.push(Ihe[a](e,r-e.l))}catch{return e.l=r,n}}return e.l!=r&&(e.l=r),n}function Dv(e,t){var r={BIFFVer:0,dt:0};switch(r.BIFFVer=e.read_shift(2),t-=2,t>=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 KR(e,t,r){var n=1536,a=16;switch(r.bookType){case"biff8":break;case"biff5":n=1280,a=8;break;case"biff4":n=4,a=6;break;case"biff3":n=3,a=6;break;case"biff2":n=2,a=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var i=ze(a);return i.write_shift(2,n),i.write_shift(2,t),a>4&&i.write_shift(2,29282),a>6&&i.write_shift(2,1997),a>8&&(i.write_shift(2,49161),i.write_shift(2,1),i.write_shift(2,1798),i.write_shift(2,0)),i}function Mhe(e,t){return t===0||e.read_shift(2),1200}function Dhe(e,t,r){if(r.enc)return e.l+=t,"";var n=e.l,a=xf(e,0,r);return e.read_shift(t+n-e.l),a}function Lhe(e,t){var r=!t||t.biff==8,n=ze(r?112:54);for(n.write_shift(t.biff==8?2:1,7),r&&n.write_shift(1,0),n.write_shift(4,859007059),n.write_shift(4,5458548|(r?0:536870912));n.l<n.length;)n.write_shift(1,r?0:32);return n}function $he(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 Bhe(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=Rx(e,0,r);return s.length===0&&(s="Sheet1"),{pos:n,hs:a,dt:i,name:s}}function Uhe(e,t){var r=!t||t.biff>=8?2:1,n=ze(8+r*e.name.length);n.write_shift(4,e.pos),n.write_shift(1,e.hs||0),n.write_shift(1,e.dt),n.write_shift(1,e.name.length),t.biff>=8&&n.write_shift(1,1),n.write_shift(r*e.name.length,e.name,t.biff<8?"sbcs":"utf16le");var a=n.slice(0,n.l);return a.l=n.l,a}function zhe(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<r;++s)i.push(vhe(e));return i.Count=n,i.Unique=a,i}function Hhe(e,t){var r=ze(8);r.write_shift(4,e.Count),r.write_shift(4,e.Unique);for(var n=[],a=0;a<e.length;++a)n[a]=bhe(e[a]);var i=wa([r].concat(n));return i.parts=[r.length].concat(n.map(function(s){return s.length})),i}function qhe(e,t){var r={};return r.dsst=e.read_shift(2),e.l+=t-2,r}function Whe(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var r=e.read_shift(2);e.l+=4;var n=e.read_shift(1);return e.l+=3,n&7&&(t.level=n&7),n&32&&(t.hidden=!0),n&64&&(t.hpt=r/20),t}function Vhe(e){var t=The(e);if(t.type!=2211)throw new Error("Invalid Future Record "+t.type);var r=e.read_shift(4);return r!==0}function Ghe(e){return e.read_shift(2),e.read_shift(4)}function sL(e,t,r){var n=0;r&&r.biff==2||(n=e.read_shift(2));var a=e.read_shift(2);r&&r.biff==2&&(n=1-(a>>15),a&=32767);var i={Unsynced:n&1,DyZero:(n&2)>>1,ExAsc:(n&4)>>2,ExDsc:(n&8)>>3};return[i,a]}function Khe(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),c=e.read_shift(2),u=e.read_shift(2);return{Pos:[t,r],Dim:[n,a],Flags:i,CurTab:s,FirstTab:l,Selected:c,TabRatio:u}}function Yhe(){var e=ze(18);return e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,29280),e.write_shift(2,17600),e.
vendor: 9,773 bytes, line 521
521write_shift(2,56),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,1),e.write_shift(2,500),e}function Xhe(e,t,r){if(r&&r.biff>=2&&r.biff<5)return{};var n=e.read_shift(2);return{RTL:n&64}}function Jhe(e){var t=ze(18),r=1718;return e&&e.RTL&&(r|=64),t.write_shift(2,r),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}function Qhe(){}function Zhe(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=Rx(e,0,r),n}function epe(e,t){var r=e.name||"Arial",n=t&&t.biff==5,a=n?15+r.length:16+2*r.length,i=ze(a);return i.write_shift(2,e.sz*20),i.write_shift(4,0),i.write_shift(2,400),i.write_shift(4,0),i.write_shift(2,0),i.write_shift(1,r.length),n||i.write_shift(1,1),i.write_shift((n?1:2)*r.length,r,n?"sbcs":"utf16le"),i}function tpe(e){var t=El(e);return t.isst=e.read_shift(4),t}function rpe(e,t,r,n){var a=ze(10);return Qd(e,t,n,a),a.write_shift(4,r),a}function npe(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=e.l+t,a=El(e);r.biff==2&&e.l++;var i=Ix(e,n-e.l,r);return a.val=i,a}function ape(e,t,r,n,a){var i=!a||a.biff==8,s=ze(8+ +i+(1+i)*r.length);return Qd(e,t,n,s),s.write_shift(2,r.length),i&&s.write_shift(1,1),s.write_shift((1+i)*r.length,r,i?"utf16le":"sbcs"),s}function ipe(e,t,r){var n=e.read_shift(2),a=xf(e,0,r);return[n,a]}function spe(e,t,r,n){var a=r&&r.biff==5;n||(n=ze(a?3+t.length:5+2*t.length)),n.write_shift(2,e),n.write_shift(a?1:2,t.length),a||n.write_shift(1,1),n.write_shift((a?1:2)*t.length,t,a?"sbcs":"utf16le");var i=n.length>n.l?n.slice(0,n.l):n;return i.l==null&&(i.l=i.length),i}var ope=xf;function oL(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),c=e.read_shift(2);return e.l=n,{s:{r:i,c:l},e:{r:s,c}}}function lpe(e,t){var r=t.biff==8||!t.biff?4:2,n=ze(2*r+6);return n.write_shift(r,e.s.r),n.write_shift(r,e.e.r+1),n.write_shift(2,e.s.c),n.write_shift(2,e.e.c+1),n.write_shift(2,0),n}function cpe(e){var t=e.read_shift(2),r=e.read_shift(2),n=IG(e);return{r:t,c:r,ixfe:n[0],rknum:n[1]}}function upe(e,t){for(var r=e.l+t-2,n=e.read_shift(2),a=e.read_shift(2),i=[];e.l<r;)i.push(IG(e));if(e.l!==r)throw new Error("MulRK read error");var s=e.read_shift(2);if(i.length!=s-a+1)throw new Error("MulRK length mismatch");return{r:n,c:a,C:s,rkrec:i}}function dpe(e,t){for(var r=e.l+t-2,n=e.read_shift(2),a=e.read_shift(2),i=[];e.l<r;)i.push(e.read_shift(2));if(e.l!==r)throw new Error("MulBlank read error");var s=e.read_shift(2);if(i.length!=s-a+1)throw new Error("MulBlank length mismatch");return{r:n,c:a,C:s,ixfe:i}}function fpe(e,t,r,n){var a={},i=e.read_shift(4),s=e.read_shift(4),l=e.read_shift(4),c=e.read_shift(2);return a.patternType=Vfe[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=c&127,a.icvBack=c>>7&127,a.fsxButton=c>>14&1),a}function hpe(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=fpe(e,t,n.fStyle,r),n}function lL(e,t,r,n){var a=r&&r.biff==5;n||(n=ze(a?16:20)),n.write_shift(2,0),e.style?(n.write_shift(2,e.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,e.numFmtId||0),n.write_shift(2,t<<4));var i=0;return e.numFmtId>0&&a&&(i|=1024),n.write_shift(4,i),n.write_shift(4,0),a||n.write_shift(4,0),n.write_shift(2,0),n}function ppe(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 mpe(e){var t=ze(8);return t.write_shift(4,0),t.write_shift(2,0),t.write_shift(2,0),t}function cL(e,t,r){var n=El(e);(r.biff==2||t==9)&&++e.l;var a=yhe(e);return n.val=a,n.t=a===!0||a===!1?"b":"e",n}function gpe(e,t,r,n,a,i){var s=ze(8);return Qd(e,t,n,s),CG(r,i,s),s}function xpe(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=El(e),a=Ya(e);return n.val=a,n}function ype(e,t,r,n){var a=ze(14);return Qd(e,t,n,a),Xd(r,a),a}var uL=jhe;function vpe(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=Jd(e,i),l=[];n>e.l;)l.push(Ix(e));return[i,a,s,l]}function dL(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=Che(e,t-2,r)),i.body=a||e.read_shift(t-2),typeof a=="string"&&(i.Name=a),i}var bpe=["_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 fL(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),c=0;(!r||r.biff>=5)&&(r.biff!=5&&(e.l+=2),c=e.read_shift(2),r.biff==5&&(e.l+=2),e.l+=4);var u=Jd(e,s,r);a&32&&(u=bpe[u.charCodeAt(0)]);var d=n-e.l;r&&r.biff==2&&--d;var f=n==e.l||l===0||!(d>0)?[]:Fxe(e,d,r,l);return{chKey:i,Name:u,itab:c,rgce:f}}function LG(e,t,r){if(r.biff<8)return wpe(e,t,r);for(var n=[],a=e.l+t,i=e.read_shift(r.biff>8?4:2);i--!==0;)n.push(Ahe(e,r.biff>8?12:6,r));if(e.l!=a)throw new Error("Bad ExternSheet: "+e.l+" != "+a);return n}function wpe(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=Rx(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function _pe(e,t,r){if(r.biff<8){e.l+=t;return}var n=e.read_shift(2),a=e.read_shift(2),i=Jd(e,n,r),s=Jd(e,a,r);return[i,s]}function Spe(e,t,r){var n=MG(e);e.l++;var a=e.read_shift(1);return t-=8,[Mxe(e,t,r),a,n]}function hL(e,t,r){var n=Ohe(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,Rxe(e,t,r)]}function Epe(e){var t=e.read_shift(4)!==0,r=e.read_shift(4)!==0,n=e.read_shift(4);return[t,r,n]}function kpe(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=xf(e,0,r);return r.biff<8&&e.read_shift(1),[{r:n,c:a},l,s,i]}}function Npe(e,t,r){return kpe(e,t,r)}function Tpe(e,t){for(var r=[],n=e.read_shift(2);n--;)r.push(s_(e));return r}function jpe(e){var t=ze(2+e.length*8);t.write_shift(2,e.length);for(var r=0;r<e.length;++r)FG(e[r],t);return t}function Ape(e,t,r){if(r&&r.biff<8)return Ope(e,t,r);var n=DG(e),a=Fhe(e,t-22,n[1]);return{cmo:n,ft:a}}var Cpe={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 Ope(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((Cpe[n]||Za)(e,t,r)),{cmo:[a,n,i],ft:s}}function Ppe(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=whe(e,6,r);var l=e.read_shift(2);e.read_shift(2),Kn(e,2);var c=e.read_shift(2);e.l+=c;for(var u=1;u<e.lens.length-1;++u){if(e.l-n!=e.lens[u])throw new Error("TxO: bad continue record");var d=e[e.l],f=Jd(e,e.lens[u+1]-e.lens[u]-1);if(a+=f,a.length>=(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 Rpe(e,t){var r=s_(e);e.l+=16;var n=khe(e,t-24);return[r,n]}function Ipe(e){var t=ze(24),r=_n(e[0]);t.write_shift(2,r.r),t.write_shift(2,r.r),t.write_shift(2,r.c),t.write_shift(2,r.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),a=0;a<16;++a)t.write_shift(1,parseInt(n[a],16));return wa([t,Nhe(e[1])])}function Fpe(e,t){e.read_shift(2);var r=s_(e),n=e.read_shift((t-10)/2,"dbcs-cont");return n=n.replace(Si,""),[r,n]}function Mpe(e){var t=e[1].Tooltip,r=ze(10+2*(t.length+1));r.write_shift(2,2048);var n=_n(e[0]);r.write_shift(2,n.r),r.write_shift(2,n.r),r.write_shift(2,n.c),r.write_shift(2,n.c);for(var a=0;a<t.length;++a)r.write_shift(2,t.charCodeAt(a));return r.write_shift(2,0),r}function Dpe(e){var t=[0,0],r;return r=e.read_shift(2),t[0]=J5[r]||r,r=e.read_shift(2),t[1]=J5[r]||r,t}function Lpe(e){return e||(e=ze(4)),e.write_shift(2,1),e.write_shift(2,1),e}function $pe(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(RG(e));return r}function Bpe(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(RG(e));return r}function Upe(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 $G(e,t,r){if(!r.cellStyles)return Za(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),c=e.read_shift(2);n==2&&(e.l+=2);var u={s:a,e:i,w:s,ixfe:l,flags:c};return(r.biff>=5||!r.biff)&&(u.level=c>>8&7),u}function zpe(e,t){var r=ze(12);r.write_shift(2,t),r.write_shift(2,t),r.write_shift(2,e.width*256),r.write_shift(2,0);var n=0;return e.hidden&&(n|=1),r.write_shift(1,n),n=e.level||0,r.write_shift(1,n),r.write_shift(2,0),r}function Hpe(e,t){var r={};return t<32||(e.l+=16,r.header=Ya(e),r.footer=Ya(e),e.l+=2),r}function qpe(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}function Wpe(e){for(var t=ze(2*e),r=0;r<e;++r)t.write_shift(2,r+1);return t}var Vpe=El,Gpe=AG,Kpe=Ix;function Ype(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}
vendor: 5,283 bytes, line 521
521function Xpe(e,t,r){r.biffguess&&r.biff==5&&(r.biff=2);var n=El(e);++e.l;var a=xf(e,t-7,r);return n.t="str",n.val=a,n}function Jpe(e){var t=El(e);++e.l;var r=Ya(e);return t.t="n",t.val=r,t}function Qpe(e,t,r){var n=ze(15);return Lx(n,e,t),n.write_shift(8,r,"f"),n}function Zpe(e){var t=El(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}function eme(e,t,r){var n=ze(9);return Lx(n,e,t),n.write_shift(2,r),n}function tme(e){var t=e.read_shift(1);return t===0?(e.l++,""):e.read_shift(t,"sbcs-cont")}function rme(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}function nme(e,t,r){var n=e.l+t,a=El(e),i=e.read_shift(2),s=Jd(e,i,r);return e.l=n,a.t="str",a.val=s,a}var ame=[2,3,48,49,131,139,140,245],SC=(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=n_({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,c){var u=[],d=Su(1);switch(c.type){case"base64":d=ls(hs(l));break;case"binary":d=ls(l);break;case"buffer":case"array":d=l;break}Oa(d,0);var f=d.read_shift(1),p=!!(f&136),m=!1,x=!1;switch(f){case 2:break;case 3:break;case 48:m=!0,p=!0;break;case 49:m=!0,p=!0;break;case 131:break;case 139:break;case 140:x=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+f.toString(16))}var y=0,v=521;f==2&&(y=d.read_shift(2)),d.l+=3,f!=2&&(y=d.read_shift(4)),y>1048576&&(y=1e6),f!=2&&(v=d.read_shift(2));var b=d.read_shift(2),w=c.codepage||1252;f!=2&&(d.l+=16,d.read_shift(1),d[d.l]!==0&&(w=e[d[d.l]]),d.l+=1,d.l+=2),x&&(d.l+=36);for(var S=[],j={},k=Math.min(d.length,f==2?521:v-10-(m?264:0)),E=x?32:11;d.l<k&&d[d.l]!=13;)switch(j={},j.name=xg.utils.decode(w,d.slice(d.l,d.l+E)).replace(/[\u0000\r\n].*$/g,""),d.l+=E,j.type=String.fromCharCode(d.read_shift(1)),f!=2&&!x&&(j.offset=d.read_shift(4)),j.len=d.read_shift(1),f==2&&(j.offset=d.read_shift(2)),j.dec=d.read_shift(1),j.name.length&&S.push(j),f!=2&&(d.l+=x?13:14),j.type){case"B":(!m||j.len!=8)&&c.WTF&&console.log("Skipping "+j.name+":"+j.type);break;case"G":case"P":c.WTF&&console.log("Skipping "+j.name+":"+j.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+j.type)}if(d[d.l]!==13&&(d.l=v-1),d.read_shift(1)!==13)throw new Error("DBF Terminator not found "+d.l+" "+d[d.l]);d.l=v;var T=0,O=0;for(u[0]=[],O=0;O!=S.length;++O)u[0][O]=S[O].name;for(;y-- >0;){if(d[d.l]===42){d.l+=b;continue}for(++d.l,u[++T]=[],O=0,O=0;O!=S.length;++O){var A=d.slice(d.l,d.l+S[O].len);d.l+=S[O].len,Oa(A,0);var P=xg.utils.decode(w,A);switch(S[O].type){case"C":P.trim().length&&(u[T][O]=P.replace(/\s+$/,""));break;case"D":P.length===8?u[T][O]=new Date(+P.slice(0,4),+P.slice(4,6)-1,+P.slice(6,8)):u[T][O]=P;break;case"F":u[T][O]=parseFloat(P.trim());break;case"+":case"I":u[T][O]=x?A.read_shift(-4,"i")^2147483648:A.read_shift(4,"i");break;case"L":switch(P.trim().toUpperCase()){case"Y":case"T":u[T][O]=!0;break;case"N":case"F":u[T][O]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+P+"|")}break;case"M":if(!p)throw new Error("DBF Unexpected MEMO for type "+f.toString(16));u[T][O]="##MEMO##"+(x?parseInt(P.trim(),10):A.read_shift(4));break;case"N":P=P.replace(/\u0000/g,"").trim(),P&&P!="."&&(u[T][O]=+P||0);break;case"@":u[T][O]=new Date(A.read_shift(-8,"f")-621356832e5);break;case"T":u[T][O]=new Date((A.read_shift(4)-2440588)*864e5+A.read_shift(4));break;case"Y":u[T][O]=A.read_shift(4,"i")/1e4+A.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":u[T][O]=-A.read_shift(-8,"f");break;case"B":if(m&&S[O].len==8){u[T][O]=A.read_shift(8,"f");break}case"G":case"P":A.l+=S[O].len;break;case"0":if(S[O].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+S[O].type)}}}if(f!=2&&d.l<d.length&&d[d.l++]!=26)throw new Error("DBF EOF Marker missing "+(d.l-1)+" of "+d.length+" "+d[d.l-1].toString(16));return c&&c.sheetRows&&(u=u.slice(0,c.sheetRows)),c.DBF=S,u}function n(l,c){var u=c||{};u.dateNF||(u.dateNF="yyyymmdd");var d=Xp(r(l,u),u);return d["!cols"]=u.DBF.map(function(f){return{wch:f.len,DBF:f}}),delete u.DBF,d}function a(l,c){try{return Fu(n(l,c),c)}catch(u){if(c&&c.WTF)throw u}return{SheetNames:[],Sheets:{}}}var i={B:8,C:250,L:1,D:8,"?":0,"":0};function s(l,c){var u=c||{};if(+u.codepage>=0&&_o(+u.codepage),u.type=="string")throw new Error("Cannot write DBF to JS string");var d=Ui(),f=p1(l,{header:1,raw:!0,cellDates:!0}),p=f[0],m=f.slice(1),x=l["!cols"]||[],y=0,v=0,b=0,w=1;for(y=0;y<p.length;++y){if(((x[y]||{}).DBF||{}).name){p[y]=x[y].DBF.name,++b;continue}if(p[y]!=null){if(++b,typeof p[y]=="number"&&(p[y]=p[y].toString(10)),typeof p[y]!="str
521ing")throw new Error("DBF Invalid column name "+p[y]+" |"+typeof p[y]+"|");if(p.indexOf(p[y])!==y){for(v=0;v<1024;++v)if(p.indexOf(p[y]+"_"+v)==-1){p[y]+="_"+v;break}}}}var S=wr(l["!ref"]),j=[],k=[],E=[];for(y=0;y<=S.e.c-S.s.c;++y){var T="",O="",A=0,P=[];for(v=0;v<m.length;++v)m[v][y]!=null&&P.push(m[v][y]);if(P.length==0||p[y]==null){j[y]="?";continue}for(v=0;v<P.length;++v){switch(typeof P[v]){case"number":O="B";break;case"string":O="C";break;case"boolean":O="L";break;case"object":O=P[v]instanceof Date?"D":"C";break;default:O="C"}A=Math.max(A,String(P[v]).length),T=T&&T!=O?"C":O}A>250&&(A=250),O=((x[y]||{}).DBF||{}).type,O=="C"&&x[y].DBF.len>A&&(A=x[y].DBF.len),T=="B"&&O=="N"&&(T="N",E[y]=x[y].DBF.dec,A=x[y].DBF.len),k[y]=T=="C"||O=="N"?A:i[T]||0,w+=k[y],j[y]=T}var I=d.next(32);for(I.write_shift(4,318902576),I.write_shift(4,m.length),I.write_shift(2,296+32*b),I.write_shift(2,w),y=0;y<4;++y)I.write_shift(4,0);for(I.write_shift(4,0|(+t[jV]||3)<<8),y=0,v=0;y<p.length;++y)if(p[y]!=null){var R=d.next(32),M=(p[y].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);R.write_shift(1,M,"sbcs"),R.write_shift(1,j[y]=="?"?"C":j[y],"sbcs"),R.write_shift(4,v),R.write_shift(1,k[y]||i[j[y]]||0),R.write_shift(1,E[y]||0),R.write_shift(1,2),R.write_shift(4,0),R.write_shift(1,0),R.write_shift(4,0),R.write_shift(4,0),v+=k[y]||i[j[y]]||0}var L=d.next(264);for(L.write_shift(4,13),y=0;y<65;++y)L.write_shift(4,0);for(y=0;y<m.length;++y){var U=d.next(w);for(U.write_shift(1,0),v=0;v<p.length;++v)if(p[v]!=null)switch(j[v]){case"L":U.write_shift(1,m[y][v]==null?63:m[y][v]?84:70);break;case"B":U.write_shift(8,m[y][v]||0,"f");break;case"N":var W="0";for(typeof m[y][v]=="number"&&(W=m[y][v].toFixed(E[v]||0)),b=0;b<k[v]-W.length;++b)U.write_shift(1,32);U.write_shift(1,W,"sbcs");break;case"D":m[y][v]?(U.write_shift(4,("0000"+m[y][v].getFullYear()).slice(-4),"sbcs"),U.write_shift(2,("00"+(m[y][v].getMonth()+1)).slice(-2),"sbcs"),U.write_shift(2,("00"+m[y][v].getDate()).slice(-2),"sbcs")):U.write_shift(8,"00000000","sbcs");break;case"C":var V=String(m[y][v]!=null?m[y][v]:"").slice(0,k[v]);for(U.write_shift(1,V,"sbcs"),b=0;b<k[v]-V.length;++b)U.write_shift(1,32);break}}return d.next(1).write_shift(1,26),d.end()}return{to_workbook:a,to_sheet:n,from_sheet:s}})(),BG=(function(){var e={AA:"Ã",BA:"Ã",CA:"Ã",DA:195,HA:"Ã",JA:197,AE:"Ã",BE:"Ã",CE:"Ã",HE:"Ã",AI:"Ã",BI:"Ã",CI:"Ã",HI:"Ã",AO:"Ã",BO:"Ã",CO:"Ã",DO:213,HO:"Ã",AU:"Ã",BU:"Ã",CU:"Ã",HU:"Ã",Aa:"à ",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"Ã",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ã",Kc:"ç",q:"æ",z:"Å",a:"Ã",j:"Å",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+Pn(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(p,m){var x=e[m];return typeof x=="number"?E5(x):x},n=function(p,m,x){var y=m.charCodeAt(0)-32<<4|x.charCodeAt(0)-48;return y==59?p:E5(y)};e["|"]=254;function a(p,m){switch(m.type){case"base64":return i(hs(p),m);case"binary":return i(p,m);case"buffer":return i(lr&&Buffer.isBuffer(p)?p.toString("binary"):Iu(p),m);case"array":return i(Yd(p),m)}throw new Error("Unrecognized type "+m.type)}function i(p,m){var x=p.split(/[\n\r]+/),y=-1,v=-1,b=0,w=0,S=[],j=[],k=null,E={},T=[],O=[],A=[],P=0,I;for(+m.codepage>=0&&_o(+m.codepage);b!==x.length;++b){P=0;
vendor: 4,348 bytes, lines 521-524
521var R=x[b].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),M=R.replace(/;;/g,"\0").split(";").map(function(Y){return Y.replace(/\u0000/g,";")}),L=M[0],U;if(R.length>0)switch(L){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":M[1].charAt(0)=="P"&&j.push(R.slice(3).replace(/;;/g,";"));break;case"C":var W=!1,V=!1,G=!1,K=!1,F=-1,ne=-1;for(w=1;w<M.length;++w)switch(M[w].charAt(0)){case"A":break;case"X":v=parseInt(M[w].slice(1))-1,V=!0;break;case"Y":for(y=parseInt(M[w].slice(1))-1,V||(v=0),I=S.length;I<=y;++I)S[I]=[];break;case"K":U=M[w].slice(1),U.charAt(0)==='"'?U=U.slice(1,U.length-1):U==="TRUE"?U=!0:U==="FALSE"?U=!1:isNaN(No(U))?isNaN(Kh(U).getDate())||(U=ln(U)):(U=No(U),k!==null&&Kp(k)&&(U=i_(U))),W=!0;break;case"E":K=!0;var H=Mh(M[w].slice(1),{r:y,c:v});S[y][v]=[S[y][v],H];break;case"S":G=!0,S[y][v]=[S[y][v],"S5S"];break;case"G":break;case"R":F=parseInt(M[w].slice(1))-1;break;case"C":ne=parseInt(M[w].slice(1))-1;break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+R)}if(W&&(S[y][v]&&S[y][v].length==2?S[y][v][0]=U:S[y][v]=U,k=null),G){if(K)throw new Error("SYLK shared formula cannot have own formula");var B=F>-1&&S[F][ne];if(!B||!B[1])throw new Error("SYLK shared formula cannot find base");S[y][v][1]=aK(B[1],{r:y-F,c:v-ne})}break;case"F":var X=0;for(w=1;w<M.length;++w)switch(M[w].charAt(0)){case"X":v=parseInt(M[w].slice(1))-1,++X;break;case"Y":for(y=parseInt(M[w].slice(1))-1,I=S.length;I<=y;++I)S[I]=[];break;case"M":P=parseInt(M[w].slice(1))/20;break;case"F":break;case"G":break;case"P":k=j[parseInt(M[w].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(A=M[w].slice(1).split(" "),I=parseInt(A[0],10);I<=parseInt(A[1],10);++I)P=parseInt(A[2],10),O[I-1]=P===0?{hidden:!0}:{wch:P},Eu(O[I-1]);break;case"C":v=parseInt(M[w].slice(1))-1,O[v]||(O[v]={});break;case"R":y=parseInt(M[w].slice(1))-1,T[y]||(T[y]={}),P>0?(T[y].hpt=P,T[y].hpx=Xh(P)):P===0&&(T[y].hidden=!0);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+R)}X<1&&(k=null);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+R)}}return T.length>0&&(E["!rows"]=T),O.length>0&&(E["!cols"]=O),m&&m.sheetRows&&(S=S.slice(0,m.sheetRows)),[S,E]}function s(p,m){var x=a(p,m),y=x[0],v=x[1],b=Xp(y,m);return Pn(v).forEach(function(w){b[w]=v[w]}),b}function l(p,m){return Fu(s(p,m),m)}function c(p,m,x,y){var v="C;Y"+(x+1)+";X"+(y+1)+";K";switch(p.t){case"n":v+=p.v||0,p.f&&!p.F&&(v+=";E"+e4(p.f,{r:x,c:y}));break;case"b":v+=p.v?"TRUE":"FALSE";break;case"e":v+=p.w||p.v;break;case"d":v+='"'+(p.w||p.v)+'"';break;case"s":v+='"'+p.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return v}function u(p,m){m.forEach(function(x,y){var v="F;W"+(y+1)+" "+(y+1)+" ";x.hidden?v+="0":(typeof x.width=="number"&&!x.wpx&&(x.wpx=kg(x.width)),typeof x.wpx=="number"&&!x.wch&&(x.wch=Ng(x.wpx)),typeof x.wch=="number"&&(v+=Math.round(x.wch))),v.charAt(v.length-1)!=" "&&p.push(v)})}function d(p,m){m.forEach(function(x,y){var v="F;";x.hidden?v+="M0;":x.hpt?v+="M"+20*x.hpt+";":x.hpx&&(v+="M"+20*Tg(x.hpx)+";"),v.length>2&&p.push(v+"R"+(y+1))})}function f(p,m){var x=["ID;PWXL;N;E"],y=[],v=wr(p["!ref"]),b,w=Array.isArray(p),S=`\r 522`;x.push("P;PGeneral"),x.push("F;P0;DG0G8;M255"),p["!cols"]&&u(x,p["!cols"]),p["!rows"]&&d(x,p["!rows"]),x.push("B;Y"+(v.e.r-v.s.r+1)+";X"+(v.e.c-v.s.c+1)+";D"+[v.s.c,v.s.r,v.e.c,v.e.r].join(" "));for(var j=v.s.r;j<=v.e.r;++j)for(var k=v.s.c;k<=v.e.c;++k){var E=zt({r:j,c:k});b=w?(p[j]||[])[k]:p[E],!(!b||b.v==null&&(!b.f||b.F))&&y.push(c(b,p,j,k))}return x.join(S)+S+y.join(S)+S+"E"+S}return{to_workbook:l,to_sheet:s,from_sheet:f}})(),UG=(function(){function e(i,s){switch(s.type){case"base64":return t(hs(i),s);case"binary":return t(i,s);case"buffer":return t(lr&&Buffer.isBuffer(i)?i.toString("binary"):Iu(i),s);case"array":return t(Yd(i),s)}throw new Error("Unrecognized type "+s.type)}function t(i,s){for(var l=i.split(` 523`),c=-1,u=-1,d=0,f=[];d!==l.length;++d){if(l[d].trim()==="BOT"){f[++c]=[],u=0;continue}if(!(c<0)){var p=l[d].trim().split(","),m=p[0],x=p[1];++d;for(var y=l[d]||"";(y.match(/["]/g)||[]).length&1&&d<l.length-1;)y+=` 524`+l[++d];switch(y=y.trim(),+m){case-1:if(y==="BOT"){f[++c]=[],u=0;continue}else if(y!=="EOD")throw new Error("Unrecognized DIF special command "+y);break;case 0:y==="TRUE"?f[c][u]=!0:y==="FALSE"?f[c][u]=!1:isNaN(No(x))?isNaN(K
524h(x).getDate())?f[c][u]=x:f[c][u]=ln(x):f[c][u]=No(x),++u;break;case 1:y=y.slice(1,y.length-1),y=y.replace(/""/g,'"'),y&&y.match(/^=".*"$/)&&(y=y.slice(2,-1)),f[c][u++]=y!==""?y:null;break}if(y==="EOD")break}}return s&&s.sheetRows&&(f=f.slice(0,s.sheetRows)),f}function r(i,s){return Xp(e(i,s),s)}function n(i,s){return Fu(r(i,s),s)}var a=(function(){var i=function(c,u,d,f,p){c.push(u),c.push(d+","+f),c.push('"'+p.replace(/"/g,'""')+'"')},s=function(c,u,d,f){c.push(u+","+d),c.push(u==1?'"'+f.replace(/"/g,'""')+'"':f)};return function(c){var u=[],d=wr(c["!ref"]),f,p=Array.isArray(c);i(u,"TABLE",0,1,"sheetjs"),i(u,"VECTORS",0,d.e.r-d.s.r+1,""),i(u,"TUPLES",0,d.e.c-d.s.c+1,""),i(u,"DATA",0,0,"");for(var m=d.s.r;m<=d.e.r;++m){s(u,-1,0,"BOT");for(var x=d.s.c;x<=d.e.c;++x){var y=zt({r:m,c:x});if(f=p?(c[m]||[])[x]:c[y],!f){s(u,1,0,"");continue}switch(f.t){case"n":var v=f.w;!v&&f.v!=null&&(v=f.v),v==null?f.f&&!f.F?s(u,1,0,"="+f.f):s(u,1,0,""):s(u,0,v,"V");break;case"b":s(u,0,f.v?1:0,f.v?"TRUE":"FALSE");break;case"s":s(u,1,0,isNaN(f.v)?f.v:'="'+f.v+'"');break;case"d":f.w||(f.w=Xs(f.z||Ut[14],ua(ln(f.v)))),s(u,0,f.w,"V");break;default:s(u,1,0,"")}}}s(u,-1,0,"EOD");var b=`\r 525`,w=u.join(b);return w}})();return{to_workbook:n,to_sheet:r,from_sheet:a}})(),zG=(function(){function e(f){return f.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n
vendor: 2,141 bytes, lines 525-533
525/g,` 526`)}function t(f){return f.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(f,p){for(var m=f.split(` 527`),x=-1,y=-1,v=0,b=[];v!==m.length;++v){var w=m[v].trim().split(":");if(w[0]==="cell"){var S=_n(w[1]);if(b.length<=S.r)for(x=b.length;x<=S.r;++x)b[x]||(b[x]=[]);switch(x=S.r,y=S.c,w[2]){case"t":b[x][y]=e(w[3]);break;case"v":b[x][y]=+w[3];break;case"vtf":var j=w[w.length-1];case"vtc":switch(w[3]){case"nl":b[x][y]=!!+w[4];break;default:b[x][y]=+w[4];break}w[2]=="vtf"&&(b[x][y]=[b[x][y],j])}}}return p&&p.sheetRows&&(b=b.slice(0,p.sheetRows)),b}function n(f,p){return Xp(r(f,p),p)}function a(f,p){return Fu(n(f,p),p)}var i=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(` 528`),s=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(` 529`)+` 530`,l=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(` 531`),c="--SocialCalcSpreadsheetControlSave--";function u(f){if(!f||!f["!ref"])return"";for(var p=[],m=[],x,y="",v=qi(f["!ref"]),b=Array.isArray(f),w=v.s.r;w<=v.e.r;++w)for(var S=v.s.c;S<=v.e.c;++S)if(y=zt({r:w,c:S}),x=b?(f[w]||[])[S]:f[y],!(!x||x.v==null||x.t==="z")){switch(m=["cell",y,"t"],x.t){case"s":case"str":m.push(t(x.v));break;case"n":x.f?(m[2]="vtf",m[3]="n",m[4]=x.v,m[5]=t(x.f)):(m[2]="v",m[3]=x.v);break;case"b":m[2]="vt"+(x.f?"f":"c"),m[3]="nl",m[4]=x.v?"1":"0",m[5]=t(x.f||(x.v?"TRUE":"FALSE"));break;case"d":var j=ua(ln(x.v));m[2]="vtc",m[3]="nd",m[4]=""+j,m[5]=x.w||Xs(x.z||Ut[14],j);break;case"e":continue}p.push(m.join(":"))}return p.push("sheet:c:"+(v.e.c-v.s.c+1)+":r:"+(v.e.r-v.s.r+1)+":tvf:1"),p.push("valueformat:1:text-wiki"),p.join(` 532`)}function d(f){return[i,s,l,s,u(f),c].join(` 533`)}return{to_workbook:a,to_sheet:n,from_sheet:d}})(),Yh=(function(){function e(d,f,p,m,x){x.raw?f[p][m]=d:d===""||(d==="TRUE"?f[p][m]=!0:d==="FALSE"?f[p][m]=!1:isNaN(No(d))?isNaN(Kh(d).getDate())?f[p][m]=d:f[p][m]=ln(d):f[p][m]=No(d))}function t(d,f){var p=f||{},m=[];if(!d||d.length===0)return m;for(var x=d.split(/[\r\n]/),y=x.length-1;y>=0&&x[y].length===0;)--y;for(var v=10,b=0,w=0;w<=y;
vendor: 1,330 bytes, lines 533-534
533++w)b=x[w].indexOf(" "),b==-1?b=x[w].length:b++,v=Math.max(v,b);for(w=0;w<=y;++w){m[w]=[];var S=0;for(e(x[w].slice(0,v).trim(),m,w,S,p),S=1;S<=(x[w].length-v)/10+1;++S)e(x[w].slice(v+(S-1)*10,v+S*10).trim(),m,w,S,p)}return p.sheetRows&&(m=m.slice(0,p.sheetRows)),m}var r={44:",",9:" ",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function a(d){for(var f={},p=!1,m=0,x=0;m<d.length;++m)(x=d.charCodeAt(m))==34?p=!p:!p&&x in r&&(f[x]=(f[x]||0)+1);x=[];for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&x.push([f[m],m]);if(!x.length){f=n;for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&x.push([f[m],m])}return x.sort(function(y,v){return y[0]-v[0]||n[y[1]]-n[v[1]]}),r[x.pop()[1]]||44}function i(d,f){var p=f||{},m="",x=p.dense?[]:{},y={s:{c:0,r:0},e:{c:0,r:0}};d.slice(0,4)=="sep="?d.charCodeAt(5)==13&&d.charCodeAt(6)==10?(m=d.charAt(4),d=d.slice(7)):d.charCodeAt(5)==13||d.charCodeAt(5)==10?(m=d.charAt(4),d=d.slice(6)):m=a(d.slice(0,1024)):p&&p.FS?m=p.FS:m=a(d.slice(0,1024));var v=0,b=0,w=0,S=0,j=0,k=m.charCodeAt(0),E=!1,T=0,O=d.charCodeAt(0);d=d.replace(/\r\n/mg,` 534`);var A=p.dateNF!=null?qde(p.dateNF):null;function P(){var I=d.slice(S,j),R={};if(I.charAt(0)=='"'&&I.charAt(I.length-1)=='"'&&(I=I.slice(1,-1).replace(/""/g,'"')),I.length===0)R.t="z";else if(p.raw)R.t="s",R.v=I;else if(I.trim().length===0)R.t="s",R.v=I;
vendor: 1,941 bytes, line 534
534else if(I.charCodeAt(0)==61)I.charCodeAt(1)==34&&I.charCodeAt(I.length-1)==34?(R.t="s",R.v=I.slice(2,-1).replace(/""/g,'"')):vge(I)?(R.t="n",R.f=I.slice(1)):(R.t="s",R.v=I);else if(I=="TRUE")R.t="b",R.v=!0;else if(I=="FALSE")R.t="b",R.v=!1;else if(!isNaN(w=No(I)))R.t="n",p.cellText!==!1&&(R.w=I),R.v=w;else if(!isNaN(Kh(I).getDate())||A&&I.match(A)){R.z=p.dateNF||Ut[14];var M=0;A&&I.match(A)&&(I=Wde(I,p.dateNF,I.match(A)||[]),M=1),p.cellDates?(R.t="d",R.v=ln(I,M)):(R.t="n",R.v=ua(ln(I,M))),p.cellText!==!1&&(R.w=Xs(R.z,R.v instanceof Date?ua(R.v):R.v)),p.cellNF||delete R.z}else R.t="s",R.v=I;if(R.t=="z"||(p.dense?(x[v]||(x[v]=[]),x[v][b]=R):x[zt({c:b,r:v})]=R),S=j+1,O=d.charCodeAt(S),y.e.c<b&&(y.e.c=b),y.e.r<v&&(y.e.r=v),T==k)++b;else if(b=0,++v,p.sheetRows&&p.sheetRows<=v)return!0}e:for(;j<d.length;++j)switch(T=d.charCodeAt(j)){case 34:O===34&&(E=!E);break;case k:case 10:case 13:if(!E&&P())break e;break}return j-S>0&&P(),x["!ref"]=Zt(y),x}function s(d,f){return!(f&&f.PRN)||f.FS||d.slice(0,4)=="sep="||d.indexOf(" ")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?i(d,f):Xp(t(d,f),f)}function l(d,f){var p="",m=f.type=="string"?[0,0,0,0]:l4(d,f);switch(f.type){case"base64":p=hs(d);break;case"binary":p=d;break;case"buffer":f.codepage==65001?p=d.toString("utf8"):f.codepage&&typeof xg<"u"||(p=lr&&Buffer.isBuffer(d)?d.toString("binary"):Iu(d));break;case"array":p=Yd(d);break;case"string":p=d;break;default:throw new Error("Unrecognized type "+f.type)}return m[0]==239&&m[1]==187&&m[2]==191?p=Lr(p.slice(3)):f.type!="string"&&f.type!="buffer"&&f.codepage==65001?p=Lr(p):f.type=="binary"&&typeof xg<"u",p.slice(0,19)=="socialcalc:version:"?zG.to_sheet(f.type=="string"?p:Lr(p),f):s(p,f)}function c(d,f){return Fu(l(d,f),f)}function u(d){for(var f=[],p=wr(d["!ref"]),m,x=Array.isArray(d),y=p.s.r;y<=p.e.r;++y){for(var v=[],b=p.s.c;b<=p.e.c;++b){var w=zt({r:y,c:b});if(m=x?(d[y]||[])[b]:d[w],!m||m.v==null){v.push(" ");continue}
vendor: 5,655 bytes, lines 534-535
534for(var S=(m.w||(dc(m),m.w)||"").slice(0,10);S.length<10;)S+=" ";v.push(S+(b===0?" ":""))}f.push(v.join(""))}return f.join(` 535`)}return{to_workbook:c,to_sheet:l,from_sheet:u}})();function ime(e,t){var r=t||{},n=!!r.WTF;r.WTF=!0;try{var a=BG.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 Yh.to_workbook(e,t)}}var zd=(function(){function e(H,B,X){if(H){Oa(H,H.l||0);for(var Y=X.Enum||F;H.l<H.length;){var ae=H.read_shift(2),fe=Y[ae]||Y[65535],ue=H.read_shift(2),oe=H.l+ue,Z=fe.f&&fe.f(H,ue,X);if(H.l=oe,B(Z,fe,ae))return}}}function t(H,B){switch(B.type){case"base64":return r(ls(hs(H)),B);case"binary":return r(ls(H),B);case"buffer":case"array":return r(H,B)}throw"Unsupported type "+B.type}function r(H,B){if(!H)return H;var X=B||{},Y=X.dense?[]:{},ae="Sheet1",fe="",ue=0,oe={},Z=[],ce=[],q={s:{r:0,c:0},e:{r:0,c:0}},xe=X.sheetRows||0;if(H[2]==0&&(H[3]==8||H[3]==9)&&H.length>=16&&H[14]==5&&H[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(H[2]==2)X.Enum=F,e(H,function(ie,we,ke){switch(ke){case 0:X.vers=ie,ie>=4096&&(X.qpro=!0);break;case 6:q=ie;break;case 204:ie&&(fe=ie);break;case 222:fe=ie;break;case 15:case 51:X.qpro||(ie[1].v=ie[1].v.slice(1));case 13:case 14:case 16:ke==14&&(ie[2]&112)==112&&(ie[2]&15)>1&&(ie[2]&15)<15&&(ie[1].z=X.dateNF||Ut[14],X.cellDates&&(ie[1].t="d",ie[1].v=i_(ie[1].v))),X.qpro&&ie[3]>ue&&(Y["!ref"]=Zt(q),oe[ae]=Y,Z.push(ae),Y=X.dense?[]:{},q={s:{r:0,c:0},e:{r:0,c:0}},ue=ie[3],ae=fe||"Sheet"+(ue+1),fe="");var Oe=X.dense?(Y[ie[0].r]||[])[ie[0].c]:Y[zt(ie[0])];if(Oe){Oe.t=ie[1].t,Oe.v=ie[1].v,ie[1].z!=null&&(Oe.z=ie[1].z),ie[1].f!=null&&(Oe.f=ie[1].f);break}X.dense?(Y[ie[0].r]||(Y[ie[0].r]=[]),Y[ie[0].r][ie[0].c]=ie[1]):Y[zt(ie[0])]=ie[1];break}},X);else if(H[2]==26||H[2]==14)X.Enum=ne,H[2]==14&&(X.qpro=!0,H.l=0),e(H,function(ie,we,ke){switch(ke){case 204:ae=ie;break;case 22:ie[1].v=ie[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(ie[3]>ue&&(Y["!ref"]=Zt(q),oe[ae]=Y,Z.push(ae),Y=X.dense?[]:{},q={s:{r:0,c:0},e:{r:0,c:0}},ue=ie[3],ae="Sheet"+(ue+1)),xe>0&&ie[0].r>=xe)break;X.dense?(Y[ie[0].r]||(Y[ie[0].r]=[]),Y[ie[0].r][ie[0].c]=ie[1]):Y[zt(ie[0])]=ie[1],q.e.c<ie[0].c&&(q.e.c=ie[0].c),q.e.r<ie[0].r&&(q.e.r=ie[0].r);break;case 27:ie[14e3]&&(ce[ie[14e3][0]]=ie[14e3][1]);break;case 1537:ce[ie[0]]=ie[1],ie[0]==ue&&(ae=ie[1]);break}},X);else throw new Error("Unrecognized LOTUS BOF "+H[2]);if(Y["!ref"]=Zt(q),oe[fe||ae]=Y,Z.push(fe||ae),!ce.length)return{SheetNames:Z,Sheets:oe};for(var pe={},Se=[],he=0;he<ce.length;++he)oe[Z[he]]?(Se.push(ce[he]||Z[he]),pe[ce[he]]=oe[ce[he]]||oe[Z[he]]):(Se.push(ce[he]),pe[ce[he]]={"!ref":"A1"});return{SheetNames:Se,Sheets:pe}}function n(H,B){var X=B||{};if(+X.codepage>=0&&_o(+X.codepage),X.type=="string")throw new Error("Cannot write WK1 to JS string");var Y=Ui(),ae=wr(H["!ref"]),fe=Array.isArray(H),ue=[];ct(Y,0,i(1030)),ct(Y,6,c(ae));for(var oe=Math.min(ae.e.r,8191),Z=ae.s.r;Z<=oe;++Z)for(var ce=Bn(Z),q=ae.s.c;q<=ae.e.c;++q){Z===ae.s.r&&(ue[q]=wn(q));var xe=ue[q]+ce,pe=fe?(H[Z]||[])[q]:H[xe];if(!(!pe||pe.t=="z"))if(pe.t=="n")(pe.v|0)==pe.v&&pe.v>=-32768&&pe.v<=32767?ct(Y,13,m(Z,q,pe.v)):ct(Y,14,y(Z,q,pe.v));else{var Se=dc(pe);ct(Y,15,f(Z,q,Se.slice(0,239)))}}return ct(Y,1),Y.end()}function a(H,B){var X=B||{};if(+X.codepage>=0&&_o(+X.codepage),X.type=="string")throw new Error("Cannot write WK3 to JS string");var Y=Ui();ct(Y,0,s(H));for(var ae=0,fe=0;ae<H.SheetNames.length;++ae)(H.Sheets[H.SheetNames[ae]]||{})["!ref"]&&ct(Y,27,K(H.SheetNames[ae],fe++));var ue=0;for(ae=0;ae<H.SheetNames.length;++ae){var oe=H.Sheets[H.SheetNames[ae]];if(!(!oe||!oe["!ref"])){for(var Z=wr(oe["!ref"]),ce=Array.isArray(oe),q=[],xe=Math.min(Z.e.r,8191),pe=Z.s.r;pe<=xe;++pe)for(var Se=Bn(pe),he=Z.s.c;he<=Z.e.c;++he){pe===Z.s.r&&(q[he]=wn(he));var ie=q[he]+Se,we=ce?(oe[pe]||[])[he]:oe[ie];if(!(!we||we.t=="z"))if(we.t=="n")ct(Y,23,P(pe,he,ue,we.v));else{var ke=dc(we);ct(Y,22,T(pe,he,ue,ke.slice(0,239)))}}++ue}}return ct(Y,1),Y.end()}function i(H){var B=ze(2);return B.write_shift(2,H),B}function s(H){var B=ze(26);B.write_shift(2,4096),B.write_shift(2,4),B.write_shift(4,0);for(var X=0,Y=0,ae=0,fe=0;fe<H.SheetNames.length;++fe){var ue=H.SheetNames[fe],oe=H.Sheets[ue];if(!(!oe||!oe["!ref"])){++ae;var Z=qi(oe["!ref"]);X<Z.e.r&&(X=Z.e.r),Y<Z.e.c&&(Y=Z.e.c)}}return X>8191&&(X=8191),B.write_shift(2,X),B.write_shift(1,ae),B.write_shift(1,Y),B.write_shift(2,0),B.write_shift(2,0),B.write_shift(1,1),B.write_shift(1,2),B.write_shift(4,0),B.write_shift(4,0),B}function l(H,B,X){var Y={s:{c:0,r:0},e:{c:0,r:0}};return B==8&&X.qpro?(Y.s.c=H.read_shift(1),H.l++,Y.s.r=H.read_shift(2),Y.e.c=H.read_shift(1),H.l++,Y.e.r=H.read_shift(2),Y):(Y.s.c=H.read_shift(2),Y.s.r=H.read_shift(2),B==12&&X.qpro&&(H.l+=2),Y.e.c=H.read_shift(2),Y.e.r=H.read_shift(2),B==12&&X.qpro&&(H.l+=2),Y.s.c==65535&&(Y.s.c=Y.e.c=Y.s.r=Y.e.r=0),Y)}function c(H){var B=ze(8);return B.write_shift(2,H.s.c),B.write_shift(2,H.s.r),B.write_shift(2,H.e.c),B.write_shift(2,H.e.r),B}function u(H,B,X){var Y=[{c:0,r:0},{t:"n",v:0},0,0];return X.qpro&&X.vers!=20768?(Y[0].c=H.read_shift(1),Y[3]=H.read_shift(1),Y[0].r=H.read_shift(2),H.l+=2):(Y[2]=H.read_shift(1),Y[0].c=H.read_shift(2),Y[0].r=H.read_shift(2)),Y}function d(H,B,X){var Y=H.l+B,ae=u(H,B,X);if(ae[1].t="s",X.vers==20768){H.l++;var fe=H.read_shift(1);return ae[1].v=H.read_shift(fe,"utf8"),ae}return X.qpro&&H.l++,ae[1].v=H.read_shift(Y-H.l,"cstr"),ae}function f(H,B,X){var Y=ze(7+X.length);Y.write_shift(1,255),Y.write_shift(2,B),Y.write_shift(2,H),Y.write_shift(1,39);for(var ae=0;ae<Y.length;++ae){var fe=X.charCodeAt(ae);Y.write_shift(1,fe>=128?95:fe)}
vendor: 4,785 bytes, line 535
535return Y.write_shift(1,0),Y}function p(H,B,X){var Y=u(H,B,X);return Y[1].v=H.read_shift(2,"i"),Y}function m(H,B,X){var Y=ze(7);return Y.write_shift(1,255),Y.write_shift(2,B),Y.write_shift(2,H),Y.write_shift(2,X,"i"),Y}function x(H,B,X){var Y=u(H,B,X);return Y[1].v=H.read_shift(8,"f"),Y}function y(H,B,X){var Y=ze(13);return Y.write_shift(1,255),Y.write_shift(2,B),Y.write_shift(2,H),Y.write_shift(8,X,"f"),Y}function v(H,B,X){var Y=H.l+B,ae=u(H,B,X);if(ae[1].v=H.read_shift(8,"f"),X.qpro)H.l=Y;else{var fe=H.read_shift(2);j(H.slice(H.l,H.l+fe),ae),H.l+=fe}return ae}function b(H,B,X){var Y=B&32768;return B&=-32769,B=(Y?H:0)+(B>=8192?B-16384:B),(Y?"":"$")+(X?wn(B):Bn(B))}var w={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 j(H,B){Oa(H,0);for(var X=[],Y=0,ae="",fe="",ue="",oe="";H.l<H.length;){var Z=H[H.l++];switch(Z){case 0:X.push(H.read_shift(8,"f"));break;case 1:fe=b(B[0].c,H.read_shift(2),!0),ae=b(B[0].r,H.read_shift(2),!1),X.push(fe+ae);break;case 2:{var ce=b(B[0].c,H.read_shift(2),!0),q=b(B[0].r,H.read_shift(2),!1);fe=b(B[0].c,H.read_shift(2),!0),ae=b(B[0].r,H.read_shift(2),!1),X.push(ce+q+":"+fe+ae)}break;case 3:if(H.l<H.length){console.error("WK1 premature formula end");return}break;case 4:X.push("("+X.pop()+")");break;case 5:X.push(H.read_shift(2));break;case 6:{for(var xe="";Z=H[H.l++];)xe+=String.fromCharCode(Z);X.push('"'+xe.replace(/"/g,'""')+'"')}break;case 8:X.push("-"+X.pop());break;case 23:X.push("+"+X.pop());break;case 22:X.push("NOT("+X.pop()+")");break;case 20:case 21:oe=X.pop(),ue=X.pop(),X.push(["AND","OR"][Z-20]+"("+ue+","+oe+")");break;default:if(Z<32&&S[Z])oe=X.pop(),ue=X.pop(),X.push(ue+S[Z]+oe);else if(w[Z]){if(Y=w[Z][1],Y==69&&(Y=H[H.l++]),Y>X.length){console.error("WK1 bad formula parse 0x"+Z.toString(16)+":|"+X.join("|")+"|");return}var pe=X.slice(-Y);X.length-=Y,X.push(w[Z][0]+"("+pe.join(",")+")")}else return Z<=7?console.error("WK1 invalid opcode "+Z.toString(16)):Z<=24?console.error("WK1 unsupported op "+Z.toString(16)):Z<=30?console.error("WK1 invalid opcode "+Z.toString(16)):Z<=115?console.error("WK1 unsupported function opcode "+Z.toString(16)):console.error("WK1 unrecognized opcode "+Z.toString(16))}}X.length==1?B[1].f=""+X[0]:console.error("WK1 bad formula parse |"+X.join("|")+"|")}function k(H){var B=[{c:0,r:0},{t:"n",v:0},0];return B[0].r=H.read_shift(2),B[3]=H[H.l++],B[0].c=H[H.l++],B}function E(H,B){var X=k(H);return X[1].t="s",X[1].v=H.read_shift(B-4,"cstr"),X}function T(H,B,X,Y){var ae=ze(6+Y.length);ae.write_shift(2,H),ae.write_shift(1,X),ae.write_shift(1,B),ae.write_shift(1,39);for(var fe=0;fe<Y.length;++fe){var ue=Y.charCodeAt(fe);ae.write_shift(1,ue>=128?95:ue)}return ae.write_shift(1,0),ae}function O(H,B){var X=k(H);X[1].v=H.read_shift(2);var Y=X[1].v>>1;if(X[1].v&1)switch(Y&7){case 0:Y=(Y>>3)*5e3;break;case 1:Y=(Y>>3)*500;break;case 2:Y=(Y>>3)/20;break;case 3:Y=(Y>>3)/200;break;case 4:Y=(Y>>3)/2e3;break;case 5:Y=(Y>>3)/2e4;break;case 6:Y=(Y>>3)/16;break;case 7:Y=(Y>>3)/64;break}return X[1].v=Y,X}function A(H,B){var X=k(H),Y=H.read_shift(4),ae=H.read_shift(4),fe=H.read_shift(2);if(fe==65535)return Y===0&&ae===3221225472?(X[1].t="e",X[1].v=15):Y===0&&ae===3489660928?(X[1].t="e",X[1].v=42):X[1].v=0,X;var ue=fe&32768;return fe=(fe&32767)-16446,X[1].v=(1-ue*2)*(ae*Math.pow(2,fe+32)+Y*Math.pow(2,fe)),X}function P(H,B,X,Y){var ae=ze(14);if(ae.write_shift(2,H),ae.write_shift(1,X),ae.write_shift(1,B),Y==0)return ae.write_shift(4,0),ae.write_shift(4,0),ae.write_shift(2,65535),ae;var fe=0,ue=0,oe=0,Z=0;return Y<0&&(fe=1,Y=-Y),ue=Math.log2(Y)|0,Y/=Math.pow(2,ue-31),Z=Y>>>0,(Z&2147483648)==0&&(Y/=2,++ue,Z=Y>>>0),Y-=Z,Z|=2147483648,Z>>>=0,Y*=Math.pow(2,32),oe=Y>>>0,ae.write_shift(4,oe),ae.write_shift(4,Z),ue+=16383+(fe?32768:0),ae.write_shift(2,ue),ae}function I(H,B){var X=A(H);return H.l+=B-14,X}function R(H,B){var X=k(H),Y=H.read_shift(4);return X[1].v=Y>>6,X}function M(H,B){var X=k(H),Y=H.read_shift(8,"f");return X[1].v=Y,X}function L(H,B){var X=M(H);return H.l+=B-10,X}function U(H,B){return H[H.l+B-1]==0?H.read_shift(B,"cstr"):""}function W(H,B){var X=H[H.l++];X>B-1&&(X=B-1);for(var Y="";Y.length<X;)Y+=String.fromCharCode(H[H.l++]);return Y}function V(H,B,X){if(!(!X.qpro||B<21)){var Y=H.read_shift(1);H.l+=17,H.l+=1,H.l+=2;var ae=H.read_shift(B-21,"cstr");return[Y,ae]}}function G(H,B){for(var X={},Y=H.l+B;H.l<Y;){var ae=H.read_shift(2);if(ae==14e3){for(X[ae]=[0,""],X[ae][0]=H.read_shift(2);H[H.l];)X[ae][1]+=String.fromCharCode(H[H.l]),H.l++;H.l++}}return X}function K(H,B){var X=ze(5+H.length);X.write_shift(2,14e3),X.write_shift(2,B);for(var Y=0;Y<H.length;
vendor: 4,549 bytes, line 535
535++Y){var ae=H.charCodeAt(Y);X[X.l++]=ae>127?95:ae}return X[X.l++]=0,X}var F={0:{n:"BOF",f:Kn},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:p},14:{n:"NUMBER",f:x},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:v},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:U},222:{n:"SHEETNAMELP",f:W},65535:{n:""}},ne={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:A},24:{n:"NUMBER18",f:O},25:{n:"FORMULA19",f:I},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:G},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:R},38:{n:"??"},39:{n:"NUMBER27",f:M},40:{n:"FORMULA28",f:L},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:U},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:V},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 sme(e){var t={},r=e.match(ti),n=0,a=!1;if(r)for(;n!=r.length;++n){var i=qt(r[n]);switch(i[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!i.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if(i.val=="1")break;t.cp=kR[parseInt(i.val,10)];break;case"<outline":if(!i.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=i.val;break;case"<sz":t.sz=i.val;break;case"<strike":if(!i.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!i.val)break;switch(i.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting";break}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if(i.val=="0")break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if(i.val=="0")break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":i.rgb&&(t.color=i.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=i.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=i.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":break;case"<scheme":break;case"<scheme>":case"<scheme/>":case"</scheme>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;
vendor: 11,981 bytes, line 535
535default:if(i[0].charCodeAt(1)!==47&&!a)throw new Error("Unrecognized rich format "+i[0])}}return t}var ome=(function(){var e=bg("t"),t=bg("rPr");function r(i){var s=i.match(e);if(!s)return{t:"s",v:""};var l={t:"s",v:br(s[1])},c=i.match(t);return c&&(l.s=sme(c[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})}})(),lme=(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('<span style="'+l.join("")+'">'),a.b&&(i.push("<b>"),s.push("</b>")),a.i&&(i.push("<i>"),s.push("</i>")),a.strike&&(i.push("<s>"),s.push("</s>"));var c=a.valign||"";return c=="superscript"||c=="super"?c="sup":c=="subscript"&&(c="sub"),c!=""&&(i.push("<"+c+">"),s.push("</"+c+">")),s.push("</span>"),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,"<br/>")+i[2].join("")):""}return function(i){return i.map(n).join("")}})(),cme=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,ume=/<(?:\w+:)?r>/,dme=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function YR(e,t){var r=t?t.cellHTML:!0,n={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(n.t=br(Lr(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),n.r=Lr(e),r&&(n.h=FR(n.t))):e.match(ume)&&(n.r=Lr(e),n.t=br(Lr((e.replace(dme,"").match(cme)||[]).join("").replace(ti,""))),r&&(n.h=lme(ome(n.r)))),n):{t:""}}var fme=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,hme=/<(?:\w+:)?(?:si|sstItem)>/g,pme=/<\/(?:\w+:)?(?:si|sstItem)>/;function mme(e,t){var r=[],n="";if(!e)return r;var a=e.match(fme);if(a){n=a[2].replace(hme,"").split(pme);for(var i=0;i!=n.length;++i){var s=YR(n[i].trim(),t);s!=null&&(r[r.length]=s)}a=qt(a[1]),r.Count=a.count,r.Unique=a.uniqueCount}return r}var gme=/^\s|\s$|[\t\n\r]/;function HG(e,t){if(!t.bookSST)return"";var r=[zn];r[r.length]=lt("sst",null,{xmlns:ff[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(e[n]!=null){var a=e[n],i="<si>";a.r?i+=a.r:(i+="<t",a.t||(a.t=""),a.t.match(gme)&&(i+=' xml:space="preserve"'),i+=">"+Fr(a.t)+"</t>"),i+="</si>",r[r.length]=i}return r.length>2&&(r[r.length]="</sst>",r[1]=r[1].replace("/>",">")),r.join("")}function xme(e){return[e.read_shift(4),e.read_shift(4)]}function yme(e,t){var r=[],n=!1;return wc(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 vme(e,t){return t||(t=ze(8)),t.write_shift(4,e.Count),t.write_shift(4,e.Unique),t}var bme=Cfe;function wme(e){var t=Ui();Ge(t,159,vme(e));for(var r=0;r<e.length;++r)Ge(t,19,bme(e[r]));return Ge(t,160),t.end()}function qG(e){for(var t=[],r=e.split(""),n=0;n<r.length;++n)t[n]=r[n].charCodeAt(0);return t}function nc(e,t){var r={};return r.Major=e.read_shift(2),r.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),r}function _me(e){var t={};return t.id=e.read_shift(0,"lpp4"),t.R=nc(e,4),t.U=nc(e,4),t.W=nc(e,4),t}function Sme(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 Eme(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(Sme(e));return t}function kme(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 Nme(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=nc(e,4),t.U=nc(e,4),t.W=nc(e,4),t}function Tme(e){var t=Nme(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 WG(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 VG(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 jme(e){var t=nc(e);switch(t.Minor){case 2:return[t.Minor,Ame(e)];case 3:return[t.Minor,Cme()];case 4:return[t.Minor,Ome(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}function Ame(e){var t=e.read_shift(4);if((t&63)!=36)throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4),n=WG(e,r),a=VG(e,e.length-e.l);return{t:"Std",h:n,v:a}}function Cme(){throw new Error("File is password-protected: ECMA-376 Extensible")}function Ome(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(ti,function(i){var s=qt(i);switch(Sl(s[0])){case"<?xml":break;case"<encryption":case"</encryption>":break;case"<keyData":t.forEach(function(l){n[l]=s[l]});break;case"<dataIntegrity":n.encryptedHmacKey=s.encryptedHmacKey,n.encryptedHmacValue=s.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":n.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":n.uri=s.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":n.encs.push(s);break;default:throw s[0]}}),n}function Pme(e,t){var r={},n=r.EncryptionVersionInfo=nc(e,4);if(t-=4,n.Minor!=2)throw new Error("unrecognized minor version code: "+n.Minor);if(n.Major>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=WG(e,a),t-=a,r.EncryptionVerifier=VG(e,t),r}function Rme(e){var t={},r=t.EncryptionVersionInfo=nc(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 XR(e){var t=0,r,n=qG(e),a=n.length+1,i,s,l,c,u;for(r=Su(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,c=t<<1&32767,u=l|c,t=u^s;return t^52811}var GG=(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],c=104,u=s.length-1;u>=0;--u)for(var d=s[u],f=0;f!=7;++f)d&64&&(l^=r[c]),d*=2,--c;return l};return function(s){for(var l=qG(s),c=i(l),u=l.length,d=Su(16),f=0;f!=16;++f)d[f]=0;var p,m,x;for((u&1)===1&&(p=c>>8,d[u]=a(e[0],p),--u,p=c&255,m=l[l.length-1],d[u]=a(m,p));u>0;)--u,p=c>>8,d[u]=a(l[u],p),--u,p=c&255,d[u]=a(l[u],p);for(u=15,x=15-l.length;x>0;)p=c>>8,d[u]=a(e[x],p),--u,--x,p=c&255,d[u]=a(l[u],p),--u,--x;return d}})(),Ime=function(e,t,r,n,a){a||(a=t),n||(n=GG(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]},Fme=function(e){var t=0,r=GG(e);return function(n){var a=Ime("",n,t,r);return t=a[1],a[0]}};function Mme(e,t,r,n){var a={key:Kn(e),verificationBytes:Kn(e)};return r.password&&(a.verifier=XR(r.password)),n.valid=a.verificationBytes===a.verifier,n.valid&&(n.insitu=Fme(r.password)),a}function Dme(e,t,r){var n=r||{};return n.Info=e.read_shift(2),e.l-=2,n.Info===1?n.Data=Rme(e):n.Data=Pme(e,t),n}function Lme(e,t,r){var n={Type:r.biff>=8?e.read_shift(2):0};return n.Type?Dme(e,t-2,n):Mme(e,r.biff>=8?t:t-2,r,n),n}var KG=(function(){function e(a,i){switch(i.type){case"base64":return t(hs(a),i);case"binary":return t(a,i);case"buffer":return t(lr&&Buffer.isBuffer(a)?a.toString("binary"):Iu(a),i);case"array":return t(Yd(a),i)}throw new Error("Unrecognized type "+i.type)}function t(a,i){var s=i||{},l=s.dense?[]:{},c=a.match(/\\trowd.*?\\row\b/g);if(!c.length)throw new Error("RTF missing table");var u={s:{c:0,r:0},e:{c:0,r:c.length-1}};return c.forEach(function(d,f){Array.isArray(l)&&(l[f]=[]);for(var p=/\\\w+\b/g,m=0,x,y=-1;x=p.exec(d);){switch(x[0]){case"\\cell":var v=d.slice(m,p.lastIndex-x[0].length);if(v[0]==" "&&(v=v.slice(1)),++y,v.length){var b={v,t:"s"};Array.isArray(l)?l[f][y]=b:l[zt({r:f,c:y})]=b}break}m=p.lastIndex}y>u.e.c&&(u.e.c=y)}),l["!ref"]=Zt(u),l}function r(a,i){return Fu(e(a,i),i)}function n(a){for(var i=["{\\rtf1\\ansi"],s=wr(a["!ref"]),l,c=Array.isArray(a),u=s.s.r;u<=s.e.r;++u){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 f=zt({r:u,c:d});l=c?(a[u]||[])[d]:a[f],!(!l||l.v==null&&(!l.f||l.F))&&(i.push(" "+(l.w||(dc(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 $me(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 Eg(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 Bme(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,c=0,u=a+i;switch(c=s/(u>1?2-u:u),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,c,u/2]}function Ume(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,c;if(r!==0)switch(l|0){case 0:case 6:c=a*l,s[0]+=a,s[1]+=c;break;case 1:c=a*(2-l),s[0]+=c,s[1]+=a;break;case 2:c=a*(l-2),s[1]+=a,s[2]+=c;break;case 3:c=a*(4-l),s[1]+=c,s[2]+=a;break;case 4:c=a*(l-4),s[2]+=a,s[0]+=c;break;case 5:c=a*(6-l),s[2]+=c,s[0]+=a;break}for(var u=0;u!=3;++u)s[u]=Math.round(s[u]*255);return s}function f1(e,t){if(t===0)return e;var r=Bme($me(e));return t<0?r[2]=r[2]*(1+t):r[2]=1-(1-r[2])*(1-t),Eg(Ume(r))}var YG=6,zme=15,Hme=1,Va=YG;function kg(e){return Math.floor((e+Math.round(128/Va)/256)*Va)}function Ng(e){return Math.floor((e-5)/Va*100+.5)/100}function h1(e){return Math.round((e*Va+5)/Va*256)/256}function $2(e){return h1(Ng(kg(e)))}function JR(e){var t=Math.abs(e-$2(e)),r=Va;if(t>.005)for(Va=Hme;Va<zme;++Va)Math.abs(e-$2(e))<=t&&(t=Math.abs(e-$2(e)),r=Va);Va=r}function Eu(e){e.width?(e.wpx=kg(e.width),e.wch=Ng(e.wpx),e.MDW=Va):e.wpx?(e.wch=Ng(e.wpx),e.width=h1(e.wch),e.MDW=Va):typeof e.wch=="number"&&(e.width=h1(e.wch),e.wpx=kg(e.width),e.MDW=Va),e.customWidth&&delete e.customWidth}var qme=96,XG=qme;function Tg(e){return e*96/XG}function Xh(e){return e*XG/96}var Wme={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function Vme(e,t,r,n){t.Borders=[];var a={},i=!1;
vendor: 10,076 bytes, line 535
535(e[0].match(ti)||[]).forEach(function(s){var l=qt(s);switch(Sl(l[0])){case"<borders":case"<borders>":case"</borders>":break;case"<border":case"<border>":case"<border/>":a={},l.diagonalUp&&(a.diagonalUp=an(l.diagonalUp)),l.diagonalDown&&(a.diagonalDown=an(l.diagonalDown)),t.Borders.push(a);break;case"</border>":break;case"<left/>":break;case"<left":case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":case"<bottom>":break;case"</bottom>":break;case"<diagonal":case"<diagonal>":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal>":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical>":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start>":case"<start/>":break;case"</start>":break;case"<end":case"<end>":case"<end/>":break;case"</end>":break;case"<color":case"<color>":break;case"<color/>":case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in borders")}})}function Gme(e,t,r,n){t.Fills=[];var a={},i=!1;(e[0].match(ti)||[]).forEach(function(s){var l=qt(s);switch(Sl(l[0])){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":case"<fill":case"<fill/>":a={},t.Fills.push(a);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":case"</gradientFill>":t.Fills.push(a),a={};break;case"<patternFill":case"<patternFill>":l.patternType&&(a.patternType=l.patternType);break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":a.bgColor||(a.bgColor={}),l.indexed&&(a.bgColor.indexed=parseInt(l.indexed,10)),l.theme&&(a.bgColor.theme=parseInt(l.theme,10)),l.tint&&(a.bgColor.tint=parseFloat(l.tint)),l.rgb&&(a.bgColor.rgb=l.rgb.slice(-6));break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":a.fgColor||(a.fgColor={}),l.theme&&(a.fgColor.theme=parseInt(l.theme,10)),l.tint&&(a.fgColor.tint=parseFloat(l.tint)),l.rgb!=null&&(a.fgColor.rgb=l.rgb.slice(-6));break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in fills")}})}function Kme(e,t,r,n){t.Fonts=[];var a={},i=!1;(e[0].match(ti)||[]).forEach(function(s){var l=qt(s);switch(Sl(l[0])){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":t.Fonts.push(a),a={};break;case"<name":l.val&&(a.name=Lr(l.val));break;case"<name/>":case"</name>":break;case"<b":a.bold=l.val?an(l.val):1;break;case"<b/>":a.bold=1;break;case"<i":a.italic=l.val?an(l.val):1;break;case"<i/>":a.italic=1;break;case"<u":switch(l.val){case"none":a.underline=0;break;case"single":a.underline=1;break;case"double":a.underline=2;break;case"singleAccounting":a.underline=33;break;case"doubleAccounting":a.underline=34;break}break;case"<u/>":a.underline=1;break;case"<strike":a.strike=l.val?an(l.val):1;break;case"<strike/>":a.strike=1;break;case"<outline":a.outline=l.val?an(l.val):1;break;case"<outline/>":a.outline=1;break;case"<shadow":a.shadow=l.val?an(l.val):1;break;case"<shadow/>":a.shadow=1;break;case"<condense":a.condense=l.val?an(l.val):1;break;case"<condense/>":a.condense=1;break;case"<extend":a.extend=l.val?an(l.val):1;break;case"<extend/>":a.extend=1;break;case"<sz":l.val&&(a.sz=+l.val);break;case"<sz/>":case"</sz>":break;case"<vertAlign":l.val&&(a.vertAlign=l.val);break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":l.val&&(a.family=parseInt(l.val,10));break;case"<family/>":case"</family>":break;case"<scheme":l.val&&(a.scheme=l.val);break;case"<scheme/>":case"</scheme>":break;case"<charset":if(l.val=="1")break;l.codepage=kR[parseInt(l.val,10)];break;case"<color":if(a.color||(a.color={}),l.auto&&(a.color.auto=an(l.auto)),l.rgb)a.color.rgb=l.rgb.slice(-6);else if(l.indexed){a.color.index=parseInt(l.indexed,10);var c=Bd[a.color.index];a.color.index==81&&(c=Bd[1]),c||(c=Bd[1]),a.color.rgb=c[0].toString(16)+c[1].toString(16)+c[2].toString(16)}else l.theme&&(a.color.theme=parseInt(l.theme,10),l.tint&&(a.color.tint=parseFloat(l.tint)),l.theme&&r.themeElements&&r.themeElements.clrScheme&&(a.color.rgb=f1(r.themeElements.clrScheme[a.color.theme].rgb,a.color.tint||0)));break;case"<color/>":case"</color>":break;case"<AlternateContent":i=!0;break;case"</AlternateContent>":i=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in fonts")}})}function Yme(e,t,r){t.NumberFmt=[];for(var n=Pn(Ut),a=0;a<n.length;++a)t.NumberFmt[n[a]]=Ut[n[a]];var i=e[0].match(ti);if(i)for(a=0;a<i.length;++a){var s=qt(i[a]);switch(Sl(s[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{var l=br(Lr(s.formatCode)),c=parseInt(s.numFmtId,10);if(t.NumberFmt[c]=l,c>0){if(c>392){for(c=392;c>60&&t.NumberFmt[c]!=null;--c);t.NumberFmt[c]=l}rc(l,c)}}break;case"</numFmt>":break;default:if(r.WTF)throw new Error("unrecognized "+s[0]+" in numFmts")}}}function Xme(e){var t=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var n=r[0];n<=r[1];++n)e[n]!=null&&(t[t.length]=lt("numFmt",null,{numFmtId:n,formatCode:Fr(e[n])}))}),t.length===1?"":(t[t.length]="</numFmts>",t[0]=lt("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}var Lv=["numFmtId","fillId","fontId","borderId","xfId"],$v=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function Jme(e,t,r){t.CellXf=[];var n,a=!1;(e[0].match(ti)||[]).forEach(function(i){var s=qt(i),l=0;switch(Sl(s[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":break;case"<xf":case"<xf/>":for(n=s,delete n[0],l=0;l<Lv.length;++l)n[Lv[l]]&&(n[Lv[l]]=parseInt(n[Lv[l]],10));for(l=0;l<$v.length;++l)n[$v[l]]&&(n[$v[l]]=an(n[$v[l]]));if(t.NumberFmt&&n.numFmtId>392){for(l=392;l>60;--l)if(t.NumberFmt[n.numFmtId]==t.NumberFmt[l]){n.numFmtId=l;break}}t.CellXf.push(n);break;case"</xf>":break;case"<alignment":case"<alignment/>":var c={};s.vertical&&(c.vertical=s.vertical),s.horizontal&&(c.horizontal=s.horizontal),s.textRotation!=null&&(c.textRotation=s.textRotation),s.indent&&(c.indent=s.indent),s.wrapText&&(c.wrapText=an(s.wrapText)),n.alignment=c;break;case"</alignment>":break;case"<protection":break;case"</protection>":case"<protection/>":break;case"<AlternateContent":a=!0;break;case"</AlternateContent>":a=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(r&&r.WTF&&!a)throw new Error("unrecognized "+s[0]+" in cellXfs")}})}function Qme(e){var t=[];return t[t.length]=lt("cellXfs",null),e.forEach(function(r){t[t.length]=lt("xf",null,r)}),t[t.length]="</cellXfs>",t.length===2?"":(t[0]=lt("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}var Zme=(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,c,u){var d={};if(!l)return d;l=l.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var f;return(f=l.match(t))&&Yme(f,d,u),(f=l.match(a))&&Kme(f,d,c,u),(f=l.match(n))&&Gme(f,d,c,u),(f=l.match(i))&&Vme(f,d,c,u),(f=l.match(r))&&Jme(f,d,u),d}})();function JG(e,t){var r=[zn,lt("styleSheet",null,{xmlns:ff[0],"xmlns:vt":sa.vt})],n;return e.SSF&&(n=Xme(e.SSF))!=null&&(r[r.length]=n),r[r.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',r[r.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',r[r.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',r[r.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(n=Qme(t.cellXfs))&&(r[r.length]=n),r[r.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',r[r.length]='<dxfs count="0"/>',r[r.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',r.length>2&&(r[r.length]="</styleSheet>",r[1]=r[1].replace("/>",">")),r.join("")}function e0e(e,t){var r=e.read_shift(2),n=Qa(e);return[r,n]}function t0e(e,t,r){r||(r=ze(6+4*t.length)),r.write_shift(2,e),_a(t,r);var n=r.length>r.l?r.slice(0,r.l):r;return r.l==null&&(r.l=r.length),n}function r0e(e,t,r){var n={};n.sz=e.read_shift(2)/20;var a=Dfe(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 c=e.read_shift(1);switch(c>0&&(n.charset=c),e.l++,n.color=Mfe(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=Qa(e),n}function n0e(e,t){t||(t=ze(153)),t.write_shift(2,e.sz*20),Lfe(e,t),t.write_shift(2,e.bold?700:400);var r=0;e.vertAlign=="superscript"?r=1:e.vertAlign=="subscript"&&(r=2),t.write_shift(2,r),t.write_shift(1,e.underline||0),t.write_shift(1,e.family||0),t.write_shift(1,e.charset||0),t.write_shift(1,0),c1(e.color,t);var n=0;return n=2,t.write_shift(1,n),_a(e.name,t),t.length>t.l?t.slice(0,t.l):t}var a0e=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","dar
535kVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],B2,i0e=Za;function pL(e,t){t||(t=ze(84)),B2||(B2=n_(a0e));var r=B2[e.patternType];r==null&&(r=40),t.write_shift(4,r);var n=0;if(r!=40)for(c1({auto:1},t),c1({auto:1},t);n<12;++n)t.write_shift(4,0);else{for(;n<4;++n)t.write_shift(4,0);for(;n<12;++n)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function s0e(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}}function QG(e,t,r){r||(r=ze(16)),r.write_shift(2,t||0),r.write_shift(2,e.numFmtId||0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(1,0),r.write_shift(1,0);var n=0;return r.write_shift(1,n),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(1,0),r}function a0(e,t){return t||(t=ze(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var o0e=Za;function l0e(e,t){return t||(t=ze(51)),t.write_shift(1,0),a0(null,t),a0(null,t),a0(null,t),a0(null,t),a0(null,t),t.length>t.l?t.slice(0,t.l):t}function c0e(e,t){return t||(t=ze(52)),t.write_shift(4,e.xfId),t.write_shift(2,1),t.write_shift(1,0),t.write_shift(1,0),l1(e.name||"",t),t.length>t.l?t.slice(0,t.l):t}function u0e(e,t,r){var n=ze(2052);return n.write_shift(4,e),l1(t,n),l1(r,n),n.length>n.l?n.slice(0,n.l):n}function d0e(e,t,r){var n={};n.NumberFmt=[];for(var a in Ut)n.NumberFmt[a]=Ut[a];n.CellXf=[],n.Fonts=[];var i=[],s=!1;return wc(e,function(c,u,d){switch(d){case 44:n.NumberFmt[c[0]]=c[1],rc(c[1],c[0]);break;case 43:n.Fonts.push(c),c.color.theme!=null&&t&&t.themeElements&&t.themeElements.clrScheme&&(c.color.rgb=f1(t.themeElements.clrScheme[c.color.theme].rgb,c.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:i[i.length-1]==617&&n.CellXf.push(c);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(u.T>0)i.push(d);else if(u.T<0)i.pop();else if(!s||r.WTF&&i[i.length-1]!=37)throw new Error("Unexpected record 0x"+d.toString(16))}}),n}function f0e(e,t){if(t){var r=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var a=n[0];a<=n[1];++a)t[a]!=null&&++r}),r!=0&&(Ge(e,615,To(r)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var a=n[0];a<=n[1];++a)t[a]!=null&&Ge(e,44,t0e(a,t[a]))}),Ge(e,616))}}function h0e(e){var t=1;Ge(e,611,To(t)),Ge(e,43,n0e({sz:12,color:{theme:1},name:"Calibri",family:2})),Ge(e,612)}function p0e(e){var t=2;Ge(e,603,To(t)),Ge(e,45,pL({patternType:"none"})),Ge(e,45,pL({patternType:"gray125"})),Ge(e,604)}function m0e(e){var t=1;Ge(e,613,To(t)),Ge(e,46,l0e()),Ge(e,614)}function g0e(e){var t=1;Ge(e,626,To(t)),Ge(e,47,QG({numFmtId:0},65535)),Ge(e,627)}function x0e(e,t){Ge(e,617,To(t.length)),t.forEach(function(r){Ge(e,47,QG(r,0))}),Ge(e,618)}function y0e(e){var t=1;Ge(e,619,To(t)),Ge(e,48,c0e({xfId:0,name:"Normal"})),Ge(e,620)}function v0e(e){var t=0;Ge(e,505,To(t)),Ge(e,506)}function b0e(e){var t=0;Ge(e,508,u0e(t,"TableStyleMedium9","PivotStyleMedium4")),Ge(e,509)}function w0e(e,t){var r=Ui();return Ge(r,278),f0e(r,e.SSF),h0e(r),p0e(r),m0e(r),g0e(r),x0e(r,t.cellXfs),y0e(r),v0e(r),b0e(r),Ge(r,279),r.end()}var _0e=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function S0e(e,t,r){t.themeElements.clrScheme=[];var n={};(e[0].match(ti)||[]).forEach(function(a){var i=qt(a);switch(i[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":n.rgb=i.val;break;case"<a:sysClr":n.rgb=i.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>
535":i[0].charAt(1)==="/"?(t.themeElements.clrScheme[_0e.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 E0e(){}function k0e(){}var N0e=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,T0e=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,j0e=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;function A0e(e,t,r){t.themeElements={};var n;[["clrScheme",N0e,S0e],["fontScheme",T0e,E0e],["fmtScheme",j0e,k0e]].forEach(function(a){if(!(n=e.match(a[1])))throw new Error(a[0]+" not found in themeElements");a[2](n,t,r)})}var C0e=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function ZG(e,t){(!e||e.length===0)&&(e=QR());var r,n={};if(!(r=e.match(C0e)))throw new Error("themeElements not found in theme");return A0e(r[0],n,t),n.raw=e,n}function QR(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var r=[zn];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ï¼ï¼³ ï¼°ã´ã·ãã¯"/>',r[r.length]='<a:font script="Hang" typeface="ë§ì ê³ ë"/>',r[r.length]='<a:font script="Hans" typeface="å®ä½"/>',r[r.length]='<a:font script="Hant" typeface="æ°ç´°æé«"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ï¼ï¼³ ï¼°ã´ã·ãã¯"/>
535',r[r.length]='<a:font script="Hang" typeface="ë§ì ê³ ë"/>',r[r.length]='<a:font script="Hans" typeface="å®ä½"/>',r[r.length]='<a:font script="Hant" typeface="æ°ç´°æé«"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>
535",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function O0e(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=WV(i,{type:"array"})}catch{return}var l=cs(s,"theme/theme/theme1.xml",!0);if(l)return ZG(l,r)}}function P0e(e){return e.read_shift(4)}function R0e(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=I0e(e,4);break;case 2:t.xclrValue=PG(e);break;case 3:t.xclrValue=P0e(e);break;case 4:e.l+=4;break}return e.l+=8,t}function I0e(e,t){return Za(e,t)}function F0e(e,t){return Za(e,t)}function M0e(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]=R0e(e);break;case 6:n[1]=F0e(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 D0e(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(M0e(e,r-e.l));return{ixfe:n,ext:i}}function L0e(e,t){t.forEach(function(r){r[0]})}function $0e(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:Qa(e)}}function B0e(e){var t=ze(12+2*e.name.length);return t.write_shift(4,e.flags),t.write_shift(4,e.version),_a(e.name,t),t.slice(0,t.l)}function U0e(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function z0e(e){var t=ze(4+8*e.length);t.write_shift(4,e.length);for(var r=0;r<e.length;++r)t.write_shift(4,e[r][0]),t.write_shift(4,e[r][1]);return t}function H0e(e,t){var r=ze(8+2*t.length);return r.write_shift(4,e),_a(t,r),r.slice(0,r.l)}
vendor: 5,535 bytes, lines 535-553
535function q0e(e){return e.l+=4,e.read_shift(4)!=0}function W0e(e,t){var r=ze(8);return r.write_shift(4,e),r.write_shift(4,1),r}function V0e(e,t,r){var n={Types:[],Cell:[],Value:[]},a=r||{},i=[],s=!1,l=2;return wc(e,function(c,u,d){switch(d){case 335:n.Types.push({name:c.name});break;case 51:c.forEach(function(f){l==1?n.Cell.push({type:n.Types[f[0]-1].name,index:f[1]}):l==0&&n.Value.push({type:n.Types[f[0]-1].name,index:f[1]})});break;case 337:l=c?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(!u.T){if(!s||a.WTF&&i[i.length-1]!=35)throw new Error("Unexpected record 0x"+d.toString(16))}}}),n}function G0e(){var e=Ui();return Ge(e,332),Ge(e,334,To(1)),Ge(e,335,B0e({name:"XLDAPR",version:12e4,flags:3496657072})),Ge(e,336),Ge(e,339,H0e(1,"XLDAPR")),Ge(e,52),Ge(e,35,To(514)),Ge(e,4096,To(0)),Ge(e,4097,Bs(1)),Ge(e,36),Ge(e,53),Ge(e,340),Ge(e,337,W0e(1)),Ge(e,51,z0e([[1,0]])),Ge(e,338),Ge(e,333),e.end()}function K0e(e,t,r){var n={Types:[],Cell:[],Value:[]};if(!e)return n;var a=!1,i=2,s;return e.replace(ti,function(l){var c=qt(l);switch(Sl(c[0])){case"<?xml":break;case"<metadata":case"</metadata>":break;case"<metadataTypes":case"</metadataTypes>":break;case"<metadataType":n.Types.push({name:c.name});break;case"</metadataType>":break;case"<futureMetadata":for(var u=0;u<n.Types.length;++u)n.Types[u].name==c.name&&(s=n.Types[u]);break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":i==1?n.Cell.push({type:n.Types[c.t-1].name,index:+c.v}):i==0&&n.Value.push({type:n.Types[c.t-1].name,index:+c.v});break;case"</rc>":break;case"<cellMetadata":i=1;break;case"</cellMetadata>":i=2;break;case"<valueMetadata":i=0;break;case"</valueMetadata>":i=2;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;case"<rvb":if(!s)break;s.offsets||(s.offsets=[]),s.offsets.push(+c.i);break;default:if(!a&&r.WTF)throw new Error("unrecognized "+c[0]+" in metadata")}return l}),n}function eK(){var e=[zn];return e.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"> 536 <metadataTypes count="1"> 537 <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/> 538 </metadataTypes> 539 <futureMetadata name="XLDAPR" count="1"> 540 <bk> 541 <extLst> 542 <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}"> 543 <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/> 544 </ext> 545 </extLst> 546 </bk> 547 </futureMetadata> 548 <cellMetadata count="1"> 549 <bk> 550 <rc t="1" v="0"/> 551 </bk> 552 </cellMetadata> 553</metadata>`),e.join("")}function Y0e(e){var t=[];if(!e)return t;var r=1;return(e.match(ti)||[]).forEach(function(n){var a=qt(n);switch(a[0]){case"<?xml":break;case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete a[0],a.i?r=a.i:a.i=r,t.push(a);break}}),t}function X0e(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=zt(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}function J0e(e,t,r){var n=[];return wc(e,function(i,s,l){switch(l){case 63:n.push(i);break;default:if(!s.T)throw new Error("Unexpected record 0x"+l.toString(16))}}),n}function Q0e(e,t,r,n){if(!e)return e;var a=n||{},i=!1;wc(e,function(l,c,u){switch(u){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:i=!0;break;case 36:i=!1;break;default:if(!c.T){if(!i||a.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}},a)}function Z0e(e,t){if(!e)return"??";var r=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}var yh=1024;function tK(e,t){for(var r=[21600,21600],n=["m0,0l0",r[1],r[0],r[1],r[0],"0xe"].join(","),a=[lt("xml",null,{"xmlns:v":as.v,"xmlns:o":as.o,"xmlns:x":as.x,"xmlns:mv":as.mv}).replace(/\/>/,">"),lt("o:shapelayout",lt("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),lt("v:shapetype",[lt("v:stroke",null,{joinstyle:"miter"}),lt("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:r.join(","),path:n})];yh<e*1e3;)yh+=1e3;return t.forEach(function(i){var s=_n(i[0]),l={color2:"#BEFF82",type:"gradient"};l.type=="gradient"&&(l.angle="-180");var c=l.type=="gradient"?lt("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,u=lt("v:fill",c,l),d={on:"t",obscured:"t"};++yh,a=a.concat(["<v:shape"+wg({id:"_x0000_s"+yh,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(i[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",u,lt("v:shadow",null,d),lt("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Pa("x:Anchor",[s.c+1,0,s.r+1,0,s.c+3,20,s.r+5,20].join(",")),Pa("x:AutoFill","False"),Pa("x:Row",String(s.r)),Pa("x:Column",String(s.c)),i[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),a.push("</xml>"),a.join("")}function mL(e,t,r,n){var a=Array.isArray(e),i;t.forEach(function(s){var l=_n(s.ref);
vendor: 5,165 bytes, lines 553-561
553if(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 c=wr(e["!ref"]||"BDWGO1000001:A1");c.s.r>l.r&&(c.s.r=l.r),c.e.r<l.r&&(c.e.r=l.r),c.s.c>l.c&&(c.s.c=l.c),c.e.c<l.c&&(c.e.c=l.c);var u=Zt(c);u!==e["!ref"]&&(e["!ref"]=u)}i.c||(i.c=[]);var d={a:s.author,t:s.t,r:s.r,T:r};s.h&&(d.h=s.h);for(var f=i.c.length-1;f>=0;--f){if(!r&&i.c[f].T)return;r&&!i.c[f].T&&i.c.splice(f,1)}if(r&&n){for(f=0;f<n.length;++f)if(d.a==n[f].id){d.a=n[f].name||d.a;break}}i.c.push(d)})}function ege(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))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 c=qt(l[0]),u={author:c.authorId&&r[c.authorId]||"sheetjsghost",ref:c.ref,guid:c.guid},d=_n(c.ref);if(!(t.sheetRows&&t.sheetRows<=d.r)){var f=s.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),p=!!f&&!!f[1]&&YR(f[1])||{r:"",t:"",h:""};u.r=p.r,p.r=="<t></t>"&&(p.t=p.h=""),u.t=(p.t||"").replace(/\r\n/g,` 554`).replace(/\r/g,` 555`),t.cellHTML&&(u.h=p.h),n.push(u)}}}}),n}function rK(e){var t=[zn,lt("comments",null,{xmlns:ff[0]})],r=[];return t.push("<authors>"),e.forEach(function(n){n[1].forEach(function(a){var i=Fr(a.a);r.indexOf(i)==-1&&(r.push(i),t.push("<author>"+i+"</author>")),a.T&&a.ID&&r.indexOf("tc="+a.ID)==-1&&(r.push("tc="+a.ID),t.push("<author>tc="+a.ID+"</author>"))})}),r.length==0&&(r.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach(function(n){var a=0,i=[];if(n[1][0]&&n[1][0].T&&n[1][0].ID?a=r.indexOf("tc="+n[1][0].ID):n[1].forEach(function(c){c.a&&(a=r.indexOf(Fr(c.a))),i.push(c.t||"")}),t.push('<comment ref="'+n[0]+'" authorId="'+a+'"><text>'),i.length<=1)t.push(Pa("t",Fr(i[0]||"")));else{for(var s=`Comment: 556 `+i[0]+` 557`,l=1;l<i.length;++l)s+=`Reply: 558 `+i[l]+` 559`;t.push(Pa("t",Fr(s)))}t.push("</text></comment>")}),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function tge(e,t){var r=[],n=!1,a={},i=0;return e.replace(ti,function(l,c){var u=qt(l);switch(Sl(u[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":a={author:u.personId,guid:u.id,ref:u.ref,T:1};break;case"</threadedComment>":a.t!=null&&r.push(a);break;case"<text>":case"<text":i=c+l.length;break;case"</text>":a.t=e.slice(i,c).replace(/\r\n/g,` 560`).replace(/\r/g,` 561`);break;case"<mentions":case"<mentions>":n=!0;break;case"</mentions>":n=!1;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+u[0]+" in threaded comments")}return l}),r}function rge(e,t,r){var n=[zn,lt("ThreadedComments",null,{xmlns:sa.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(a){var i="";(a[1]||[]).forEach(function(s,l){if(!s.T){delete s.ID;return}s.a&&t.indexOf(s.a)==-1&&t.push(s.a);var c={ref:a[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+r.tcid++).slice(-12)+"}"};l==0?i=c.id:c.parentId=i,s.ID=c.id,s.a&&(c.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(s.a)).slice(-12)+"}"),n.push(lt("threadedComment",Pa("text",s.t||""),c))})}),n.push("</ThreadedComments>"),n.join("")}function nge(e,t){var r=[],n=!1;return e.replace(ti,function(i){var s=qt(i);switch(Sl(s[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":r.push({name:s.displayname,id:s.id});break;case"</person>":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+s[0]+" in threaded comments")}return i}),r}function age(e){var t=[zn,lt("personList",null,{xmlns:sa.TCMNT,"xmlns:x":ff[0]}).replace(/[\/]>/,">")];return e.forEach(function(r,n){t.push(lt("person",null,{displayName:r,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:r,providerId:"None"}))}),t.push("</personList>"),t.join("")}function ige(e){var t={};t.iauthor=e.read_shift(4);var r=gf(e);return t.rfx=r.s,t.ref=zt(r.s),e.l+=16,t}function sge(e,t){return t==null&&(t=ze(36)),t.write_shift(4,e[1].iauthor),Jp(e[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}var oge=Qa;function lge(e){return _a(e.slice(0,54))}function cge(e,t){var r=[],n=[],a={},i=!1;return wc(e,function(l,c,u){switch(u){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(!c.T){if(!i||t.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}}),r}function uge(e){var t=Ui(),r=[];
561return Ge(t,628),Ge(t,630),e.forEach(function(n){n[1].forEach(function(a){r.indexOf(a.a)>-1||(r.push(a.a.slice(0,54)),Ge(t,632,lge(a.a)))})}),Ge(t,631),Ge(t,633),e.forEach(function(n){n[1].forEach(function(a){a.iauthor=r.indexOf(a.a);var i={s:_n(n[0]),e:_n(n[0])};Ge(t,635,sge([i,a])),a.t&&a.t.length>0&&Ge(t,637,Pfe(a)),Ge(t,636),delete a.iauthor})}),Ge(t,634),Ge(t,629),t.end()}var dge="application/vnd.ms-office.vbaProject";function fge(e){var t=At.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*/,"");At.utils.cfb_add(t,a,e.FileIndex[n].content)}}),At.write(t)}function hge(e,t){t.FullPaths.forEach(function(r,n){if(n!=0){var a=r.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");a.slice(-1)!=="/"&&At.utils.cfb_add(e,a,t.FileIndex[n].content)}})}var nK=["xlsb","xlsm","xlam","biff8","xla"];function pge(){return{"!type":"dialog"}}function mge(){return{"!type":"dialog"}}function gge(){return{"!type":"macro"}}function xge(){return{"!type":"macro"}}var Mh=(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,c=!1;i.length==0?c=!0:i.charAt(0)=="["&&(c=!0,i=i.slice(1,-1)),s.length==0?l=!0:s.charAt(0)=="["&&(l=!0,s=s.slice(1,-1));var u=i.length>0?parseInt(i,10)|0:0,d=s.length>0?parseInt(s,10)|0:0;return l?d+=t.c:--d,c?u+=t.r:--u,a+(l?"":"$")+wn(d)+(c?"":"$")+Bn(u)}return function(a,i){return t=i,a.replace(e,r)}})(),ZR=/(^|[^._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,e4=(function(){return function(t,r){return t.replace(ZR,function(n,a,i,s,l,c){var u=BR(s)-(i?0:r.c),d=$R(c)-(l?0:r.r),f=d==0?"":l?d+1:"["+d+"]",p=u==0?"":i?u+1:"["+u+"]";return a+"R"+f+"C"+p})}})();function aK(e,t){return e.replace(ZR,function(r,n,a,i,s,l){return n+(a=="$"?a+i:wn(BR(i)+t.c))+(s=="$"?s+l:Bn($R(l)+t.r))})}function yge(e,t,r){var n=qi(t),a=n.s,i=_n(r),s={r:i.r-a.r,c:i.c-a.c};return aK(e,s)}function vge(e){return e.length!=1}function gL(e){return e.replace(/_xlfn\./g,"")}function Vn(e){e.l+=1}function ku(e,t){var r=e.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}function iK(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return sK(e);r.biff==12&&(n=4)}var a=e.read_shift(n),i=e.read_shift(n),s=ku(e),l=ku(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 sK(e){var t=ku(e),r=ku(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 bge(e,t,r){if(r.biff<8)return sK(e);var n=e.read_shift(r.biff==12?4:2),a=e.read_shift(r.biff==12?4:2),i=ku(e),s=ku(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 oK(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return wge(e);var n=e.read_shift(r&&r.biff==12?4:2),a=ku(e);return{r:n,c:a[0],cRel:a[1],rRel:a[2]}}function wge(e){var t=ku(e),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function _ge(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 Sge(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return Ege(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 Ege(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 kge(e,t,r){var n=(e[e.l++]&96)>>5,a=iK(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,a]}function Nge(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=iK(e,i,r);return[n,a,s]}function Tge(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 jge(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 Age(e,t,r){var n=(e[e.l++]&96)>>5,a=bge(e,t-1,r);return[n,a]}function Cge(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function xL(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function Oge(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 Pge(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 Rge(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 Ige(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function Fge(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function lK(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function Mge(e){return e.read_shift(2),lK(e)}function Dge(e){return e.read_shift(2),lK(e)}function Lge(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=oK(e,0,r);return[n,a]}function $ge(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=Sge(e,0,r);return[n,a]}function Bge(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=e.read_shift(2);
561r&&r.biff==5&&(e.l+=12);var i=oK(e,0,r);return[n,a,i]}function Uge(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[qxe[a],dK[a],n]}function zge(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)]:Hge(e);return[a,(i[0]===0?dK:Hxe)[i[1]]]}function Hge(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function qge(e,t,r){e.l+=r&&r.biff==2?3:4}function Wge(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 Vge(e){return e.l++,_c[e.read_shift(1)]}function Gge(e){return e.l++,e.read_shift(2)}function Kge(e){return e.l++,e.read_shift(1)!==0}function Yge(e){return e.l++,Ya(e)}function Xge(e,t,r){return e.l++,Rx(e,t-1,r)}function Jge(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]=Dn(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=_c[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=Ya(e);break;case 2:r[1]=xf(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function Qge(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?gf:s_)(e));return a}function Zge(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]=Jge(e,r.biff);return s}function exe(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 txe(e,t,r){if(r.biff==5)return rxe(e);var n=e.read_shift(1)>>>5&3,a=e.read_shift(2),i=e.read_shift(4);return[n,a,i]}function rxe(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 nxe(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 axe(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 ixe(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 sxe(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 oxe=Za,lxe=Za,cxe=Za;function Fx(e,t,r){return e.l+=2,[_ge(e)]}function t4(e){return e.l+=6,[]}var uxe=Fx,dxe=t4,fxe=t4,hxe=Fx;function cK(e){return e.l+=2,[Kn(e),e.read_shift(2)&1]}var pxe=Fx,mxe=cK,gxe=t4,xxe=Fx,yxe=Fx,vxe=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function bxe(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=vxe[r>>2&31];return{ixti:t,coltype:r&3,rt:s,idx:n,c:a,C:i}}function wxe(e){return e.l+=2,[e.read_shift(4)]}function _xe(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function Sxe(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function Exe(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function kxe(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function Nxe(e){return e.l+=4,[0,0]}var yL={1:{n:"PtgExp",f:Wge},2:{n:"PtgTbl",f:cxe},3:{n:"PtgAdd",f:Vn},4:{n:"PtgSub",f:Vn},5:{n:"PtgMul",f:Vn},6:{n:"PtgDiv",f:Vn},7:{n:"PtgPower",f:Vn},8:{n:"PtgConcat",f:Vn},9:{n:"PtgLt",f:Vn},10:{n:"PtgLe",f:Vn},11:{n:"PtgEq",f:Vn},12:{n:"PtgGe",f:Vn},13:{n:"PtgGt",f:Vn},14:{n:"PtgNe",f:Vn},15:{n:"PtgIsect",f:Vn},16:{n:"PtgUnion",f:Vn},17:{n:"PtgRange",f:Vn},18:{n:"PtgUplus",f:Vn},19:{n:"PtgUminus",f:Vn},20:{n:"PtgPercent",f:Vn},21:{n:"PtgParen",f:Vn},22:{n:"PtgMissArg",f:Vn},23:{n:"PtgStr",f:Xge},26:{n:"PtgSheet",f:_xe},27:{n:"PtgEndSheet",f:Sxe},28:{n:"PtgErr",f:Vge},29:{n:"PtgBool",f:Kge},30:{n:"PtgInt",f:Gge},31:{n:"PtgNum",f:Yge},32:{n:"PtgArray",f:Cge},33:{n:"PtgFunc",f:Uge},34:{n:"PtgFuncVar",f:zge},35:{n:"PtgName",f:exe},36:{n:"PtgRef",f:Lge},37:{n:"PtgArea",f:kge},38:{n:"PtgMemArea",f:nxe},39:{n:"PtgMemErr",f:oxe},40:{n:"PtgMemNoMem",f:lxe},41:{n:"PtgMemFunc",f:axe},42:{n:"PtgRefErr",f:ixe},43:{n:"PtgAreaErr",f:Tge},44:{n:"PtgRefN",f:$ge},45:{n:"PtgAreaN",f:Age},46:{n:"PtgMemAreaN",f:Exe},47:{n:"PtgMemNoMemN",f:kxe},57:{n:"PtgNameX",f:txe},58:{n:"PtgRef3d",f:Bge}
vendor: 9,072 bytes, line 561
561,59:{n:"PtgArea3d",f:Nge},60:{n:"PtgRefErr3d",f:sxe},61:{n:"PtgAreaErr3d",f:jge},255:{}},Txe={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},jxe={1:{n:"PtgElfLel",f:cK},2:{n:"PtgElfRw",f:xxe},3:{n:"PtgElfCol",f:uxe},6:{n:"PtgElfRwV",f:yxe},7:{n:"PtgElfColV",f:hxe},10:{n:"PtgElfRadical",f:pxe},11:{n:"PtgElfRadicalS",f:gxe},13:{n:"PtgElfColS",f:dxe},15:{n:"PtgElfColSV",f:fxe},16:{n:"PtgElfRadicalLel",f:mxe},25:{n:"PtgList",f:bxe},29:{n:"PtgSxName",f:wxe},255:{}},Axe={0:{n:"PtgAttrNoop",f:Nxe},1:{n:"PtgAttrSemi",f:Fge},2:{n:"PtgAttrIf",f:Rge},4:{n:"PtgAttrChoose",f:Oge},8:{n:"PtgAttrGoto",f:Pge},16:{n:"PtgAttrSum",f:qge},32:{n:"PtgAttrBaxcel",f:xL},33:{n:"PtgAttrBaxcel",f:xL},64:{n:"PtgAttrSpace",f:Mge},65:{n:"PtgAttrSpaceSemi",f:Dge},128:{n:"PtgAttrIfError",f:Ige},255:{}};function Mx(e,t,r,n){if(n.biff<8)return Za(e,t);for(var a=e.l+t,i=[],s=0;s!==r.length;++s)switch(r[s][0]){case"PtgArray":r[s][1]=Zge(e,0,n),i.push(r[s][1]);break;case"PtgMemArea":r[s][2]=Qge(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(Za(e,t)),i}function Dx(e,t,r){for(var n=e.l+t,a,i,s=[];n!=e.l;)t=n-e.l,i=e[e.l],a=yL[i]||yL[Txe[i]],(i===24||i===25)&&(a=(i===24?jxe:Axe)[e[e.l+1]]),!a||!a.f?Za(e,t):s.push([a.n,a.f(e,t,r)]);return s}function Cxe(e){for(var t=[],r=0;r<e.length;++r){for(var n=e[r],a=[],i=0;i<n.length;++i){var s=n[i];if(s)switch(s[0]){case 2:a.push('"'+s[1].replace(/"/g,'""')+'"');break;default:a.push(s[1])}else a.push("")}t.push(a.join(","))}return t.join(";")}var Oxe={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function Pxe(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 uK(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 vL(e,t,r){var n=uK(e,t,r);return n=="#REF"?n:Pxe(n,r)}function Wa(e,t,r,n,a){var i=a&&a.biff||8,s={s:{c:0,r:0}},l=[],c,u,d,f=0,p=0,m,x="";if(!e[0]||!e[0][0])return"";for(var y=-1,v="",b=0,w=e[0].length;b<w;++b){var S=e[0][b];switch(S[0]){case"PtgUminus":l.push("-"+l.pop());break;case"PtgUplus":l.push("+"+l.pop());break;case"PtgPercent":l.push(l.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(c=l.pop(),u=l.pop(),y>=0){switch(e[0][y][1][0]){case 0:v=Tn(" ",e[0][y][1][1]);break;case 1:v=Tn("\r",e[0][y][1][1]);break;default:if(v="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][y][1][0])}u=u+v,y=-1}l.push(u+Oxe[S[0]]+c);break;case"PtgIsect":c=l.pop(),u=l.pop(),l.push(u+" "+c);break;case"PtgUnion":c=l.pop(),u=l.pop(),l.push(u+","+c);break;case"PtgRange":c=l.pop(),u=l.pop(),l.push(u+":"+c);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":d=U0(S[1][1],s,a),l.push(z0(d,i));break;case"PtgRefN":d=r?U0(S[1][1],r,a):S[1][1],l.push(z0(d,i));break;case"PtgRef3d":f=S[1][1],d=U0(S[1][2],s,a),x=vL(n,f,a),l.push(x+"!"+z0(d,i));break;case"PtgFunc":case"PtgFuncVar":var j=S[1][0],k=S[1][1];j||(j=0),j&=127;var E=j==0?[]:l.slice(-j);l.length-=j,k==="User"&&(k=E.shift()),l.push(k+"("+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":m=K5(S[1][1],r?{s:r}:s,a),l.push(M2(m,a));break;case"PtgArea":m=K5(S[1][1],s,a),l.push(M2(m,a));break;case"PtgArea3d":f=S[1][1],m=S[1][2],x=vL(n,f,a),l.push(x+"!"+M2(m,a));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":p=S[1][2];var T=(n.names||[])[p-1]||(n[0]||[])[p],O=T?T.Name:"SH33TJSNAME"+String(p);O&&O.slice(0,6)=="_xlfn."&&!a.xlfn&&(O=O.slice(6)),l.push(O);break;case"PtgNameX":var A=S[1][1];p=S[1][2];var P;if(a.biff<=5)A<0&&(A=-A),n[A]&&(P=n[A][p]);else{var I="";if(((n[A]||[])[0]||[])[0]==14849||(((n[A]||[])[0]||[])[0]==1025?n[A][p]&&n[A][p].itab>0&&(I=n.SheetNames[n[A][p].itab-1]+"!"):I=n.SheetNames[p-1]+"!"),n[A]&&n[A][p])I+=n[A][p].Name;else if(n[0]&&n[0][p])I+=n[0][p].Name;else{var R=(uK(n,A,a)||"").split(";;");R[p-1]?I=R[p-1]:I+="SH33TJSERRX"}l.push(I);break}P||(P={Name:"SH33TJSERRY"}),l.push(P.Name);break;case"PtgParen":var M="(",L=")";if(y>=0){switch(v="",e[0][y][1][0]){case 2:M=Tn(" ",e[0][y][1][1])+M;break;case 3:M=Tn("\r",e[0][y][1][1])+M;break;case 4:L=Tn(" ",e[0][y][1][1])+L;break;case 5:L=Tn("\r",e[0][y][1][1])+L;break;default:if(a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][y][1][0])}y=-1}l.push(M+l.pop()+L);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 U={c:r.c,r:r.r};if(n.sharedf[zt(d)]){var W=n.sharedf[zt(d)];l.push(Wa(W,s,U,n,a))}else{var V=!1;for(c=0;c!=n.arrayf.length;++c)if(u=n.arrayf[c],!(d.c<u[0].s.c||d.c>u[0].e.c)&&!(d.r<u[0].s.r||d.r>u[0].e.r)){l.push(Wa(u[1],s,U,n,a)),V=!0;break}V||l.push(S[1])}break;case"PtgArray":l.push("{"+Cxe(S[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":y=b;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 G=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(a.biff!=3&&y>=0&&G.indexOf(e[0][b][0])==-1){S=e[0][y];var K=!0;switch(S[1][0]){case 4:K=!1;case 0:v=Tn(" ",S[1][1]);break;case 5:K=!1;case 1:v=Tn("\r",S[1][1]);break;default:if(v="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+S[1][0])}l.push((K?v:"")+l.pop()+(K?"":v)),y=-1}}if(l.length>1&&a.WTF)throw new Error("bad formula stack");return l[0]}function Rxe(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,s=e.read_shift(a);if(s==65535)return[[],Za(e,t-2)];var l=Dx(e,s,r);return t!==s+a&&(i=Mx(e,t-s-a,l,r)),e.l=n,[l,i]}function Ixe(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,s=e.read_shift(a);if(s==65535)return[[],Za(e,t-2)];var l=Dx(e,s,r);return t!==s+a&&(i=Mx(e,t-s-a,l,r)),e.l=n,[l,i]}function Fxe(e,t,r,n){var a=e.l+t,i=Dx(e,n,r),s;return a!==e.l&&(s=Mx(e,a-e.l,i,r)),[i,s]}function Mxe(e,t,r){var n=e.l+t,a,i=e.read_shift(2),s=Dx(e,i,r);return i==65535?[[],Za(e,t-2)]:(t!==i+2&&(a=Mx(e,n-i-2,s,r)),[s,a])}function Dxe(e){var t;if(Kl(e,e.l+6)!==65535)return[Ya(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 Lxe(e){if(e==null){var t=ze(8);return t.write_shift(1,3),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,65535),t}else if(typeof e=="number")return Xd(e);return Xd(0)}function U2(e,t,r){var n=e.l+t,a=El(e);r.biff==2&&++e.l;var i=Dxe(e),s=e.read_shift(1);r.biff!=2&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var l=Ixe(e,n-e.l,r);return{cell:a,val:i[0],formula:l,shared:s>>3&1,tt:i[1]}}function $xe(e,t,r,n,a){var i=Qd(t,r,a),s=Lxe(e.v),l=ze(6),c=33;l.write_shift(2,c),l.write_shift(4,0);for(var u=ze(e.bf.length),d=0;d<e.bf.length;++d)u[d]=e.bf[d];var f=wa([i,s,l,u]);return f}function o_(e,t,r){var n=e.read_shift(4),a=Dx(e,n,r),i=e.read_shift(4),s=i>0?Mx(e,i,a,r):null;return[a,s]}var Bxe=o_,l_=o_,Uxe=o_,zxe=o_,Hxe
vendor: 7,369 bytes, line 561
561={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"}
561,dK={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
vendor: 10,890 bytes, line 561
561:"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"},qxe={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 bL(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 Wxe(e){var t="of:="+e.replace(ZR,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return t.replace(/;/g,"|").replace(/,/g,";")}function z2(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]):"")]}function Vxe(e){return e.replace(/\./,"!")}var q0={},Dh={},W0=typeof Map<"u";function r4(e,t,r){var n=0,a=e.length;if(r){if(W0?r.has(t):Object.prototype.hasOwnProperty.call(r,t)){for(var i=W0?r.get(t):r[t];n<i.length;++n)if(e[i[n]].t===t)return e.Count++,i[n]}}else for(;n<a;++n)if(e[n].t===t)return e.Count++,n;return e[a]={t},e.Count++,e.Unique++,r&&(W0?(r.has(t)||r.set(t,[]),r.get(t).push(a)):(Object.prototype.hasOwnProperty.call(r,t)||(r[t]=[]),r[t].push(a))),a}function c_(e,t){var r={min:e+1,max:e+1},n=-1;return t.MDW&&(Va=t.MDW),t.width!=null?r.customWidth=1:t.wpx!=null?n=Ng(t.wpx):t.wch!=null&&(n=t.wch),n>-1?(r.width=h1(n),r.customWidth=1):t.width!=null&&(r.width=t.width),t.hidden&&(r.hidden=!0),t.level!=null&&(r.outlineLevel=r.level=t.level),r}function Hd(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 Mu(e,t,r){var n=r.revssf[t.z!=null?t.z:"General"],a=60,i=e.length;if(n==null&&r.ssf){for(;a<392;++a)if(r.ssf[a]==null){rc(t.z,a),r.ssf[a]=t.z,r.revssf[t.z]=n=a;break}}for(a=0;a!=i;++a)if(e[a].numFmtId===n)return a;return e[i]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},i}function fK(e,t,r,n,a,i){try{n.cellNF&&(e.z=Ut[t])}catch(l){if(n.WTF)throw l}if(!(e.t==="z"&&!n.cellStyles)){if(e.t==="d"&&typeof e.v=="string"&&(e.v=ln(e.v)),(!n||n.cellText!==!1)&&e.t!=="z")try{if(Ut[t]==null&&rc(Hde[t]||"General",t),e.t==="e")e.w=e.w||_c[e.v];else if(t===0)if(e.t==="n")(e.v|0)===e.v?e.w=e.v.toString(10):e.w=vg(e.v);else if(e.t==="d"){var s=ua(e.v);(s|0)===s?e.w=s.toString(10):e.w=vg(s)}else{if(e.v===void 0)return"";e.w=Kd(e.v,Dh)}else e.t==="d"?e.w=Xs(t,ua(e.v),Dh):e.w=Xs(t,e.v,Dh)}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=f1(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=f1(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 Gxe(e,t,r){if(e&&e["!ref"]){var n=wr(e["!ref"]);if(n.e.c<n.s.c||n.e.r<n.s.r)throw new Error("Bad range ("+r+"): "+e["!ref"])}}function Kxe(e,t){var r=wr(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=Zt(r))}var Yxe=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,Xxe=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,Jxe=/<(?:\w:)?hyperlink [^>]*>/mg,Qxe=/"(\w*:\w*)"/,Zxe=/<(?:\w:)?col\b[^>]*[\/]?>/g,eye=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,tye=/<(?:\w:)?pageMargins[^>]*\/>/g,hK=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,rye=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,nye=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function aye(e,t,r,n,a,i,s){if(!e)return e;n||(n={"!id":{}});var l=t.dense?[]:{},c={s:{r:2e6,c:2e6},e:{r:0,c:0}},u="",d="",f=e.match(Xxe);f?(u=e.slice(0,f.index),d=e.slice(f.index+f[0].length)):u=d=e;var p=u.match(hK);p?n4(p[0],l,a,r):(p=u.match(rye))&&sye(p[0],p[1]||"",l,a,r);var m=(u.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(m>0){var x=u.slice(m,m+50).match(Qxe);x&&Kxe(l,x[1])}var y=u.match(nye);y&&y[1]&&vye(y[1],a);var v=[];if(t.cellStyles){var b=u.match(Zxe);b&&pye(v,b)}f&&_ye(f[1],l,t,c,i,s);var w=d.match(eye);w&&(l["!autofilter"]=gye(w[0]));var S=[],j=d.match(Yxe);if(j)for(m=0;m!=j.length;++m)S[m]=wr(j[m].slice(j[m].indexOf('"')+1));var k=d.match(Jxe);k&&dye(l,k,n);var E=d.match(tye);if(E&&(l["!margins"]=fye(qt(E[0]))),!l["!ref"]&&c.e.c>=c.s.c&&c.e.r>=c.s.r&&(l["!ref"]=Zt(c)),t.sheetRows>0&&l["!ref"]){var T=wr(l["!ref"]);t.sheetRows<=+T.e.r&&(T.e.r=t.sheetRows-1,T.e.r>c.e.r&&(T.e.r=c.e.r),T.e.r<T.s.r&&(T.s.r=T.e.r),T.e.c>c.e.c&&(T.e.c=c.e.c),T.e.c<T.s.c&&(T.s.c=T.e.c),l["!fullref"]=l["!ref"],l["!ref"]=Zt(T))}return v.length>0&&(l["!cols"]=v),S.length>0&&(l["!merges"]=S),l}function iye(e){if(e.length===0)return"";for(var t='<mergeCells count="'+e.length+'">',r=0;r!=e.length;++r)t+='<mergeCell ref="'+Zt(e[r])+'"/>';return t+"</mergeCells>"}function n4(e,t,r,n){var a=qt(e);r.Sheets[n]||(r.Sheets[n]={}),a.codeName&&(r.Sheets[n].CodeName=br(Lr(a.codeName)))}function sye(e,t,r,n,a){n4(e.slice(0,e.indexOf(">")),r,n,a)}function oye(e,t,r,n,a){var i=!1,s={},l=null;if(n.bookType!=="xlsx"&&t.vbaraw){var c=t.SheetNames[r];try{t.Workbook&&(c=t.Workbook.Sheets[r].CodeName||c)}catch{}i=!0,s.codeName=sl(Fr(c))}if(e&&e["!outline"]){var u={summaryBelow:1,summaryRight:1};e["!outline"].above&&(u.summaryBelow=0),e["!outline"].left&&(u.summaryRight=0),l=(l||"")+lt("outlinePr",null,u)}!i&&!l||(a[a.length]=lt("sheetPr",l,s))}var lye=["objects","scenarios","selectLockedCells","selectUnlockedCells"],cye=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function uye(e){var t={sheet:1};return lye.forEach(function(r){e[r]!=null&&e[r]&&(t[r]="1")}),cye.forEach(function(r){e[r]!=null&&!e[r]&&(t[r]="0")}),e.password&&(t.password=XR(e.password).toString(16).toUpperCase()),lt("sheetProtection",null,t)}function dye(e,t,r){for(var n=Array.isArray(e),a=0;a!=t.length;++a){var i=qt(Lr(t[a]),!0);if(!i.ref)return;var s=((r||{})["!id"]||[])[i.id];s?(i.Target=s.Target,i.location&&(i.Target+="#"+br(i.location))):(i.Target="#"+br(i.location),s={Target:i.Target,TargetMode:"Internal"}),i.Rel=s,i.tooltip&&(i.Tooltip=i.tooltip,delete i.tooltip);for(var l=wr(i.ref),c=l.s.r;c<=l.e.r;++c)for(var u=l.s.c;u<=l.e.c;++u){var d=zt({c:u,r:c});
vendor: 10,165 bytes, lines 561-562
561n?(e[c]||(e[c]=[]),e[c][u]||(e[c][u]={t:"z",v:void 0}),e[c][u].l=i):(e[d]||(e[d]={t:"z",v:void 0}),e[d].l=i)}}}function fye(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(r){e[r]&&(t[r]=parseFloat(e[r]))}),t}function hye(e){return Hd(e),lt("pageMargins",null,e)}function pye(e,t){for(var r=!1,n=0;n!=t.length;++n){var a=qt(t[n],!0);a.hidden&&(a.hidden=an(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,JR(a.width)),Eu(a);i<=s;)e[i++]=cn(a)}}function mye(e,t){for(var r=["<cols>"],n,a=0;a!=t.length;++a)(n=t[a])&&(r[r.length]=lt("col",null,c_(a,n)));return r[r.length]="</cols>",r.join("")}function gye(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}function xye(e,t,r,n){var a=typeof e.ref=="string"?e.ref:Zt(e.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var i=r.Workbook.Names,s=qi(a);s.s.r==s.e.r&&(s.e.r=qi(t["!ref"]).e.r,a=Zt(s));for(var l=0;l<i.length;++l){var c=i[l];if(c.Name=="_xlnm._FilterDatabase"&&c.Sheet==n){c.Ref="'"+r.SheetNames[n]+"'!"+a;break}}return l==i.length&&i.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+a}),lt("autoFilter",null,{ref:a})}var yye=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function vye(e,t){t.Views||(t.Views=[{}]),(e.match(yye)||[]).forEach(function(r,n){var a=qt(r);t.Views[n]||(t.Views[n]={}),+a.zoomScale&&(t.Views[n].zoom=+a.zoomScale),an(a.rightToLeft)&&(t.Views[n].RTL=!0)})}function bye(e,t,r,n){var a={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(a.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),lt("sheetViews",lt("sheetView",null,a),{})}function wye(e,t,r,n){if(e.c&&r["!comments"].push([t,e.c]),e.v===void 0&&typeof e.f!="string"||e.t==="z"&&!e.f)return"";var a="",i=e.t,s=e.v;if(e.t!=="z")switch(e.t){case"b":a=e.v?"1":"0";break;case"n":a=""+e.v;break;case"e":a=_c[e.v];break;case"d":n&&n.cellDates?a=ln(e.v,-1).toISOString():(e=cn(e),e.t="n",a=""+(e.v=ua(ln(e.v)))),typeof e.z>"u"&&(e.z=Ut[14]);break;default:a=e.v;break}var l=Pa("v",Fr(a)),c={r:t},u=Mu(n.cellXfs,e,n);switch(u!==0&&(c.s=u),e.t){case"n":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;case"z":break;default:if(e.v==null){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){l=Pa("v",""+r4(n.Strings,e.v,n.revStrings)),c.t="s";break}c.t="str";break}if(e.t!=i&&(e.t=i,e.v=s),typeof e.f=="string"&&e.f){var d=e.F&&e.F.slice(0,t.length)==t?{t:"array",ref:e.F}:null;l=lt("f",Fr(e.f),d)+(e.v!=null?l:"")}return e.l&&r["!links"].push([t,e.l]),e.D&&(c.cm=1),lt("c",l,c)}var _ye=(function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,n=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,a=/ref=["']([^"']*)["']/,i=bg("v"),s=bg("f");return function(c,u,d,f,p,m){for(var x=0,y="",v=[],b=[],w=0,S=0,j=0,k="",E,T,O=0,A=0,P,I,R=0,M=0,L=Array.isArray(m.CellXf),U,W=[],V=[],G=Array.isArray(u),K=[],F={},ne=!1,H=!!d.sheetStubs,B=c.split(t),X=0,Y=B.length;X!=Y;++X){y=B[X].trim();var ae=y.length;if(ae!==0){var fe=0;e:for(x=0;x<ae;++x)switch(y[x]){case">":if(y[x-1]!="/"){++x;break e}if(d&&d.cellStyles){if(T=qt(y.slice(fe,x),!0),O=T.r!=null?parseInt(T.r,10):O+1,A=-1,d.sheetRows&&d.sheetRows<O)continue;F={},ne=!1,T.ht&&(ne=!0,F.hpt=parseFloat(T.ht),F.hpx=Xh(F.hpt)),T.hidden=="1"&&(ne=!0,F.hidden=!0),T.outlineLevel!=null&&(ne=!0,F.level=+T.outlineLevel),ne&&(K[O-1]=F)}break;case"<":fe=x;break}if(fe>=x)break;if(T=qt(y.slice(fe,x),!0),O=T.r!=null?parseInt(T.r,10):O+1,A=-1,!(d.sheetRows&&d.sheetRows<O)){f.s.r>O-1&&(f.s.r=O-1),f.e.r<O-1&&(f.e.r=O-1),d&&d.cellStyles&&(F={},ne=!1,T.ht&&(ne=!0,F.hpt=parseFloat(T.ht),F.hpx=Xh(F.hpt)),T.hidden=="1"&&(ne=!0,F.hidden=!0),T.outlineLevel!=null&&(ne=!0,F.level=+T.outlineLevel),ne&&(K[O-1]=F)),v=y.slice(x).split(e);for(var ue=0;ue!=v.length&&v[ue].trim().charAt(0)=="<";++ue);for(v=v.slice(ue),x=0;x!=v.length;++x)if(y=v[x].trim(),y.length!==0){if(b=y.match(r),w=x,S=0,j=0,y="<c "+(y.slice(0,1)=="<"?">":"")+y,b!=null&&b.length===2){for(w=0,k=b[1],S=0;S!=k.length&&!((j=k.charCodeAt(S)-64)<1||j>26);++S)w=26*w+j;--w,A=w}else++A;for(S=0;S!=y.length&&y.charCodeAt(S)!==62;++S);if(++S,T=qt(y.slice(0,S),!0),T.r||(T.r=zt({r:O-1,c:A})),k=y.slice(S),E={t:""},(b=k.match(i))!=null&&b[1]!==""&&(E.v=br(b[1])),d.cellFormula){if((b=k.match(s))!=null&&b[1]!==""){if(E.f=br(Lr(b[1])).replace(/\r\n/g,` 562`),d.xlfn||(E.f=gL(E.f)),b[0].indexOf('t="array"')>-1)E.F=(k.match(a)||[])[1],E.F.indexOf(":")>-1&&W.push([wr(E.F),E.F]);else if(b[0].indexOf('t="shared"')>-1){I=qt(b[0]);var oe=br(Lr(b[1]));d.xlfn||(oe=gL(oe)),V[parseInt(I.si,10)]=[I,oe,T.r]}}else(b=k.match(/<f[^>]*\/>/))&&(I=qt(b[0]),V[I.si]&&(E.f=yge(V[I.si][1],V[I.si][2],T.r)));var Z=_n(T.r);for(S=0;S<W.length;++S)Z.r>=W[S][0].s.r&&Z.r<=W[S][0].e.r&&Z.c>=W[S][0].s.c&&Z.c<=W[S][0].e.c&&(E.F=W[S][1])}if(T.t==null&&E.v===void 0)if(E.f||E.F)E.v=0,E.t="n";else if(H)E.t="z";else continue;else E.t=T.t||"n";switch(f.s.c>A&&(f.s.c=A),f.e.c<A&&(f.e.c=A),E.t){case"n":if(E.v==""||E.v==null){if(!H)continue;E.t="z"}else E.v=parseFloat(E.v);break;case"s":if(typeof E.v>"u"){if(!H)continue;E.t="z"}else P=q0[parseInt(E.v,10)],E.v=P.t,E.r=P.r,d.cellHTML&&(E.h=P.h);break;case"str":E.t="s",E.v=E.v!=null?Lr(E.v):"",d.cellHTML&&(E.h=FR(E.v));break;case"inlineStr":b=k.match(n),E.t="s",b!=null&&(P=YR(b[1]))?(E.v=P.t,d.cellHTML&&(E.h=P.h)):E.v="";break;case"b":E.v=an(E.v);break;case"d":d.cellDates?E.v=ln(E.v,1):(E.v=ua(ln(E.v,1)),E.t="n");break;case"e":(!d||d.cellText!==!1)&&(E.w=E.v),E.v=mG[E.v];break}if(R=M=0,U=null,L&&T.s!==void 0&&(U=m.CellXf[T.s],U!=null&&(U.numFmtId!=null&&(R=U.numFmtId),d.cellStyles&&U.fillId!=null&&(M=U.fillId))),fK(E,R,M,d,p,m),d.cellDates&&L&&E.t=="n"&&Kp(Ut[R])&&(E.t="d",E.v=i_(E.v)),T.cm&&d.xlmeta){var ce=(d.xlmeta.Cell||[])[+T.cm-1];ce&&ce.type=="XLDAPR"&&(E.D=!0)}if(G){var q=_n(T.r);u[q.r]||(u[q.r]=[]),u[q.r][q.c]=E}else u[T.r]=E}}}}K.length>0&&(u["!rows"]=K)}})();function Sye(e,t,r,n){var a=[],i=[],s=wr(e["!ref"]),l="",c,u="",d=[],f=0,p=0,m=e["!rows"],x=Array.isArray(e),y={r:u},v,b=-1;for(p=s.s.c;p<=s.e.c;++p)d[p]=wn(p);for(f=s.s.r;f<=s.e.r;++f){for(i=[],u=Bn(f),p=s.s.c;p<=s.e.c;++p){c=d[p]+u;var w=x?(e[f]||[])[p]:e[c];w!==void 0&&(l=wye(w,c,e,t))!=null&&i.push(l)}(i.length>0||m&&m[f])&&(y={r:u},m&&m[f]&&(v=m[f],v.hidden&&(y.hidden=1),b=-1,v.hpx?b=Tg(v.hpx):v.hpt&&(b=v.hpt),b>-1&&(y.ht=b,y.customHeight=1),v.level&&(y.outlineLevel=v.level)),a[a.length]=lt("row",i.join(""),y))}if(m)for(;f<m.length;++f)m&&m[f]&&(y={r:f+1},v=m[f],v.hidden&&(y.hidden=1),b=-1,v.hpx?b=Tg(v.hpx):v.hpt&&(b=v.hpt),b>-1&&(y.ht=b,y.customHeight=1),v.level&&(y.outlineLevel=v.level),a[a.length]=lt("row","",y));return a.join("")}function pK(e,t,r,n){var a=[zn,lt("worksheet",null,{xmlns:ff[0],"xmlns:r":sa.r})],i=r.SheetNames[e],s=0,l="",c=r.Sheets[i];c==null&&(c={});var u=c["!ref"]||"A1",d=wr(u);if(d.e.c>16383||d.e.r>1048575){if(t.WTF)throw new Error("Range "+u+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),u=Zt(d)}n||(n={}),c["!comments"]=[];var f=[];oye(c,r,e,t,a),a[a.length]=lt("dimension",null,{ref:u}),a[a.length]=bye(c,t,e,r),t.sheetFormat&&(a[a.length]=lt("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),c["!cols"]!=null&&c["!cols"].length>0&&(a[a.length]=mye(c,c["!cols"])),a[s=a.length]="<sheetData/>",c["!links"]=[],c["!ref"]!=null&&(l=Sye(c,t),l.length>0&&(a[a.length]=l)),a.length>s+1&&(a[a.length]="</sheetData>",a[s]=a[s].replace("/>",">")),c["!protect"]&&(a[a.length]=uye(c["!protect"])),c["!autofilter"]!=null&&(a[a.length]=xye(c["!autofilter"],c,r,e)),c["!merges"]!=null&&c["!merges"].length>0&&(a[a.length]=iye(c["!merges"]));var p=-1,m,x=-1;return c["!links"].length>0&&(a[a.length]="<hyperlinks>",c["!links"].forEach(function(y){y[1].Target&&(m={ref:y[0]},y[1].Target.charAt(0)!="#"&&(x=Rr(n,-1,Fr(y[1].Target).replace(/#.*$/,""),ur.HLINK),m["r:id"]="rId"+x),(p=y[1].Target.indexOf("#"))>-1&&(m.location=Fr(y[1].Target.slice(p+1))),y[1].Tooltip&&(m.tooltip=Fr(y[1].Tooltip)),a[a.length]=lt("hyperlink",null,m))}),a[a.length]="</hyperlinks>"),delete c["!links"],c["!margins"]!=null&&(a[a.length]=hye(c["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&(a[a.length]=Pa("ignoredErrors",lt("ignoredError",null,{numberStoredAsText:1,sqref:u}))),f.length>0&&(x=Rr(n,-1,"../drawings/drawing"+(e+1)+".xml",ur.DRAW),a[a.length]=lt("drawing",null,{"r:id":"rId"+x}),c["!drawing"]=f),c["!comments"].length>0&&(x=Rr(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",ur.VML),a[a.length]=lt("legacyDrawing",null,{"r:id":"rId"+x}),c["!legacy"]=x),a.length>1&&(a[a.length]="</worksheet>",a[1]=a[1].replace("/>",">")),a.join("")}function Eye(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}function kye(e,t,r){var n=ze(145),a=(r["!rows"]||[])[e]||{};n.write_shift(4,e),n.write_shift(4,0);var i=320;a.hpx?i=Tg(a.hpx)*20:a.hpt&&(i=a.hpt*20),n.write_shift(2,i),n.write_shift(1,0);var s=0;a.level&&(s|=a.level),a.hidden&&(s|=16),(a.hpx||a.hpt)&&(s|=32),n.write_shift(1,s),n.write_shift(1,0);var l=0,c=n.l;n.l+=4;for(var u={r:e,c:0},d=0;d<16;++d)if(!(t.s.c>d+1<<10||t.e.c<d<<10)){for(var f=-1,p=-1,m=d<<10;m<d+1<<10;++m){u.c=m;var x=Array.isArray(r)?(r[u.r]||[])[u.c]:r[zt(u)];x&&(f<0&&(f=m),p=m)}f<0||(++l,n.write_shift(4,f),n.write_shift(4,p))}var y=n.l;return n.l=c,n.write_shift(4,l),n.l=y,n.length>n.l?n.slice(0,n.l):n}function Nye(e,t,r,n){var a=kye(n,r,t);(a.length>17||(t["!rows"]||[])[n])&&Ge(e,0,a)}var Tye=gf,jye=Jp;function Aye(){}function Cye(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=Rfe(e),r}function Oye(e,t,r){r==null&&(r=ze(84+4*e.length));var n=192;t&&(t.above&&(n&=-65),t.left&&(n&=-129)),r.write_shift(1,n);for(var a=1;a<3;++a)r.write_shift(1,0);return c1({auto:1},r),r.write_shift(-4,-1),r.write_shift(-4,-1),uG(e,r),r.slice(0,r.l)}
562function Pye(e){var t=to(e);return[t]}function Rye(e,t,r){return r==null&&(r=ze(8)),hf(t,r)}function Iye(e){var t=pf(e);return[t]}function Fye(e,t,r){return r==null&&(r=ze(4)),mf(t,r)}function Mye(e){var t=to(e),r=e.read_shift(1);return[t,r,"b"]}function Dye(e,t,r){return r==null&&(r=ze(9)),hf(t,r),r.write_shift(1,e.v?1:0),r}function Lye(e){var t=pf(e),r=e.read_shift(1);return[t,r,"b"]}function $ye(e,t,r){return r==null&&(r=ze(5)),mf(t,r),r.write_shift(1,e.v?1:0),r}function Bye(e){var t=to(e),r=e.read_shift(1);return[t,r,"e"]}function Uye(e,t,r){return r==null&&(r=ze(9)),hf(t,r),r.write_shift(1,e.v),r}function zye(e){var t=pf(e),r=e.read_shift(1);return[t,r,"e"]}function Hye(e,t,r){return r==null&&(r=ze(8)),mf(t,r),r.write_shift(1,e.v),r.write_shift(2,0),r.write_shift(1,0),r}function qye(e){var t=to(e),r=e.read_shift(4);return[t,r,"s"]}function Wye(e,t,r){return r==null&&(r=ze(12)),hf(t,r),r.write_shift(4,t.v),r}function Vye(e){var t=pf(e),r=e.read_shift(4);return[t,r,"s"]}function Gye(e,t,r){return r==null&&(r=ze(8)),mf(t,r),r.write_shift(4,t.v),r}function Kye(e){var t=to(e),r=Ya(e);return[t,r,"n"]}function Yye(e,t,r){return r==null&&(r=ze(16)),hf(t,r),Xd(e.v,r),r}function mK(e){var t=pf(e),r=Ya(e);return[t,r,"n"]}function Xye(e,t,r){return r==null&&(r=ze(12)),mf(t,r),Xd(e.v,r),r}function Jye(e){var t=to(e),r=qR(e);return[t,r,"n"]}function Qye(e,t,r){return r==null&&(r=ze(12)),hf(t,r),dG(e.v,r),r}function Zye(e){var t=pf(e),r=qR(e);return[t,r,"n"]}function eve(e,t,r){return r==null&&(r=ze(8)),mf(t,r),dG(e.v,r),r}function tve(e){var t=to(e),r=UR(e);return[t,r,"is"]}function rve(e){var t=to(e),r=Qa(e);return[t,r,"str"]}function nve(e,t,r){return r==null&&(r=ze(12+4*e.v.length)),hf(t,r),_a(e.v,r),r.length>r.l?r.slice(0,r.l):r}function ave(e){var t=pf(e),r=Qa(e);return[t,r,"str"]}function ive(e,t,r){return r==null&&(r=ze(8+4*e.v.length)),mf(t,r),_a(e.v,r),r.length>r.l?r.slice(0,r.l):r}function sve(e,t,r){var n=e.l+t,a=to(e);a.r=r["!row"];var i=e.read_shift(1),s=[a,i,"b"];if(r.cellFormula){e.l+=2;var l=l_(e,n-e.l,r);s[3]=Wa(l,null,a,r.supbooks,r)}else e.l=n;return s}function ove(e,t,r){var n=e.l+t,a=to(e);a.r=r["!row"];var i=e.read_shift(1),s=[a,i,"e"];if(r.cellFormula){e.l+=2;var l=l_(e,n-e.l,r);s[3]=Wa(l,null,a,r.supbooks,r)}else e.l=n;return s}function lve(e,t,r){var n=e.l+t,a=to(e);a.r=r["!row"];var i=Ya(e),s=[a,i,"n"];if(r.cellFormula){e.l+=2;var l=l_(e,n-e.l,r);s[3]=Wa(l,null,a,r.supbooks,r)}else e.l=n;return s}function cve(e,t,r){var n=e.l+t,a=to(e);a.r=r["!row"];var i=Qa(e),s=[a,i,"str"];if(r.cellFormula){e.l+=2;var l=l_(e,n-e.l,r);s[3]=Wa(l,null,a,r.supbooks,r)}else e.l=n;return s}var uve=gf,dve=Jp;function fve(e,t){return t==null&&(t=ze(4)),t.write_shift(4,e),t}function hve(e,t){var r=e.l+t,n=gf(e),a=zR(e),i=Qa(e),s=Qa(e),l=Qa(e);e.l=r;var c={rfx:n,relId:a,loc:i,display:l};return s&&(c.Tooltip=s),c}function pve(e,t){var r=ze(50+4*(e[1].Target.length+(e[1].Tooltip||"").length));Jp({s:_n(e[0]),e:_n(e[0])},r),HR("rId"+t,r);var n=e[1].Target.indexOf("#"),a=n==-1?"":e[1].Target.slice(n+1);return _a(a||"",r),_a(e[1].Tooltip||"",r),_a("",r),r.slice(0,r.l)}function mve(){}function gve(e,t,r){var n=e.l+t,a=fG(e),i=e.read_shift(1),s=[a];if(s[2]=i,r.cellFormula){var l=Bxe(e,n-e.l,r);s[1]=l}else e.l=n;return s}function xve(e,t,r){var n=e.l+t,a=gf(e),i=[a];if(r.cellFormula){var s=zxe(e,n-e.l,r);i[1]=s,e.l=n}else e.l=n;return i}function yve(e,t,r){r==null&&(r=ze(18));var n=c_(e,t);r.write_shift(-4,e),r.write_shift(-4,e),r.write_shift(4,(n.width||10)*256),r.write_shift(4,0);var a=0;return t.hidden&&(a|=1),typeof n.width=="number"&&(a|=2),t.level&&(a|=t.level<<8),r.write_shift(2,a),r}var gK=["left","right","top","bottom","header","footer"];function vve(e){var t={};return gK.forEach(function(r){t[r]=Ya(e)}),t}function bve(e,t){return t==null&&(t=ze(48)),Hd(e),gK.forEach(function(r){Xd(e[r],t)}),t}function wve(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function _ve(e,t,r){r==null&&(r=ze(30));var n=924;return(((t||{}).Views||[])[0]||{}).RTL&&(n|=32),r.write_shift(2,n),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(2,0),r.write_shift(2,100),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(4,0),r}function Sve(e){var t=ze(24);return t.write_shift(4,4),t.write_shift(4,1),Jp(e,t),t}function Eve(e,t){return t==null&&(t=ze(66)),t.write_shift(2,e.password?XR(e.password):0),t.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEac
vendor: 4,682 bytes, line 562
562h(function(r){r[1]?t.write_shift(4,e[r[0]]!=null&&!e[r[0]]?1:0):t.write_shift(4,e[r[0]]!=null&&e[r[0]]?0:1)}),t}function kve(){}function Nve(){}function Tve(e,t,r,n,a,i,s){if(!e)return e;var l=t||{};n||(n={"!id":{}});var c=l.dense?[]:{},u,d={s:{r:2e6,c:2e6},e:{r:0,c:0}},f=!1,p=!1,m,x,y,v,b,w,S,j,k,E=[];l.biff=12,l["!row"]=0;var T=0,O=!1,A=[],P={},I=l.supbooks||a.supbooks||[[]];if(I.sharedf=P,I.arrayf=A,I.SheetNames=a.SheetNames||a.Sheets.map(function(G){return G.name}),!l.supbooks&&(l.supbooks=I,a.Names))for(var R=0;R<a.Names.length;++R)I[0][R+1]=a.Names[R];var M=[],L=[],U=!1;jg[16]={n:"BrtShortReal",f:mK};var W;if(wc(e,function(K,F,ne){if(!p)switch(ne){case 148:u=K;break;case 0:m=K,l.sheetRows&&l.sheetRows<=m.r&&(p=!0),j=Bn(v=m.r),l["!row"]=m.r,(K.hidden||K.hpt||K.level!=null)&&(K.hpt&&(K.hpx=Xh(K.hpt)),L[K.r]=K);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(x={t:K[2]},K[2]){case"n":x.v=K[1];break;case"s":S=q0[K[1]],x.v=S.t,x.r=S.r;break;case"b":x.v=!!K[1];break;case"e":x.v=K[1],l.cellText!==!1&&(x.w=_c[x.v]);break;case"str":x.t="s",x.v=K[1];break;case"is":x.t="s",x.v=K[1].t;break}if((y=s.CellXf[K[0].iStyleRef])&&fK(x,y.numFmtId,null,l,i,s),b=K[0].c==-1?b+1:K[0].c,l.dense?(c[v]||(c[v]=[]),c[v][b]=x):c[wn(b)+j]=x,l.cellFormula){for(O=!1,T=0;T<A.length;++T){var H=A[T];m.r>=H[0].s.r&&m.r<=H[0].e.r&&b>=H[0].s.c&&b<=H[0].e.c&&(x.F=Zt(H[0]),O=!0)}!O&&K.length>3&&(x.f=K[3])}if(d.s.r>m.r&&(d.s.r=m.r),d.s.c>b&&(d.s.c=b),d.e.r<m.r&&(d.e.r=m.r),d.e.c<b&&(d.e.c=b),l.cellDates&&y&&x.t=="n"&&Kp(Ut[y.numFmtId])){var B=wd(x.v);B&&(x.t="d",x.v=new Date(B.y,B.m-1,B.d,B.H,B.M,B.S,B.u))}W&&(W.type=="XLDAPR"&&(x.D=!0),W=void 0);break;case 1:case 12:if(!l.sheetStubs||f)break;x={t:"z",v:void 0},b=K[0].c==-1?b+1:K[0].c,l.dense?(c[v]||(c[v]=[]),c[v][b]=x):c[wn(b)+j]=x,d.s.r>m.r&&(d.s.r=m.r),d.s.c>b&&(d.s.c=b),d.e.r<m.r&&(d.e.r=m.r),d.e.c<b&&(d.e.c=b),W&&(W.type=="XLDAPR"&&(x.D=!0),W=void 0);break;case 176:E.push(K);break;case 49:W=((l.xlmeta||{}).Cell||[])[K-1];break;case 494:var X=n["!id"][K.relId];for(X?(K.Target=X.Target,K.loc&&(K.Target+="#"+K.loc),K.Rel=X):K.relId==""&&(K.Target="#"+K.loc),v=K.rfx.s.r;v<=K.rfx.e.r;++v)for(b=K.rfx.s.c;b<=K.rfx.e.c;++b)l.dense?(c[v]||(c[v]=[]),c[v][b]||(c[v][b]={t:"z",v:void 0}),c[v][b].l=K):(w=zt({c:b,r:v}),c[w]||(c[w]={t:"z",v:void 0}),c[w].l=K);break;case 426:if(!l.cellFormula)break;A.push(K),k=l.dense?c[v][b]:c[wn(b)+j],k.f=Wa(K[1],d,{r:m.r,c:b},I,l),k.F=Zt(K[0]);break;case 427:if(!l.cellFormula)break;P[zt(K[0].s)]=K[1],k=l.dense?c[v][b]:c[wn(b)+j],k.f=Wa(K[1],d,{r:m.r,c:b},I,l);break;case 60:if(!l.cellStyles)break;for(;K.e>=K.s;)M[K.e--]={width:K.w/256,hidden:!!(K.flags&1),level:K.level},U||(U=!0,JR(K.w/256)),Eu(M[K.e+1]);break;case 161:c["!autofilter"]={ref:Zt(K)};break;case 476:c["!margins"]=K;break;case 147:a.Sheets[r]||(a.Sheets[r]={}),K.name&&(a.Sheets[r].CodeName=K.name),(K.above||K.left)&&(c["!outline"]={above:K.above,left:K.left});break;case 137:a.Views||(a.Views=[{}]),a.Views[0]||(a.Views[0]={}),K.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:f=!0;break;case 36:f=!1;break;case 37:f=!0;break;case 38:f=!1;break;default:if(!F.T){if(!f||l.WTF)throw new Error("Unexpected record 0x"+ne.toString(16))}}},l),delete l.supbooks,delete l["!row"],!c["!ref"]&&(d.s.r<2e6||u&&(u.e.r>0||u.e.c>0||u.s.r>0||u.s.c>0))&&(c["!ref"]=Zt(u||d)),l.sheetRows&&c["!ref"]){var V=wr(c["!ref"]);l.sheetRows<=+V.e.r&&(V.e.r=l.sheetRows-1,V.e.r>d.e.r&&(V.e.r=d.e.r),V.e.r<V.s.r&&(V.s.r=V.e.r),V.e.c>d.e.c&&(V.e.c=d.e.c),V.e.c<V.s.c&&(V.s.c=V.e.c),c["!fullref"]=c["!ref"],c["!ref"]=Zt(V))}return E.length>0&&(c["!merges"]=E),M.length>0&&(c["!cols"]=M),L.length>0&&(c["!rows"]=L),c}function jve(e,t,r,n,a,i,s){if(t.v===void 0)return!1;var l="";switch(t.t){case"b":l=t.v?"1":"0";break;case"d":t=cn(t),t.z=t.z||Ut[14],t.v=ua(ln(t.v)),t.t="n";break;case"n":case"e":l=""+t.v;break;default:l=t.v;break}var c={r,c:n};switch(c.s=Mu(a.cellXfs,t,a),t.l&&i["!links"].push([zt(c),t.l]),t.c&&i["!comments"].push([zt(c),t.c]),t.t){case"s":case"str":return a.bookSST?(l=r4(a.Strings,t.v,a.revStrings),c.t="s",c.v=l,s?Ge(e,18,Gye(t,c)
vendor: 4,735 bytes, line 562
562):Ge(e,7,Wye(t,c))):(c.t="str",s?Ge(e,17,ive(t,c)):Ge(e,6,nve(t,c))),!0;case"n":return t.v==(t.v|0)&&t.v>-1e3&&t.v<1e3?s?Ge(e,13,eve(t,c)):Ge(e,2,Qye(t,c)):s?Ge(e,16,Xye(t,c)):Ge(e,5,Yye(t,c)),!0;case"b":return c.t="b",s?Ge(e,15,$ye(t,c)):Ge(e,4,Dye(t,c)),!0;case"e":return c.t="e",s?Ge(e,14,Hye(t,c)):Ge(e,3,Uye(t,c)),!0}return s?Ge(e,12,Fye(t,c)):Ge(e,1,Rye(t,c)),!0}function Ave(e,t,r,n){var a=wr(t["!ref"]||"A1"),i,s="",l=[];Ge(e,145);var c=Array.isArray(t),u=a.e.r;t["!rows"]&&(u=Math.max(a.e.r,t["!rows"].length-1));for(var d=a.s.r;d<=u;++d){s=Bn(d),Nye(e,t,a,d);var f=!1;if(d<=a.e.r)for(var p=a.s.c;p<=a.e.c;++p){d===a.s.r&&(l[p]=wn(p)),i=l[p]+s;var m=c?(t[d]||[])[p]:t[i];if(!m){f=!1;continue}f=jve(e,m,d,p,n,t,f)}}Ge(e,146)}function Cve(e,t){!t||!t["!merges"]||(Ge(e,177,fve(t["!merges"].length)),t["!merges"].forEach(function(r){Ge(e,176,dve(r))}),Ge(e,178))}function Ove(e,t){!t||!t["!cols"]||(Ge(e,390),t["!cols"].forEach(function(r,n){r&&Ge(e,60,yve(n,r))}),Ge(e,391))}function Pve(e,t){!t||!t["!ref"]||(Ge(e,648),Ge(e,649,Sve(wr(t["!ref"]))),Ge(e,650))}function Rve(e,t,r){t["!links"].forEach(function(n){if(n[1].Target){var a=Rr(r,-1,n[1].Target.replace(/#.*$/,""),ur.HLINK);Ge(e,494,pve(n,a))}}),delete t["!links"]}function Ive(e,t,r,n){if(t["!comments"].length>0){var a=Rr(n,-1,"../drawings/vmlDrawing"+(r+1)+".vml",ur.VML);Ge(e,551,HR("rId"+a)),t["!legacy"]=a}}function Fve(e,t,r,n){if(t["!autofilter"]){var a=t["!autofilter"],i=typeof a.ref=="string"?a.ref:Zt(a.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var s=r.Workbook.Names,l=qi(i);l.s.r==l.e.r&&(l.e.r=qi(t["!ref"]).e.r,i=Zt(l));for(var c=0;c<s.length;++c){var u=s[c];if(u.Name=="_xlnm._FilterDatabase"&&u.Sheet==n){u.Ref="'"+r.SheetNames[n]+"'!"+i;break}}c==s.length&&s.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+i}),Ge(e,161,Jp(wr(i))),Ge(e,162)}}function Mve(e,t,r){Ge(e,133),Ge(e,137,_ve(t,r)),Ge(e,138),Ge(e,134)}function Dve(e,t){t["!protect"]&&Ge(e,535,Eve(t["!protect"]))}function Lve(e,t,r,n){var a=Ui(),i=r.SheetNames[e],s=r.Sheets[i]||{},l=i;try{r&&r.Workbook&&(l=r.Workbook.Sheets[e].CodeName||l)}catch{}var c=wr(s["!ref"]||"A1");if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575)}return s["!links"]=[],s["!comments"]=[],Ge(a,129),(r.vbaraw||s["!outline"])&&Ge(a,147,Oye(l,s["!outline"])),Ge(a,148,jye(c)),Mve(a,s,r.Workbook),Ove(a,s),Ave(a,s,e,t),Dve(a,s),Fve(a,s,r,e),Cve(a,s),Rve(a,s,n),s["!margins"]&&Ge(a,476,bve(s["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&Pve(a,s),Ive(a,s,e,n),Ge(a,130),a.end()}function $ve(e){var t=[],r=e.match(/^<c:numCache>/),n;(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(i){var s=i.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);s&&(t[+s[1]]=r?+s[2]:s[2])});var a=br((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(i){n=i.replace(/<.*?>/g,"")}),[t,a,n]}function Bve(e,t,r,n,a,i){var s=i||{"!type":"chart"};if(!e)return i;var l=0,c=0,u="A",d={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(f){var p=$ve(f);d.s.r=d.s.c=0,d.e.c=l,u=wn(l),p[0].forEach(function(m,x){s[u+Bn(x)]={t:"n",v:m,z:p[1]},c=x}),d.e.r<c&&(d.e.r=c),++l}),l>0&&(s["!ref"]=Zt(d)),s}function Uve(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},s,l=e.match(hK);return l&&n4(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 zve(e,t){e.l+=10;var r=Qa(e);return{name:r}}function Hve(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},s=!1;return wc(e,function(c,u,d){switch(d){case 550:i["!rel"]=c;break;case 651:a.Sheets[r]||(a.Sheets[r]={}),c.name&&(a.Sheets[r].CodeName=c.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(!(u.T>0)){if(!(u.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 a4=[["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"],["showBorder
562UnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],qve=[["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"]],Wve=[],Vve=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function wL(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]]=an(n[i[0]]));break;case"int":typeof n[i[0]]=="string"&&(n[i[0]]=parseInt(n[i[0]],10));break}}}function _L(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]]=an(e[n[0]]));break;case"int":typeof e[n[0]]=="string"&&(e[n[0]]=parseInt(e[n[0]],10));break}}}function xK(e){_L(e.WBProps,a4),_L(e.CalcPr,Vve),wL(e.WBView,qve),wL(e.Sheets,Wve),Dh.date1904=an(e.WBProps.date1904)}function Gve(e){return!e.Workbook||!e.Workbook.WBProps?"false":an(e.Workbook.WBProps.date1904)?"true":"false"}var Kve="][*?/\\".split("");function yK(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return Kve.forEach(function(n){if(e.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}function Yve(e,t,r){e.forEach(function(n,a){yK(n);for(var i=0;i<a;++i)if(n==e[i])throw new Error("Duplicate Sheet Name: "+n);if(r){var s=t&&t[a]&&t[a].CodeName||n;if(s.charCodeAt(0)==95&&s.length>22)throw new Error("Bad Code Name: Worksheet"+s)}})}function Xve(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var t=e.Workbook&&e.Workbook.Sheets||[];Yve(e.SheetNames,t,!!e.vbaraw);for(var r=0;r<e.SheetNames.length;++r)Gxe(e.Sheets[e.SheetNames[r]],e.SheetNames[r],r)}var Jve=/<\w+:workbook/;function Qve(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(ti,function(c,u){var d=qt(c);switch(Sl(d[0])){case"<?xml":break;case"<workbook":c.match(Jve)&&(a="xmlns"+c.match(/<(\w+):/)[1]),r.xmlns=d[a];break;case"</workbook>":break;case"<fileVersion":delete d[0],r.AppVersion=d;break;case"<fileVersion/>":case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":case"<workbookPr/>":a4.forEach(function(f){if(d[f[0]]!=null)switch(f[2]){case"bool":r.WBProps[f[0]]=an(d[f[0]]);break;case"int":r.WBProps[f[0]]=parseInt(d[f[0]],10);break;default:r.WBProps[f[0]]=d[f[0]]}}),d.codeName&&(r.WBProps.CodeName=Lr(d.codeName));break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":case"<bookViews>":case"</bookViews>":break;case"<workbookView":case"<workbookView/>":delete d[0],r.WBView.push(d);break;case"</workbookView>":break;case"<sheets":case"<sheets>":case"</sheets>":break;case"<sheet":switch(d.state){case"hidden":d.Hidden=1;break;case"veryHidden":d.Hidden=2;break;default:d.Hidden=0}delete d.state,d.name=br(Lr(d.name)),delete d[0],r.Sheets.push(d);break;case"</sheet>":break;case"<functionGroups":case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":case"</externalReferences>":case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":case"<definedNames":n=!0;break;case"</definedNames>":n=!1;break;case"<definedName":i={},i.Name=Lr(d.name),d.comment&&(i.Comment=d.comment),d.localSheetId&&(i.Sheet=+d.localSheetId),an(d.hidden||"0")&&(i.Hidden=!0),s=u+c.length;break;case"</definedName>":i.Ref=br(Lr(e.slice(s,u))),r.Names.push(i);break;case"<definedName/>":break;case"<calcPr":delete d[0],r.CalcPr=d;break;case"<calcPr/>":delete d[0],r.CalcPr=d;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":break;case"<customWorkbookView":case"</customWorkbookView>":break;case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":case"<smartTagPr/>":break;case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":case"<webPublishing/>":break;case"<fileRecoveryPr":case"<fileRecoveryPr/>":break;case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;case"<ArchID":break;case"<AlternateContent":case"<AlternateContent>":n=!0;break;case"</AlternateContent>":n=!1;break;case"<revisionPtr":break;default:if(!n&&t.WTF)throw new Error("unrecognized "+d[0]+" in workbook")}return c}),ff.indexOf(r.xmlns)===-1)throw new Error("Unknown Namespace: "+r.xmlns);return xK(r),r}function vK(e){var t=[zn];t[t.length]=lt("workbook",null,{xmlns:ff[0],"xmlns:r":sa.r});var r=e.Workbook&&(e.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(a4.forEach(function(l){e.Workbook.WBProps[l[0]]!=null&&e.Workbook.WBProps[l[0]]!=l[1]&&(n[l[0]]=e.Workbook.WBProps[l[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),t[t.length]=lt("workbookPr",null,n);var a=e.Workbook&&e.Workbook.Sheets||[],i=0;if(a&&a[0]&&a[0].Hidden){for(t[t.length]="<bookViews>",i=0;i!=e.SheetNames.length&&!(!a[i]||!a[i].Hidden);++i);i==e.SheetNames.length&&(i=0),t[t.length]='<workbookView firstSheet="'+i+'" activeTab="'+i+'"/>',t[t.length]="</bookViews>"}for(t[t.length]="<sheets>",i=0;i!=e.SheetNames.length;++i){var s={name:Fr(e.SheetNames[i].slice(0,31))};if(s.sheetId=""+(i+1),s["r:id"]="rId"+(i+1),a[i])switch(a[i].Hidden){case 1:s.state="hidden";break;case 2:s.state="veryHidden";break}t[t.length]=lt("sheet",null,s)}return t[t.length]="</sheets>",r&&(t[t.length]="<definedNames>
vendor: 18,762 bytes, lines 562-564
562",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(l){var c={name:l.Name};l.Comment&&(c.comment=l.Comment),l.Sheet!=null&&(c.localSheetId=""+l.Sheet),l.Hidden&&(c.hidden="1"),l.Ref&&(t[t.length]=lt("definedName",Fr(l.Ref),c))}),t[t.length]="</definedNames>"),t.length>2&&(t[t.length]="</workbook>",t[1]=t[1].replace("/>",">")),t.join("")}function Zve(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=xC(e),r.name=Qa(e),r}function ebe(e,t){return t||(t=ze(127)),t.write_shift(4,e.Hidden),t.write_shift(4,e.iTabID),HR(e.strRelID,t),_a(e.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function tbe(e,t){var r={},n=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var a=t>8?Qa(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 rbe(e,t){t||(t=ze(72));var r=0;return e&&e.filterPrivacy&&(r|=8),t.write_shift(4,r),t.write_shift(4,0),uG(e&&e.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}function nbe(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function abe(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var a=e.read_shift(4),i=Ife(e),s=Uxe(e,0,r),l=zR(e);e.l=n;var c={Name:i,Ptg:s};return a<268435455&&(c.Sheet=a),l&&(c.Comment=l),c}function ibe(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=[],jg[16]={n:"BrtFRTArchID$",f:nbe},wc(e,function(c,u,d){switch(d){case 156:s.SheetNames.push(c.name),r.Sheets.push(c);break;case 153:r.WBProps=c;break;case 39:c.Sheet!=null&&(t.SID=c.Sheet),c.Ref=Wa(c.Ptg,null,null,s,t),delete t.SID,delete c.Ptg,i.push(c);break;case 1036:break;case 357:case 358:case 355:case 667:s[0].length?s.push([d,c]):s[0]=[d,c],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(c),s.XTI=s.XTI.concat(c);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(!u.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),xK(r),r.Names=i,r.supbooks=s,r}function sbe(e,t){Ge(e,143);for(var r=0;r!=t.SheetNames.length;++r){var n=t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[r]&&t.Workbook.Sheets[r].Hidden||0,a={Hidden:n,iTabID:r+1,strRelID:"rId"+(r+1),name:t.SheetNames[r]};Ge(e,156,ebe(a))}Ge(e,144)}function obe(e,t){t||(t=ze(127));for(var r=0;r!=4;++r)t.write_shift(4,0);return _a("SheetJS",t),_a(r1.version,t),_a(r1.version,t),_a("7262",t),t.length>t.l?t.slice(0,t.l):t}function lbe(e,t){t||(t=ze(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,e),t.write_shift(4,e);var r=120;return t.write_shift(1,r),t.length>t.l?t.slice(0,t.l):t}function cbe(e,t){if(!(!t.Workbook||!t.Workbook.Sheets)){for(var r=t.Workbook.Sheets,n=0,a=-1,i=-1;n<r.length;++n)!r[n]||!r[n].Hidden&&a==-1?a=n:r[n].Hidden==1&&i==-1&&(i=n);i>a||(Ge(e,135),Ge(e,158,lbe(a)),Ge(e,136))}}function ube(e,t){var r=Ui();return Ge(r,131),Ge(r,128,obe()),Ge(r,153,rbe(e.Workbook&&e.Workbook.WBProps||null)),cbe(r,e),sbe(r,e),Ge(r,132),r.end()}function dbe(e,t,r){return t.slice(-4)===".bin"?ibe(e,r):Qve(e,r)}function fbe(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?Tve(e,n,r,a,i,s,l):aye(e,n,r,a,i,s,l)}function hbe(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?Hve(e,n,r,a,i):Uve(e,n,r,a,i)}function pbe(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?gge():xge()}function mbe(e,t,r,n,a,i,s,l){return t.slice(-4)===".bin"?pge():mge()}function gbe(e,t,r,n){return t.slice(-4)===".bin"?d0e(e,r,n):Zme(e,r,n)}function xbe(e,t,r){return ZG(e,r)}function ybe(e,t,r){return t.slice(-4)===".bin"?yme(e,r):mme(e,r)}function vbe(e,t,r){return t.slice(-4)===".bin"?cge(e,r):ege(e,r)}function bbe(e,t,r){return t.slice(-4)===".bin"?J0e(e):Y0e(e)}function wbe(e,t,r,n){return r.slice(-4)===".bin"?Q0e(e,t,r,n):void 0}function _be(e,t,r){return t.slice(-4)===".bin"?V0e(e,t,r):K0e(e,t,r)}function Sbe(e,t,r){return(t.slice(-4)===".bin"?ube:vK)(e)}function Ebe(e,t,r,n,a){return(t.slice(-4)===".bin"?Lve:pK)(e,r,n,a)}function kbe(e,t,r){return(t.slice(-4)===".bin"?w0e:JG)(e,r)}function Nbe(e,t,r){return(t.slice(-4)===".bin"?wme:HG)(e,r)}function Tbe(e,t,r){return(t.slice(-4)===".bin"?uge:rK)(e)}function jbe(e){return(e.slice(-4)===".bin"?G0e:eK)()}var bK=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,wK=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function uo(e,t){var r=e.split(/\s+/),n=[];if(n[0]=r[0],r.length===1)return n;var a=e.match(bK),i,s,l,c;if(a)for(c=0;c!=a.length;++c)i=a[c].match(wK),(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 Abe(e){var t=e.split(/\s+/),r={};if(t.length===1)return r;var n=e.match(bK),a,i,s,l;if(n)for(l=0;l!=n.length;++l)a=n[l].match(wK),(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 V0;function Cbe(e,t){var r=V0[e]||br(e);return r==="General"?Kd(t):Xs(r,t)}function Obe(e,t,r,n){var a=n;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":a=an(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=ln(n);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[br(t)]=a}function Pbe(e,t,r){if(e.t!=="z"){if(!r||r.cellText!==!1)try{e.t==="e"?e.w=e.w||_c[e.v]:t==="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=vg(e.v):e.w=Kd(e.v):e.w=Cbe(t||"General",e.v)}catch(i){if(r.WTF)throw i}try{var n=V0[t]||t||"General";if(r.cellNF&&(e.z=n),r.cellDates&&e.t=="n"&&Kp(n)){var a=wd(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 Rbe(e,t,r){if(r.cellStyles&&t.Interior){var n=t.Interior;n.Pattern&&(n.patternType=Wme[n.Pattern]||n.Pattern)}e[t.ID]=t}function Ibe(e,t,r,n,a,i,s,l,c,u){var d="General",f=n.StyleID,p={};u=u||{};var m=[],x=0;for(f===void 0&&l&&(f=l.StyleID),f===void 0&&s&&(f=s.StyleID);i[f]!==void 0&&(i[f].nf&&(d=i[f].nf),i[f].Interior&&m.push(i[f].Interior),!!i[f].Parent);)f=i[f].Parent;switch(r.Type){case"Boolean":n.t="b",n.v=an(e);break;case"String":n.t="s",n.r=$5(br(e)),n.v=e.indexOf("<")>-1?br(t||e).replace(/<.*?>/g,""):n.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),n.v=(ln(e)-new Date(Date.UTC(1899,11,30)))/(1440*60*1e3),n.v!==n.v?n.v=br(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=mG[e],u.cellText!==!1&&(n.w=e);break;default:e==""&&t==""?n.t="z":(n.t="s",n.v=$5(t||e));break}if(Pbe(n,d,u),u.cellFormula!==!1)if(n.Formula){var y=br(n.Formula);y.charCodeAt(0)==61&&(y=y.slice(1)),n.f=Mh(y,a),delete n.Formula,n.ArrayRange=="RC"?n.F=Mh("RC:RC",a):n.ArrayRange&&(n.F=Mh(n.ArrayRange,a),c.push([wr(n.F),n.F]))}else for(x=0;x<c.length;++x)a.r>=c[x][0].s.r&&a.r<=c[x][0].e.r&&a.c>=c[x][0].s.c&&a.c<=c[x][0].e.c&&(n.F=c[x][1]);u.cellStyles&&(m.forEach(function(v){!p.patternType&&v.patternType&&(p.patternType=v.patternType)}),n.s=p),n.StyleID!==void 0&&(n.ixfe=n.StyleID)}function Fbe(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,` 563`).replace(/\r/g,` 564`),e.v=e.w=e.ixfe=void 0}function H2(e,t){var r=t||{};Yp();var n=O0(MR(e));(r.type=="binary"||r.type=="array"||r.type=="base64")&&(n=Lr(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=cn(r);return s.type="string",Yh.to_workbook(n,s)}if(a.indexOf("<?xml")==-1&&["html","table","head","meta","script","style","div"].forEach(function(we){a.indexOf("<"+we)>=0&&(i=!0)}),i)return b1e(n,r);V0={"General Number":"General","General Date":Ut[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":Ut[15],"Short Date":Ut[14],"Long Time":Ut[19],"Medium Time":Ut[18],"Short Time":Ut[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:Ut[2],Standard:Ut[4],Percent:Ut[10],Scientific:Ut[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var l,c=[],u,d={},f=[],p=r.dense?[]:{},m="",x={},y={},v=uo('<Data ss:Type="String">'),b=0,w=0,S=0,j={s:{r:2e6,c:2e6},e:{r:0,c:0}},k={},E={},T="",O=0,A=[],P={},I={},R=0,M=[],L=[],U={},W=[],V,G=!1,K=[],F=[],ne={},H=0,B=0,X={Sheets:[],WBProps:{date1904:!1}},Y={};_g.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"");for(var ae="";l=_g.exec(n);)switch(l[3]=(ae=l[3]).toLowerCase()){case"data":if(ae=="data"){if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break}if(c[c.length-1][1])break;l[1]==="/"?Ibe(n.slice(b,l.index),T,v,c[c.length-1][0]=="comment"?U:x,{c:w,r:S},k,W[w],y,K,r):(T="",v=uo(l[0]),b=l.index+l[0].length);break;case"cell":if(l[1]==="/")if(L.length>0&&(x.c=L),(!r.sheetRows||r.sheetRows>S)&&x.v!==void 0&&(r.dense?(p[S]||(p[S]=[]),p[S][w]=x):p[wn(w)+Bn(S)]=x),x.HRef&&(x.l={Target:br(x.HRef)},x.HRefScreenTip&&(x.l.Tooltip=x.HRefScreenTip),delete x.HRef,delete x.HRefScreenTip),(x.MergeAcross||x.MergeDown)&&(H=w+(parseInt(x.MergeAcross,10)|0),B=S+(parseInt(x.MergeDown,10)|0),A.push({s:{c:w,r:S},e:{c:H,r:B}})),!r.sheetStubs)x.MergeAcross?w=H+1:++w;else if(x.MergeAcross||x.MergeDown){for(var fe=w;fe<=H;++fe)for(var ue=S;ue<=B;++ue)(fe>w||ue>S)&&(r.dense?(p[ue]||(p[ue]=[]),p[ue][fe]={t:"z"}):p[wn(fe)+Bn(ue)]={t:"z"});w=H+1}else++w;else x=Abe(l[0]),x.Index&&(w=+x.Index-1),w<j.s.c&&(j.s.c=w),w>j.e.c&&(j.e.c=w),l[0].slice(-2)==="/>"&&++w,L=[];break;case"row":l[1]==="/"||l[0].slice(-2)==="/>"?(S<j.s.r&&(j.s.r=S),S>j.e.r&&(j.e.r=S),l[0].slice(-2)==="/>"&&(y=uo(l[0]),y.Index&&(S=+y.Index-1)),w=0,++S):(y=uo(l[0]),y.Index&&(S=+y.Index-1),ne={},(y.AutoFitHeight=="0"||y.Height)&&(ne.hpx=parseInt(y.Height,10),ne.hpt=Tg(ne.hpx),F[S]=ne),y.Hidden=="1"&&(ne.hidden=!0,F[S]=ne));break;case"worksheet":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"));f.push(m),j.s.r<=j.e.r&&j.s.c<=j.e.c&&(p["!ref"]=Zt(j),r.sheetRows&&r.sheetRows<=j.e.r&&(p["!fullref"]=p["!ref"],j.e.r=r.sheetRows-1,p["!ref"]=Zt(j))),A.length&&(p["!merges"]=A),W.length>0&&(p["!cols"]=W),F.length>0&&(p["!rows"]=F),d[m]=p}else j={s:{r:2e6,c:2e6},e:{r:0,c:0}},S=w=0,c.push([l[3],!1]),u=uo(l[0]),m=br(u.Name),p=r.dense?[]:{},A=[],K=[],F=[],Y={name:m,Hidden:0},X.Sheets.push(Y);break;case"table":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else{if(l[0].slice(-2)=="/>")break;c.push([l[3],!1]),W=[],G=!1}break;case"style":l[1]==="/"?Rbe(k,E,r):E=uo(l[0]);break;case"numberformat":E.nf=br(uo(l[0]).Format||"General"),V0[E.nf]&&(E.nf=V0[E.nf]);for(var oe=0;oe!=392&&Ut[oe]!=E.nf;++oe);if(oe==392){for(oe=57;oe!=392;++oe)if(Ut[oe]==null){rc(E.nf,oe);break}}break;case"column":if(c[c.length-1][0]!=="table")break;if(V=uo(l[0]),V.Hidden&&(V.hidden=!0,delete V.Hidden),V.Width&&(V.wpx=parseInt(V.Width,10)),!G&&V.wpx>10){G=!0,Va=YG;for(var Z=0;Z<W.length;++Z)W[Z]&&Eu(W[Z])}G&&Eu(V),W[V.Index-1||W.length]=V;for(var ce=0;ce<+V.Span;++ce)W[W.length]=cn(V);break;case"namedrange":if(l[1]==="/")break;X.Names||(X.Names=[]);var q=qt(l[0]),xe={Name:q.Name,Ref:Mh(q.RefersTo.slice(1),{r:0,c:0})};X.Sheets.length>0&&(xe.Sheet=X.Sheets.length-1),X.Names.push(xe);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]==="/"?T+=n.slice(O,l.index):O=l.index+l[0].length;break;case"interior":if(!r.cellStyles)break;E.Interior=uo(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]==="/"?ihe(P,ae,n.slice(R,l.index)):R=l.index+l[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else c.push([l[3],!1]);break;case"comment":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"));Fbe(U),L.push(U)}else c.push([l[3],!1]),u=uo(l[0]),U={a:u.Author};break;case"autofilter":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/"){var pe=uo(l[0]);p["!autofilter"]={ref:Mh(pe.Range).replace(/\$/g,"")},c.push([l[3],!0])}break;case"name":break;case"datavalidation":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.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((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break;case"null":break;default:if(c.length==0&&l[3]=="document"||c.length==0&&l[3]=="uof")return TL(n,r);var Se=!0;switch(c[c.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:Se=!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:Se=!1}break;case"excelworkbook":switch(l[3]){case"date1904":X.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:Se=!1}break;case"workbookoptions":switch(l[3]){case"owcversion":break;case"height":break;case"width":break;default:Se=!1}break;case"worksheetoptions":switch(l[3]){case"visible":if(l[0].slice(-2)!=="/>")if(l[1]==="/")switch(n.slice(R,l.index)){case"SheetHidden":Y.Hidden=1;break;case"SheetVeryHidden":Y.Hidden=2;break}else R=l.index+l[0].length;break;case"header":p["!margins"]||Hd(p["!margins"]={},"xlml"),isNaN(+qt(l[0]).Margin)||(p["!margins"].header=+qt(l[0]).Margin);break;case"footer":p["!margins"]||Hd(p["!margins"]={},"xlml"),isNaN(+qt(l[0]).Margin)||(p["!margins"].footer=+qt(l[0]).Margin);break;case"pagemargins":var he=qt(l[0]);p["!margins"]||Hd(p["!margins"]={},"xlml"),isNaN(+he.Top)||(p["!margins"].top=+he.Top),isNaN(+he.Left)||(p["!margins"].left=+he.Left),isNaN(+he.Right)||(p["!margins"].right=+he.Right),isNaN(+he.Bottom)||(p["!margins"].bottom=+he.Bottom);break;case"displayrighttoleft":X.Views||(X.Views=[]),X.Views[0]||(X.Views[0]={}),X.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":p["!outline"]||(p["!outline"]={}),p["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":p["!outline"]||(p["!outline"]={}
564),p["!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:Se=!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:Se=!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:Se=!1}break;case"autofilter":switch(l[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:Se=!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:Se=!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:Se=!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:Se=!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:Se=!1}break;case"smarttags":break;default:Se=!1;break}if(Se||l[3].match(/!\[CDATA/))break;if(!c[c.length-1][1])throw"Unrecognized tag: "+l[3]+"|"+c.join("|");if(c[c.length-1][0]==="customdocumentproperties"){if(l[0].slice(-2)==="/>")break;l[1]==="/"?Obe(I,ae,M,n.slice(R,l.index)):(M=l,R=l.index+l[0].length);break}if(r.WTF)throw"Unrecognized tag: "+l[3]+"|"+c.join("|")}var ie={};return!r.bookSheets&&!r.bookProps&&(ie.Sheets=d),ie.SheetNames=f,ie.Workbook=X,ie.SSF=cn(Ut),ie.Props=P,ie.Custprops=I,ie}function EC(e,t){switch(s4(t=t||{}),t.type||"base64"){case"base64":return H2(hs(e),t);case"binary":case"buffer":case"file":return H2(e,t);case"array":return H2(Iu(e),t)}}function Mbe(e,t){var r=[];return e.Props&&r.push(she(e.Props,t)),e.Custprops&&r.push(ohe(e.Props,e.Custprops)),r.join("")}function Dbe(){return""}function Lbe(e,t){var r=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];
vendor: 4,088 bytes, line 564
564return t.cellXfs.forEach(function(n,a){var i=[];i.push(lt("NumberFormat",null,{"ss:Format":Fr(Ut[n.numFmtId])}));var s={"ss:ID":"s"+(21+a)};r.push(lt("Style",i.join(""),s))}),lt("Styles",r.join(""))}function _K(e){return lt("NamedRange",null,{"ss:Name":e.Name,"ss:RefersTo":"="+e4(e.Ref,{r:0,c:0})})}function $be(e){if(!((e||{}).Workbook||{}).Names)return"";for(var t=e.Workbook.Names,r=[],n=0;n<t.length;++n){var a=t[n];a.Sheet==null&&(a.Name.match(/^_xlfn\./)||r.push(_K(a)))}return lt("Names",r.join(""))}function Bbe(e,t,r,n){if(!e||!((n||{}).Workbook||{}).Names)return"";for(var a=n.Workbook.Names,i=[],s=0;s<a.length;++s){var l=a[s];l.Sheet==r&&(l.Name.match(/^_xlfn\./)||i.push(_K(l)))}return i.join("")}function Ube(e,t,r,n){if(!e)return"";var a=[];if(e["!margins"]&&(a.push("<PageSetup>"),e["!margins"].header&&a.push(lt("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&a.push(lt("Footer",null,{"x:Margin":e["!margins"].footer})),a.push(lt("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),a.push("</PageSetup>")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[r])if(n.Workbook.Sheets[r].Hidden)a.push(lt("Visible",n.Workbook.Sheets[r].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var i=0;i<r&&!(n.Workbook.Sheets[i]&&!n.Workbook.Sheets[i].Hidden);++i);i==r&&a.push("<Selected/>")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&a.push("<DisplayRightToLeft/>"),e["!protect"]&&(a.push(Pa("ProtectContents","True")),e["!protect"].objects&&a.push(Pa("ProtectObjects","True")),e["!protect"].scenarios&&a.push(Pa("ProtectScenarios","True")),e["!protect"].selectLockedCells!=null&&!e["!protect"].selectLockedCells?a.push(Pa("EnableSelection","NoSelection")):e["!protect"].selectUnlockedCells!=null&&!e["!protect"].selectUnlockedCells&&a.push(Pa("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(s){e["!protect"][s[0]]&&a.push("<"+s[1]+"/>")})),a.length==0?"":lt("WorksheetOptions",a.join(""),{xmlns:as.x})}function zbe(e){return e.map(function(t){var r=cfe(t.t||""),n=lt("ss:Data",r,{xmlns:"http://www.w3.org/TR/REC-html40"});return lt("Comment",n,{"ss:Author":t.a})}).join("")}function Hbe(e,t,r,n,a,i,s){if(!e||e.v==null&&e.f==null)return"";var l={};if(e.f&&(l["ss:Formula"]="="+Fr(e4(e.f,s))),e.F&&e.F.slice(0,t.length)==t){var c=_n(e.F.slice(t.length+1));l["ss:ArrayRange"]="RC:R"+(c.r==s.r?"":"["+(c.r-s.r)+"]")+"C"+(c.c==s.c?"":"["+(c.c-s.c)+"]")}if(e.l&&e.l.Target&&(l["ss:HRef"]=Fr(e.l.Target),e.l.Tooltip&&(l["x:HRefScreenTip"]=Fr(e.l.Tooltip))),r["!merges"])for(var u=r["!merges"],d=0;d!=u.length;++d)u[d].s.c!=s.c||u[d].s.r!=s.r||(u[d].e.c>u[d].s.c&&(l["ss:MergeAcross"]=u[d].e.c-u[d].s.c),u[d].e.r>u[d].s.r&&(l["ss:MergeDown"]=u[d].e.r-u[d].s.r));var f="",p="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":f="Number",p=String(e.v);break;case"b":f="Boolean",p=e.v?"1":"0";break;case"e":f="Error",p=_c[e.v];break;case"d":f="DateTime",p=new Date(e.v).toISOString(),e.z==null&&(e.z=e.z||Ut[14]);break;case"s":f="String",p=lfe(e.v||"");break}var m=Mu(n.cellXfs,e,n);l["ss:StyleID"]="s"+(21+m),l["ss:Index"]=s.c+1;var x=e.v!=null?p:"",y=e.t=="z"?"":'<Data ss:Type="'+f+'">'+x+"</Data>";return(e.c||[]).length>0&&(y+=zbe(e.c)),lt("Cell",y,l)}function qbe(e,t){var r='<Row ss:Index="'+(e+1)+'"';return t&&(t.hpt&&!t.hpx&&(t.hpx=Xh(t.hpt)),t.hpx&&(r+=' ss:AutoFitHeight="0" ss:Height="'+t.hpx+'"'),t.hidden&&(r+=' ss:Hidden="1"')),r+">"}function Wbe(e,t,r,n){if(!e["!ref"])return"";var a=wr(e["!ref"]),i=e["!merges"]||[],s=0,l=[];e["!cols"]&&e["!cols"].forEach(function(v,b){Eu(v);var w=!!v.width,S=c_(b,v),j={"ss:Index":b+1};
vendor: 11,534 bytes, line 564
564w&&(j["ss:Width"]=kg(S.width)),v.hidden&&(j["ss:Hidden"]="1"),l.push(lt("Column",null,j))});for(var c=Array.isArray(e),u=a.s.r;u<=a.e.r;++u){for(var d=[qbe(u,(e["!rows"]||[])[u])],f=a.s.c;f<=a.e.c;++f){var p=!1;for(s=0;s!=i.length;++s)if(!(i[s].s.c>f)&&!(i[s].s.r>u)&&!(i[s].e.c<f)&&!(i[s].e.r<u)){(i[s].s.c!=f||i[s].s.r!=u)&&(p=!0);break}if(!p){var m={r:u,c:f},x=zt(m),y=c?(e[u]||[])[f]:e[x];d.push(Hbe(y,x,e,t,r,n,m))}}d.push("</Row>"),d.length>2&&l.push(d.join(""))}return l.join("")}function Vbe(e,t,r){var n=[],a=r.SheetNames[e],i=r.Sheets[a],s=i?Bbe(i,t,e,r):"";return s.length>0&&n.push("<Names>"+s+"</Names>"),s=i?Wbe(i,t,e,r):"",s.length>0&&n.push("<Table>"+s+"</Table>"),n.push(Ube(i,t,e,r)),n.join("")}function Gbe(e,t){t||(t={}),e.SSF||(e.SSF=cn(Ut)),e.SSF&&(Yp(),r_(e.SSF),t.revssf=a_(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF,t.cellXfs=[],Mu(t.cellXfs,{},{revssf:{General:0}}));var r=[];r.push(Mbe(e,t)),r.push(Dbe()),r.push(""),r.push("");for(var n=0;n<e.SheetNames.length;++n)r.push(lt("Worksheet",Vbe(n,t,e),{"ss:Name":Fr(e.SheetNames[n])}));return r[2]=Lbe(e,t),r[3]=$be(e),zn+lt("Workbook",r.join(""),{xmlns:as.ss,"xmlns:o":as.o,"xmlns:x":as.x,"xmlns:ss":as.ss,"xmlns:dt":as.dt,"xmlns:html":as.html})}function Kbe(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=$fe(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=Bfe(r),n=r.read_shift(4),n==0||n>40))return t;r.l-=4,t.Reserved2=r.read_shift(0,"lpwstr")}var Ybe=[60,1084,2066,2165,2175];function Xbe(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 c=Kl(r,r.l),u=kC[c],d=0;u!=null&&Ybe.indexOf(c)>-1;)i=Kl(r,r.l+2),d=r.l+4,c==2066?d+=4:(c==2165||c==2175)&&(d+=12),l=r.slice(d,r.l+4+i),s.push(l),r.l+=4+i,u=kC[c=Kl(r,r.l)];var f=wa(s);Oa(f,0);var p=0;f.lens=[];for(var m=0;m<s.length;++m)f.lens.push(p),p+=s[m].length;if(f.length<n)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+f.length+" < "+n;return t.f(f,f.length,a)}function Wo(e,t,r){if(e.t!=="z"&&e.XF){var n=0;try{n=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=Ut[n])}catch(i){if(t.WTF)throw i}if(!t||t.cellText!==!1)try{e.t==="e"?e.w=e.w||_c[e.v]:n===0||n=="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=vg(e.v):e.w=Kd(e.v):e.w=Xs(n,e.v,{date1904:!!r,dateNF:t&&t.dateNF})}catch(i){if(t.WTF)throw i}if(t.cellDates&&n&&e.t=="n"&&Kp(Ut[n]||String(n))){var a=wd(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))}}}function Bv(e,t,r){return{v:e,ixfe:t,t:r}}function Jbe(e,t){var r={opts:{}},n={},a=t.dense?[]:{},i={},s={},l=null,c=[],u="",d={},f,p="",m,x,y,v,b={},w=[],S,j,k=[],E=[],T={Sheets:[],WBProps:{date1904:!1},Views:[{}]},O={},A=function(Ae){return Ae<8?Bd[Ae]:Ae<64&&E[Ae-8]||Bd[Ae]},P=function(Ae,Ke,jt){var Ce=Ke.XF.data;if(!(!Ce||!Ce.patternType||!jt||!jt.cellStyles)){Ke.s={},Ke.s.patternType=Ce.patternType;var xt;(xt=Eg(A(Ce.icvFore)))&&(Ke.s.fgColor={rgb:xt}),(xt=Eg(A(Ce.icvBack)))&&(Ke.s.bgColor={rgb:xt})}},I=function(Ae,Ke,jt){if(!(ne>1)&&!(jt.sheetRows&&Ae.r>=jt.sheetRows)){if(jt.cellStyles&&Ke.XF&&Ke.XF.data&&P(Ae,Ke,jt),delete Ke.ixfe,delete Ke.XF,f=Ae,p=zt(Ae),(!s||!s.s||!s.e)&&(s={s:{r:0,c:0},e:{r:0,c:0}}),Ae.r<s.s.r&&(s.s.r=Ae.r),Ae.c<s.s.c&&(s.s.c=Ae.c),Ae.r+1>s.e.r&&(s.e.r=Ae.r+1),Ae.c+1>s.e.c&&(s.e.c=Ae.c+1),jt.cellFormula&&Ke.f){for(var Ce=0;Ce<w.length;++Ce)if(!(w[Ce][0].s.c>Ae.c||w[Ce][0].s.r>Ae.r)&&!(w[Ce][0].e.c<Ae.c||w[Ce][0].e.r<Ae.r)){Ke.F=Zt(w[Ce][0]),(w[Ce][0].s.c!=Ae.c||w[Ce][0].s.r!=Ae.r)&&delete Ke.f,Ke.f&&(Ke.f=""+Wa(w[Ce][1],s,Ae,K,R));break}}jt.dense?(a[Ae.r]||(a[Ae.r]=[]),a[Ae.r][Ae.c]=Ke):a[p]=Ke}},R={enc:!1,sbcch:0,snames:[],sharedf:b,arrayf:w,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(R.password=t.password);var M,L=[],U=[],W=[],V=[],G=!1,K=[];K.SheetNames=R.snames,K.sharedf=R.sharedf,K.arrayf=R.arrayf,K.names=[],K.XTI=[];var F=0,ne=0,H=0,B=[],X=[],Y;R.codepage=1200,_o(1200);for(var ae=!1;e.l<e.length-1;){var fe=e.l,ue=e.read_shift(2);if(ue===0&&F===10)break;var oe=e.l===e.length?0:e.read_shift(2),Z=kC[ue];if(Z&&Z.f){if(t.bookSheets&&F===133&&ue!==133)break;if(F=ue,Z.r===2||Z.r==12){var ce=e.read_shift(2);if(oe-=2,!R.enc&&ce!==ue&&((ce&255)<<8|ce>>8)!==ue)throw new Error("rt mismatch: "+ce+"!="+ue);Z.r==12&&(e.l+=10,oe-=10)}var q={};if(ue===10?q=Z.f(e,oe,R):q=Xbe(ue,Z,e,oe,R),ne==0&&[9,521,1033,2057].indexOf(F)===-1)continue;switch(ue){case 34:r.opts.Date1904=T.WBProps.date1904=q;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(R.enc||(e.l=0),R.enc=q,!t.password)throw new Error("File is password-protected");if(q.valid==null)throw new Error("Encryption scheme unsupported");if(!q.valid)throw new Error("Password is incorrect");break;case 92:R.lastuser=q;break;case 66:var xe=Number(q);switch(xe){case 21010:xe=1200;break;case 32768:xe=1e4;break;case 32769:xe=1252;break}_o(R.codepage=xe),ae=!0;break;case 317:R.rrtabid=q;break;case 25:R.winlocked=q;break;case 439:r.opts.RefreshAll=q;break;case 12:r.opts.CalcCount=q;break;case 16:r.opts.CalcDelta=q;break;case 17:r.opts.CalcIter=q;break;case 13:r.opts.CalcMode=q;break;case 14:r.opts.CalcPrecision=q;break;case 95:r.opts.CalcSaveRecalc=q;break;case 15:R.CalcRefMode=q;break;case 2211:r.opts.FullCalc=q;break;case 129:q.fDialog&&(a["!type"]="dialog"),q.fBelow||((a["!outline"]||(a["!outline"]={})).above=!0),q.fRight||((a["!outline"]||(a["!outline"]={})).left=!0);break;case 224:k.push(q);break;case 430:K.push([q]),K[K.length-1].XTI=[];break;case 35:case 547:K[K.length-1].push(q);break;case 24:case 536:Y={Name:q.Name,Ref:Wa(q.rgce,s,null,K,R)},q.itab>0&&(Y.Sheet=q.itab-1),K.names.push(Y),K[0]||(K[0]=[],K[0].XTI=[]),K[K.length-1].push(q),q.Name=="_xlnm._FilterDatabase"&&q.itab>0&&q.rgce&&q.rgce[0]&&q.rgce[0][0]&&q.rgce[0][0][0]=="PtgArea3d"&&(X[q.itab-1]={ref:Zt(q.rgce[0][0][1][2])});break;case 22:R.ExternCount=q;break;case 23:K.length==0&&(K[0]=[],K[0].XTI=[]),K[K.length-1].XTI=K[K.length-1].XTI.concat(q),K.XTI=K.XTI.concat(q);break;case 2196:if(R.biff<8)break;Y!=null&&(Y.Comment=q[1]);break;case 18:a["!protect"]=q;break;case 19:q!==0&&R.WTF&&console.error("Password verifier: "+q);break;case 133:i[q.pos]=q,R.snames.push(q.name);break;case 10:{if(--ne)break;if(s.e){if(s.e.r>0&&s.e.c>0){if(s.e.r--,s.e.c--,a["!ref"]=Zt(s),t.sheetRows&&t.sheetRows<=s.e.r){var pe=s.e.r;s.e.r=t.sheetRows-1,a["!fullref"]=a["!ref"],a["!ref"]=Zt(s),s.e.r=pe}s.e.r++,s.e.c++}L.length>0&&(a["!merges"]=L),U.length>0&&(a["!objects"]=U),W.length>0&&(a["!cols"]=W),V.length>0&&(a["!rows"]=V),T.Sheets.push(O)}u===""?d=a:n[u]=a,a=t.dense?[]:{}}break;case 9:case 521:case 1033:case 2057:{if(R.biff===8&&(R.biff={9:2,521:3,1033:4}[ue]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[q.BIFFVer]||8),R.biffguess=q.BIFFVer==0,q.BIFFVer==0&&q.dt==4096&&(R.biff=5,ae=!0,_o(R.codepage=28591)),R.biff==8&&q.BIFFVer==0&&q.dt==16&&(R.biff=2),ne++)break;if(a=t.dense?[]:{},R.biff<8&&!ae&&(ae=!0,_o(R.codepage=t.codepage||1252)),R.biff<5||q.BIFFVer==0&&q.dt==4096){u===""&&(u="Sheet1"),s={s:{r:0,c:0},e:{r:0,c:0}};var Se={pos:e.l-oe,name:u};i[Se.pos]=Se,R.snames.push(u)}else u=(i[fe]||{name:""}).name;q.dt==32&&(a["!type"]="chart"),q.dt==64&&(a["!type"]="macro"),L=[],U=[],R.arrayf=w=[],W=[],V=[],G=!1,O={Hidden:(i[fe]||{hs:0}).hs,name:u}}break;case 515:case 3:case 2:a["!type"]=="chart"&&(t.dense?(a[q.r]||[])[q.c]:a[zt({c:q.c,r:q.r})])&&++q.c,S={ixfe:q.ixfe,XF:k[q.ixfe]||{},v:q.val,t:"n"},H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:q.c,r:q.r},S,t);break;case 5:case 517:S={ixfe:q.ixfe,XF:k[q.ixfe],v:q.val,t:q.t},H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:q.c,r:q.r},S,t);break;case 638:S={ixfe:q.ixfe,XF:k[q.ixfe],v:q.rknum,t:"n"},H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:q.c,r:q.r},S,t);break;case 189:for(var he=q.c;he<=q.C;++he){var ie=q.rkrec[he-q.c][0];S={ixfe:ie,XF:k[ie],v:q.rkrec[he-q.c][1],t:"n"},H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:he,r:q.r},S,t)}break;case 6:case 518:case 1030:{if(q.val=="String"){l=q;break}if(S=Bv(q.val,q.cell.ixfe,q.tt),S.XF=k[S.ixfe],t.cellFormula){var we=q.formula;if(we&&we[0]&&we[0][0]&&we[0][0][0]=="PtgExp"){var ke=we[0][0][1][0],Oe=we[0][0][1][1],Ue=zt({r:ke,c:Oe});b[Ue]?S.f=""+Wa(q.formula,s,q.cell,K,R):S.F=((t.dense?(a[ke]||[])[Oe]:a[Ue])||{}).F}else S.f=""+Wa(q.formula,s,q.cell,K,R)}H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I(q.cell,S,t),l=q}break;case 7:case 519:if(l)l.val=q,S=Bv(q,l.cell.ixfe,"s"),S.XF=k[S.ixfe],t.cellFormula&&(S.f=""+Wa(l.formula,s,l.cell,K,R)),H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I(l.cell,S,t),l=null;else throw new Error("String record expects Formula");break;case 33:case 545:{w.push(q);var Je=zt(q[0].s);if(m=t.dense?(a[q[0].s.r]||[])[q[0].s.c]:a[Je],t.cellFormula&&m){if(!l||!Je||!m)break;m.f=""+Wa(q[1],s,q[0],K,R),m.F=Zt(q[0])}}break;case 1212:{if(!t.cellFormula)break;if(p){if(!l)break;b[zt(l.cell)]=q[0],m=t.dense?(a[l.cell.r]||[])[l.cell.c]:a[zt(l.cell)],(m||{}).f=""+Wa(q[0],s,f,K,R)}}break;case 253:S=Bv(c[q.isst].t,q.ixfe,"s"),c[q.isst].h&&(S.h=c[q.isst].h),S.XF=k[S.ixfe],H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:q.c,r:q.r},S,t);break;case 513:t.sheetStubs&&(S={ixfe:q.ixfe,XF:k[q.ixfe],t:"z"},H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:q.c,r:q.r},S,t));break;case 190:if(t.sheetStubs)for(var Ze=q.c;Ze<=q.C;++Ze){var te=q.ixfe[Ze-q.c];S={ixfe:te,XF:k[te],t:"z"},H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:Ze,r:q.r},S,t)}break;case 214:case 516:case 4:S=Bv(q.val,q.ixfe,"s"),S.XF=k[S.ixfe],H>0&&(S.z=B[S.ixfe>>8&63]),Wo(S,t,r.opts.Date1904),I({c:q.c,r:q.r},S,t);break;case 0:case 512:ne===1&&(s=q);break;case 252:c=q;break;case 1054:if(R.biff==4){B[H++]=q[1];for(var ve=0;ve<H+163&&Ut[ve]!=q[1];++ve);ve>=163&&rc(q[1],H+163)}else rc(q[1],q[0]);break;case 30:{B[H++]=q;for(var J=0;J<H+163&&Ut[J]!=q;++J);J>=163&&rc(q,H+163)}break;case 229:L=L.concat(q);break;case 93:U[q.cmo[0]]=R.lastobj=q;break;case 438:R.lastobj.TxO=q;break;case 127:R.lastobj.ImData=q;break;case 440:for(v=q[0].s.r;v<=q[0].e.r;++v)for(y=q[0].s.c;y<=q[0].e.c;++y)m=t.dense?(a[v]||[])[y]:a[zt({c:y,r:v})],m&&(m.l=q[1]);break;case 2048:for(v=q[0].s.r;v<=q[0].e.r;++v)for(y=q[0].s.c;y<=q[0].e.c;++y)m=t.dense?(a[v]||[])[y]:a[zt({c:y,r:v})],m&&m.l&&(m.l.Tooltip=q[1]);break;case 28:{if(R.biff<=5&&R.biff>=2)break;m=t.dense?(a[q[0].r]||[])[q[0].c]:a[zt(q[0])];var me=U[q[2]];m||(t.dense?(a[q[0].r]||(a[q[0].r]=[]),m=a[q[0].r][q[0].c]={t:"z"}):m=a[zt(q[0])]={t:"z"},s.e.r=Math.max(s.e.r,q[0].r),s.s.r=Math.min(s.s.r,q[0].r),s.e.c=Math.max(s.e.c,q[0].c),s.s.c=Math.min(s.s.c,q[0].c)),m.c||(m.c=[]),x={a:q[1],t:me.TxO.t},m.c.push(x)}break;case 2173:L0e(k[q.ixfe],q.ext);break;case 125:{if(!R.cellStyles)break;for(;q.e>=q.s;)W[q.e--]={width:q.w/256,level:q.level||0,hidden:!!(q.flags&1)},G||(G=!0,JR(q.w/256)),Eu(W[q.e+1])}break;case 520:{var Ee={};q.level!=null&&(V[q.r]=Ee,Ee.level=q.level),q.hidden&&(V[q.r]=Ee,Ee.hidden=!0),q.hpt&&(V[q.r]=Ee,Ee.hpt=q.hpt,Ee.hpx=Xh(q.hpt))}break;case 38:case 39:case 40:case 41:a["!margins"]||Hd(a["!margins"]={}),a["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[ue]]=q;break;case 161:a["!margins"]||Hd(a["!margins"]={}),a["!margins"].header=q.header,a["!margins"].footer=q.footer;break;
564case 574:q.RTL&&(T.Views[0].RTL=!0);break;case 146:E=q;break;case 2198:M=q;break;case 140:j=q;break;case 442:u?O.CodeName=q||O.name:T.WBProps.CodeName=q||"ThisWorkbook";break}}else Z||console.error("Missing Info for XLS Record 0x"+ue.toString(16)),e.l+=oe}return r.SheetNames=Pn(i).sort(function(Me,Ae){return Number(Me)-Number(Ae)}).map(function(Me){return i[Me].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&&X.forEach(function(Me,Ae){r.Sheets[r.SheetNames[Ae]]["!autofilter"]=Me}),r.Strings=c,r.SSF=cn(Ut),R.enc&&(r.Encryption=R.enc),M&&(r.Themes=M),r.Metadata={},j!==void 0&&(r.Metadata.Country=j),K.names.length>0&&(T.Names=K.names),r.Workbook=T,r}var G0={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function Qbe(e,t,r){var n=At.find(e,"/!DocumentSummaryInformation");if(n&&n.size>0)try{var a=nL(n,yC,G0.DSI);for(var i in a)t[i]=a[i]}catch(u){if(r.WTF)throw u}var s=At.find(e,"/!SummaryInformation");if(s&&s.size>0)try{var l=nL(s,vC,G0.SI);for(var c in l)t[c]==null&&(t[c]=l[c])}catch(u){if(r.WTF)throw u}t.HeadingPairs&&t.TitlesOfParts&&(wG(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}function Zbe(e,t){var r=[],n=[],a=[],i=0,s,l=R5(yC,"n"),c=R5(vC,"n");if(e.Props)for(s=Pn(e.Props),i=0;i<s.length;++i)(Object.prototype.hasOwnProperty.call(l,s[i])?r:Object.prototype.hasOwnProperty.call(c,s[i])?n:a).push([s[i],e.Props[s[i]]]);if(e.Custprops)for(s=Pn(e.Custprops),i=0;i<s.length;++i)Object.prototype.hasOwnProperty.call(e.Props||{},s[i])||(Object.prototype.hasOwnProperty.call(l,s[i])?r:Object.prototype.hasOwnProperty.call(c,s[i])?n:a).push([s[i],e.Custprops[s[i]]]);var u=[];for(i=0;i<a.length;++i)jG.indexOf(a[i][0])>-1||bG.indexOf(a[i][0])>-1||a[i][1]!=null&&u.push(a[i]);n.length&&At.utils.cfb_add(t,"/�SummaryInformation",aL(n,G0.SI,c,vC)),(r.length||u.length)&&At.utils.cfb_add(t,"/�DocumentSummaryInformation",aL(r,G0.DSI,l,yC,u.length?u:null,G0.UDI))}function SK(e,t){t||(t={}),s4(t),TR(),t.codepage&&NR(t.codepage);var r,n;if(e.FullPaths){if(At.find(e,"/encryption"))throw new Error("File is password-protected");r=At.find(e,"!CompObj"),n=At.find(e,"/Workbook")||At.find(e,"/Book")}else{switch(t.type){case"base64":e=ls(hs(e));break;case"binary":e=ls(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e));break}Oa(e,0),n={content:e}}var a,i;if(r&&Kbe(r),t.bookProps&&!t.bookSheets)a={};else{var s=lr?"buffer":"array";if(n&&n.content)a=Jbe(n.content,t);else if((i=At.find(e,"PerfectOffice_MAIN"))&&i.content)a=zd.to_workbook(i.content,(t.type=s,t));else if((i=At.find(e,"NativeContent_MAIN"))&&i.content)a=zd.to_workbook(i.content,(t.type=s,t));else throw(i=At.find(e,"MN0"))&&i.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");t.bookVBA&&e.FullPaths&&At.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(a.vbaraw=fge(e))}var l={};return e.FullPaths&&Qbe(e,l,t),a.Props=a.Custprops=l,t.bookFiles&&(a.cfb=e),a}function e1e(e,t){var r=t||{},n=At.utils.cfb_new({root:"R"}),a="/Workbook";switch(r.bookType||"xls"){case"xls":r.bookType="biff8";case"xla":r.bookType||(r.bookType="xla");case"biff8":a="/Workbook",r.biff=8;break;case"biff5":a="/Book",r.biff=5;break;default:throw new Error("invalid type "+r.bookType+" for XLS CFB")}return At.utils.cfb_add(n,a,EK(e,r)),r.biff==8&&(e.Props||e.Custprops)&&Zbe(e,n),r.biff==8&&e.vbaraw&&hge(n,At.read(e.vbaraw,{type:typeof e.vbaraw=="string"?"binary":"buffer"})),n}var jg={0:{f:Eye},1:{f:Pye},2:{f:Jye},3:{f:Bye},4:{f:Mye},5:{f:Kye},6:{f:rve},7:{f:qye},8:{f:cve},9:{f:lve},10:{f:sve},11:{f:ove},12:{f:Iye},13:{f:Zye},14:{f:zye},15:{f:Lye},16:{f:mK},17:{f:ave},18:{f:Vye},19:{f:UR},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:abe},40:{},42:{},43:{f:r0e},44:{f:e0e},45:{f:i0e},46:{f:o0e},47:{f:s0e},48:{},49:{f:Tfe},50:{},51:{f:U0e},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:$G},62:{f:tve},63:{f:X0e},64:{f:kve},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Za,p:0}
vendor: 12,712 bytes, line 564
564,132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:wve},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:Cye},148:{f:Tye,p:16},151:{f:mve},152:{},153:{f:tbe},154:{},155:{},156:{f:Zve},157:{},158:{},159:{T:1,f:xme},160:{T:-1},161:{T:1,f:gf},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:uve},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:$0e},336:{T:-1},337:{f:q0e,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:xC},357:{},358:{},359:{},360:{T:1},361:{},362:{f:LG},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:gve},427:{f:xve},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:vve},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:Aye},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:hve},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:xC},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:oge},633:{T:1},634:{T:-1},635:{T:1,f:ige},636:{T:-1},637:{f:Ofe},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:zve},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:Nve},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:""}},kC={6:{f:U2},10:{f:Xc},12:{f:Kn},13:{f:Kn},14:{f:Dn},15:{f:Dn},16:{f:Ya},17:{f:Dn},18:{f:Dn},19:{f:Kn},20:{f:uL},21:{f:uL},23:{f:LG},24:{f:fL},25:{f:Dn},26:{},27:{},28:{f:Npe},29:{},34:{f:Dn},35:{f:dL},38:{f:Ya},39:{f:Ya},40:{f:Ya},41:{f:Ya},42:{f:Dn},43:{f:Dn},47:{f:Lme},49:{f:Zhe},51:{f:Kn},60:{},61:{f:Khe},64:{f:Dn},65:{f:Qhe},66:{f:Kn},77:{},80:{},81:{},82:{},85:{f:Kn},89:{},90:{},91:{},92:{f:Dhe},93:{f:Ape},94:{},95:{f:Dn},96:{},97:{},99:{f:Dn},125:{f:$G},128:{f:ppe},129:{f:$he},130:{f:Kn},131:{f:Dn},132:{f:Dn},133:{f:Bhe},134:{},140:{f:Dpe},141:{f:Kn},144:{},146:{f:Bpe},151:{},152:{},153:{},154:{},155:{},156:{f:Kn},157:{},158:{},160:{f:Gpe},161:{f:Hpe},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:upe},190:{f:dpe},193:{f:Xc},197:{},198:{},199:{},200:{},201:{},202:{f:Dn},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:Kn},220:{},221:{f:Dn},222:{},224:{f:hpe},225:{f:Mhe},226:{f:Xc},227:{},229:{f:Tpe},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:zhe},253:{f:tpe},255:{f:qhe},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:AG},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:Dn},353:{f:Xc},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:vpe},431:{f:Dn},432:{},433:{},434:{},437:{},438:{f:Ppe},439:{f:Dn},440:{f:Rpe},441:{},442:{f:Ix},443:{},444:{f:Kn},445:{},446:{},448:{f:Xc},449:{f:Ghe,r:2},450:{f:Xc},512:{f:oL},513:{f:Vpe},515:{f:xpe},516:{f:npe},517:{f:cL},519:{f:Kpe},520:{f:Whe},523:{},545:{f:hL},549:{f:sL},566:{},574:{f:Xhe},638:{f:cpe},659:{},1048:{},1054:{f:ipe},1084:{},1212:{f:Spe},2048:{f:Fpe},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:Dv},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:Xc},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:Upe,r:12},2173:{f:D0e,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:Dn,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:_pe,r:12},2197:{},2198:{f:O0e,r:12},2199:{},2200:{},2201:{},2202:{f:Epe,r:12},2203:{f:Xc},2204:{},2205:{},2206:{},2207:{},2211:{f:Vhe},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:Kn},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:qpe},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:$pe},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:oL},1:{},2:{f:Zpe},3:{f:Jpe},4:{f:Xpe},5:{f:cL},7:{f:tme},8:{},9:{f:Dv},11:{},22:{f:Kn},30:{f:ope},31:{},32:{},33:{f:hL},36:{},37:{f:sL},50:{f:rme},62:{},52:{},67:{},68:{f:Kn},69:{},86:{},126:{},127:{f:Ype},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:nme},223:{},234:{},354:{},421:{},518:{f:U2},521:{f:Dv},536:{f:fL},547:{f:dL},561:{},579:{},1030:{f:U2},1033:{f:Dv},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function ct(e,t,r,n){var a=t;if(!isNaN(a)){var i=n||(r||[]).length||0,s=e.next(4);s.write_shift(2,a),s.write_shift(2,i),i>0&&LR(r)&&e.push(r)}}function t1e(e,t,r,n){var a=(r||[]).length||0;if(a<=8224)return ct(e,t,r,a);var i=t;if(!isNaN(i)){for(var s=r.parts||[],l=0,c=0,u=0;u+(s[l]||8224)<=8224;)u+=s[l]||8224,l++;var d=e.next(4);for(d.write_shift(2,i),d.write_shift(2,u),e.push(r.slice(c,c+u)),c+=u;c<a;){for(d=e.next(4),d.write_shift(2,60),u=0;u+(s[l]||8224)<=8224;)u+=s[l]||8224,l++;d.write_shift(2,u),e.push(r.slice(c,c+u)),c+=u}}}function Lx(e,t,r){return e||(e=ze(7)),e.write_shift(2,t),e.write_shift(2,r),e.write_shift(2,0),e.write_shift(1,0),e}function r1e(e,t,r,n){var a=ze(9);return Lx(a,e,t),CG(r,n||"b",a),a}function n1e(e,t,r){var n=ze(8+2*r.length);return Lx(n,e,t),n.write_shift(1,r.length),n.write_shift(r.length,r,"sbcs"),n.l<n.length?n.slice(0,n.l):n}function a1e(e,t,r,n){if(t.v!=null)switch(t.t){case"d":case"n":var a=t.t=="d"?ua(ln(t.v)):t.v;a==(a|0)&&a>=0&&a<65536?ct(e,2,eme(r,n,a)):ct(e,3,Qpe(r,n,a));return;case"b":case"e":ct(e,5,r1e(r,n,t.v,t.t));return;case"s":case"str":ct(e,4,n1e(r,n,(t.v||"").slice(0,255)));return}
vendor: 4,430 bytes, line 564
564ct(e,1,Lx(null,r,n))}function i1e(e,t,r,n){var a=Array.isArray(t),i=wr(t["!ref"]||"A1"),s,l="",c=[];if(i.e.c>255||i.e.r>16383){if(n.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");i.e.c=Math.min(i.e.c,255),i.e.r=Math.min(i.e.c,16383),s=Zt(i)}for(var u=i.s.r;u<=i.e.r;++u){l=Bn(u);for(var d=i.s.c;d<=i.e.c;++d){u===i.s.r&&(c[d]=wn(d)),s=c[d]+l;var f=a?(t[u]||[])[d]:t[s];f&&a1e(e,f,u,d)}}}function s1e(e,t){for(var r=t||{},n=Ui(),a=0,i=0;i<e.SheetNames.length;++i)e.SheetNames[i]==r.sheet&&(a=i);if(a==0&&r.sheet&&e.SheetNames[0]!=r.sheet)throw new Error("Sheet not found: "+r.sheet);return ct(n,r.biff==4?1033:r.biff==3?521:9,KR(e,16,r)),i1e(n,e.Sheets[e.SheetNames[a]],a,r),ct(n,10),n.end()}function o1e(e,t,r){ct(e,49,epe({sz:12,name:"Arial"},r))}function l1e(e,t,r){t&&[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var a=n[0];a<=n[1];++a)t[a]!=null&&ct(e,1054,spe(a,t[a],r))})}function c1e(e,t){var r=ze(19);r.write_shift(4,2151),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,1),r.write_shift(4,0),ct(e,2151,r),r=ze(39),r.write_shift(4,2152),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,0),r.write_shift(4,0),r.write_shift(2,1),r.write_shift(4,4),r.write_shift(2,0),FG(wr(t["!ref"]||"A1"),r),r.write_shift(4,4),ct(e,2152,r)}function u1e(e,t){for(var r=0;r<16;++r)ct(e,224,lL({numFmtId:0,style:!0},0,t));t.cellXfs.forEach(function(n){ct(e,224,lL(n,0,t))})}function d1e(e,t){for(var r=0;r<t["!links"].length;++r){var n=t["!links"][r];ct(e,440,Ipe(n)),n[1].Tooltip&&ct(e,2048,Mpe(n))}delete t["!links"]}function f1e(e,t){if(t){var r=0;t.forEach(function(n,a){++r<=256&&n&&ct(e,125,zpe(c_(a,n),a))})}}function h1e(e,t,r,n,a){var i=16+Mu(a.cellXfs,t,a);if(t.v==null&&!t.bf){ct(e,513,Qd(r,n,i));return}if(t.bf)ct(e,6,$xe(t,r,n,a,i));else switch(t.t){case"d":case"n":var s=t.t=="d"?ua(ln(t.v)):t.v;ct(e,515,ype(r,n,s,i));break;case"b":case"e":ct(e,517,gpe(r,n,t.v,i,a,t.t));break;case"s":case"str":if(a.bookSST){var l=r4(a.Strings,t.v,a.revStrings);ct(e,253,rpe(r,n,l,i))}else ct(e,516,ape(r,n,(t.v||"").slice(0,255),i,a));break;default:ct(e,513,Qd(r,n,i))}}function p1e(e,t,r){var n=Ui(),a=r.SheetNames[e],i=r.Sheets[a]||{},s=(r||{}).Workbook||{},l=(s.Sheets||[])[e]||{},c=Array.isArray(i),u=t.biff==8,d,f="",p=[],m=wr(i["!ref"]||"A1"),x=u?65536:16384;if(m.e.c>255||m.e.r>=x){if(t.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");m.e.c=Math.min(m.e.c,255),m.e.r=Math.min(m.e.c,x-1)}ct(n,2057,KR(r,16,t)),ct(n,13,Bs(1)),ct(n,12,Bs(100)),ct(n,15,di(!0)),ct(n,17,di(!1)),ct(n,16,Xd(.001)),ct(n,95,di(!0)),ct(n,42,di(!1)),ct(n,43,di(!1)),ct(n,130,Bs(1)),ct(n,128,mpe()),ct(n,131,di(!1)),ct(n,132,di(!1)),u&&f1e(n,i["!cols"]),ct(n,512,lpe(m,t)),u&&(i["!links"]=[]);for(var y=m.s.r;y<=m.e.r;++y){f=Bn(y);for(var v=m.s.c;v<=m.e.c;++v){y===m.s.r&&(p[v]=wn(v)),d=p[v]+f;var b=c?(i[y]||[])[v]:i[d];b&&(h1e(n,b,y,v,t),u&&b.l&&i["!links"].push([d,b.l]))}}var w=l.CodeName||l.name||a;return u&&ct(n,574,Jhe((s.Views||[])[0])),u&&(i["!merges"]||[]).length&&ct(n,229,jpe(i["!merges"])),u&&d1e(n,i),ct(n,442,OG(w)),u&&c1e(n,i),ct(n,10),n.end()}function m1e(e,t,r){var n=Ui(),a=(e||{}).Workbook||{},i=a.Sheets||[],s=a.WBProps||{},l=r.biff==8,c=r.biff==5;if(ct(n,2057,KR(e,5,r)),r.bookType=="xla"&&ct(n,135),ct(n,225,l?Bs(1200):null),ct(n,193,ghe(2)),c&&ct(n,191),c&&ct(n,192),ct(n,226),ct(n,92,Lhe("SheetJS",r)),ct(n,66,Bs(l?1200:1252)),l&&ct(n,353,Bs(0)),l&&ct(n,448),ct(n,317,Wpe(e.SheetNames.length)),l&&e.vbaraw&&ct(n,211),l&&e.vbaraw){var u=s.CodeName||"ThisWorkbook";ct(n,442,OG(u))}ct(n,156,Bs(17)),ct(n,25,di(!1)),ct(n,18,di(!1)),ct(n,19,Bs(0)),l&&ct(n,431,di(!1)),l&&ct(n,444,Bs(0)),ct(n,61,Yhe()),ct(n,64,di(!1)),ct(n,141,Bs(0)),ct(n,34,di(Gve(e)=="true")),ct(n,14,di(!0)),l&&ct(n,439,di(!1)),ct(n,218,Bs(0)),o1e(n,e,r),l1e(n,e.SSF,r),u1e(n,r),l&&ct(n,352,di(!1));var d=n.end(),f=Ui();l&&ct(f,140,Lpe()),l&&r.Strings&&t1e(f,252,Hhe(r.Strings)),ct(f,10);var p=f.end(),m=Ui(),x=0,y=0;for(y=0;y<e.SheetNames.length;++y)x+=(l?12:11)+(l?2:1)*e.SheetNames[y].length;var v=d.length+x+p.length;for(y=0;y<e.SheetNames.length;++y){var b=i[y]||{};ct(m,133,Uhe({pos:v,hs:b.Hidden||0,dt:0,name:e.SheetNames[y]},r)),v+=t[y].length}var w=m.end();if(x!=w.length)throw new Error("BS8 "+x+" != "+w.length);var S=[];return d.length&&S.push(d),w.length&&S.push(w),p.length&&S.push(p),wa(S)}function g1e(e,t){var r=t||{},n=[];
vendor: 4,204 bytes, line 564
564e&&!e.SSF&&(e.SSF=cn(Ut)),e&&e.SSF&&(Yp(),r_(e.SSF),r.revssf=a_(e.SSF),r.revssf[e.SSF[65535]]=0,r.ssf=e.SSF),r.Strings=[],r.Strings.Count=0,r.Strings.Unique=0,o4(r),r.cellXfs=[],Mu(r.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var a=0;a<e.SheetNames.length;++a)n[n.length]=p1e(a,r,e);return n.unshift(m1e(e,n,r)),wa(n)}function EK(e,t){for(var r=0;r<=e.SheetNames.length;++r){var n=e.Sheets[e.SheetNames[r]];if(!(!n||!n["!ref"])){var a=qi(n["!ref"]);a.e.c>255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[r]+"' extends beyond column IV (255). Data may be lost.")}}var i=t||{};switch(i.biff||2){case 8:case 5:return g1e(e,t);case 4:case 3:case 2:return s1e(e,t)}throw new Error("invalid type "+i.bookType+" for BIFF")}function SL(e,t){var r=t||{},n=r.dense?[]:{};e=e.replace(/<!--.*?-->/g,"");var a=e.match(/<table/i);if(!a)throw new Error("Invalid HTML: could not find <table>");var i=e.match(/<\/table/i),s=a.index,l=i&&i.index||e.length,c=efe(e.slice(s,l),/(:?<tr[^>]*>)/i,"<tr>"),u=-1,d=0,f=0,p=0,m={s:{r:1e7,c:1e7},e:{r:0,c:0}},x=[];for(s=0;s<c.length;++s){var y=c[s].trim(),v=y.slice(0,3).toLowerCase();if(v=="<tr"){if(++u,r.sheetRows&&r.sheetRows<=u){--u;break}d=0;continue}if(!(v!="<td"&&v!="<th")){var b=y.split(/<\/t[dh]>/i);for(l=0;l<b.length;++l){var w=b[l].trim();if(w.match(/<t[dh]/i)){for(var S=w,j=0;S.charAt(0)=="<"&&(j=S.indexOf(">"))>-1;)S=S.slice(j+1);for(var k=0;k<x.length;++k){var E=x[k];E.s.c==d&&E.s.r<u&&u<=E.e.r&&(d=E.e.c+1,k=-1)}var T=qt(w.slice(0,w.indexOf(">")));p=T.colspan?+T.colspan:1,((f=+T.rowspan)>1||p>1)&&x.push({s:{r:u,c:d},e:{r:u+(f||1)-1,c:d+p-1}});var O=T.t||T["data-t"]||"";if(!S.length){d+=p;continue}if(S=KV(S),m.s.r>u&&(m.s.r=u),m.e.r<u&&(m.e.r=u),m.s.c>d&&(m.s.c=d),m.e.c<d&&(m.e.c=d),!S.length){d+=p;continue}var A={t:"s",v:S};r.raw||!S.trim().length||O=="s"||(S==="TRUE"?A={t:"b",v:!0}:S==="FALSE"?A={t:"b",v:!1}:isNaN(No(S))?isNaN(Kh(S).getDate())||(A={t:"d",v:ln(S)},r.cellDates||(A={t:"n",v:ua(A.v)}),A.z=r.dateNF||Ut[14]):A={t:"n",v:No(S)}),r.dense?(n[u]||(n[u]=[]),n[u][d]=A):n[zt({r:u,c:d})]=A,d+=p}}}}return n["!ref"]=Zt(m),x.length&&(n["!merges"]=x),n}function x1e(e,t,r,n){for(var a=e["!merges"]||[],i=[],s=t.s.c;s<=t.e.c;++s){for(var l=0,c=0,u=0;u<a.length;++u)if(!(a[u].s.r>r||a[u].s.c>s)&&!(a[u].e.r<r||a[u].e.c<s)){if(a[u].s.r<r||a[u].s.c<s){l=-1;break}l=a[u].e.r-a[u].s.r+1,c=a[u].e.c-a[u].s.c+1;break}if(!(l<0)){var d=zt({r,c:s}),f=n.dense?(e[r]||[])[s]:e[d],p=f&&f.v!=null&&(f.h||FR(f.w||(dc(f),f.w)||""))||"",m={};l>1&&(m.rowspan=l),c>1&&(m.colspan=c),n.editable?p='<span contenteditable="true">'+p+"</span>":f&&(m["data-t"]=f&&f.t||"z",f.v!=null&&(m["data-v"]=f.v),f.z!=null&&(m["data-z"]=f.z),f.l&&(f.l.Target||"#").charAt(0)!="#"&&(p='<a href="'+f.l.Target+'">'+p+"</a>")),m.id=(n.id||"sjs")+"-"+d,i.push(lt("td",p,m))}}var x="<tr>";return x+i.join("")+"</tr>"}var y1e='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',v1e="</body></html>";function b1e(e,t){var r=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!r||r.length==0)throw new Error("Invalid HTML: could not find <table>");if(r.length==1)return Fu(SL(r[0],t),t);var n=u4();return r.forEach(function(a,i){d4(n,SL(a,t),"Sheet"+(i+1))}),n}function w1e(e,t,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function kK(e,t){var r=t||{},n=r.header!=null?r.header:y1e,a=r.footer!=null?r.footer:v1e,i=[n],s=qi(e["!ref"]);r.dense=Array.isArray(e),i.push(w1e(e,s,r));for(var l=s.s.r;l<=s.e.r;++l)i.push(x1e(e,s,l,r));return i.push("</table>"+a),i.join("")}function NK(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"?_n(n.origin):n.origin;a=s.r,i=s.c}var l=t.getElementsByTagName("tr"),c=Math.min(n.sheetRows||1e7,l.length),u={s:{r:0,c:0},e:{r:a,c:i}};if(e["!ref"]){var d=qi(e["!ref"]);u.s.r=Math.min(u.s.r,d.s.r),u.s.c=Math.min(u.s.c,d.s.c),u.e.r=Math.max(u.e.r,d.e.r),u.e.c=Math.max(u.e.c,d.e.c),a==-1&&(u.e.r=a=d.e.r+1)}var f=[],p=0,m=e["!rows"]||(e["!rows"]=[]),x=0,y=0,v=0,b=0,w=0,S=0;for(e["!cols"]||(e["!cols"]=[]);x<l.length&&y<c;++x){var j=l[x];if(EL(j)){if(n.display)continue;m[y]={hidden:!0}}
vendor: 9,521 bytes, lines 564-566
564var k=j.children;for(v=b=0;v<k.length;++v){var E=k[v];if(!(n.display&&EL(E))){var T=E.hasAttribute("data-v")?E.getAttribute("data-v"):E.hasAttribute("v")?E.getAttribute("v"):KV(E.innerHTML),O=E.getAttribute("data-z")||E.getAttribute("z");for(p=0;p<f.length;++p){var A=f[p];A.s.c==b+i&&A.s.r<y+a&&y+a<=A.e.r&&(b=A.e.c+1-i,p=-1)}S=+E.getAttribute("colspan")||1,((w=+E.getAttribute("rowspan")||1)>1||S>1)&&f.push({s:{r:y+a,c:b+i},e:{r:y+a+(w||1)-1,c:b+i+(S||1)-1}});var P={t:"s",v:T},I=E.getAttribute("data-t")||E.getAttribute("t")||"";T!=null&&(T.length==0?P.t=I||"z":n.raw||T.trim().length==0||I=="s"||(T==="TRUE"?P={t:"b",v:!0}:T==="FALSE"?P={t:"b",v:!1}:isNaN(No(T))?isNaN(Kh(T).getDate())||(P={t:"d",v:ln(T)},n.cellDates||(P={t:"n",v:ua(P.v)}),P.z=n.dateNF||Ut[14]):P={t:"n",v:No(T)})),P.z===void 0&&O!=null&&(P.z=O);var R="",M=E.getElementsByTagName("A");if(M&&M.length)for(var L=0;L<M.length&&!(M[L].hasAttribute("href")&&(R=M[L].getAttribute("href"),R.charAt(0)!="#"));++L);R&&R.charAt(0)!="#"&&(P.l={Target:R}),n.dense?(e[y+a]||(e[y+a]=[]),e[y+a][b+i]=P):e[zt({c:b+i,r:y+a})]=P,u.e.c<b+i&&(u.e.c=b+i),b+=S}}++y}return f.length&&(e["!merges"]=(e["!merges"]||[]).concat(f)),u.e.r=Math.max(u.e.r,y-1+a),e["!ref"]=Zt(u),y>=c&&(e["!fullref"]=Zt((u.e.r=l.length-x+y-1+a,u))),e}function TK(e,t){var r=t||{},n=r.dense?[]:{};return NK(n,e,t)}function _1e(e,t){return Fu(TK(e,t),t)}function EL(e){var t="",r=S1e(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function S1e(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function E1e(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(n,a){return Array(parseInt(a,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g," ").replace(/<text:line-break\/>/g,` 565`),r=br(t.replace(/<[^>]*>/g,""));return[r]}var kL={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 jK(e,t){var r=t||{},n=MR(e),a=[],i,s,l={name:""},c="",u=0,d,f,p={},m=[],x=r.dense?[]:{},y,v,b={value:""},w="",S=0,j=[],k=-1,E=-1,T={s:{r:1e6,c:1e7},e:{r:0,c:0}},O=0,A={},P=[],I={},R=0,M=0,L=[],U=1,W=1,V=[],G={Names:[]},K={},F=["",""],ne=[],H={},B="",X=0,Y=!1,ae=!1,fe=0;for(_g.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");y=_g.exec(n);)switch(y[3]=y[3].replace(/_.*$/,"")){case"table":case"å·¥ä½è¡¨":y[1]==="/"?(T.e.c>=T.s.c&&T.e.r>=T.s.r?x["!ref"]=Zt(T):x["!ref"]="A1:A1",r.sheetRows>0&&r.sheetRows<=T.e.r&&(x["!fullref"]=x["!ref"],T.e.r=r.sheetRows-1,x["!ref"]=Zt(T)),P.length&&(x["!merges"]=P),L.length&&(x["!rows"]=L),d.name=d.åç§°||d.name,typeof JSON<"u"&&JSON.stringify(d),m.push(d.name),p[d.name]=x,ae=!1):y[0].charAt(y[0].length-2)!=="/"&&(d=qt(y[0],!1),k=E=-1,T.s.r=T.s.c=1e7,T.e.r=T.e.c=0,x=r.dense?[]:{},P=[],L=[],ae=!0);break;case"table-row-group":y[1]==="/"?--O:++O;break;case"table-row":case"è¡":if(y[1]==="/"){k+=U,U=1;break}if(f=qt(y[0],!1),f.è¡å·?k=f.è¡å·-1:k==-1&&(k=0),U=+f["number-rows-repeated"]||1,U<10)for(fe=0;fe<U;++fe)O>0&&(L[k+fe]={level:O});E=-1;break;case"covered-table-cell":y[1]!=="/"&&++E,r.sheetStubs&&(r.dense?(x[k]||(x[k]=[]),x[k][E]={t:"z"}):x[zt({r:k,c:E})]={t:"z"}),w="",j=[];break;case"table-cell":case"æ°æ®":if(y[0].charAt(y[0].length-2)==="/")++E,b=qt(y[0],!1),W=parseInt(b["number-columns-repeated"]||"1",10),v={t:"z",v:null},b.formula&&r.cellFormula!=!1&&(v.f=bL(br(b.formula))),(b.æ°æ®ç±»å||b["value-type"])=="string"&&(v.t="s",v.v=br(b["string-value"]||""),r.dense?(x[k]||(x[k]=[]),x[k][E]=v):x[zt({r:k,c:E})]=v),E+=W-1;else if(y[1]!=="/"){++E,w="",S=0,j=[],W=1;var ue=U?k+U-1:k;if(E>T.e.c&&(T.e.c=E),E<T.s.c&&(T.s.c=E),k<T.s.r&&(T.s.r=k),ue>T.e.r&&(T.e.r=ue),b=qt(y[0],!1),ne=[],H={},v={t:b.æ°æ®ç±»å||b["value-type"],v:null},r.cellFormula)if(b.formula&&(b.formula=br(b.formula)),b["number-matrix-columns-spanned"]&&b["number-matrix-rows-spanned"]&&(R=parseInt(b["number-matrix-rows-spanned"],10)||0,M=parseInt(b["number-matrix-columns-spanned"],10)||0,I={s:{r:k,c:E},e:{r:k+R-1,c:E+M-1}},v.F=Zt(I),V.push([I,v.F])),b.formula)v.f=bL(b.formula);else for(fe=0;fe<V.length;++fe)k>=V[fe][0].s.r&&k<=V[fe][0].e.r&&E>=V[fe][0].s.c&&E<=V[fe][0].e.c&&(v.F=V[fe][1]);switch((b["number-columns-spanned"]||b["number-rows-spanned"])&&(R=parseInt(b["number-rows-spanned"],10)||0,M=parseInt(b["number-columns-spanned"],10)||0,I={s:{r:k,c:E},e:{r:k+R-1,c:E+M-1}},P.push(I)),b["number-columns-repeated"]&&(W=parseInt(b["number-columns-repeated"],10)),v.t){case"boolean":v.t="b",v.v=an(b["boolean-value"]);break;case"float":v.t="n",v.v=parseFloat(b.value);break;case"percentage":v.t="n",v.v=parseFloat(b.value);break;case"currency":v.t="n",v.v=parseFloat(b.value);break;case"date":v.t="d",v.v=ln(b["date-value"]),r.cellDates||(v.t="n",v.v=ua(v.v)),v.z="m/d/yy";break;case"time":v.t="n",v.v=Jde(b["time-value"])/86400,r.cellDates&&(v.t="d",v.v=i_(v.v)),v.z="HH:MM:SS";break;case"number":v.t="n",v.v=parseFloat(b.æ°æ®æ°å¼);break;default:if(v.t==="string"||v.t==="text"||!v.t)v.t="s",b["string-value"]!=null&&(w=br(b["string-value"]),j=[]);else throw new Error("Unsupported value type "+v.t)}}else{if(Y=!1,v.t==="s"&&(v.v=w||"",j.length&&(v.R=j),Y=S==0),K.Target&&(v.l=K),ne.length>0&&(v.c=ne,ne=[]),w&&r.cellText!==!1&&(v.w=w),Y&&(v.t="z",delete v.v),(!Y||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=k))for(var oe=0;oe<U;++oe){if(W=parseInt(b["number-columns-repeated"]||"1",10),r.dense)for(x[k+oe]||(x[k+oe]=[]),x[k+oe][E]=oe==0?v:cn(v);--W>0;)x[k+oe][E+W]=cn(v);else for(x[zt({r:k+oe,c:E})]=v;--W>0;)x[zt({r:k+oe,c:E+W})]=cn(v);T.e.c<=E&&(T.e.c=E)}W=parseInt(b["number-columns-repeated"]||"1",10),E+=W-1,W=0,v={},w="",j=[]}K={};break;case"document":case"document-content":case"çµåè¡¨æ ¼ææ¡£":case"spreadsheet":case"主ä½":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(y[1]==="/"){if((i=a.pop())[0]!==y[3])throw"Bad state: "+i}else y[0].charAt(y[0].length-2)!=="/"&&a.push([y[3],!0]);break;case"annotation":if(y[1]==="/"){if((i=a.pop())[0]!==y[3])throw"Bad state: "+i;H.t=w,j.length&&(H.R=j),H.a=B,ne.push(H)}else y[0].charAt(y[0].length-2)!=="/"&&a.push([y[3],!1]);B="",X=0,w="",S=0,j=[];break;case"creator":y[1]==="/"?B=n.slice(X,y.index):X=y.index+y[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(y[1]==="/"){if((i=a.pop())[0]!==y[3])throw"Bad state: "+i}else y[0].charAt(y[0].length-2)!=="/"&&a.push([y[3],!1]);w="",S=0,j=[];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(y[1]==="/"){if(A[l.name]=c,(i=a.pop())[0]!==y[3])throw"Bad state: "+i}else y[0].charAt(y[0].length-2)!=="/"&&(c="",l=qt(y[0],!1),a.push([y[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=qt(y[0],!1),c+=kL[y[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=qt(y[0],!1),c+=kL[y[3]][s.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(y[0].slice(-2)==="/>")break;if(y[1]==="/")switch(a[a.length-1][0]){case"number-style":case"date-style":case"time-style":c+=n.slice(u,y.index);break}else u=y.index+y[0].length;break;case"named-range":s=qt(y[0],!1),F=z2(s["cell-range-address"]);var Z={Name:s.name,Ref:F[0]+"!"+F[1]};ae&&(Z.Sheet=m.length),G.Names.push(Z);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(y[1]==="/"&&(!b||!b["string-value"])){var ce=E1e(n.slice(S,y.index));w=(w.length>0?w+` 566`:"")+ce[0]}else qt(y[0],!1),S=y.index+y[0].length;break;case"s":break;case"database-range":if(y[1]==="/")break;try{F=z2(qt(y[0])["target-range-address"]),p[F[0]]["!autofilter"]={ref:F[1]}}catch{}break;case"date":break;case"object":break;case"title":case"æ é¢":break;
566case"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(y[1]!=="/"){if(K=qt(y[0],!1),!K.href)break;K.Target=br(K.href),delete K.href,K.Target.charAt(0)=="#"&&K.Target.indexOf(".")>-1?(F=z2(K.Target.slice(1)),K.Target="#"+F[0]+"!"+F[1]):K.Target.match(/^\.\.[\\\/]/)&&(K.Target=K.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(y[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(y)}}var q={Sheets:p,SheetNames:m,Workbook:G};return r.bookSheets&&delete q.Sheets,q}function NL(e,t){t=t||{},Ls(e,"META-INF/manifest.xml")&&Jfe(Gn(e,"META-INF/manifest.xml"),t);var r=cs(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var n=jK(Lr(r),t);return Ls(e,"meta.xml")&&(n.Props=yG(Gn(e,"meta.xml"))),n}function TL(e,t){return jK(e,t)}var k1e=(function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),t="<office:document-styles "+wg({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function(){return zn+t}})(),jL=(function(){var e=function(i){return Fr(i).replace(/ +/g,function(s){return'<text:s text:c="'+s.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},t=` <table:table-cell /> 567`,r=` <table:covered-table-cell/> 568`,n=function(i,s,l){var c=[];c.push(' <table:table table:name="'+Fr(s.SheetNames[l])+`" table:style-name="ta1"> 569`);var u=0,d=0,f=qi(i["!ref"]||"A1"),p=i["!merges"]||[],m=0,x=Array.isArray(i);if(i["!cols"])for(d=0;d<=f.e.c;++d)c.push(" <table:table-column"+(i["!cols"][d]?' table:style-name="co'+i["!cols"][d].ods+'"':"")+`></table:table-column> 570`);var y="",v=i["!rows"]||[];for(u=0;
vendor: 7,116 bytes, lines 570-600
570u<f.s.r;++u)y=v[u]?' table:style-name="ro'+v[u].ods+'"':"",c.push(" <table:table-row"+y+`></table:table-row> 571`);for(;u<=f.e.r;++u){for(y=v[u]?' table:style-name="ro'+v[u].ods+'"':"",c.push(" <table:table-row"+y+`> 572`),d=0;d<f.s.c;++d)c.push(t);for(;d<=f.e.c;++d){var b=!1,w={},S="";for(m=0;m!=p.length;++m)if(!(p[m].s.c>d)&&!(p[m].s.r>u)&&!(p[m].e.c<d)&&!(p[m].e.r<u)){(p[m].s.c!=d||p[m].s.r!=u)&&(b=!0),w["table:number-columns-spanned"]=p[m].e.c-p[m].s.c+1,w["table:number-rows-spanned"]=p[m].e.r-p[m].s.r+1;break}if(b){c.push(r);continue}var j=zt({r:u,c:d}),k=x?(i[u]||[])[d]:i[j];if(k&&k.f&&(w["table:formula"]=Fr(Wxe(k.f)),k.F&&k.F.slice(0,j.length)==j)){var E=qi(k.F);w["table:number-matrix-columns-spanned"]=E.e.c-E.s.c+1,w["table:number-matrix-rows-spanned"]=E.e.r-E.s.r+1}if(!k){c.push(t);continue}switch(k.t){case"b":S=k.v?"TRUE":"FALSE",w["office:value-type"]="boolean",w["office:boolean-value"]=k.v?"true":"false";break;case"n":S=k.w||String(k.v||0),w["office:value-type"]="float",w["office:value"]=k.v||0;break;case"s":case"str":S=k.v==null?"":k.v,w["office:value-type"]="string";break;case"d":S=k.w||ln(k.v).toISOString(),w["office:value-type"]="date",w["office:date-value"]=ln(k.v).toISOString(),w["table:style-name"]="ce1";break;default:c.push(t);continue}var T=e(S);if(k.l&&k.l.Target){var O=k.l.Target;O=O.charAt(0)=="#"?"#"+Vxe(O.slice(1)):O,O.charAt(0)!="#"&&!O.match(/^\w+:/)&&(O="../"+O),T=lt("text:a",T,{"xlink:href":O.replace(/&/g,"&")})}c.push(" "+lt("table:table-cell",lt("text:p",T,{}),w)+` 573`)}c.push(` </table:table-row> 574`)}return c.push(` </table:table> 575`),c.join("")},a=function(i,s){i.push(` <office:automatic-styles> 576`),i.push(` <number:date-style style:name="N37" number:automatic-order="true"> 577`),i.push(` <number:month number:style="long"/> 578`),i.push(` <number:text>/</number:text> 579`),i.push(` <number:day number:style="long"/> 580`),i.push(` <number:text>/</number:text> 581`),i.push(` <number:year/> 582`),i.push(` </number:date-style> 583`);var l=0;s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u&&u["!cols"]){for(var d=0;d<u["!cols"].length;++d)if(u["!cols"][d]){var f=u["!cols"][d];if(f.width==null&&f.wpx==null&&f.wch==null)continue;Eu(f),f.ods=l;var p=u["!cols"][d].wpx+"px";i.push(' <style:style style:name="co'+l+`" style:family="table-column"> 584`),i.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+p+`"/> 585`),i.push(` </style:style> 586`),++l}}});var c=0;s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u&&u["!rows"]){for(var d=0;d<u["!rows"].length;++d)if(u["!rows"][d]){u["!rows"][d].ods=c;var f=u["!rows"][d].hpx+"px";i.push(' <style:style style:name="ro'+c+`" style:family="table-row"> 587`),i.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+f+`"/> 588`),i.push(` </style:style> 589`),++c}}}),i.push(` <style:style style:name="ta1" style:family="table" style:master-page-name="mp1"> 590`),i.push(` <style:table-properties table:display="true" style:writing-mode="lr-tb"/> 591`),i.push(` </style:style> 592`),i.push(` <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/> 593`),i.push(` </office:automatic-styles> 594`)};return function(s,l){var c=[zn],u=wg({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),d=wg({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});l.bookType=="fods"?(c.push("<office:document"+u+d+`> 595`),c.push(xG().replace(/office:document-meta/g,"office:meta"))):c.push("<office:document-content"+u+`> 596`),a(c,s),c.push(` <office:body> 597`),c.push(` <office:spreadsheet> 598`);for(var f=0;f!=s.SheetNames.length;++f)c.push(n(s.Sheets[s.SheetNames[f]],s,f));return c.push(` </office:spreadsheet> 599`),c.push(` </office:body> 600`),l.bookType=="fods"?c.push("</office:document>"):c.push("</office:document-content>"),c.join("")}})();function AK(e,t){if(t.bookType=="fods")return jL(e,t);var r=PR(),n="",a=[],i=[];return n="mimetype",nr(r,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",nr(r,n,jL(e,t)),a.push([n,"text/xml"]),i.push([n,"ContentFile"]),n="styles.xml",nr(r,n,k1e(e,t)),a.push([n,"text/xml"]),i.push([n,"StylesFile"]),n="meta.xml",nr(r,n,zn+xG()),a.push([n,"text/xml"]),i.push([n,"MetadataFile"]),n="manifest.rdf",nr(r,n,ehe(i)),a.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",nr(r,n,Qfe(a)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function Zd(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function NC(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):Lr(Iu(e))}function N1e(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):ls(sl(e))}function T1e(e,t){e:for(var r=0;r<=e.length-t.length;++r){for(var n=0;n<t.length;++n)if(e[r+n]!=t[n])continue e;return!0}return!1}function Nu(e){var t=e.reduce(function(a,i){return a+i.length}
vendor: 9,361 bytes, line 600
600,0),r=new Uint8Array(t),n=0;return e.forEach(function(a){r.set(a,n),n+=a.length}),r}function AL(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function j1e(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 A1e(e,t,r){var n=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,a=r/Math.pow(10,n-6176);e[t+15]|=n>>7,e[t+14]|=(n&127)<<1;for(var i=0;a>=1;++i,a/=256)e[t+i]=a&255;e[t+15]|=r>=0?0:128}function Ag(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 Pr(e){var t=new Uint8Array(7);t[0]=e&127;var r=1;e:if(e>127){if(t[r-1]|=128,t[r]=e>>7&127,++r,e<=16383||(t[r-1]|=128,t[r]=e>>14&127,++r,e<=2097151)||(t[r-1]|=128,t[r]=e>>21&127,++r,e<=268435455)||(t[r-1]|=128,t[r]=e/256>>>21&127,++r,e<=34359738367)||(t[r-1]|=128,t[r]=e/65536>>>21&127,++r,e<=4398046511103))break e;t[r-1]|=128,t[r]=e/16777216>>>21&127,++r}return t.slice(0,r)}function Cn(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 Er(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],a=Ag(e,r),i=a&7;a=Math.floor(a/8);var s=0,l;if(a==0)break;switch(i){case 0:{for(var c=r[0];e[r[0]++]>=128;);l=e.slice(c,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=Ag(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 u={data:l,type:i};t[a]==null?t[a]=[u]:t[a].push(u)}return t}function Aa(e){var t=[];return e.forEach(function(r,n){r.forEach(function(a){a.data&&(t.push(Pr(n*8+a.type)),a.type==2&&t.push(Pr(a.data.length)),t.push(a.data))})}),Nu(t)}function i4(e,t){return(e==null?void 0:e.map(function(r){return t(r.data)}))||[]}function Rs(e){for(var t,r=[],n=[0];n[0]<e.length;){var a=Ag(e,n),i=Er(e.slice(n[0],n[0]+a));n[0]+=a;var s={id:Cn(i[1][0].data),messages:[]};i[2].forEach(function(l){var c=Er(l.data),u=Cn(c[3][0].data);s.messages.push({meta:c,data:e.slice(n[0],n[0]+u)}),n[0]+=u}),(t=i[3])!=null&&t[0]&&(s.merge=Cn(i[3][0].data)>>>0>0),r.push(s)}return r}function Zf(e){var t=[];return e.forEach(function(r){var n=[];n[1]=[{data:Pr(r.id),type:0}],n[2]=[],r.merge!=null&&(n[3]=[{data:Pr(+!!r.merge),type:0}]);var a=[];r.messages.forEach(function(s){a.push(s.data),s.meta[3]=[{type:0,data:Pr(s.data.length)}],n[2].push({data:Aa(s.meta),type:2})});var i=Aa(n);t.push(Pr(i.length)),t.push(i),a.forEach(function(s){return t.push(s)})}),Nu(t)}function C1e(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=Ag(t,r),a=[];r[0]<t.length;){var i=t[r[0]]&3;if(i==0){var s=t[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 c=0,u=0;if(i==1?(u=(t[r[0]]>>2&7)+4,c=(t[r[0]++]&224)<<3,c|=t[r[0]++]):(u=(t[r[0]++]>>2)+1,i==2?(c=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(c=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),a=[Nu(a)],c==0)throw new Error("Invalid offset 0");if(c>a[0].length)throw new Error("Invalid offset beyond length");if(u>=c)for(a.push(a[0].slice(-c)),u-=c;u>=a[a.length-1].length;)a.push(a[a.length-1]),u-=a[a.length-1].length;a.push(a[0].slice(-c,-c+u))}}var d=Nu(a);if(d.length!=n)throw new Error("Unexpected length: ".concat(d.length," != ").concat(n));return d}function Is(e){for(var t=[],r=0;r<e.length;){var n=e[r++],a=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(C1e(n,e.slice(r,r+a))),r+=a}if(r!==e.length)throw new Error("data is not a valid framed stream!");return Nu(t)}function eh(e){for(var t=[],r=0;r<e.length;){var n=Math.min(e.length-r,268435455),a=new Uint8Array(4);t.push(a);var i=Pr(n),s=i.length;t.push(i),n<=60?(s++,t.push(new Uint8Array([n-1<<2]))):n<=256?(s+=2,t.push(new Uint8Array([240,n-1&255]))):n<=65536?(s+=3,t.push(new Uint8Array([244,n-1&255,n-1>>8&255]))):n<=16777216?(s+=4,t.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(s+=5,t.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),t.push(e.slice(r,r+n)),s+=n,a[0]=0,a[1]=s&255,a[2]=s>>8&255,a[3]=s>>16&255,r+=n}return Nu(t)}function O1e(e,t,r,n){var a=Zd(e),i=a.getUint32(4,!0),s=(n>1?12:8)+AL(i&(n>1?3470:398))*4,l=-1,c=-1,u=NaN,d=new Date(2001,0,1);i&512&&(l=a.getUint32(s,!0),s+=4),s+=AL(i&(n>1?12288:4096))*4,i&16&&(c=a.getUint32(s,!0),s+=4),i&32&&(u=a.getFloat64(s,!0),s+=8),i&64&&(d.setTime(d.getTime()+a.getFloat64(s,!0)*1e3),s+=8);var f;switch(e[2]){case 0:break;case 2:f={t:"n",v:u};break;case 3:f={t:"s",v:t[c]};break;case 5:f={t:"d",v:d};break;case 6:f={t:"b",v:u>0};break;case 7:f={t:"n",v:u/86400};break;case 8:f={t:"e",v:0};break;case 9:if(l>-1)f={t:"s",v:r[l]};else if(c>-1)f={t:"s",v:t[c]};else if(!isNaN(u))f={t:"n",v:u};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 f}function P1e(e,t,r){var n=Zd(e),a=n.getUint32(8,!0),i=12,s=-1,l=-1,c=NaN,u=NaN,d=new Date(2001,0,1);a&1&&(c=j1e(e,i),i+=16),a&2&&(u=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 f;switch(e[1]){case 0:break;case 2:f={t:"n",v:c};break;case 3:f={t:"s",v:t[l]};break;case 5:f={t:"d",v:d};break;case 6:f={t:"b",v:u>0};break;case 7:f={t:"n",v:u/86400};break;case 8:f={t:"e",v:0};break;case 9:if(s>-1)f={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:f={t:"n",v:c};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(a&31," : ").concat(e.slice(0,4)))}return f}function q2(e,t){var r=new Uint8Array(32),n=Zd(r),a=12,i=0;switch(r[0]=5,e.t){case"n":r[1]=2,A1e(r,a,e.v),i|=1,a+=16;break;case"b":r[1]=6,n.setFloat64(a,e.v?1:0,!0),i|=2,a+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[1]=3,n.setUint32(a,t.indexOf(e.v),!0),i|=8,a+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(8,i,!0),r.slice(0,a)}function W2(e,t){var r=new Uint8Array(32),n=Zd(r),a=12,i=0;switch(r[0]=3,e.t){case"n":r[2]=2,n.setFloat64(a,e.v,!0),i|=32,a+=8;break;case"b":r[2]=6,n.setFloat64(a,e.v?1:0,!0),i|=32,a+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[2]=3,n.setUint32(a,t.indexOf(e.v),!0),i|=16,a+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(4,i,!0),r.slice(0,a)}function R1e(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return O1e(e,t,r,e[0]);case 5:return P1e(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function za(e){var t=Er(e);return Ag(t[1][0].data)}function CL(e,t){var r=Er(t.data),n=Cn(r[1][0].data),a=r[3],i=[];return(a||[]).forEach(function(s){var l=Er(s.data),c=Cn(l[1][0].data)>>>0;switch(n){case 1:i[c]=NC(l[3][0].data);break;case 8:{var u=e[za(l[9][0].data)][0],d=Er(u.data),f=e[za(d[1][0].data)][0],p=Cn(f.meta[1][0].data);if(p!=2001)throw new Error("2000 unexpected reference to ".concat(p));var m=Er(f.data);i[c]=m[3].map(function(x){return NC(x.data)}).join("")}break}}),i}function I1e(e,t){var r,n,a,i,s,l,c,u,d,f,p,m,x,y,v=Er(e),b=Cn(v[1][0].data)>>>0,w=Cn(v[2][0].data)>>>0,S=((n=(r=v[8])==null?void 0:r[0])==null?void 0:n.data)&&Cn(v[8][0].data)>0||!1,j,k;if((i=(a=v[7])==null?void 0:a[0])!=null&&i.data&&t!=0)j=(l=(s=v[7])==null?void 0:s[0])==null?void 0:l.data,k=(u=(c=v[6])==null?void 0:c[0])==null?void 0:u.data;else if((f=(d=v[4])==null?void 0:d[0])!=null&&f.data&&t!=1)j=(m=(p=v[4])==null?void 0:p[0])==null?void 0:m.data,k=(y=(x=v[3])==null?void 0:x[0])==null?void 0:y.data;else throw"NUMBERS Tile missing ".concat(t," cell storage");for(var E=S?4:1,T=Zd(j),O=[],A=0;A<j.length/2;++A){var P=T.getUint16(A*2,!0);P<65535&&O.push([A,P])}if(O.length!=w)throw"Expected ".concat(w," cells, found ").concat(O.length);var I=[];for(A=0;A<O.length-1;++A)I[O[A][0]]=k.subarray(O[A][1]*E,O[A+1][1]*E);return O.length>=1&&(I[O[O.length-1][0]]=k.subarray(O[O.length-1][1]*E)),{R:b,cells:I}}function F1e(e,t){var r,n=Er(t.data),a=(r=n==null?void 0:n[7])!=null&&r[0]?Cn(n[7][0].data)>>>0>0?1:0:-1,i=i4(n[5],function(s){return I1e(s,a)});return{nrows:Cn(n[4][0].data)>>>0,data:i.reduce(function(s,l){return s[l.R]||(s[l.R]=[]),l.cells.forEach(function(c,u){if(s[l.R][u])throw new Error("Duplicate cell r=".concat(l.R," c=").concat(u));s[l.R][u]=c}),s},[])}}function M1e(e,t,r){var n,a=Er(t.data),i={s:{r:0,c:0},e:{r:0,c:0}};if(i.e.r=(Cn(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=(Cn(a[7][0].data)>>>0)-1,i.e.c<0)throw new Error("Invalid col varint ".concat(a[7][0].data));r["!ref"]=Zt(i);var s=Er(a[4][0].data),l=CL(e,e[za(s[4][0].data)][0]),c=(n=s[17])!=null&&n[0]?CL(e,e[za(s[17][0].data)][0]):[],u=Er(s[3][0].data),d=0;
600u[1].forEach(function(f){var p=Er(f.data),m=e[za(p[2][0].data)][0],x=Cn(m.meta[1][0].data);if(x!=6002)throw new Error("6001 unexpected reference to ".concat(x));var y=F1e(e,m);y.data.forEach(function(v,b){v.forEach(function(w,S){var j=zt({r:d+b,c:S}),k=R1e(w,l,c);k&&(r[j]=k)})}),d+=y.nrows})}function D1e(e,t){var r=Er(t.data),n={"!ref":"A1"},a=e[za(r[2][0].data)],i=Cn(a[0].meta[1][0].data);if(i!=6001)throw new Error("6000 unexpected reference to ".concat(i));return M1e(e,a[0],n),n}function L1e(e,t){var r,n=Er(t.data),a={name:(r=n[1])!=null&&r[0]?NC(n[1][0].data):"",sheets:[]},i=i4(n[2],za);return i.forEach(function(s){e[s].forEach(function(l){var c=Cn(l.meta[1][0].data);c==6e3&&a.sheets.push(D1e(e,l))})}),a}function $1e(e,t){var r=u4(),n=Er(t.data),a=i4(n[1],za);if(a.forEach(function(i){e[i].forEach(function(s){var l=Cn(s.meta[1][0].data);if(l==2){var c=L1e(e,s);c.sheets.forEach(function(u,d){d4(r,u,d==0?c.name:c.name+"_"+d,!0)})}})}),r.SheetNames.length==0)throw new Error("Empty NUMBERS file");return r}function V2(e){var t,r,n,a,i={},s=[];if(e.FullPaths.forEach(function(c){if(c.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(c){if(c.name.match(/\.iwa$/)){var u;try{u=Is(c.content)}catch(f){return console.log("?? "+c.content.length+" "+(f.message||f))}var d;try{d=Rs(u)}catch(f){return console.log("## "+(f.message||f))}d.forEach(function(f){i[f.id]=f.messages,s.push(f.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)&&Cn(i[1][0].meta[1][0].data)==1&&i[1][0];
vendor: 1,165 bytes, line 600
600if(l||s.forEach(function(c){i[c].forEach(function(u){var d=Cn(u.meta[1][0].data)>>>0;if(d==1)if(!l)l=u;else throw new Error("Document has multiple roots")})}),!l)throw new Error("Cannot find Document root");return $1e(i,l)}function B1e(e,t,r){var n,a,i,s;if(!((n=e[6])!=null&&n[0])||!((a=e[7])!=null&&a[0]))throw"Mutation only works on post-BNC storages!";var l=((s=(i=e[8])==null?void 0:i[0])==null?void 0:s.data)&&Cn(e[8][0].data)>0||!1;if(l)throw"Math only works with normal offsets";for(var c=0,u=Zd(e[7][0].data),d=0,f=[],p=Zd(e[4][0].data),m=0,x=[],y=0;y<t.length;++y){if(t[y]==null){u.setUint16(y*2,65535,!0),p.setUint16(y*2,65535);continue}u.setUint16(y*2,d,!0),p.setUint16(y*2,m,!0);var v,b;switch(typeof t[y]){case"string":v=q2({t:"s",v:t[y]},r),b=W2({t:"s",v:t[y]},r);break;case"number":v=q2({t:"n",v:t[y]},r),b=W2({t:"n",v:t[y]},r);break;case"boolean":v=q2({t:"b",v:t[y]},r),b=W2({t:"b",v:t[y]},r);break;default:throw new Error("Unsupported value "+t[y])}f.push(v),d+=v.length,x.push(b),m+=b.length,++c}for(e[2][0].data=Pr(c);y<e[7][0].data.length/2;++y)u.setUint16(y*2,65535,!0),p.setUint16(y*2,65535,!0);return e[6][0].data=Nu(f),e[3][0].data=Nu(x),c}
600function U1e(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var n=qi(r["!ref"]);n.s.r=n.s.c=0;var a=!1;n.e.c>9&&(a=!0,n.e.c=9),n.e.r>49&&(a=!0,n.e.r=49),a&&console.error("The Numbers writer is currently limited to ".concat(Zt(n)));var i=p1(r,{range:n,header:1}),s=["~Sh33tJ5~"];i.forEach(function(B){return B.forEach(function(X){typeof X=="string"&&s.push(X)})});var l={},c=[],u=At.read(t.numbers,{type:"base64"});u.FileIndex.map(function(B,X){return[B,u.FullPaths[X]]}).forEach(function(B){var X=B[0],Y=B[1];if(X.type==2&&X.name.match(/\.iwa/)){var ae=X.content,fe=Is(ae),ue=Rs(fe);ue.forEach(function(oe){c.push(oe.id),l[oe.id]={deps:[],location:Y,type:Cn(oe.messages[0].meta[1][0].data)}})}}),c.sort(function(B,X){return B-X});var d=c.filter(function(B){return B>1}).map(function(B){return[B,Pr(B)]});u.FileIndex.map(function(B,X){return[B,u.FullPaths[X]]}).forEach(function(B){var X=B[0];if(B[1],!!X.name.match(/\.iwa/)){var Y=Rs(Is(X.content));Y.forEach(function(ae){ae.messages.forEach(function(fe){d.forEach(function(ue){ae.messages.some(function(oe){return Cn(oe.meta[1][0].data)!=11006&&T1e(oe.data,ue[1])})&&l[ue[0]].deps.push(ae.id)})})})}});for(var f=At.find(u,l[1].location),p=Rs(Is(f.content)),m,x=0;x<p.length;++x){var y=p[x];y.id==1&&(m=y)}var v=za(Er(m.messages[0].data)[1][0].data);for(f=At.find(u,l[v].location),p=Rs(Is(f.content)),x=0;x<p.length;++x)y=p[x],y.id==v&&(m=y);for(v=za(Er(m.messages[0].data)[2][0].data),f=At.find(u,l[v].location),p=Rs(Is(f.content)),x=0;x<p.length;++x)y=p[x],y.id==v&&(m=y);for(v=za(Er(m.messages[0].data)[2][0].data),f=At.find(u,l[v].location),p=Rs(Is(f.content)),x=0;x<p.length;++x)y=p[x],y.id==v&&(m=y);var b=Er(m.messages[0].data);{b[6][0].data=Pr(n.e.r+1),b[7][0].data=Pr(n.e.c+1);var w=za(b[46][0].data),S=At.find(u,l[w].location),j=Rs(Is(S.content));{for(var k=0;k<j.length&&j[k].id!=w;++k);if(j[k].id!=w)throw"Bad ColumnRowUIDMapArchive";var E=Er(j[k].messages[0].data);E[1]=[],E[2]=[],E[3]=[];for(var T=0;T<=n.e.c;++T){var O=[];O[1]=O[2]=[{type:0,data:Pr(T+420690)}],E[1].push({type:2,data:Aa(O)}
600),E[2].push({type:0,data:Pr(T)}),E[3].push({type:0,data:Pr(T)})}E[4]=[],E[5]=[],E[6]=[];for(var A=0;A<=n.e.r;++A)O=[],O[1]=O[2]=[{type:0,data:Pr(A+726270)}],E[4].push({type:2,data:Aa(O)}),E[5].push({type:0,data:Pr(A)}),E[6].push({type:0,data:Pr(A)});j[k].messages[0].data=Aa(E)}S.content=eh(Zf(j)),S.size=S.content.length,delete b[46];var P=Er(b[4][0].data);{P[7][0].data=Pr(n.e.r+1);var I=Er(P[1][0].data),R=za(I[2][0].data);S=At.find(u,l[R].location),j=Rs(Is(S.content));{if(j[0].id!=R)throw"Bad HeaderStorageBucket";var M=Er(j[0].messages[0].data);for(A=0;A<i.length;++A){var L=Er(M[2][0].data);L[1][0].data=Pr(A),L[4][0].data=Pr(i[A].length),M[2][A]={type:M[2][0].type,data:Aa(L)}}j[0].messages[0].data=Aa(M)}S.content=eh(Zf(j)),S.size=S.content.length;var U=za(P[2][0].data);S=At.find(u,l[U].location),j=Rs(Is(S.content));{if(j[0].id!=U)throw"Bad HeaderStorageBucket";for(M=Er(j[0].messages[0].data),T=0;T<=n.e.c;++T)L=Er(M[2][0].data),L[1][0].data=Pr(T),L[4][0].data=Pr(n.e.r+1),M[2][T]={type:M[2][0].type,data:Aa(L)};j[0].messages[0].data=Aa(M)}S.content=eh(Zf(j)),S.size=S.content.length;var W=za(P[4][0].data);(function(){for(var B=At.find(u,l[W].location),X=Rs(Is(B.content)),Y,ae=0;ae<X.length;++ae){var fe=X[ae];fe.id==W&&(Y=fe)}var ue=Er(Y.messages[0].data);{ue[3]=[];var oe=[];s.forEach(function(q,xe){oe[1]=[{type:0,data:Pr(xe)}],oe[2]=[{type:0,data:Pr(1)}],oe[3]=[{type:2,data:N1e(q)}],ue[3].push({type:2,data:Aa(oe)})})}Y.messages[0].data=Aa(ue);var Z=Zf(X),ce=eh(Z);B.content=ce,B.size=B.content.length})();var V=Er(P[3][0].data);{var G=V[1][0];delete V[2];var K=Er(G.data);{var F=za(K[2][0].data);(function(){for(var B=At.find(u,l[F].location),X=Rs(Is(B.content)),Y,ae=0;ae<X.length;++ae){var fe=X[ae];fe.id==F&&(Y=fe)}var ue=Er(Y.messages[0].data);{delete ue[6],delete V[7];var oe=new Uint8Array(ue[5][0].data);ue[5]=[];for(var Z=0,ce=0;ce<=n.e.r;++ce){var q=Er(oe);Z+=B1e(q,i[ce],s),q[1][0].data=Pr(ce),ue[5].push({data:Aa(q),type:2})}ue[1]=[{type:0,data:Pr(n.e.c+1)}],ue[2]=[{type:0,data:Pr(n.e.r+1)}],ue[3]=[{type:0,data:Pr(Z)}],ue[4]=[{type:0,data:Pr(n.e.r+1)}]}Y.messages[0].data=Aa(ue);var xe=Zf(X),pe=eh(xe);B.content=pe,B.size=B.content.length})()}G.data=Aa(K)}P[3][0].data=Aa(V)}b[4][0].data=Aa(P)}m.messages[0].data=Aa(b);var ne=Zf(p),H=eh(ne);return f.content=H,f.size=f.content.length,u}function CK(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 s4(e){CK([["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 o4(e){CK([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function z1e(e){return ur.WS.indexOf(e)>-1?"sheet":e==ur.CS?"chart":e==ur.DS?"dialog":e==ur.MS?"macro":e&&e.length?e:"sheet"}function H1e(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,z1e(e["!id"][n.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function q1e(e,t,r,n,a,i,s,l,c,u,d,f){try{i[n]=H0(cs(e,r,!0),t);var p=Gn(e,t),m;switch(l){case"sheet":m=fbe(p,t,a,c,i[n],u,d,f);break;case"chart":if(m=hbe(p,t,a,c,i[n],u,d,f),!m||!m["!drawel"])break;var x=R0(m["!drawel"].Target,t),y=Sg(x),v=Z0e(cs(e,x,!0),H0(cs(e,y,!0),x)),b=R0(v,x),w=Sg(b);m=Bve(cs(e,b,!0),b,c,H0(cs(e,w,!0),b),u,m);break;case"macro":m=pbe(p,t,a,c,i[n],u,d,f);break;case"dialog":m=mbe(p,t,a,c,i[n],u,d,f);break;default:throw new Error("Unrecognized sheet type "+l)}s[n]=m;var S=[];i&&i[n]&&Pn(i[n]).forEach(function(j){var k="";if(i[n][j].Type==ur.CMNT){k=R0(i[n][j].Target,t);var E=vbe(Gn(e,k,!0),k,c);if(!E||!E.length)return;mL(m,E,!1)}i[n][j].Type==ur.TCMNT&&(k=R0(i[n][j].Target,t),S=S.concat(tge(Gn(e,k,!0),c)))}),S&&S.length&&mL(m,S,!0,c.people||[])}catch(j){if(c.WTF)throw j}}function Ts(e){return e.charAt(0)=="/"?e.slice(1):e}function W1e(e,t){if(Yp(),t=t||{},s4(t),Ls(e,"META-INF/manifest.xml")||Ls(e,"objectdata.xml"))return NL(e,t);if(Ls(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array supp
600ort");if(typeof V2<"u"){if(e.FileIndex)return V2(e);var r=At.utils.cfb_new();return M5(e).forEach(function(L){nr(r,L,rfe(e,L))}),V2(r)}throw new Error("Unsupported NUMBERS file")}if(!Ls(e,"[Content_Types].xml"))throw Ls(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):Ls(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var n=M5(e),a=Yfe(cs(e,"[Content_Types].xml")),i=!1,s,l;if(a.workbooks.length===0&&(l="xl/workbook.xml",Gn(e,l,!0)&&a.workbooks.push(l)),a.workbooks.length===0){if(l="xl/workbook.bin",!Gn(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 c={},u={};if(!t.bookSheets&&!t.bookProps){if(q0=[],a.sst)try{q0=ybe(Gn(e,Ts(a.sst)),a.sst,t)}catch(L){if(t.WTF)throw L}t.cellStyles&&a.themes.length&&(c=xbe(cs(e,a.themes[0].replace(/^\//,""),!0)||"",a.themes[0],t)),a.style&&(u=gbe(Gn(e,Ts(a.style)),a.style,c,t))}a.links.map(function(L){try{var U=H0(cs(e,Sg(Ts(L))),L);return wbe(Gn(e,Ts(L)),U,L,t)}catch{}});var d=dbe(Gn(e,Ts(a.workbooks[0])),a.workbooks[0],t),f={},p="";a.coreprops.length&&(p=Gn(e,Ts(a.coreprops[0]),!0),p&&(f=yG(p)),a.extprops.length!==0&&(p=Gn(e,Ts(a.extprops[0]),!0),p&&rhe(p,f,t)));var m={};(!t.bookSheets||t.bookProps)&&a.custprops.length!==0&&(p=cs(e,Ts(a.custprops[0]),!0),p&&(m=ahe(p,t)));var x={};if((t.bookSheets||t.bookProps)&&(d.Sheets?s=d.Sheets.map(function(U){return U.name}):f.Worksheets&&f.SheetNames.length>0&&(s=f.SheetNames),t.bookProps&&(x.Props=f,x.Custprops=m),t.bookSheets&&typeof s<"u"&&(x.SheetNames=s),t.bookSheets?x.SheetNames:t.bookProps))return x;s={};var y={};t.bookDeps&&a.calcchain&&(y=bbe(Gn(e,Ts(a.calcchain)),a.calcchain));var v=0,b={},w,S;{var j=d.Sheets;f.Worksheets=j.length,f.SheetNames=[];for(var k=0;k!=j.length;++k)f.SheetNames[k]=j[k].name}var E=i?"bin":"xml",T=a.workbooks[0].lastIndexOf("/"),O=(a.workbooks[0].slice(0,T+1)+"_rels/"+a.workbooks[0].slice(T+1)+".rels").replace(/^\//,"");Ls(e,O)||(O="xl/_rels/workbook."+E+".rels");var A=H0(cs(e,O,!0),O.replace(/_rels.*/,"s5s"));(a.metadata||[]).length>=1&&(t.xlmeta=_be(Gn(e,Ts(a.metadata[0])),a.metadata[0],t)),(a.people||[]).length>=1&&(t.people=nge(Gn(e,Ts(a.people[0])),t)),A&&(A=H1e(A,d.Sheets));var P=Gn(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(v=0;v!=f.Worksheets;++v){var I="sheet";if(A&&A[v]?(w="xl/"+A[v][1].replace(/[\/]?xl\//,""),Ls(e,w)||(w=A[v][1]),Ls(e,w)||(w=O.replace(/_rels\/.*$/,"")+A[v][1]),I=A[v][2]):(w="xl/worksheets/sheet"+(v+1-P)+"."+E,w=w.replace(/sheet0\./,"sheet.")),S=w.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&t.sheets!=null)switch(typeof t.sheets){case"number":if(v!=t.sheets)continue e;break;case"string":if(f.SheetNames[v].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var R=!1,M=0;M!=t.sheets.length;++M)typeof t.sheets[M]=="number"&&t.sheets[M]==v&&(R=1),typeof t.sheets[M]=="string"&&t.sheets[M].toLowerCase()==f.SheetNames[v].toLowerCase()&&(R=1);if(!R)continue e}}q1e(e,w,S,f.SheetNames[v],v,b,s,I,t,d,c,u)}return x={Directory:a,Workbook:d,Props:f,Custprops:m,Deps:y,Sheets:s,SheetNames:f.SheetNames,Strings:q0,Styles:u,Themes:c,SSF:cn(Ut)},t&&t.bookFiles&&(e.files?(x.keys=n,x.files=e.files):(x.keys=[],x.files={},e.FullPaths.forEach(function(L,U){L=L.replace(/^Root Entry[\/]/,""),x.keys.push(L),x.files[L]=e.FileIndex[U]}))),t&&t.bookVBA&&(a.vba.length>0?x.vbaraw=Gn(e,Ts(a.vba[0]),!0):a.defaults&&a.defaults.bin===dge&&(x.vbaraw=Gn(e,"xl/vbaProject.bin",!0))),x}function V1e(e,t){var r=t||{},n="Workbook",a=At.find(e,n);try{if(n="/!DataSpaces/Version",a=At.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(_me(a.content),n="/!DataSpaces/DataSpaceMap",a=At.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var i=Eme(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=At.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var s=kme(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=At.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);Tme(a.content)}catch{}if(n="/EncryptionInfo",a=At.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var l=jme(a.content);if(n="/EncryptedPackage",a=At.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 G1e(e,t){return t.bookType=="ods"?AK(e,t):t.bookType=="numbers"?U1e(e,t):t.bookType=="xlsb"?K1e(e,t):Y1e(e,t)}
vendor: 8,414 bytes, line 600
600function K1e(e,t){yh=1024,e&&!e.SSF&&(e.SSF=cn(Ut)),e&&e.SSF&&(Yp(),r_(e.SSF),t.revssf=a_(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,W0?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r=t.bookType=="xlsb"?"bin":"xml",n=nK.indexOf(t.bookType)>-1,a=VR();o4(t=t||{});var i=PR(),s="",l=0;if(t.cellXfs=[],Mu(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),s="docProps/core.xml",nr(i,s,vG(e.Props,t)),a.coreprops.push(s),Rr(t.rels,2,s,ur.CORE_PROPS),s="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&c.push(e.SheetNames[u]);e.Props.SheetNames=c}for(e.Props.Worksheets=e.Props.SheetNames.length,nr(i,s,_G(e.Props)),a.extprops.push(s),Rr(t.rels,3,s,ur.EXT_PROPS),e.Custprops!==e.Props&&Pn(e.Custprops||{}).length>0&&(s="docProps/custom.xml",nr(i,s,SG(e.Custprops)),a.custprops.push(s),Rr(t.rels,4,s,ur.CUST_PROPS)),l=1;l<=e.SheetNames.length;++l){var d={"!id":{}},f=e.Sheets[e.SheetNames[l-1]],p=(f||{})["!type"]||"sheet";switch(p){case"chart":default:s="xl/worksheets/sheet"+l+"."+r,nr(i,s,Ebe(l-1,s,t,e,d)),a.sheets.push(s),Rr(t.wbrels,-1,"worksheets/sheet"+l+"."+r,ur.WS[0])}if(f){var m=f["!comments"],x=!1,y="";m&&m.length>0&&(y="xl/comments"+l+"."+r,nr(i,y,Tbe(m,y)),a.comments.push(y),Rr(d,-1,"../comments"+l+"."+r,ur.CMNT),x=!0),f["!legacy"]&&x&&nr(i,"xl/drawings/vmlDrawing"+l+".vml",tK(l,f["!comments"])),delete f["!comments"],delete f["!legacy"]}d["!id"].rId1&&nr(i,Sg(s),Fh(d))}return t.Strings!=null&&t.Strings.length>0&&(s="xl/sharedStrings."+r,nr(i,s,Nbe(t.Strings,s,t)),a.strs.push(s),Rr(t.wbrels,-1,"sharedStrings."+r,ur.SST)),s="xl/workbook."+r,nr(i,s,Sbe(e,s)),a.workbooks.push(s),Rr(t.rels,1,s,ur.WB),s="xl/theme/theme1.xml",nr(i,s,QR(e.Themes,t)),a.themes.push(s),Rr(t.wbrels,-1,"theme/theme1.xml",ur.THEME),s="xl/styles."+r,nr(i,s,kbe(e,s,t)),a.styles.push(s),Rr(t.wbrels,-1,"styles."+r,ur.STY),e.vbaraw&&n&&(s="xl/vbaProject.bin",nr(i,s,e.vbaraw),a.vba.push(s),Rr(t.wbrels,-1,"vbaProject.bin",ur.VBA)),s="xl/metadata."+r,nr(i,s,jbe(s)),a.metadata.push(s),Rr(t.wbrels,-1,"metadata."+r,ur.XLMETA),nr(i,"[Content_Types].xml",gG(a,t)),nr(i,"_rels/.rels",Fh(t.rels)),nr(i,"xl/_rels/workbook."+r+".rels",Fh(t.wbrels)),delete t.revssf,delete t.ssf,i}function Y1e(e,t){yh=1024,e&&!e.SSF&&(e.SSF=cn(Ut)),e&&e.SSF&&(Yp(),r_(e.SSF),t.revssf=a_(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,W0?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r="xml",n=nK.indexOf(t.bookType)>-1,a=VR();o4(t=t||{});var i=PR(),s="",l=0;if(t.cellXfs=[],Mu(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),s="docProps/core.xml",nr(i,s,vG(e.Props,t)),a.coreprops.push(s),Rr(t.rels,2,s,ur.CORE_PROPS),s="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&c.push(e.SheetNames[u]);e.Props.SheetNames=c}e.Props.Worksheets=e.Props.SheetNames.length,nr(i,s,_G(e.Props)),a.extprops.push(s),Rr(t.rels,3,s,ur.EXT_PROPS),e.Custprops!==e.Props&&Pn(e.Custprops||{}).length>0&&(s="docProps/custom.xml",nr(i,s,SG(e.Custprops)),a.custprops.push(s),Rr(t.rels,4,s,ur.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,l=1;l<=e.SheetNames.length;++l){var f={"!id":{}},p=e.Sheets[e.SheetNames[l-1]],m=(p||{})["!type"]||"sheet";switch(m){case"chart":default:s="xl/worksheets/sheet"+l+"."+r,nr(i,s,pK(l-1,t,e,f)),a.sheets.push(s),Rr(t.wbrels,-1,"worksheets/sheet"+l+"."+r,ur.WS[0])}if(p){var x=p["!comments"],y=!1,v="";if(x&&x.length>0){var b=!1;x.forEach(function(w){w[1].forEach(function(S){S.T==!0&&(b=!0)})}),b&&(v="xl/threadedComments/threadedComment"+l+"."+r,nr(i,v,rge(x,d,t)),a.threadedcomments.push(v),Rr(f,-1,"../threadedComments/threadedComment"+l+"."+r,ur.TCMNT)),v="xl/comments"+l+"."+r,nr(i,v,rK(x)),a.comments.push(v),Rr(f,-1,"../comments"+l+"."+r,ur.CMNT),y=!0}p["!legacy"]&&y&&nr(i,"xl/drawings/vmlDrawing"+l+".vml",tK(l,p["!comments"])),delete p["!comments"],delete p["!legacy"]}f["!id"].rId1&&nr(i,Sg(s),Fh(f))}return t.Strings!=null&&t.Strings.length>0&&(s="xl/sharedStrings."+r,nr(i,s,HG(t.Strings,t)),a.strs.push(s),Rr(t.wbrels,-1,"sharedStrings."+r,ur.SST)),s="xl/workbook."+r,nr(i,s,vK(e)),a.workbooks.push(s),Rr(t.rels,1,s,ur.WB),s="xl/theme/theme1.xml",nr(i,s,QR(e.Themes,t)),a.themes.push(s),Rr(t.wbrels,-1,"theme/theme1.xml",ur.THEME),s="xl/styles."+r,nr(i,s,JG(e,t)),a.styles.push(s),Rr(t.wbrels,-1,"styles."+r,ur.STY),e.vbaraw&&n&&(s="xl/vbaProject.bin",nr(i,s,e.vbaraw),a.vba.push(s),Rr(t.wbrels,-1,"vbaProject.bin",ur.VBA)),s="xl/metadata."+r,nr(i,s,eK()),a.metadata.push(s),Rr(t.wbrels,-1,"metadata."+r,ur.XLMETA),d.length>1&&(s="xl/persons/person.xml",nr(i,s,age(d)),a.people.push(s),Rr(t.wbrels,-1,"persons/person.xml",ur.PEOPLE)),nr(i,"[Content_Types].xml",gG(a,t)),nr(i,"_rels/.rels",Fh(t.rels)),nr(i,"xl/_rels/workbook."+r+".rels",Fh(t.wbrels)),delete t.revssf,delete t.ssf,i}function l4(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=hs(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 X1e(e,t){return At.find(e,"EncryptedPackage")?V1e(e,t):SK(e,t)}function J1e(e,t){var r,n=e,a=t||{};return a.type||(a.type=lr&&Buffer.isBuffer(e)?"buffer":"base64"),r=WV(n,a),W1e(r,a)}function OK(e,t){var r=0;e:for(;r<e.length;)switch(e.charCodeAt(r)){case 10:case 13:case 32:++r;break;case 60:return EC(e.slice(r),t);default:break e}return Yh.to_workbook(e,t)}function Q1e(e,t){var r="",n=l4(e,t);switch(t.type){case"base64":r=hs(e);break;case"binary":r=e;break;case"buffer":r=e.toString("binary");break;case"array":r=Yd(e);break;default:throw new Error("Unrecognized type "+t.type)}return n[0]==239&&n[1]==187&&n[2]==191&&(r=Lr(r)),t.type="binary",OK(r,t)}function Z1e(e,t){var r=e;return t.type=="base64"&&(r=hs(r)),r=xg.utils.decode(1200,r.slice(2),"str"),t.type="binary",OK(r,t)}function ewe(e){return e.match(/[^\x00-\x7F]/)?sl(e):e}function G2(e,t,r,n){return n?(r.type="string",Yh.to_workbook(e,r)):Yh.to_workbook(t,r)}function TC(e,t){TR();var r=t||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return TC(new Uint8Array(e),(r=cn(r),r.type="array",r));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!r.type&&(r.type=typeof Deno<"u"?"buffer":"array");var n=e,a=[0,0,0,0],i=!1;if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),Dh={},r.dateNF&&(Dh.dateNF=r.dateNF),r.type||(r.type=lr&&Buffer.isBuffer(e)?"buffer":"base64"),r.type=="file"&&(r.type=lr?"buffer":"binary",n=Kde(e),typeof Uint8Array<"u"&&!lr&&(r.type="array")),r.type=="string"&&(i=!0,r.type="binary",r.codepage=65001,n=ewe(e)),r.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var s=new ArrayBuffer(3),l=new Uint8Array(s);if(l.foo="bar",!l.foo)return r=cn(r),r.type="array",TC(jR(n),r)}switch((a=l4(n,r))[0]){case 208:if(a[1]===207&&a[2]===17&&a[3]===224&&a[4]===161&&a[5]===177&&a[6]===26&&a[7]===225)return X1e(At.read(n,r),r);break;case 9:if(a[1]<=8)return SK(n,r);break;case 60:return EC(n,r);case 73:if(a[1]===73&&a[2]===42&&a[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(a[1]===68)return ime(n,r);break;case 84:if(a[1]===65&&a[2]===66&&a[3]===76)return UG.to_workbook(n,r);break;case 80:return a[1]===75&&a[2]<9&&a[3]<9?J1e(n,r):G2(e,n,r,i);case 239:return a[3]===60?EC(n,r):G2(e,n,r,i);case 255:if(a[1]===254)return Z1e(n,r);if(a[1]===0&&a[2]===2&&a[3]===0)return zd.to_workbook(n,r);break;case 0:if(a[1]===0&&(a[2]>=2&&a[3]===0||a[2]===0&&(a[3]===8||a[3]===9)))return zd.to_workbook(n,r);break;case 3:case 131:case 139:case 140:return SC.to_workbook(n,r);case 123:if(a[1]===92&&a[2]===114&&a[3]===116)return KG.to_workbook(n,r);break;case 10:case 13:case 32:return Q1e(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 ame.indexOf(a[0])>
vendor: 6,015 bytes, line 600
600-1&&a[2]<=12&&a[3]<=31?SC.to_workbook(n,r):G2(e,n,r,i)}function PK(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return Ox(t.file,At.write(e,{type:lr?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return At.write(e,t)}function twe(e,t){var r=cn(t||{}),n=G1e(e,r);return rwe(n,r)}function rwe(e,t){var r={},n=lr?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(r.compression="DEFLATE"),t.password)r.type=n;else switch(t.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":r.type=n;break;default:throw new Error("Unrecognized type "+t.type)}var a=e.FullPaths?At.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!t.compression}):e.generate(r);if(typeof Deno<"u"&&typeof a=="string"){if(t.type=="binary"||t.type=="base64")return a;a=new Uint8Array(t_(a))}return t.password&&typeof encrypt_agile<"u"?PK(encrypt_agile(a,t.password),t):t.type==="file"?Ox(t.file,a):t.type=="string"?Lr(a):a}function nwe(e,t){var r=t||{},n=e1e(e,r);return PK(n,r)}function Jo(e,t,r){r||(r="");var n=r+e;switch(t.type){case"base64":return yg(sl(n));case"binary":return sl(n);case"string":return e;case"file":return Ox(t.file,n,"utf8");case"buffer":return lr?bc(n,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(n):Jo(n,{type:"binary"}).split("").map(function(a){return a.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function awe(e,t){switch(t.type){case"base64":return yg(e);case"binary":return e;case"string":return e;case"file":return Ox(t.file,e,"binary");case"buffer":return lr?bc(e,"binary"):e.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function Uv(e,t){switch(t.type){case"string":case"base64":case"binary":for(var r="",n=0;n<e.length;++n)r+=String.fromCharCode(e[n]);return t.type=="base64"?yg(r):t.type=="string"?Lr(r):r;case"file":return Ox(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function RK(e,t){TR(),Xve(e);var r=cn(t||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var n=RK(e,r);return r.type="array",t_(n)}var a=0;if(r.sheet&&(typeof r.sheet=="number"?a=r.sheet:a=e.SheetNames.indexOf(r.sheet),!e.SheetNames[a]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return Jo(Gbe(e,r),r);case"slk":case"sylk":return Jo(BG.from_sheet(e.Sheets[e.SheetNames[a]],r),r);case"htm":case"html":return Jo(kK(e.Sheets[e.SheetNames[a]],r),r);case"txt":return awe(IK(e.Sheets[e.SheetNames[a]],r),r);case"csv":return Jo(c4(e.Sheets[e.SheetNames[a]],r),r,"\uFEFF");case"dif":return Jo(UG.from_sheet(e.Sheets[e.SheetNames[a]],r),r);case"dbf":return Uv(SC.from_sheet(e.Sheets[e.SheetNames[a]],r),r);case"prn":return Jo(Yh.from_sheet(e.Sheets[e.SheetNames[a]],r),r);case"rtf":return Jo(KG.from_sheet(e.Sheets[e.SheetNames[a]],r),r);case"eth":return Jo(zG.from_sheet(e.Sheets[e.SheetNames[a]],r),r);case"fods":return Jo(AK(e,r),r);case"wk1":return Uv(zd.sheet_to_wk1(e.Sheets[e.SheetNames[a]],r),r);case"wk3":return Uv(zd.book_to_wk3(e,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),Uv(EK(e,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),nwe(e,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return twe(e,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function iwe(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},r=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();r.match(/^\.[a-z]+$/)&&(e.bookType=r.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function swe(e,t,r){var n={};return n.type="file",n.file=t,iwe(n),RK(e,n)}function owe(e,t,r,n,a,i,s,l){var c=Bn(r),u=l.defval,d=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw"),f=!0,p=a===1?[]:{};if(a!==1)if(Object.defineProperty)try{Object.defineProperty(p,"__rowNum__",{value:r,enumerable:!1})}catch{p.__rowNum__=r}else p.__rowNum__=r;if(!s||e[r])for(var m=t.s.c;m<=t.e.c;++m){var x=s?e[r][m]:e[n[m]+c];if(x===void 0||x.t===void 0){if(u===void 0)continue;i[m]!=null&&(p[i[m]]=u);continue}var y=x.v;switch(x.t){case"z":if(y==null)break;continue;case"e":y=y==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+x.t)}if(i[m]!=null){if(y==null)if(x.t=="e"&&y===null)p[i[m]]=null;else if(u!==void 0)p[i[m]]=u;else if(d&&y===null)p[i[m]]=null;else continue;else p[i[m]]=d&&(x.t!=="n"||x.t==="n"&&l.rawNumbers!==!1)?y:dc(x,y,l);y!=null&&(f=!1)}}return{row:p,isempty:f}}function p1(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,a=1,i=[],s=0,l="",c={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range!=null?u.range:e["!ref"];switch(u.header===1?n=1:u.header==="A"?n=2:Array.isArray(u.header)?n=3:u.header==null&&(n=0),typeof d){case"string":c=wr(d);break;case"number":c=wr(e["!ref"]),c.s.r=d;break;default:c=d}n>0&&(a=0);var f=Bn(c.s.r),p=[],m=[],x=0,y=0,v=Array.isArray(e),b=c.s.r,w=0,S={};v&&!e[b]&&(e[b]=[]);var j=u.skipHidden&&e["!cols"]||[],k=u.skipHidden&&e["!rows"]||[];for(w=c.s.c;w<=c.e.c;++w)if(!(j[w]||{}).hidden)switch(p[w]=wn(w),r=v?e[b][w]:e[p[w]+f],n){case 1:i[w]=w-c.s.c;break;case 2:i[w]=p[w];break;case 3:i[w]=u.header[w-c.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),l=s=dc(r,null,u),y=S[s]||0,!y)S[s]=1;else{do l=s+"_"+y++;while(S[l]);S[s]=y,S[l]=1}i[w]=l}for(b=c.s.r+a;b<=c.e.r;++b)if(!(k[b]||{}).hidden){var E=owe(e,c,b,p,n,i,v,u);(E.isempty===!1||(n===1?u.blankrows!==!1:u.blankrows))&&(m[x++]=E.row)}return m.length=x,m}var OL=/"/g;function lwe(e,t,r,n,a,i,s,l){for(var c=!0,u=[],d="",f=Bn(r),p=t.s.c;p<=t.e.c;
vendor: 4,776 bytes, lines 600-602
600++p)if(n[p]){var m=l.dense?(e[r]||[])[p]:e[n[p]+f];if(m==null)d="";else if(m.v!=null){c=!1,d=""+(l.rawNumbers&&m.t=="n"?m.v:dc(m,null,l));for(var x=0,y=0;x!==d.length;++x)if((y=d.charCodeAt(x))===a||y===i||y===34||l.forceQuotes){d='"'+d.replace(OL,'""')+'"';break}d=="ID"&&(d='"ID"')}else m.f!=null&&!m.F?(c=!1,d="="+m.f,d.indexOf(",")>=0&&(d='"'+d.replace(OL,'""')+'"')):d="";u.push(d)}return l.blankrows===!1&&c?null:u.join(s)}function c4(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var a=wr(e["!ref"]),i=n.FS!==void 0?n.FS:",",s=i.charCodeAt(0),l=n.RS!==void 0?n.RS:` 601`,c=l.charCodeAt(0),u=new RegExp((i=="|"?"\\|":i)+"+$"),d="",f=[];n.dense=Array.isArray(e);for(var p=n.skipHidden&&e["!cols"]||[],m=n.skipHidden&&e["!rows"]||[],x=a.s.c;x<=a.e.c;++x)(p[x]||{}).hidden||(f[x]=wn(x));for(var y=0,v=a.s.r;v<=a.e.r;++v)(m[v]||{}).hidden||(d=lwe(e,a,v,f,s,c,i,n),d!=null&&(n.strip&&(d=d.replace(u,"")),(d||n.blankrows!==!1)&&r.push((y++?l:"")+d)));return delete n.dense,r.join("")}function IK(e,t){t||(t={}),t.FS=" ",t.RS=` 602`;var r=c4(e,t);return r}function cwe(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var a=wr(e["!ref"]),i="",s=[],l,c=[],u=Array.isArray(e);for(l=a.s.c;l<=a.e.c;++l)s[l]=wn(l);for(var d=a.s.r;d<=a.e.r;++d)for(i=Bn(d),l=a.s.c;l<=a.e.c;++l)if(t=s[l]+i,r=u?(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}}c[c.length]=t+"="+n}return c}function FK(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 c=typeof n.origin=="string"?_n(n.origin):n.origin;s=c.r,l=c.c}var u,d={s:{c:0,r:0},e:{c:l,r:s+t.length-1+a}};if(i["!ref"]){var f=wr(i["!ref"]);d.e.c=Math.max(d.e.c,f.e.c),d.e.r=Math.max(d.e.r,f.e.r),s==-1&&(s=f.e.r+1,d.e.r=s+t.length-1+a)}else s==-1&&(s=0,d.e.r=t.length-1+a);var p=n.header||[],m=0;t.forEach(function(y,v){Pn(y).forEach(function(b){(m=p.indexOf(b))==-1&&(p[m=p.length]=b);var w=y[b],S="z",j="",k=zt({c:l+m,r:s+v+a});u=Cg(i,k),w&&typeof w=="object"&&!(w instanceof Date)?i[k]=w:(typeof w=="number"?S="n":typeof w=="boolean"?S="b":typeof w=="string"?S="s":w instanceof Date?(S="d",n.cellDates||(S="n",w=ua(w)),j=n.dateNF||Ut[14]):w===null&&n.nullError&&(S="e",w=0),u?(u.t=S,u.v=w,delete u.w,delete u.R,j&&(u.z=j)):i[k]=u={t:S,v:w},j&&(u.z=j))})}),d.e.c=Math.max(d.e.c,l+p.length-1);var x=Bn(s);if(a)for(m=0;m<p.length;++m)i[wn(m+l)+x]={t:"s",v:p[m]};return i["!ref"]=Zt(d),i}function uwe(e,t){return FK(null,e,t)}function Cg(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=_n(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?Cg(e,zt(t)):Cg(e,zt({r:t,c:r||0}))}function dwe(e,t){if(typeof t=="number"){if(t>=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 u4(){return{SheetNames:[],Sheets:{}}}function d4(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(yK(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 fwe(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=dwe(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 hwe(e,t){return e.z=t,e}function MK(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function pwe(e,t,r){return MK(e,"#"+t,r)}function mwe(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function gwe(e,t,r,n){for(var a=typeof t!="string"?t:wr(t),i=typeof t=="string"?t:Zt(t),s=a.s.r;s<=a.e.r;++s)for(var l=a.s.c;l<=a.e.c;++l){var c=Cg(e,s,l);c.t="n",c.F=i,delete c.v,s==a.s.r&&l==a.s.c&&(c.f=r,n&&(c.D=!0))}return e}var Lb={encode_col:wn,encode_row:Bn,encode_cell:zt,encode_range:Zt,decode_col:BR,decode_row:$R,split_cell:Nfe,decode_cell:_n,decode_range:qi,format_cell:dc,sheet_add_aoa:cG,sheet_add_json:FK,sheet_add_dom:NK,aoa_to_sheet:Xp,json_to_sheet:uwe,table_to_sheet:TK,table_to_book:_1e,sheet_to_csv:c4,sheet_to_txt:
602IK,sheet_to_json:p1,sheet_to_html:kK,sheet_to_formulae:cwe,sheet_to_row_object_array:p1,sheet_get_cell:Cg,book_new:u4,book_append_sheet:d4,book_set_sheet_visibility:fwe,cell_set_number_format:hwe,cell_set_hyperlink:MK,cell_set_internal_link:pwe,cell_add_comment:mwe,sheet_set_array_formula:gwe,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};class f4{constructor(){this.supportedTypes=["csv","xlsx","xls"]}async extractRawData(t){try{const r=this.getFileType(t),n=await this.readFile(t,r),a=this.extractPotentialHeaders(n);return{success:!0,fileType:r,rawData:n,headers:a,preview:n.slice(0,5)}}catch(r){return console.error("Detailed error in extractRawData:",r),{success:!1,error:`File reading failed: ${r.message}`,headers:[]}}}getFileType(t){var n;const r=(n=t.name.split(".").pop())==null?void 0:n.toLowerCase();if(!r||!this.supportedTypes.includes(r))throw new Error(`Unsupported file type: ${r}`);return r}async readFile(t,r){return r==="csv"?this.readCsv(t):this.readExcel(t)}async readCsv(t){return new Promise((r,n)=>{mde.parse(t,{header:!1,skipEmptyLines:"greedy",complete:a=>{a.errors.length>0?n(new Error(`CSV parsing failed: ${a.errors[0].message}`)):r(a.data)},error:a=>n(new Error(a.message))})})}async readExcel(t){return new Promise((r,n)=>{const a=new FileReader;a.onload=i=>{var s;try{const l=TC((s=i.target)==null?void 0:s.result,{type:"binary",cellDates:!1,cellText:!0,raw:!0}),c=l.Sheets[l.SheetNames[0]],u=Lb.sheet_to_json(c,{header:1,raw:!0,defval:""});r(u)}catch(l){n(new Error("Excel parsing failed: "+l.message))}},a.onerror=()=>n(new Error("File reading failed")),a.readAsBinaryString(t)})}extractPotentialHeaders(t){return!Array.isArray(t)||t.length===0?[]:t.slice(0,20).map((r,n)=>({rowIndex:n,values:r.map(a=>String(a))}))}}function DK(e){return t=>typeof t===e}var xwe=DK("function"),ywe=e=>e===null,PL=e=>Object.prototype.toString.call(e).slice(8,-1)==="RegExp",RL=e=>!vwe(e)&&!ywe(e)&&(xwe(e)||typeof e=="object"),vwe=DK("undefined");function bwe(e,t){const{length:r}=e;if(r!==t.length)return!1;for(let n=r;n--!==0;)if(!xi(e[n],t[n]))return!1;return!0}function wwe(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new DataView(e.buffer),n=new DataView(t.buffer);let a=e.byteLength;for(;a--;)if(r.getUint8(a)!==n.getUint8(a))return!1;return!0}function _we(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;for(const r of e.entries())if(!xi(r[1],t.get(r[0])))return!1;return!0}function Swe(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;return!0}function xi(e,t){if(e===t)return!0;if(e&&RL(e)&&t&&RL(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return bwe(e,t);if(e instanceof Map&&t instanceof Map)return _we(e,t);if(e instanceof Set&&t instanceof Set)return Swe(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return wwe(e,t);if(PL(e)&&PL(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=r.length;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(let a=r.length;a--!==0;){const i=r[a];if(!(i==="_owner"&&e.$$typeof)&&!xi(e[i],t[i]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var Ewe=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],kwe=["bigint","boolean","null","number","string","symbol","undefined"];function u_(e){const t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(Nwe(t))return t}function Io(e){return t=>u_(t)===e}function Nwe(e){return Ewe.includes(e)}function Qp(e){return t=>typeof t===e}function Twe(e){return kwe.includes(e)}var jwe=["innerHTML","ownerDocument","style","attributes","nodeValue"];function gt(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(gt.array(e))return"Array";if(gt.plainFunction(e))return"Function";const t=u_(e);return t||"Object"}gt.array=Array.isArray;gt.arrayOf=(e,t)=>!gt.array(e)&&!gt.function(t)?!1:e.every(r=>t(r));gt.asyncGeneratorFunction=e=>u_(e)==="AsyncGeneratorFunction";gt.asyncFunction=Io("AsyncFunction");gt.bigint=Qp("bigint");gt.boolean=e=>e===!0||e===!1;gt.date=Io("Date");gt.defined=e=>!gt.undefined(e);gt.domElement=e=>gt.object(e)&&!gt.plainObject(e)&&e.nodeType===1&>.string(e.nodeName)&&jwe.every(t=>t in e);gt.empty=e=>gt.string(e)&&e.length===0||gt.array(e)&&e.length===0||gt.object(e)&&!gt.map(e)&&!gt.set(e)&&Object.keys(e).length===0||gt.set(e)&&e.size===0||gt.map(e)&&e.size===0;gt.error=Io("Error");gt.function=Qp("function");gt.generator=e=>gt.iterable(e)&>.function(e.next)&>.function(e.throw);gt.generatorFunction=Io("GeneratorFunction");gt.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;gt.iterable=e=>!gt.nullOrUndefined(e)&>.function(e[Symbol.iterator]);gt.map=Io("Map");gt.nan=e=>Number.isNaN(e);gt.null=e=>e===null;gt.nullOrUndefined=e=>gt.null(e)||gt.undefined(e);gt.number=e=>Qp("number")(e)&&!gt.nan(e);gt.numericString=e=>gt.string(e)&&e.length>0&&!Number.isNaN(Number(e));gt.object=e=>!gt.nullOrUndefined(e)&&(gt.function(e)||typeof e=="object");gt.oneOf=(e,t)=>gt.array(e)?e.indexOf(t)>-1:!1;gt.plainFunction=Io("Function");gt.plainObject=e=>{if(u_(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};gt.primitive=e=>gt.null(e)||Twe(typeof e);gt.promise=Io("Promise");gt.propertyOf=(e,t,r)=>{if(!gt.object(e)||!t)return!1;const n=e[t];return gt.function(r)?r(n):gt.defined(n)};gt.regexp=Io("RegExp");gt.set=Io("Set");gt.string=Qp("string");gt.symbol=Qp("symbol");gt.undefined=Qp("undefined");gt.weakMap=Io("WeakMap");gt.weakSet=Io("WeakSet");var _t=gt;function Awe(...e){return e.every(t=>_t.string(t)||_t.array(t)||_t.plainObject(t))}function Cwe(e,t,r){return LK(e,t)?[e,t].every(_t.array)?!e.some(LL(r))&&t.some(LL(r)):[e,t].every(_t.plainObject)?!Object.entries(e).some(DL(r))&&Object.entries(t).some(DL(r)):t===r:!1}function IL(e,t,r){const{actual:n,key:a,previous:i,type:s}=r,l=ol(e,a),c=ol(t,a);let u=[l,c].every(_t.number)&&(s==="increased"?l<c:l>c);return _t.undefined(n)||(u=u&&c===n),_t.undefined(i)||(u=u&&l===i),u}function FL(e,t,r){const{key:n,type:a,value:i}=r,s=ol(e,n),l=ol(t,n),c=a==="added"?s:l,u=a==="added"?l:s;
602if(!_t.nullOrUndefined(i)){if(_t.defined(c)){if(_t.array(c)||_t.plainObject(c))return Cwe(c,u,i)}else return xi(u,i);return!1}return[s,l].every(_t.array)?!u.every(h4(c)):[s,l].every(_t.plainObject)?Owe(Object.keys(c),Object.keys(u)):![s,l].every(d=>_t.primitive(d)&&_t.defined(d))&&(a==="added"?!_t.defined(s)&&_t.defined(l):_t.defined(s)&&!_t.defined(l))}function ML(e,t,{key:r}={}){let n=ol(e,r),a=ol(t,r);if(!LK(n,a))throw new TypeError("Inputs have different types");if(!Awe(n,a))throw new TypeError("Inputs don't have length");return[n,a].every(_t.plainObject)&&(n=Object.keys(n),a=Object.keys(a)),[n,a]}function DL(e){return([t,r])=>_t.array(e)?xi(e,r)||e.some(n=>xi(n,r)||_t.array(r)&&h4(r)(n)):_t.plainObject(e)&&e[t]?!!e[t]&&xi(e[t],r):xi(e,r)}function Owe(e,t){return t.some(r=>!e.includes(r))}function LL(e){return t=>_t.array(e)?e.some(r=>xi(r,t)||_t.array(t)&&h4(t)(r)):xi(e,t)}function i0(e,t){return _t.array(e)?e.some(r=>xi(r,t)):xi(e,t)}function h4(e){return t=>e.some(r=>xi(r,t))}function LK(...e){return e.every(_t.array)||e.every(_t.number)||e.every(_t.plainObject)||e.every(_t.string)}function ol(e,t){return _t.plainObject(e)||_t.array(e)?_t.string(t)?t.split(".").reduce((n,a)=>n&&n[a],e):_t.number(t)?e[t]:e:e}function m1(e,t){if([e,t].some(_t.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(d=>_t.plainObject(d)||_t.array(d)))throw new Error("Expected plain objects or array");return{added:(d,f)=>{try{return FL(e,t,{key:d,type:"added",value:f})}catch{return!1}},changed:(d,f,p)=>{try{const m=ol(e,d),x=ol(t,d),y=_t.defined(f),v=_t.defined(p);if(y||v){const b=v?i0(p,m):!i0(f,m),w=i0(f,x);return b&&w}return[m,x].every(_t.array)||[m,x].every(_t.plainObject)?!xi(m,x):m!==x}catch{return!1}},changedFrom:(d,f,p)=>{if(!_t.defined(d))return!1;try{const m=ol(e,d),x=ol(t,d),y=_t.defined(p);return i0(f,m)&&(y?i0(p,x):!y)}catch{return!1}},decreased:(d,f,p)=>{if(!_t.defined(d))return!1;try{return IL(e,t,{key:d,actual:f,previous:p,type:"decreased"})}catch{return!1}},emptied:d=>{try{const[f,p]=ML(e,t,{key:d});return!!f.length&&!p.length}catch{return!1}},filled:d=>{try{const[f,p]=ML(e,t,{key:d});return!f.length&&!!p.length}catch{return!1}},increased:(d,f,p)=>{if(!_t.defined(d))return!1;try{return IL(e,t,{key:d,actual:f,previous:p,type:"increased"})}catch{return!1}},removed:(d,f)=>{try{return FL(e,t,{key:d,type:"removed",value:f})}catch{return!1}}}}var K2,$L;function Pwe(){if($L)return K2;$L=1;var e=new Error("Element already at target scroll position"),t=new Error("Scroll cancelled"),r=Math.min,n=Date.now;K2={left:a("scrollLeft"),top:a("scrollTop")};function a(l){return function(u,d,f,p){f=f||{},typeof f=="function"&&(p=f,f={}),typeof p!="function"&&(p=s);var m=n(),x=u[l],y=f.ease||i,v=isNaN(f.duration)?350:+f.duration,b=!1;return x===d?p(e,u[l]):requestAnimationFrame(S),w;function w(){b=!0}function S(j){if(b)return p(t,u[l]);var k=n(),E=r(1,(k-m)/v),T=y(E);u[l]=T*(d-x)+x,E<1?requestAnimationFrame(S):requestAnimationFrame(function(){p(null,u[l])})}}}function i(l){return .5*(1-Math.cos(Math.PI*l))}function s(){}return K2}var Rwe=Pwe();const Iwe=tr(Rwe);var $b={exports:{}},Fwe=$b.exports,BL;function Mwe(){return BL||(BL=1,(function(e){(function(t,r){e.exports?e.exports=r():t.Scrollparent=r()})(Fwe,function(){function t(n){var a=getComputedStyle(n,null).getPropertyValue("overflow");return a.indexOf("scroll")>-1||a.indexOf("auto")>-1}function r(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var a=n.parentNode;a.parentNode;){if(t(a))return a;a=a.parentNode}return document.scrollingElement||document.documentElement}}return r})})($b)),$b.exports}var Dwe=Mwe();const $K=tr(Dwe);var Y2,UL;function Lwe(){if(UL)return Y2;UL=1;var e=function(n){return Object.prototype.hasOwnProperty.call(n,"props")},t=function(n,a){return n+r(a)},r=function(n){return n===null||typeof n=="boolean"||typeof n>"u"?"":typeof n=="number"?n.toString():typeof n=="string"?n:Array.isArray(n)?n.reduce(t,""):e(n)&&Object.prototype.hasOwnProperty.call(n.props,"children")?r(n.props.children):""};return r.default=r,Y2=r,Y2}var $we=Lwe();const zL=tr($we);var X2,HL;function Bwe(){if(HL)return X2;HL=1;var e=function(w){return t(w)&&!r(w)};function t(b){return!!b&&typeof b=="object"}function r(b){var w=Object.prototype.toString.call(b);return w==="[object RegExp]"||w==="[object Date]"||i(b)}var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103;function i(b){return b.$$typeof===a}function s(b){return Array.isArray(b)?[]:{}}function l(b,w){return w.clone!==!1&&w.isMergeableObject(b)?y(s(b),b,w):b}function c(b,w,S){return b.concat(w).map(function(j){return l(j,S)})}function u(b,w){if(!w.customMerge)return y;var S=w.customMerge(b);return typeof S=="function"?S:y}function d(b){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(b).filter(function(w){return Object.propertyIsEnumerable.call(b,w)}):[]}function f(b){return Object.keys(b).concat(d(b))}function p(b,w){try{return w in b}catch{return!1}}function m(b,w){return p(b,w)&&!(Object.hasOwnProperty.call(b,w)&&Object.propertyIsEnumerable.call(b,w))}function x(b,w,S){var j={};return S.isMergeableObject(b)&&f(b).forEach(function(k){j[k]=l(b[k],S)}
vendor: 5,191 bytes, lines 602-625
602),f(w).forEach(function(k){m(b,k)||(p(b,k)&&S.isMergeableObject(w[k])?j[k]=u(k,S)(b[k],w[k],S):j[k]=l(w[k],S))}),j}function y(b,w,S){S=S||{},S.arrayMerge=S.arrayMerge||c,S.isMergeableObject=S.isMergeableObject||e,S.cloneUnlessOtherwiseSpecified=l;var j=Array.isArray(w),k=Array.isArray(b),E=j===k;return E?j?S.arrayMerge(b,w,S):x(b,w,S):l(w,S)}y.all=function(w,S){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(j,k){return y(j,k,S)},{})};var v=y;return X2=v,X2}var Uwe=Bwe();const Eo=tr(Uwe);/**! 603 * @fileOverview Kickass library to create and place poppers near their reference elements. 604 * @version 1.16.1 605 * @license 606 * Copyright (c) 2016 Federico Zivolo and contributors 607 * 608 * Permission is hereby granted, free of charge, to any person obtaining a copy 609 * of this software and associated documentation files (the "Software"), to deal 610 * in the Software without restriction, including without limitation the rights 611 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 612 * copies of the Software, and to permit persons to whom the Software is 613 * furnished to do so, subject to the following conditions: 614 * 615 * The above copyright notice and this permission notice shall be included in all 616 * copies or substantial portions of the Software. 617 * 618 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 619 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 620 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 621 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 622 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 623 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 624 * SOFTWARE. 625 */var $x=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",zwe=(function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if($x&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0})();function Hwe(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function qwe(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},zwe))}}var Wwe=$x&&window.Promise,Vwe=Wwe?Hwe:qwe;function BK(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function yf(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function p4(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function Bx(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=yf(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(r+a+n)?e:Bx(p4(e))}function UK(e){return e&&e.referenceNode?e.referenceNode:e}var qL=$x&&!!(window.MSInputMethodContext&&document.documentMode),WL=$x&&/MSIE 10/.test(navigator.userAgent);function Zp(e){return e===11?qL:e===10?WL:qL||WL}function Jh(e){if(!e)return document.documentElement;for(var t=Zp(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&yf(r,"position")==="static"?Jh(r):r}function Gwe(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Jh(e.firstElementChild)===e}function jC(e){return e.parentNode!==null?jC(e.parentNode):e}function g1(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,a=r?t:e,i=document.createRange();i.setStart(n,0),i.setEnd(a,0);var s=i.commonAncestorContainer;if(e!==s&&t!==s||n.contains(a))return Gwe(s)?s:Jh(s);var l=jC(e);return l.host?g1(l.host,t):g1(e,jC(t).host)}function Qh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[r]}return e[r]}function Kwe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Qh(t,"top"),a=Qh(t,"left"),i=r?-1:1;return e.top+=n*i,e.bottom+=n*i,e.left+=a*i,e.right+=a*i,e}function VL(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function GL(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Zp(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function zK(e){var t=e.body,r=e.documentElement,n=Zp(10)&&getComputedStyle(r);return{height:GL("Height",t,r,n),width:GL("Width",t,r,n)}}var Ywe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Xwe=(function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}
vendor: 17,078 bytes, line 625
625)(),Zh=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},Ws=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Tu(e){return Ws({},e,{right:e.left+e.width,bottom:e.top+e.height})}function AC(e){var t={};try{if(Zp(10)){t=e.getBoundingClientRect();var r=Qh(e,"top"),n=Qh(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch{}var a={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i=e.nodeName==="HTML"?zK(e.ownerDocument):{},s=i.width||e.clientWidth||a.width,l=i.height||e.clientHeight||a.height,c=e.offsetWidth-s,u=e.offsetHeight-l;if(c||u){var d=yf(e);c-=VL(d,"x"),u-=VL(d,"y"),a.width-=c,a.height-=u}return Tu(a)}function m4(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Zp(10),a=t.nodeName==="HTML",i=AC(e),s=AC(t),l=Bx(e),c=yf(t),u=parseFloat(c.borderTopWidth),d=parseFloat(c.borderLeftWidth);r&&a&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var f=Tu({top:i.top-s.top-u,left:i.left-s.left-d,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!n&&a){var p=parseFloat(c.marginTop),m=parseFloat(c.marginLeft);f.top-=u-p,f.bottom-=u-p,f.left-=d-m,f.right-=d-m,f.marginTop=p,f.marginLeft=m}return(n&&!r?t.contains(l):t===l&&l.nodeName!=="BODY")&&(f=Kwe(f,t)),f}function Jwe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=m4(e,r),a=Math.max(r.clientWidth,window.innerWidth||0),i=Math.max(r.clientHeight,window.innerHeight||0),s=t?0:Qh(r),l=t?0:Qh(r,"left"),c={top:s-n.top+n.marginTop,left:l-n.left+n.marginLeft,width:a,height:i};return Tu(c)}function HK(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(yf(e,"position")==="fixed")return!0;var r=p4(e);return r?HK(r):!1}function qK(e){if(!e||!e.parentElement||Zp())return document.documentElement;for(var t=e.parentElement;t&&yf(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function g4(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,i={top:0,left:0},s=a?qK(e):g1(e,UK(t));if(n==="viewport")i=Jwe(s,a);else{var l=void 0;n==="scrollParent"?(l=Bx(p4(t)),l.nodeName==="BODY"&&(l=e.ownerDocument.documentElement)):n==="window"?l=e.ownerDocument.documentElement:l=n;var c=m4(l,s,a);if(l.nodeName==="HTML"&&!HK(s)){var u=zK(e.ownerDocument),d=u.height,f=u.width;i.top+=c.top-c.marginTop,i.bottom=d+c.top,i.left+=c.left-c.marginLeft,i.right=f+c.left}else i=c}r=r||0;var p=typeof r=="number";return i.left+=p?r:r.left||0,i.top+=p?r:r.top||0,i.right-=p?r:r.right||0,i.bottom-=p?r:r.bottom||0,i}function Qwe(e){var t=e.width,r=e.height;return t*r}function WK(e,t,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var s=g4(r,n,i,a),l={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},c=Object.keys(l).map(function(p){return Ws({key:p},l[p],{area:Qwe(l[p])})}).sort(function(p,m){return m.area-p.area}),u=c.filter(function(p){var m=p.width,x=p.height;return m>=r.clientWidth&&x>=r.clientHeight}),d=u.length>0?u[0].key:c[0].key,f=e.split("-")[1];return d+(f?"-"+f:"")}function VK(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=n?qK(t):g1(t,UK(r));return m4(r,a,n)}function GK(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),a=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),i={width:e.offsetWidth+a,height:e.offsetHeight+n};return i}function x1(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function KK(e,t,r){r=r.split("-")[0];var n=GK(e),a={width:n.width,height:n.height},i=["right","left"].indexOf(r)!==-1,s=i?"top":"left",l=i?"left":"top",c=i?"height":"width",u=i?"width":"height";return a[s]=t[s]+t[c]/2-n[c]/2,r===l?a[l]=t[l]-n[u]:a[l]=t[x1(l)],a}function Ux(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Zwe(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===r});var n=Ux(e,function(a){return a[t]===r});return e.indexOf(n)}function YK(e,t,r){var n=r===void 0?e:e.slice(0,Zwe(e,"name",r));return n.forEach(function(a){a.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=a.function||a.fn;a.enabled&&BK(i)&&(t.offsets.popper=Tu(t.offsets.popper),t.offsets.reference=Tu(t.offsets.reference),t=i(t,a))}),t}function e_e(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=VK(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=WK(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=KK(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=YK(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function XK(e,t){return e.some(function(r){var n=r.name,a=r.enabled;return a&&n===t})}function x4(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var a=t[n],i=a?""+a+r:e;if(typeof document.body.style[i]<"u")return i}return null}function t_e(){return this.state.isDestroyed=!0,XK(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[x4("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function JK(e){var t=e.ownerDocument;return t?t.defaultView:window}function QK(e,t,r,n){var a=e.nodeName==="BODY",i=a?e.ownerDocument.defaultView:e;i.addEventListener(t,r,{passive:!0}),a||QK(Bx(i.parentNode),t,r,n),n.push(i)}function r_e(e,t,r,n){r.updateBound=n,JK(e).addEventListener("resize",r.updateBound,{passive:!0});var a=Bx(e);return QK(a,"scroll",r.updateBound,r.scrollParents),r.scrollElement=a,r.eventsEnabled=!0,r}function n_e(){this.state.eventsEnabled||(this.state=r_e(this.reference,this.options,this.state,this.scheduleUpdate))}function a_e(e,t){return JK(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(r){r.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function i_e(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=a_e(this.reference,this.state))}function y4(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function CC(e,t){Object.keys(t).forEach(function(r){var n="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&y4(t[r])&&(n="px"),e.style[r]=t[r]+n})}function s_e(e,t){Object.keys(t).forEach(function(r){var n=t[r];n!==!1?e.setAttribute(r,t[r]):e.removeAttribute(r)})}function o_e(e){return CC(e.instance.popper,e.styles),s_e(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&CC(e.arrowElement,e.arrowStyles),e}function l_e(e,t,r,n,a){var i=VK(a,t,e,r.positionFixed),s=WK(r.placement,i,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",s),CC(t,{position:r.positionFixed?"fixed":"absolute"}),r}function c_e(e,t){var r=e.offsets,n=r.popper,a=r.reference,i=Math.round,s=Math.floor,l=function(b){return b},c=i(a.width),u=i(n.width),d=["left","right"].indexOf(e.placement)!==-1,f=e.placement.indexOf("-")!==-1,p=c%2===u%2,m=c%2===1&&u%2===1,x=t?d||f||p?i:s:l,y=t?i:l;return{left:x(m&&!f&&t?n.left-1:n.left),top:y(n.top),bottom:y(n.bottom),right:x(n.right)}}var u_e=$x&&/Firefox/i.test(navigator.userAgent);function d_e(e,t){var r=t.x,n=t.y,a=e.offsets.popper,i=Ux(e.instance.modifiers,function(S){return S.name==="applyStyle"}).gpuAcceleration;i!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=i!==void 0?i:t.gpuAcceleration,l=Jh(e.instance.popper),c=AC(l),u={position:a.position},d=c_e(e,window.devicePixelRatio<2||!u_e),f=r==="bottom"?"top":"bottom",p=n==="right"?"left":"right",m=x4("transform"),x=void 0,y=void 0;if(f==="bottom"?l.nodeName==="HTML"?y=-l.clientHeight+d.bottom:y=-c.height+d.bottom:y=d.top,p==="right"?l.nodeName==="HTML"?x=-l.clientWidth+d.right:x=-c.width+d.right:x=d.left,s&&m)u[m]="translate3d("+x+"px, "+y+"px, 0)",u[f]=0,u[p]=0,u.willChange="transform";else{var v=f==="bottom"?-1:1,b=p==="right"?-1:1;u[f]=y*v,u[p]=x*b,u.willChange=f+", "+p}var w={"x-placement":e.placement};return e.attributes=Ws({},w,e.attributes),e.styles=Ws({},u,e.styles),e.arrowStyles=Ws({},e.offsets.arrow,e.arrowStyles),e}function ZK(e,t,r){var n=Ux(e,function(l){var c=l.name;return c===t}),a=!!n&&e.some(function(l){return l.name===r&&l.enabled&&l.order<n.order});if(!a){var i="`"+t+"`",s="`"+r+"`";console.warn(s+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return a}function f_e(e,t){var r;if(!ZK(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if(typeof n=="string"){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var a=e.placement.split("-")[0],i=e.offsets,s=i.popper,l=i.reference,c=["left","right"].indexOf(a)!==-1,u=c?"height":"width",d=c?"Top":"Left",f=d.toLowerCase(),p=c?"left":"top",m=c?"bottom":"right",x=GK(n)[u];l[m]-x<s[f]&&(e.offsets.popper[f]-=s[f]-(l[m]-x)),l[f]+x>s[m]&&(e.offsets.popper[f]+=l[f]+x-s[m]),e.offsets.popper=Tu(e.offsets.popper);var y=l[f]+l[u]/2-x/2,v=yf(e.instance.popper),b=parseFloat(v["margin"+d]),w=parseFloat(v["border"+d+"Width"]),S=y-e.offsets.popper[f]-b-w;return S=Math.max(Math.min(s[u]-x,S),0),e.arrowElement=n,e.offsets.arrow=(r={},Zh(r,f,Math.round(S)),Zh(r,p,""),r),e}function h_e(e){return e==="end"?"start":e==="start"?"end":e}var eY=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],J2=eY.slice(3);function KL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=J2.indexOf(e),n=J2.slice(r+1).concat(J2.slice(0,r));return t?n.reverse():n}var Q2={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function p_e(e,t){if(XK(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=g4(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],a=x1(n),i=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case Q2.FLIP:s=[n,a];break;case Q2.CLOCKWISE:s=KL(n);break;case Q2.COUNTERCLOCKWISE:s=KL(n,!0);break;default:s=t.behavior}return s.forEach(function(l,c){if(n!==l||s.length===c+1)return e;n=e.placement.split("-")[0],a=x1(n);var u=e.offsets.popper,d=e.offsets.reference,f=Math.floor,p=n==="left"&&f(u.right)>f(d.left)||n==="right"&&f(u.left)<f(d.right)||n==="top"&&f(u.bottom)>f(d.top)||n==="bottom"&&f(u.top)<f(d.bottom),m=f(u.left)<f(r.left),x=f(u.right)>f(r.right),y=f(u.top)<f(r.top),v=f(u.bottom)>f(r.bottom),b=n==="left"&&m||n==="right"&&x||n==="top"&&y||n==="bottom"&&v,w=["top","bottom"].indexOf(n)!==-1,S=!!t.flipVariations&&(w&&i==="start"&&m||w&&i==="end"&&x||!w&&i==="start"&&y||!w&&i==="end"&&v),j=!!t.flipVariationsByContent&&(w&&i==="start"&&x||w&&i==="end"&&m||!w&&i==="start"&&v||!w&&i==="end"&&y),k=S||j;(p||b||k)&&(e.flipped=!0,(p||b)&&(n=s[c+1]),k&&(i=h_e(i)),e.placement=n+(i?"-"+i:""),e.offsets.popper=Ws({},e.offsets.popper,KK(e.instance.popper,e.offsets.reference,e.placement)),e=YK(e.instance.modifiers,e,"flip"))}),e}function m_e(e){var t=e.offsets,r=t.popper,n=t.reference,a=e.placement.split("-")[0],i=Math.floor,s=["top","bottom"].indexOf(a)!==-1,l=s?"right":"bottom",c=s?"left":"top",u=s?"width":"height";return r[l]<i(n[c])&&(e.offsets.popper[c]=i(n[c])-r[u]),r[c]>i(n[l])&&(e.offsets.popper[c]=i(n[l])),e}function g_e(e,t,r,n){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],s=a[2];if(!i)return e;if(s.indexOf("%")===0){var l=void 0;switch(s){case"%p":l=r;break;case"%":case"%r":default:l=n}var c=Tu(l);return c[t]/100*i}else if(s==="vh"||s==="vw"){var u=void 0;return s==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*i}else return i}function x_e(e,t,r,n){var a=[0,0],i=["right","left"].indexOf(n)!==-1,s=e.split(/(\+|\-)/).map(function(d){return d.trim()}),l=s.indexOf(Ux(s,function(d){return d.search(/,|\s/)!==-1}));s[l]&&s[l].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=l!==-1?[s.slice(0,l).concat([s[l].split(c)[0]]),[s[l].split(c)[1]].concat(s.slice(l+1))]:[s];return u=u.map(function(d,f){var p=(f===1?!i:i)?"height":"width",m=!1;return d.reduce(function(x,y){return x[x.length-1]===""&&["+","-"].indexOf(y)!==-1?(x[x.length-1]=y,m=!0,x):m?(x[x.length-1]+=y,m=!1,x):x.concat(y)},[]).map(function(x){return g_e(x,p,t,r)})}),u.forEach(function(d,f){d.forEach(function(p,m){y4(p)&&(a[f]+=p*(d[m-1]==="-"?-1:1))})}),a}function y_e(e,t){var r=t.offset,n=e.placement,a=e.offsets,i=a.popper,s=a.reference,l=n.split("-")[0],c=void 0;return y4(+r)?c=[+r,0]:c=x_e(r,i,s,l),l==="left"?(i.top+=c[0],i.left-=c[1]):l==="right"?(i.top+=c[0],i.left+=c[1]):l==="top"?(i.left+=c[0],i.top-=c[1]):l==="bottom"&&(i.left+=c[0],i.top+=c[1]),e.popper=i,e}function v_e(e,t){var r=t.boundariesElement||Jh(e.instance.popper);e.instance.reference===r&&(r=Jh(r));var n=x4("transform"),a=e.instance.popper.style,i=a.top,s=a.left,l=a[n];a.top="",a.left="",a[n]="";var c=g4(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);a.top=i,a.left=s,a[n]=l,t.boundaries=c;var u=t.priority,d=e.offsets.popper,f={primary:function(m){var x=d[m];return d[m]<c[m]&&!t.escapeWithReference&&(x=Math.max(d[m],c[m])),Zh({},m,x)},secondary:function(m){var x=m==="right"?"left":"top",y=d[x];return d[m]>c[m]&&!t.escapeWithReference&&(y=Math.min(d[x],c[m]-(m==="right"?d.width:d.height))),Zh({},x,y)}};return u.forEach(function(p){var m=["left","top"].indexOf(p)!==-1?"primary":"secondary";d=Ws({},d,f[m](p))}),e.offsets.popper=d,e}function b_e(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var a=e.offsets,i=a.reference,s=a.popper,l=["bottom","top"].indexOf(r)!==-1,c=l?"left":"top",u=l?"width":"height",d={start:Zh({},c,i[c]),end:Zh({},c,i[c]+i[u]-s[u])};e.offsets.popper=Ws({},s,d[n])}return e}function w_e(e){if(!ZK(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=Ux(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function __e(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,a=n.popper,i=n.reference,s=["left","right"].indexOf(r)!==-1,l=["top","left"].indexOf(r)===-1;return a[s?"left":"top"]=i[r]-(l?a[s?"width":"height"]:0),e.placement=x1(t),e.offsets.popper=Tu(a),e}var S_e={shift:{order:100,enabled:!0,fn:b_e},offset:{order:200,enabled:!0,fn:y_e,offset:0},preventOverflow:{order:300,enabled:!0,fn:v_e,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:m_e},arrow:{order:500,enabled:!0,fn:f_e,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:p_e,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:__e},hide:{order:800,enabled:!0,fn:w_e},computeStyle:{order:850,enabled:!0,fn:d_e,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:o_e,onLoad:l_e,gpuAcceleration:void 0}},E_e={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:S_e},Og=(function(){function e(t,r){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ywe(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Vwe(this.update.bind(this)),this.options=Ws({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(Ws({}
625,e.Defaults.modifiers,a.modifiers)).forEach(function(s){n.options.modifiers[s]=Ws({},e.Defaults.modifiers[s]||{},a.modifiers?a.modifiers[s]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(s){return Ws({name:s},n.options.modifiers[s])}).sort(function(s,l){return s.order-l.order}),this.modifiers.forEach(function(s){s.enabled&&BK(s.onLoad)&&s.onLoad(n.reference,n.popper,n.options,s,n.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return Xwe(e,[{key:"update",value:function(){return e_e.call(this)}},{key:"destroy",value:function(){return t_e.call(this)}},{key:"enableEventListeners",value:function(){return n_e.call(this)}},{key:"disableEventListeners",value:function(){return i_e.call(this)}}]),e})();Og.Utils=(typeof window<"u"?window:global).PopperUtils;Og.placements=eY;Og.Defaults=E_e;var k_e=["innerHTML","ownerDocument","style","attributes","nodeValue"],N_e=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],T_e=["bigint","boolean","null","number","string","symbol","undefined"];function d_(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(j_e(t))return t}function Fo(e){return function(t){return d_(t)===e}}function j_e(e){return N_e.includes(e)}function em(e){return function(t){return typeof t===e}}function A_e(e){return T_e.includes(e)}function He(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(He.array(e))return"Array";if(He.plainFunction(e))return"Function";var t=d_(e);return t||"Object"}He.array=Array.isArray;He.arrayOf=function(e,t){return!He.array(e)&&!He.function(t)?!1:e.every(function(r){return t(r)})};He.asyncGeneratorFunction=function(e){return d_(e)==="AsyncGeneratorFunction"};He.asyncFunction=Fo("AsyncFunction");He.bigint=em("bigint");He.boolean=function(e){return e===!0||e===!1};He.date=Fo("Date");He.defined=function(e){return!He.undefined(e)};He.domElement=function(e){return He.object(e)&&!He.plainObject(e)&&e.nodeType===1&&He.string(e.nodeName)&&k_e.every(function(t){return t in e})};He.empty=function(e){return He.string(e)&&e.length===0||He.array(e)&&e.length===0||He.object(e)&&!He.map(e)&&!He.set(e)&&Object.keys(e).length===0||He.set(e)&&e.size===0||He.map(e)&&e.size===0};He.error=Fo("Error");He.function=em("function");He.generator=function(e){return He.iterable(e)&&He.function(e.next)&&He.function(e.throw)};He.generatorFunction=Fo("GeneratorFunction");He.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};He.iterable=function(e){return!He.nullOrUndefined(e)&&He.function(e[Symbol.iterator])};He.map=Fo("Map");He.nan=function(e){return Number.isNaN(e)};He.null=function(e){return e===null};He.nullOrUndefined=function(e){return He.null(e)||He.undefined(e)};He.number=function(e){return em("number")(e)&&!He.nan(e)};He.numericString=function(e){return He.string(e)&&e.length>0&&!Number.isNaN(Number(e))};He.object=function(e){return!He.nullOrUndefined(e)&&(He.function(e)||typeof e=="object")};He.oneOf=function(e,t){return He.array(e)?e.indexOf(t)>-1:!1};He.plainFunction=Fo("Function");He.plainObject=function(e){if(d_(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};He.primitive=function(e){return He.null(e)||A_e(typeof e)};He.promise=Fo("Promise");He.propertyOf=function(e,t,r){if(!He.object(e)||!t)return!1;var n=e[t];return He.function(r)?r(n):He.defined(n)};He.regexp=Fo("RegExp");He.set=Fo("Set");He.string=em("string");He.symbol=em("symbol");He.undefined=em("undefined");He.weakMap=Fo("WeakMap");He.weakSet=Fo("WeakSet");function tY(e){return function(t){return typeof t===e}}var C_e=tY("function"),O_e=function(e){return e===null},YL=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},XL=function(e){return!P_e(e)&&!O_e(e)&&(C_e(e)||typeof e=="object")},P_e=tY("undefined"),OC=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
vendor: 2,735 bytes, line 625
625if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function R_e(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=r;n--!==0;)if(!Di(e[n],t[n]))return!1;return!0}function I_e(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=new DataView(e.buffer),n=new DataView(t.buffer),a=e.byteLength;a--;)if(r.getUint8(a)!==n.getUint8(a))return!1;return!0}function F_e(e,t){var r,n,a,i;if(e.size!==t.size)return!1;try{for(var s=OC(e.entries()),l=s.next();!l.done;l=s.next()){var c=l.value;if(!t.has(c[0]))return!1}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}try{for(var u=OC(e.entries()),d=u.next();!d.done;d=u.next()){var c=d.value;if(!Di(c[1],t.get(c[0])))return!1}}catch(f){a={error:f}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(a)throw a.error}}return!0}function M_e(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var a=OC(e.entries()),i=a.next();!i.done;i=a.next()){var s=i.value;if(!t.has(s[0]))return!1}}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0}function Di(e,t){if(e===t)return!0;if(e&&XL(e)&&t&&XL(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return R_e(e,t);if(e instanceof Map&&t instanceof Map)return F_e(e,t);if(e instanceof Set&&t instanceof Set)return M_e(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return I_e(e,t);if(YL(e)&&YL(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var a=r.length;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(var a=r.length;a--!==0;){var i=r[a];if(!(i==="_owner"&&e.$$typeof)&&!Di(e[i],t[i]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}function D_e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(function(r){return He.string(r)||He.array(r)||He.plainObject(r)})}function L_e(e,t,r){return rY(e,t)?[e,t].every(He.array)?!e.some(t$(r))&&t.some(t$(r)):[e,t].every(He.plainObject)?!Object.entries(e).some(e$(r))&&Object.entries(t).some(e$(r)):t===r:!1}function JL(e,t,r){var n=r.actual,a=r.key,i=r.previous,s=r.type,l=ll(e,a),c=ll(t,a),u=[l,c].every(He.number)&&(s==="increased"?l<c:l>c);return He.undefined(n)||(u=u&&c===n),He.undefined(i)||(u=u&&l===i),u}function QL(e,t,r){var n=r.key,a=r.type,i=r.value,s=ll(e,n),l=ll(t,n),c=a==="added"?s:l,u=a==="added"?l:s;
625if(!He.nullOrUndefined(i)){if(He.defined(c)){if(He.array(c)||He.plainObject(c))return L_e(c,u,i)}else return Di(u,i);return!1}return[s,l].every(He.array)?!u.every(v4(c)):[s,l].every(He.plainObject)?$_e(Object.keys(c),Object.keys(u)):![s,l].every(function(d){return He.primitive(d)&&He.defined(d)})&&(a==="added"?!He.defined(s)&&He.defined(l):He.defined(s)&&!He.defined(l))}function ZL(e,t,r){var n=r===void 0?{}:r,a=n.key,i=ll(e,a),s=ll(t,a);if(!rY(i,s))throw new TypeError("Inputs have different types");if(!D_e(i,s))throw new TypeError("Inputs don't have length");return[i,s].every(He.plainObject)&&(i=Object.keys(i),s=Object.keys(s)),[i,s]}function e$(e){return function(t){var r=t[0],n=t[1];return He.array(e)?Di(e,n)||e.some(function(a){return Di(a,n)||He.array(n)&&v4(n)(a)}):He.plainObject(e)&&e[r]?!!e[r]&&Di(e[r],n):Di(e,n)}}function $_e(e,t){return t.some(function(r){return!e.includes(r)})}function t$(e){return function(t){return He.array(e)?e.some(function(r){return Di(r,t)||He.array(t)&&v4(t)(r)}):Di(e,t)}}function s0(e,t){return He.array(e)?e.some(function(r){return Di(r,t)}):Di(e,t)}function v4(e){return function(t){return e.some(function(r){return Di(r,t)})}}function rY(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(He.array)||e.every(He.number)||e.every(He.plainObject)||e.every(He.string)}function ll(e,t){if(He.plainObject(e)||He.array(e)){if(He.string(t)){var r=t.split(".");return r.reduce(function(n,a){return n&&n[a]},e)}return He.number(t)?e[t]:e}return e}function B_e(e,t){if([e,t].some(He.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(f){return He.plainObject(f)||He.array(f)}))throw new Error("Expected plain objects or array");var r=function(f,p){try{return QL(e,t,{key:f,type:"added",value:p})}catch{return!1}},n=function(f,p,m){try{var x=ll(e,f),y=ll(t,f),v=He.defined(p),b=He.defined(m);if(v||b){var w=b?s0(m,x):!s0(p,x),S=s0(p,y);return w&&S}return[x,y].every(He.array)||[x,y].every(He.plainObject)?!Di(x,y):x!==y}catch{return!1}},a=function(f,p,m){if(!He.defined(f))return!1;try{var x=ll(e,f),y=ll(t,f),v=He.defined(m);return s0(p,x)&&(v?s0(m,y):!v)}catch{return!1}},i=function(f,p){return He.defined(f)?n(f,p):!1},s=function(f,p,m){if(!He.defined(f))return!1;try{return JL(e,t,{key:f,actual:p,previous:m,type:"decreased"})}catch{return!1}},l=function(f){try{var p=ZL(e,t,{key:f}),m=p[0],x=p[1];return!!m.length&&!x.length}catch{return!1}},c=function(f){try{var p=ZL(e,t,{key:f}),m=p[0],x=p[1];return!m.length&&!!x.length}catch{return!1}},u=function(f,p,m){if(!He.defined(f))return!1;try{return JL(e,t,{key:f,actual:p,previous:m,type:"increased"})}catch{return!1}},d=function(f,p){try{return QL(e,t,{key:f,type:"removed",value:p})}catch{return!1}};return{added:r,changed:n,changedFrom:a,changedTo:i,decreased:s,emptied:l,filled:c,increased:u,removed:d}}function r$(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<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r$(Object(r),!0).forEach(function(n){Ha(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U_e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aY(n.key),n)}}function Hx(e,t,r){return t&&U_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ha(e,t,r){return t=aY(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qx(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PC(e,t)}
vendor: 5,034 bytes, line 625
625function y1(e){return y1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},y1(e)}function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},PC(e,t)}function z_e(){if(typeof Reflect>"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 H_e(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function nY(e,t){if(e==null)return{};var r=H_e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ul(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q_e(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ul(e)}function Wx(e){var t=z_e();return function(){var n=y1(e),a;if(t){var i=y1(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return q_e(this,a)}}function W_e(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aY(e){var t=W_e(e,"string");return typeof t=="symbol"?t:String(t)}var V_e={flip:{padding:20},preventOverflow:{padding:10}},G_e="The typeValidator argument must be a function with the signature function(props, propName, componentName).",K_e="The error message is optional, but must be a string if provided.";function Y_e(e,t,r,n){return typeof e=="boolean"?e:typeof e=="function"?e(t,r,n):e?!!e:!1}function X_e(e,t){return Object.hasOwnProperty.call(e,t)}function J_e(e,t,r,n){return new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(r,"`."))}function Q_e(e,t){if(typeof e!="function")throw new TypeError(G_e);if(t&&typeof t!="string")throw new TypeError(K_e)}function n$(e,t,r){return Q_e(e,r),function(n,a,i){for(var s=arguments.length,l=new Array(s>3?s-3:0),c=3;c<s;c++)l[c-3]=arguments[c];return Y_e(t,n,a,i)?X_e(n,a)?e.apply(void 0,[n,a,i].concat(l)):J_e(n,a,i):e.apply(void 0,[n,a,i].concat(l))}}var hr={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing"},o0=L0.createPortal!==void 0;function el(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Z2(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function zv(e){var t=e.title,r=e.data,n=e.warn,a=n===void 0?!1:n,i=e.debug,s=i===void 0?!1:i,l=a?console.warn||console.error:console.log;s&&t&&r&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(r)?r.forEach(function(c){He.plainObject(c)&&c.key?l.apply(console,[c.key,c.value]):l.apply(console,[c])}):l.apply(console,[r]),console.groupEnd())}function Z_e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,r,n)}function eSe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,r,n)}function tSe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a;a=function(s){r(s),eSe(e,t,a)},Z_e(e,t,a,n)}function a$(){}var iY=(function(e){qx(r,e);var t=Wx(r);function r(){return zx(this,r),t.apply(this,arguments)}return Hx(r,[{key:"componentDidMount",value:function(){el()&&(this.node||this.appendNode(),o0||this.renderPortal())}},{key:"componentDidUpdate",value:function(){el()&&(o0||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!el()||!this.node||(o0||L0.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var a=this.props,i=a.id,s=a.zIndex;this.node||(this.node=document.createElement("div"),i&&(this.node.id=i),s&&(this.node.style.zIndex=s),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!el())return null;var a=this.props,i=a.children,s=a.setRef;if(this.node||this.appendNode(),o0)return L0.createPortal(i,this.node);var l=L0.unstable_renderSubtreeIntoContainer(this,i.length>1?se.createElement("div",null,i):i[0],this.node);return s(l),null}},{key:"renderReact16",value:function(){var a=this.props,i=a.hasChildren,s=a.placement,l=a.target;return i?this.renderPortal():l||s==="center"?this.renderPortal():null}},{key:"render",value:function(){return o0?this.renderReact16():null}}]),r})(se.Component);Ha(iY,"propTypes",{children:Q.oneOfType([Q.element,Q.array]),hasChildren:Q.bool,id:Q.oneOfType([Q.string,Q.number]),placement:Q.string,
625setRef:Q.func.isRequired,target:Q.oneOfType([Q.object,Q.string]),zIndex:Q.number});var sY=(function(e){qx(r,e);var t=Wx(r);function r(){return zx(this,r),t.apply(this,arguments)}return Hx(r,[{key:"parentStyle",get:function(){var a=this.props,i=a.placement,s=a.styles,l=s.arrow.length,c={pointerEvents:"none",position:"absolute",width:"100%"};return i.startsWith("top")?(c.bottom=0,c.left=0,c.right=0,c.height=l):i.startsWith("bottom")?(c.left=0,c.right=0,c.top=0,c.height=l):i.startsWith("left")?(c.right=0,c.top=0,c.bottom=0):i.startsWith("right")&&(c.left=0,c.top=0),c}},{key:"render",value:function(){var a=this.props,i=a.placement,s=a.setArrowRef,l=a.styles,c=l.arrow,u=c.color,d=c.display,f=c.length,p=c.margin,m=c.position,x=c.spread,y={display:d,position:m},v,b=x,w=f;return i.startsWith("top")?(v="0,0 ".concat(b/2,",").concat(w," ").concat(b,",0"),y.bottom=0,y.marginLeft=p,y.marginRight=p):i.startsWith("bottom")?(v="".concat(b,",").concat(w," ").concat(b/2,",0 0,").concat(w),y.top=0,y.marginLeft=p,y.marginRight=p):i.startsWith("left")?(w=x,b=f,v="0,0 ".concat(b,",").concat(w/2," 0,").concat(w),y.right=0,y.marginTop=p,y.marginBottom=p):i.startsWith("right")&&(w=x,b=f,v="".concat(b,",").concat(w," ").concat(b,",0 0,").concat(w/2),y.left=0,y.marginTop=p,y.marginBottom=p),se.createElement("div",{className:"__floater__arrow",style:this.parentStyle},se.createElement("span",{ref:s,style:y},se.createElement("svg",{width:b,height:w,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},se.createElement("polygon",{points:v,fill:u}))))}}]),r})(se.Component);Ha(sY,"propTypes",{placement:Q.string.isRequired,setArrowRef:Q.func.isRequired,styles:Q.object.isRequired});var rSe=["color","height","width"];function oY(e){var t=e.handleClick,r=e.styles,n=r.color,a=r.height,i=r.width,s=nY(r,rSe);return se.createElement("button",{"aria-label":"close",onClick:t,style:s,type:"button"},se.createElement("svg",{width:"".concat(i,"px"),height:"".concat(a,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},se.createElement("g",null,se.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:n}))))}oY.propTypes={handleClick:Q.func.isRequired,styles:Q.object.isRequired};function lY(e){var t=e.content,r=e.footer,n=e.handleClick,a=e.open,i=e.positionWrapper,s=e.showCloseButton,l=e.title,c=e.styles,u={content:se.isValidElement(t)?t:se.createElement("div",{className:"__floater__content",style:c.content},t)};return l&&(u.title=se.isValidElement(l)?l:se.createElement("div",{className:"__floater__title",style:c.title},l)),r&&(u.footer=se.isValidElement(r)?r:se.createElement("div",{className:"__floater__footer",style:c.footer},r)),(s||i)&&!He.boolean(a)&&(u.close=se.createElement(oY,{styles:c.close,handleClick:n})),se.createElement("div",{className:"__floater__container",style:c.container},u.close,u.title,u.content,u.footer)}lY.propTypes={content:Q.node.isRequired,footer:Q.node,handleClick:Q.func.isRequired,open:Q.bool,positionWrapper:Q.bool.isRequired,showCloseButton:Q.bool.isRequired,styles:Q.object.isRequired,title:Q.node};var cY=(function(e){qx(r,e);var t=Wx(r);function r(){return zx(this,r),t.apply(this,arguments)}return Hx(r,[{key:"style",get:function(){var a=this.props,i=a.disableAnimation,s=a.component,l=a.placement,c=a.hideArrow,u=a.status,d=a.styles,f=d.arrow.length,p=d.floater,m=d.floaterCentered,x=d.floaterClosing,y=d.floaterOpening,v=d.floaterWithAnimation,b=d.floaterWithComponent,w={};return c||(l.startsWith("top")?w.padding="0 0 ".concat(f,"px"):l.startsWith("bottom")?w.padding="".concat(f,"px 0 0"):l.startsWith("left")?w.padding="0 ".concat(f,"px 0 0"):l.startsWith("right")&&(w.padding="0 0 0 ".concat(f,"px"))),[hr.OPENING,hr.OPEN].indexOf(u)!==-1&&(w=fn(fn({},w),y)),u===hr.CLOSING&&(w=fn(fn({},w),x)),u===hr.OPEN&&!i&&(w=fn(fn({},w),v)),l==="center"&&(w=fn(fn({},w),m)),s&&(w=fn(fn({},w),b)),fn(fn({},p),w)}},{key:"render",value:function(){var a=this.props,i=a.component,s=a.handleClick,l=a.hideArrow,c=a.setFloaterRef,u=a.status,d={},f=["__floater"];return i?se.isValidElement(i)?d.content=se.cloneElement(i,{closeFn:s}):d.content=i({closeFn:s}):d.content=se.createElement(lY,this.props),u===hr.OPEN&&f.push("__floater__open"),l||(d.arrow=se.createElement(sY,this.props)),se.createElement("div",{ref:c,className:f.join(" "),style:this.style},se.createElement("div",{className:"__floater__body"},d.content,d.arrow))}}]),r})(se.Component);Ha(cY,"propTypes",{component:Q.oneOfType([Q.func,Q.element]),content:Q.node,disableAnimation:Q.bool.isRequired,footer:Q.node,handleClick:Q.func.isRequired,hideArrow:Q.bool.isRequired,open:Q.bool,placement:Q.string.isRequired,positionWrapper:Q.bool.isRequired,setArrowRef:Q.func.isRequired,setFloaterRef:Q.func.isRequired,showCloseButton:Q.bool,status:Q.string.isRequired,styles:Q.object.isRequired,title:Q.node});var uY=(function(e){qx(r,e);var t=Wx(r);function r(){return zx(this,r),t.apply(this,arguments)}return Hx(r,[{key:"render",value:function(){var a=this.props,i=a.children,s=a.handleClick,l=a.handleMouseEnter,c=a.handleMouseLeave,u=a.setChildRef,d=a.setWrapperRef,f=a.style,p=a.styles,m;if(i)if(se.Children.count(i)===1)if(!se.isValidElement(i))m=se.createElement("span",null,i);else{var x=He.function(i.type)?"innerRef":"ref";m=se.cloneElement(se.Children.only(i),Ha({},x,u))}else m=i;return m?se.createElement("span",{ref:d,style:fn(fn({},p),f),onClick:s,onMouseEnter:l,onMouseLeave:c},m):null}}]),r})(se.Component);Ha(uY,"propTypes",{children:Q.node,handleClick:Q.func.isRequired,handleMouseEnter:Q.func.isRequired,handleMouseLeave:Q.func.isRequired,setChildRef:Q.func.isRequired,setWrapperRef:Q.func.isRequired,style:Q.object,styles:Q.object.isRequired});var nSe={zIndex:100};function aSe(e){var t=Eo(nSe,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex}
vendor: 5,024 bytes, line 625
625,floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var iSe=["arrow","flip","offset"],sSe=["position","top","right","bottom","left"],b4=(function(e){qx(r,e);var t=Wx(r);function r(n){var a;return zx(this,r),a=t.call(this,n),Ha(Ul(a),"setArrowRef",function(i){a.arrowRef=i}),Ha(Ul(a),"setChildRef",function(i){a.childRef=i}),Ha(Ul(a),"setFloaterRef",function(i){a.floaterRef=i}),Ha(Ul(a),"setWrapperRef",function(i){a.wrapperRef=i}),Ha(Ul(a),"handleTransitionEnd",function(){var i=a.state.status,s=a.props.callback;a.wrapperPopper&&a.wrapperPopper.instance.update(),a.setState({status:i===hr.OPENING?hr.OPEN:hr.IDLE},function(){var l=a.state.status;s(l===hr.OPEN?"open":"close",a.props)})}),Ha(Ul(a),"handleClick",function(){var i=a.props,s=i.event,l=i.open;if(!He.boolean(l)){var c=a.state,u=c.positionWrapper,d=c.status;(a.event==="click"||a.event==="hover"&&u)&&(zv({title:"click",data:[{event:s,status:d===hr.OPEN?"closing":"opening"}],debug:a.debug}),a.toggle())}}),Ha(Ul(a),"handleMouseEnter",function(){var i=a.props,s=i.event,l=i.open;if(!(He.boolean(l)||Z2())){var c=a.state.status;a.event==="hover"&&c===hr.IDLE&&(zv({title:"mouseEnter",data:[{key:"originalEvent",value:s}],debug:a.debug}),clearTimeout(a.eventDelayTimeout),a.toggle())}}),Ha(Ul(a),"handleMouseLeave",function(){var i=a.props,s=i.event,l=i.eventDelay,c=i.open;if(!(He.boolean(c)||Z2())){var u=a.state,d=u.status,f=u.positionWrapper;a.event==="hover"&&(zv({title:"mouseLeave",data:[{key:"originalEvent",value:s}],debug:a.debug}),l?[hr.OPENING,hr.OPEN].indexOf(d)!==-1&&!f&&!a.eventDelayTimeout&&(a.eventDelayTimeout=setTimeout(function(){delete a.eventDelayTimeout,a.toggle()},l*1e3)):a.toggle(hr.IDLE))}}),a.state={currentPlacement:n.placement,needsUpdate:!1,positionWrapper:n.wrapperOptions.position&&!!n.target,status:hr.INIT,statusWrapper:hr.INIT},a._isMounted=!1,a.hasMounted=!1,el()&&window.addEventListener("load",function(){a.popper&&a.popper.instance.update(),a.wrapperPopper&&a.wrapperPopper.instance.update()}),a}return Hx(r,[{key:"componentDidMount",value:function(){if(el()){var a=this.state.positionWrapper,i=this.props,s=i.children,l=i.open,c=i.target;this._isMounted=!0,zv({title:"init",data:{hasChildren:!!s,hasTarget:!!c,isControlled:He.boolean(l),positionWrapper:a,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!s&&c&&He.boolean(l)}}},{key:"componentDidUpdate",value:function(a,i){if(el()){var s=this.props,l=s.autoOpen,c=s.open,u=s.target,d=s.wrapperOptions,f=B_e(i,this.state),p=f.changedFrom,m=f.changed;if(a.open!==c){var x;He.boolean(c)&&(x=c?hr.OPENING:hr.CLOSING),this.toggle(x)}(a.wrapperOptions.position!==d.position||a.target!==u)&&this.changeWrapperPosition(this.props),m("status",hr.IDLE)&&c?this.toggle(hr.OPEN):p("status",hr.INIT,hr.IDLE)&&l&&this.toggle(hr.OPEN),this.popper&&m("status",hr.OPENING)&&this.popper.instance.update(),this.floaterRef&&(m("status",hr.OPENING)||m("status",hr.CLOSING))&&tSe(this.floaterRef,"transitionend",this.handleTransitionEnd),m("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){el()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,s=this.state.positionWrapper,l=this.props,c=l.disableFlip,u=l.getPopper,d=l.hideArrow,f=l.offset,p=l.placement,m=l.wrapperOptions,x=p==="top"||p==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(p==="center")this.setState({status:hr.IDLE});else if(i&&this.floaterRef){var y=this.options,v=y.arrow,b=y.flip,w=y.offset,S=nY(y,iSe);new Og(i,this.floaterRef,{placement:p,modifiers:fn({arrow:fn({enabled:!d,element:this.arrowRef},v),flip:fn({enabled:!c,behavior:x},b),offset:fn({offset:"0, ".concat(f,"px")},w)},S),onCreate:function(E){var T;if(a.popper=E,!((T=a.floaterRef)!==null&&T!==void 0&&T.isConnected)){a.setState({needsUpdate:!0});return}u(E,"floater"),a._isMounted&&a.setState({currentPlacement:E.placement,status:hr.IDLE}
625),p!==E.placement&&setTimeout(function(){E.instance.update()},1)},onUpdate:function(E){a.popper=E;var T=a.state.currentPlacement;a._isMounted&&E.placement!==T&&a.setState({currentPlacement:E.placement})}})}if(s){var j=He.undefined(m.offset)?0:m.offset;new Og(this.target,this.wrapperRef,{placement:m.placement||p,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(j,"px")},flip:{enabled:!1}},onCreate:function(E){a.wrapperPopper=E,a._isMounted&&a.setState({statusWrapper:hr.IDLE}),u(E,"wrapper"),p!==E.placement&&setTimeout(function(){E.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var a=this;this.floaterRefInterval=setInterval(function(){var i;(i=a.floaterRef)!==null&&i!==void 0&&i.isConnected&&(clearInterval(a.floaterRefInterval),a.setState({needsUpdate:!1}),a.initPopper())},50)}},{key:"changeWrapperPosition",value:function(a){var i=a.target,s=a.wrapperOptions;this.setState({positionWrapper:s.position&&!!i})}},{key:"toggle",value:function(a){var i=this.state.status,s=i===hr.OPEN?hr.CLOSING:hr.OPENING;He.undefined(a)||(s=a),this.setState({status:s})}},{key:"debug",get:function(){var a=this.props.debug;return a||el()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var a=this.props,i=a.disableHoverToClick,s=a.event;return s==="hover"&&Z2()&&!i?"click":s}},{key:"options",get:function(){var a=this.props.options;return Eo(V_e,a||{})}},{key:"styles",get:function(){var a=this,i=this.state,s=i.status,l=i.positionWrapper,c=i.statusWrapper,u=this.props.styles,d=Eo(aSe(u),u);if(l){var f;[hr.IDLE].indexOf(s)===-1||[hr.IDLE].indexOf(c)===-1?f=d.wrapperPosition:f=this.wrapperPopper.styles,d.wrapper=fn(fn({},d.wrapper),f)}if(this.target){var p=window.getComputedStyle(this.target);this.wrapperStyles?d.wrapper=fn(fn({},d.wrapper),this.wrapperStyles):["relative","static"].indexOf(p.position)===-1&&(this.wrapperStyles={},l||(sSe.forEach(function(m){a.wrapperStyles[m]=p[m]}),d.wrapper=fn(fn({},d.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return d}},{key:"target",get:function(){if(!el())return null;var a=this.props.target;return a?He.domElement(a)?a:document.querySelector(a):this.childRef||this.wrapperRef}},{key:"render",value:function(){var a=this.state,i=a.currentPlacement,s=a.positionWrapper,l=a.status,c=this.props,u=c.children,d=c.component,f=c.content,p=c.disableAnimation,m=c.footer,x=c.hideArrow,y=c.id,v=c.open,b=c.showCloseButton,w=c.style,S=c.target,j=c.title,k=se.createElement(uY,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:w,styles:this.styles.wrapper},u),E={};return s?E.wrapperInPortal=k:E.wrapperAsChildren=k,se.createElement("span",null,se.createElement(iY,{hasChildren:!!u,id:y,placement:i,setRef:this.setFloaterRef,target:S,zIndex:this.styles.options.zIndex},se.createElement(cY,{component:d,content:f,disableAnimation:p,footer:m,handleClick:this.handleClick,hideArrow:x||i==="center",open:v,placement:i,positionWrapper:s,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:b,status:l,styles:this.styles,title:j}),E.wrapperInPortal),E.wrapperAsChildren)}}]),r})(se.Component);Ha(b4,"propTypes",{autoOpen:Q.bool,callback:Q.func,children:Q.node,component:n$(Q.oneOfType([Q.func,Q.element]),function(e){return!e.content}),content:n$(Q.node,function(e){return!e.component}),debug:Q.bool,disableAnimation:Q.bool,disableFlip:Q.bool,disableHoverToClick:Q.bool,event:Q.oneOf(["hover","click"]),eventDelay:Q.number,footer:Q.node,getPopper:Q.func,hideArrow:Q.bool,id:Q.oneOfType([Q.string,Q.number]),offset:Q.number,open:Q.bool,options:Q.object,placement:Q.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:Q.bool,style:Q.object,styles:Q.object,target:Q.oneOfType([Q.object,Q.string]),title:Q.node,wrapperOptions:Q.shape({offset:Q.number,placement:Q.oneOf(["top","top-start","to
625p-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:Q.bool})});Ha(b4,"defaultProps",{autoOpen:!1,callback:a$,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:a$,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});var oSe=Object.defineProperty,lSe=(e,t,r)=>t in e?oSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,St=(e,t,r)=>lSe(e,typeof t!="symbol"?t+"":t,r),Tr={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},ss={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found"},Yt={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},cr={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished"};function au(){var e;return!!(typeof window<"u"&&((e=window.document)!=null&&e.createElement))}function dY(e){return e?e.getBoundingClientRect():null}function cSe(e=!1){const{body:t,documentElement:r}=document;if(!t||!r)return 0;if(e){const n=[t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight].sort((i,s)=>i-s),a=Math.floor(n.length/2);return n.length%2===0?(n[a-1]+n[a])/2:n[a]}return Math.max(t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function Yl(e){if(typeof e=="string")try{return document.querySelector(e)}catch{return null}return e}function uSe(e){return!e||e.nodeType!==1?null:getComputedStyle(e)}function Pg(e,t,r){if(!e)return _d();const n=$K(e);if(n){if(n.isSameNode(_d()))return r?document:_d();if(!(n.scrollHeight>n.offsetHeight)&&!t)return n.style.overflow="initial",_d()}return n}function f_(e,t){if(!e)return!1;const r=Pg(e,t);return r?!r.isSameNode(_d()):!1}function dSe(e){return e.offsetParent!==document.body}function ep(e,t="fixed"){if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:r}=e,n=uSe(e);return r==="BODY"||r==="HTML"?!1:n&&n.position===t?!0:e.parentNode?ep(e.parentNode,t):!1}function fSe(e){var t;if(!e)return!1;let r=e;for(;r&&r!==document.body;){if(r instanceof HTMLElement){const{display:n,visibility:a}=getComputedStyle(r);if(n==="none"||a==="hidden")return!1}r=(t=r.parentElement)!=null?t:null}return!0}function hSe(e,t,r){var n,a,i;const s=dY(e),l=Pg(e,r),c=f_(e,r),u=ep(e);let d=0,f=(n=s==null?void 0:s.top)!=null?n:0;if(c&&u){const p=(a=e==null?void 0:e.offsetTop)!=null?a:0,m=(i=l==null?void 0:l.scrollTop)!=null?i:0;f=p-m}else l instanceof HTMLElement&&(d=l.scrollTop,!c&&!ep(e)&&(f+=d),l.isSameNode(_d())||(f+=_d().scrollTop));return Math.floor(f-t)}function pSe(e,t,r){var n;if(!e)return 0;const{offsetTop:a=0,scrollTop:i=0}=(n=$K(e))!=null?n:{};let s=e.getBoundingClientRect().top+i;a&&(f_(e,r)||dSe(e))&&(s-=a);const l=Math.floor(s-t);return l<0?0:l}function _d(){var e;return(e=document.scrollingElement)!=null?e:document.documentElement}function mSe(e,t){const{duration:r,element:n}=t;return new Promise((a,i)=>{const{scrollTop:s}=n,l=e>s?e-s:s-e;Iwe.top(n,e,{duration:l<100?50:r},c=>c&&c.message!=="Element already at target scroll position"?i(c):a())})}var l0=Ld.createPortal!==void 0;function fY(e=navigator.userAgent){let t=e;return typeof window>"u"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":window.opera||e.includes(" OPR/")?t="opera":typeof window.InstallTrigger<"u"?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function Bb(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function tl(e,t={}){const{defaultValue:r,step:n,steps:a}=t;let i=zL(e);if(i)(i.includes("{step}")||i.includes("{steps}"))&&n&&a&&(i=i.replace("{step}",n.toString()).replace("{steps}",a.toString()));else if(N.isValidElement(e)&&!Object.values(e.props).length&&Bb(e.type)==="function"){const s=e.type({});i=tl(s,t)}else i=zL(r);return i}function gSe(e,t){return!_t.plainObject(e)||!_t.array(t)?!1:Object.keys(e).every(r=>t.includes(r))}function xSe(e){const t=/^#?([\da-f])([\da-f])([\da-f])$/i,r=e.replace(t,(a,i,s,l)=>i+i+s+s+l+l),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(r);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function i$(e){return e.disableBeacon||e.placement==="center"}function s$(){return!["chrome","safari","firefox","opera"].includes(fY())}function ef({data:e,debug:t=!1,title:r,warn:n=!1}){const a=n?console.warn||console.error:console.log;t&&(r&&e?(console.groupCollapsed(`%creact-joyride: ${r}`,"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(e)?e.forEach(i=>
625{_t.plainObject(i)&&i.key?a.apply(console,[i.key,i.value]):a.apply(console,[i])}):a.apply(console,[e]),console.groupEnd()):console.error("Missing title or data props"))}function ySe(e){return Object.keys(e)}function hY(e,...t){if(!_t.plainObject(e))throw new TypeError("Expected an object");const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&(t.includes(n)||(r[n]=e[n]));return r}function vSe(e,...t){if(!_t.plainObject(e))throw new TypeError("Expected an object");if(!t.length)return e;const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&t.includes(n)&&(r[n]=e[n]);return r}function RC(e,t,r){const n=i=>i.replace("{step}",String(t)).replace("{steps}",String(r));if(Bb(e)==="string")return n(e);if(!N.isValidElement(e))return e;const{children:a}=e.props;if(Bb(a)==="string"&&a.includes("{step}"))return N.cloneElement(e,{children:n(a)});if(Array.isArray(a))return N.cloneElement(e,{children:a.map(i=>typeof i=="string"?n(i):RC(i,t,r))});if(Bb(e.type)==="function"&&!Object.values(e.props).length){const i=e.type({});return RC(i,t,r)}return e}function bSe(e){const{isFirstStep:t,lifecycle:r,previousLifecycle:n,scrollToFirstStep:a,step:i,target:s}=e;return!i.disableScrolling&&(!t||a||r===Yt.TOOLTIP)&&i.placement!=="center"&&(!i.isFixed||!ep(s))&&n!==r&&[Yt.BEACON,Yt.TOOLTIP].includes(r)}var wSe={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},pY={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps})",open:"Open the dialog",skip:"Skip"},_Se={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:pY,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},SSe={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},ESe={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},c0={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},o$={borderRadius:4,position:"absolute"};function kSe(e,t){var r,n,a,i,s;const{floaterProps:l,styles:c}=e,u=Eo((r=t.floaterProps)!=null?r:{},l??{}),d=Eo(c??{},(n=t.styles)!=null?n:{}),f=Eo(ESe,d.options||{}),p=t.placement==="center"||t.disableBeacon;let{width:m}=f;window.innerWidth>480&&(m=380),"width"in f&&(m=typeof f.width=="number"&&window.innerWidth<f.width?window.innerWidth-30:f.width);const x={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:f.zIndex},y={beacon:{...c0,display:p?"none":"inline-block",height:f.beaconSize,position:"relative",width:f.beaconSize,zIndex:f.zIndex},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:f.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${xSe(f.primaryColor).join(",")}, 0.2)`,border:`2px solid ${f.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:f.backgroundColor,borderRadius:5,boxSizing:"border-box",color:f.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:m},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:{...c0,backgroundColor:f.primaryColor,borderRadius:4,color:"#fff"},buttonBack:{...c0,color:f.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...c0,color:f.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14},buttonSkip:{...c0,color:f.textColor,fontSize:14},overlay:{...x,backgroundColor:f.overlayColor,mixBlendMode:"hard-light"},overlayLegacy:{...x},overlayLegacyCenter:{...x,backgroundColor:f.overlayColor},spotlight:{...o$,backgroundColor:"gray"},spotlightLegacy:{...o$,boxShadow:`0 0 0 9999px ${f.overlayColor}, ${f.spotlightShadow}`},floaterStyles:{arrow:{color:(s=(i=(a=u==null?void 0:u.styles)==null?void 0:a.arrow)==null?void 0:i.color)!=null?s:f.arrowColor},options:{zIndex:f.zIndex+100}},options:f};return Eo(y,d)}function NSe(e){return vSe(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function th(e,t){var r,n,a,i,s,l;const c=t??{},u=Eo.all([_Se,NSe(e),c],{isMergeableObject:_t.plainObject}),d=kSe(e,u),f=f_(Yl(u.target),u.disableScrollParentFix),p=Eo.all([wSe,(r=e.floaterProps)!=null?r:{},(n=u.floaterProps)!=null?n:{}]);return p.offset=u.offset,p.styles=Eo((a=p.styles)!=null?a:{},d.floaterStyles),p.offset+=(s=(i=e.spotlightPadding)!=null?i:u.spotlightPadding)!=null?s:0,u.placementBeacon&&p.wrapperOptions&&(p.wrapperOptions.placement=u.placementBeacon),f&&p.options.preventOverflow&&(p.options.preventOverflow.boundariesElement="window"),{...u,locale:Eo.all([pY,(l=e.locale)!=null?l:{},u.locale||{}]),floaterProps:p,styles:hY(d,"floaterStyles")}}function mY(e,t=!1){return _t.plainObject(e)?e.target?!0:(ef({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(ef({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function l$(e,t=!1){return _t.array(e)?e.every(r=>mY(r,t)):(ef({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var gY={action:"init",controlled:!1,index:0,lifecycle:Yt.INIT,origin:null,size:0,status:cr.IDLE},c$=ySe(hY(gY,"controlled","size")),TSe=class{constructor(e){St(this,"beaconPopper"),St(this,"tooltipPopper"),St(this,"data",new Map),St(this,"listener"),St(this,"store",new Map),St(this,"addListener",a=>{this.listener=a}),St(this,"setSteps",a=>
625{const{size:i,status:s}=this.getState(),l={size:a.length,status:s};this.data.set("steps",a),s===cr.WAITING&&!i&&a.length&&(l.status=cr.RUNNING),this.setState(l)}),St(this,"getPopper",a=>a==="beacon"?this.beaconPopper:this.tooltipPopper),St(this,"setPopper",(a,i)=>{a==="beacon"?this.beaconPopper=i:this.tooltipPopper=i}),St(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),St(this,"close",(a=null)=>{const{index:i,status:s}=this.getState();s===cr.RUNNING&&this.setState({...this.getNextState({action:Tr.CLOSE,index:i+1,origin:a})})}),St(this,"go",a=>{const{controlled:i,status:s}=this.getState();if(i||s!==cr.RUNNING)return;const l=this.getSteps()[a];this.setState({...this.getNextState({action:Tr.GO,index:a}),status:l?s:cr.FINISHED})}),St(this,"info",()=>this.getState()),St(this,"next",()=>{const{index:a,status:i}=this.getState();i===cr.RUNNING&&this.setState(this.getNextState({action:Tr.NEXT,index:a+1}))}),St(this,"open",()=>{const{status:a}=this.getState();a===cr.RUNNING&&this.setState({...this.getNextState({action:Tr.UPDATE,lifecycle:Yt.TOOLTIP})})}),St(this,"prev",()=>{const{index:a,status:i}=this.getState();i===cr.RUNNING&&this.setState({...this.getNextState({action:Tr.PREV,index:a-1})})}),St(this,"reset",(a=!1)=>{const{controlled:i}=this.getState();i||this.setState({...this.getNextState({action:Tr.RESET,index:0}),status:a?cr.RUNNING:cr.READY})}),St(this,"skip",()=>{const{status:a}=this.getState();a===cr.RUNNING&&this.setState({action:Tr.SKIP,lifecycle:Yt.INIT,status:cr.SKIPPED})}),St(this,"start",a=>{const{index:i,size:s}=this.getState();this.setState({...this.getNextState({action:Tr.START,index:_t.number(a)?a:i},!0),status:s?cr.RUNNING:cr.WAITING})}),St(this,"stop",(a=!1)=>{const{index:i,status:s}=this.getState();[cr.FINISHED,cr.SKIPPED].includes(s)||this.setState({...this.getNextState({action:Tr.STOP,index:i+(a?1:0)}),status:cr.PAUSED})}),St(this,"update",a=>{var i,s;if(!gSe(a,c$))throw new Error(`State is not valid. Valid keys: ${c$.join(", ")}`);this.setState({...this.getNextState({...this.getState(),...a,action:(i=a.action)!=null?i:Tr.UPDATE,origin:(s=a.origin)!=null?s:null},!0)})});const{continuous:t=!1,stepIndex:r,steps:n=[]}=e??{};this.setState({action:Tr.INIT,controlled:_t.number(r),continuous:t,index:_t.number(r)?r:0,lifecycle:Yt.INIT,origin:null,status:n.length?cr.READY:cr.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(n)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:{...gY}}getNextState(e,t=!1){var r,n,a,i,s;const{action:l,controlled:c,index:u,size:d,status:f}=this.getState(),p=_t.number(e.index)?e.index:u,m=c&&!t?u:Math.min(Math.max(p,0),d);return{action:(r=e.action)!=null?r:l,controlled:c,index:m,lifecycle:(n=e.lifecycle)!=null?n:Yt.INIT,origin:(a=e.origin)!=null?a:null,size:(i=e.size)!=null?i:d,status:m===d?cr.FINISHED:(s=e.status)!=null?s:f}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){const t=JSON.stringify(e),r=JSON.stringify(this.getState());return t!==r}setState(e,t=!1){const r=this.getState(),{action:n,index:a,lifecycle:i,origin:s=null,size:l,status:c}={...r,...e};this.store.set("action",n),this.store.set("index",a),this.store.set("lifecycle",i),this.store.set("origin",s),this.store.set("size",l),this.store.set("status",c),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(r)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function jSe(e){return new TSe(e)}function ASe({styles:e}){return N.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:e})}var CSe=ASe,OSe=class extends N.Component{constructor(){super(...arguments),St(this,"isActive",!1),St(this,"resizeTimeout"),St(this,"scrollTimeout"),St(this,"scrollParent"),St(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),St(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:r}=this.props,n=[Yt.INIT,Yt.BEACON,Yt.COMPLETE,Yt.ERROR];return t||(e?n.includes(r):r!==Yt.TOOLTIP)}),St(this,"handleMouseMove",e=>
625{const{mouseOverSpotlight:t}=this.state,{height:r,left:n,position:a,top:i,width:s}=this.spotlightStyles,l=a==="fixed"?e.clientY:e.pageY,c=a==="fixed"?e.clientX:e.pageX,u=l>=i&&l<=i+r,f=c>=n&&c<=n+s&&u;f!==t&&this.updateState({mouseOverSpotlight:f})}),St(this,"handleScroll",()=>{const{target:e}=this.props,t=Yl(e);if(this.scrollParent!==document){const{isScrolling:r}=this.state;r||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else ep(t,"sticky")&&this.updateState({})}),St(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:r=!1,target:n}=this.props,a=Yl(n);this.scrollParent=Pg(a??document.body,r,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:r,lifecycle:n,spotlightClicks:a,target:i}=this.props,{changed:s}=m1(e,this.props);if(s("target")||s("disableScrollParentFix")){const l=Yl(i);this.scrollParent=Pg(l??document.body,r,!0)}s("lifecycle",Yt.TOOLTIP)&&((t=this.scrollParent)==null||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:l}=this.state;l||this.updateState({showSpotlight:!0})},100)),(s("spotlightClicks")||s("disableOverlay")||s("lifecycle"))&&(a&&n===Yt.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):n!==Yt.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),(e=this.scrollParent)==null||e.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:r,styles:n}=this.props;let a=n.overlay;return s$()&&(a=r==="center"?n.overlayLegacyCenter:n.overlayLegacy),{cursor:t?"default":"pointer",height:cSe(),pointerEvents:e?"none":"auto",...a}}get spotlightStyles(){var e,t,r;const{showSpotlight:n}=this.state,{disableScrollParentFix:a=!1,spotlightClicks:i,spotlightPadding:s=0,styles:l,target:c}=this.props,u=Yl(c),d=dY(u),f=ep(u),p=hSe(u,s,a);return{...s$()?l.spotlightLegacy:l.spotlight,height:Math.round(((e=d==null?void 0:d.height)!=null?e:0)+s*2),left:Math.round(((t=d==null?void 0:d.left)!=null?t:0)-s),opacity:n?1:0,pointerEvents:i?"none":"auto",position:f?"fixed":"absolute",top:p,transition:"opacity 0.2s",width:Math.round(((r=d==null?void 0:d.width)!=null?r:0)+s*2)}}updateState(e){this.isActive&&this.setState(t=>({...t,...e}))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:r}=this.props,{hideSpotlight:n,overlayStyles:a,spotlightStyles:i}=this;if(n())return null;let s=r!=="center"&&e&&N.createElement(CSe,{styles:i});if(fY()==="safari"){const{mixBlendMode:l,zIndex:c,...u}=a;s=N.createElement("div",{style:{...u}},s),delete a.backgroundColor}return N.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:a},s)}},PSe=class extends N.Component{constructor(){super(...arguments),St(this,"node",null)}componentDidMount(){const{id:e}=this.props;au()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),l0||this.renderReact15())}componentDidUpdate(){au()&&(l0||this.renderReact15())}componentWillUnmount(){!au()||!this.node||(l0||Ld.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!au())return;const{children:e}=this.props;this.node&&Ld.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!au()||!l0)return null;const{children:e}=this.props;return this.node?Ld.createPortal(e,this.node):null}render(){return l0?this.renderReact16():null}},RSe=class{constructor(t,r){if(St(this,"element"),St(this,"options"),St(this,"canBeTabbed",n=>{const{tabIndex:a}=n;return a===null||a<0?!1:this.canHaveFocus(n)}),St(this,"canHaveFocus",n=>{const a=/input|select|textarea|button|object/,i=n.nodeName.toLowerCase();return(a.test(i)&&!n.getAttribute("disabled")||i==="a"&&!!n.getAttribute("href"))&&this.isVisible(n)}),St(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),St(this,"handleKeyDown",n=>{const{code:a="Tab"}=this.options;n.code===a&&this.interceptTab(n)}),St(this,"interceptTab",n=>{n.preventDefault();const a=this.findValidTabElements(),{shiftKey:i}=n;if(!a.length)return;let s=document.activeElement?a.indexOf(document.activeElement):0;s===-1||!i&&s+1===a.length?s=0:i&&s===0?s=a.length-1:s+=i?-1:1,a[s].focus()}),St(this,"isHidden",n=>{const a=n.offsetWidth<=0&&n.offsetHeight<=0,i=window.getComputedStyle(n);return a&&!n.innerHTML?!0:a&&i.getPropertyValue("overflow")!=="visible"||i.getPropertyValue("display")==="none"}),St(this,"isVisible",n=>{let a=n;for(;a;)if(a instanceof HTMLElement){if(a===document.body)break;if(this.isHidden(a))return!1;a=a.parentNode}return!0}),St(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),St(this,"checkFocus",n=>{document.activeElement!==n&&(n.focus(),window.requestAnimationFrame(()=>this.checkFocus(n)))}),St(this,"setFocus",()=>{const{selector:n}=this.options;if(!n)return;const a=this.element.querySelector(n);a&&window.requestAnimationFrame(()=>this.checkFocus(a))}),!(t instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");
625this.element=t,this.options=r,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},ISe=class extends N.Component{constructor(e){if(super(e),St(this,"beacon",null),St(this,"setBeaconRef",a=>{this.beacon=a}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.id="joyride-beacon-animation",e.nonce&&r.setAttribute("nonce",e.nonce),r.appendChild(document.createTextNode(` 626 @keyframes joyride-beacon-inner { 627 20% { 628 opacity: 0.9; 629 } 630 631 90% { 632 opacity: 0.7; 633 } 634 } 635 636 @keyframes joyride-beacon-outer { 637 0% { 638 transform: scale(1); 639 } 640 641 45% { 642 opacity: 0.7; 643 transform: scale(0.75); 644 } 645 646 100% { 647 opacity: 0.9; 648 transform: scale(1); 649 } 650 } 651 `)),t.appendChild(r)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{_t.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");e!=null&&e.parentNode&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:r,isLastStep:n,locale:a,onClickOrHover:i,size:s,step:l,styles:c}=this.props,u=tl(a.open),d={"aria-label":u,onClick:i,onMouseEnter:i,ref:this.setBeaconRef,title:u};let f;if(e){const p=e;f=N.createElement(p,{continuous:t,index:r,isLastStep:n,size:s,step:l,...d})}else f=N.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:c.beacon,type:"button",...d},N.createElement("span",{style:c.beaconInner}),N.createElement("span",{style:c.beaconOuter}));return f}};function FSe({styles:e,...t}){const{color:r,height:n,width:a,...i}=e;return se.createElement("button",{style:i,type:"button",...t},se.createElement("svg",{height:typeof n=="number"?`${n}px`:n,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof a=="number"?`${a}px`:a,xmlns:"http://www.w3.org/2000/svg"},se.createElement("g",null,se.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var MSe=FSe;function DSe(e){const{backProps:t,closeProps:r,index:n,isLastStep:a,primaryProps:i,skipProps:s,step:l,tooltipProps:c}=e,{content:u,hideBackButton:d,hideCloseButton:f,hideFooter:p,showSkipButton:m,styles:x,title:y}=l,v={};return v.primary=N.createElement("button",{"data-test-id":"button-primary",style:x.buttonNext,type:"button",...i}),m&&!a&&(v.skip=N.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:x.buttonSkip,type:"button",...s})),!d&&n>0&&(v.back=N.createElement("button",{"data-test-id":"button-back",style:x.buttonBack,type:"button",...t})),v.close=!f&&N.createElement(MSe,{"data-test-id":"button-close",styles:x.buttonClose,...r}),N.createElement("div",{key:"JoyrideTooltip","aria-label":tl(y??u),className:"react-joyride__tooltip",style:x.tooltip,...c},N.createElement("div",{style:x.tooltipContainer},y&&N.createElement("h1",{"aria-label":tl(y),style:x.tooltipTitle},y),N.createElement("div",{style:x.tooltipContent},u)),!p&&N.createElement("div",{style:x.tooltipFooter},N.createElement("div",{style:x.tooltipFooterSpacer},v.skip),v.back,v.primary),v.close)}var LSe=DSe,$Se=class extends N.Component{constructor(){super(...arguments),St(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),St(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),St(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:r}=this.props;if(!t){r.close("button_primary");return}r.next()}),St(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),St(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:a,step:i}=this.props,{back:s,close:l,last:c,next:u,nextLabelWithProgress:d,skip:f}=i.locale,p=tl(s),m=tl(l),x=tl(c),y=tl(u),v=tl(f);let b=l,w=m;if(e){if(b=u,w=y,i.showProgress&&!r){const S=tl(d,{step:t+1,steps:a});b=RC(d,t+1,a),w=S}r&&(b=c,w=x)}return{backProps:{"aria-label":p,children:s,"data-action":"back",onClick:this.handleClickBack,role:"button",title:p},closeProps:{"aria-label":m,children:l,"data-action":"close",onClick:this.handleClickClose,role:"button",title:m},primaryProps:{"aria-label":w,children:b,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:w},skipProps:{"aria-label":v,children:f,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:v},tooltipProps:{"aria-modal":!0,ref:n,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:a,step:i}=this.props,{beaconComponent:s,tooltipComponent:l,...c}=i;let u;if(l){const d={...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:a,step:c,setTooltipRef:n},f=l;u=N.createElement(f,{...d})}else u=N.createElement(LSe,{...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:a,step:i});return u}},BSe=class extends N.Component{constructor(){super(...arguments),St(this,"scope",null),St
651(this,"tooltip",null),St(this,"handleClickHoverBeacon",e=>{const{step:t,store:r}=this.props;e.type==="mouseenter"&&t.event!=="hover"||r.update({lifecycle:Yt.TOOLTIP})}),St(this,"setTooltipRef",e=>{this.tooltip=e}),St(this,"setPopper",(e,t)=>{var r;const{action:n,lifecycle:a,step:i,store:s}=this.props;t==="wrapper"?s.setPopper("beacon",e):s.setPopper("tooltip",e),s.getPopper("beacon")&&(s.getPopper("tooltip")||i.placement==="center")&&a===Yt.INIT&&s.update({action:n,lifecycle:Yt.READY}),(r=i.floaterProps)!=null&&r.getPopper&&i.floaterProps.getPopper(e,t)}),St(this,"renderTooltip",e=>{const{continuous:t,helpers:r,index:n,size:a,step:i}=this.props;return N.createElement($Se,{continuous:t,helpers:r,index:n,isLastStep:n+1===a,setTooltipRef:this.setTooltipRef,size:a,step:i,...e})})}componentDidMount(){const{debug:e,index:t}=this.props;ef({title:`step:${t}`,data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:r,callback:n,continuous:a,controlled:i,debug:s,helpers:l,index:c,lifecycle:u,shouldScroll:d,status:f,step:p,store:m}=this.props,{changed:x,changedFrom:y}=m1(e,this.props),v=l.info(),b=a&&r!==Tr.CLOSE&&(c>0||r===Tr.PREV),w=x("action")||x("index")||x("lifecycle")||x("status"),S=y("lifecycle",[Yt.TOOLTIP,Yt.INIT],Yt.INIT),j=x("action",[Tr.NEXT,Tr.PREV,Tr.SKIP,Tr.CLOSE]),k=i&&c===e.index;if(j&&(S||k)&&n({...v,index:e.index,lifecycle:Yt.COMPLETE,step:e.step,type:ss.STEP_AFTER}),p.placement==="center"&&f===cr.RUNNING&&x("index")&&r!==Tr.START&&u===Yt.INIT&&m.update({lifecycle:Yt.READY}),w){const E=Yl(p.target),T=!!E;T&&fSe(E)?(y("status",cr.READY,cr.RUNNING)||y("lifecycle",Yt.INIT,Yt.READY))&&n({...v,step:p,type:ss.STEP_BEFORE}):(console.warn(T?"Target not visible":"Target not mounted",p),n({...v,type:ss.TARGET_NOT_FOUND,step:p}),i||m.update({index:c+(r===Tr.PREV?-1:1)}))}y("lifecycle",Yt.INIT,Yt.READY)&&m.update({lifecycle:i$(p)||b?Yt.TOOLTIP:Yt.BEACON}),x("index")&&ef({title:`step:${u}`,data:[{key:"props",value:this.props}],debug:s}),x("lifecycle",Yt.BEACON)&&n({...v,step:p,type:ss.BEACON}),x("lifecycle",Yt.TOOLTIP)&&(n({...v,step:p,type:ss.TOOLTIP}),d&&this.tooltip&&(this.scope=new RSe(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),y("lifecycle",[Yt.TOOLTIP,Yt.INIT],Yt.INIT)&&((t=this.scope)==null||t.removeScope(),m.cleanupPoppers())}componentWillUnmount(){var e;(e=this.scope)==null||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return i$(t)||e===Yt.TOOLTIP}render(){const{continuous:e,debug:t,index:r,nonce:n,shouldScroll:a,size:i,step:s}=this.props,l=Yl(s.target);return!mY(s)||!_t.domElement(l)?null:N.createElement("div",{key:`JoyrideStep-${r}`,className:"react-joyride__step"},N.createElement(b4,{...s.floaterProps,component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:`react-joyride-step-${r}`,open:this.open,placement:s.placement,target:s.target},N.createElement(ISe,{beaconComponent:s.beaconComponent,continuous:e,index:r,isLastStep:r+1===i,locale:s.locale,nonce:n,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:a,size:i,step:s,styles:s.styles})))}},xY=class extends N.Component{constructor(e){super(e),St(this,"helpers"),St(this,"store"),St(this,"callback",s=>{const{callback:l}=this.props;_t.function(l)&&l(s)}),St(this,"handleKeyboard",s=>{const{index:l,lifecycle:c}=this.state,{steps:u}=this.props,d=u[l];c===Yt.TOOLTIP&&s.code==="Escape"&&d&&!d.disableCloseOnEsc&&this.store.close("keyboard")}),St(this,"handleClickOverlay",()=>{const{index:s}=this.state,{steps:l}=this.props;th(this.props,l[s]).disableOverlayClose||this.helpers.close("overlay")}),St(this,"syncState",s=>{this.setState(s)});const{debug:t,getHelpers:r,run:n=!0,stepIndex:a}=e;this.store=jSe({...e,controlled:n&&_t.number(a)}),this.helpers=this.store.getHelpers();const{addListener:i}=this.store;ef({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),i(this.syncState),r&&r(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!au())return;const{debug:e,disableCloseOnEsc:t,run:r,steps:n}=this.props,{start:a}=this.store;l$(n,e)&&r&&a(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!au())return;const{action:r,controlled:n,index:a,status:i}=this.state,{debug:s,run:l,stepIndex:c,steps:u}=this.props,{stepIndex:d,steps:f}=e,{reset:p,setSteps:m,start:x,stop:y,update:v}=this.store,{changed:b}=m1(e,this.props),{changed:w,changedFrom:S}=m1(t,this.state),j=th(this.props,u[a]),k=!xi(f,u),E=_t.number(c)&&b("stepIndex"),T=Yl(j.target);if(k&&(l$(u,s)?m(u):console.warn("Steps are not valid",u)),b("run")&&(l?x(c):y()),E){let P=_t.number(d)&&d<c?Tr.NEXT:Tr.PREV;r===Tr.STOP&&(P=Tr.START),[cr.FINISHED,cr.SKIPPED].includes(i)||v({action:r===Tr.CLOSE?Tr.CLOSE:P,index:c,lifecycle:Yt.INIT})}!n&&i===cr.RUNNING&&a===0&&!T&&(this.store.update({index:a+1}),this.callback({...this.state,type:ss.TARGET_NOT_FOUND,step:j}));const O={...this.state,index:a,step:j};if(w("action",[Tr.NEXT,Tr.PREV,Tr.SKIP,Tr.CLOSE])&&w("status",cr.PAUSED)){const P=th(this.props,u[t.index]);this.callback({...O,index:t.index,lifecycle:Yt.COMPLETE,step:P,type:ss.STEP_AFTER})}if(w("status",[cr.FINISHED,cr.SKIPPED])){const P=th(this.props,u[t.index]);n||this.callback({...O,index:t.index,lifecycle:Yt.COMPLETE,step:P,type:ss.STEP_AFTER}),this.callback({...O,type:ss.TOUR_END,step:P,index:t.index}),p()}
651else S("status",[cr.IDLE,cr.READY],cr.RUNNING)?this.callback({...O,type:ss.TOUR_START}):(w("status")||w("action",Tr.RESET))&&this.callback({...O,type:ss.TOUR_STATUS});this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:r,status:n}=this.state,{debug:a,disableScrollParentFix:i=!1,scrollDuration:s,scrollOffset:l=20,scrollToFirstStep:c=!1,steps:u}=this.props,d=th(this.props,u[t]),f=Yl(d.target),p=bSe({isFirstStep:t===0,lifecycle:r,previousLifecycle:e.lifecycle,scrollToFirstStep:c,step:d,target:f});if(n===cr.RUNNING&&p){const m=f_(f,i),x=Pg(f,i);let y=Math.floor(pSe(f,l,i))||0;ef({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:r},{key:"status",value:n}],debug:a});const v=this.store.getPopper("beacon"),b=this.store.getPopper("tooltip");if(r===Yt.BEACON&&v){const{offsets:w,placement:S}=v;!["bottom"].includes(S)&&!m&&(y=Math.floor(w.popper.top-l))}else if(r===Yt.TOOLTIP&&b){const{flipped:w,offsets:S,placement:j}=b;["top","right","left"].includes(j)&&!w&&!m?y=Math.floor(S.popper.top-l):y-=d.spotlightPadding}y=y>=0?y:0,n===cr.RUNNING&&mSe(y,{element:x,duration:s}).then(()=>{setTimeout(()=>{var w;(w=this.store.getPopper("tooltip"))==null||w.instance.update()},10)})}}render(){if(!au())return null;const{index:e,lifecycle:t,status:r}=this.state,{continuous:n=!1,debug:a=!1,nonce:i,scrollToFirstStep:s=!1,steps:l}=this.props,c=r===cr.RUNNING,u={};
vendor: 13,224 bytes, line 651
651if(c&&l[e]){const d=th(this.props,l[e]);u.step=N.createElement(BSe,{...this.state,callback:this.callback,continuous:n,debug:a,helpers:this.helpers,nonce:i,shouldScroll:!d.disableScrolling&&(e!==0||s),step:d,store:this.store}),u.overlay=N.createElement(PSe,{id:"react-joyride-portal"},N.createElement(OSe,{...d,continuous:n,debug:a,lifecycle:t,onClickOverlay:this.handleClickOverlay}))}return N.createElement("div",{className:"react-joyride"},u.step,u.overlay)}};St(xY,"defaultProps",SSe);var USe=xY;function yY(e,t){return function(){return e.apply(t,arguments)}}const{toString:zSe}=Object.prototype,{getPrototypeOf:w4}=Object,{iterator:h_,toStringTag:vY}=Symbol,p_=(e=>t=>{const r=zSe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Mo=e=>(e=e.toLowerCase(),t=>p_(t)===e),m_=e=>t=>typeof t===e,{isArray:tm}=Array,tp=m_("undefined");function Vx(e){return e!==null&&!tp(e)&&e.constructor!==null&&!tp(e.constructor)&&zi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bY=Mo("ArrayBuffer");function HSe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bY(e.buffer),t}const qSe=m_("string"),zi=m_("function"),wY=m_("number"),Gx=e=>e!==null&&typeof e=="object",WSe=e=>e===!0||e===!1,Ub=e=>{if(p_(e)!=="object")return!1;const t=w4(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(vY in e)&&!(h_ in e)},VSe=e=>{if(!Gx(e)||Vx(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},GSe=Mo("Date"),KSe=Mo("File"),YSe=e=>!!(e&&typeof e.uri<"u"),XSe=e=>e&&typeof e.getParts<"u",JSe=Mo("Blob"),QSe=Mo("FileList"),ZSe=e=>Gx(e)&&zi(e.pipe);function eEe(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const u$=eEe(),d$=typeof u$.FormData<"u"?u$.FormData:void 0,tEe=e=>{let t;return e&&(d$&&e instanceof d$||zi(e.append)&&((t=p_(e))==="formdata"||t==="object"&&zi(e.toString)&&e.toString()==="[object FormData]"))},rEe=Mo("URLSearchParams"),[nEe,aEe,iEe,sEe]=["ReadableStream","Request","Response","Headers"].map(Mo),oEe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kx(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),tm(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(Vx(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(n=0;n<s;n++)l=i[n],t.call(null,e[l],l,e)}}function _Y(e,t){if(Vx(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const Sd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,SY=e=>!tp(e)&&e!==Sd;function IC(){const{caseless:e,skipUndefined:t}=SY(this)&&this||{},r={},n=(a,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=e&&_Y(r,i)||i;Ub(r[s])&&Ub(a)?r[s]=IC(r[s],a):Ub(a)?r[s]=IC({},a):tm(a)?r[s]=a.slice():(!t||!tp(a))&&(r[s]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Kx(arguments[a],n);return r}const lEe=(e,t,r,{allOwnKeys:n}={})=>(Kx(t,(a,i)=>{r&&zi(a)?Object.defineProperty(e,i,{value:yY(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),cEe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),uEe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},dEe=(e,t,r,n)=>{let a,i,s;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!n||n(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=r!==!1&&w4(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},fEe=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},hEe=e=>{if(!e)return null;if(tm(e))return e;let t=e.length;if(!wY(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},pEe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&w4(Uint8Array)),mEe=(e,t)=>{const n=(e&&e[h_]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},gEe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},xEe=Mo("HTMLFormElement"),yEe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),f$=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),vEe=Mo("RegExp"),EY=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Kx(r,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(n[i]=s||a)}),Object.defineProperties(e,n)},bEe=e=>{EY(e,(t,r)=>{if(zi(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(zi(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},wEe=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return tm(e)?n(e):n(String(e).split(t)),r},_Ee=()=>{},SEe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function EEe(e){return!!(e&&zi(e.append)&&e[vY]==="FormData"&&e[h_])}const kEe=e=>{const t=new Array(10),r=(n,a)=>{if(Gx(n)){if(t.indexOf(n)>=0)return;if(Vx(n))return n;if(!("toJSON"in n)){t[a]=n;const i=tm(n)?[]:{};return Kx(n,(s,l)=>{const c=r(s,a+1);!tp(c)&&(i[l]=c)}),t[a]=void 0,i}}return n};return r(e,0)},NEe=Mo("AsyncFunction"),TEe=e=>e&&(Gx(e)||zi(e))&&zi(e.then)&&zi(e.catch),kY=((e,t)=>e?setImmediate:t?((r,n)=>(Sd.addEventListener("message",({source:a,data:i})=>{a===Sd&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Sd.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",zi(Sd.postMessage)),jEe=typeof queueMicrotask<"u"?queueMicrotask.bind(Sd):typeof process<"u"&&process.nextTick||kY,AEe=e=>e!=null&&zi(e[h_]),$e={isArray:tm,isArrayBuffer:bY,isBuffer:Vx,isFormData:tEe,isArrayBufferView:HSe,isString:qSe,isNumber:wY,isBoolean:WSe,isObject:Gx,isPlainObject:Ub,isEmptyObject:VSe,isReadableStream:nEe,isRequest:aEe,isResponse:iEe,isHeaders:sEe,isUndefined:tp,isDate:GSe,isFile:KSe,isReactNativeBlob:YSe,isReactNative:XSe,isBlob:JSe,isRegExp:vEe,isFunction:zi,isStream:ZSe,isURLSearchParams:rEe,isTypedArray:pEe,isFileList:QSe,forEach:Kx,merge:IC,extend:lEe,trim:oEe,stripBOM:cEe,inherits:uEe,toFlatObject:dEe,kindOf:p_,kindOfTest:Mo,endsWith:fEe,toArray:hEe,forEachEntry:mEe,matchAll:gEe,isHTMLForm:xEe,hasOwnProperty:f$,hasOwnProp:f$,reduceDescriptors:EY,freezeMethods:bEe,toObjectSet:wEe,toCamelCase:yEe,noop:_Ee,toFiniteNumber:SEe,findKey:_Y,global:Sd,isContextDefined:SY,isSpecCompliantForm:EEe,toJSONObject:kEe,isAsyncFn:NEe,isThenable:TEe,setImmediate:kY,asap:jEe,isIterable:AEe};let Wt=class NY extends Error{static from(t,r,n,a,i,s){const l=new NY(t.message,r||t.code,n,a,i);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,r,n,a,i){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}};Wt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Wt.ERR_BAD_OPTION="ERR_BAD_OPTION";Wt.ECONNABORTED="ECONNABORTED";Wt.ETIMEDOUT="ETIMEDOUT";Wt.ERR_NETWORK="ERR_NETWORK";Wt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Wt.ERR_DEPRECATED="ERR_DEPRECATED";Wt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Wt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Wt.ERR_CANCELED="ERR_CANCELED";Wt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Wt.ERR_INVALID_URL="ERR_INVALID_URL";const CEe=null;function FC(e){return $e.isPlainObject(e)||$e.isArray(e)}function TY(e){return $e.endsWith(e,"[]")?e.slice(0,-2):e}function ek(e,t,r){return e?e.concat(t).map(function(a,i){return a=TY(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function OEe(e){return $e.isArray(e)&&!e.some(FC)}const PEe=$e.toFlatObject($e,{},null,function(t){return/^is[A-Z]/.test(t)});function g_(e,t,r){if(!$e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=$e.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!$e.isUndefined(v[y])});const n=r.metaTokens,a=r.visitor||d,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(t);if(!$e.isFunction(a))throw new TypeError("visitor must be a function");function u(x){if(x===null)return"";if($e.isDate(x))return x.toISOString();if($e.isBoolean(x))return x.toString();if(!c&&$e.isBlob(x))throw new Wt("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(x)||$e.isTypedArray(x)?c&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,y,v){let b=x;if($e.isReactNative(t)&&$e.isReactNativeBlob(x))return t.append(ek(v,y,i),u(x)),!1;if(x&&!v&&typeof x=="object"){if($e.endsWith(y,"{}"))y=n?y:y.slice(0,-2),x=JSON.stringify(x);else if($e.isArray(x)&&OEe(x)||($e.isFileList(x)||$e.endsWith(y,"[]"))&&(b=$e.toArray(x)))return y=TY(y),b.forEach(function(S,j){!($e.isUndefined(S)||S===null)&&t.append(s===!0?ek([y],j,i):s===null?y:y+"[]",u(S))}),!1}return FC(x)?!0:(t.append(ek(v,y,i),u(x)),!1)}const f=[],p=Object.assign(PEe,{defaultVisitor:d,convertValue:u,isVisitable:FC});function m(x,y){if(!$e.isUndefined(x)){if(f.indexOf(x)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(x),$e.forEach(x,function(b,w){(!($e.isUndefined(b)||b===null)&&a.call(t,b,$e.isString(w)?w.trim():w,y,p))===!0&&m(b,y?y.concat(w):[w])}),f.pop()}}if(!$e.isObject(e))throw new TypeError("data must be an object");return m(e),t}function h$(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function _4(e,t){this._pairs=[],e&&g_(e,this,t)}const jY=_4.prototype;jY.append=function(t,r){this._pairs.push([t,r])};jY.toString=function(t){const r=t?function(n){return t.call(this,n,h$)}:h$;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function REe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function AY(e,t,r){if(!t)return e;const n=r&&r.encode||REe,a=$e.isFunction(r)?{serialize:r}:r,i=a&&a.serialize;let s;if(i?s=i(t,a):s=$e.isURLSearchParams(t)?t.toString():new _4(t,a).toString(n),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class p${constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$e.forEach(this.handlers,function(n){n!==null&&t(n)})}}const S4={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},IEe=typeof URLSearchParams<"u"?URLSearchParams:_4,FEe=typeof FormData<"u"?FormData:null,MEe=typeof Blob<"u"?Blob:null,DEe={isBrowser:!0,classes:{URLSearchParams:IEe,FormData:FEe,Blob:MEe},protocols:["http","https","file","blob","url","data"]},E4=typeof window<"u"&&typeof document<"u",MC=typeof navigator=="object"&&navigator||void 0,LEe=E4&&(!MC||["ReactNative","NativeScript","NS"].indexOf(MC.product)<0),$Ee=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",BEe=E4&&window.location.href||"http://localhost",UEe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:E4,hasStandardBrowserEnv:LEe,hasStandardBrowserWebWorkerEnv:$Ee,navigator:MC,origin:BEe},Symbol.toStringTag,{value:"Module"})),Xa={...UEe,...DEe};function zEe(e,t){return g_(e,new Xa.classes.URLSearchParams,{visitor:function(r,n,a,i){return Xa.isNode&&$e.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function HEe(e){return $e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qEe(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=e[i];return t}function CY(e){function t(r,n,a,i){let s=r[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),c=i>=r.length;return s=!s&&$e.isArray(a)?a.length:s,c?($e.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!l):((!a[s]||!$e.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],i)&&$e.isArray(a[s])&&(a[s]=qEe(a[s])),!l)}if($e.isFormData(e)&&$e.isFunction(e.entries)){const r={};return $e.forEachEntry(e,(n,a)=>{t(HEe(n),a,r,0)}),r}return null}function WEe(e,t,r){if($e.isString(e))try{return(t||JSON.parse)(e),$e.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Yx={transitional:S4,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=$e.isObject(t);
vendor: 3,572 bytes, lines 651-652
651if(i&&$e.isHTMLForm(t)&&(t=new FormData(t)),$e.isFormData(t))return a?JSON.stringify(CY(t)):t;if($e.isArrayBuffer(t)||$e.isBuffer(t)||$e.isStream(t)||$e.isFile(t)||$e.isBlob(t)||$e.isReadableStream(t))return t;if($e.isArrayBufferView(t))return t.buffer;if($e.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return zEe(t,this.formSerializer).toString();if((l=$e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return g_(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),WEe(t)):t}],transformResponse:[function(t){const r=this.transitional||Yx.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if($e.isResponse(t)||$e.isReadableStream(t))return t;if(t&&$e.isString(t)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(l){if(s)throw l.name==="SyntaxError"?Wt.from(l,Wt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xa.classes.FormData,Blob:Xa.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$e.forEach(["delete","get","head","post","put","patch"],e=>{Yx.headers[e]={}});const VEe=$e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),GEe=e=>{const t={};let r,n,a;return e&&e.split(` 652`).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||t[r]&&VEe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},m$=Symbol("internals");function u0(e){return e&&String(e).trim().toLowerCase()}function zb(e){return e===!1||e==null?e:$e.isArray(e)?e.map(zb):String(e)}function KEe(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const YEe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tk(e,t,r,n,a){if($e.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!$e.isString(t)){if($e.isString(n))return t.indexOf(n)!==-1;if($e.isRegExp(n))return n.test(t)}}function XEe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function JEe(e,t){const r=$e.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,s){return this[n].call(this,t,a,i,s)},configurable:!0})})}let Hi=class{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(l,c,u){const d=u0(c);if(!d)throw new Error("header name must be a non-empty string");const f=$e.findKey(a,d);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||c]=zb(l))}const s=(l,c)=>$e.forEach(l,(u,d)=>i(u,d,c));if($e.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if($e.isString(t)&&(t=t.trim())&&!YEe(t))s(GEe(t),r);else if($e.isObject(t)&&$e.isIterable(t)){let l={},c,u;for(const d of t){if(!$e.isArray(d))throw TypeError("Object iterator must return a key-value pair");l[u=d[0]]=(c=l[u])?$e.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}s(l,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=u0(t),t){const n=$e.findKey(this,t);if(n){const a=this[n];if(!r)return a;
vendor: 10,215 bytes, lines 652-653
652if(r===!0)return KEe(a);if($e.isFunction(r))return r.call(this,a,n);if($e.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=u0(t),t){const n=$e.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||tk(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(s){if(s=u0(s),s){const l=$e.findKey(n,s);l&&(!r||tk(n,n[l],l,r))&&(delete n[l],a=!0)}}return $e.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||tk(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return $e.forEach(this,(a,i)=>{const s=$e.findKey(n,i);if(s){r[s]=zb(a),delete r[i];return}const l=t?XEe(i):String(i).trim();l!==i&&delete r[i],r[l]=zb(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return $e.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&$e.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` 653`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[m$]=this[m$]={accessors:{}}).accessors,a=this.prototype;function i(s){const l=u0(s);n[l]||(JEe(a,s),n[l]=!0)}return $e.isArray(t)?t.forEach(i):i(t),this}};Hi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);$e.reduceDescriptors(Hi.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});$e.freezeMethods(Hi);function rk(e,t){const r=this||Yx,n=t||r,a=Hi.from(n.headers);let i=n.data;return $e.forEach(e,function(l){i=l.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function OY(e){return!!(e&&e.__CANCEL__)}let Xx=class extends Wt{constructor(t,r,n){super(t??"canceled",Wt.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function PY(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Wt("Request failed with status code "+r.status,[Wt.ERR_BAD_REQUEST,Wt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function QEe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ZEe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=n[i];s||(s=u),r[a]=c,n[a]=u;let f=i,p=0;for(;f!==a;)p+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-s<t)return;const m=d&&u-d;return m?Math.round(p*1e3/m):void 0}}function e2e(e,t){let r=0,n=1e3/t,a,i;const s=(u,d=Date.now())=>{r=d,a=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-r;f>=n?s(u,d):(a=u,i||(i=setTimeout(()=>{i=null,s(a)},n-f)))},()=>a&&s(a)]}const v1=(e,t,r=3)=>{let n=0;const a=ZEe(50,250);return e2e(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,c=s-n,u=a(c),d=s<=l;n=s;const f={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-s)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},r)},g$=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},x$=e=>(...t)=>$e.asap(()=>e(...t)),t2e=Xa.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xa.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xa.origin),Xa.navigator&&/(msie|trident)/i.test(Xa.navigator.userAgent)):()=>!0,r2e=Xa.hasStandardBrowserEnv?{write(e,t,r,n,a,i,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];$e.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),$e.isString(n)&&l.push(`path=${n}`),$e.isString(a)&&l.push(`domain=${a}`),i===!0&&l.push("secure"),$e.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function n2e(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function a2e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function RY(e,t,r){let n=!n2e(t);return e&&(n||r==!1)?a2e(e,t):t}const y$=e=>e instanceof Hi?{...e}:e;function tf(e,t){t=t||{};const r={};function n(u,d,f,p){return $e.isPlainObject(u)&&$e.isPlainObject(d)?$e.merge.call({caseless:p},u,d):$e.isPlainObject(d)?$e.merge({},d):$e.isArray(d)?d.slice():d}function a(u,d,f,p){if($e.isUndefined(d)){if(!$e.isUndefined(u))return n(void 0,u,f,p)}else return n(u,d,f,p)}function i(u,d){if(!$e.isUndefined(d))return n(void 0,d)}function s(u,d){if($e.isUndefined(d)){if(!$e.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function l(u,d,f){if(f in t)return n(u,d);if(f in e)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,d,f)=>a(y$(u),y$(d),f,!0)};return $e.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=$e.hasOwnProp(c,d)?c[d]:a,p=f(e[d],t[d],d);$e.isUndefined(p)&&f!==l||(r[d]=p)}),r}const IY=e=>{const t=tf({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:l}=t;if(t.headers=s=Hi.from(s),t.url=AY(RY(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),$e.isFormData(r)){if(Xa.hasStandardBrowserEnv||Xa.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if($e.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,f])=>{u.includes(d.toLowerCase())&&s.set(d,f)})}}if(Xa.hasStandardBrowserEnv&&(n&&$e.isFunction(n)&&(n=n(t)),n||n!==!1&&t2e(t.url))){const c=a&&i&&r2e.read(i);c&&s.set(a,c)}return t},i2e=typeof XMLHttpRequest<"u",s2e=i2e&&function(e){return new Promise(function(r,n){const a=IY(e);let i=a.data;const s=Hi.from(a.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=a,d,f,p,m,x;function y(){m&&m(),x&&x(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function b(){if(!v)return;const S=Hi.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),k={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:e,request:v};PY(function(T){r(T),y()},function(T){n(T),y()},k),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(b)},v.onabort=function(){v&&(n(new Wt("Request aborted",Wt.ECONNABORTED,e,v)),v=null)},v.onerror=function(j){const k=j&&j.message?j.message:"Network Error",E=new Wt(k,Wt.ERR_NETWORK,e,v);E.event=j||null,n(E),v=null},v.ontimeout=function(){let j=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const k=a.transitional||S4;a.timeoutErrorMessage&&(j=a.timeoutErrorMessage),n(new Wt(j,k.clarifyTimeoutError?Wt.ETIMEDOUT:Wt.ECONNABORTED,e,v)),v=null},i===void 0&&s.setContentType(null),"setRequestHeader"in v&&$e.forEach(s.toJSON(),function(j,k){v.setRequestHeader(k,j)}),$e.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&l!=="json"&&(v.responseType=a.responseType),u&&([p,x]=v1(u,!0),v.addEventListener("progress",p)),c&&v.upload&&([f,m]=v1(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(d=S=>{v&&(n(!S||S.type?new Xx(null,e,v):S),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const w=QEe(a.url);if(w&&Xa.protocols.indexOf(w)===-1){n(new Wt("Unsupported protocol "+w+":",Wt.ERR_BAD_REQUEST,e));return}v.send(i||null)})},o2e=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(u){if(!a){a=!0,l();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Wt?d:new Xx(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,i(new Wt(`timeout of ${t}ms exceeded`,Wt.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>$e.asap(l),c}},l2e=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},c2e=async function*(e,t){for await(const r of u2e(e))yield*l2e(r,t)},u2e=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},v$=(e,t,r,n)=>{const a=c2e(e,t);let i=0,s,l=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await a.next();if(u){l(),c.close();return}let f=d.byteLength;if(r){let p=i+=f;r(p)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),a.return()}},{highWaterMark:2})},b$=64*1024,{isFunction:Hv}=$e,d2e=(({Request:e,Response:t})=>({Request:e,Response:t}))($e.global),{ReadableStream:w$,TextEncoder:_$}=$e.global,S$=(e,...t)=>{try{return!!e(...t)}catch{return!1}},f2e=e=>{e=$e.merge.call({skipUndefined:!0},d2e,e);const{fetch:t,Request:r,Response:n}=e,a=t?Hv(t):typeof fetch=="function",i=Hv(r),s=Hv(n);if(!a)return!1;const l=a&&Hv(w$),c=a&&(typeof _$=="function"?(x=>y=>x.encode(y))(new _$):async x=>
vendor: 3,057 bytes, line 653
653new Uint8Array(await new r(x).arrayBuffer())),u=i&&l&&S$(()=>{let x=!1;const y=new r(Xa.origin,{body:new w$,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!y}),d=s&&l&&S$(()=>$e.isReadableStream(new n("").body)),f={stream:d&&(x=>x.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!f[x]&&(f[x]=(y,v)=>{let b=y&&y[x];if(b)return b.call(y);throw new Wt(`Response type '${x}' is not supported`,Wt.ERR_NOT_SUPPORT,v)})});const p=async x=>{if(x==null)return 0;if($e.isBlob(x))return x.size;if($e.isSpecCompliantForm(x))return(await new r(Xa.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if($e.isArrayBufferView(x)||$e.isArrayBuffer(x))return x.byteLength;if($e.isURLSearchParams(x)&&(x=x+""),$e.isString(x))return(await c(x)).byteLength},m=async(x,y)=>{const v=$e.toFiniteNumber(x.getContentLength());return v??p(y)};return async x=>{let{url:y,method:v,data:b,signal:w,cancelToken:S,timeout:j,onDownloadProgress:k,onUploadProgress:E,responseType:T,headers:O,withCredentials:A="same-origin",fetchOptions:P}=IY(x),I=t||fetch;T=T?(T+"").toLowerCase():"text";let R=o2e([w,S&&S.toAbortSignal()],j),M=null;const L=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let U;try{if(E&&u&&v!=="get"&&v!=="head"&&(U=await m(O,b))!==0){let ne=new r(y,{method:"POST",body:b,duplex:"half"}),H;if($e.isFormData(b)&&(H=ne.headers.get("content-type"))&&O.setContentType(H),ne.body){const[B,X]=g$(U,v1(x$(E)));b=v$(ne.body,b$,B,X)}}$e.isString(A)||(A=A?"include":"omit");const W=i&&"credentials"in r.prototype,V={...P,signal:R,method:v.toUpperCase(),headers:O.normalize().toJSON(),body:b,duplex:"half",credentials:W?A:void 0};M=i&&new r(y,V);let G=await(i?I(M,P):I(y,V));const K=d&&(T==="stream"||T==="response");if(d&&(k||K&&L)){const ne={};["status","statusText","headers"].forEach(Y=>{ne[Y]=G[Y]});const H=$e.toFiniteNumber(G.headers.get("content-length")),[B,X]=k&&g$(H,v1(x$(k),!0))||[];G=new n(v$(G.body,b$,B,()=>{X&&X(),L&&L()}),ne)}T=T||"text";let F=await f[$e.findKey(f,T)||"text"](G,x);return!K&&L&&L(),await new Promise((ne,H)=>{PY(ne,H,{data:F,headers:Hi.from(G.headers),status:G.status,statusText:G.statusText,config:x,request:M})})}catch(W){throw L&&L(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new Wt("Network Error",Wt.ERR_NETWORK,x,M,W&&W.response),{cause:W.cause||W}):Wt.from(W,W&&W.code,x,M,W&&W.response)}}},h2e=new Map,FY=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:a}=t,i=[n,a,r];let s=i.length,l=s,c,u,d=h2e;for(;l--;)c=i[l],u=d.get(c),u===void 0&&d.set(c,u=l?new Map:f2e(t)),d=u;return u};FY();const k4={http:CEe,xhr:s2e,fetch:{get:FY}};$e.forEach(k4,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const E$=e=>`- ${e}`,p2e=e=>$e.isFunction(e)||e===null||e===!1;function m2e(e,t){e=$e.isArray(e)?e:[e];const{length:r}=e;let n,a;const i={};for(let s=0;s<r;s++){n=e[s];let l;if(a=n,!p2e(n)&&(a=k4[(l=String(n)).toLowerCase()],a===void 0))throw new Wt(`Unknown adapter '${l}'`);
vendor: 1,913 bytes, lines 653-655
653if(a&&($e.isFunction(a)||(a=a.get(t))))break;i[l||"#"+s]=a}if(!a){const s=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=r?s.length>1?`since : 654`+s.map(E$).join(` 655`):" "+E$(s[0]):"as no adapter specified";throw new Wt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return a}const MY={getAdapter:m2e,adapters:k4};function nk(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xx(null,e)}function k$(e){return nk(e),e.headers=Hi.from(e.headers),e.data=rk.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),MY.getAdapter(e.adapter||Yx.adapter,e)(e).then(function(n){return nk(e),n.data=rk.call(e,e.transformResponse,n),n.headers=Hi.from(n.headers),n},function(n){return OY(n)||(nk(e),n&&n.response&&(n.response.data=rk.call(e,e.transformResponse,n.response),n.response.headers=Hi.from(n.response.headers))),Promise.reject(n)})}const DY="1.13.6",x_={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{x_[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const N$={};x_.transitional=function(t,r,n){function a(i,s){return"[Axios v"+DY+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,l)=>{if(t===!1)throw new Wt(a(s," has been removed"+(r?" in "+r:"")),Wt.ERR_DEPRECATED);return r&&!N$[s]&&(N$[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,l):!0}};x_.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function g2e(e,t,r){if(typeof e!="object")throw new Wt("options must be an object",Wt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],s=t[i];if(s){const l=e[i],c=l===void 0||s(l,i,e);
vendor: 4,104 bytes, lines 655-656
655if(c!==!0)throw new Wt("option "+i+" must be "+c,Wt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Wt("Unknown option "+i,Wt.ERR_BAD_OPTION)}}const Hb={assertOptions:g2e,validators:x_},js=Hb.validators;let qd=class{constructor(t){this.defaults=t||{},this.interceptors={request:new p$,response:new p$}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` 656`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=tf(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&Hb.assertOptions(n,{silentJSONParsing:js.transitional(js.boolean),forcedJSONParsing:js.transitional(js.boolean),clarifyTimeoutError:js.transitional(js.boolean),legacyInterceptorReqResOrdering:js.transitional(js.boolean)},!1),a!=null&&($e.isFunction(a)?r.paramsSerializer={serialize:a}:Hb.assertOptions(a,{encode:js.function,serialize:js.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Hb.assertOptions(r,{baseUrl:js.spelling("baseURL"),withXsrfToken:js.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&$e.merge(i.common,i[r.method]);i&&$e.forEach(["delete","get","head","post","put","patch","common"],x=>{delete i[x]}),r.headers=Hi.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(r)===!1)return;c=c&&y.synchronous;const v=r.transitional||S4;v&&v.legacyInterceptorReqResOrdering?l.unshift(y.fulfilled,y.rejected):l.push(y.fulfilled,y.rejected)});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let d,f=0,p;if(!c){const x=[k$.bind(this),void 0];for(x.unshift(...l),x.push(...u),p=x.length,d=Promise.resolve(r);f<p;)d=d.then(x[f++],x[f++]);return d}p=l.length;let m=r;for(;f<p;){const x=l[f++],y=l[f++];try{m=x(m)}catch(v){y.call(this,v);break}}try{d=k$.call(this,m)}catch(x){return Promise.reject(x)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=tf(this.defaults,t);const r=RY(t.baseURL,t.url,t.allowAbsoluteUrls);return AY(r,t.params,t.paramsSerializer)}};$e.forEach(["delete","get","head","options"],function(t){qd.prototype[t]=function(r,n){return this.request(tf(n||{},{method:t,url:r,data:(n||{}).data}))}});$e.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,l){return this.request(tf(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}qd.prototype[t]=r(),qd.prototype[t+"Form"]=r(!0)});let x2e=class LY{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(l=>{n.subscribe(l),i=l}).then(a);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,l){n.reason||(n.reason=new Xx(i,s,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new LY(function(a){t=a}),cancel:t}}};function y2e(e){return function(r){return e.apply(null,r)}}function v2e(e){return $e.isObject(e)&&e.isAxiosError===!0}const DC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
656alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(DC).forEach(([e,t])=>{DC[t]=e});function $Y(e){const t=new qd(e),r=yY(qd.prototype.request,t);return $e.extend(r,qd.prototype,t,{allOwnKeys:!0}),$e.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return $Y(tf(e,a))},r}const jr=$Y(Yx);jr.Axios=qd;jr.CanceledError=Xx;jr.CancelToken=x2e;jr.isCancel=OY;jr.VERSION=DY;jr.toFormData=g_;jr.AxiosError=Wt;jr.Cancel=jr.CanceledError;jr.all=function(t){return Promise.all(t)};jr.spread=y2e;jr.isAxiosError=v2e;jr.mergeConfig=tf;jr.AxiosHeaders=Hi;jr.formToJSON=e=>CY($e.isHTMLForm(e)?new FormData(e):e);jr.getAdapter=MY.getAdapter;jr.HttpStatusCode=DC;jr.default=jr;const{Axios:Ant,AxiosError:Cnt,CanceledError:Ont,isCancel:Pnt,CancelToken:Rnt,VERSION:Int,all:Fnt,Cancel:Mnt,isAxiosError:Dnt,spread:Lnt,toFormData:$nt,AxiosHeaders:Bnt,HttpStatusCode:Unt,formToJSON:znt,getAdapter:Hnt,mergeConfig:qnt}=jr,BY=N.createContext(),Vo="https://oyster-app-2hw4z.ondigitalocean.app",LC="sami_completed_tours",T$=e=>e?`${LC}_${e}`:null,rh=()=>{const e=localStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:{}},Wi=()=>{const e=N.useContext(BY);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},b2e=({children:e})=>{const[t,r]=N.useState(null),[n,a]=N.useState(!0),[i,s]=N.useState(null);N.useEffect(()=>{l()},[]);const l=async()=>{try{if(!localStorage.getItem("accessToken")){a(!1);return}const k=await jr.get(`${Vo}/api/auth/me`,{headers:rh()});r(k.data.user)}catch{localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),r(null)}finally{a(!1)}},c=async(j,k)=>{var E,T;try{s(null);const O=await jr.post(`${Vo}/api/auth/login`,{email:j,password:k}),{user:A,accessToken:P,refreshToken:I}=O.data;return localStorage.setItem("accessToken",P),localStorage.setItem("refreshToken",I),r(A),{success:!0}}catch(O){const A=((T=(E=O.response)==null?void 0:E.data)==null?void 0:T.error)||"Login failed";return s(A),{success:!1,error:A}}},u=async(j,k,E)=>{var T,O;try{s(null);const A=await jr.post(`${Vo}/api/auth/register`,{email:j,password:k,companyName:E}),{user:P,accessToken:I,refreshToken:R}=A.data;return localStorage.setItem("accessToken",I),localStorage.setItem("refreshToken",R),r(P),{success:!0}}catch(A){const P=((O=(T=A.response)==null?void 0:T.data)==null?void 0:O.error)||"Registration failed";return s(P),{success:!1,error:P}}},d=async j=>{var k,E;try{s(null);const T=await jr.post(`${Vo}/api/auth/google`,{idToken:j}),{user:O,accessToken:A,refreshToken:P,isNewUser:I,wasLinked:R}=T.data;return localStorage.setItem("accessToken",A),localStorage.setItem("refreshToken",P),r(O),{success:!0,isNewUser:I,wasLinked:R}}catch(T){const O=((E=(k=T.response)==null?void 0:k.data)==null?void 0:E.error)||"Google login failed";return s(O),{success:!1,error:O}}},f=async()=>{try{await jr.post(`${Vo}/api/auth/logout`,{},{headers:rh()})}catch(j){console.error("Logout error:",j)}finally{localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),t!=null&&t.id&&localStorage.removeItem(T$(t.id)),localStorage.removeItem(LC),r(null),window.location.href="/login"}},p=async(j,k=null)=>{var E,T;try{s(null);const O=await jr.post(`${Vo}/api/auth/delete-account`,{password:j,reason:k},{headers:rh()});return O.data.success?(localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),t!=null&&t.id&&localStorage.removeItem(T$(t.id)),localStorage.removeItem(LC),r(null),{success:!0,deletionDate:O.data.deletionDate,gracePeriodDays:O.data.gracePeriodDays}
656):{success:!1,error:"Unexpected error"}}catch(O){const A=((T=(E=O.response)==null?void 0:E.data)==null?void 0:T.error)||"Account deletion failed";return s(A),{success:!1,error:A}}},m=async()=>{var j,k;try{return s(null),{success:(await jr.post(`${Vo}/api/auth/restore-account`,{},{headers:rh()})).data.success}}catch(E){const T=((k=(j=E.response)==null?void 0:j.data)==null?void 0:k.error)||"Account restoration failed";return s(T),{success:!1,error:T}}},x=async(j,k)=>{var E,T;try{return s(null),await jr.put(`${Vo}/api/auth/password`,{currentPassword:j,newPassword:k},{headers:rh()}),{success:!0}}catch(O){const A=((T=(E=O.response)==null?void 0:E.data)==null?void 0:T.error)||"Password update failed";return s(A),{success:!1,error:A}}},y=async j=>{try{return(await jr.get(`${Vo}/api/auth/check-email/${encodeURIComponent(j)}`)).data.available}catch(k){return console.error("Email check error:",k),!1}},v=j=>{r(j)},b=N.useRef(t);b.current=t;const w=N.useCallback(async()=>{var k,E;if(b.current)try{const O=(E=(k=(await jr.get(`${Vo}/api/billing/subscription`,{headers:rh()})).data)==null?void 0:k.subscription)==null?void 0:E.credits;if(typeof O!="number")return;v({...b.current,ai_credits:O})}catch{}},[]),S={user:t,loading:n,error:i,login:c,register:u,loginWithGoogle:d,logout:f,requestAccountDeletion:p,restoreAccount:m,updatePassword:x,checkEmailAvailability:y,checkAuth:l,updateUserContext:v,refreshCredits:w};return o.jsx(BY.Provider,{value:S,children:e})};class Gt extends Error{constructor(t,r,n,a=!1){super(t),this.name="AppError",this.code=r,this.userMessage=n,this.retryable=a,this.timestamp=new Date().toISOString()}}const Bt={NETWORK_ERROR:"NETWORK_ERROR",AUTH_ERROR:"AUTH_ERROR",VALIDATION_ERROR:"VALIDATION_ERROR",SERVER_ERROR:"SERVER_ERROR",NOT_FOUND:"NOT_FOUND",PERMISSION_DENIED:"PERMISSION_DENIED",RATE_LIMIT:"RATE_LIMIT",UNKNOWN_ERROR:"UNKNOWN_ERROR"},md={[Bt.NETWORK_ERROR]:"Please check your internet connection and try again.",[Bt.AUTH_ERROR]:"Your session has expired. Please log in again.",[Bt.VALIDATION_ERROR]:"Please check your input and try again.",[Bt.SERVER_ERROR]:"Our servers are having issues. Please try again in a moment.",[Bt.NOT_FOUND]:"We couldn't find what you're looking for.",[Bt.PERMISSION_DENIED]:"You don't have permission to access this.",[Bt.RATE_LIMIT]:"Too many requests. Please slow down and try again.",[Bt.UNKNOWN_ERROR]:"Something went wrong. Please try again."};function N4(e,t="Something went wrong. Please try again."){var r,n;if(e instanceof Gt)return e;if(e.code==="ECONNABORTED"||e.message==="Network Error"||!navigator.onLine)return new Gt(e.message,Bt.NETWORK_ERROR,md[Bt.NETWORK_ERROR],!0);if(e.response){const a=e.response.status,i=((r=e.response.data)==null?void 0:r.message)||((n=e.response.data)==null?void 0:n.error);return a===401?new Gt("Unauthorized",Bt.AUTH_ERROR,md[Bt.AUTH_ERROR],!1):a===403?new Gt("Forbidden",Bt.PERMISSION_DENIED,md[Bt.PERMISSION_DENIED],!1):a===404?new Gt("Not Found",Bt.NOT_FOUND,i||md[Bt.NOT_FOUND],!1):a===429?new Gt("Rate Limited",Bt.RATE_LIMIT,md[Bt.RATE_LIMIT],!0):a>=500?new Gt(`Server Error: ${a}`,Bt.SERVER_ERROR,md[Bt.SERVER_ERROR],!0):new Gt(e.message,Bt.VALIDATION_ERROR,i||t,!1)}return new Gt(e.message||"Unknown error",Bt.UNKNOWN_ERROR,t,!1)}const T4=(e,t=md[Bt.UNKNOWN_ERROR])=>{var r,n,a,i;return e&&(((n=(r=e.response)==null?void 0:r.data)==null?void 0:n.message)||((i=(a=e.response)==null?void 0:a.data)==null?void 0:i.error)||e.userMessage||e.message)||t};function UY(e,t={}){const r={message:e.message,code:e.code||"UNKNOWN",stack:e.stack,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent,...t};try{const n=JSON.parse(localStorage.getItem("app_errors")||"[]");n.push(r),n.length>50&&n.shift(),localStorage.setItem("app_errors",JSON.stringify(n))}catch(n){console.error("Failed to log error:",n)}}let w2e={data:""},_2e=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||w2e,S2e=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,E2e=/\/\*[^]*?\*\/| +/g,j$=/\n+/g,iu=(e,t)=>{let r="",n="",a="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+s+";":n+=i[1]=="f"?iu(s,i):i+"{"+iu(s,i[1]=="k"?"":t)+"}":typeof s=="object"?n+=iu(s,t?t.replace(/([^,])+/g,l=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=iu.p?iu.p(i,s):i+":"+s+";")}return r+(t&&a?t+"{"+a+"}":a)+n},Dl={},zY=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+zY(e[r]);return t}return e},k2e=(e,t,r,n,a)=>{let i=zY(e),s=Dl[i]||(Dl[i]=(c=>{let u=0,d=11;for(;u<c.length;)d=101*d+c.charCodeAt(u++)>>>0;return"go"+d})(i));if(!Dl[s]){let c=i!==e?e:(u=>{let d,f,p=[{}];for(;d=S2e.exec(u.replace(E2e,""));)d[4]?p.shift():d[3]?(f=d[3].replace(j$," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][d[1]]=d[2].replace(j$," ").trim();return p[0]})(e);Dl[s]=iu(a?{["@keyframes "+s]:c}:c,r?"":"."+s)}let l=r&&Dl.g?Dl.g:null;return r&&(Dl.g=Dl[s]),((c,u,d,f)=>{f?u.data=u.data.replace(f,c):u.data.indexOf(c)===-1&&(u.data=d?c+u.data:u.data+c)})(Dl[s],t,n,l),s},N2e=(e,t,r)=>e.reduce((n,a,i)=>{let s=t[i];if(s&&s.call){let l=s(r),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=c?"."+c:l&&typeof l=="object"?l.props?"":iu(l,""):l===!1?"":l}return n+a+(s??"")},"");function y_(e){let t=this||{},r=e.call?e(t.p):e;
656return k2e(r.unshift?r.raw?N2e(r,[].slice.call(arguments,1),t.p):r.reduce((n,a)=>Object.assign(n,a&&a.call?a(t.p):a),{}):r,_2e(t.target),t.g,t.o,t.k)}let HY,$C,BC;y_.bind({g:1});let fc=y_.bind({k:1});function T2e(e,t,r,n){iu.p=t,HY=e,$C=r,BC=n}function Du(e,t){let r=this||{};return function(){let n=arguments;function a(i,s){let l=Object.assign({},i),c=l.className||a.className;r.p=Object.assign({theme:$C&&$C()},l),r.o=/ *go\d+/.test(c),l.className=y_.apply(r,n)+(c?" "+c:"");let u=e;return e[0]&&(u=l.as||e,delete l.as),BC&&u[0]&&BC(l),HY(u,l)}return a}}var j2e=e=>typeof e=="function",b1=(e,t)=>j2e(e)?e(t):e,A2e=(()=>{let e=0;return()=>(++e).toString()})(),qY=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),C2e=20,WY=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,C2e)};case 1:return{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:r}=t;return WY(e,{type:e.toasts.find(i=>i.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,dismissed:!0,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+a}))}}},qb=[],Ed={toasts:[],pausedAt:void 0},vf=e=>{Ed=WY(Ed,e),qb.forEach(t=>{t(Ed)})},O2e={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},P2e=(e={})=>{let[t,r]=N.useState(Ed),n=N.useRef(Ed);N.useEffect(()=>(n.current!==Ed&&r(Ed),qb.push(r),()=>{let i=qb.indexOf(r);i>-1&&qb.splice(i,1)}),[]);let a=t.toasts.map(i=>{var s,l,c;return{...e,...e[i.type],...i,removeDelay:i.removeDelay||((s=e[i.type])==null?void 0:s.removeDelay)||(e==null?void 0:e.removeDelay),duration:i.duration||((l=e[i.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||O2e[i.type],style:{...e.style,...(c=e[i.type])==null?void 0:c.style,...i.style}}});return{...t,toasts:a}},R2e=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||A2e()}),Jx=e=>(t,r)=>{let n=R2e(t,e,r);return vf({type:2,toast:n}),n.id},vr=(e,t)=>Jx("blank")(e,t);vr.error=Jx("error");vr.success=Jx("success");vr.loading=Jx("loading");vr.custom=Jx("custom");vr.dismiss=e=>{vf({type:3,toastId:e})};vr.remove=e=>vf({type:4,toastId:e});vr.promise=(e,t,r)=>{let n=vr.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let i=t.success?b1(t.success,a):void 0;return i?vr.success(i,{id:n,...r,...r==null?void 0:r.success}):vr.dismiss(n),a}).catch(a=>{let i=t.error?b1(t.error,a):void 0;i?vr.error(i,{id:n,...r,...r==null?void 0:r.error}):vr.dismiss(n)}),e};var I2e=(e,t)=>{vf({type:1,toast:{id:e,height:t}})},F2e=()=>{vf({type:5,time:Date.now()})},K0=new Map,M2e=1e3,D2e=(e,t=M2e)=>{if(K0.has(e))return;let r=setTimeout(()=>{K0.delete(e),vf({type:4,toastId:e})},t);K0.set(e,r)},L2e=e=>{let{toasts:t,pausedAt:r}=P2e(e);N.useEffect(()=>{if(r)return;let i=Date.now(),s=t.map(l=>{if(l.duration===1/0)return;let c=(l.duration||0)+l.pauseDuration-(i-l.createdAt);if(c<0){l.visible&&vr.dismiss(l.id);return}return setTimeout(()=>vr.dismiss(l.id),c)});return()=>{s.forEach(l=>l&&clearTimeout(l))}},[t,r]);let n=N.useCallback(()=>{r&&vf({type:6,time:Date.now()})},[r]),a=N.useCallback((i,s)=>{let{reverseOrder:l=!1,gutter:c=8,defaultPosition:u}=s||{},d=t.filter(m=>(m.position||u)===(i.position||u)&&m.height),f=d.findIndex(m=>m.id===i.id),p=d.filter((m,x)=>x<f&&m.visible).length;return d.filter(m=>m.visible).slice(...l?[p+1]:[0,p]).reduce((m,x)=>m+(x.height||0)+c,0)},[t]);return N.useEffect(()=>{t.forEach(i=>{if(i.dismissed)D2e(i.id,i.removeDelay);else{let s=K0.get(i.id);s&&(clearTimeout(s),K0.delete(i.id))}})},[t]),{toasts:t,handlers:{updateHeight:I2e,startPause:F2e,endPause:n,calculateOffset:a}}},$2e=fc` 657from { 658 transform: scale(0) rotate(45deg); 659 opacity: 0; 660} 661to { 662 transform: scale(1) rotate(45deg); 663 opacity: 1; 664}`,B2e=fc` 665from { 666 transform: scale(0); 667 opacity: 0; 668} 669to { 670 transform: scale(1); 671 opacity: 1; 672}`,U2e=fc` 673from { 674 transform: scale(0) rotate(90deg); 675 opacity: 0; 676} 677to { 678 transform: scale(1) rotate(90deg); 679 opacity: 1; 680}`,z2e=Du("div")`
681 width: 20px; 682 opacity: 0; 683 height: 20px; 684 border-radius: 10px; 685 background: ${e=>e.primary||"#ff4b4b"}; 686 position: relative; 687 transform: rotate(45deg); 688 689 animation: ${$2e} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 690 forwards; 691 animation-delay: 100ms; 692 693 &:after, 694 &:before { 695 content: ''; 696 animation: ${B2e} 0.15s ease-out forwards; 697 animation-delay: 150ms; 698 position: absolute; 699 border-radius: 3px; 700 opacity: 0; 701 background: ${e=>e.secondary||"#fff"}; 702 bottom: 9px; 703 left: 4px; 704 height: 2px; 705 width: 12px; 706 } 707 708 &:before { 709 animation: ${U2e} 0.15s ease-out forwards; 710 animation-delay: 180ms; 711 transform: rotate(90deg); 712 } 713`,H2e=fc` 714 from { 715 transform: rotate(0deg); 716 } 717 to { 718 transform: rotate(360deg); 719 } 720`,q2e=Du("div")` 721 width: 12px; 722 height: 12px; 723 box-sizing: border-box; 724 border: 2px solid; 725 border-radius: 100%; 726 border-color: ${e=>e.secondary||"#e0e0e0"}; 727 border-right-color: ${e=>e.primary||"#616161"}; 728 animation: ${H2e} 1s linear infinite; 729`,W2e=fc` 730from { 731 transform: scale(0) rotate(45deg); 732 opacity: 0; 733} 734to { 735 transform: scale(1) rotate(45deg); 736 opacity: 1; 737}`,V2e=fc` 7380% { 739 height: 0; 740 width: 0; 741 opacity: 0; 742} 74340% { 744 height: 0; 745 width: 6px; 746 opacity: 1; 747} 748100% { 749 opacity: 1; 750 height: 10px; 751}`,G2e=Du("div")` 752 width: 20px; 753 opacity: 0; 754 height: 20px; 755 border-radius: 10px; 756 background: ${e=>e.primary||"#61d345"}; 757 position: relative; 758 transform: rotate(45deg); 759 760 animation: ${W2e} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 761 forwards; 762 animation-delay: 100ms; 763 &:after { 764 content: ''; 765 box-sizing: border-box; 766 animation: ${V2e} 0.2s ease-out forwards; 767 opacity: 0; 768 animation-delay: 200ms; 769 position: absolute; 770 border-right: 2px solid; 771 border-bottom: 2px solid; 772 border-color: ${e=>e.secondary||"#fff"}; 773 bottom: 6px; 774 left: 6px; 775 height: 10px; 776 width: 6px; 777 } 778`,K2e=Du("div")` 779 position: absolute; 780`,Y2e=Du("div")` 781 position: relative; 782 display: flex; 783 justify-content: center; 784 align-items: center; 785 min-width: 20px; 786 min-height: 20px; 787`,X2e=fc` 788from { 789 transform: scale(0.6); 790 opacity: 0.4; 791} 792to { 793 transform: scale(1); 794 opacity: 1; 795}`,J2e=Du("div")` 796 position: relative; 797 transform: scale(0.6); 798 opacity: 0.4; 799 min-width: 20px; 800 animation: ${X2e} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) 801 forwards; 802`,Q2e=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?N.createElement(J2e,null,t):t:r==="blank"?null:N.createElement(Y2e,null,N.createElement(q2e,{...n}),r!=="loading"&&N.createElement(K2e,null,r==="error"?N.createElement(z2e,{...n}):N.createElement(G2e,{...n})))},Z2e=e=>` 8030% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 804100% {transform: translate3d(0,0,0) scale(1); opacity:1;} 805`,eke=e=>` 8060% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 807100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} 808`,tke="0%{opacity:0;} 100%{opacity:1;}",rke="0%{opacity:1;} 100%{opacity:0;}",nke=Du("div")` 809 display: flex; 810 align-items: center; 811 background: #fff; 812 color: #363636; 813 line-height: 1.3; 814 will-change: transform; 815 box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); 816 max-width: 350px; 817 pointer-events: auto; 818 padding: 8px 10px; 819 border-radius: 8px; 820`,ake=Du("div")` 821 display: flex; 822 justify-content: center; 823 margin: 4px 10px; 824 color: inherit; 825 flex: 1 1 auto; 826 white-space: pre-line; 827`,ike=(e,t)=>{let r=e.includes("top")?1:-1,[n,a]=qY()?[tke,rke]:[Z2e(r),eke(r)];return{animation:t?`${fc(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${fc(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},ske=N.memo(({toast:e,position:t,style:r,children:n})=>{let a=e.height?ike(e.position||t||"top-center",e.visible):{opacity:0},i=N.createElement(Q2e,{toast:e}),s=N.createElement(ake,{...e.ariaProps},b1(e.message,e));return N.createElement(nke,{className:e.className,style:{...a,...r,...e.style}},typeof n=="function"?n({icon:i,message:s}):N.createElement(N.Fragment,null,i,s))});T2e(N.createElement);
827var oke=({id:e,className:t,style:r,onHeightUpdate:n,children:a})=>{let i=N.useCallback(s=>{if(s){let l=()=>{let c=s.getBoundingClientRect().height;n(e,c)};l(),new MutationObserver(l).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return N.createElement("div",{ref:i,className:t,style:r},a)},lke=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:qY()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...a}},cke=y_` 828 z-index: 9999; 829 > * { 830 pointer-events: auto; 831 } 832`,qv=16,uke=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:a,containerStyle:i,containerClassName:s})=>{let{toasts:l,handlers:c}=L2e(r);return N.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:qv,left:qv,right:qv,bottom:qv,pointerEvents:"none",...i},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(u=>{let d=u.position||t,f=c.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),p=lke(d,f);return N.createElement(oke,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?cke:"",style:p},u.type==="custom"?b1(u.message,u):a?a(u):N.createElement(ske,{toast:u,position:d}))}))},qa=vr;const A$=()=>o.jsx(uke,{position:"top-right",reverseOrder:!1,gutter:8,toastOptions:{duration:4e3,style:{background:"#1a1a1a",color:"#e5e5e5",border:"1px solid #333",borderRadius:"8px",padding:"12px 16px",fontSize:"14px",maxWidth:"400px"},success:{iconTheme:{primary:"#10b981",secondary:"#fff"},style:{border:"1px solid #065f46",background:"#064e3b"}},error:{iconTheme:{primary:"#ef4444",secondary:"#fff"},style:{border:"1px solid #991b1b",background:"#7f1d1d"}},loading:{iconTheme:{primary:"#f59e0b",secondary:"#fff"}}}}),ft={success:(e,t={})=>qa.success(e,{icon:o.jsx(vl,{className:"h-5 w-5"}),...t}),error:(e,t={})=>qa.error(e,{icon:o.jsx($d,{className:"h-5 w-5"}),...t}),info:(e,t={})=>qa(e,{icon:o.jsx(bR,{className:"h-5 w-5 text-blue-400"}),style:{border:"1px solid #1e3a8a",background:"#1e293b"},...t}),warning:(e,t={})=>qa(e,{icon:o.jsx(Jr,{className:"h-5 w-5 text-amber-400"}),style:{border:"1px solid #78350f",background:"#451a03"},...t}),loading:(e,t={})=>qa.loading(e,{style:{background:"#1a1a1a",color:"#e5e5e5",border:"1px solid #333"},...t}),promise:(e,t,r={})=>qa.promise(e,{loading:t.loading||"Loading...",success:t.success||"Success!",error:t.error||"Something went wrong"},{style:{background:"#1a1a1a",color:"#e5e5e5",border:"1px solid #333"},success:{icon:o.jsx(vl,{className:"h-5 w-5"}),style:{border:"1px solid #065f46",background:"#064e3b"}},error:{icon:o.jsx($d,{className:"h-5 w-5"}),style:{border:"1px solid #991b1b",background:"#7f1d1d"}},...r}),dismiss:e=>{e?qa.dismiss(e):qa.dismiss()}},C$="https://oyster-app-2hw4z.ondigitalocean.app",Rg={BASE_URL:C$,API_URL:`${C$}/api`,ENDPOINTS:{LOGIN:"/auth/login",SIGNUP:"/auth/signup",LOGOUT:"/auth/logout",PROFILE:"/auth/profile",GOOGLE_AUTH:"/auth/google",PROPERTIES:"/properties",PROPERTY_NAMES:"/properties/names",PROPERTY_CHECK_OVERLAP:"/properties/check-overlap",RENT_ROLL:"/rent-roll",PL:"/pl",LEASING:"/leasing",METRICS:"/metrics",ANALYSIS:"/analysis",AI_ANALYSIS:"/ai-analysis",PRESETS:"/presets",CATEGORIZATION:"/expense-categorization"},TIMEOUTS:{DEFAULT:3e4,UPLOAD:12e4,AI_ANALYSIS:6e4}
832,FILE_LIMITS:{MAX_SIZE:10*1024*1024,ALLOWED_TYPES:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf"]}},oa=jr.create({baseURL:Rg.API_URL,timeout:Rg.TIMEOUTS.DEFAULT,headers:{"Content-Type":"application/json"}});oa.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));oa.interceptors.response.use(e=>e,async e=>{const t=e.config;if(!e.response){const n=new Gt("Network error",Bt.NETWORK_ERROR,"Unable to connect to server. Please check your internet connection.",!0);return Promise.reject(n)}if(e.response.status===401&&!t._retry)return t._retry=!0,localStorage.removeItem("accessToken"),localStorage.removeItem("user"),window.location.pathname.includes("/login")||(ft.info("Your session has expired. Please log in again."),window.location.href="/login"),Promise.reject(new Gt("Unauthorized",Bt.AUTH_ERROR,"Your session has expired. Please log in again.",!1));const r=N4(e);return Promise.reject(r)});const O$=async(e,t=3,r=1e3)=>{for(let n=0;n<t;n++)try{return await oa(e)}catch(a){if(a.response&&a.response.status>=400&&a.response.status<500&&a.response.status!==429||!(a.retryable||a.code==="ECONNABORTED"||a.code==="NETWORK_ERROR"||a.response&&(a.response.status>=500||a.response.status===429))||n===t-1)throw a;const s=r*Math.pow(2,n)+Math.random()*1e3;console.log(`Retrying request (attempt ${n+1}/${t}) after ${s}ms`),await new Promise(l=>setTimeout(l,s))}},Xe={get:(e,t)=>oa.get(e,t),post:(e,t,r)=>oa.post(e,t,r),put:(e,t,r)=>oa.put(e,t,r),patch:(e,t,r)=>oa.patch(e,t,r),delete:(e,t)=>oa.delete(e,t),getWithRetry:(e,t)=>O$({...t,method:"GET",url:e}),postWithRetry:(e,t,r)=>O$({...r,method:"POST",url:e,data:t})},ak=async(e,t={})=>{const{successMessage:r,errorMessage:n="An error occurred. Please try again.",showSuccess:a=!0,showError:i=!0}=t;try{const s=await e;return a&&r&&ft.success(r),s.data}catch(s){throw i&&ft.error(s.userMessage||n),s}},dke={id:"portfolio_welcome",steps:[{target:'[data-tour="portfolio-kpi-cards"]',content:"Hereâs your portfolio at a glance â total properties, units, and loan alerts all in one place.",placement:"bottom",title:"Portfolio Overview"},{target:'[data-tour="portfolio-loans-maturing"]',content:"These cards are interactive â click Loans Maturing or Rate Resets to instantly filter your property list to just those needing attention.",placement:"bottom",title:"Interactive Alerts"},{target:'[data-tour="portfolio-properties-table"]',content:"Your properties are listed here. Click any row to dive into financials, occupancy, and AI analysis.",placement:"top",title:"Your Properties"},{target:'[data-tour="portfolio-add-property"]',content:"When youâre ready, add your own property here to start tracking its performance.",placement:"bottom",title:"Add Your Property"},{target:'[data-tour="portfolio-add-report"]',content:"Upload P&L statements or rent rolls here to power your financial and occupancy dashboards.",placement:"bottom",title:"Upload Reports"}]},fke={id:"financial_tab",steps:[{target:'[data-tour="financial-overview"]',content:"Your financial dashboard â pick a date range above and the data loads automatically. Choose Custom for a specific range and click Fetch Data.",placement:"bottom",title:"Financial Dashboard"},{target:'[data-tour="financial-fetch-data"]',content:"Pick a preset range or choose Custom dates, then click Fetch Data to load your financials.",placement:"bottom",title:"Load Your Data"},{target:'[data-tour="financial-view-summary"]',content:"Summary gives you the quick picture â KPIs, top-line revenue, and expense ratios at a glance.",placement:"bottom",title:"Summary View"},{target:'[data-tour="financial-view-trends"]',content:"Trends shows how revenue, expenses, NOI, and DSCR move over time. Click âShow moreâ for utilities and category-level breakdowns.",placement:"bottom",title:"Trend Charts"},{target:'[data-tour="financial-view-breakdown"]',content:"Breakdown has two modes â visual Charts where you can click any expense bar to drill into subcategories, or a full Operating Statement.",placement:"bottom",title:"Expense Breakdown"}]},hke={id:"occupancy_tab",steps:[{target:'[data-tour="occupancy-summary"]',content:"Your occupancy snapshot â physical and economic occupancy, vacant units, and delinquencies. This loads your most recent rent roll automatically.",placement:"bottom",title:"Occupancy Snapshot"},{target:'[data-tour="occupancy-rent-roll-selector"]',content:"Switch between uploaded rent roll snapshots to compare occupancy across different dates.",placement:"bottom",title:"Compare Snapshots"},{target:'[data-tour="occupancy-property-issues"]',content:"Action items, delinquencies, upcoming lease expirations, and vacancies â all in one place.",placement:"bottom",title:"Action Items"},{target:'[data-tour="occupancy-unit-breakdown"]',content:"Click any unit row to see its full lease history across all your uploads. Use the filter pills to focus on expiring, vacant, or month-to-month leases.",placement:"bottom",title:"Unit Details"}]},pke={id:"ai_analysis_tab",steps:[{target:'[data-tour="ai-report-selector"]',content:"Choose a report type to get started. Quarterly Investor is the most comprehensive; Monthly Operations focuses on 30-day outlook. SAMI will ask a few questions to personalize your report.",placement:"bottom",title:"Cho
832ose a Report"},{target:'[data-tour="ai-report-content"]',content:"Your report preview â click Refine on any section to improve just that part, or use the chat to adjust the whole report. Save your analysis or export as a polished PDF.",placement:"bottom",title:"Your Report"}]},mke={id:"upload_flow",steps:[{target:'[data-tour="upload-config-bar"]',content:"First, select your property and report type. For P&L reports, set the date range your data covers.",placement:"bottom",title:"Set Up Your Upload"},{target:'[data-tour="upload-dropzone"]',content:"Drag your spreadsheet here or click to browse. SAMI handles CSV, XLSX, and XLS files.",placement:"bottom",title:"Upload Your File"},{target:'[data-tour="upload-column-mapping"]',content:"SAMI auto-detects your columns. Review the mapping â you can adjust any column and save it as a preset for future uploads.",placement:"bottom",title:"Map Your Columns"},{target:'[data-tour="upload-process-button"]',content:"When mapping looks right, hit Process. SAMI will categorize your line items and youâll get a chance to review them next.",placement:"top",title:"Process Data"}]},gke={id:"categorization",steps:[{target:'[data-tour="categorization-line-items"]',content:"Review how SAMI categorized each expense. New items are highlighted â focus on those first, the rest carry over from previous uploads.",placement:"bottom",title:"Review Categorization"},{target:'[data-tour="categorization-dropdown"]',content:"Change any category with the dropdown. Use the filter pills above to focus on one type at a time, or search by description.",placement:"bottom",title:"Adjust Categories"},{target:'[data-tour="categorization-save"]',content:"Save to update your financial reports. SAMI remembers your corrections and applies them to future uploads automatically.",placement:"top",title:"Save Changes"}]},xke={id:"property_info",steps:[{target:'[data-tour="property-info-details"]',content:"Your property details at a glance. Click Edit on any card to update â only one section edits at a time.",placement:"bottom",title:"Property Details"},{target:'[data-tour="property-info-debt"]',content:"Loan details power your portfolio alerts â keep maturity dates and rate resets current to get timely notifications.",placement:"bottom",title:"Debt Information"},{target:'[data-tour="property-info-activity"]',content:"Quick access to your latest uploads and reports. Click View All to see everything in the Reports tab.",placement:"bottom",title:"Recent Activity"}]},Fi={PORTFOLIO_WELCOME:"portfolio_welcome",FINANCIAL_TAB:"financial_tab",OCCUPANCY_TAB:"occupancy_tab",AI_ANALYSIS_TAB:"ai_analysis_tab",UPLOAD_FLOW:"upload_flow",CATEGORIZATION:"categorization",PROPERTY_INFO:"property_info"},VY=[dke,fke,hke,pke,mke,gke,xke],rt=({children:e,onClick:t,type:r="button",variant:n="primary",size:a="md",disabled:i=!1,loading:s=!1,icon:l,iconPosition:c="left",fullWidth:u=!1,className:d="",...f})=>{const p=` 833 inline-flex items-center justify-center 834 font-medium rounded-lg 835 transition-all duration-200 836 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-primary 837 disabled:opacity-50 disabled:cursor-not-allowed 838 ${u?"w-full":""} 839 `.trim(),m={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},x={primary:` 840 bg-gradient-to-r from-accent to-accent-light text-primary 841 hover:from-accent-light hover:to-accent 842 focus:ring-accent 843 `,secondary:` 844 bg-card/50 text-white border border-white/20 845 hover:bg-card/70 hover:border-white/40 846 focus:ring-white/20 847 `,danger:` 848 bg-gradient-to-r from-red-600 to-red-700 text-white 849 hover:from-red-700 hover:to-red-800 850 focus:ring-red-500 851 `,ghost:` 852 text-gray-400 hover:text-white 853 hover:bg-white/5 854 focus:ring-white/20 855 `,accent:` 856 bg-gradient-to-r from-purple-600 to-purple-700 text-white 857 hover:from-purple-700 hover:to-purple-800 858 focus:ring-purple-500 859 `,success:` 860 bg-gradient-to-r from-green-600 to-green-700 text-white 861 hover:from-green-700 hover:to-green-800 862 focus:ring-green-500 863 `,warning:` 864 bg-gradient-to-r from-yellow-500 to-yellow-600 text-white 865 hover:from-yellow-600 hover:to-yellow-700 866 focus:ring-yellow-500 867 `,link:` 868 text-accent hover:text-accent-light 869 focus:ring-accent/20 870 !p-0 871 `},y=` 872 ${p} 873 ${m[a]} 874 ${x[n]} 875 ${d} 876 `.trim(),v=w=>{i||s||t&&t(w)},b=()=>s?o.jsx(ar,{className:"h-4 w-4 animate-spin"}):l?o.jsx(l,{className:"h-4 w-4"}):null;return o.jsxs("button",{type:r,onClick:v,disabled:i||s,className:y,...f,children:[(s||l)&&c==="left"&&o.jsx("span",{className:"mr-2",children:b()}),e,(s||l)&&c==="right"&&o.jsx("span",{className:"ml-2",children:b()})]})},yke=({index:e,size:t})=>o.jsxs("div",{className:"flex items-center gap-2",role:"progressbar","aria-valuenow":e+1,"aria-valuemin":1,"aria-valuemax":t,"aria-label":`Step ${e+1} of ${t}`,children:[o.jsxs("span",{className:"text-xs text-gray-400 font-sans",children:["Step ",e+1," of ",t]}),o.jsx("div",{className:"flex gap-1",children:Array.from({length:t}
876,(r,n)=>o.jsx("div",{"data-testid":"step-dot",className:`w-1.5 h-1.5 rounded-full transition-colors ${n===e?"bg-accent":"bg-white/20"}`},n))})]}),ia={container:{backgroundColor:"rgba(15, 23, 42, 0.95)",border:"1px solid rgba(255, 200, 87, 0.3)",borderRadius:"8px",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.5)",padding:"12px",maxWidth:"400px",zIndex:9999},label:{color:"#FFC857",fontWeight:"600",marginBottom:"4px",fontFamily:"Inter, sans-serif",fontSize:"14px"},item:{color:"#E5E7EB",fontFamily:"JetBrains Mono, monospace",fontSize:"13px",lineHeight:"1.5"}},P$={container:` 877 bg-primary-dark/95 878 border border-accent/30 879 rounded-lg 880 backdrop-blur-md 881 shadow-2xl 882 p-3 883 max-w-md 884 z-50 885 `.trim(),label:` 886 text-accent 887 font-semibold 888 mb-1 889 font-sans 890 text-sm 891 `.trim()},vke=({step:e,index:t,size:r,isLastStep:n,primaryProps:a,backProps:i,skipProps:s,tooltipProps:l})=>o.jsxs("div",{...l,className:`${P$.container} !max-w-sm !p-4`,style:{zIndex:9501},children:[e.title&&o.jsx("div",{className:P$.label,children:e.title}),o.jsx("div",{className:"text-gray-300 text-sm font-sans leading-relaxed mb-4",children:e.content}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(yke,{index:t,size:r}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{...s,type:"button","aria-label":"Skip tour",className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"Skip"}),t>0&&o.jsx(rt,{variant:"ghost",size:"sm",onClick:i.onClick,children:"Back"}),o.jsx(rt,{variant:"primary",size:"sm",onClick:a.onClick,children:n?"Finish":"Next"})]})]})]}),bke="sami_completed_tours";function GY(e){return e?`${bke}_${e}`:null}const KY=N.createContext(),Lu=()=>{const e=N.useContext(KY);if(!e)throw new Error("useOnboarding must be used within an OnboardingProvider");return e};function wke(e){const t=GY(e);if(!t)return{};try{const r=localStorage.getItem(t);return r?JSON.parse(r):{}}catch{return{}}}function ik(e,t){const r=GY(e);if(r)try{localStorage.setItem(r,JSON.stringify(t))}catch{}}const _ke=({children:e})=>{const{user:t}=Wi(),[r,n]=N.useState(()=>{if(!t)return{};const E=wke(t.id),T=t.completed_tours||{};return{...E,...T}}),a=N.useRef(r);N.useEffect(()=>{a.current=r},[r]);const[i,s]=N.useState(null),[l,c]=N.useState([]),[u,d]=N.useState(!1),[f,p]=N.useState(0),m=N.useRef(!1),x=JSON.stringify((t==null?void 0:t.completed_tours)||{});N.useEffect(()=>{if(!t){n({});return}const E=JSON.parse(x);Object.keys(E).length>0&&(ik(t.id,E),n(E))},[t==null?void 0:t.id,x]);const y=N.useCallback(E=>r[E]===!0,[r]),v=N.useCallback((E,{force:T=!1}={})=>{if(!T&&a.current[E]===!0)return;const O=VY.find(A=>A.id===E);if(!O){console.warn(`[Onboarding] Unknown tour ID: ${E}`);return}m.current=!1,s(E),c(O.steps.map(A=>({...A,disableBeacon:!0}))),p(0),d(!0)},[]),b=N.useCallback(async E=>{const T=t==null?void 0:t.id;n(O=>{const A={...O,[E]:!0};return ik(T,A),A}),s(null),d(!1),c([]),p(0);try{await oa.patch("/auth/tours",{tourId:E})}catch(O){console.error("[Onboarding] Failed to persist tour completion:",O)}},[t==null?void 0:t.id]),w=N.useCallback(()=>{i&&b(i)},[i,b]),S=N.useCallback(E=>{const T=t==null?void 0:t.id;n(O=>{const A={...O};return delete A[E],ik(T,A),A})},[t==null?void 0:t.id]),j=N.useCallback(E=>{const{action:T,index:O,status:A,type:P}=E;[cr.FINISHED].includes(A)?m.current?b(i):(s(null),d(!1),c([]),p(0)):[cr.SKIPPED].includes(A)?w():P===ss.STEP_AFTER?(m.current=!0,p(O+(T===Tr.PREV?-1:1))):P===ss.TARGET_NOT_FOUND&&p(O+1)},[i,b,w]),k=N.useMemo(()=>({activeTour:i,completedTours:r,isTourCompleted:y,startTour:v,completeTour:b,resetTour:S}),[i,r,y,v,b,S]);return o.jsxs(KY.Provider,{value:k,children:[e,u&&l.length>0&&o.jsx(USe,{steps:l,run:u,stepIndex:f,continuous:!0,showSkipButton:!0,showProgress:!1,callback:j,tooltipComponent:vke,spotlightClicks:!0,disableOverlayClose:!0,scrollToFirstStep:!0,scrollOffset:100,styles:{options:{zIndex:9500,arrowColor:"rgba(15, 23, 42, 0.95)"},overlay:{backgroundColor:"rgba(0, 0, 0, 0.5)"}},floaterProps:{styles:{floater:{zIndex:9501}}}})]})},YY=({onFileProcessed:e,onError:t,onBack:r,maxFiles:n=1,onMultipleFiles:a})=>{const{startTour:i}=Lu(),[s,l]=N.useState(!1);N.useEffect(()=>{const v=setTimeout(()=>i(Fi.UPLOAD_FLOW),500);return()=>clearTimeout(v)},[i]);const[c,u]=N.useState(null),d=new f4,f=async v=>{l(!0),u(null);try{const b=await d.extractRawData(v);if(!b.success){t(b.error||"File processing failed"),l(!1);return}e({file:v,fileType:b.fileType,rawData:b.rawData,potentialHeaders:b.headers,preview:b.preview})}catch(b){console.error("File upload error:",b),t(b.message)}finally{l(!1)}},p=N.useCallback(async v=>{if(v.length!==0){if(v.length>1&&a){a(v);return}await f(v[0])}},[a]),{getRootProps:m,getInputProps:x,isDragActive:y}=gV({onDrop:p,accept:{"text/csv":[".csv"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.ms-excel":[".xls"]},maxFiles:n,disabled:s});return o.jsxs("div",{className:"w-full space-y-6",children:[o.jsxs("div",{...m(),"data-tour":"upload-dropzone",className:` 892 relative overflow-hidden 893 p-8 rounded-xl transition-all duration-300 894 bg-gray-900/50 backdrop-blur-xl 895 border-2 border-dashed 896 ${y?"border-accent-gold bg-gray-900/70 shadow-[0_0_40px_rgba(245,158,11,0.3)] scale-[1.02]":"border-white/20 hover:border-white/30 hover:shadow-[0_0_30px_rgba(245,158,11,0.15)]"} 897 ${c?"border-red-500/50 shadow-[0_0_30px_rgba(239,68,68,0.2)]":""} 898 ${s?"cursor-wait":"cursor-pointer"} 899 group 900 `,children:[o.jsx("input",{...x(),disabled:s}),o.jsx("div",{className:` 901 absolute inset-0 opacity-0 transition-opacity duration-300
902 bg-gradient-to-br from-accent-gold/10 via-transparent to-primary-light/10 903 ${y?"opacity-100":"group-hover:opacity-50"} 904 `}),o.jsx("div",{className:"relative z-10",children:s?o.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[o.jsxs("div",{className:"w-16 h-16 relative",children:[o.jsx("div",{className:"absolute inset-0 rounded-full bg-gradient-to-r from-accent-gold to-primary-light animate-spin"}),o.jsx("div",{className:"absolute inset-1 rounded-full bg-gray-900/90 backdrop-blur-sm"}),o.jsx(R2,{className:"absolute inset-2 text-accent-gold"})]}),o.jsx("p",{className:"text-gray-300 font-medium",children:"Processing file..."})]}):y?o.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[o.jsx(R2,{className:"w-16 h-16 text-accent-gold animate-bounce"}),o.jsx("p",{className:"text-accent-gold font-semibold text-lg",children:"Drop your file here"})]}):o.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[o.jsx(R2,{className:"w-16 h-16 text-gray-400 group-hover:text-accent-gold transition-colors duration-300"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-gray-200 font-semibold text-lg mb-1",children:n>1?"Upload files":"Upload a file"}),o.jsx("p",{className:"text-gray-400 text-sm",children:n>1?`Drag and drop or click to select â up to ${n} at once`:"Drag and drop or click to select"})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[o.jsx("span",{className:"px-2 py-1 bg-gray-800/50 rounded-md border border-gray-700/50",children:"CSV"}),o.jsx("span",{className:"px-2 py-1 bg-gray-800/50 rounded-md border border-gray-700/50",children:"XLSX"}),o.jsx("span",{className:"px-2 py-1 bg-gray-800/50 rounded-md border border-gray-700/50",children:"XLS"})]})]})})]}),c&&o.jsx("div",{className:"p-4 rounded-xl bg-red-500/10 backdrop-blur-sm border border-red-500/20 text-red-400",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("svg",{className:"w-5 h-5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:o.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),o.jsx("span",{className:"text-sm",children:c})]})}),r&&o.jsx("div",{className:"flex justify-between pt-6 border-t border-white/10",children:o.jsx("button",{type:"button",onClick:r,className:"px-6 py-3 bg-gray-800/50 text-gray-200 rounded-lg border border-white/20 hover:bg-gray-800/70 hover:border-white/30 transition-all duration-200",children:"Back"})})]})},sn={NOT_AVAILABLE:"__NOT_AVAILABLE__"},or={STRING:"string",NUMBER:"number",DATE:"date",CURRENCY:"currency",BOOLEAN:"boolean"},sk={isString:e=>e==null?!1:typeof e=="string"||typeof e=="number",isNumber:e=>e==null?!1:typeof e=="number"?!0:typeof e!="string"?!1:!isNaN(e.trim())&&!isNaN(parseFloat(e)),isDate:e=>{if(e==null)return!1;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e!="string")return!1;const t=new Date(e);return!isNaN(t.getTime())},isCurrency:e=>{if(e==null)return!1;if(typeof e=="number")return!0;if(typeof e!="string")return!1;const t=e.replace(/[$,\s]/g,"");return!isNaN(t)&&!isNaN(parseFloat(t))},isBoolean:e=>{if(e==null)return!1;if(typeof e=="boolean")return!0;if(typeof e!="string")return!1;const t=e.toLowerCase().trim();return["true","false","yes","no","1","0"].includes(t)}};
904class ok extends Error{constructor(t,r={}){super(t),this.name="FileProcessingError",this.field=r.field,this.row=r.row,this.value=r.value}}const R$=e=>{if(e==null)return null;const t=String(e).replace(/[^0-9.-]/g,""),r=t.startsWith("-"),n=t.replace(/-/g,""),[a,...i]=n.split("."),s=i.length>0?`${a}.${i.join("")}`:a;return/\d/.test(s)?r?`-${s}`:s:null},Ske=e=>{if(e==null||e==="")return"";const t=String(e),r=t.startsWith("-"),n=r?t.slice(1):t,a=n.includes("."),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,",");return`${r?"-":""}$${l}${a?".":""}${s??""}`},Eke=e=>{if(e==null||e==="")return"";const t=Number(e);if(Number.isNaN(t))return"";const r=t<0,n=Math.abs(t).toFixed(2),[a,i]=n.split("."),s=a.replace(/\B(?=(\d{3})+(?!\d))/g,",");return`${r?"-":""}$${s}.${i}`},kke=(e,t)=>{let r=0;const n=Math.min(t,e.length);for(let a=0;a<n;a++)/\d/.test(e[a])&&r++;return r},Nke=(e,t)=>{if(t<=0){const n=e.search(/\d/);return n===-1?e.length:n}let r=0;for(let n=0;n<e.length;n++)if(/\d/.test(e[n])&&(r++,r===t))return n+1;return e.length},Qt=se.forwardRef(({label:e,value:t,onChange:r,isEditing:n=!1,type:a="text",placeholder:i,className:s="",fieldClassName:l="",required:c=!1,disabled:u=!1,prefix:d="",suffix:f="",formatter:p,options:m=[],rows:x=3,min:y,max:v,step:b,error:w,helperText:S,...j},k)=>{const E=p&&!n?p(t):t,[T,O]=N.useState(!1),A=N.useRef(null),P=N.useRef(null);N.useLayoutEffect(()=>{if(P.current===null)return;const L=A.current;if(!L)return;const U=Nke(L.value,P.current);L.setSelectionRange(U,U),P.current=null});const I=` 905 w-full px-3 py-2 906 bg-card/50 backdrop-blur-sm 907 border border-white/20 rounded-lg 908 text-white 909 focus:outline-none focus:border-accent 910 focus:bg-card/70 focus:shadow-glow-sm 911 transition-all 912 ${u?"opacity-50 cursor-not-allowed":""} 913 ${w?"border-red-400 focus:border-red-400":""} 914 ${l} 915 `.trim(),R="block text-xs font-medium text-gray-400 mb-1 uppercase tracking-wider";if(!n)return o.jsxs("div",{className:s,children:[o.jsxs("label",{className:R,children:[e,c&&o.jsx("span",{className:"text-red-400 ml-1",children:"*"})]}),o.jsxs("p",{className:"form-field-value",children:[d,E||"N/A",f]}),S&&!w&&o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:S}),w&&o.jsx("p",{className:"text-xs text-red-400 mt-1",children:w})]});const M=()=>{switch(a){case"select":return o.jsxs("select",{value:t||"",onChange:U=>r(U.target.value),disabled:u,className:I,...j,children:[o.jsxs("option",{value:"",children:["Select ",e]}),m.map(U=>o.jsx("option",{value:U.value??U,children:U.label??U},U.value??U))]});case"textarea":return o.jsx("textarea",{value:t||"",onChange:U=>r(U.target.value),placeholder:i,disabled:u,rows:x,className:I,...j});case"number":case"percentage":{const U=a==="number"?W=>W===""?null:W:W=>R$(W);return o.jsxs("div",{className:"relative",children:[d&&o.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:d}),o.jsx("input",{ref:k,type:"number",value:t||"",onChange:W=>r(U(W.target.value)),placeholder:i,disabled:u,min:y,max:v,step:b,className:`${I} ${d?"pl-8":""} ${f?"pr-8":""}`,...j}),f&&o.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",children:f})]})}case"currency":{const{onFocus:U,onBlur:W,...V}=j,G=t==null||t===""?"":String(t),K=T?Ske(G):Eke(G),F=X=>{const Y=X.target.value,ae=X.target.selectionStart??Y.length;P.current=kke(Y,ae),r(R$(Y))},ne=X=>{O(!0),U==null||U(X)},H=X=>{O(!1),W==null||W(X)},B=X=>{A.current=X,typeof k=="function"?k(X):k&&(k.current=X)};return o.jsxs("div",{className:"relative",children:[d&&o.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:d}),o.jsx("input",{ref:B,type:"text",inputMode:"decimal",value:K,onChange:F,onFocus:ne,onBlur:H,placeholder:i,disabled:u,min:y,max:v,step:b,className:`${I} ${d?"pl-8":""} ${f?"pr-8":""}`,...V}),f&&o.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",children:f})]})}case"date":const L=t&&typeof t=="string"&&t.includes("T")?t.split("T")[0]:t||"";return o.jsx("input",{type:"date",value:L,onChange:U=>r(U.target.value),disabled:u,min:y,max:v,className:I,...j});case"month":return o.jsx("input",{ref:k,type:"month",value:typeof t=="string"?t.slice(0,7):"",onCh
915ange:U=>r(U.target.value),disabled:u,min:y,max:v,className:I,...j});case"checkbox":return o.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:t||!1,onChange:U=>r(U.target.checked),disabled:u,className:"w-4 h-4 rounded border-white/20 bg-card/50 text-accent focus:ring-accent focus:ring-offset-0",...j}),o.jsx("span",{className:"text-white text-sm",children:i||e})]});default:return o.jsx("input",{ref:k,type:a,value:t||"",onChange:U=>r(U.target.value),placeholder:i,disabled:u,className:I,...j})}};return o.jsxs("div",{className:s,children:[a!=="checkbox"&&o.jsxs("label",{className:R,children:[e,c&&o.jsx("span",{className:"text-red-400 ml-1",children:"*"})]}),M(),S&&!w&&o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:S}),w&&o.jsx("p",{className:"text-xs text-red-400 mt-1",children:w})]})}),j4=({value:e,onChange:t,placeholder:r="Search...",className:n="",showClearButton:a=!0,size:i="md",...s})=>{const l={sm:{input:"py-1.5 pl-8 pr-3 text-xs",icon:"h-3.5 w-3.5",iconPadding:"left-2.5",clear:"right-2"},md:{input:"py-2.5 pl-10 pr-3 text-sm",icon:"h-4 w-4",iconPadding:"left-3",clear:"right-2.5"},lg:{input:"py-3 pl-11 pr-3 text-base",icon:"h-5 w-5",iconPadding:"left-3",clear:"right-3"}},c=l[i]||l.md,u=()=>{t({target:{value:""}})};return o.jsxs("div",{className:`relative flex items-center ${n}`,children:[o.jsx("div",{className:"absolute left-3 pointer-events-none",children:o.jsx(ER,{className:`${c.icon} text-gray-400`})}),o.jsx("input",{type:"text",value:e,onChange:t,placeholder:r,className:` 916 block w-full ${c.input} 917 bg-card/50 backdrop-blur-sm 918 border border-white/20 rounded-lg 919 text-white placeholder-gray-500 920 focus:outline-none focus:border-accent focus:bg-card/70 921 focus:shadow-glow-sm 922 transition-all 923 hover:border-white/30 924 `.trim(),...s}),a&&e&&o.jsx("button",{type:"button",onClick:u,className:`absolute inset-y-0 ${c.clear} flex items-center text-gray-400 hover:text-white transition-colors`,children:o.jsx(Ir,{className:`${c.icon}`})})]})},Be=(e,t={})=>{const{compact:r=!1,accounting:n=!1,decimals:a=0,prefix:i="$",locale:s="en-US"}=t;if(e==null||e==="")return"N/A";const l=typeof e=="number"?e:parseFloat(e);if(isNaN(l))return"N/A";if(l===0)return`${i}0`;const c=Math.abs(l),u=l<0;if(r){if(c>=1e9)return`${i}${(l/1e9).toFixed(1)}B`;if(c>=1e6)return`${i}${(l/1e6).toFixed(1)}M`;if(c>=1e3)return`${i}${(l/1e3).toFixed(a)}K`}const d=c.toLocaleString(s,{minimumFractionDigits:a,maximumFractionDigits:a});return n&&u?`(${i}${d})`:`${u?"-":""}${i}${d}`},hi=e=>{if(e==null||e==="")return"N/A";const t=typeof e=="number"?e:parseFloat(e);return isNaN(t)?"N/A":`$${t.toLocaleString("en-US")}`},Jn=e=>e?e instanceof Date?e:typeof e=="string"&&e.match(/^\d{4}-\d{2}-\d{2}$/)?new Date(e+"T12:00:00"):new Date(e):null,Ct=(e,t="short")=>{if(!e)return"N/A";let r;if(typeof e=="number"&&e>3e4){const n=new Date(1900,0,0),i=(e<61?e-1:e-2)*24*60*60*1e3;r=new Date(n.getTime()+i)}else e instanceof Date?r=e:r=Jn(e);if(!r||isNaN(r.getTime()))return"N/A";switch(t){case"iso":return r.toISOString().split("T")[0];case"long":return r.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});case"month-year":return r.toLocaleDateString("en-US",{year:"numeric",month:"short"});case"compact":const n=(r.getMonth()+1).toString().padStart(2,"0"),a=r.getDate().toString().padStart(2,"0"),i=r.getFullYear().toString().slice(-2);return`${n}/${a}/${i}`;case"short":default:return r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}},pr=(e,t=2,r=!0,n=!1)=>{if(e==null||e==="")return"N/A";const a=typeof e=="number"?e:parseFloat(e);if(isNaN(a))return"N/A";if(a===0)return r?"0%":"0";const i=a<0,l=Math.abs(a).toFixed(t);if(n&&i)return r?`(${l}%)`:`(${l})`;const c=`${i?"-":""}${l}`;return r?`${c}%`:c},XY=e=>{if(e==null||e==="")return null;if(typeof e=="number")return e;try{let t=e.toString().trim(),r=!1;t.startsWith("(")&&t.endsWith(")")&&(r=!0,t=t.slice(1,-1));const n=t.replace(/[$,]/g,""),a=parseFloat(n);return isNaN(a)?null:r?-a||0:a}catch(t){return console.error("Number parsing error:",t,e),null}},Tke=e=>{if(!e||typeof e!="number")return null;try{const t=new Date(1900,0,0),n=(e<61?e-1:e-2)*24*60*60*1e3;return new Date(t.getTime()+n)}catch(t){return console.error("Excel date parsing error:",t,e),null}},Ig=(e,t=0)=>{if(e==null||e==="")return"N/A";const r=typeof e=="number"?e:parseFloat(e);
924return isNaN(r)?"N/A":r.toLocaleString("en-US",{minimumFractionDigits:t,maximumFractionDigits:t})},jke=(e,t=2,r=!0)=>{if(e==null||e==="")return"N/A";const n=typeof e=="number"?e:parseFloat(e);if(isNaN(n))return"N/A";const a=n.toFixed(t);return r?`${a}x`:a},Ake=e=>{if(!e)return"N/A";const t=Jn(e);if(!t||isNaN(t.getTime()))return"N/A";const n=new Date-t,a=Math.floor(n/1e3),i=Math.floor(a/60),s=Math.floor(i/60),l=Math.floor(s/24),c=Math.floor(l/7),u=Math.floor(l/30),d=Math.floor(l/365);return a<60?"just now":i<60?`${i} ${i===1?"minute":"minutes"} ago`:s<24?`${s} ${s===1?"hour":"hours"} ago`:l<7?`${l} ${l===1?"day":"days"} ago`:c<4?`${c} ${c===1?"week":"weeks"} ago`:u<12?`${u} ${u===1?"month":"months"} ago`:`${d} ${d===1?"year":"years"} ago`},v_=se.forwardRef((e,t)=>o.jsx(Qt,{ref:t,type:"text",isEditing:!0,...e})),Cke=se.forwardRef(({value:e,onChange:t,...r},n)=>{const a=i=>{if(!i)return"";const s=parseFloat(i);return isNaN(s)?i:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(s)};return o.jsx(Qt,{ref:n,type:"currency",value:e,onChange:t,formatter:a,step:"0.01",...r})});se.forwardRef(({value:e,onChange:t,...r},n)=>{const a=i=>i?`${i}%`:"";return o.jsx(Qt,{ref:n,type:"percentage",value:e,onChange:t,formatter:a,min:"0",max:"100",step:"0.01",...r})});const UC=se.forwardRef(({value:e,onChange:t,...r},n)=>{const a=s=>{if(!s)return"";if(typeof s=="string"&&s.match(/^\d{4}-\d{2}-\d{2}$/))return s;try{const l=Jn(s);if(!l||isNaN(l.getTime()))return s;const c=l.getFullYear(),u=String(l.getMonth()+1).padStart(2,"0"),d=String(l.getDate()).padStart(2,"0");return`${c}-${u}-${d}`}catch{return s}},i=s=>{if(!s)return"";try{const l=Jn(s);return!l||isNaN(l.getTime())?s:l.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return s}};return o.jsx(Qt,{ref:n,type:"date",value:a(e),onChange:t,formatter:i,...r})}),I$=se.forwardRef(({value:e,onChange:t,...r},n)=>{const a=i=>{if(!i)return"";const s=Jn(`${String(i).slice(0,7)}-01`);return!s||isNaN(s.getTime())?i:s.toLocaleDateString("en-US",{year:"numeric",month:"short"})};return o.jsx(Qt,{ref:n,type:"month",isEditing:!0,value:e,onChange:t,formatter:a,...r})});se.forwardRef(({value:e,onChange:t,...r},n)=>{const a=s=>{const c=s.replace(/\D/g,"").substring(0,10);t(c)},i=s=>{if(!s)return"";const c=s.replace(/\D/g,"").match(/^(\d{3})(\d{3})(\d{4})$/);return c?`(${c[1]}) ${c[2]}-${c[3]}`:s};return o.jsx(Qt,{ref:n,type:"tel",value:e,onChange:a,formatter:i,placeholder:"(555) 555-5555",...r})});se.forwardRef((e,t)=>o.jsx(Qt,{ref:t,type:"email",placeholder:"[email protected]",...e}));const al=se.forwardRef(({options:e=[],...t},r)=>{const n=e.map(a=>typeof a=="string"?{value:a,label:a}:a);return o.jsx(Qt,{ref:r,type:"select",options:n,isEditing:!0,...t})});se.forwardRef((e,t)=>o.jsx(Qt,{ref:t,type:"textarea",rows:4,isEditing:!0,...e}));const Oke=se.forwardRef((e,t)=>o.jsx(Qt,{ref:t,type:"checkbox",...e}));se.forwardRef(({value:e,onChange:t,...r},n)=>{const a=i=>{if(!i)return"";const s=parseFloat(i);return isNaN(s)?i:`${s.toLocaleString()} sq ft`};return o.jsx(Qt,{ref:n,type:"number",value:e,onChange:t,formatter:a,min:"0",step:"1",...r})});se.forwardRef(({value:e,onChange:t,...r},n)=>{const a=i=>{if(!i)return"";const s=parseInt(i);return isNaN(s)?i:`${s} ${s===1?"unit":"units"}`};return o.jsx(Qt,{ref:n,type:"number",value:e,onChange:t,formatter:a,min:"0",step:"1",...r})});const Wv=({title:e,icon:t,children:r,className:n="",columns:a=1})=>{const i={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"};return o.jsxs("div",{className:`glass-card p-6 ${n}`,children:[e&&o.jsxs("h4",{className:"text-sm font-semibold text-gray-300 uppercase tracking-wider mb-6 flex items-center",children:[t&&o.jsx("div",{className:"p-2 bg-gradient-to-br from-accent/20 to-accent/10 rounded-lg mr-3",children:o.jsx(t,{className:"h-4 w-4 text-accent-light"})}),o.jsx("span",{className:"bg-gradient-to-r from-accent-light to-accent bg-clip-text text-transparent",children:e})]}),o.jsx("div",{className:`grid ${i[a]} gap-6`,children:r})]})},Pke=({rawData:e,onHeaderSelection:t,onCancel:r})=>{var u,d;const[n,a]=N.useState(0);if(!e||!Array.isArray(e)||e.length===0)return o.jsx("div",{className:"p-4 rounded-lg bg-red-500/10 backdrop-blur-sm border border-red-500/20 text-red-400",children:"No data available to process. Please try uploading again."});const i=((u=e[0])==null?void 0:u.length)||0,s=N.useMemo(()=>{const f=Math.max(0,n-3),p=Math.min(e.length,n+4);return{rows:e.slice(f,p),startIndex:f}},[e,n]),l=e[n]||[],c=()=>
924{if(n>=e.length){console.error("Invalid header row selected");return}const f=e[n],p=e.slice(n+1);t({headers:f,data:p,headerRow:n})};return o.jsx("div",{className:"space-y-6",children:o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-xl border border-white/10 shadow-[0_0_30px_rgba(245,158,11,0.15)]",children:[o.jsxs("div",{className:"p-6 border-b border-white/10",children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-200",children:[o.jsx(vV,{className:"w-5 h-5 inline mr-2 text-accent-gold"}),"Select Header Row"]}),o.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Choose which row contains your column headers"})]}),o.jsx("div",{className:"p-6",children:o.jsxs("div",{className:"flex items-center space-x-4 bg-gray-800/30 p-4 rounded-lg border border-white/20",children:[o.jsx("label",{htmlFor:"headerRow",className:"text-sm font-medium text-gray-200",children:"Header Row:"}),o.jsx("input",{type:"number",id:"headerRow",min:1,max:e.length,value:n+1,onChange:f=>{const p=parseInt(f.target.value,10)||1,m=Math.max(0,Math.min(p-1,e.length-1));a(m)},className:"block w-24 rounded-lg bg-gray-800/50 border border-white/20 px-3 py-2 text-gray-200 focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200"}),o.jsxs("span",{className:"text-xs text-gray-500",children:["of ",e.length," rows"]})]})}),o.jsx("div",{className:"px-6 pb-4",children:o.jsxs("div",{className:"bg-gray-800/30 p-4 rounded-lg border border-accent-gold/30",children:[o.jsxs("h4",{className:"text-xs font-medium text-accent-gold mb-2 uppercase tracking-wider",children:["Selected Headers (Row ",n+1,")"]}),o.jsx("div",{className:"flex flex-wrap gap-2",children:l.map((f,p)=>o.jsx("span",{className:"px-2 py-1 text-xs bg-gray-700/50 text-gray-200 rounded border border-white/10",children:(f==null?void 0:f.toString())||`Column ${p+1}`},p))})]})}),o.jsxs("div",{className:"p-6 border-t border-white/10",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-200 mb-4",children:"Row Preview"}),o.jsx("div",{className:"overflow-x-auto rounded-lg border border-white/10",children:o.jsxs("table",{className:"min-w-full divide-y divide-white/10",children:[o.jsx("thead",{className:"bg-gray-800/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-3 py-3 text-left text-xs font-medium text-accent-gold",children:"Row"}),Array.from({length:Math.min(i,10)}).map((f,p)=>o.jsxs("th",{className:"px-3 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:["Col ",p+1]},p)),i>10&&o.jsxs("th",{className:"px-3 py-3 text-left text-xs font-medium text-gray-500",children:["+",i-10," more"]})]})}),o.jsx("tbody",{className:"bg-gray-900/30 divide-y divide-white/10",children:(d=s.rows)==null?void 0:d.map((f,p)=>{const m=s.startIndex+p,x=m===n,y=m<n;return o.jsxs("tr",{className:`transition-all duration-200 ${x?"bg-gray-800/70 border-l-4 border-l-accent-gold shadow-[0_0_20px_rgba(245,158,11,0.1)]":y?"opacity-40":"hover:bg-gray-800/30"}`,children:[o.jsxs("td",{className:`px-3 py-2 text-xs whitespace-nowrap font-medium ${x?"text-accent-gold":"text-gray-400"}`,children:[m+1,x&&o.jsx("span",{className:"ml-2 text-[10px] text-accent-gold/70",children:"(header)"})]}),f.slice(0,10).map((v,b)=>o.jsx("td",{className:`px-3 py-2 text-xs whitespace-nowrap overflow-hidden text-ellipsis ${x?"text-gray-200 font-medium":y?"text-gray-600":"text-gray-400"}`,style:{maxWidth:"150px"},children:(v==null?void 0:v.toString())||""},b)),i>10&&o.jsx("td",{className:"px-3 py-2 text-xs text-gray-500",children:"..."})]},p)})})]})}),o.jsx("p",{className:"mt-3 text-xs text-gray-500",children:"Rows before the header will be skipped. Data rows follow the selected header."})]}),o.jsxs("div",{className:"px-6 py-4 bg-gray-800/30 text-right rounded-b-xl border-t border-white/10 flex justify-between items-center",children:[o.jsx("p",{className:"text-xs text-gray-500",children:'Tip: Look for rows with column names like "Unit", "Tenant", "Rent", etc.'}),o.jsxs("div",{children:[o.jsx(rt,{onClick:r,variant:"ghost",className:"mr-3",children:"Cancel"}),o.jsx(rt,{onClick:c,variant:"primary",icon:vl,children:"Confirm Headers"})]})]})]})})},Rke=({data:e,mapping:t,requiredFields:r,headers:n})=>{const a=N.useMemo(()=>!r||!t?[]:r.map(s=>{const l=t[s.field];return{...s,columnIndex:l,label:s.label||s.field.replace(/([A-Z])/g," $1").trim(),originalHeader:typeof l=="number"?n==null?void 0:n[l]:null}}),[r,t,n]),i=(s,l)=>{if(s==null||s==="")return"N/A";try{switch(l){case or.DATE:const c=parseFloat(s);if(!isNaN(c)&&c>3e4){const p=new Date(1899,11,30),x=c*24*60*60*1e3;return new Date(p.getTime()+x).toLocaleDateString()}const u=new Date(s);return isNaN(u.getTime())?"Invalid Date":u.toLocaleDateString();case or.CURRENCY:const d=parseFloat(s);return isNaN(d)?"Invalid Amount":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(d);case or.NUMBER:const f=parseFloat(s);
924return isNaN(f)?"Invalid Number":f.toLocaleString();default:return String(s)}}catch{return"Error"}};return!e||!Array.isArray(e)||e.length===0||a.length===0?o.jsx("div",{className:"text-sm text-gray-500 italic",children:"No data available for preview"}):o.jsxs("div",{className:"space-y-3",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Data Preview"}),o.jsx("div",{className:"overflow-x-auto shadow ring-1 ring-black ring-opacity-5 rounded-lg",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsx("tr",{children:a.map(({field:s,label:l,columnIndex:c,originalHeader:u,required:d})=>o.jsx("th",{className:"px-3 py-3.5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("span",{children:[l,d&&o.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),o.jsx("span",{className:"text-gray-400 font-normal normal-case",children:typeof c=="number"?`Column ${c+1}${u?` (${u})`:""}`:"(unmapped)"})]})},s))})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.slice(0,5).map((s,l)=>o.jsx("tr",{children:a.map(({field:c,type:u,columnIndex:d})=>{const f=typeof d=="number"?s[d]:null;return o.jsx("td",{className:"px-3 py-2 text-sm whitespace-nowrap text-gray-900",children:i(f,u)},c)})},l))})]})}),o.jsxs("div",{className:"text-xs text-gray-500",children:["Showing ",Math.min(e.length,5)," of ",e.length," rows"]})]})},Ike=({rawData:e,headers:t,onDataRowSelection:r,onBack:n})=>{var u;const[a,i]=N.useState(1);if(!e||!Array.isArray(e)||e.length===0)return o.jsx("div",{className:"p-4 rounded-lg bg-red-500/10 backdrop-blur-sm border border-red-500/20 text-red-400",children:"No data available to process"});const s=e[0].length,l=N.useMemo(()=>{const d=Math.max(0,a-3),f=Math.min(e.length,a+3);return{rows:e.slice(d,f),startIndex:d}},[e,a]),c=()=>{const d=e.slice(a);if(d.length===0){console.error("No data rows selected");return}r({data:d,dataStartRow:a})};return o.jsx("div",{className:"space-y-6",children:o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-xl border border-white/10 shadow-[0_0_30px_rgba(245,158,11,0.15)]",children:[o.jsxs("div",{className:"p-6 border-b border-white/10",children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-200",children:[o.jsx(kV,{className:"w-5 h-5 inline mr-2 text-accent-gold"}),"Select Data Start Row"]}),o.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Choose which row contains your first row of data"})]}),o.jsx("div",{className:"p-6",children:o.jsxs("div",{className:"flex items-center space-x-4 bg-gray-800/30 p-4 rounded-lg border border-white/20",children:[o.jsx("label",{htmlFor:"startRow",className:"text-sm font-medium text-gray-200",children:"Data Starts at Row:"}),o.jsx("input",{type:"number",id:"startRow",min:1,max:e.length,value:a+1,onChange:d=>{const f=parseInt(d.target.value,10)||1,p=Math.max(0,Math.min(f-1,e.length-1));i(p)},className:"block w-24 rounded-lg bg-gray-800/50 border border-white/20 px-3 py-2 text-gray-200 focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200"})]})}),o.jsxs("div",{className:"p-6 border-t border-white/10",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-200 mb-4",children:"Data Preview"}),o.jsx("div",{className:"overflow-x-auto rounded-lg border border-white/10",children:o.jsxs("table",{className:"min-w-full divide-y divide-white/10",children:[o.jsx("thead",{className:"bg-gray-800/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-3 py-3 text-left text-xs font-medium text-accent-gold",children:"Row"}),Array.from({length:s}).map((d,f)=>o.jsxs("th",{className:"px-3 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:["Column ",f+1]},f))]})}),o.jsx("tbody",{className:"bg-gray-900/30 divide-y divide-white/10",children:(u=l.rows)==null?void 0:u.map((d,f)=>{const p=l.startIndex+f,m=p===a;return o.jsxs("tr",{className:`transition-all duration-200 ${m?"bg-gray-800/70 border-l-4 border-l-accent-gold
924shadow-[0_0_20px_rgba(245,158,11,0.1)]":p<a?"opacity-40":"hover:bg-gray-800/30"}`,children:[o.jsx("td",{className:`px-3 py-2 text-xs whitespace-nowrap font-medium ${m?"text-accent-gold":"text-gray-400"}`,children:p+1}),d.map((x,y)=>o.jsx("td",{className:`px-3 py-2 text-xs whitespace-nowrap overflow-hidden text-ellipsis ${m?"text-gray-200":p<a?"text-gray-600":"text-gray-400"}`,style:{maxWidth:"200px"},children:(x==null?void 0:x.toString())||""},y))]},f)})})]})}),o.jsx("p",{className:"mt-3 text-xs text-gray-500",children:"Rows before the selected start row will be skipped"})]}),o.jsxs("div",{className:"px-6 py-4 bg-gray-800/30 text-right rounded-b-xl border-t border-white/10",children:[o.jsx("button",{type:"button",onClick:n,className:"mr-3 px-6 py-3 text-sm font-medium text-gray-300 hover:text-gray-100 transition-colors",children:"Back"}),o.jsxs("button",{type:"button",onClick:c,className:"btn-primary",children:[o.jsx(vl,{className:"w-4 h-4 inline mr-2"}),"Confirm Data Start"]})]})]})})},F$={required:[{field:"plCategory",aliases:["category","description","account","account_name","line_item","item","gl_description","expense","income","revenue"]}],optional:[{field:"plGlCode",aliases:["gl_code","gl","account_code","acct_code","code","account_number","acct_no","gl_number"]},{field:"plYtd",aliases:["ytd","year_to_date","year to date","ytd_actual","ytd_total","cumulative"]},{field:"plBudget",aliases:["budget","budgeted","budget_amount","planned","forecast"]},{field:"plVariance",aliases:["variance","var","difference","diff","variance_amount","budget_variance"]},{field:"plTotal",aliases:["total","grand_total","sum","total_amount","annual","annual_total"]}]},Fke=[/^(january|february|march|april|may|june|july|august|september|october|november|december)(\s+\d{2,4})?$/i,/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)(\s+\d{2,4})?$/i,/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[-_/]?\d{2,4}$/i,/^(january|february|march|april|may|june|july|august|september|october|november|december)[-_/]?\d{2,4}$/i,/^(0?[1-9]|1[0-2])[-_/]\d{2,4}$/,/^\d{2,4}[-_/](0?[1-9]|1[0-2])$/],Mke=e=>{if(!e||typeof e!="string")return!1;const t=e.trim();return Fke.some(r=>r.test(t))},M$={required:[{field:"unitNumber",aliases:["unit","unit_number","unit_id","unit_no","apt","apartment","apt_number","apt_no","unit#","apt#","space","suite"]},{field:"monthlyRent",aliases:["rent","monthly_rent","rent_amount","rental_amount","actual_rent","current_rent","contract_rent","scheduled_rent","charge","monthly_charge"]},{field:"deposit",aliases:["deposit","security_deposit","sec_dep","security","deposit_amount","sec_deposit"]},{field:"leaseEnd",aliases:["lease_end","lease_end_date","end_date","lease_expiration","expiration","expiration_date","lease_expires","expires"]},{field:"delinquency",aliases:["delinquency","delinquent","balance","balance_due","amount_due","past_due","outstanding","owed","arrears"]}],optional:[{field:"unitType",aliases:["unit_type","type","floor_plan","floorplan","plan","model","bed_bath","beds_baths","configuration"]},{field:"squareFeet",aliases:["sqft","sq_ft","square_feet","square_footage","unit_size","size","sf","area"]},{field:"tenantName",aliases:["tenant","tenant_name","resident","resident_name","occupant","name","lessee","renter"]},{field:"marketRent",aliases:["market","market_rent","market_rate","asking_rent","list_rent","advertised_rent"]},{field:"otherDeposit",aliases:["other_deposit","pet_deposit","additional_deposit","other_deposits","misc_deposit"]},{field:"moveInDate",aliases:["move_in","move_in_date","movein","moved_in","occupancy_date","start_date"]},{field:"leaseStart",aliases:["lease_start","lease_start_date","lease_begin","lease_from","start","begin_date","commencement"]},{field:"moveOutDate",aliases:["move_out","move_out_date","moveout","moved_out","vacate_date","notice_date"]}]},Vv=e=>e==null?"":String(e).toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""),w1=(e,t="rent-roll")=>{if(!e||!Array.isArray(e))return{};const r=e.map(s=>Vv(String(s??""))),n={},a=new Set,i=(s,l)=>{const c=Vv(s);for(let u=0;u<r.length;u++)if(!a.has(u)&&r[u]===c)return u;for(let u=0;u<r.length;u++)if(!a.has(u)){for(const d of l)if(r[u]===Vv(d))return u}for(let u=0;u<r.length;u++){if(a.has(u))continue;const d=r[u];if(d.includes(c))return u;for(const f of l)if(d.includes(Vv(f)))return u}return null};if(t==="pl"){const s=[...F$.required,...F$.optional];for(const{field:c,aliases:u}of s){const d=i(c,u);d!==null&&(n[c]=d,a.add(d))}const l=[];for(let c=0;c<e.length;c++){if(a.has(c))continue;const u=String(e[c]??"");Mke(u)&&(l.push(c),a.add(c))}return l.length>0&&(n.plMonthlyData=l),n}if(t==="rent-roll"){const s=[...M$.required,...M$.optional];for(const{field:l,aliases:c}of s){const u=i(l,c);u!==null&&(n[l]=u,a.add(u))}return n}return{}};class Mi{static async getPresets(t){try{return(await Xe.get(`/presets/${t}`)).data.presets||[]}catch(r){throw new Gt(r.message||"Failed to fetch presets",r.code||Bt.API_ERROR,r.userMe
924ssage||"Unable to load presets. Please try again.",!0)}}static async getPreset(t){try{return(await Xe.get(`/presets/detail/${t}`)).data.preset}catch(r){throw new Gt(r.message||"Failed to fetch preset",r.code||Bt.API_ERROR,r.userMessage||"Unable to load preset details. Please try again.",!0)}}static async createPreset(t){return ak(Xe.post("/presets",t),{successMessage:"Preset created successfully",errorMessage:"Failed to create preset. Please try again."})}static async updatePreset(t,r){return ak(Xe.put(`/presets/${t}`,r),{successMessage:"Preset updated successfully",errorMessage:"Failed to update preset. Please try again."})}static async deletePreset(t){return ak(Xe.delete(`/presets/${t}`),{successMessage:"Preset deleted successfully",errorMessage:"Failed to delete preset. Please try again."})}static async checkChanges(t,r){try{return(await Xe.post("/presets/check-changes",{presetId:t,currentMappings:r})).data}catch(n){throw new Gt(n.message||"Failed to check preset changes",n.code||Bt.API_ERROR,n.userMessage||"Unable to compare with preset. Please try again.",!1)}}}const bf=({isOpen:e,onClose:t,title:r,children:n,size:a="md",closeOnBackdrop:i=!0,closeOnEscape:s=!0,showCloseButton:l=!0,showHeader:c=!0,className:u="",animate:d=!0,footer:f,zIndex:p=60})=>{const m=N.useRef(null),x=N.useRef(null),y=N.useRef(!1),v=N.useRef(!1),b={sm:"max-w-md",md:"max-w-2xl",lg:"max-w-4xl",xl:"max-w-6xl",full:"max-w-full mx-4"},w=N.useCallback(E=>{s&&E.key==="Escape"&&t()},[s,t]),S=N.useCallback(E=>{v.current=E.target===E.currentTarget},[]),j=N.useCallback(E=>{i&&E.target===E.currentTarget&&v.current&&(v.current=!1,t())},[i,t]);if(N.useEffect(()=>{if(e)return y.current||(x.current=document.activeElement,y.current=!0,m.current&&m.current.focus()),document.addEventListener("keydown",w),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow="",!e&&x.current&&(x.current.focus(),y.current=!1)};y.current=!1},[e,w]),!e)return null;const k=o.jsxs(o.Fragment,{children:[o.jsx("div",{className:` 925 fixed inset-0 bg-black/70 backdrop-blur-sm 926 ${d?"animate-fade-in":""} 927 z-[60] 928 `,onMouseDown:S,onClick:j,"aria-hidden":"true"}),o.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4 z-[61]",onMouseDown:S,onClick:j,children:o.jsxs("div",{ref:m,role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,tabIndex:-1,className:` 929 relative w-full ${b[a]} 930 glass-card p-0 overflow-hidden 931 ${d?"animate-fade-in-up":""} 932 ${u} 933 `,onClick:E=>E.stopPropagation(),children:[c&&(r||l)&&o.jsx("div",{className:"bg-gradient-to-r from-primary/80 to-primary/60 backdrop-blur-md px-6 py-4 border-b border-white/10",children:o.jsxs("div",{className:"flex items-center justify-between",children:[r&&o.jsx("h2",{id:"modal-title",className:"text-xl font-bold text-white font-mono tracking-wide uppercase",children:r}),l&&o.jsx(rt,{onClick:t,variant:"ghost",size:"sm",icon:Ir,className:"ml-auto -mr-2","aria-label":"Close modal"})]})}),o.jsx("div",{className:"p-6 overflow-y-auto max-h-[calc(100vh-200px)]",children:n}),f&&o.jsx("div",{className:"px-6 py-4 border-t border-white/10 bg-primary/30",children:f})]})})]});return L0.createPortal(k,document.body)},Dke=` 934 @keyframes fade-in { 935 from { 936 opacity: 0; 937 } 938 to { 939 opacity: 1; 940 } 941 } 942 943 @keyframes fade-in-up { 944 from { 945 opacity: 0; 946 transform: translateY(10px); 947 } 948 to { 949 opacity: 1; 950 transform: translateY(0); 951 } 952 } 953 954 .animate-fade-in { 955 animation: fade-in 0.2s ease-out; 956 } 957 958 .animate-fade-in-up { 959 animation: fade-in-up 0.3s ease-out; 960 } 961`;if(typeof document<"u"&&!document.getElementById("modal-animations")){const e=document.createElement("style");e.id="modal-animations",e.textContent=Dke,document.head.appendChild(e)}const ki=({isOpen:e,onClose:t,onConfirm:r,onCancel:n,title:a="Confirm Action",message:i,confirmText:s="Confirm",cancelText:l="Cancel",variant:c="danger",icon:u,loading:d=!1,disabled:f=!1,extraButton:p=null})=>{const m={danger:{icon:wl,iconColor:"text-red-400",iconBg:"bg-red-500/10",confirmVariant:"danger"},warning:{icon:Bi,iconColor:"text-yellow-400",iconBg:"bg-yellow-500/10",confirmVariant:"primary"},info:{icon:bR,iconColor:"text-blue-400",iconBg:"bg-blue-500/10",confirmVariant:"primary"},success:{icon:vl,iconColor:"text-green-400",iconBg:"bg-green-500/10",confirmVariant:"primary"}},x=m[c]||m.danger,y=u||x.icon,v=async()=>{r&&await r(),t()},b=()=>{n&&n(),t()};return o.jsx(bf,{isOpen:e,onClose:b,size:"sm",showHeader:!1,className:"max-w-md",children:o.jsxs("div",{className:"flex flex-col items-center text-center",children:[o.jsx("div",{className:`p-3 rounded-full ${x.iconBg} mb-4`,children:o.jsx(y,{className:`h-8 w-8 ${x.iconColor}`})}),o.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:a}),i&&o.jsx("p",{className:"text-gray-400 mb-6 max-w-sm",children:i}),o.jsxs("div",{className:"flex items-center justify-center space-x-3 w-full",children:[o.jsx(rt,{onClick:b,variant:"secondary",disabled:d,className:"min-w-[100px]",children:l}),p&&o.jsx(rt,{onClick:p.onClick,variant:p.variant||"primary",disabled:d,className:"min-w-[100px]",children:p.text}),o.jsx(rt,{onClick:v,variant:x.confirmVariant,loading:d,disabled:f,className:"min-w-[100px]",children:s})]})]})})},A4=({isOpen:e,onClose:t,onSubmit:r,title:n,children:a,submitText:i="Save",cancelText:s="Cancel",loading:l=!1,error:c=null,size:u="md",showCancel:d=!0,submitDisabled:f=!1,submitVariant:p="primary",footerContent:m,preventCloseOnSubmit:x=!1})=>{const[y,v]=N.useState(null),b=c||y,w=async k=>{k.preventDefault(),v(null);try{const E=await r(k);!x&&E!==!1&&t()}catch(E){v(E.message||"An error occurred"),console.error("Form submission error:",E)}},S=()=>{v(null),t()},j=o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:"flex-1",children:m}),o.jsxs("div",{className:"flex items-center space-x-3",children:[d&&o.jsx(rt,{type:"button",onClick:S,variant:"secondary",disabled:l,children:s}),o.jsx(rt,{type:"submit",variant:p,loading:l,disabled:f||l,children:i})]})]});return o.jsx(bf,{isOpen:e,onClose:S,title:n,size:u,closeOnBackdrop:!l,closeOnEscape:!l,footer:null,children:o.jsxs("form",{onSubmit:w,className:"space-y-4",children:[b&&o.jsx("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:o.jsxs("div",{className:"flex items-start space-x-2",children:[o.jsx(Jr,{className:"h-5 w-5 text-red-400 flex-shrink-0 mt-0.5"}),o.jsx("div",{className:"flex-1",children:o.jsx("p",{className:"text-sm text-red-400",children:b})})]})}),o.jsx("div",{className:"space-y-4",children:a}),o.jsx("div",{className:"pt-4 border-t border-white/10 -mx-6 px-6 -mb-4",children:j})]})})};if(typeof document<"u"&&!document.getElementById("alert-modal-animations")){const e=document.createElement("style");e.id="alert-modal-animations",e.textContent=` 962 @keyframes progress { 963 from { 964 width: 100%; 965 } 966 to { 967 width: 0%; 968 } 969 } 970 971 .animate-progress { 972 animation: progress linear forwards; 973 } 974 `,document.head.appendChild(e)}const zC=(e=!1)=>{const[t,r]=N.useState(e),[n,a]=N.useState(null),i=N.useCallback((c=null)=>{a(c),r(!0)},[]),s=N.useCallback(()=>{r(!1),setTimeout(()=>a(null),300)},[]),l=N.useCallback(()=>{r(c=>!c)},[]);return{isOpen:t,data:n,open:i,close:s,toggle:l,modalProps:{isOpen:t,onClose:s}}},JY=(e=[])=>{const[t,r]=N.useState({}),[n,a]=N.useState({}),i={};return e.forEach(s=>{i[s]={isOpen:!!t[s],data:n[s]||null,open:(l=null)=>{r(c=>({...c,[s]:!0})),l&&a(c=>({...c,[s]:l}))},close:()=>{r(l=>({...l,[s]:!1})),setTimeout(()=>{a(l=>{const c={...l};return delete c[s],c})},300)},toggle:()=>{r(l=>({...l,[s]:!l[s]}))},modalProps:{isOpen:!!t[s],onClose:()=>{r(l=>({...l,[s]:!1})),setTimeout(()=>{a(l=>{const c={...l};return delete c[s],c})},300)}}}}),i},QY=({isOpen:e,onClose:t,onSave:r,reportType:n,headerRow:a,dataStartRow:i,columnMappings:s,existingPreset:l=null,hasChanges:c=!1})=>{const[u,d]=N.useState((l==null?void 0:l.preset_name)||""),[f,p]=N.useState(!1),[m,x]=N.useState(null),[y,v]=N.useState(c&&l?"update":"new"),b=async S=>{var k,E,T;S.preventDefault();const j=y==="update"&&l?l.preset_name:u.trim();if(!j){x("Please enter a preset name");return}p(!0),x(null);try{const O={preset_name:j,report_type:n,header_row:a,data_start_row:i,column_mappings:s};let A;y==="update"&&l?A=await Mi.updatePreset(l.id,O):A=await Mi.createPreset(O),A.success&&(r(A.preset,y),t())}catch(O){console.error("Error saving preset:",O),(T=(E=(k=O.response)==null?void 0:k.data)==null?void 0:E.error)!=null&&T.includes("already exists")?x("A preset with this name already exists. Please choose a different name."):x("Failed to save preset. Please try again.")}finally{p(!1)}},w=()=>{switch(n){case"rent-roll":return"Rent Roll";case"pl":return"Profit & Loss";
974case"leasing":return"Leasing";default:return n}};return o.jsx(A4,{isOpen:e,onClose:t,onSubmit:b,title:"Save Column Mapping Preset",submitText:f?"Saving...":"Save Preset",cancelText:"Skip",submitDisabled:f,size:"sm",children:o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"bg-primary/10 border border-primary/30 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx(Sn,{className:"h-5 w-5 text-primary mt-0.5"}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("p",{className:"text-sm text-gray-300",children:["Save this column mapping configuration as a preset to automatically apply it to similar ",w()," reports in the future."]}),o.jsx("p",{className:"text-xs text-gray-400 mt-2",children:"Presets remember your column selections and will auto-apply when matching headers are detected."})]})]})}),c&&l&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium text-gray-300",children:"Save Option"}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer",children:[o.jsx("input",{type:"radio",value:"update",checked:y==="update",onChange:S=>v(S.target.value),className:"text-primary focus:ring-primary"}),o.jsxs("div",{children:[o.jsx("span",{className:"text-sm text-white",children:"Update existing preset"}),o.jsxs("p",{className:"text-xs text-gray-400",children:['Update "',l.preset_name,'" with current mappings']})]})]}),o.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer",children:[o.jsx("input",{type:"radio",value:"new",checked:y==="new",onChange:S=>v(S.target.value),className:"text-primary focus:ring-primary"}),o.jsxs("div",{children:[o.jsx("span",{className:"text-sm text-white",children:"Save as new preset"}),o.jsx("p",{className:"text-xs text-gray-400",children:"Create a new preset with a different name"})]})]})]})]}),(!l||y==="new")&&o.jsx(Qt,{label:"Preset Name",name:"presetName",value:u,onChange:d,placeholder:"e.g., Standard Rent Roll Format",required:!0,error:m,autoFocus:!0,isEditing:!0}),y==="update"&&l&&o.jsx("div",{className:"bg-accent/10 border border-accent/30 rounded-lg p-3",children:o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Gh,{className:"h-4 w-4 text-accent"}),o.jsxs("span",{className:"text-sm text-gray-300",children:["Will update:"," ",o.jsx("span",{className:"font-medium text-white",children:l.preset_name})]})]})}),o.jsxs("div",{className:"text-xs text-gray-400",children:["Report Type: ",o.jsx("span",{className:"text-gray-300",children:w()})]})]})})},Lke=({headers:e,data:t,reportType:r,onConfigurationComplete:n,onError:a,onBack:i,propertyName:s,startDate:l,endDate:c,headerRow:u=0,dataStartRow:d=1,preset:f=null,onManagePresets:p})=>{const[m,x]=N.useState({}),[y,v]=N.useState([]),[b,w]=N.useState(!1),[S,j]=N.useState([]),[k,E]=N.useState(""),[T,O]=N.useState(!1),[A,P]=N.useState(null),[I,R]=N.useState(!1),[M,L]=N.useState({}),[U,W]=N.useState(!1),[V,G]=N.useState(null),[K,F]=N.useState(null);N.useEffect(()=>{t&&t.length>0&&v(t.slice(0,5))},[t]),N.useEffect(()=>{ne()},[r]);const ne=async()=>{if(r){O(!0),P(null);try{const oe=await Mi.getPresets(r);j(oe)}catch(oe){console.error("Error loading presets:",oe),P("Failed to load presets")}finally{O(!1)}}},H=async oe=>{if(!oe){E("");return}try{const Z=S.find(ce=>ce.id===parseInt(oe));if(Z){E(oe),G(Z);const ce=Z.column_mappings,q={};Object.entries(ce).forEach(([xe,pe])=>{pe!=null&&pe!==-1&&(q[xe]=pe)}),x(q),L(q),(Z.header_row!==u||Z.data_start_row!==d)&&P(`Note: This preset was saved with header row ${Z.header_row} and data start row ${Z.data_start_row}. Current selection has header row ${u} and data start row ${d}.`)}}catch(Z){console.error("Error applying preset:",Z),P("Failed to apply preset")}};N.useEffect(()=>{if(f&&f.column_mappings){const oe=f.column_mappings,Z={};Object.entries(oe).forEach(([ce,q])=>{q!=null&&q!==-1&&(Z[ce]=q)}),x(Z),L(Z),E(f.id),G(f)}else if(e&&e.length>0&&!f){const oe=w1(e,r);x(oe),L(oe)}},[e,f]),N.useEffect(()=>{const oe=JSON.stringify(m)!==JSON.stringify(M);W(oe)},[m,M]);
974const B=async oe=>{F(oe),U||!V&&Object.keys(m).length>0?R(!0):X(oe)},X=async oe=>{const Z=oe||K;if(Z)try{w(!0),await n(Z)}catch(ce){console.error("Processing error:",ce),a(ce.message||"Failed to process data"),w(!1)}},Y=()=>{switch(r){case"rent-roll":return[{field:"unitNumber",label:"Unit Number",type:or.STRING,required:!0},{field:"unitType",label:"Unit Type",type:or.STRING,required:!1},{field:"squareFeet",label:"Square Feet",type:or.STRING,required:!1},{field:"tenantName",label:"Tenant Name",type:or.STRING,required:!1},{field:"marketRent",label:"Market Rent",type:or.CURRENCY,required:!1},{field:"monthlyRent",label:"Actual Rent",type:or.CURRENCY,required:!0},{field:"deposit",label:"Deposit",type:or.CURRENCY,required:!0},{field:"otherDeposit",label:"Other Deposit",type:or.CURRENCY,required:!1},{field:"moveInDate",label:"Move In Date",type:or.DATE,required:!1},{field:"leaseStart",label:"Lease Start Date",type:or.DATE,required:!1},{field:"leaseEnd",label:"Lease End Date",type:or.DATE,required:!0},{field:"moveOutDate",label:"Move Out Date",type:or.DATE,required:!1},{field:"delinquency",label:"Delinquency",type:or.CURRENCY,required:!0}];default:return[]}},ae=(oe,Z)=>{x(ce=>({...ce,[oe]:Z===sn.NOT_AVAILABLE?sn.NOT_AVAILABLE:parseInt(Z,10)}))},fe=oe=>{const Z=m[oe];return Z===sn.NOT_AVAILABLE?sn.NOT_AVAILABLE:typeof Z=="number"?Z.toString():""},ue=oe=>{oe.preventDefault();const ce=Y().filter(Se=>Se.required).map(Se=>Se.field).filter(Se=>{const he=m[Se];return he===void 0||he===""||he===sn.NOT_AVAILABLE}),q=m.leaseStart!==void 0&&m.leaseStart!==sn.NOT_AVAILABLE,xe=m.moveInDate!==void 0&&m.moveInDate!==sn.NOT_AVAILABLE;if(!q&&!xe){a("Either Lease Start Date or Move In Date must be mapped");return}if(ce.length>0){const Se=ce.map(he=>Y().find(ie=>ie.field===he).label).join(", ");a(`Missing required fields: ${Se}`);return}const pe={mapping:m,propertyName:s,startDate:l,endDate:c,reportType:r,dataStartRow:t.length>0?t[0]:null};B(pe)};return o.jsxs(o.Fragment,{children:[o.jsx(QY,{isOpen:I,onClose:()=>{R(!1),X()},onSave:async(oe,Z)=>{await ne(),R(!1),Z==="update"&&(G(oe),L(m),W(!1)),X()},reportType:r,headerRow:u,dataStartRow:d,columnMappings:m,existingPreset:V,hasChanges:U}),o.jsx("div",{className:"space-y-6 bg-gray-900/50 backdrop-blur-xl rounded-xl border border-white/10 shadow-[0_0_30px_rgba(245,158,11,0.15)]",children:o.jsxs("div",{className:"p-8",children:[o.jsxs("div",{className:"mb-6",children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-200 mb-2",children:[o.jsx(e_,{className:"w-5 h-5 inline mr-2 text-accent-gold"}),"Column Mapping"]}),o.jsxs("p",{className:"text-sm text-gray-400",children:["Property: ",o.jsx("span",{className:"font-medium text-gray-200",children:s})]})]}),o.jsxs("form",{onSubmit:ue,className:"mt-6 space-y-6",children:[o.jsxs("div",{className:"bg-gray-800/30 border border-white/20 rounded-xl p-6 hover:border-white/30 transition-all duration-200",children:[o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-200",children:[o.jsx(Cx,{className:"w-4 h-4 inline mr-2 text-accent-gold"}),"Load Saved Preset (Optional)"]}),p&&o.jsx("button",{type:"button",onClick:p,className:"text-sm text-accent-gold hover:text-accent-gold/80 transition-colors",children:"Manage Presets"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs("select",{value:k,onChange:oe=>H(oe.target.value),className:"block w-full rounded-lg bg-gray-800/50 border border-white/20 py-3 pl-4 pr-10 text-gray-200 focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200",disabled:T,children:[o.jsx("option",{value:"",children:"Select a preset..."}),S.map(oe=>o.jsx("option",{value:oe.id,children:oe.preset_name},oe.id))]}),o.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-3 text-gray-400",children:o.jsx(kr,{className:"h-4 w-4"})})]}),A&&o.jsx("p",{className:"mt-2 text-sm text-red-400",children:A})]})}),k&&o.jsx("p",{className:"mt-3 text-xs text-gray-400",children:"Preset loaded. You can still modify the mappings below if needed."})]}),o.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:Y().map(({field:oe,label:Z,type:ce,required:q},xe)=>{var pe;return o.jsxs("div",{className:"bg-gray-800/20 p-4 rounded-lg border border-white/10",children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-200 mb-2",children:[Z,q&&o.jsx("span",{className:"text-red-400 ml-1",children:"*"})]}),o.jsxs("select",{value:fe(oe),onChange:Se=>
974ae(oe,Se.target.value),className:"block w-full rounded-lg bg-gray-800/50 border border-white/20 py-2 px-3 text-gray-200 focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200",children:[o.jsx("option",{value:"",children:"Select column"}),o.jsx("option",{value:sn.NOT_AVAILABLE,children:"Not Available"}),Array.from({length:((pe=t==null?void 0:t[0])==null?void 0:pe.length)||0}).map((Se,he)=>o.jsx("option",{value:he,children:e!=null&&e[he]?`${e[he]} (Col ${he+1})`:`Column ${he+1}`},`col-${he}`))]}),o.jsxs("div",{className:"mt-2 flex items-center space-x-2",children:[o.jsxs("p",{className:"text-xs text-gray-500",children:["Type: ",ce]}),oe==="leaseStart"&&o.jsx("p",{className:"text-xs text-amber-500",children:"Either Lease Start or Move In Date required"})]})]},`field-${oe}-${xe}`)})}),y.length>0&&o.jsx("div",{className:"mt-6",children:o.jsx(Rke,{data:y,mapping:m,requiredFields:Y(),headers:e})}),b&&o.jsx("div",{className:"flex items-center justify-center p-6",children:o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-accent-gold"}),o.jsx("span",{className:"text-sm text-gray-300",children:"Processing..."})]})}),!b&&o.jsxs("div",{className:"flex justify-between pt-6 mt-6 border-t border-white/10",children:[o.jsx("button",{type:"button",onClick:i,disabled:b,className:"px-6 py-3 bg-gray-800/50 text-gray-200 rounded-lg border border-white/20 hover:bg-gray-800/70 hover:border-white/30 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:"Back"}),o.jsx("button",{type:"submit",disabled:b,className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:"Complete Mapping"})]})]})]})})]})},dn={CATEGORY:"CATEGORY",GL_CODE:"GL_CODE",MONTHLY_DATA:"MONTHLY_DATA",YTD:"YTD",BUDGET:"BUDGET",VARIANCE:"VARIANCE",TOTAL:"TOTAL"},$ke=({headers:e=[],data:t=[],onMappingComplete:r,onError:n,onBack:a,preset:i=null,headerRow:s=0,dataStartRow:l=1,propertyName:c="",reportType:u="pl",onManagePresets:d})=>{const f=N.useMemo(()=>e.map((ie,we)=>ie.trim()===""?`Column ${we+1}`:ie),[e]),p=N.useMemo(()=>{const ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return f.filter(we=>ie.some(ke=>we.includes(ke)))},[f]),m=N.useMemo(()=>{const ie=[/^total$/i,/^grand\s*total$/i,/^ytd$/i,/^year\s*to\s*date$/i,/^budget$/i,/^variance$/i,/^var$/i,/^diff(erence)?$/i,/^net\s*(income|loss|operating)?$/i,/^subtotal$/i,/^sum$/i];return f.filter(we=>ie.some(ke=>ke.test(we.trim())))},[f]),[x,y]=N.useState(null),[v,b]=N.useState(null),[w,S]=N.useState({}),[j,k]=N.useState([]),[E,T]=N.useState(0),[O,A]=N.useState([]),[P,I]=N.useState([]),[R,M]=N.useState(""),[L,U]=N.useState(null),[W,V]=N.useState(!1),[G,K]=N.useState(null),[F,ne]=N.useState(!1),[H,B]=N.useState(!1),[X,Y]=N.useState(null),[ae,fe]=N.useState({}),[ue,oe]=N.useState(!1);N.useEffect(()=>{Z()},[u]),N.useEffect(()=>{if(i&&P.length>0){const ie=P.find(we=>we.id===i.id);ie&&ce(ie.id.toString())}},[i,P]);const Z=async()=>{if(u){V(!0),K(null);try{const ie=await Mi.getPresets(u);I(ie)}catch(ie){console.error("Error loading presets:",ie),K("Failed to load presets")}finally{V(!1)}}},ce=async ie=>{if(!ie){M(""),U(null),y(null),b(null),k([]),S({}),fe({});return}try{const we=P.find(ke=>ke.id===parseInt(ie));if(we){if(M(ie),U(we),we.column_mappings){const ke=typeof we.column_mappings=="string"?JSON.parse(we.column_mappings):we.column_mappings;ke.category!==void 0&&f[ke.category]&&y(f[ke.category]),ke.glCode!==void 0&&f[ke.glCode]&&b(f[ke.glCode]);const Oe=[],Ue={};Object.entries(ke).forEach(([Je,Ze])=>{if(Je.startsWith("month_")&&f[Ze]){const te=f[Ze];Oe.push(te),Ue[te]=dn.MONTHLY_DATA}}),k(Oe),S(Ue),fe({categoryColumn:f[ke.category],glCodeColumn:f[ke.glCode],monthlyColumns:Oe,columnMappings:Ue})}(we.header_row!==s||we.data_start_row!==l)&&K(`Note: This preset was saved with header row ${we.header_row} and data start row ${we.data_start_row}. Current selection has header row ${s} and data start row ${l}.`)}}catch(we){console.error("Error applying preset:",we),K("Failed to apply preset")}};N.useEffect(()=>{if(p.length>0){const ie={...w};p.forEach(we=>{w[we]||(ie[we]=dn.MONTHLY_DATA)}),m.forEach(we=>{if(!w[we]){const ke=we.toLowerCase().trim();/^total$|^grand\s*total$|^sum$|^subtotal$/i.test(ke)?ie[we]=dn.TOTAL:/^budget$/i.test(ke)?ie[we]=dn.BUDGET:/^variance$|^var$|^diff(erence)?$/i.test(ke)&&(ie[we]=dn.VARIANCE)}}),S(ie),k(p),!L&&Object.keys(ae).length===0&&fe({categoryColumn:null,glCodeColumn:null,monthlyColumns:p,columnMappings:ie})}},[p]),N.useEffect(()=>{if(Object.keys(ae).length===0)return;const we=JSON.stringify({categoryColumn:x,glCodeColumn:v,monthlyColumns:j,columnMappings:w})!==JSON.stringify(ae);oe(we)},[x,v,j,w,ae]);const q=[{value:"",label:"Not Mapped"},{value:dn.CATEGORY,label:"Category/Description"},{value:dn.GL_CODE,label:"GL/Account Code"},{value:dn.MONTHLY_DATA,label:"Monthly Data"},{value:dn.TOTAL,label:"Total"},{value:dn.BUDGET,label:"Budget"},{value:dn.VARIANCE,label:"Variance"}];N.useEffect(()=>{if(t.length===0)return;const ie=t.slice(E,E+5).map((we,ke)=>{const Ue=(Array.isArray(we)?we:Object.values(we)).reduce((Je,Ze,te)=>(Je[f[te]||`Column ${te+1}`]=Ze,Je),{});return{rowIndex:l+E+ke,data:Ue,rowNumber:l+E+ke}});A(ie)},[t,f,E,l]);const xe=(ie,we)=>{S(ke=>{const Oe={...ke};return we!==dn.MONTHLY_DATA&&Object.keys(Oe).forEach(Ue=>{Oe[Ue]===we&&delete Oe[Ue]}),we?(we===dn.MONTHLY_DATA&&m.includes(ie)&&n(`Warning: "${ie}" appears to be a summary column (like Total or YTD), not monthly data. Consider mapping it as "Total" instead to avoid data issues.`),Oe[ie]=we,we===dn.MONTHLY_DATA?k(Ue=>Ue.includes(ie)?Ue:[...Ue,ie]):k(Ue=>Ue.filter(Je=>Je!==ie))):(delete Oe[ie],k(Ue=>Ue.filter(Je=>Je!==ie))),Oe})},pe=async ie=>{if(ie.preventDefault(),!x){n("Please select a category/description column");return}if(j.length===0){n("Please select at least one monthly data column");return}const we={...w,[x]:dn.CATEGORY,...v&&{[v]:dn.GL_CODE}},ke=t.slice(E).map(Ue=>{var te;const Ze=(Array.isArray(Ue)?Ue:Object.values(Ue)).reduce((ve,J,me)=>(ve[f[me]||`Column ${me+1}`]=J,ve),{});return{category:Ze[x],glCode:v?Ze[v]:null,monthlyData:j.reduce((ve,J)=>(ve[J]=Ze[J],ve),{}),total:(te=Object.entries(w).find(([ve,J])=>J===dn.TOTAL))!=null&&te[0]?Ze[Object.keys(w).find(ve=>w[ve]===dn.TOTAL)]:null}});Y({categoryColumn:x,glCodeColumn:v,columnMappings:we,monthlyColumns:j,dataStartRow:E,processedData:ke,previewData:O}),ne(!0)},Se=async()=>
974{if(X){B(!0);try{await r(X)}catch(ie){console.error("Processing error:",ie),n(ie.message||"Failed to process data")}finally{B(!1)}}},he=()=>{const ie={};return f.forEach((we,ke)=>{x===we&&(ie.category=ke),v===we&&(ie.glCode=ke),j!=null&&j.includes(we)&&(ie[`month_${we}`]=ke)}),ie};return o.jsxs(o.Fragment,{children:[o.jsx(QY,{isOpen:F,onClose:()=>{ne(!1),Se()},onSave:async(ie,we)=>{await Z(),ne(!1),we==="update"&&(U(ie),fe({categoryColumn:x,glCodeColumn:v,monthlyColumns:j,columnMappings:w}),oe(!1)),Se()},reportType:u,headerRow:s,dataStartRow:l,columnMappings:he(),existingPreset:L,hasChanges:ue}),o.jsxs("div",{className:"space-y-6 bg-gray-900/50 backdrop-blur-xl rounded-xl border border-white/10 shadow-[0_0_30px_rgba(245,158,11,0.15)] p-8",children:[o.jsxs("div",{className:"mb-6",children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-200 mb-2",children:[o.jsx(bl,{className:"w-5 h-5 inline mr-2 text-accent-gold"}),"P&L Column Mapping"]}),o.jsx("p",{className:"text-sm text-gray-400",children:"Map your columns to the appropriate P&L categories"})]}),o.jsxs("form",{onSubmit:pe,className:"space-y-6",children:[o.jsxs("div",{className:"bg-gray-800/30 border border-white/20 rounded-xl p-6 hover:border-white/30 transition-all duration-200",children:[o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-200",children:[o.jsx(Cx,{className:"w-4 h-4 inline mr-2 text-accent-gold"}),"Load Saved Preset (Optional)"]}),d&&o.jsx("button",{type:"button",onClick:d,className:"text-sm text-accent-gold hover:text-accent-gold/80 transition-colors",children:"Manage Presets"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs("select",{value:R,onChange:ie=>ce(ie.target.value),className:"block w-full rounded-lg bg-gray-800/50 border border-white/20 py-3 pl-4 pr-10 text-gray-200 focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200",disabled:W,children:[o.jsx("option",{value:"",children:"Select a preset..."}),P.map(ie=>o.jsx("option",{value:ie.id,children:ie.preset_name},ie.id))]}),o.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-3 text-gray-400",children:o.jsx(kr,{className:"h-4 w-4"})})]}),G&&o.jsx("p",{className:"mt-2 text-sm text-red-400",children:G})]})}),R&&o.jsx("p",{className:"mt-3 text-xs text-gray-400",children:"Note: P&L presets store row configurations. Column mappings must be configured based on your current file structure."})]}),o.jsxs("div",{className:"bg-gray-800/30 border border-white/20 rounded-xl p-6",children:[o.jsxs("h3",{className:"text-sm font-medium text-gray-200 mb-4",children:[o.jsx(e_,{className:"w-4 h-4 inline mr-2 text-accent-gold"}),"Column Mapping"]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-200 mb-2",children:"Category/Description Column"}),o.jsxs("select",{value:x||"",onChange:ie=>{const we=ie.target.value||null;y(we),we&&(k(ke=>ke.filter(Oe=>Oe!==we)),S(ke=>{const Oe={...ke};return delete Oe[we],Oe}))},className:"block w-full rounded-lg bg-gray-800/50 border border-white/20 py-3 px-4 text-gray-200 focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200",children:[o.jsx("option",{value:"",children:"Select Category Column"}),f.map((ie,we)=>o.jsx("option",{value:ie,children:ie},`category-${we}`))]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-200 mb-2",children:"GL/Account Code Column"}),o.jsxs("select",{value:v||"",onChange:ie=>{const we=ie.target.value||null;b(we),we&&(k(ke=>ke.filter(Oe=>Oe!==we)),S(ke=>{const Oe={...ke};return delete Oe[we],Oe}))},className:"block w-full rounded-lg bg-gray-800/50 border border-white/20 py-3 px-4 text-gray-200 focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200",children:[o.jsx("option",{value:"",children:"Select GL Code Column"}),f.map((ie,we)=>o.jsx("option",{value:ie,children:ie},`glcode-${we}`))]})]}),o.jsx("div",{className:"grid grid-cols-1 gap-3",children:f.filter(ie=>ie!==x&&ie!==v).map((ie,we)=>o.jsxs("div",{className:"flex items-center space-x-3 bg-gray-800/20 p-3 rounded-lg border border-white/10",children:[o.jsx("span",{className:"text-sm text-gray-400 min-w-[150px] truncate",children:ie}),o.jsx("select",{value:w[ie]||"",onChange:ke=>xe(ie,ke.target.value),className:"block w-full rounded-lg bg-gray-800/50 border border-white/20 py-2 px-3 text-gray-200 text-sm focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200",children:q.map(({value:ke,label:Oe})=>o.jsx("option",{value:ke,children:Oe},`option-${ke}`))})]},`mapping-${we}`))})]})]}),O.length>0&&o.jsxs("div",{className:"mt-6 bg-gray-800/30 border border-white/20 rounded-xl p-6",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-200 mb-3",children:"Data Preview"}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"min-w-full divide-y divide-white/10",children:[o.jsx("thead",{className:"bg-gray-800/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-400",children:"Row"}),o.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-400",children:"GL Code"}),o.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-400",children:"Category"}),j.map(ie=>o.jsx("th",{className:"px-3 py-3 text-left text-xs font-medium text-gray-400",children:ie},`header-${ie}
974`)),Object.entries(w).filter(([ie,we])=>we===dn.TOTAL||we===dn.BUDGET||we===dn.VARIANCE).map(([ie])=>o.jsx("th",{className:"px-3 py-3 text-left text-xs font-medium text-gray-400",children:ie},`header-${ie}`))]})}),o.jsx("tbody",{className:"divide-y divide-white/10",children:O.map(ie=>o.jsxs("tr",{className:"hover:bg-gray-800/30 transition-colors",children:[o.jsx("td",{className:"px-3 py-2 text-xs text-gray-400",children:ie.rowIndex}),o.jsx("td",{className:"px-3 py-2 text-xs whitespace-nowrap text-gray-200",children:v?ie.data[v]||"-":"N/A"}),o.jsx("td",{className:"px-3 py-2 text-xs whitespace-nowrap text-gray-200",children:x?ie.data[x]||"-":"N/A"}),j.map(we=>o.jsx("td",{className:"px-3 py-2 text-xs whitespace-nowrap text-gray-200",children:ie.data[we]||"-"},`cell-${we}`)),Object.entries(w).filter(([we,ke])=>ke===dn.TOTAL||ke===dn.BUDGET||ke===dn.VARIANCE).map(([we])=>o.jsx("td",{className:"px-3 py-2 text-xs whitespace-nowrap text-gray-200",children:ie.data[we]||"-"},`cell-${we}`))]},`row-${ie.rowIndex}`))})]})})]}),H&&o.jsx("div",{className:"flex items-center justify-center p-4",children:o.jsxs("div",{className:"flex items-center space-x-2 text-blue-600",children:[o.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),o.jsx("span",{className:"text-sm",children:"Processing..."})]})}),!H&&o.jsxs("div",{className:"flex justify-between pt-5",children:[o.jsx("button",{type:"button",onClick:a,disabled:H,className:"rounded-md border border-gray-300 bg-white py-2 px-4 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed",children:"Back"}),o.jsx("button",{type:"submit",disabled:H,className:"ml-3 inline-flex justify-center rounded-md border border-transparent bg-blue-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed",children:"Continue"})]})]})]})]})};class Bke{async processRentRoll(t){var r,n,a,i,s,l,c;try{const u={propertyName:t.propertyName,startDate:t.startDate,endDate:t.endD
974ate,report_type:"rent-roll",data:t.data.map(f=>{var p,m,x,y,v,b;return{unit_number:((m=(p=f.unit_number)==null?void 0:p.toString())==null?void 0:m.trim())||null,unit_type:((y=(x=f.unit_type)==null?void 0:x.toString())==null?void 0:y.trim())||null,square_feet:this.parseNumber(f.square_feet),tenant_name:((b=(v=f.tenant_name)==null?void 0:v.toString())==null?void 0:b.trim())||null,monthly_rent:this.parseNumber(f.monthly_rent),lease_start:f.lease_start||null,lease_end:f.lease_end||null,move_in_date:f.move_in_date||null,move_out_date:f.move_out_date||null,deposit:this.parseNumber(f.deposit),other_deposit:this.parseNumber(f.other_deposit),delinquency:this.parseNumber(f.delinquency)||0,market_rent:this.parseNumber(f.market_rent)}})},d=await Xe.post("/rent-roll/process",u);if(!d.data.success)throw new Error(((r=d.data.error)==null?void 0:r.message)||"Failed to process rent roll");return{success:!0,reportId:d.data.reportId,metadata:{totalUnits:((n=d.data.metadata)==null?void 0:n.totalUnits)||t.data.length,occupiedUnits:((a=d.data.metadata)==null?void 0:a.occupiedUnits)||t.data.length,futureLeases:((i=d.data.metadata)==null?void 0:i.futureLeases)||0,noticeUnits:((s=d.data.metadata)==null?void 0:s.noticeUnits)||0,averageRent:((l=d.data.metadata)==null?void 0:l.averageRent)||0,processedAt:new Date(((c=d.data.metadata)==null?void 0:c.processedDate)||new Date)}}}catch(u){return console.error("Rent roll upload error:",u),u instanceof Gt?u.code===Bt.VALIDATION_ERROR||u.message.includes("422")||u.message.includes("400")?{success:!1,error:{message:u.userMessage||"Validation failed",details:u.message}}:{success:!1,error:{message:u.userMessage||"Failed to process rent roll",details:u.message}}:{success:!1,error:{message:"Failed to process rent roll",details:u instanceof Error?u.message:"Unknown error"}}}}parseNumber(t){if(t==null||t==="")return null;const r=parseFloat(t.toString().replace(/[^0-9.-]/g,""));return isNaN(r)?null:r}async getRentRollReport(t){try{return(await Xe.get(`/rent-roll/${t}`)).data}catch(r){throw r instanceof Gt?new Error(r.userMessage||"Failed to retrieve rent roll report"):new Error("Failed to retrieve rent roll report")}}}const ZY=new Bke,b_=(e,t=500)=>{const[r,n]=N.useState(e);return N.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(a)}},[e,t]),r},eX=(e,t)=>{const[r,n]=N.useState(()=>{if(typeof window>"u")return t;try{const s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.error(`Error loading localStorage key "${e}":`,s),t}}),a=N.useCallback(s=>{try{n(l=>{const c=s instanceof Function?s(l):s;return typeof window<"u"&&(window.localStorage.setItem(e,JSON.stringify(c)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(c),url:window.location.href,storageArea:window.localStorage}))),c})}catch(l){console.error(`Error setting localStorage key "${e}":`,l)}},[e]),i=N.useCallback(()=>{try{n(t),typeof window<"u"&&(window.localStorage.removeItem(e),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null,url:window.location.href,storageArea:window.localStorage})))}catch(s){console.error(`Error removing localStorage key "${e}":`,s)}},[e,t]);return N.useEffect(()=>{if(typeof window>"u")return;const s=l=>{if(l.key===e&&l.newValue!==null)try{n(JSON.parse(l.newValue))}catch(c){console.error(`Error parsing storage event for key "${e}":`,c)}else l.key===e&&l.newValue===null&&n(t)};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[e,t]),[r,a,i]},tX=(e=[],t=null)=>{const[r,n]=N.useState(t||{key:null,direction:"asc"}),a={string:(y,v,b)=>{const w=String(y||"").toLowerCase(),S=String(v||"").toLowerCase();return b==="asc"?w.localeCompare(S):S.localeCompare(w)},number:(y,v,b)=>{const w=Number(y)||0,S=Number(v)||0;return b==="asc"?w-S:S-w},date:(y,v,b)=>{const w=new Date(y).getTime(),S=new Date(v).getTime();return b==="asc"?w-S:S-w},boolean:(y,v,b)=>b==="asc"?y===v?0:y?1:-1:y===v?0:y?-1:1},i=N.useCallback((y,v)=>{const b=v.split(".");let w=y;for(const S of b)w=w==null?void 0:w[S];return w},[]),s=N.useCallback(y=>y==null?"string":typeof y=="boolean"?"boolean":typeof y=="number"?"number":y instanceof Date||!isNaN(Date.parse(y))?"date":isNaN(Number(y))?"string":"number",[]),l=N.useMemo(()=>!e||e.length===0?[]:r.key?Array.isArray(r)?[...e].sort((y,v)=>{for(const b of r){const w=i(y,b.key),S=i(v,b.key);if(w===S)continue;const j=s(w),E=(a[j]||a.string)(w,S,b.direction);if(E!==0)return E}return 0}):[...e].sort((y,v)=>{const b=i(y,r.key),w=i(v,r.key);if(b==null)return 1;if(w==null)return-1;const S=s(b);return(a[S]||a.string)(b,w,r.direction)}):[...e],[e,r,i,s,a]),c=N.useCallback((y,v="asc")=>{n({key:y,direction:v})},[]),u=N.useCallback(y=>{n(v=>Array.isArray(v)?{key:y,direction:"asc"}:{key:y,direction:v.key===y?v.direction:"asc"})},[]),d=N.useCallback(y=>{n(v=>Array.isArray(v)?v.find(w=>w.key===y)?v.map(w=>w.key===y?{...w,direction:w.direction==="asc"?"desc":"asc"}:w):[...v,{key:y,direction:"asc"}]:v.key===y?{key:y,direction:v.direction==="asc"?"desc":"asc"}:{key:y,direction:"asc"})},[]),f=N.useCallback(()=>{n({key:null,direction:"asc"})},[]),p=N.useCallback((y,v="asc")=>{n(b=>Array.isArray(b)?b.find(S=>S.key===y)?b.map(S=>S.key===y?{key:y,direction:v}:S):[...b,{key:y,direction:v}]:[b,{key:y,direction:v}].filter(w=>w.key))},[]),m=N.useCallback(y=>{n(v=>Array.isArray(v)?v.filter(b=>b.key!==y):v.key===y?{key:null,direction:"asc"}:v)},[]),x=N.useCallback(y=>{if(Array.isArray(r)){const v=r.find(b=>b.key===y);return v?{isSorted:!0,direction:v.direction,order:r.indexOf(v)+1}:{isSorted:!1}}return r.key===y?{isSorted:!0,direction:r.direction}:{isSorted:!1}},[r]);return{sortedData:l,originalData:e,sortConfig:r,isMultiSort:Array.isArray(r),isSorted:Array.isArray(r)?r.length>
9740:r.key!==null,setSort:c,setSortKey:u,toggleSort:d,clearSort:f,addSortColumn:p,removeSortColumn:m,getSortInfo:x}},Uke=(e=[],t=25)=>{const[r,n]=N.useState(1),[a,i]=N.useState(""),s=b_(a,300),l=N.useMemo(()=>s?e.filter(x=>Object.values(x).some(y=>String(y).toLowerCase().includes(s.toLowerCase()))):e,[e,s]),c=N.useMemo(()=>{const x=(r-1)*t;return l.slice(x,x+t)},[l,r,t]),u=Math.ceil(l.length/t),d=N.useCallback(x=>{i(x),n(1)},[]),f=N.useCallback(()=>{n(x=>Math.min(u,x+1))},[u]),p=N.useCallback(()=>{n(x=>Math.max(1,x-1))},[]),m=N.useCallback(()=>{n(1),i("")},[]);return{paginatedData:c,filteredData:l,originalData:e,currentPage:r,totalPages:u,totalItems:l.length,originalTotalItems:e.length,startIndex:l.length>0?(r-1)*t+1:0,endIndex:Math.min(r*t,l.length),searchTerm:a,setCurrentPage:n,setSearchTerm:d,nextPage:f,prevPage:p,reset:m,hasNextPage:r<u,hasPrevPage:r>1,isFiltered:a.length>0}},$u=(e=[],t=3,r={})=>{const{sortKey:n=null,sortDirection:a="desc"}=r,[i,s]=N.useState(!1),l=N.useMemo(()=>!e||e.length===0?[]:n?[...e].sort((v,b)=>{const w=v[n],S=b[n];if(w instanceof Date||!isNaN(Date.parse(w))){const E=new Date(w).getTime(),T=new Date(S).getTime();return a==="desc"?T-E:E-T}if(typeof w=="number"&&typeof S=="number")return a==="desc"?S-w:w-S;const j=String(w||"").toLowerCase(),k=String(S||"").toLowerCase();return a==="desc"?k.localeCompare(j):j.localeCompare(k)}):e,[e,n,a]),c=N.useMemo(()=>i?l:l.slice(0,t),[l,i,t]),u=l.length>t,d=Math.max(0,l.length-t),f=l.length,p=N.useCallback(()=>{s(v=>!v)},[]),m=N.useCallback(()=>{s(!0)},[]),x=N.useCallback(()=>{s(!1)},[]),y=N.useCallback(()=>{s(!1)},[]);return{displayedItems:c,allItems:l,showAll:i,hasMore:u,remainingCount:d,totalCount:f,displayedCount:c.length,initialCount:t,toggleShowAll:p,expandAll:m,collapseAll:x,reset:y}},C4={PENDING:"pending",RUNNING:"running",DONE:"done",FAILED:"failed"},zke=e=>(e==null?void 0:e.message)??String(e),D$=()=>({}),rX=({items:e=[],runItem:t,describeError:r=zke,initialResult:n=D$,toResult:a=D$,statuses:i=C4})=>{const[s,l]=N.useState(()=>e.map(j=>({...n(j),id:j.id,status:i.PENDING,error:null}))),[c,u]=N.useState(!1),[d,f]=N.useState(!1),p=N.useRef(s),m=N.useRef(!1),x=N.useMemo(()=>new Map(e.map(j=>[j.id,j])),[e]),y=N.useCallback((j,k)=>{const E=p.current.map(T=>T.id===j?{...T,...k}:T);p.current=E,l(E)},[]),v=N.useCallback(async()=>{if(m.current)return;const j=p.current.filter(k=>k.status===i.PENDING).map(k=>k.id);m.current=!0,u(!0);try{for(const k of j){const E=x.get(k);if(E){y(k,{status:i.RUNNING,error:null});try{const T=await t(E);y(k,{...a(T),status:i.DONE,error:null})}catch(T){y(k,{status:i.FAILED,error:r(T)})}}}}finally{m.current=!1,u(!1),f(!0)}},[r,x,y,t,i,a]),b=N.useCallback(()=>{v()},[v]),w=N.useCallback(()=>{if(m.current)return;const j=p.current.map(k=>k.status===i.FAILED?{...k,status:i.PENDING,error:null}:k);p.current=j,l(j),v()},[v,i]),S=N.useMemo(()=>{let j=0,k=0,E=0;for(const T of s)T.status===i.DONE?j+=1:T.status===i.FAILED?k+=1:E+=1;return{total:s.length,succeeded:j,failed:k,remaining:E}},[s,i]);return{results:s,isRunning:c,isFinished:d&&!c,summary:S,start:b,retryFailed:w}},Hke=({itemCount:e,onSelect:t=null,loop:r=!0,enabled:n=!0})=>{const[a,i]=N.useState(-1);N.useEffect(()=>{a>=e&&i(e>0?e-1:-1)},[e,a]);const s=N.useCallback(c=>{if(!n||e===0)return;const{key:u}=c;switch(u){case"ArrowDown":c.preventDefault(),i(d=>d===-1?0:d>=e-1?r?0:d:d+1);break;case"ArrowUp":c.preventDefault(),i(d=>d===-1?e-1:d<=0?r?e-1:d:d-1);break;case"Enter":case" ":c.preventDefault(),a>=0&&a<e&&t&&t(a);break;case"Home":c.preventDefault(),i(0);break;case"End":c.preventDefault(),i(e-1);break;case"Escape":c.preventDefault(),i(-1);break}},[n,e,r,a,t]),l=N.useCallback(()=>{i(-1)},[]);return{focusedIndex:a,setFocusedIndex:i,handleKeyDown:s,resetFocus:l}};function Qx(){const[e,t]=N.useState(null),[r,n]=N.useState(!1),a=N.useCallback((l,c="Something went wrong. Please try again.",u={})=>{const d=N4(l,c);return t(d),ft.error(d.userMessage||c),UY(d,u),d},[]),i=N.useCallback(()=>{t(null),n(!1)},[]),s=N.useCallback(async l=>{if(!(!(e!=null&&e.retryable)||r)){n(!0),i();try{await l()}catch(c){a(c,e.userMessage)}finally{n(!1)}}},[e,r,i,a]);return{error:e,isRetrying:r,handleError:a,clearError:i,retry:s}}const nX=e=>{const[t,r]=N.useState({start:null,end:null}),[n,a]=N.useState(null),[i,s]=N.useState(null),[l,c]=N.useState(!1),{handleError:u}=Qx(),d=N.useCallback(async(p=null)=>{var x,y,v,b,w,S,j,k,E;const m=p||t;if(!(!e||!m.start||!m.end)){c(!0);try{const T=await Xe.post("/analysis/raw-data",{propertyId:e.id,startDate:m.start,endDate:m.end});if((x=T.data)!=null&&x.success){const O={property:((y=T.data.rawData)==null?void 0:y.property)||((v=T.data.metadata)==null?void 0:v.property)||e,financialData:((b=T.data.rawData)==null?void 0:b.financialData)||null,profitLoss:((w=T.data.rawData)==null?void 0:w.profitLoss)||[],rentRoll:((S=T.data.rawData)==null?void 0:S.rentRoll)||[],leasing:((j=T.data.rawData)==null?void 0:j.leasing)||[],historicalData:((k=T.data.rawData)==null?void 0:k.historicalData)||{},timeframe:m,metadata:{propertyId:e.id}};a(O),s(null)}else throw new Error(((E=T.data)==null?void 0:E.error)||"Failed to fetch property data")}catch(T){u(T,"Unable to fetch property data. Please try again."),a(null),s(null)}finally{c(!1)}}},[e,t,u]),f=N.useCallback(()=>{a(null),s(null)},[]);return{dateRange:t,setDateRange:r,rawData:n,setRawData:a,analysisResult:i,setAnalysisResult:s,fetchPropertyData:d,clearData:f,isLoading:l}};class qke{async getPropertyNames(){return(await Xe.get("/properties/names")).data}async createProperty(t){return(await Xe.post("/properties",t)).data}async checkReportOverlap(t,r,n,a,i){return(await Xe.post("/properties/check-overlap",{propertyName:t,reportType:r,startDate:n,endDate:a,...Array.isArray(i)&&i.length>0?{months:i}:{}})).data}async getProperty(t){return(await Xe.get(`/properties/${t}`)).data}async updateProperty(t,r){return(await Xe.put(`/properties/${t}`,r)).data}async getLoanPosition(t,r){return(await Xe.get(`/properties/${t}/loan-position`,{params:r?{asOfDate:r}:void 0})).data}async getAmortizationSchedule(t){return(await Xe.get(`/properties/${t}/amortization-schedule`)).data}async getLoanSummary(){return(await Xe.get("/properties/loan-summary")).data}async listValuations(t){return(await Xe.get(`/properties/${t}/valuations`)).data.valuations}async addValuation(t,r){return(await Xe.post(`/properties/${t}/valuations`,r)).data.valuation}async deleteValuation(t,r){return(await Xe.delete(`/properties/${t}/valuations/${r}`)).data}async deleteProperty(t){return(await Xe.delete(`/properties/${t}`)).data}async getPropertyReports(t){return(await Xe.get(`/properties/${t}/reports`)).data}async getReportDetails(t,r){return(await Xe.get(`/properties/${t}/reports/${r}`)).data}async deleteReport(t,r){return(await Xe.delete(`/properties/${t}/reports/${r}`)).data}}
974const na=new qke,Fg=({title:e,icon:t,defaultExpanded:r=!0,count:n,requiredCount:a,requiredTotal:i,optionalCount:s,optionalTotal:l,children:c,className:u="",variant:d="default"})=>{const[f,p]=N.useState(r),m=i!==void 0||l!==void 0,x=i!==void 0&&a===i,y=()=>{p(!f)},v=f?kr:yl,b=d==="compact";return d==="minimal"?o.jsxs("div",{className:`overflow-hidden ${u}`,children:[o.jsxs("button",{onClick:y,"aria-expanded":f,className:"w-full flex items-center gap-2 px-4 py-3 hover:bg-white/5 transition-colors",type:"button",children:[o.jsx(v,{className:"w-4 h-4 text-gray-500"}),t&&o.jsx(t,{className:"w-4 h-4 text-accent-light"}),o.jsx("span",{className:"text-sm font-medium text-gray-300",children:e}),n!=null&&o.jsx("span",{className:"text-xs text-gray-500 bg-white/10 px-1.5 py-0.5 rounded",children:n})]}),o.jsx("div",{className:`transition-all duration-200 ease-out overflow-hidden ${f?"max-h-[5000px] opacity-100":"max-h-0 opacity-0"}`,children:o.jsx("div",{className:"px-4 py-2",children:c})})]}):o.jsxs("div",{className:`overflow-hidden ${u}`,children:[o.jsx("button",{onClick:y,"aria-expanded":f,className:`w-full flex items-center justify-between transition-all duration-200 group ${b?"px-4 py-2.5 hover:bg-card/30":"px-6 py-4 bg-gradient-to-r from-card/30 to-card/10 hover:from-card/40 hover:to-card/20 border-b border-white/5"}`,type:"button",children:o.jsxs("div",{className:`flex items-center ${b?"gap-2":"gap-3"}`,children:[o.jsx(v,{className:`text-accent-light transition-transform duration-200 ${b?"w-4 h-4":"w-5 h-5"}`}),t&&!b&&o.jsx("div",{className:"p-2 bg-gradient-to-br from-accent/20 to-accent/10 rounded-lg",children:o.jsx(t,{className:"w-4 h-4 text-accent-light"})}),o.jsx("h4",{className:`font-semibold bg-gradient-to-r from-white to-gray-300 bg-clip-text text-transparent group-hover:from-accent-light group-hover:to-accent transition-all duration-200 ${b?"text-sm":"text-lg font-mono uppercase tracking-wider"}`,children:e}),n!=null&&o.jsx("span",{className:`inline-flex items-center rounded-full font-medium bg-accent/20 text-accent-light ${b?"px-2 py-0.5 text-xs":"px-2.5 py-1 text-xs"}`,children:n}),m&&o.jsxs("div",{className:"flex items-center gap-3",children:[i!==void 0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-gray-500",children:"Required:"}),o.jsxs("span",{className:`text-sm font-medium ${x?"text-green-400":"text-amber-400"}`,children:[a||0,"/",i]})]}),i!==void 0&&l!==void 0&&o.jsx("div",{className:"w-px h-4 bg-white/10"}),l!==void 0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-gray-500",children:"Optional:"}),o.jsxs("span",{className:"text-sm font-medium text-gray-400",children:[s||0,"/",l]})]}),i!==void 0&&(x?o.jsx($n,{className:"w-4 h-4 text-green-400"}):o.jsx(Bi,{className:"w-4 h-4 text-amber-400"}))]})]})}),o.jsx("div",{className:` 975 transition-all duration-300 ease-in-out overflow-hidden 976 ${f?"max-h-[10000px] opacity-100":"max-h-0 opacity-0"} 977 `,children:o.jsx("div",{className:b?"px-4 py-2":"p-6",children:c})})]})},Wke=3,Vke=({reportType:e,propertyName:t,onPresetSelected:r,onSkipPreset:n,onBack:a})=>{const[i,s]=N.useState([]),[l,c]=N.useState(""),[u,d]=N.useState(null),[f,p]=N.useState(!0),[m,x]=N.useState(null),{displayedItems:y,hasMore:v,remainingCount:b,showAll:w,toggleShowAll:S}=$u(i,Wke,{sortKey:"created_at",sortDirection:"desc"});N.useEffect(()=>{j()},[e]);const j=async()=>{if(e){p(!0),x(null);try{const O=await Mi.getPresets(e);s(O)}catch(O){console.error("Error loading presets:",O),x("Failed to load presets")}finally{p(!1)}}},k=O=>{const A=i.find(P=>P.id===parseInt(O));c(O),d(A)},E=()=>{u&&r(u)},T=()=>{switch(e){case"rent-roll":return"Rent Roll";case"pl":return"Profit & Loss";case"leasing":return"Leasing";default:return e}};return o.jsxs("div",{className:"space-y-6 bg-gray-900/50 backdrop-blur-xl rounded-xl border border-white/10 shadow-[0_0_30px_rgba(245,158,11,0.15)] p-8",children:[o.jsxs("div",{children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-200 mb-2",children:[o.jsx(Cx,{className:"w-5 h-5 inline mr-2 text-accent-gold"}),"Column Mapping Configuration"]}),o.jsxs("p",{className:"text-sm text-gray-400",children:["For ",T()," report - ",t]})]}),f?o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent-gold"})}):o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"bg-gray-800/30 border border-white/20 rounded-xl overflow-hidden",children:o.jsx(Fg,{title:"Use a Saved Preset",icon:uc,defaultExpanded:!0,count:i.length>0?i.length:void 0,children:i.length>0?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Select a preset to automatically configure header row, data start row, and column mappings"}),o.jsx("div",{className:"space-y-3",children:y.map(O=>o.jsxs("label",{className:`relative flex items-start p-4 rounded-lg cursor-pointer transition-all duration-200 ${l===O.id.toString()?"bg-gray-800/70 border-2 border-accent-gold
977shadow-[0_0_20px_rgba(245,158,11,0.2)]":"bg-gray-800/40 border border-white/20 hover:bg-gray-800/60 hover:border-white/30"}`,children:[o.jsx("input",{type:"radio",name:"preset",value:O.id,checked:l===O.id.toString(),onChange:A=>k(A.target.value),className:"mt-0.5 h-4 w-4 text-accent-gold bg-gray-700 border-gray-600 focus:ring-accent-gold focus:ring-offset-0 focus:ring-2"}),o.jsxs("div",{className:"ml-3 flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:`block text-sm font-medium ${l===O.id.toString()?"text-accent-gold":"text-gray-200"}`,children:O.preset_name}),o.jsxs("span",{className:"text-xs text-gray-500",children:["Header row: ",O.header_row+1,", Data starts:"," ",O.data_start_row+1]})]}),o.jsxs("span",{className:"block text-xs text-gray-500 mt-1",children:[o.jsx($0,{className:"w-3 h-3 inline mr-1"}),"Created: ",new Date(O.created_at).toLocaleDateString()]})]})]},O.id))}),v&&o.jsx("button",{onClick:S,className:"mt-3 w-full flex items-center justify-center py-2 text-sm text-gray-400 hover:text-accent-gold transition-colors duration-200",children:w?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",b," more)"]})}),o.jsxs("button",{onClick:E,disabled:!u,className:`mt-4 w-full ${u?"btn-primary":"px-6 py-3 bg-gray-800/30 text-gray-500 rounded-lg border border-gray-700 cursor-not-allowed"}`,children:[o.jsx(uc,{className:"h-4 w-4 mr-2"}),"Continue with Selected Preset"]})]}):o.jsxs("p",{className:"text-sm text-gray-500 italic",children:["No presets saved for ",T()," reports yet."]})})}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("div",{className:"w-full border-t border-white/10"})}),o.jsx("div",{className:"relative flex justify-center text-sm",children:o.jsx("span",{className:"px-3 bg-gray-900 text-gray-500",children:"OR"})})]}),o.jsxs("div",{className:"bg-gray-800/30 border border-white/20 rounded-xl p-6 hover:border-white/30 transition-all duration-200",children:[o.jsxs("h4",{className:"text-base font-medium text-gray-200 mb-2",children:[o.jsx(Sn,{className:"w-4 h-4 inline mr-2 text-accent-gold"}),"Configure Manually"]}),o.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Set up the column mappings step by step"}),o.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center px-6 py-3 bg-gray-800/50 text-gray-200 rounded-lg border border-white/20 hover:bg-gray-800/70 hover:border-white/30 transition-all duration-200",children:[o.jsx(Sn,{className:"h-4 w-4 mr-2"}),"Configure Column Mappings Manually"]})]}),m&&o.jsx("div",{className:"rounded-lg bg-red-500/10 backdrop-blur-sm border border-red-500/20 p-4",children:o.jsx("p",{className:"text-sm text-red-400",children:m})})]}),o.jsx("div",{className:"flex justify-between pt-4 border-t border-white/10",children:o.jsx("button",{onClick:a,className:"px-6 py-3 bg-gray-800/50 text-gray-200 rounded-lg border border-white/20 hover:bg-gray-800/70 hover:border-white/30 transition-all duration-200",children:"Back"})})]})},O4=[{value:"fixed",label:"Fixed Rate"},{value:"variable",label:"Variable Rate"}],Gke=O4.map(e=>e.value);typeof On<"u"&&On.exports&&(On.exports={LOAN_TYPE_OPTIONS:O4,LOAN_TYPE_VALUES:Gke});const lk=[{key:"pool",label:"Pool",category:"recreation"},{key:"gym",label:"Fitness Center",category:"recreation"},{key:"dog_park",label:"Dog Park",category:"recreation"},{key:"playground",label:"Playground",category:"recreation"},{key:"clubhouse",label:"Clubhouse",category:"recreation"},{key:"covered_parking",label:"Covered Parking",category:"parking"},{key:"uncovered_parking",label:"Uncovered Parking",category:"parking"},{key:"elevator",label:"Elevator",category:"building"},{key:"management_onsite",label:"Management Onsite",category:"building"},{key:"business_center",label:"Business Center",category:"building"},{key:"laundry",label:"Laundry Room",category:"laundry"},{key:"in_unit_laundry",label:"In-Unit Laundry",category:"laundry"},{key:"pet_wash",label:"Pet Wash Station",category:"convenience"},{key:"bike_storage",label:"Bike Storage",category:"convenience"},{key:"package_lockers",label:"Package Lockers",category:"convenience"}],L$=[{key:"walk_score",label:"Walk Score",description:"Walkability of the neighborhood",min:0,max:100,helpText:"Score from 0-100 indicating walkability"},{key:"transit_score",label:"Transit Score",description:"Public transportation accessibility",min:0,max:100,helpText:"Score from 0-100 for public transit access"},{key:"bike_score",label:"Bike Score",description:"Bikeability of the area",min:0,max:100,helpText:"Score from 0-100 for bike-friendliness"}],P4=[{value:"",label:"Select Class"},{value:"A",label:"Class A - Premium"},{value:"B",label:"Class B - Mid-Market"},{value:"C",label:"Class C - Workforce"},{value:"D",label:"Class D - Affordable"}],aX=O4,Kke=e=>{if(!e)return"N/A";const t=aX.find(r=>r.value===e);return t?t.label:e.replace("_"," ").replace(/\b\w/g,r=>r.toUpperCase())},iX=({property:e,onSubmit:t,onCancel:r})=>{const[n,a]=N.useState({name:(e==null?void 0:e.name)||"",street_address:(e==null?void 0:e.street_address)||"",city:(e==null?void 0:e.city)||"",state:(e==null?void 0:e.state)||"",zip_code:(e==null?void 0:e.zip_code)||"",unit_count:(e==null?void 0:e.unit_count)||"",construction_year:(e==null?void 0:e.construction_year)||"",property_class:(e==null?void 0:e.property_class)||"",purchase_date:e!=null&&e.purchase_date?new Date(e.purchase_date).toISOString().split("T")[0]:"",purchase_price:(e==null?void 0:e.purchase_price)||""}),[i,s]=N.useState({}),[l,c]=N.useState(!1),u=(p,m)=>{a(x=>({...x,[p]:m})),i[p]&&s(x=>({...x,[p]:null}))},d=()=>{var y,v,b,w,S;const p={},m=new Date().getFullYear();(y=n.name)!=null&&y.trim()||(p.name="Property name is required"),(v=n.street_address)!=null&&v.trim()||(p.street_address="Street address is required"),(b=n.city)!=null&&b.trim()||(p.city="City is required"),(w=n.state)!=null&&w.trim()||(p.state="State is required"),(S=n.zip_code)!=null&&S.trim()||(p.zip_code="Zip code is required");const x=parseInt(n.unit_count);if((!n.unit_count||isNaN(x)||x<1)&&(p.unit_count="Must have at least 1 unit"),n.construction_year){const j=parseInt(n.construction_year);(isNaN(j)||j<1800||j>m)&&(p.construction_year=`Year must be between 1800 and ${m}`)}if(n.purchase_price){const j=parseFloat(n.purchase_price);(isNaN(j)||j<0)&&(p.purchase_price="Price must be a positive number")}return p},f=async p=>{p.preventDefault();const m=d();if(Object.keys(m).length>0){s(m);return}c(!0);try{const x={...n,unit_count:parseInt(n.unit_count),construction_year:n.construction_year?parseInt(n.construction_year):null,purchase_price:n.purchase_price?parseFloat(n.purchase_price):null,purchase_date:n.purchase_date||null,property_class:n.property_class||null};await t(x)}catch{}finally{c(!1)}};return o.jsxs("form",{onSubmit:f,className:"space-y-6",children:[o.jsx(Wv,{title:"Property Information",icon:_i,columns:1,children:o.jsx(Qt,{label:"Property Name",value:n.name,onChange:p=>u("name",p),isEditing:!0,type:"text",required:!0,placeholder:"Enter property name",error:i.name})}),o.jsxs(Wv,{title:"Location Details",icon:_V,columns:1,children:[o.jsx(Qt,{label:"Street Address",value:n.street_address,onChange:p=>u("street_address",p),isEditing:!0,type:"text",required:!0,placeholder:"123 Main Street",error:i.street_address}),o.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-6",children:[o.jsx("div",{className:"sm:col-span-3",children:o.jsx(Qt,{label:"City",value:n.city,onChange:p=>u("city",p),isEditing:!0,type:"text",required:!0,placeholder:"New York",error:i.city})}),o.jsx("div",{className:"sm:col-span-1",children:o.jsx(Qt,{label:"State",value:n.state,onChange:p=>u("state",p),isEditing:!0,type:"text",required:!0,placeholder:"NY",error:i.state})}),o.jsx("div",{className:"sm:col-span-2",children:o.jsx(Qt,{label:"Zip Code",value:n.zip_code,onChange:p=>u("zip_code",p),isEditing:!0,type:"text",required:!0,placeholder:"12345",error:i.zip_code})})]})]}),o.jsxs(Wv,{title:"Property Details",icon:Ru,columns:2,children:[o.jsx(Qt,{label:"Number of Units",value:n.unit_count,onChange:p=>u("unit_count",p),isEditing:!0,type:"number",required:!0,min:1,placeholder:"24",error:i.unit_count}),o.jsx(Qt,{label:"Year of Construction",value:n.construction_year,onChange:p=>u("construction_year",p),isEditing:!0,type:"number",min:1800,max:new Date().getFullYear(),placeholder:"1995",error:i.construction_year}),o.jsx(Qt,{label:"Property Class",value:n.property_class,onChange:p=>u("property_class",p),isEditing:!0,type:"select",options:P4,placeholder:"Select class"})]}),o.jsxs(Wv,{title:"Financial Information",icon:bl,columns:2,children:[o.jsx(Qt,{label:"Purchase Date",value:n.purchase_date,onChange:p=>u("purchase_date",p),isEditing:!0,type:"date"}),o.jsx(Qt,{label:"Purchase Price",value:n.purchase_price,onChange:p=>u("purchase_price",p),isEditing:!0,type:"number",prefix:"$",placeholder:"5,000,000",error:i.purchase_price})]}),o.jsxs("div",{className:"flex justify-end gap-3 pt-6 border-t border-white/10",children:[o.jsx(rt,{type:"button",variant:"secondary",onClick:r,disabled:l,children:"Cancel"}),o.jsx(rt,{type:"submit",variant:"primary",loading:l,children:"Save Property"})]})]})};class rp extends se.Component{constructor(r){super(r);Wn(this,"handleRefresh",()=>{window.location.reload()});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){this.setState({error:r,errorInfo:n}),UY(r,{componentStack:n.componentStack,type:"error_boundary"}),console.error("Error caught by boundary:",r,n)}render(){return this.state.hasError?o.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-8",children:o.jsx("div",{className:"bg-red-950/20 border border-red-900/50 rounded-lg p-8 max-w-md w-full backdrop-blur-sm",children:o.jsxs("div",{className:"flex items-start space-x-4",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx(Jr,{className:"h-8 w-8 text-red-400"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-xl font-semibold text-red-400 mb-2",children:"Something went wrong"}),o.jsx("p",{className:"text-gray-300 mb-4",children:"We encountered an unexpected error. The issue has been logged and our team will look into it."}),!1,o.jsxs("div",{className:"mt-6 flex space-x-3",children:[o.jsxs("button",{onClick:this.handleRefresh,className:`flex items-center space-x-2 bg-amber-900/50 hover:bg-amber-900/70 978 text-white px-4 py-2 rounded transition-colors`,children:[o.jsx(Gh,{className:"h-4 w-4"}),o.jsx("span",{children:"Refresh Page"})]}),this.props.onReset&&o.jsx("button",{onClick:this.props.onReset,className:`px-4 py-2 text-gray-300 hover:text-white 979 border border-gray-700 hover:border-gray-600 980 rounded transition-colors`,children:"Try Again"})]})]})]})})}):this.props.children}}const Yke=({onCancel:e})=>{const t=async r=>{var n,a,i,s;try{await na.createProperty(r),ft.success("Property created successfully"),e&&e()}catch(l){throw(a=(n=l.response)==null?void 0:n.data)!=null&&a.upgradeRequired?ft.error(l.response.data.message):ft.error(((s=(i=l.response)==null?void 0:i.data)==null?void 0:s.error)||l.message||"Failed to create property"),l}};return o.jsx(rp,{children:o.jsxs("div",{className:"max-w-4xl mx-auto py-8 px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"flex items-center space-x-4 mb-8",children:[o.jsx("div",{className:"p-3 bg-gradient-to-br from-accent/30 to-accent/20 rounded-xl shadow-lg shadow-accent/20",children:o.jsx(_i,{className:"h-8 w-8 text-accent-light"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-bold tracking-wide",children:o.jsx("span",{className:"bg-gradient-to-r from-white to-gray-200 bg-clip-text text-transparent",children:"Add Property"})}),o.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Enter property details below"})]})]}),o.jsx(iX,{onSubmit:t,onCancel:e})]})})},Gv=[{field:"guestCards",label:"Guest Cards",type:"number",required:!0},{field:"applications",label:"Applications",type:"number",required:!0},{field:"ntv",label:"NTV",type:"number",required:!1},{field:"futureResidents",label:"Future Residents",type:"number",required:!1},{field:"tours",label:"Tours",type:"number",required:!1},{field:"canceledApps",label:"Canceled Applications",type:"number",required:!1},{field:"declinedApps",label:"Declined Applications",type:"number",required:!1},{field:"signedLeases",label:"Signed Leases",type:"number",required:!1},{field:"renewals",label:"Renewals",type:"number",required:!1}],Xke=(e=[],t={})=>e.map(r=>{const n={};return Object.entries(t).forEach(([a,i])=>{const s=r==null?void 0:r[i];
980n[a]=s!==""&&s!=null?Number(s.toString().replace(/[^0-9.-]/g,"")):0}),n}),Jke=({headers:e=[],data:t=[],propertyName:r,startDate:n,endDate:a,onMappingComplete:i,onError:s,onBack:l})=>{const[c,u]=N.useState({}),[d,f]=N.useState([]);N.useEffect(()=>{(t==null?void 0:t.length)>0&&f(t.slice(0,5))},[t]);const p=(y,v)=>{u(b=>{const w={...b};return Object.entries(w).forEach(([S,j])=>{j===v&&S!==y&&delete w[S]}),v===""?delete w[y]:w[y]=v,w})},m=()=>{const y=[];return Gv.filter(v=>v.required).forEach(({field:v,label:b})=>{c[v]||y.push(`${b} is required`)}),n||y.push("Start date is required"),a&&new Date(n)>new Date(a)&&y.push("End date must be after start date"),y},x=async y=>{y.preventDefault();const v=m();if(v.length>0){s(v.join(", "));return}try{const b=Xke(t,c);i({data:b,mappings:c,startDate:n,endDate:a,propertyName:r})}catch(b){s(b.message)}};return o.jsxs("div",{className:"space-y-6 bg-gray-900/50 backdrop-blur-xl rounded-xl border border-white/10 shadow-[0_0_30px_rgba(245,158,11,0.15)] p-8",children:[o.jsxs("div",{className:"mb-6",children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-200 mb-2",children:[o.jsx(Ru,{className:"w-5 h-5 inline mr-2 text-accent-gold"}),"Leasing Column Mapping"]}),o.jsx("p",{className:"text-sm text-gray-400",children:"Map your columns to the appropriate leasing fields"})]}),o.jsxs("form",{onSubmit:x,className:"space-y-6",children:[o.jsxs("div",{className:"bg-gray-800/30 border border-white/20 rounded-xl p-6",children:[o.jsxs("h4",{className:"text-sm font-medium text-gray-200 mb-4",children:[o.jsx(e_,{className:"w-4 h-4 inline mr-2 text-accent-gold"}),"Field Mapping"]}),o.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:Gv.map(({field:y,label:v,required:b})=>
980o.jsxs("div",{className:"bg-gray-800/20 p-4 rounded-lg border border-white/10",children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-200 mb-2",children:[v," ",b&&o.jsx("span",{className:"text-red-400",children:"*"})]}),o.jsxs("select",{value:c[y]||"",onChange:w=>p(y,w.target.value),className:"block w-full rounded-lg bg-gray-800/50 border border-white/20 py-2 px-3 text-gray-200 text-sm focus:border-accent-gold focus:outline-none focus:ring-2 focus:ring-accent-gold/20 transition-all duration-200",children:[o.jsx("option",{value:"",children:"Select column"}),e.map((w,S)=>o.jsx("option",{value:S,children:w||`Column ${S+1}`},S))]})]},y))})]}),d.length>0&&o.jsxs("div",{className:"mt-6 bg-gray-800/30 border border-white/20 rounded-xl p-6",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-200 mb-4",children:"Data Preview"}),o.jsx("div",{className:"overflow-x-auto rounded-lg border border-white/10",children:o.jsxs("table",{className:"min-w-full divide-y divide-white/10",children:[o.jsx("thead",{className:"bg-gray-800/50",children:o.jsx("tr",{children:Gv.filter(y=>c[y.field]!==void 0).map(({field:y,label:v})=>o.jsx("th",{className:"px-3 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:v},y))})}),o.jsx("tbody",{className:"bg-gray-900/30 divide-y divide-white/10",children:d.map((y,v)=>o.jsx("tr",{className:"hover:bg-gray-800/30 transition-colors",children:Gv.filter(b=>c[b.field]!==void 0).map(({field:b})=>{const w=y[c[b]];return o.jsx("td",{className:"px-3 py-2 text-sm text-gray-300 whitespace-nowrap",children:w},b)})},v))})]})})]}),o.jsxs("div",{className:"flex justify-between pt-6 mt-6 border-t border-white/10",children:[o.jsx("button",{type:"button",onClick:l,className:"px-6 py-3 bg-gray-800/50 text-gray-200 rounded-lg border border-white/20 hover:bg-gray-800/70 hover:border-white/30 transition-all duration-200",children:"Back"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Continue"})]})]})]})};class sX{constructor(){Wn(this,"transformRentRoll",(t,r)=>t.map((n,a)=>{var l,c,u,d,f,p;let i=null;return r.leaseStart!=="__NOT_AVAILABLE__"&&(i=this.formatDate(this.getValueFromColumn(n,r.leaseStart))),!i&&r.moveInDate!=="__NOT_AVAILABLE__"&&(i=this.formatDate(this.getValueFromColumn(n,r.moveInDate))),{unit_number:((c=(l=this.getValueFromColumn(n,r.unitNumber))==null?void 0:l.toString())==null?void 0:c.trim())||null,unit_type:((d=(u=this.getValueFromColumn(n,r.unitType))==null?void 0:u.toString())==null?void 0:d.trim())||null,tenant_name:((p=(f=this.getValueFromColumn(n,r.tenantName))==null?void 0:f.toString())==null?void 0:p.trim())||null,monthly_rent:this.formatNumber(this.getValueFromColumn(n,r.monthlyRent))||null,lease_start:i,lease_end:this.formatDate(this.getValueFromColumn(n,r.leaseEnd))||null,square_feet:this.formatNumber(this.getValueFromColumn(n,r.squareFeet))||null,market_rent:this.formatNumber(this.getValueFromColumn(n,r.marketRent))||null,deposit:this.formatNumber(this.getValueFromColumn(n,r.deposit))||null,other_deposit:this.formatNumber(this.getValueFromColumn(n,r.otherDeposit))||null,move_in_date:this.formatDate(this.getValueFromColumn(n,r.moveInDate))||null,move_out_date:this.formatDate(this.getValueFromColumn(n,r.moveOutDate))||null,delinquency:this.formatNumber(this.getValueFromColumn(n,r.delinquency))||0}}).map(n=>{if(!n.tenant_name||n.tenant_name==="VACANT"||n.tenant_name==="Vacant"||n.tenant_name===""){const i=r.startDate||new Date().toISOString().split("T")[0];return{...n,tenant_name:"VACANT",lease_start:n.lease_start||i,lease_end:n.lease_end||i,monthly_rent:0}}return(n.monthly_rent===null||n.monthly_rent===void 0)&&(n.monthly_rent=0),n}).filter(n=>{var p;const a=n.unit_number!==null;if(["Future Residents/Applicants","Summary Groups","Total Non Rev Units","Total Vacant Units","Total Occupied Units","Total Units","Occupied Units","Vacant Units","Non Rev Units","Units","Current/Notice/Vacant Residents","Current Residents","Notice Residents","Vacant Residents"].includes(n.unit_number))return!1;const s=((p=n.unit_number)==null?void 0:p.toString().toLowerCase())||"";if(s.includes("total")||s.includes("summary")||s.includes("subtotal")||s==="totals"||s==="grand total"||s.includes("residents")||s.includes("/")||n.monthly_rent&&parseFloat(n.monthly_rent)>1e4)return!1;const l=r.startDate||new Date().toISOString().split("T")[0],c=Jn(l),u=n.lease_start?Jn(n.lease_start):null,d=n.move_in_date?Jn(n.move_in_date):null;return u&&u>c||!u&&d&&d>c||n.tenant_name&&n.tenant_name!=="VACANT"&&!n.lease_start&&!n.move_in_date?!1:a}));Wn(this,"getValueFromColumn",(t,r)=>r==null?null:t[r]);Wn(this,"formatDate",t=>{if(!t)return null;if(typeof t=="number"&&t>3e4){const r=Tke(t);return r?Ct(r,"iso"):null}return Ct(t,"iso")});Wn(this,"formatNumber",t=>XY(t))}async transformData(t,r,n){const a=t.filter(i=>i.some(s=>s!==""&&s!==null&&s!==void 0));try{const i=this.transformRentRoll(a,r);return{success:!0,data:i,reportType:n,propertyName:r.propertyName,startDate:r.startDate,endD
980ate:r.endDate,transformedDate:new Date().toISOString(),recordCount:i.length}}catch(i){throw new Error(`Transformation failed: ${i.message}`)}}}const Qke={january:"Jan",february:"Feb",march:"Mar",april:"Apr",may:"May",june:"Jun",july:"Jul",august:"Aug",september:"Sep",october:"Oct",november:"Nov",december:"Dec"},Zke=/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[\s\-_/]+(\d{2}|\d{4})$/i,eNe=/^([a-z]+)[\s\-_/]+(\d{2}|\d{4})$/i,tNe=/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)(\d{2}|\d{4})$/i;function R4(e){if(!e||typeof e!="string")return null;const t=e.split(`\r 981`)[0].trim();if(!t)return null;const r=t.match(Zke);if(r){const i=r[1].charAt(0).toUpperCase()+r[1].slice(1).toLowerCase(),s=r[2].length===2?`20${r[2]}`:r[2];return`${i} ${s}`}const n=t.match(tNe);if(n){const i=n[1].charAt(0).toUpperCase()+n[1].slice(1).toLowerCase(),s=n[2].length===2?`20${n[2]}`:n[2];return`${i} ${s}`}const a=t.match(eNe);if(a){const i=Qke[a[1].toLowerCase()];if(i){const s=a[2].length===2?`20${a[2]}`:a[2];return`${i} ${s}`}}return null}typeof On<"u"&&On.exports&&(On.exports={normalizePLMonth:R4});function rNe({data:e,headers:t,categoryColumn:r,glCodeColumn:n,monthlyColumns:a,columnMappings:i={}}){const s=t.map((l,c)=>l&&l.trim()!==""?l:`Column ${c+1}`);return e.map(l=>{var f;const u=(Array.isArray(l)?l:Object.values(l)).reduce((p,m,x)=>(p[s[x]||`Column ${x+1}`]=m,p),{}),d=(f=Object.entries(i).find(([p,m])=>m==="TOTAL"))==null?void 0:f[0];return{category:u[r],glCode:n?u[n]:null,monthlyData:a.reduce((p,m)=>(p[m]=u[m],p),{}),total:d?u[d]:null}})}function I4({data:e,headers:t,mapping:r}){const n=t.map((c,u)=>c&&c.trim()!==""?c:`Column ${u+1}`),a=r.plCategory!==void 0?n[r.plCategory]:null,i=r.plGlCode!==void 0?n[r.plGlCode]:null,s=Array.isArray(r.plMonthlyData)?r.plMonthlyData.map(c=>n[c]):[],l={};return r.plTotal!==void 0&&(l[n[r.plTotal]]="TOTAL"),rNe({data:e,headers:t,categoryColumn:a,glCodeColumn:i,monthlyColumns:s,columnMappings:l})}function F4(e){const t=(e||[]).flatMap(n=>{var s;const a=(s=n.category)==null?void 0:s.trim(),i=n.glCode;return a?Object.entries(n.monthlyData||{}).map(([l,c])=>({category:a,gl_code:i!=null?String(i):null,month:l,amount:XY(c)??0})).filter(l=>l.amount!==0):[]}),r=[];return t.forEach(n=>{const a=R4(n.month);a?n.month=a:r.push(n.month)}),{rows:t,invalidMonths:[...new Set(r)]}}const Kv=3,M4=({isOpen:e,onClose:t})=>{const[r,n]=N.useState([]),[a,i]=N.useState([]),[s,l]=N.useState(!0),[c,u]=N.useState(null),[d,f]=N.useState(null),[p,m]=N.useState(""),[x,y]=N.useState(null),[v,b]=N.useState({"rent-roll":!1,pl:!1,leasing:!1,categorization:!1}),[w,S]=N.useState({"rent-roll":!1,pl:!1,leasing:!1,categorization:!1});N.useEffect(()=>{e&&j()},[e]);const j=async()=>{l(!0),u(null);try{const[L,U,W]=await Promise.all([Mi.getPresets("rent-roll"),Mi.getPresets("pl"),Mi.getPresets("leasing")]),V=[...L.map(G=>({...G,report_type:"rent-roll"})),...U.map(G=>({...G,report_type:"pl"})),...W.map(G=>({...G,report_type:"leasing"}))];n(V);try{const G=await Xe.get("/categorization/presets");i(G.data.presets||[])}catch(G){console.error("Error loading categorization presets:",G),i([])}}catch(L){console.error("Error loading presets:",L),u("Failed to load presets")}finally{l(!1)}},k=(L,U=!1)=>{f(L.id),m(U?L.name:L.preset_name)},E=async(L,U=!1)=>{try{if(U){f(null),m("");return}(await Mi.updatePreset(L.id,{...L,preset_name:p})).success&&(await j(),f(null),m(""))}catch(W){console.error("Error updating preset:",W),u("Failed to update preset")}},T=async(L,U=!1)=>{try{if(U){await Xe.delete(`/categorization/presets/${L}`),await j(),y(null);return}(await Mi.deletePreset(L)).success&&(await j(),y(null))}catch(W){console.error("Error deleting preset:",W),u("Failed to delete preset")}},O=L=>{switch(L){case"rent-roll":return"Rent Roll";case"pl":return"Profit & Loss";case"leasing":return"Leasing";default:return L}},A={"rent-roll":r.filter(L=>L.report_type==="rent-roll"),pl:r.filter(L=>L.report_type==="pl"),leasing:r.filter(L=>L.report_type==="leasing")},P=L=>{const U=A[L]||[];return w[L]?U:U.slice(0,Kv)},I=L=>{b(U=>({...U,[L]:!U[L]}))},R=L=>{S(U=>({...U,[L]:!U[L]}))},M=["rent-roll","pl","leasing"].filter(L=>A[L].length>0);return e?o.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm overflow-y-auto h-full w-full z-50",children:o.jsxs("div",{className:"relative top-10 mx-auto p-0 w-full max-w-4xl glass-card animate-fade-in-up",children:[o.jsx("div",{className:"bg-gradient-to-r from-primary/80 to-primary/60 backdrop-blur-md p-6 border-b border-white/10",children:o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx(uc,{className:"h-6 w-6 text-accent-light"}),o.jsx("h3",{className:"text-2xl font-bold text-white",children:"Manage Presets"})]}),o.jsx("button",{onClick:t,className:"p-2 hover:bg-white/10 rounded-lg transition-colors",children:o.jsx(Ir,{className:"h-6 w-6 text-gray-400"})})]})}),o.jsxs("div",{className:"p-6",children:[s?o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-accent border-t-transparent"})}):c?o.jsx("div",{className:"rounded-lg bg-red-500/20 border border-red-500/50 p-4",children:o.jsx("p",{className:"text-sm text-red-400",children:c})}):r.length===0&&a.length===0?o.jsxs("div",{className:"text-center py-12",children:[o.jsx(Sn,{className:"mx-auto h-12 w-12 text-gray-600"}),o.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"No presets found. Presets are created when you save column mappings during the upload process or save categorization mappings."})]}):o.jsxs("div",{className:"space-y-4",children:[M.map(L=>{const U=A[L],W=P(L),V=U.length>Kv,G=v[L],K=w[L];return o.jsxs("div",{className:"glass-card overflow-hidden",children:[o.jsx("button",{onClick:()=>I(L),className:"w-full flex items-center justify-between px-5 py-4 bg-gradient-to-r from-card/30 to-card/10 hover:from-card/40 hover:to-card/20 border-b border-white/5 transition-all duration-200",children:o.jsxs("div",{className:"flex items-center gap-3",children:[G?o.jsx(kr,{className:"w-5 h-5 text-accent-light"}):o.jsx(yl,{className:"w-5 h-5 text-accent-light"}),o.jsx("h4",{className:"text-base font-semibold text-white",children:O(L)}),o.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent/20 text-accent-light",children:[U.length," preset",U.length!==1?"s":""]})]})}),G&&o.jsxs("div",{className:"divide-y divide-white/5",children:[W.map(F=>o.jsx("div",{className:"px-5 py-4 hover:bg-white/5 transition-colors",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:"flex-1 min-w-0",children:d===F.id?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"text",value:p,onChange:ne=>
981m(ne.target.value),className:"block w-64 rounded-md bg-gray-800/50 border border-white/20 text-white px-3 py-1.5 text-sm focus:border-accent focus:outline-none",onKeyPress:ne=>{ne.key==="Enter"&&E(F)},autoFocus:!0}),o.jsx("button",{onClick:()=>E(F),className:"p-1.5 rounded bg-green-500/20 text-green-400 hover:bg-green-500/30 transition-colors",title:"Save",children:o.jsx(Po,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>{f(null),m("")},className:"p-1.5 rounded bg-gray-500/20 text-gray-400 hover:bg-gray-500/30 transition-colors",title:"Cancel",children:o.jsx(Ir,{className:"h-4 w-4"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-sm font-medium text-white truncate",children:F.preset_name}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Header row ",F.header_row+1,", Data starts row"," ",F.data_start_row+1,o.jsx("span",{className:"mx-2",children:"â¢"}),"Created ",new Date(F.created_at).toLocaleDateString()]})]})}),d!==F.id&&o.jsx("div",{className:"flex items-center gap-2 ml-4",children:x===F.id?o.jsxs("div",{className:"flex items-center gap-2 bg-red-500/10 rounded-lg px-3 py-1.5",children:[o.jsx("span",{className:"text-xs text-red-400",children:"Delete this preset?"}),o.jsx("button",{onClick:()=>T(F.id),className:"px-2 py-0.5 text-xs font-medium rounded bg-red-500 text-white hover:bg-red-600 transition-colors",children:"Yes"}),o.jsx("button",{onClick:()=>y(null),className:"px-2 py-0.5 text-xs font-medium rounded bg-gray-600 text-white hover:bg-gray-700 transition-colors",children:"No"})]}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:()=>k(F),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-accent/10 text-accent-light hover:bg-accent/20 transition-colors text-xs font-medium",title:"Rename preset",children:[o.jsx(_R,{className:"h-3.5 w-3.5"}),"Rename"]}),o.jsxs("button",{onClick:()=>y(F.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-red-500/10 text-red-400 hover:bg-red-500/20 transition-colors text-xs font-medium",title:"Delete preset",children:[o.jsx(wl,{className:"h-3.5 w-3.5"}),"Delete"]})]})})]})},F.id)),V&&o.jsx("div",{className:"px-5 py-3 bg-card/20",children:o.jsx("button",{onClick:()=>R(L),className:"text-sm text-accent-light hover:text-accent transition-colors flex items-center gap-1",children:K?o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"h-4 w-4 rotate-180"}),"Show less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"h-4 w-4"}),"Show all ",U.length," presets"]})})})]})]},L)}),a.length>0&&o.jsxs("div",{className:"glass-card overflow-hidden",children:[o.jsx("button",{onClick:()=>I("categorization"),className:"w-full flex items-center justify-between px-5 py-4 bg-gradient-to-r from-card/30 to-card/10 hover:from-card/40 hover:to-card/20 border-b border-white/5 transition-all duration-200",children:o.jsxs("div",{className:"flex items-center gap-3",children:[v.categorization?o.jsx(kr,{className:"w-5 h-5 text-accent-light"}):o.jsx(yl,{className:"w-5 h-5 text-accent-light"}),o.jsx(tde,{className:"w-4 h-4 text-accent-light"}),o.jsx("h4",{className:"text-base font-semibold text-white",children:"Expense Categorization"}),o.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent/20 text-accent-light",children:[a.length," preset",a.length!==1?"s":""]})]})}),v.categorization&&o.jsxs("div",{className:"divide-y divide-white/5",children:[(w.categorization?a:a.slice(0,Kv)).map(L=>o.jsx("div",{className:"px-5 py-4 hover:bg-white/5 transition-colors",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-white truncate",children:L.name}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[L.mappings_count||Object.keys(L.mappings||{}).length," ","categorization",(L.mappings_count||Object.keys(L.mappings||{}).length)!==1?"s":"",L.description&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-2",children:"â¢"}),L.description]}),o.jsx("span",{className:"mx-2",children:"â¢"}),"Created ",new Date(L.created_at).toLocaleDateString()]})]}),o.jsx("div",{className:"flex items-center gap-2 ml-4",children:x===L.id?o.jsxs("div",{className:"flex items-center gap-2 bg-red-500/10 rounded-lg px-3 py-1.5",children:[o.jsx("span",{className:"text-xs text-red-400",children:"Delete this preset?"}),o.jsx("button",{onClick:()=>T(L.id,!0),className:"px-2 py-0.5 text-xs font-medium rounded bg-red-500 text-white hover:bg-red-600 transition-colors",children:"Yes"}),o.jsx("button",{onClick:()=>y(null),className:"px-2 py-0.5 text-xs font-medium rounded bg-gray-600 text-white hover:bg-gray-700 transition-colors",children:"No"})]}):o.jsxs("button",{onClick:()=>y(L.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-red-500/10 text-red-400 hover:bg-red-500/20 transition-colors text-xs font-medium",title:"Delete preset",children:[o.jsx(wl,{className:"h-3.5 w-3.5"}),"Delete"]})})]})},L.id)),a.length>Kv&&o.jsx("div",{className:"px-5 py-3 bg-card/20",children:o.jsx("button",{onClick:()=>R("categorization"),className:"text-sm text-accent-light hover:text-accent transition-colors flex items-center gap-1",children:w.
981categorization?o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"h-4 w-4 rotate-180"}),"Show less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"h-4 w-4"}),"Show all ",a.length," presets"]})})})]})]})]}),o.jsx("div",{className:"mt-6 flex justify-end pt-4 border-t border-white/10",children:o.jsx("button",{onClick:t,className:"px-6 py-2 bg-gray-800/50 text-gray-200 rounded-lg border border-white/20 hover:bg-gray-800/70 hover:border-white/30 transition-all duration-200",children:"Close"})})]})]})}):null};let kd=null;const oX=({toastId:e,mappingConfig:t,onSaved:r})=>{const[n,a]=N.useState("initial"),[i,s]=N.useState(""),[l,c]=N.useState(!1),u=N.useRef(null),d=t.selectedPreset,f=(E,T)=>{if(E===T)return!0;if(!E||!T)return!1;const O=Object.keys(E).sort(),A=Object.keys(T).sort();return O.length!==A.length?!1:O.every(P=>{const I=E[P],R=T[P];return typeof I=="object"&&typeof R=="object"?f(I,R):I==R})},p=d?Number(t.headerRow)!==Number(d.header_row)||Number(t.dataStartRow)!==Number(d.data_start_row)||!f(t.mapping,d.column_mappings):!1,m=!!d&&p;N.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const x=E=>{switch(E){case"rent-roll":return"Rent Roll";case"pl":return"P&L";case"leasing":return"Leasing";default:return E}},y=()=>{a("saveNew")},v=()=>{a("initial"),s("")},b=()=>{qa.dismiss(e),kd=null},w=E=>({preset_name:E,report_type:t.reportType,header_row:t.headerRow,data_start_row:t.dataStartRow,column_mappings:t.mapping}),S=async()=>{if(i.trim()){c(!0);try{const E=w(i.trim()),T=[];
981if(E.report_type||T.push("report_type"),(E.header_row===void 0||E.header_row===null)&&T.push(`header_row (value: ${E.header_row})`),(E.data_start_row===void 0||E.data_start_row===null)&&T.push(`data_start_row (value: ${E.data_start_row})`),E.column_mappings||T.push("column_mappings"),T.length>0)throw console.error("SavePresetToast - Missing fields:",T),new Error("Row configuration is incomplete. Please ensure header row and data start row are set before saving as preset.");(await Mi.createPreset(E)).success&&(a("saved"),r==null||r(),u.current=setTimeout(()=>{qa.dismiss(e),kd=null},2e3))}catch(E){console.error("Error saving preset:",E),qa.error(E.message||"Failed to save preset. Please try again.")}finally{c(!1)}}},j=async()=>{if(d){c(!0),a("updating");try{const E=w(d.preset_name),T=[];if(E.report_type||T.push("report_type"),(E.header_row===void 0||E.header_row===null)&&T.push(`header_row (value: ${E.header_row})`),(E.data_start_row===void 0||E.data_start_row===null)&&T.push(`data_start_row (value: ${E.data_start_row})`),E.column_mappings||T.push("column_mappings"),T.length>0)throw console.error("SavePresetToast - Missing fields for update:",T),new Error("Row configuration is incomplete. Please ensure header row and data start row are set before updating preset.");(await Mi.updatePreset(d.id,E)).success&&(a("saved"),r==null||r(),u.current=setTimeout(()=>{qa.dismiss(e),kd=null},2e3))}catch(E){console.error("Error updating preset:",E),qa.error(E.message||"Failed to update preset. Please try again."),a("initial")}finally{c(!1)}}},k=E=>{E.key==="Enter"&&i.trim()?S():E.key==="Escape"&&v()};return n==="saved"?o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx($n,{className:"w-5 h-5 text-green-400"}),o.jsxs("div",{children:[o.jsx("span",{className:"text-sm font-medium text-white",children:"Preset saved!"}),o.jsx("span",{className:"text-xs text-gray-400 block",children:"Find it in Settings â Report Presets"})]})]}):n==="updating"?o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ar,{className:"w-5 h-5 text-accent animate-spin"}),o.jsx("span",{className:"text-sm text-white",children:"Updating preset..."})]}):n==="saveNew"?o.jsxs("div",{className:"flex flex-col gap-2 min-w-[300px]",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Po,{className:"w-4 h-4 text-accent"}),o.jsx("span",{className:"text-sm font-medium text-white",children:"Save as New Preset"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"text",value:i,onChange:E=>s(E.target.value),onKeyDown:k,placeholder:`My ${x(t.reportType)} preset...`,className:"flex-1 px-3 py-1.5 text-sm bg-gray-800/50 border border-white/20 rounded-md text-white placeholder-gray-500 focus:border-accent focus:outline-none",autoFocus:!0,disabled:l}),o.jsx("button",{onClick:S,disabled:!i.trim()||l,className:"p-1.5 rounded bg-accent/20 text-accent hover:bg-accent/30 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Save preset",children:l?o.jsx(ar,{className:"w-4 h-4 animate-spin"}):o.jsx($n,{className:"w-4 h-4"})}),o.jsx("button",{onClick:v,disabled:l,className:"p-1.5 rounded bg-gray-600/30 text-gray-400 hover:bg-gray-600/50 transition-colors disabled:opacity-50",title:"Cancel",children:o.jsx(Ir,{className:"w-4 h-4"})})]})]}):o.jsxs("div",{className:"flex flex-col gap-2 min-w-[300px]",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx($n,{className:"w-5 h-5 text-green-400 flex-shrink-0"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-sm font-medium text-white",children:"Upload successful!"}),o.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:m?`Update "${d.preset_name}" or save as new preset?`:"Save this configuration for future uploads?"})]}),o.jsx("button",{onClick:b,className:"p-1 rounded text-gray-500 hover:text-gray-300 hover:bg-gray-600/30 transition-colors flex-shrink-0",title:"Dismiss",children:o.jsx(Ir,{className:"w-4 h-4"})})]}),o.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[m&&o.jsxs("button",{onClick:j,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-accent/20 text-accent hover:bg-accent/30 rounded transition-colors",children:[o.jsx(Gh,{className:"w-3.5 h-3.5"}),"Update Preset"]}),o.jsxs("button",{onClick:y,className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded transition-colors ${m?"bg-gray-600/30 text-gray-300 hover:bg-gray-600/50":"bg-accent/20 text-accent hover:bg-accent/30"}`,children:[o.jsx(Po,{className:"w-3.5 h-3.5"}),m?"Save as New":"Save Preset"]})]})]})};oX.propTypes={toastId:Q.string.isRequired,mappingConfig:Q.shape({reportType:Q.string.isRequired,headerRow:Q.number,dataStartRow:Q.number,mapping:Q.object.isRequired,selectedPreset:Q.shape({id:Q.oneOfType([Q.string,Q.number]),preset_name:Q.string})}).isRequired,onSaved:Q.func};const nh=(e,t)=>{if(!(e!=null&&e.mapping)||!(e!=null&&e.reportType)){console.warn("showSavePresetToast: Invalid mapping config - missing mapping or reportType",e);return}if(e.headerRow===null||e.headerRow===void 0){console.warn("showSavePresetToast: headerRow is not set, skipping toast",{headerRow:e.headerRow,dataStartRow:e.dataStartRow});return}if(e.dataStartRow===null||e.dataStartRow===void 0){console.warn("showSavePresetToast: dataStartRow is not set, skipping toast",{headerRow:e.headerRow,dataStartRow:e.dataStartRow});return}kd&&(qa.dismiss(kd),kd=null);const r=qa.custom(n=>o.jsx("div",{className:`${n.visible?"animate-enter":"animate-leave"} max-w-md w-full bg-gray-900 border-2 border-accent/50 rounded-lg shadow-2xl pointer-events-auto`,style:{padding:"12px 16px"},children:o.jsx(oX,{toastId:n.id,mappingConfig:e,onSaved:t})}),{duration:2e4,position:"top-center"});return kd=r,r},Cr={SET_FILE:"SET_FILE",REMOVE_FILE:"REMOVE_FILE",SET_HEADER_ROW:"SET_HEADER_ROW",SET_DATA_START_ROW:"SET_DATA_START_ROW",SET_MAPPING:"SET_MAPPING",APPLY_PRESET:"APPLY_PRESET",AUTO_MAP:"AUTO_MAP",SET_PROCESSING:"SET_PROCESSING",SET_ERROR:"SET_ERROR",SET_PROPERTY_NAME:"SET_PROPERTY_NAME",SET_REPORT_TYPE:"SET_REPORT_TYPE",SET_START_DATE:"SET_START_DATE",SET_END_DATE:"SET_END_DATE",SET_IMPORT_MODE:"SET_IMPORT_MODE",RESET:"RESET"},lX={rawFileData:null,uploadedFile:null,propertyName:"",reportType:"rent-roll",startDate:null,endD
981ate:null,importMode:null,headerRow:null,dataStartRow:null,mapping:{},selectedPreset:null,isProcessing:!1,errors:{}},nNe=[{field:"plCategory",label:"Category/Description",type:or.STRING,required:!0},{field:"plMonthlyData",label:"Monthly Data",type:or.CURRENCY,required:!0,multiSelect:!0},{field:"plGlCode",label:"GL/Account Code",type:or.STRING,required:!1},{field:"plYtd",label:"Year-to-Date",type:or.CURRENCY,required:!1},{field:"plBudget",label:"Budget",type:or.CURRENCY,required:!1},{field:"plVariance",label:"Variance",type:or.CURRENCY,required:!1},{field:"plTotal",label:"Total",type:or.CURRENCY,required:!1}],aNe=[{field:"unitNumber",label:"Unit Number",type:or.STRING,required:!0},{field:"unitType",label:"Unit Type",type:or.STRING,required:!1},{field:"squareFeet",label:"Square Feet",type:or.STRING,required:!1},{field:"tenantName",label:"Tenant Name",type:or.STRING,required:!1},{field:"marketRent",label:"Market Rent",type:or.CURRENCY,required:!1},{field:"monthlyRent",label:"Actual Rent",type:or.CURRENCY,required:!0},{field:"deposit",label:"Deposit",type:or.CURRENCY,required:!0},{field:"otherDeposit",label:"Other Deposit",type:or.CURRENCY,required:!1},{field:"moveInDate",label:"Move In Date",type:or.DATE,required:!1},{field:"leaseStart",label:"Lease Start Date",type:or.DATE,required:!1},{field:"leaseEnd",label:"Lease End Date",type:or.DATE,required:!0},{field:"moveOutDate",label:"Move Out Date",type:or.DATE,required:!1},{field:"delinquency",label:"Delinquency",type:or.CURRENCY,required:!0}],Y0=e=>{switch(e){case"rent-roll":return aNe;case"pl":return nNe;default:return[]}},iNe=(e,t)=>{const a=Y0(t).filter(i=>i.required).filter(i=>{const s=e[i.field];return i.multiSelect?!Array.isArray(s)||s.length===0:s===void 0||s===""||s===sn.NOT_AVAILABLE});if(t==="rent-roll"){const i=e.leaseStart!==void 0&&e.leaseStart!==sn.NOT_AVAILABLE,s=e.moveInDate!==void 0&&e.moveInDate!==sn.NOT_AVAILABLE;if(!i&&!s)return{isValid:!1,missingFields:a,error:"Either Lease Start Date or Move In Date must be mapped"}}return{isValid:a.length===0,missingFields:a,error:null}},sNe=(e,t)=>{switch(t.type){case Cr.SET_FILE:return{...e,rawFileData:t.payload.rawFileData,uploadedFile:t.payload.uploadedFile,errors:{}};case Cr.REMOVE_FILE:return{...e,rawFileData:null,uploadedFile:null,headerRow:null,dataStartRow:null,mapping:{},selectedPreset:null,errors:{}};case Cr.SET_HEADER_ROW:return{...e,headerRow:t.payload,dataStartRow:e.dataStartRow===null?null:Math.max(t.payload+1,e.dataStartRow),errors:{}};case Cr.SET_DATA_START_ROW:return{...e,dataStartRow:t.payload,errors:{}};case Cr.SET_MAPPING:return{...e,mapping:{...e.mapping,...t.payload},errors:{}};case Cr.APPLY_PRESET:return{...e,headerRow:t.payload.headerRow,dataStartRow:t.payload.dataStartRow,mapping:t.payload.mapping,selectedPreset:t.payload.preset,errors:{}};case Cr.AUTO_MAP:return{...e,mapping:t.payload,errors:{}};case Cr.SET_PROCESSING:return{...e,isProcessing:t.payload};case Cr.SET_ERROR:return{...e,errors:{...e.errors,...t.payload}};case Cr.SET_PROPERTY_NAME:return{...e,propertyName:t.payload,errors:{}};case Cr.SET_REPORT_TYPE:return{...e,reportType:t.payload,mapping:e.rawFileData?{}:e.mapping,errors:{}};case Cr.SET_START_DATE:return{...e,startDate:t.payload,errors:{}};case Cr.SET_END_DATE:return{...e,endDate:t.payload,errors:{}};case Cr.SET_IMPORT_MODE:return{...e,importMode:t.payload};case Cr.RESET:return lX;default:return e}},oNe=()=>{const[e,t]=N.useReducer(sNe,lX),r={setFile:N.useCallback((n,a)=>{t({type:Cr.SET_FILE,payload:{rawFileData:n,uploadedFile:a}})},[]),removeFile:N.useCallback(()=>{t({type:Cr.REMOVE_FILE})},[]),setHeaderRow:N.useCallback(n=>{t({type:Cr.SET_HEADER_ROW,payload:n})},[]),setDataStartRow:N.useCallback(n=>{t({type:Cr.SET_DATA_START_ROW,payload:n})},[]),setMapping:N.useCallback(n=>{t({type:Cr.SET_MAPPING,payload:n})},[]),applyPreset:N.useCallback(n=>{t({type:Cr.APPLY_PRESET,payload:{headerRow:n.header_row,dataStartRow:n.data_start_row,mapping:n.column_mappings,preset:n}})},[]),autoMap:N.useCallback(n=>{t({type:Cr.AUTO_MAP,payload:n})},[]),setProcessing:N.useCallback(n=>{t({type:Cr.SET_PROCESSING,payload:n})},[]),setError:N.useCallback(n=>{t({type:Cr.SET_ERROR,payload:n})},[]),setPropertyName:N.useCallback(n=>{t({type:Cr.SET_PROPERTY_NAME,payload:n})},[]),setReportType:N.useCallback(n=>{t({type:Cr.SET_REPORT_TYPE,payload:n})},[]),setStartDate:N.useCallback(n=>{t({type:Cr.SET_START_DATE,payload:n})},[]),setEndDate:N.useCallback(n=>{t({type:Cr.SET_END_DATE,payload:n})},[]),setImportMode:N.useCallback(n=>{t({type:Cr.SET_IMPORT_MODE,payload:n})},[]),reset:N.useCallback(()=>{t({type:Cr.RESET})},[])};return{state:e,actions:r}},cX=({fields:e,mapping:t,columnIndex:r,onSelect:n,onClose:a,triggerRef:i,triggerColumnIndex:s})=>{const l=N.useRef(null),c=N.useRef(a),[u,d]=N.useState(0),[f,p]=N.useState({top:0,left:0});c.current=a;const m=e.filter(O=>O.required),x=e.filter(O=>!O.required),y=[...m,...x,{field:"__CLEAR__",label:"Clear Mapping"}],v=N.useCallback(()=>{var U;const O=(U=i==null?void 0:i.current)==null?void 0:U[s];if(!O){console.warn("FieldSelectorDropdown: trigger element is null for column",s);return}const A=O.getBoundingClientRect(),P=256,I=400,R=4;let M=A.bottom+R,L=A.left;if(L+P>window.innerWidth&&(L=window.innerWidth-P-8),L<8&&(L=8),M+I>window.innerHeight){const W=A.top-R,V=window.innerHeight-A.bottom-R;W>V&&(M=A.top-R-Math.min(I,W))}p({top:M,left:L})},[i,s]);N.useEffect(()=>{const O=requestAnimationFrame(()=>
981{v()}),A=()=>v();return window.addEventListener("scroll",A,!0),window.addEventListener("resize",A),()=>{cancelAnimationFrame(O),window.removeEventListener("scroll",A,!0),window.removeEventListener("resize",A)}},[v]),N.useEffect(()=>{const O=A=>{var I;const P=(I=i==null?void 0:i.current)==null?void 0:I[s];l.current&&!l.current.contains(A.target)&&P&&!P.contains(A.target)&&c.current()};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[i,s]);const b=N.useCallback(O=>{switch(O.key){case"Escape":O.preventDefault(),c.current();break;case"ArrowDown":O.preventDefault(),d(P=>Math.min(P+1,y.length-1));break;case"ArrowUp":O.preventDefault(),d(P=>Math.max(P-1,0));break;case"Enter":case" ":O.preventDefault();const A=y[u];A.field==="__CLEAR__"?E():k(A.field);break;case"Tab":c.current();break}},[u,y]);N.useEffect(()=>(document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)),[b]),N.useEffect(()=>{l.current&&l.current.focus()},[]);const w=O=>{const A=t[O];return Array.isArray(A)?A.length>0:A!==void 0&&A!==""&&A!==sn.NOT_AVAILABLE},S=O=>{const A=t[O];return Array.isArray(A)?A.includes(r):A===r},j=O=>{const A=e.find(P=>P.field===O);return(A==null?void 0:A.multiSelect)===!0},k=O=>{if(j(O)){const P=t[O],I=Array.isArray(P)?P:[];if(I.includes(r)){const R=I.filter(M=>M!==r);n(O,R.length>0?R:void 0,!0)}else n(O,[...I,r].sort((R,M)=>R-M),!0)}else n(O,r,!1),a()},E=()=>{Object.entries(t).forEach(([O,A])=>{if(Array.isArray(A)){if(A.includes(r)){const P=A.filter(I=>I!==r);n(O,P.length>0?P:void 0,!0)}}else A===r&&n(O,"",!1)}),a()},T=o.jsxs("div",{ref:l,tabIndex:-1,className:"fixed z-50 w-64 bg-gray-900 border border-white/20 rounded-lg shadow-2xl overflow-hidden",style:{top:f.top,left:f.left,maxHeight:"400px"},children:[o.jsxs("div",{className:"px-3 py-2 bg-gray-800/50 border-b border-white/10",children:[o.jsx("p",{className:"text-xs font-medium text-gray-300",children:"Select Field"}),o.jsx("p",{className:"text-[10px] text-gray-500 mt-0.5",children:"Map this column to a field"})]}),o.jsxs("div",{className:"overflow-y-auto max-h-[320px]",children:[m.length>0&&o.jsxs("div",{className:"px-3 py-2 border-b border-white/5",children:[o.jsx("p",{className:"text-[10px] font-medium text-amber-400 uppercase tracking-wider mb-1",children:"Required"}),m.map((O,A)=>{const P=w(O.field),I=S(O.field),R=O.multiSelect,M=R&&Array.isArray(t[O.field])?t[O.field].length:0,L=u===A;return o.jsxs("button",{onClick:()=>k(O.field),className:`w-full text-left px-2 py-1.5 rounded text-xs transition-colors duration-150 flex items-center justify-between ${I?"bg-accent/20 text-accent":P?"bg-gray-800/30 text-gray-500 hover:bg-gray-800/50":"text-gray-300 hover:bg-gray-800/50"} ${L?"ring-1 ring-accent/50":""}`,children:[o.jsxs("span",{className:"flex items-center gap-2",children:[O.label,R&&o.jsx("span",{className:"text-[9px] px-1.5 py-0.5 bg-purple-500/20 text-purple-400 rounded",children:"multi"}),R&&M>0&&!I&&o.jsxs("span",{className:"text-[9px] text-gray-500",children:["(",M," cols)"]}),!R&&P&&!I&&o.jsx("span",{className:"text-[9px] text-gray-500",children:"(mapped)"})]}),I&&o.jsx($n,{className:"w-3 h-3 text-accent"})]},O.field)})]}),x.length>0&&o.jsxs("div",{className:"px-3 py-2 border-b border-white/5",children:[o.jsx("p",{className:"text-[10px] font-medium text-gray-400 uppercase tracking-wider mb-1",children:"Optional"}),x.map((O,A)=>{const P=w(O.field),I=S(O.field),R=O.multiSelect,M=R&&Array.isArray(t[O.field])?t[O.field].length:0,L=u===m.length+A;return o.jsxs("button",{onClick:()=>k(O.field),className:`w-full text-left px-2 py-1.5 rounded text-xs transition-colors duration-150 flex items-center justify-between ${I?"bg-accent/20 text-accent":P?"bg-gray-800/30 text-gray-500 hover:bg-gray-800/50":"text-gray-300 hover:bg-gray-800/50"} ${L?"ring-1 ring-accent/50":""}`,children:[o.jsxs("span",{className:"flex items-center gap-2",children:[O.label,R&&o.jsx("span",{className:"text-[9px] px-1.5 py-0.5 bg-purple-500/20 text-purple-400 rounded",children:"multi"}),R&&M>0&&!I&&o.jsxs("span",{className:"text-[9px] text-gray-500",children:["(",M," cols)"]}
981),!R&&P&&!I&&o.jsx("span",{className:"text-[9px] text-gray-500",children:"(mapped)"})]}),I&&o.jsx($n,{className:"w-3 h-3 text-accent"})]},O.field)})]}),o.jsx("div",{className:"px-3 py-2",children:o.jsxs("button",{onClick:E,className:`w-full text-left px-2 py-1.5 rounded text-xs text-gray-400 hover:bg-red-500/10 hover:text-red-400 transition-colors duration-150 flex items-center gap-2 ${u===y.length-1?"ring-1 ring-accent/50":""}`,children:[o.jsx(Ir,{className:"w-3 h-3"}),"Clear Mapping"]})})]})]});return Ld.createPortal(T,document.body)};cX.propTypes={fields:Q.arrayOf(Q.shape({field:Q.string.isRequired,label:Q.string.isRequired,required:Q.bool})).isRequired,mapping:Q.object.isRequired,columnIndex:Q.number.isRequired,onSelect:Q.func.isRequired,onClose:Q.func.isRequired,triggerRef:Q.shape({current:Q.object}),triggerColumnIndex:Q.number.isRequired};const lNe=e=>{if(!e)return"";const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,r=>t[r])},cNe=e=>{if(typeof e!="number"||e<25569||e>73050)return null;const t=Ct(e,"compact");return t!=="N/A"?t:null},uX=({rawFileData:e,headerRow:t,dataStartRow:r,mapping:n={},fieldDefinitions:a=[],hoveredColumn:i=null,onColumnHover:s=()=>{},onFileUploaded:l=()=>{},onClearFile:c=null,onError:u=()=>{},onHeaderRowChange:d=()=>{},onDataStartRowChange:f=()=>{},onMappingChange:p=()=>{},onAutoMap:m=()=>{},onPresetSelected:x=()=>{},propertyName:y="",reportType:v="rent-roll",maxFiles:b=1,onMultipleFiles:w=null})=>{const[S,j]=N.useState(null),k=N.useRef({}),[E,T]=N.useState([]),[O,A]=N.useState(!1),[P,I]=N.useState(null),[R,M]=N.useState(!1),L=N.useCallback(async()=>{if(!v){T([]);return}A(!0);try{const ce=await Mi.getPresets(v);T(ce)}catch(ce){console.error("Error loading presets:",ce)}finally{A(!1)}},[v]);N.useEffect(()=>{L()},[L]);const U=N.useMemo(()=>{const ce={};return Object.entries(n).forEach(([q,xe])=>{const pe=a.find(Se=>
981Se.field===q);pe&&(Array.isArray(xe)?xe.forEach(Se=>{ce[Se]={field:pe.field,label:pe.label,required:pe.required,multiSelect:!0}}):typeof xe=="number"&&xe!==sn.NOT_AVAILABLE&&(ce[xe]={field:pe.field,label:pe.label,required:pe.required,multiSelect:!1}))}),ce},[n,a]),W=N.useMemo(()=>!e||t===null||t>=e.length?[]:e[t]||[],[e,t]),V=t!==null&&r!==null&&t<r,G=N.useCallback(()=>{if(!V||W.length===0)return;const ce=w1(W,v);Object.keys(ce).length>0&&m(ce)},[W,v,V,m]),K=N.useMemo(()=>{var ke,Oe;if(!e||e.length===0)return{rows:[],rowIndices:[],columnCount:0,hasMoreRows:!1,hiddenRowsAbove:0};const ce=20,q=t??0,xe=((ke=e[q])==null?void 0:ke.length)||((Oe=e[0])==null?void 0:Oe.length)||0,pe=q,Se=Math.min(pe+ce,e.length),he=e.slice(pe,Se),ie=Array.from({length:he.length},(Ue,Je)=>pe+Je),we=e.length>Se;return{rows:he,rowIndices:ie,columnCount:xe,hasMoreRows:we,totalRows:e.length,totalColumns:xe,hiddenRowsAbove:q,remainingRows:e.length-Se}},[e,t]),F=ce=>{l(ce.rawData,ce.file)},ne=ce=>{t===null?d(ce):r===null&&ce>t?f(ce):r!==null&&ce===t?(d(null),f(null)):r!==null&&ce===r?f(null):ce>t&&f(ce)},H=ce=>{j(ce)},B=(ce,q,xe)=>{if(q===""||q===void 0){p({[ce]:void 0});return}if(q===sn.NOT_AVAILABLE){p({[ce]:sn.NOT_AVAILABLE});return}const pe={[ce]:q},Se=Array.isArray(q)?q:[typeof q=="number"?q:parseInt(q,10)];Array.isArray(q)||(pe[ce]=Se[0]),Object.entries(n).forEach(([he,ie])=>{if(he!==ce)if(Array.isArray(ie)){const we=ie.filter(ke=>!Se.includes(ke));we.length!==ie.length&&(pe[he]=we.length>0?we:void 0)}else typeof ie=="number"&&Se.includes(ie)&&(pe[he]=void 0)}),p(pe)},X=ce=>{const q=parseInt(ce.target.value,10);if(!q){I(null);return}const xe=E.find(pe=>pe.id===q);xe&&(I(q),x(xe))},Y=ce=>t===null?"Click to mark this as your column names row":r===null&&ce>t?"Click to mark this as the first record row":ce===t?"Click to reset row selection":ce===r?"Click to reset first record selection":ce>t?"Click to change the first record row":"",fe=t===null?1:r===null?2:a.filter(xe=>xe.required).every(xe=>{const pe=n[xe.field];return pe!==void 0&&pe!==""&&pe!==sn.NOT_AVAILABLE})?4:3,ue=()=>{d(null),f(null);const ce={};Object.keys(n).forEach(q=>{ce[q]=void 0}),Object.keys(ce).length>0&&p(ce),I(null)},oe=N.useCallback((ce,q)=>{(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),ne(q))},[ne]),Z=N.useCallback((ce,q)=>{(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),H(q))},[]);if(!e||e.length===0){const ce=y?`Upload your ${v==="rent-roll"?"Rent Roll":"P&L Statement"} for ${y}`:`Upload your ${v==="rent-roll"?"Rent Roll":"P&L Statement"}`;return o.jsxs("div",{className:"glass-card p-6",children:[o.jsx("h3",{className:"text-lg font-semibold mb-4 bg-gradient-to-r from-white to-gray-300 bg-clip-text text-transparent",children:"Interactive Preview"}),o.jsx("div",{className:"mb-3 text-center text-sm text-gray-400",children:ce}),o.jsx(YY,{onFileProcessed:F,onError:u,maxFiles:b,onMultipleFiles:w})]})}return o.jsxs("div",{className:"glass-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("h3",{className:"text-lg font-semibold bg-gradient-to-r from-white to-gray-300 bg-clip-text text-transparent",children:"Interactive Preview"}),E.length>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uc,{className:"w-4 h-4 text-gray-400"}),o.jsxs("select",{value:P||"",onChange:X,className:"text-xs bg-card/50 border border-white/20 rounded px-2 py-1 text-gray-300 focus:border-accent focus:outline-none focus:ring-1 focus:ring-accent/20",children:[o.jsx("option",{value:"",children:"Load Preset..."}),E.map(ce=>o.jsx("option",{value:ce.id,children:ce.preset_name},ce.id))]}),o.jsxs("button",{onClick:()=>M(!0),className:"flex items-center gap-1 px-2 py-1 text-xs font-medium bg-gray-700/50 hover:bg-gray-700/70 border border-white/10 hover:border-white/20 rounded text-gray-300 hover:text-white transition-all duration-200",title:"Manage saved presets",children:[o.jsx(uc,{className:"w-3 h-3"}),"Manage Presets"]})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-xs text-gray-500",children:[K.totalRows," rows à ",K.totalColumns," columns"]}),V&&o.jsxs("button",{onClick:G,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-accent/10 hover:bg-accent/20 border border-accent/30 hover:border-accent/50 rounded-lg text-accent transition-all duration-200",title:"Automatically map columns based on header names",children:[o.jsx(TV,{className:"w-3.5 h-3.5"}),"Auto-Map"]}),c&&o.jsxs("button",{onClick:c,className:"flex items-center gap-1 px-2 py-1 text-xs text-gray-400 hover:text-red-400 hover:bg-red-500/10 border border-white/10 hover:border-red-500/30 rounded transition-all duration-150",title:"Remove uploaded file","aria-label":"Remove uploaded file and clear configuration",children:[o.jsx(Ir,{className:"w-3.5 h-3.5"}),"Clear"]})]})]}),o.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[o.jsxs("div",{className:`flex-1 p-3 rounded-lg text-xs border ${fe===4?"bg-green-500/10 border-green-500/30 text-green-400":"bg-accent/10 border-accent/30 text-accent"}`,children:[fe===1&&o.jsxs("span",{children:[o.jsx("strong",{children:"Step 1:"})," ð Click the row that contains your column names",o.jsx("span",{className:"block mt-1 text-[10px] text-gray-400",children:v==="rent-roll"?'Look for c
981olumn names like "Unit", "Tenant", "Rent", "Lease End"':'Look for column names like "Category", "Jan 2025", "Feb 2025", "Total"'})]}),fe===2&&o.jsxs("span",{children:[o.jsx("strong",{children:"Step 2:"})," ð Click the first row of actual records",o.jsx("span",{className:"block mt-1 text-[10px] text-gray-400",children:v==="rent-roll"?"This is usually the first tenant or unit entry":"This is usually the first revenue or expense line item"})]}),fe===3&&o.jsxs("span",{children:[o.jsx("strong",{children:"Step 3:"})," ð Tell us which column is which by clicking the column headers below"]}),fe===4&&o.jsxs("span",{children:[o.jsx("strong",{children:"â Ready:"})," Configuration complete â review your mappings and process the report"]})]}),(t!==null||r!==null||Object.keys(n).length>0)&&o.jsxs("button",{onClick:ue,className:"flex items-center gap-1.5 px-3 py-2 text-xs text-gray-400 hover:text-red-400 hover:bg-red-500/10 border border-white/10 hover:border-red-500/30 rounded-lg transition-all duration-150",title:"Reset all configuration",children:[o.jsx(EV,{className:"w-3.5 h-3.5"}),"Reset"]})]}),o.jsx("div",{className:"overflow-auto rounded-lg border border-white/10 max-h-[600px]",children:o.jsxs("table",{className:"min-w-full divide-y divide-white/10",children:[o.jsx("thead",{className:"bg-gray-800/50 sticky top-0 z-10",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-3 py-3 text-left text-xs font-medium text-accent uppercase tracking-wider sticky left-0 bg-gray-800/50 z-20",children:"Row"}),Array.from({length:K.columnCount}).map((ce,q)=>{const xe=U[q],pe=i===q,Se=S===q,he=fe===3&&!xe;return o.jsx("th",{ref:ie=>{k.current[q]=ie},role:"button",tabIndex:0,"aria-haspopup":"listbox","aria-expanded":Se,"aria-label":`Column ${q+1}${xe?`, mapped to ${xe.label}`:", click to assign this column"}`,onClick:()=>H(q),onKeyDown:ie=>Z(ie,q),className:`px-3 py-2 text-left text-xs font-medium whitespace-nowrap transition-all duration-150 cursor-pointer ${pe?"text-cyan-300 bg-cyan-500/30":xe?"text-cyan-400 bg-cyan-500/10":he?"text-amber-400 bg-amber-500/10 animate-pulse":"text-gray-400"} hover:bg-accent/10 focus:outline-none focus:ring-2 focus:ring-accent/50`,onMouseEnter:()=>s(q),onMouseLeave:()=>s(null),title:xe?`Mapped to: ${xe.label}`:"Click to assign this column",children:o.jsxs("span",{className:"flex items-center gap-1",children:[xe?o.jsxs(o.Fragment,{children:[xe.label,xe.required&&o.jsx("span",{className:"text-amber-400",children:"*"})]}):o.jsx("span",{className:"italic",children:"Unmapped"}),o.jsx(kr,{className:"w-3 h-3 opacity-50"})]})},q)})]})}),o.jsx("tbody",{className:"bg-gray-900/30 divide-y divide-white/10",children:K.rows.map((ce,q)=>{const xe=K.rowIndices[q],pe=t!==null&&xe===t,Se=r!==null&&xe===r,he=Y(xe),ie=he!=="";return o.jsxs("tr",{role:ie?"button":void 0,tabIndex:ie?0:void 0,"aria-label":ie?`Row ${xe+1}, ${he}`:void 0,onClick:()=>ie&&ne(xe),onKeyDown:ie?we=>oe(we,xe):void 0,className:`transition-all duration-200 ${pe?"bg-accent/10 border-l-4 border-l-accent shadow-[0_0_15px_rgba(245,158,11,0.1)]":Se?"bg-green-500/10 border-l-4 border-l-green-500 shadow-[0_0_15px_rgba(34,197,94,0.1)]":ie?"hover:bg-gray-800/30 cursor-pointer focus:outline-none focus:ring-2 focus:ring-accent/50":"hover:bg-gray-800/30"}`,title:he,children:[o.jsxs("td",{className:`px-3 py-2 text-xs whitespace-nowrap font-medium sticky left-0 ${pe?"text-accent bg-accent/10":Se?"text-green-400 bg-green-500/10":"text-gray-400 bg-gray-900/30"}`,children:[xe+1,pe&&o.jsx("span",{className:"ml-2 text-[10px] text-accent/70",children:"(column names)"}),Se&&o.jsx("span",{className:"ml-2 text-[10px] text-green-400/70",children:"(first record)"})]}),ce.map((we,ke)=>{const Oe=cNe(we),Ue=lNe(Oe||(we==null?void 0:we.toString())||""),Je=i===ke;return o.jsx("td",{className:`px-3 py-2 text-xs whitespace-nowrap overflow-hidden text-ellipsis transition-all duration-150 ${Je?"bg-cyan-500/20 text-cyan-300":pe?"text-gray-200 font-medium":Se?"text-gray-200":"text-gray-400"}`,style:{maxWidth:"150px"},title:Ue,onMouseEnter:()=>s(ke),onMouseLeave:()=>s(null),children:Ue},ke)})]},xe)})})]})}),K.hasMoreRows&&o.jsxs("div",{className:"mt-2 text-center text-xs text-gray-500",children:["... ",K.remainingRows," more rows"]}),K.hiddenRowsAbove>0&&o.jsxs("div",{className:"mt-2 text-center text-xs text-gray-500",children:[K.hiddenRowsAbove," row",K.hiddenRowsAbove>1?"s":""," above header not shown"]}),o.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-4 text-xs text-gray-500",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-3 h-3 bg-accent/30 border-l-4 border-l-accent rounded-sm"}),o.jsx("span",{children:"Column Names"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-3 h-3 bg-green-500/30 border-l-4 border-l-green-500 rounded-sm"}),o.jsx("span",{children:"First Record"})]}),a.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-3 h-3 bg-cyan-500/10 rounded-sm border border-cyan-500/30"}),o.jsx("span",{className:"text-cyan-400",children:"Mapped Column"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-3 h-3 bg-gray-800/50 rounded-sm border border-white/10"}),o.jsx("span",{className:"italic text-gray-400",children:"Unmapped"})]})]})]}),S!==null&&k.current[S]&&o.jsx(cX,{fields:a,mapping:n,columnIndex:S,onSelect:B,onClose:()=>j(null),triggerRef:k,triggerColumnIndex:S}),R&&o.jsx(M4,{isOpen:R,onClose:()=>{M(!1),L()}})]})};uX.propTypes={rawFileData:Q.arrayOf(Q.array),headerRow:Q.number,dataStartRow:Q.number,mapping:Q.object,fieldDefinitions:Q.arrayOf(Q.shape({field:Q.string.isRequired,label:Q.string.isRequired,required:Q.bool})),hoveredColumn:Q.number,onColumnHover:Q.func,onFileUploaded:Q.func,onClearFile:Q.func,onError:Q.func,onHeaderRowChange:Q.func,onDataStartRowChange:Q.func,onMappingChange:Q.func,onPresetSelected:Q.func,propertyName:Q.string,reportType:Q.oneOf(["rent-roll","pl"])};const $$=[{value:0,label:"Jan"},{value:1,label:"Feb"},{value:2,label:"Mar"},{value:3,label:"Apr"},{value:4,label:"May"},{value:5,label:"Jun"},{value:6,label:"Jul"},{value:7,label:"Aug"},{value:8,label:"Sep"},{value:9,label:"Oct"},{value:10,label:"Nov"},{value:11,label:"Dec"}],B$=(e,t)=>
981new Date(e,t+1,0).getDate(),uNe=()=>{const e=new Date().getFullYear(),t=[];for(let r=e-5;r<=e;r++)t.push(r);return t},D4=({value:e={start:null,end:null},onChange:t,onPresetSelect:r,disabled:n=!1})=>{const[a,i]=N.useState("t12"),[s,l]=N.useState(!1),c=new Date,[u,d]=N.useState(c.getMonth()),[f,p]=N.useState(c.getFullYear()),[m,x]=N.useState(c.getMonth()),[y,v]=N.useState(c.getFullYear()),b=N.useRef(!1),w=uNe(),S=M=>{const L=new Date,U=L.getFullYear(),W=L.getMonth(),V=B$(U,W),G=String(W+1).padStart(2,"0"),K=`${U}-${G}-${String(V).padStart(2,"0")}`;let F;switch(M){case"t12":{const ne=new Date(U,W-11,1),H=ne.getFullYear(),B=String(ne.getMonth()+1).padStart(2,"0");F=`${H}-${B}-01`;break}case"ytd":F=`${U}-01-01`;break;case"t3":{const ne=new Date(U,W-2,1),H=ne.getFullYear(),B=String(ne.getMonth()+1).padStart(2,"0");F=`${H}-${B}-01`;break}case"custom":return null;default:return null}return{start:F,end:K}},j=M=>{if(i(M),M==="custom"){if(l(!0),!b.current){if(e.start){const L=new Date(e.start);d(L.getMonth()),p(L.getFullYear())}if(e.end){const L=new Date(e.end);x(L.getMonth()),v(L.getFullYear())}b.current=!0}}else{l(!1),b.current=!1;const L=S(M);L&&t&&t(L),r&&r(M,L)}},k=(M,L,U,W)=>{const G=String(M+1).padStart(2,"0"),K=`${L}-${G}-01`,F=B$(W,U),ne=String(U+1).padStart(2,"0"),H=`${W}-${ne}-${String(F).padStart(2,"0")}`;return{start:K,end:H}},E=M=>{d(M)},T=M=>{p(M)},O=M=>{x(M)},A=M=>{v(M)},P=()=>{const M=k(u,f,m,y);t&&t(M),r&&r("custom",M),l(!1)};N.useEffect(()=>{if(!e.start&&!e.end){const M=S("t12");M&&t&&(t(M),r&&r("t12",M))}},[]);const I=[{id:"t12",label:"T12",tooltip:"Trailing 12 Months"},{id:"ytd",label:"YTD",tooltip:"Year to Date"},{id:"t3",label:"T3",tooltip:"Trailing 3 Months"},{id:"custom",label:"Custom",tooltip:"Custom Date Range"}],R=` 982 bg-transparent text-white text-sm 983 focus:outline-none focus:ring-2 focus:ring-accent rounded 984 px-2 py-1 cursor-pointer 985 appearance-none 986 bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%239ca3af%22%20d%3D%22M2%204l4%204%204-4%22%2F%3E%3C%2Fsvg%3E')] 987 bg-no-repeat bg-[right_0.5rem_center] 988 pr-6 989 `;return o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx("div",{className:"flex space-x-1 bg-card/50 rounded-lg p-1 border border-white/20",children:I.map(M=>o.jsx("button",{onClick:()=>j(M.id),disabled:n,title:M.tooltip,className:` 990 px-3 py-1.5 text-sm font-medium rounded-md transition-all duration-200 991 ${a===M.id?"bg-accent text-primary shadow-sm":"text-gray-400 hover:text-white hover:bg-white/5"} 992 ${n?"opacity-50 cursor-not-allowed":""} 993 `,children:M.label},M.id))}),s&&o.jsxs("div",{className:"flex flex-wrap items-center gap-2 bg-card/50 rounded-lg px-3 py-2 border border-white/20 animate-fade-in",children:[o.jsx(_u,{className:"h-4 w-4 text-gray-400 flex-shrink-0"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("select",{value:u,onChange:M=>E(Number(M.target.value)),disabled:n,className:R,"aria-label":"Start month",children:$$.map(M=>o.jsx("option",{value:M.value,className:"bg-gray-900",children:M.label},M.value))}),o.jsx("select",{value:f,onChange:M=>T(Number(M.target.value)),disabled:n,className:R,"aria-label":"Start year",children:w.map(M=>o.jsx("option",{value:M,className:"bg-gray-900",children:M},M))})]}),o.jsx("span",{className:"text-gray-400 text-sm",children:"to"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("select",{value:m,onChange:M=>O(Number(M.target.value)),disabled:n,className:R,"aria-label":"End month",children:$$.map(M=>o.jsx("option",{value:M.value,className:"bg-gray-900",children:M.label},M.value))}),o.jsx("select",{value:y,onChange:M=>A(Number(M.target.value)),disabled:n,className:R,"aria-label":"End year",children:w.map(M=>o.jsx("option",{value:M,className:"bg-gray-900",children:M},M))})]}),o.jsx(rt,{variant:"primary",size:"sm",onClick:P,disabled:n,icon:$n,className:"ml-1",children:"Apply"})]}),!s&&e.start&&e.end&&o.jsxs("div",{className:"text-xs text-gray-400 ml-2",children:[Ct(e.start,"compact")," - ",Ct
993(e.end,"compact")]})]})},w_=[{value:"rent-roll",label:"Rent Roll",description:"Tenant and lease information",icon:Sn},{value:"pl",label:"P&L",description:"Financial performance",icon:Sn}],dNe=w_.map(e=>e.value),dX=({propertyName:e,reportType:t,startDate:r,endDate:n,onPropertyChange:a,onReportTypeChange:i,onStartDateChange:s,onEndDateChange:l,onAddProperty:c,disabled:u=!1})=>{const[d,f]=N.useState([]),[p,m]=N.useState(!0),[x,y]=N.useState(null);N.useEffect(()=>{(async()=>{try{m(!0),y(null);const S=await na.getPropertyNames();f(S)}catch(S){console.error("Failed to fetch property names:",S),y("Unable to load properties")}finally{m(!1)}})()},[]);const v=w=>{const S=w.target.value;S==="__ADD_NEW__"?c():a(S)},b=w=>{s(w.start),l(w.end)};return o.jsxs("div",{className:"space-y-4",children:[x&&o.jsx("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg text-sm text-red-400",children:x}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[o.jsxs("div",{children:[o.jsxs("label",{htmlFor:"property-select",className:"block text-xs font-medium text-gray-400 mb-1.5",children:[o.jsx(uC,{className:"w-3 h-3 inline mr-1 text-accent"}),"Property ",o.jsx("span",{className:"text-red-400",children:"*"})]}),o.jsxs("select",{id:"property-select","aria-label":"Select property",value:e,onChange:v,disabled:u||p,className:"block w-full rounded-lg bg-card/50 backdrop-blur-sm border border-white/20 px-3 py-2 text-sm text-gray-200 placeholder-gray-500 focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/20 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx("option",{value:"",children:p?"Loading...":"Select property"}),d.map(w=>o.jsx("option",{value:w,children:w},w)),o.jsx("option",{value:"__ADD_NEW__",className:"text-accent font-medium",children:"+ Add New Property"})]})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-xs font-medium text-gray-400 mb-1.5",children:[o.jsx(Sn,{className:"w-3 h-3 inline mr-1 text-accent"}),"Report Type ",o.jsx("span",{className:"text-red-400",children:"*"})]}),o.jsx("div",{className:"flex gap-2",children:w_.map(w=>o.jsx("button",{type:"button",onClick:()=>i(w.value),disabled:u,className:`flex-1 px-3 py-2 text-sm rounded-lg border transition-all duration-200 ${t===w.value?"bg-accent/10 border-accent text-accent font-medium":"bg-card/30 border-white/20 text-gray-400 hover:bg-card/50 hover:border-white/30"} ${u?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:w.label},w.value))})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-xs font-medium text-gray-400 mb-1.5",children:[o.jsx(_u,{className:"w-3 h-3 inline mr-1 text-accent"}),t==="rent-roll"?"As of Date":"Date Range"," ",o.jsx("span",{className:"text-red-400",children:"*"})]}),t==="rent-roll"?o.jsx("input",{type:"date",value:r||"",onChange:w=>s(w.target.value),disabled:u,className:"block w-full rounded-lg bg-card/50 backdrop-blur-sm border border-white/20 px-3 py-2 text-sm text-gray-200 focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/20 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed"}):o.jsx("div",{className:"bg-card/30 rounded-lg px-3 py-2 border border-white/10",children:o.jsx(D4,{value:{start:r,end:n},onChange:b,disabled:u})})]})]})]})};dX.propTypes={propertyName:Q.string,reportType:Q.oneOf(dNe),startDate:Q.string,endDate:Q.string,onPropertyChange:Q.func.isRequired,onReportTypeChange:Q.func.isRequired,onStartDateChange:Q.func.isRequired,onEndDateChange:Q.func.isRequired,onAddProperty:Q.func.isRequired,disabled:Q.bool};const fX=({mapping:e,fieldDefinitions:t,onFieldClick:r=()=>{},hoveredField:n=null})=>{const a=p=>{const m=e[p];return Array.isArray(m)?m.length>0:m!==void 0&&m!==""&&m!==sn.NOT_AVAILABLE},i=p=>{const m=e[p];return Array.isArray(m)?m:typeof m=="number"?[m]:[]},s=p=>p.multiSelect===!0,l=t.filter(p=>p.required),c=t.filter(p=>!p.required),u=l.filter(p=>a(p.field)).length,d=c.filter(p=>a(p.field)).length,f=({field:p})=>{const m=a(p.field),x=i(p.field),y=s(p),v=x.length>0&&x.includes(n),b=x.length>0?x[0]:null,w=()=>x.length===0?null:x.length===1?`Col ${x[0]+1}`:`${x.length} cols`,S=()=>
993{if(!m)return p.required?`${p.label} (required - not mapped)`:`${p.label} (optional - not mapped)`;if(x.length===1)return`${p.label} â Col ${x[0]+1} (click to highlight)`;const j=x.map(k=>k+1).join(", ");return`${p.label} â Columns ${j} (click to highlight first)`};return o.jsxs("button",{onClick:()=>b!==null&&r(b),onMouseEnter:()=>b!==null&&r(b),onMouseLeave:()=>r(null),disabled:!m,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 ${v?"bg-cyan-500/30 border-cyan-500/50 text-cyan-300 shadow-[0_0_8px_rgba(6,182,212,0.3)]":m?y?"bg-purple-500/10 border-purple-500/30 text-purple-400 hover:bg-purple-500/20":"bg-green-500/10 border-green-500/30 text-green-400 hover:bg-green-500/20":p.required?"bg-amber-500/10 border-amber-500/30 text-amber-400":"bg-gray-800/30 border-white/10 text-gray-500"} border ${m?"cursor-pointer":"cursor-default"}`,title:S(),children:[m?o.jsx($n,{className:"w-3 h-3"}):p.required?o.jsx(Jr,{className:"w-3 h-3"}):o.jsx(wR,{className:"w-3 h-3"}),o.jsx("span",{className:"truncate",children:p.label}),y&&o.jsx("span",{className:"text-[9px] px-1 py-0.5 bg-purple-500/20 rounded",children:"multi"}),m&&o.jsx("span",{className:"text-[10px] opacity-70",children:w()})]})};return o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between text-xs",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs("span",{className:"text-gray-400",children:["Required: ",o.jsx("span",{className:"text-green-400 font-medium",children:u}),o.jsxs("span",{className:"text-gray-500",children:["/",l.length]})]}),o.jsxs("span",{className:"text-gray-400",children:["Optional: ",o.jsx("span",{className:"text-green-400 font-medium",children:d}),o.jsxs("span",{className:"text-gray-500",children:["/",c.length]})]})]}),o.jsx("span",{className:"text-gray-500",children:"Click chips to highlight columns"})]}),l.length>0&&o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("span",{className:"text-[10px] font-medium text-amber-400 uppercase tracking-wider",children:"Required"})}),o.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(p=>o.jsx(f,{field:p},p.field))})]}),c.length>0&&o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("span",{className:"text-[10px] font-medium text-gray-400 uppercase tracking-wider",children:"Optional"})}),o.jsx("div",{className:"flex flex-wrap gap-2",children:c.map(p=>o.jsx(f,{field:p},p.field))})]}),u===0&&d===0&&o.jsxs("div",{className:"flex items-center justify-center gap-2 py-4 text-sm text-gray-500",children:[o.jsx(Jr,{className:"w-4 h-4"}),o.jsx("span",{children:"No fields mapped yet. Click column headers in the preview to map fields."})]})]})};fX.propTypes={mapping:Q.object.isRequired,fieldDefinitions:Q.arrayOf(Q.shape({field:Q.string.isRequired,label:Q.string.isRequired,required:Q.bool})).isRequired,onFieldClick:Q.func,hoveredField:Q.number};const fNe=({reportType:e,headers:t,mapping:r,onMappingChange:n,onAutoMap:a,disabled:i=!1,locked:s=!1,hoveredColumn:l=null,onColumnHover:c=()=>{}})=>{const u=Y0(e);N.useEffect(()=>{if(s||!t||t.length===0||r&&Object.keys(r).length>0)return;const w=w1(t,e);Object.keys(w).length>0&&a(w)},[t,e,s,a]);const d=(w,S)=>{S===""?n({[w]:void 0}):S===sn.NOT_AVAILABLE?n({[w]:sn.NOT_AVAILABLE}):n({[w]:parseInt(S,10)})},f=()=>{const w=w1(t,e);a(w)},p=w=>{const S=r[w];return S===sn.NOT_AVAILABLE?sn.NOT_AVAILABLE:typeof S=="number"?S.toString():""},m=w=>{const S=r[w];return S!==void 0&&S!==""&&S!==sn.NOT_AVAILABLE},x=u.filter(w=>w.required),y=u.filter(w=>!w.required),v=x.filter(w=>m(w.field)).length,b=y.filter(w=>m(w.field)).length;return o.jsxs(o.Fragment,{children:[i&&o.jsxs("div",{className:"flex items-center gap-3 p-4 bg-gray-800/30 rounded-lg border border-white/10",children:[o.jsx(Jr,{className:"w-5 h-5 text-gray-500 flex-shrink-0"}),o.jsx("p",{className:"text-sm text-gray-500",children:"Upload a file to configure column mapping"})]}),!i&&s&&o.jsxs("div",{className:"flex items-center gap-3 p-4 bg-amber-500/10 rounded-lg border border-amber-500/20",children:[o.jsx(Jr,{className:"w-5 h-5 text-amber-400 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-amber-400 font-medium",children:"Set Row Configuration First"}),o.jsx("p",{className:"text-xs text-amber-400/70 mt-1",children:"Please set the Header Row and Data Start Row in the section above before mapping columns."})]})]}),!i&&!s&&t.length===0&&o.jsxs("div",{className:"flex items-center gap-3 p-4 bg-gray-800/30 rounded-lg border border-white/10",children:[o.jsx(Jr,{className:"w-5 h-5 text-gray-500 flex-shrink-0"}),o.jsx("p",{className:"text-sm text-gray-500",children:"No headers found in the selected header row"})]}),!i&&!s&&t.length>0&&o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"flex justify-end",children:o.jsxs("button",{onClick:f,className:"flex items-center gap-2 px-3 py-1.5 text-sm bg-accent/10 hover:bg-accent/20 border border-accent/30 rounded-lg text-accent transition-all duration-200",children:[o.jsx(TV,{className:"w-4 h-4"}),"Auto-Map"]})}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h4",{className:"text-sm font-medium text-gray-300 flex items-center gap-2",children:["Required Fields",o.jsxs("span",{className:"text-xs text-gray-500",children:["(",v,"/",x.length," mapped)"]})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:x.map(w=>o.jsx(U$,{field:w,headers:t,value:p(w.field),onChange:S=>d(w.field,S),isMapped:m(w.field),hoveredColumn:l,onColumnHover:c},w.field))})]}),o.jsx("div",{className:"border-t border-white/10"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h4",{className:"text-sm font-medium text-gray-300 flex items-center gap-2",children:["Optional Fields",o.jsxs("span",{className:"text-xs text-gray-500",children:["(",b,"/",y.length," mapped)"]})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:y.map(w=>o.jsx(U$,{field:w,headers:t,value:p(w.field),onChange:S=>d(w.field,S),isMapped:m(w.field),hoveredColumn:l,onColumnHover:c},w.field))})]})]})]})}
993,U$=({field:e,headers:t,value:r,onChange:n,isMapped:a,hoveredColumn:i,onColumnHover:s})=>{const l=r!==""&&r!==sn.NOT_AVAILABLE?parseInt(r,10):null,c=l!==null&&i===l;return o.jsxs("div",{className:`p-3 rounded-lg border transition-all duration-200 ${c?"bg-cyan-500/10 border-cyan-500/50 shadow-[0_0_10px_rgba(6,182,212,0.2)]":e.required&&!a?"bg-amber-500/5 border-amber-500/30":a?"bg-green-500/5 border-green-500/20":"bg-gray-800/30 border-white/10"}`,onMouseEnter:()=>l!==null&&s(l),onMouseLeave:()=>s(null),children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("label",{className:"text-sm font-medium text-gray-200 flex items-center gap-2",children:[e.label,e.required&&o.jsx("span",{className:"text-amber-400 text-xs",children:"*"})]}),a?o.jsx($n,{className:"w-4 h-4 text-green-400"}):e.required?o.jsx(Ir,{className:"w-4 h-4 text-amber-400"}):null]}),o.jsxs("select",{value:r,onChange:u=>n(u.target.value),className:`w-full rounded-lg bg-gray-800/50 border px-3 py-2 text-sm transition-all duration-200 ${c?"border-cyan-500/50 text-cyan-300 focus:border-cyan-500 focus:ring-cyan-500/20":a?"border-green-500/30 text-gray-200 focus:border-green-500 focus:ring-green-500/20":"border-white/20 text-gray-400 focus:border-accent focus:ring-accent/20"} focus:outline-none focus:ring-2`,children:[o.jsx("option",{value:"",children:"-- Select Column --"}),t.map((u,d)=>o.jsxs("option",{value:d,children:[(u==null?void 0:u.toString())||`Column ${d+1}`," (Col ",d+1,")"]},d)),o.jsx("option",{value:sn.NOT_AVAILABLE,children:"Not Available in File"})]}),o.jsx("div",{className:"mt-1 text-xs text-gray-500",children:e.type}),(e.field==="leaseStart"||e.field==="moveInDate")&&o.jsx("p",{className:"mt-1 text-xs text-amber-500",children:"Either Lease Start or Move In required"})]})};function hX(e,t){return new Date(e,t+1,0).getDate()}function HC(e,t){const r={1:{start:`${e}-01-01`,end:`${e}-03-31`},2:{start:`${e}-04-01`,end:`${e}-06-30`},3:{start:`${e}-07-01`,end:`${e}-09-30`},4:{start:`${e}-10-01`,end:`${e}-12-31`}};if(!r[t])throw new Error(`Invalid quarter: ${t}`);return r[t]}function _1(e,t){if(t<1||t>12)throw new Error(`Invalid month: ${t}`);const r=new Date(e,t-1,1),n=new Date(e,t,0),a=i=>{const s=i.getFullYear(),l=String(i.getMonth()+1).padStart(2,"0"),c=String(i.getDate()).padStart(2,"0");return`${s}-${l}-${c}`};return{start:a(r),end:a(n)}}const hNe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z$(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(typeof e=="string"?e:"");if(!t)throw new Error(`Invalid date: ${e}`);const r=Number(t[1]),n=Number(t[2]),a=Number(t[3]);if(n<1||n>12||a<1||a>hX(r,n-1))throw new Error(`Invalid date: ${e}`);return{year:r,month:n}}function pX(e,t){const r=z$(e),n=z$(t);if(e>t)throw new Error(`Invalid range: ${e} is after ${t}`);const a=[];let{year:i,month:s}=r;for(;i<n.year||i===n.year&&s<=n.month;)a.push(`${hNe[s-1]} ${i}`),s+=1,s>12&&(s=1,i+=1);return a}typeof On<"u"&&On.exports&&(On.exports={getLastDayOfMonth:hX,getQuarterBounds:HC,getMonthBounds:_1,monthKeysInRange:pX});const S1=20,H$="__ADD_NEW__",qC=w_.map(({value:e,label:t})=>({value:e,label:t})),pNe=["xlsx","xls","csv"],pi={READY:"ready",INCOMPLETE:"incomplete",ERROR:"error"},Nd={PENDING:"pending",UPLOADING:"uploading",DONE:"done",FAILED:"failed"},E1=e=>e?e==="rent-roll"?"date":"range":null,q$=e=>{const t=/\.([^.]+)$/.exec(String(e??""));return t?pNe.includes(t[1].toLowerCase()):!1};function mX(e){return typeof e=="string"?e.trim():e}typeof On<"u"&&On.exports&&(On.exports={normalizePropertyName:mX});const W$=e=>mX(String(e??"")).toLowerCase().replace(/[^a-z0-9]+/g," ").trim().split(" ").filter(Boolean),mNe=e=>String(e??"").replace(/\.[^.]+$/,""),gNe=5,xNe=e=>e.length>=2||e.length===1&&e[0].length>=gNe,yNe=(e,t)=>{if(t.length===0||t.length>e.length)return!1;for(let r=0;r<=e.length-t.length;r+=1){let n=!0;for(let a=0;a<t.length;a+=1)if(e[r+a]!==t[a]){n=!1;break}if(n)return!0}return!1},vNe=(e,t=[])=>{const r=W$(mNe(e));if(r.length===0)return"";const n=[];for(const s of t){const l=W$(s);xNe(l)&&yNe(r,l)&&n.push({name:s,length:l.length})}if(n.length===0)return"";if(n.length===1)return n[0].name;const a=Math.max(...n.map(s=>s.length)),i=n.filter(s=>s.length===a);return i.length===1?i[0].name:""},gX=e=>E1(e.reportType)==="date"?!!e.periodStart:!!(e.periodStart&&e.periodEnd),bNe=e=>e.unsupported?pi.ERROR:!e.property||!e.reportType||!gX(e)||!e.presetId?pi.INCOMPLETE:pi.READY,wNe=(e,t)=>`${t}::${e.name}::${e.lastModified??0}`,_Ne=(e,t,r)=>({id:wNe(e,t),file:e,fileName:e.name,unsupported:!q$(e.name),property:q$(e.name)?vNe(e.name,r):"",reportType:"",periodStart:"",periodEnd:"",presetId:""}),V$=(e,t)=>
993e.map((r,n)=>_Ne(r,n,t)),WC=(e,t)=>({...e,reportType:t,periodStart:"",periodEnd:"",presetId:""}),SNe=({files:e=[],properties:t=[],presets:r=[]})=>{const n=N.useMemo(()=>e.slice(0,S1),[e]),a=Math.max(0,e.length-S1),i=N.useMemo(()=>n.map(j=>`${j.name}::${j.size}::${j.lastModified}`).join("|"),[n]),[s,l]=N.useState(()=>V$(n,t)),c=N.useRef(i);N.useEffect(()=>{c.current!==i&&(c.current=i,l(V$(n,t)))},[i,n,t]);const u=N.useCallback((j,k)=>{l(E=>E.map(T=>T.id===j?{...T,...typeof k=="function"?k(T):k}:T))},[]),d=N.useCallback((j,k)=>u(j,{property:k}),[u]),f=N.useCallback((j,k)=>u(j,E=>WC(E,k)),[u]),p=N.useCallback((j,k)=>u(j,{periodStart:k}),[u]),m=N.useCallback((j,k)=>u(j,{periodEnd:k}),[u]),x=N.useCallback((j,k)=>u(j,{presetId:k}),[u]),y=N.useCallback(j=>{l(k=>k.filter(E=>E.id!==j))},[]),v=N.useCallback(({reportType:j,periodStart:k,periodEnd:E,presetId:T}={})=>{const O=r.find(A=>String(A.id)===String(T));l(A=>A.map(P=>{if(P.unsupported)return P;let I=j?WC(P,j):P;return k&&I.reportType&&(I={...I,periodStart:k}),E&&E1(I.reportType)==="range"&&(I={...I,periodEnd:E}),O&&O.report_type===I.reportType&&(I={...I,presetId:String(O.id)}),I}))},[r]),b=N.useMemo(()=>s.map(j=>({...j,status:bNe(j)})),[s]),w=N.useMemo(()=>b.filter(j=>j.status===pi.READY),[b]),S=N.useMemo(()=>{let j=0,k=0,E=0,T=0,O=0;for(const A of b){if(A.status===pi.ERROR){O+=1;continue}A.status!==pi.READY&&(A.property||(j+=1),A.reportType||(k+=1),gX(A)||(E+=1),A.presetId||(T+=1))}return{ready:w.length,total:b.length,needsProperty:j,needsType:k,needsPeriod:E,needsPreset:T,unsupported:O}},[b,w]);return{rows:b,readyRows:w,summary:S,droppedCount:a,canSubmit:w.length>0,actions:{setProperty:d,setReportType:f,setPeriodStart:p,setPeriodEnd:m,setPreset:x,removeRow:y,applyToAll:v}}},od="[&>label]:hidden w-full",ENe="block text-xs font-medium text-gray-400 mb-1 uppercase tracking-wider",G$={[pi.READY]:"Ready",[pi.INCOMPLETE]:"Incomplete",[pi.ERROR]:"Unsupported"},K$={[pi.READY]:"text-success",[pi.INCOMPLETE]:"text-gray-400",[pi.ERROR]:"text-error"},Y$=(e,t)=>`${e} ${t}${e===1?"":"s"}`,kNe=({needsProperty:e,needsType:t,needsPeriod:r,needsPreset:n,unsupported:a})=>{const i=[];return e&&i.push(`${e} need${e===1?"s":""} a property`),t&&i.push(`${t} need${t===1?"s":""} a type`),r&&i.push(`${r} need${r===1?"s":""} a period`),n&&i.push(`${n} need${n===1?"s":""} a preset`),a&&i.push(`${a} unsupported`),i.join(" · ")},NNe={reportType:"",periodStart:"",periodEnd:"",presetId:""},X$=(e,t)=>{if(!e)return"";const[r,n]=String(e).split("-").map(Number);return _1(r,n)[t]},TNe=({files:e=[],properties:t=[],presets:r=[],onSubmit:n,onAddProperty:a,onCancel:i,isChecking:s=!1})=>{const{rows:l,readyRows:c,summary:u,droppedCount:d,canSubmit:f,actions:p}=SNe({files:e,properties:t,presets:r}),[m,x]=N.useState(NNe),y=A=>P=>x(I=>({...I,[A]:P})),v=Object.values(m).some(Boolean),b=A=>async P=>{if(P===H$){const I=await(a==null?void 0:a(A));I&&p.setProperty(A,I);return}p.setProperty(A,P)},w=[...t.map(A=>({value:A,label:A})),{value:H$,label:"+ Add New Property"}],S=A=>r.filter(P=>P.report_type===A).map(P=>({value:String(P.id),label:P.preset_name})),j=A=>{const P=E1(A.reportType);return P?P==="date"?o.jsx(UC,{isEditing:!0,className:od,"aria-label":`Date for ${A.fileName}`,value:A.periodStart,onChange:I=>p.setPeriodStart(A.id,I)}):o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(I$,{className:od,"aria-label":`Start month for ${A.fileName}`,value:A.periodStart,onChange:I=>p.setPeriodStart(A.id,X$(I,"start"))}),o.jsx("span",{className:"text-gray-600",children:"to"}),o.jsx(I$,{className:od,"aria-label":`End month for ${A.fileName}`,value:A.periodEnd,onChange:I=>p.setPeriodEnd(A.id,X$(I,"end"))})]}):o.jsx("span",{className:"font-sans text-xs text-gray-500",children:"Pick a type first"})},k=()=>{const A=E1(m.reportType);return A?A==="date"?o.jsx("div",{className:"w-44",children:o.jsx(UC,{isEditing:!0,className:od,"aria-label":"Set date for all rows",value:m.periodStart,onChange:y("periodStart")})}):o.jsx(D4,{value:{start:m.periodStart,end:m.periodEnd},onChange:({start:P,end:I})=>x(R=>({...R,periodStart:P,periodEnd:I}))},m.reportType):o.jsx("span",{className:"font-sans text-xs text-gray-500",children:"Pick a type first"})},E=A=>A.status===pi.ERROR?o.jsxs("tr",{className:"bg-error/5",children:[o.jsx("td",{className:"text-gray-300",children:o.jsx("span",{className:"block truncate",title:A.fileName,children:A.fileName})}),o.jsx("td",{colSpan:4,className:"font-sans text-sm text-error",children:o.jsxs("span",{className:"inline-flex items-center gap-2",children:[o.jsx(Bi,{className:"w-4 h-4","aria-hidden":"true"}),"This file type cannot be read. Upload an .xlsx, .xls or .csv export instead."]})}),o.jsx("td",{children:o.jsx("span",{"data-testid":"row-status",className:K$[A.status],children:G$[A.status]})}),o.jsx("td",{className:"text-right",children:o.jsx(rt,{variant:"ghost",size:"sm","aria-label":`Remove ${A.fileName}`,onClick:()=>p.removeRow(A.id),children:o.jsx(Ir,{className:"w-4 h-4","aria-hidden":"true"})})})]},A.id):o.jsxs("tr",{children:[o.jsx("td",{className:"text-gray-300",children:o.jsx("span",{className:"block truncate",title:A.fileName,children:A.fileName})}),o.jsx("td",{children:o.jsx(al,{label:"a property",className:od,"aria-label":`Property for ${A.fileName}`,value:A.property,options:w,onChange:b(A.id)})}),o.jsx("td",{children:o.jsx(al,{label:"a type",className:od,"aria-label":`Report type for ${A.fileName}`,value:A.reportType,options:qC,onChange:P=>p.setReportType(A.id,P)})}),o.jsx("td",{children:j(A)}),o.jsx("td",{children:o.jsx(al,{label:"a preset",className:od,"aria-label":`Preset for ${A.fileName}`,value:A.presetId,disabled:!A.reportType,options:S(A.reportType),onChange:P=>p.setPreset(A.id,P)})}),o.jsx("td",{children:o.jsx("span",{"data-testid":"row-status",className:K$[A.status],children:G$[A.status]})}),o.jsx("td",{className:"text-right",children:o.jsx(rt,{variant:"ghost",size:"sm","aria-label":`Remove ${A.fileName}`,onClick:()=>p.removeRow(A.id),children:o.jsx(Ir,{className:"w-4 h-4","aria-hidden":"true"})})})]},A.id),T=kNe(u),O=o.jsxs("fieldset",{className:"p-4 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20",children:[o.jsx("legend",{className:"float-left w-full mb-1 text-sm font-semibold text-gray-200",children:"Apply to every file"}),o.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"These three are usually the same across a batch. Set them once and press Apply â the property stays per file."}),o.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[o.jsx("div",{className:"w-44",children:o.jsx(al,{label:"Type","aria-label":"Set report type for all rows",value:m.reportType,options:qC,onChange:A=>x(P=>WC(P,A))})}),o.jsxs("div",{children:[o.jsx("span",{className:ENe,children:"Period"}
993),k()]}),o.jsx("div",{className:"w-64",children:o.jsx(al,{label:"Preset","aria-label":"Set preset for all rows",value:m.presetId,disabled:!m.reportType,options:S(m.reportType),onChange:y("presetId")})}),o.jsx(rt,{variant:"secondary",disabled:!v,onClick:()=>p.applyToAll(m),children:"Apply to all files"})]})]});return o.jsxs("div",{className:"space-y-4",children:[d>0&&o.jsxs("p",{"data-testid":"bulk-upload-cap-notice",className:"p-3 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20 text-sm text-gray-300",children:["Showing the first ",S1," files. ",Y$(d,"file")," were not added â upload them in a second batch."]}),l.length===0?o.jsx("p",{className:"p-6 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20 text-sm text-gray-400",children:"No files to configure. Choose some files to get started."}):o.jsxs(o.Fragment,{children:[O,o.jsx("div",{className:"data-table",children:o.jsxs("table",{className:"w-full table-fixed text-sm [&_th]:px-4 [&_td]:px-4","aria-label":"Files to upload",children:[o.jsxs("colgroup",{children:[o.jsx("col",{className:"w-[20%]"}),o.jsx("col",{className:"w-[16%]"}),o.jsx("col",{className:"w-[11%]"}),o.jsx("col",{className:"w-[25%]"}),o.jsx("col",{className:"w-[16%]"}),o.jsx("col",{className:"w-[9%]"}),o.jsx("col",{className:"w-[3%]"})]}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",className:"text-left",children:"File"}),o.jsxs("th",{scope:"col",className:"text-left",children:["Property",o.jsx("span",{className:"block normal-case tracking-normal text-[10px] text-gray-600",children:"per file"})]}),o.jsx("th",{scope:"col",className:"text-left",children:"Type"}),o.jsx("th",{scope:"col",className:"text-left",children:"Period"}),o.jsx("th",{scope:"col",className:"text-left",children:"Preset"}),o.jsx("th",{scope:"col",className:"text-left",children:"Status"}),o.jsx("th",{scope:"col",className:"text-right",children:o.jsx("span",{className:"sr-only",children:"Remove"})})]})}),o.jsx("tbody",{children:l.map(E)})]})})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[o.jsx("p",{"data-testid":"bulk-upload-summary",className:"text-sm text-gray-400",children:T||(l.length>0?"All files are ready to upload.":"")}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(rt,{variant:"secondary",onClick:i,children:"Cancel"}),o.jsx(rt,{variant:"primary",disabled:!f||s,onClick:()=>n==null?void 0:n(c),children:s?"Checkingâ¦":u.ready===0?"Upload files":`Upload ${Y$(u.ready,"file")}`})]})]})]})},J$={PENDING:o.jsx(wR,{className:"w-4 h-4 text-gray-500","aria-hidden":"true"}),RUNNING:o.jsx(ar,{className:"w-4 h-4 text-accent animate-spin","aria-hidden":"true"}),DONE:o.jsx($n,{className:"w-4 h-4 text-success","aria-hidden":"true"}),FAILED:o.jsx(Bi,{className:"w-4 h-4 text-error","aria-hidden":"true"})},xX=({status:e,labels:t,statuses:r=C4,testId:n})=>{const a=Object.keys(J$).find(i=>r[i]===e);return o.jsxs("span",{"data-testid":n,className:"inline-flex items-center gap-2 font-sans",children:[a&&J$[a],a&&t[a]]})},yX=async(e,t,r)=>{const n=await r.extractRawData(e.file);if(!n.success)throw new Error(n.error||`${e.fileName} could not be read.`);const a=n.rawData||[],i=Number.isInteger(t.header_row)?t.header_row:0,s=Number.isInteger(t.data_start_row)?t.data_start_row:i+1,l=a[i]||[],c=a.slice(s);if(c.length===0)throw new Error(`No data rows found below row ${s+1}. The "${t.preset_name}" preset may not fit this file â upload it on its own to set the rows by hand.`);return{headers:l,data:c,mapping:t.column_mappings||{}}},jNe=(e,t="Upload failed.")=>T4(e,t),Q$=(e,t,r)=>(e==null?void 0:e.message)||(e==null?void 0:e.error)||r||`Upload failed (${t}).`,vX=e=>({startDate:e.periodStart,endDate:e.reportType==="rent-roll"?null:e.periodEnd||null}),ANe=async(e,t,r,n)=>{const{startDate:a,endDate:i}=vX(e),s=I4({data:r,headers:t,mapping:n}),{rows:l,invalidMonths:c}=F4(s);if(c.length>0)throw new Error(`Non-month columns mapped as "Monthly Data": ${c.join(", ")}. Upload this file on its own to re-map those columns.`);if(l.length===0)throw new Error("No valid data rows found. Check the file and the presetâs column mapping.");const u=localStorage.getItem("accessToken"),d=await fetch(`${Rg.API_URL}/pl/process`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:u?`Bearer ${u}`:""},body:JSON.stringify({rows:l,propertyName:e.property,startDate:a,endDate:i,...e.importMode?{importMode:e.importMode}:{}})});if(!d.ok){const x=await d.json().catch(()=>null);throw new Error(Q$(x,d.status))}const f=await d.json();if(!f.success)throw new Error(Q$(f,d.status,"Processing failed."));const{newItems:p=[],baselineSet:m=!1}=f.categorization||{};return{reportId:f.reportId,propertyId:f.propertyId,newItemCount:p.length,needsCategorizationReview:!m||p.length>0}},CNe=async(e,t,r,n)=>{var c;const{startDate:a,endDate:i}=vX(e),s=await n.transformData(t,{...r,propertyName:e.property,startDate:a,endDate:i},"rent-roll"),l=await ZY.processRentRoll({...s,propertyName:e.property,startDate:a,endDate:i});if(!l.success)throw new Error(((c=l.error)==null?void 0:c.message)||"Failed to process rent roll.");return{reportId:l.reportId,newItemCount:0,needsCategorizationReview:!1}},ONe=async(e,{preset:t,services:r}={})=>{const n=(r==null?void 0:r.rawFileService)||new f4,a=(r==null?void 0:r.transformationService)||new sX;if(!t)throw new Error("No preset selected. A batch cannot guess this fileâs columns â pick a preset, or upload this file on its own to map them by hand.");if(t.report_type&&t.report_type!==e.reportType)throw new Error(`The "${t.preset_name}" preset is for ${t.report_type} files, not ${e.reportType}.`);const{headers:i,data:s,mapping:l}=await yX(e,t,n);switch(e.reportType){case"pl":return ANe(e,i,s,l);case"rent-roll":return CNe(e,s,l,a);default:throw new Error(`Unsupported report type: ${e.reportType}`)}},PNe=e=>({fileName:e.fileName,propertyName:e.property,reportType:e.reportType,reportId:null,newItemCount:0,needsCategorizationReview:!1}),RNe=e=>{const{reportId:t,newItemCount:r,needsCategorizationReview:n}=e||{};return{reportId:t??null,newItemCount:r??0,needsCategorizationReview:n??!1}}
993,bX={PENDING:Nd.PENDING,RUNNING:Nd.UPLOADING,DONE:Nd.DONE,FAILED:Nd.FAILED},INe=({rows:e=[],presets:t=[],uploadRow:r=ONe})=>{const n=N.useCallback(p=>t.find(m=>String(m.id)===String(p.presetId)),[t]),a=N.useCallback(p=>r(p,{preset:n(p)}),[n,r]),{results:i,isRunning:s,isFinished:l,summary:c,start:u,retryFailed:d}=rX({items:e,runItem:a,describeError:jNe,initialResult:PNe,toResult:RNe,statuses:bX}),f=N.useMemo(()=>{const p=[];for(const m of i)m.status===Nd.DONE&&(m.newItemCount>0||m.needsCategorizationReview)&&(p.includes(m.propertyName)||p.push(m.propertyName));return p},[i]);return{results:i,isRunning:s,isFinished:l,summary:c,propertiesWithNewItems:f,start:u,retryFailed:d}},FNe={PENDING:"Waiting",RUNNING:"Uploading",DONE:"Uploaded",FAILED:"Failed"},Yv=(e,t)=>`${e} ${t}${e===1?"":"s"}`,MNe=({rows:e=[],presets:t=[],onDone:r,uploadRow:n})=>{const{results:a,isRunning:i,isFinished:s,summary:l,propertiesWithNewItems:c,start:u,retryFailed:d}=INe({rows:e,presets:t,...n?{uploadRow:n}:{}});N.useEffect(()=>{u()},[]);const f=a.filter(p=>p.status===Nd.FAILED);return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{"data-testid":"bulk-upload-progress-header",className:"p-4 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20",children:[o.jsx("h3",{className:"text-base font-semibold text-gray-100",children:i?"Uploadingâ¦":"Upload complete"}),o.jsx("p",{className:"text-sm text-gray-400 mt-1",children:i?`${l.succeeded+l.failed} of ${l.total} done â one file at a time, so a failure cannot affect the rest.`:`${Yv(l.succeeded,"file")} uploaded${l.failed>0?`, ${l.failed} failed`:""}.`})]}),o.jsx("div",{className:"data-table",children:o.jsxs("table",{className:"w-full text-sm","aria-label":"Upload progress",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",className:"text-left",children:"File"}),o.jsx("th",{scope:"col",className:"text-left",children:"Property"}),o.jsx("th",{scope:"col",className:"text-left",children:"Status"}),o.jsx("th",{scope:"col",className:"text-left",children:"Detail"})]})}),o.jsx("tbody",{children:a.map(p=>o.jsxs("tr",{className:p.status===Nd.FAILED?"bg-error/5":void 0,children:[o.jsx("td",{className:"text-gray-300",children:p.fileName}),o.jsx("td",{className:"text-gray-300",children:p.propertyName}),o.jsx("td",{children:o.jsx(xX,{status:p.status,statuses:bX,labels:FNe,testId:"upload-status"})}),o.jsx("td",{className:"font-sans text-sm",children:p.error?o.jsx("span",{className:"text-error",children:p.error}):p.needsCategorizationReview||p.newItemCount>0?o.jsx("span",{className:"text-gray-400",children:p.newItemCount>0?`${Yv(p.newItemCount,"new line item")} to review`:"First upload â categorizations to review"}):o.jsx("span",{className:"text-gray-600",children:"â"})})]},p.id))})]})}),s&&o.jsxs("div",{"data-testid":"bulk-upload-summary-panel",className:"p-4 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20 space-y-3",children:[c.length>0?o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm text-gray-200 font-medium",children:[Yv(c.length,"property")," need",c.length===1?"s":""," a categorization review"]}),o.jsx("p",{className:"text-sm text-gray-400 mt-1",children:c.join(", ")}),o.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["A batch does not open the categorization screen. Open"," ",c.length===1?"that property":"those properties"," to review the new line items â everything else is already filed."]})]}):l.succeeded>0&&o.jsx("p",{className:"text-sm text-gray-400",children:"No property reported an unseen line item, so there is nothing to categorize."}),o.jsxs("div",{className:"flex items-center justify-end gap-3",children:[f.length>0&&o.jsxs(rt,{variant:"secondary",onClick:d,children:["Retry ",Yv(f.length,"failed file")]}),o.jsx(rt,{variant:"primary",onClick:r,children:"Done"})]})]})]})},DNe=({isOpen:e,onClose:t,onCreated:r})=>{const n=async a=>{var i,s,l,c;try{await na.createProperty(a),ft.success("Property created successfully"),r==null||r(a.name)}catch(u){throw(s=(i=u.response)==null?void 0:i.data)!=null&&s.upgradeRequired?ft.error(u.response.data.message):ft.error(((c=(l=u.response)==null?void 0:l.data)==null?void 0:c.error)||u.message||"Failed to create property"),u}};return e?o.jsx(bf,{isOpen:e,onClose:t,title:"Add Property",size:"lg",children:o.jsx(iX,{onSubmit:n,onCancel:t})}):null},LNe=async(e,{preset:t,services:r}={})=>
993{if((e==null?void 0:e.reportType)!=="pl"||!t)return[];try{const n=(r==null?void 0:r.rawFileService)||new f4,{headers:a,data:i,mapping:s}=await yX(e,t,n),{rows:l}=F4(I4({data:i,headers:a,mapping:s}));return[...new Set(l.map(c=>c.month))]}catch(n){return console.warn(`Could not read the months in ${e==null?void 0:e.fileName} before uploading:`,n),[]}},$Ne=async(e=[],{presets:t=[],monthsFor:r=LNe,checkOverlap:n=(...a)=>na.checkReportOverlap(...a)}={})=>(await Promise.all(e.map(async i=>{if(i.reportType!=="pl")return null;try{const s=t.find(u=>String(u.id)===String(i.presetId)),l=await r(i,{preset:s});if(l.length===0)return null;const c=await n(i.property,"pl",i.periodStart,i.periodEnd||i.periodStart,l);return c!=null&&c.hasOverlap?{id:i.id,fileName:i.fileName,property:i.property,overlappingMonths:Array.isArray(c.overlappingMonths)?c.overlappingMonths:[],newMonths:Array.isArray(c.newMonths)?c.newMonths:[]}:null}catch(s){return console.error(`Could not check ${i.fileName} for overlapping months:`,s),null}}))).filter(Boolean),Z$=(e,t)=>`${e} ${t}${e===1?"":"s"}`,BNe=({files:e=[],onExit:t,uploadRow:r})=>{const[n,a]=N.useState([]),[i,s]=N.useState([]),[l,c]=N.useState(!0),[u,d]=N.useState(null),[f,p]=N.useState(null),[m,x]=N.useState(!1),[y,v]=N.useState(null),[b,w]=N.useState([]),[S,j]=N.useState(!1),k=N.useRef(null),E=N.useCallback(async()=>{c(!0),d(null);try{const[W,...V]=await Promise.all([na.getPropertyNames(),...qC.map(G=>Mi.getPresets(G.value))]);a(Array.isArray(W)?W:[]),s(V.flat().filter(Boolean))}catch(W){console.error("Failed to load properties or presets for bulk upload:",W),d("Unable to load your properties and presets. Try again.")}finally{c(!1)}},[]);N.useEffect(()=>{E()},[E]);const T=N.useCallback(W=>{const V=k.current;k.current=null,j(!1),V&&V(W)},[]),O=N.useCallback(()=>(j(!0),new Promise(W=>{k.current=W})),[]),A=N.useCallback(async W=>{let V=null;try{const G=await na.getPropertyNames();Array.isArray(G)&&(V=G)}catch(G){console.error("Failed to refresh property names:",G)}a(G=>{const K=V??G;return K.includes(W)?K:[...K,W]}),T(W)},[T]),P=N.useCallback(async W=>{if(m||f)return;x(!0);const V=await $Ne(W,{presets:i});if(x(!1),V.length===0){p(W);return}v(W),w(V)},[f,m,i]),I=N.useCallback(W=>{const V=y;v(null),w([]),V&&p(V.map(G=>({...G,importMode:W})))},[y]),R=N.useCallback(()=>{v(null),w([])},[]),M=N.useMemo(()=>{if(b.length===0)return null;const W=(y==null?void 0:y.length)??b.length;return o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"block mb-2",children:[b.length," of the ",Z$(W,"file")," in this batch cover months that already have data."]}),b.map(V=>o.jsxs("span",{className:"block text-sm",children:[o.jsx("span",{className:"text-gray-300",children:V.fileName})," â ",V.property,":"," ",V.overlappingMonths.join(", ")]},V.id)),o.jsx("span",{className:"block mt-2",children:"Your choice applies to every file in this batch."})]})},[b,y]),L=N.useMemo(()=>b.reduce((W,V)=>W+V.newMonths.length,0),[b]),U=o.jsxs("div",{"data-testid":"bulk-upload-header",className:"flex items-center justify-between gap-4 flex-wrap p-4 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(fC,{className:"w-5 h-5 text-accent","aria-hidden":"true"}),o.jsxs("div",{children:[o.jsxs("h2",{className:"text-base font-semibold text-gray-100",children:["Configuring ",e.length," files"]}),o.jsx("p",{className:"text-sm text-gray-400",children:"More than one file was selected, so each one is configured here instead of one at a time."})]})]}),o.jsx(rt,{variant:"secondary",onClick:t,children:"Start over"})]});return f?o.jsx("div",{className:"max-w-[1800px] mx-auto px-6 py-8 space-y-4",children:o.jsx(MNe,{rows:f,presets:i,onDone:t,uploadRow:r})}):o.jsxs("div",{className:"max-w-[1800px] mx-auto px-6 py-8 space-y-4",children:[U,m&&o.jsxs("p",{"data-testid":"bulk-upload-checking",className:"flex items-center gap-2 p-3 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20 text-sm text-gray-300",children:[o.jsx(ar,{className:"w-4 h-4 text-accent animate-spin","aria-hidden":"true"}),"Checking which months already have dataâ¦"]}),l?o.jsx("p",{className:"p-6 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20 text-sm text-gray-400",children:"Loading your properties and presetsâ¦"}):u?o.jsxs("div",{className:"p-6 rounded-lg bg-card/50 backdrop-blur-sm border border-error/30 space-y-3",children:[o.jsx("p",{className:"text-sm text-error",children:u}),o.jsx(rt,{variant:"secondary",onClick:E,children:"Try again"})]}):o.jsx(TNe,{files:e,properties:n,presets:i,onSubmit:P,onAddProperty:O,onCancel:t,isChecking:m}),o.jsx(ki,{isOpen:b.length>0,onClose:R,onConfirm:()=>I("replace"),title:"Some months already have data",message:M,confirmText:"Replace those months",cancelText:"Cancel",variant:"warning",extraButton:L>0?{text:`Import only the ${Z$(L,"new month")}`,onClick:()=>I("skip"),variant:"primary"}:null}),o.jsx(DNe,{isOpen:S,onClose:()=>T(void 0),onCreated:A})]})},ah=(e,t="month")=>`${e} ${t}${e===1?"":"s"}`,UNe=({onComplete:e,onCancel:t,onAddProperty:r,onError:n})=>{const{state:a,actions:i}=oNe(),[s,l]=N.useState(null),[c,u]=N.useState([]),[d,f]=N.useState(!1),[p,m]=N.useState(null),[x,y]=N.useState(null),{headers:v,data:b}=N.useMemo(()=>
993{if(!a.rawFileData||a.rawFileData.length===0)return{headers:[],data:[]};const W=a.rawFileData[a.headerRow]||[],V=a.rawFileData.slice(a.dataStartRow);return{headers:W,data:V}},[a.rawFileData,a.headerRow,a.dataStartRow]),w=N.useMemo(()=>{var G;if(a.reportType!=="pl")return[];const W=(G=a.mapping)==null?void 0:G.plMonthlyData;if(!Array.isArray(W))return[];const V=[];for(const K of W){const F=v[K],ne=R4(F==null?null:String(F));ne&&!V.includes(ne)&&V.push(ne)}return V},[a.reportType,a.mapping,v]),{isValid:S,missingFields:j,error:k}=N.useMemo(()=>a.propertyName.trim()?a.startDate?a.reportType==="pl"&&!a.endDate?{isValid:!1,missingFields:[],error:"End date is required for P&L"}:a.rawFileData?iNe(a.mapping,a.reportType):{isValid:!1,missingFields:[],error:"File upload required"}:{isValid:!1,missingFields:[],error:"Start date is required"}:{isValid:!1,missingFields:[],error:"Property name is required"},[a.mapping,a.rawFileData,a.propertyName,a.reportType,a.startDate,a.endDate]),E=N.useMemo(()=>{const W=Y0(a.reportType),V=W.filter(X=>X.required),G=W.filter(X=>!X.required),K=X=>{const Y=a.mapping[X];return Y!==void 0&&Y!==""&&Y!==sn.NOT_AVAILABLE},F=V.filter(X=>K(X.field)).length,ne=G.filter(X=>K(X.field)).length,H=!!a.rawFileData&&a.headerRow!==null&&a.dataStartRow!==null&&a.headerRow<a.dataStartRow;return{reportConfig:{isComplete:!!a.propertyName.trim()&&!!a.startDate&&(a.reportType!=="pl"||!!a.endDate)},upload:{isComplete:!!a.rawFileData},rowConfig:{isComplete:H},columnMapping:{requiredCount:F,requiredTotal:V.length,optionalCount:ne,optionalTotal:G.length,isComplete:F===V.length,isLocked:!H}}},[a.rawFileData,a.mapping,a.headerRow,a.dataStartRow,a.propertyName,a.reportType,a.startDate,a.endDate]),T=N.useCallback(()=>({mapping:a.mapping,propertyName:a.propertyName.trim(),startDate:a.startDate,endDate:a.reportType==="pl"?a.endDate:null,reportType:a.reportType,headers:v,data:b,headerRow:a.headerRow,dataStartRow:a.dataStartRow,selectedPreset:a.selectedPreset}),[a.mapping,a.propertyName,a.startDate,a.endDate,a.reportType,v,b,a.headerRow,a.dataStartRow,a.selectedPreset]),O=N.useCallback(async W=>{try{await e(W)}catch(V){console.error("Processing error:",V),n(V.message||"Failed to process data")}finally{i.setProcessing(!1)}},[e,n,i]),A=N.useCallback(async W=>{f(!1),y(null),i.setImportMode(W),p&&(await O({...p,importMode:W}),m(null))},[p,i,O]),P=N.useCallback(()=>A("replace"),[A]),I=N.useCallback(()=>A("skip"),[A]),R=N.useCallback(()=>{f(!1),y(null),m(null),i.setImportMode(null),i.setProcessing(!1)},[i]),M=N.useMemo(()=>{if(!x)return null;const{overlappingMonths:W,newMonths:V}=x,G=W.length+V.length,K=W.join(", ");return V.length===0?`All ${ah(G)} in this upload for ${a.propertyName.trim()} already have data: ${K}.`:`This upload covers ${ah(G)} for ${a.propertyName.trim()}. ${W.length} of them already have data: ${K}. The other ${ah(V.length)} ${V.length===1?"is":"are"} new.`},[x,a.propertyName]),L=N.useMemo(()=>{if(!x)return"Replace";const{overlappingMonths:W,newMonths:V}=x;return V.length===0?`Replace all ${ah(W.length)}`:`Replace those ${ah(W.length)}`},[x]),U=async()=>{if(!a.isProcessing){if(!S){if(k)n(k);else if(j.length>0){const W=j.map(V=>V.label).join(", ");n(`Missing required fields: ${W}`)}return}i.setProcessing(!0);try{const W=await na.checkReportOverlap(a.propertyName.trim(),a.reportType,a.startDate,a.reportType==="pl"?a.endDate:a.startDate,w),V=T();if(W.hasOverlap){m(V),y(Array.isArray(W.overlappingMonths)&&Array.isArray(W.newMonths)?{overlappingMonths:W.overlappingMonths,newMonths:W.newMonths}:null),f(!0);return}await O(V)}catch(W){console.error("Processing error:",W),n(W.message||"Failed to process data"),i.setProcessing(!1)}}};return c.length>1?o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-background via-background-light to-background",children:o.jsx(BNe,{files:c,onExit:()=>u([])})}):o.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background-light to-background",children:[o.jsx("div",{className:"bg-card/50 backdrop-blur-sm border-b border-white/10",children:o.jsx("div",{className:"max-w-[1400px] mx-auto px-6 py-4",children:o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold bg-gradient-to-r from-white to-gray-300 bg-clip-text text-transparent",children:"Upload & Configure Report"}),o.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Complete all steps to process your report"})]})})}),o.jsx("div",{className:"max-w-[1400px] mx-auto px-6 py-8 pb-24",children:o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{"data-tour":"upload-config-bar",className:"glass-panel",children:o.jsx(dX,{propertyName:a.propertyName,reportType:a.reportType,startDate:a.startDate,endD
993ate:a.endDate,onPropertyChange:i.setPropertyName,onReportTypeChange:i.setReportType,onStartDateChange:i.setStartDate,onEndDateChange:i.setEndDate,onAddProperty:r,disabled:a.isProcessing})}),o.jsx(uX,{rawFileData:a.rawFileData,headerRow:a.headerRow,dataStartRow:a.dataStartRow,mapping:a.mapping,fieldDefinitions:Y0(a.reportType),hoveredColumn:s,onColumnHover:l,onFileUploaded:i.setFile,onClearFile:i.removeFile,onError:n,onHeaderRowChange:i.setHeaderRow,onDataStartRowChange:i.setDataStartRow,onMappingChange:i.setMapping,onAutoMap:i.autoMap,onPresetSelected:i.applyPreset,propertyName:a.propertyName,reportType:a.reportType,maxFiles:S1,onMultipleFiles:u}),a.rawFileData&&o.jsx("div",{className:"glass-panel",children:o.jsx(fX,{mapping:a.mapping,fieldDefinitions:Y0(a.reportType),onFieldClick:l,hoveredField:s})}),a.rawFileData&&o.jsx("div",{"data-tour":"upload-column-mapping",children:o.jsx(Fg,{title:"Advanced Column Mapping",icon:e_,defaultExpanded:!1,requiredCount:E.columnMapping.requiredCount,requiredTotal:E.columnMapping.requiredTotal,optionalCount:E.columnMapping.optionalCount,optionalTotal:E.columnMapping.optionalTotal,className:"glass-card",children:o.jsx(fNe,{reportType:a.reportType,headers:v,mapping:a.mapping,onMappingChange:i.setMapping,onAutoMap:i.autoMap,disabled:!a.rawFileData,locked:E.columnMapping.isLocked,hoveredColumn:s,onColumnHover:l})})})]})}),o.jsx("div",{className:"fixed bottom-0 left-0 right-0 bg-card/80 backdrop-blur-sm border-t border-white/10",children:o.jsx("div",{className:"max-w-[1600px] mx-auto px-6 py-4",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("button",{onClick:t,className:"px-6 py-2 bg-card/50 hover:bg-card/70 border border-white/10 rounded-lg transition-all duration-200",disabled:a.isProcessing,children:"Cancel"}),o.jsxs("div",{className:"flex items-center gap-4",children:[!S&&k&&o.jsx("span",{className:"text-sm text-red-400",children:k}),o.jsx("button",{onClick:U,disabled:!S||a.isProcessing,"data-tour":"upload-process-button",className:` 994 px-8 py-2 rounded-lg font-semibold transition-all duration-200 995 ${S&&!a.isProcessing?"bg-gradient-to-r from-accent to-accent-light hover:shadow-glow text-white":"bg-gray-700 text-gray-400 cursor-not-allowed"} 996 `,children:a.isProcessing?"Processing...":"Process Report"})]})]})})}),o.jsx(ki,{isOpen:d,onClose:R,onConfirm:P,title:x?"Some months already have data":"Replace Existing Data?",message:x?M:"There are existing reports for this date range. Would you like to replace the existing data with this upload?",confirmText:x?L:"Replace",cancelText:"Cancel",variant:"warning",extraButton:x&&x.newMonths.length>0?{text:`Import only the ${ah(x.newMonths.length,"new month")}`,onClick:I,variant:"primary"}:null})]})},zNe=Object.freeze(["loan_amount","loan_rate","loan_type","io_period_months","amortization_years","loan_start_date","loan_maturity"]),HNe="\0",qNe="�null",WNe="�undefined",VNe=e=>e===null?qNe:e===void 0?WNe:String(e),wX=e=>zNe.map(t=>VNe(e==null?void 0:e[t])).join(HNe),_X=1e3*60*60*24,GNe=e=>{if(!e)return null;const t=Jn(e);return t?Math.floor((new Date-t)/_X):null},KNe=e=>{if(!e)return null;const t=Jn(e);if(!t)return null;const n=Math.floor((t-new Date)/_X);return n>0?n:0},YNe=({property:e})=>{const t=KNe(e.loan_maturity),r=GNe(e.purchase_date),n=[{label:"Units",value:e.unit_count||"â",subtext:`${e.property_class||"Class â"} ⢠Built ${e.year_built||"â"}`,icon:_i},{label:"Purchase Price",value:e.purchase_price?Be(e.purchase_price):"â",subtext:e.purchase_date?Ct(e.purchase_date):"â",icon:bl,highlight:!0},{label:"Loan Maturity",value:t!==null?`${t.toLocaleString()} days`:"â",subtext:e.loan_maturity?Ct(e.loan_maturity):"â",icon:_u,warning:t!==null&&t<365},{label:"Days Owned",value:r!==null?r.toLocaleString():"â",subtext:e.purchase_date?`Since ${Ct(e.purchase_date)}`:"â",icon:$0},{label:"Interest Rate",value:e.loan_rate?pr(e.loan_rate):"â",subtext:e.loan_type||"â",icon:Vp}];return o.jsx("div",{className:"kpi-container",children:o.jsx("div",{className:"kpi-grid",children:n.map((a,i)=>{const s=a.icon;return o.jsxs("div",{className:"kpi-card",children:[o.jsxs("div",{className:"kpi-label",children:[o.jsx(s,{size:16}),a.label]}),o.jsx("div",{className:`kpi-value ${a.highlight?"highlight":""} ${a.warning?"warning":""}`,children:a.value}),o.jsx("div",{className:"kpi-subtext",children:a.subtext})]},i)})})})},XNe=({isEditing:e,onClick:t})=>o.jsx("div",{className:"edit-btn-wrapper",children:o.jsx("button",{className:"edit-btn",onClick:t,"aria-label":e?"Cancel edit":"Edit",children:e?o.jsx(Ir,{size:14}):o.jsx(SR,{size:14})})}),mu=({title:e,icon:t,isEditing:r=!1,onEditClick:n,onCancel:a,canEdit:i=!0,fullWidth:s=!1,children:l})=>{const c=()=>{r&&a?a():n()};return o.jsxs("div",{className:`content-card ${s?"md:col-span-2":""}`,children:[o.jsxs("div",{className:"card-header",children:[o.jsxs("div",{className:"card-header-left",children:[o.jsx(t,{className:"card-icon"}),o.jsx("h3",{className:"card-title",children:e})]}),i&&o.jsx(XNe,{isEditing:r,onClick:c})]}),o.jsx("div",{className:"card-content",children:l})]})},JNe=e=>{const[t,r]=N.useState([]),[n,a]=N.useState(!0),[i,s]=N.useState(null);return N.useEffect(()=>{if(!e){a(!1);return}(async()=>{try{a(!0),s(null);const[c,u]=await Promise.all([Xe.get(`/properties/${e}/reports`).catch(()=>({data:[]})),Xe.get(`/saved-analyses/${e}`).catch(()=>({data:[]}))]),d=[...(c.data||[]).map(f=>({id:`report-${f.id}`,type:f.report_type==="rent-roll"?"rentroll":"pl",title:f.report_type==="rent-roll"?"Rent Roll uploaded":"P&L Statement uploaded",date:f.created_at,detail
996:f.report_type==="rent-roll"?`${f.record_count||0} units processed`:f.start_date?`${Ct(f.start_date)} period`:"Financial data"})),...(u.data||[]).map(f=>({id:`analysis-${f.id}`,type:"analysis",title:"AI Analysis generated",date:f.created_at,detail:f.name||"Report"}))].sort((f,p)=>new Date(p.date)-new Date(f.date));r(d)}catch(c){console.error("Error fetching activity:",c),s(c),r([])}finally{a(!1)}})()},[e]),{activity:t,loading:n,error:i}},QNe=5,e6={rentroll:{icon:Gp,dotClass:"green",label:"Rent Roll uploaded"},pl:{icon:Sn,dotClass:"blue",label:"P&L Statement uploaded"},analysis:{icon:yc,dotClass:"purple",label:"AI Analysis generated"}},ZNe=({item:e})=>{const t=e6[e.type]||e6.pl;return o.jsxs("div",{className:"activity-item",children:[o.jsx("div",{className:`activity-dot ${t.dotClass}`}),o.jsxs("div",{className:"activity-content",children:[o.jsx("p",{className:"activity-text",children:e.title}),o.jsxs("p",{className:"activity-date",children:[Ake(e.date)," ⢠",e.detail]})]})]})},eTe=({propertyId:e,onViewAll:t})=>{const{activity:r,loading:n,error:a}=JNe(e),{displayedItems:i,hasMore:s,remainingCount:l,showAll:c,toggleShowAll:u}=$u(r,QNe);return n?o.jsx(mu,{title:"Recent Activity",icon:$0,canEdit:!1,children:o.jsx("div",{className:"activity-loading",children:"Loading activity..."})}):a||r.length===0?o.jsx(mu,{title:"Recent Activity",icon:$0,canEdit:!1,children:o.jsx("div",{className:"activity-empty",children:"No recent activity"})}):o.jsxs(mu,{title:"Recent Activity",icon:$0,canEdit:!1,children:[o.jsx("div",{className:"activity-list",children:i.map(d=>o.jsx(ZNe,{item:d},d.id))}),s&&o.jsx("button",{onClick:u,className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto mt-3",children:c?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",l," more)"]})}),o.jsxs("button",{onClick:t,className:"view-all-link",children:["View All in Reports",o.jsx(yl,{size:14})]})]})},Zx=({onSave:e,onCancel:t,saving:r=!1})=>o.jsxs("div",{className:"card-actions",children:[o.jsx(rt,{variant:"secondary",size:"sm",onClick:t,disabled:r,children:"Cancel"}),o.jsx(rt,{variant:"primary",size:"sm",onClick:e,loading:r,children:"Save"})]}),kt={name:"Property Name",address:"Address",street_address:"Street Address",city:"City",state:"State",z
996ip_code:"ZIP Code",unit_count:"Unit Count",construction_year:"Year Built",year_built:"Year Built",property_class:"Property Class",property_manager:"Property Manager",property_website:"Website",purchase_date:"Purchase Date",purchase_price:"Purchase Price",total_investment_amount:"Total Investment",total_investment_notes:"Investment Notes",purchase_avg_rent:"Avg Rent at Purchase",purchase_noi:"NOI at Purchase",purchase_occupancy:"Occupancy at Purchase",purchase_cap_rate:"Cap Rate at Purchase",loan_amount:"Loan Amount",loan_rate:"Interest Rate",loan_type:"Loan Type",loan_start_date:"Loan Start Date",io_period_months:"IO Period",amortization_years:"Amortization",loan_term_years:"Term",loan_maturity:"Maturity Date",rate_lock_date:"Rate Lock Expiry",monthly_payment:"Monthly Payment",payment_after_io:"Payment After IO",current_loan_balance:"Current Balance (from note terms)",principal_paid:"Principal Paid",current_ltv:"LTV (vs. purchase price)",estimated_equity:"Equity (vs. purchase price)",months_to_maturity:"Months to Maturity",io_end_date:"IO Expires",balance_at_maturity:"Balance at Maturity",current_value:"Current Value",valuation_basis:"Basis",value_as_of:"As Of",value_source:"Source",equity_vs_value:"Equity (vs. current value)",ltv_vs_value:"LTV (vs. current value)",valuation_value:"Valuation",valuation_as_of_date:"As Of Date",valuation_source:"Source",walk_score:"Walk Score",transit_score:"Transit Score",bike_score:"Bike Score"};typeof On<"u"&&On.exports&&(On.exports={PROPERTY_FIELD_LABELS:kt});const tTe=5,rTe=(e,t)=>[{key:"name",label:kt.name,value:e.name,type:"text"},{key:"address",label:kt.address,value:t,type:"text"},{key:"unit_count",label:kt.unit_count,value:e.unit_count,type:"number"},{key:"construction_year",label:kt.construction_year,value:e.construction_year,type:"number"},{key:"property_class",label:kt.property_class,value:e.property_class,type:"select",options:P4},{key:"property_manager",label:kt.property_manager,value:e.property_manager,type:"text"},{key:"property_website",label:kt.property_website,value:e.property_website,type:"url"}],nTe=e=>[{key:"name",label:kt.name,value:e.name,type:"text"},{key:"street_address",label:kt.street_address,value:e.street_address,type:"text"},{key:"city",label:kt.city,value:e.city,type:"text"},{key:"state",label:kt.state,value:e.state,type:"text"},{key:"zip_code",label:kt.zip_code,value:e.zip_code,type:"text"},{key:"unit_count",label:kt.unit_count,value:e.unit_count,type:"number"},{key:"construction_year",label:kt.construction_year,value:e.construction_year,type:"number"},{key:"property_class",label:kt.property_class,value:e.property_class,type:"select",options:P4},{key:"property_manager",label:kt.property_manager,value:e.property_manager,type:"text"},{key:"property_website",label:kt.property_website,value:e.property_website,type:"url"}],aTe=({property:e,editedProperty:t,isEditing:r,onEditClick:n,onFieldChange:a,onSave:i,onCancel:s,saving:l})=>{const c=r?t:e,u=[c.street_address,c.city,c.state,c.zip_code].filter(Boolean).join(", ")||"â",d=r?nTe(c):rTe(c,u),{displayedItems:f,hasMore:p,remainingCount:m,showAll:x,toggleShowAll:y}=$u(d,r?d.length:tTe);return o.jsxs(mu,{title:"Property Details",icon:Ru,isEditing:r,onEditClick:n,onCancel:s,children:[o.jsx("div",{className:"details-list",children:f.map(v=>o.jsx(Qt,{label:v.label,value:v.value,isEditing:r,type:v.type,options:v.options,onChange:b=>a(v.key,b)},v.key))}),p&&!r&&o.jsx("button",{onClick:y,className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto mt-3",children:x?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",m," more)"]})}),r&&o.jsx(Zx,{onSave:i,onCancel:s,saving:l})]})},iTe=e=>{if(!Array.isArray(e)||e.length===0)return[];const t=[],r=new Map;return e.forEach(n=>{const a=n.month_year.slice(0,4);let i=r.get(a);i||(i={year:a,payments:0,interest:0,principal:0,endingBalance:0,ioExitMonth:null,hasFinalPayment:!1,months:[]},r.set(a,i),t.push(i)),i.payments+=n.payment,i.interest+=n.interest_payment,i.principal+=n.principal_payment,i.endingBalance=n.ending_balance,n.isIOExit&&(i.ioExitMonth=n.month_year),n.isFinalPayment&&(i.hasFinalPayment=!0),i.months.push(n)}),t},sTe=e=>{if(e==null)return"";if(typeof e=="number")return e.toString();let t=String(e);return/^[=+\-@]/.test(t)&&(t=`'${t}`),/[",\n\r]/.test(t)?`"${t.replace(/"/g,'""')}"`:t},SX=(e=[],t=[])=>{const r=n=>n.map(sTe).join(",");return[r(e),...t.map(r)].join(` 997`)},EX=(e,t)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a"),a=URL.createObjectURL(r);n.setAttribute("href",a),n.setAttribute("download",e),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(a)},oTe="â",lTe=(e,t)=>
997e==null?oTe:t(e),Ll=e=>lTe(e,Be),d0=e=>Ct(`${e}-01`,"month-year"),t6={variableRate:"This loan's rate can change, so its future payments are not a fixed schedule. Projecting one would be a forecast rather than arithmetic, so no schedule is shown here.",unusableTerms:"The loan terms on file are incomplete or invalid, so no schedule can be projected. A schedule needs the loan amount, the interest rate, the amortization term and the loan start date.",noLoan:"No loan is on file for this property."},cTe=["Month","Months From Start","Beginning Balance","Payment","Interest","Principal","Ending Balance"],uTe=({isOpen:e,onClose:t,propertyId:r,propertyName:n,termsKey:a})=>{const[i,s]=N.useState(null),[l,c]=N.useState(!1),[u,d]=N.useState(!1),[f,p]=N.useState(()=>new Set),m=N.useRef(null);N.useEffect(()=>{if(!e||!r)return;const k=`${r}::${a}`;if(m.current===k)return;let E=!1;return c(!0),d(!1),Promise.resolve().then(()=>na.getAmortizationSchedule(r)).then(T=>{E||(m.current=k,s(T),c(!1))}).catch(()=>{E||(s(null),d(!0),c(!1))}),()=>{E=!0}},[e,r,a]);const x=k=>{p(E=>{const T=new Set(E);return T.has(k)?T.delete(k):T.add(k),T})},y=(i==null?void 0:i.available)===!0,v=y?i.rows:[],b=y?i.summary:null,w=iTe(v),S=()=>{const k=v.map(T=>[T.month_year,T.months_from_start,T.beginning_balance,T.payment,T.interest_payment,T.principal_payment,T.ending_balance]),E=String(n||"Property").replace(/[^a-zA-Z0-9]/g,"_");EX(`${E}_Amortization_Schedule_Monthly.csv`,SX(cTe,k))},j=()=>
997{if(l)return o.jsx("div",{className:"space-y-4",children:o.jsxs("div",{className:"animate-pulse",children:[o.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[...Array(4)].map((E,T)=>o.jsx("div",{className:"bg-card/50 rounded-lg p-3 h-20 border border-white/5"},T))}),o.jsx("div",{className:"rounded-lg border border-white/10 bg-card/30 h-96"})]})});if(u)return o.jsxs("div",{className:"text-center py-8",children:[o.jsx("div",{className:"text-error mb-2",children:"The schedule could not be loaded"}),o.jsx("p",{className:"text-gray-400 text-sm",children:"Please try again in a moment."})]});if(!i)return null;if(!y)return o.jsx("div",{className:"py-8 text-center",children:o.jsx("p",{className:"text-gray-300 max-w-xl mx-auto leading-relaxed",children:t6[i.reason]||t6.noLoan})});const k=b.endsAt==="maturity";return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[o.jsxs("p",{className:"text-sm text-gray-400",children:[b.paymentCount," monthly payments, ",d0(b.firstPaymentMonth)," to"," ",d0(b.finalPaymentMonth),"."]}),o.jsxs("button",{type:"button",onClick:S,className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors",children:[o.jsx(vc,{className:"w-4 h-4 mr-1"}),"Export monthly schedule (CSV)"]})]}),o.jsx("div",{className:"data-table overflow-hidden",children:o.jsx("div",{className:"max-h-[28rem] overflow-y-auto",children:o.jsxs("table",{className:"w-full text-sm","aria-label":"Amortization schedule by year",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",className:"text-left",children:"Year"}),o.jsx("th",{scope:"col",className:"text-right",children:"Payments"}),o.jsx("th",{scope:"col",className:"text-right",children:"Interest"}),o.jsx("th",{scope:"col",className:"text-right",children:"Principal"}),o.jsx("th",{scope:"col",className:"text-right",children:"Ending Balance"})]})}),o.jsx("tbody",{children:w.map(E=>{const T=f.has(E.year),O=T?kr:yl,A=k&&E.hasFinalPayment;return o.jsxs(se.Fragment,{children:[o.jsxs("tr",{children:[o.jsx("td",{className:"text-left",children:o.jsxs("button",{type:"button",onClick:()=>x(E.year),"aria-expanded":T,className:"flex items-center gap-2 text-gray-200 hover:text-white transition-colors",children:[o.jsx(O,{className:"w-4 h-4 text-gray-500"}),o.jsx("span",{children:E.year}),E.ioExitMonth&&o.jsxs("span",{className:"text-xs text-accent-light font-sans",children:["IO ends ",d0(E.ioExitMonth)]}),A&&o.jsx("span",{className:"text-xs text-accent font-sans",children:"Balloon"})]})}),o.jsx("td",{className:"text-right text-gray-200",children:Ll(E.payments)}),o.jsx("td",{className:"text-right text-gray-200",children:Ll(E.interest)}),o.jsx("td",{className:"text-right text-gray-200",children:Ll(E.principal)}),o.jsx("td",{className:"text-right text-gray-200",children:Ll(E.endingBalance)})]}),T&&E.months.map(P=>o.jsxs("tr",{className:"bg-black/20 text-gray-400",children:[o.jsx("td",{className:"text-left",children:o.jsx("span",{className:"pl-6",children:d0(P.month_year)})}),o.jsx("td",{className:"text-right",children:Ll(P.payment)}),o.jsx("td",{className:"text-right",children:Ll(P.interest_payment)}),o.jsx("td",{className:"text-right",children:Ll(P.principal_payment)}),o.jsx("td",{className:"text-right",children:Ll(P.ending_balance)})]},P.month_year))]},E.year)})}),k&&o.jsx("tfoot",{children:o.jsxs("tr",{className:"border-t border-white/10",children:[o.jsx("td",{className:"text-left text-gray-200",children:d0(b.balloonMonth)}),o.jsx("td",{colSpan:3,className:"text-left text-gray-400 font-sans",children:"Balance due at maturity"}),o.jsx("td",{className:"text-right text-gray-200",children:Ll(b.balloonPayment)})]})})]})})}),o.jsx("p",{className:"text-xs text-gray-500",children:"This is a projection from the note's terms, not a lender statement. Extra principal, modification and forbearance are not modelled, so a real balance will drift from this."})]})};return o.jsx(bf,{isOpen:e,onClose:t,title:n?`${n} â Amortization Schedule`:"Amortization Schedule",size:"xl",children:j()})},dTe=5,ck=(e,t,r={})=>({key:e,label:kt[e],type:"number",suffix:t,formatter:n=>n==null||n===""?"â":`${n} ${t}`,...r}),fTe=(e,t,r)=>[{key:"loan_amount",label:kt.loan_amount,value:e.loan_amount,type:"currency",formatter:Be},{key:"loan_rate",label:kt.loan_rate,value:e.loan_rate,type:"percentage",suffix:"%",formatter:n=>n?pr(n,2):"â"},{key:"loan_type",label:kt.loan_type,value:e.loan_type,type:"select",options:aX,formatter:Kke},{key:"loan_start_date",label:kt.loan_start_date,value:e.loan_start_date,type:"date",formatter:Ct}
997,ck("io_period_months","months",{value:e.io_period_months,placeholder:"N/A"}),ck("amortization_years","years",{value:e.amortization_years}),ck("loan_term_years","years",{value:e.loan_term_years}),{key:"loan_maturity",label:kt.loan_maturity,value:e.loan_maturity,type:"date",formatter:Ct},{key:"rate_lock_date",label:kt.rate_lock_date,value:e.rate_lock_date,type:"date",formatter:Ct,placeholder:"N/A (Fixed)"}],hTe="â",ld=(e,t)=>e==null?hTe:t(e),pTe=e=>[{key:"monthly_payment",label:kt.monthly_payment,value:ld(e==null?void 0:e.monthlyPayment,Be)},...(e==null?void 0:e.paymentAfterIO)==null?[]:[{key:"payment_after_io",label:kt.payment_after_io,value:Be(e.paymentAfterIO)}],{key:"current_loan_balance",label:kt.current_loan_balance,value:ld(e==null?void 0:e.currentBalance,Be)},{key:"principal_paid",label:kt.principal_paid,value:ld(e==null?void 0:e.principalPaid,Be)},{key:"current_ltv",label:kt.current_ltv,value:ld(e==null?void 0:e.currentLTV,t=>pr(t,1))},{key:"estimated_equity",label:kt.estimated_equity,value:ld(e==null?void 0:e.estimatedEquity,Be)},{key:"months_to_maturity",label:kt.months_to_maturity,value:ld(e==null?void 0:e.monthsToMaturity,t=>`${t} months`)},{key:"balance_at_maturity",label:kt.balance_at_maturity,value:ld(e==null?void 0:e.balanceAtMaturity,Be)}],mTe=({property:e,editedProperty:t,loanPosition:r,isEditing:n,onEditClick:a,onFieldChange:i,onSave:s,onCancel:l,saving:c})=>{const d=fTe(n?t:e),[f,p]=N.useState(!1),m=(e==null?void 0:e.loan_amount)!==null&&(e==null?void 0:e.loan_amount)!==void 0&&(e==null?void 0:e.loan_amount)!=="",{displayedItems:x,hasMore:y,remainingCount:v,showAll:b,toggleShowAll:w}=$u(d,n?d.length:dTe);return o.jsxs(mu,{title:"Debt Information",icon:dC,isEditing:n,onEditClick:a,onCancel:l,children:[o.jsx("div",{className:"details-list",children:x.map(S=>o.jsx(Qt,{label:S.label,value:S.value,isEditing:n,type:S.type,formatter:S.formatter,options:S.options,placeholder:S.placeholder,suffix:n?S.suffix:void 0,onChange:j=>i(S.key,j)},S.key))}),y&&!n&&o.jsx("button",{onClick:w,className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto mt-3",children:b?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",v," more)"]})}),o.jsxs("div",{className:"mt-4 pt-4 border-t border-white/10",children:[o.jsx("div",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:"Calculated from these terms"}),o.jsx("div",{className:"flex flex-col gap-2",children:pTe(r).map(S=>o.jsx(Qt,{label:S.label,value:S.value,isEditing:!1},S.key))}),o.jsxs("p",{className:"text-xs text-gray-500 mt-3",children:["Balance is projected from the note's terms, not a lender statement. Purchase price is the only valuation on file, so appreciation since purchase is excluded.",!(r!=null&&r.currentBalance)&&" Figures are unavailable while the loan terms are incomplete."]}),m&&o.jsxs("button",{type:"button",onClick:()=>p(!0),className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mt-3",children:[o.jsx(kV,{className:"w-4 h-4 mr-1"}),"View amortization schedule"]})]}),m&&o.jsx(uTe,{isOpen:f,onClose:()=>p(!1),propertyId:e==null?void 0:e.id,propertyName:e==null?void 0:e.name,termsKey:wX(e)}),n&&o.jsx(Zx,{onSave:s,onCancel:l,saving:c})]})},gTe=6;function __(){const e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function S_(e){const t=Jn(e);return!t||Number.isNaN(t.getTime())?null:new Date(t.getFullYear(),t.getMonth(),t.getDate())}function mo(e){const t=S_(e);return t!==null&&t<__()}function go(e){const t=S_(e);if(t===null)return!1;const r=__();if(t<r)return!1;const n=new Date(r);return n.setMonth(n.getMonth()+gTe),t<=n}function xTe(e){const t=e==null?void 0:e.loan_maturity;return mo(t)||go(t)}function yTe(e){const t=e==null?void 0:e.rate_lock_date;return mo(t)||go(t)}function vTe(e){return Array.isArray(e)?e.filter(xTe).length:0}function bTe(e){return Array.isArray(e)?e.filter(yTe).length:0}function VC(e){const t=S_(e);if(t===null)return null;const r=1e3*60*60*24,n=Math.round((t-__())/r);if(n<0){const a=Math.abs(n);return a>365?`${Math.floor(a/365)}y ago`:a>30?`${Math.floor(a/30)}mo ago`:`${a}d ago`}return n===0?"Today":n<=30?`${n}d`:n<=365?`${Math.floor(n/30)}mo`:`${Math.floor(n/365)}y`}function wTe(e,t){const r=S_(e);if(r===null)return!1;const n=__();return n.setMonth(n.getMonth()-t),r<n}const _Te=3,STe=12,r6={value:"",asOfDate:"",source:""},L4=({property:e,loanPosition:t,valuations:r,isEditing:n,onEditClick:a,onCancel:i,onSave:s,onDeleteValuation:l,saving:c})=>{const[u,d]=N.useState(r6);N.useEffect(()=>{n&&d(r6)},[n]);const f=Array.isArray(r)?r:[],p=(t==null?void 0:t.currentValue)!==null&&(t==null?void 0:t.currentValue)!==void 0,m=p?t.currentValue:e==null?void 0:e.purchase_price,x=p?t.valueAsOf:e==null?void 0:e.purchase_date,y=p&&wTe(x,STe),v=VC(x),b=f.slice(1),{displayedItems:w,hasMore:S,remainingCount:j,showAll:k,toggleShowAll:E}=$u(b,_Te),T=O=>A=>d(P=>({...P,[O]:A}));return o.jsxs(mu,{title:"Valuation",icon:Vp,isEditing:n,onEditClick:a,onCancel:i,children:[n?o.jsxs("div",{className:"details-list",children:[o.jsx(Qt,{label:kt.current_value,value:u.value,isEditing:!0,type:"currency",onChange:T("value")}),o.jsx(Qt,{label:kt.value_as_of,value:u.asOfDate,isEditing:!0,type:"date",onCh
997ange:T("asOfDate")}),o.jsx(Qt,{label:kt.value_source,value:u.source,isEditing:!0,type:"text",placeholder:"Appraisal, BOV, BPOâ¦",onChange:T("source")})]}):o.jsxs("div",{className:"details-list",children:[o.jsx(Qt,{label:kt.current_value,value:m,isEditing:!1,formatter:Be}),!p&&o.jsx(Qt,{label:kt.valuation_basis,value:"Purchase price",isEditing:!1}),o.jsx(Qt,{label:kt.value_as_of,value:x,isEditing:!1,formatter:O=>{const A=Ct(O);return v?`${A} · ${v}`:A}}),p&&t.valueSource&&o.jsx(Qt,{label:kt.value_source,value:t.valueSource,isEditing:!1})]}),y&&!n&&o.jsxs("div",{className:"flex items-center gap-1 text-xs text-warning mt-3",children:[o.jsx(Jr,{className:"h-4 w-4"}),o.jsx("span",{children:"This valuation is over a year old."})]}),p&&o.jsxs("div",{className:"mt-4 pt-4 border-t border-white/10",children:[o.jsx("div",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:"Against this valuation"}),o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx(Qt,{label:kt.equity_vs_value,value:t.equityVsValue,isEditing:!1,formatter:O=>O==null?"â":Be(O)}),o.jsx(Qt,{label:kt.ltv_vs_value,value:t.ltvVsValue,isEditing:!1,formatter:O=>O==null?"â":pr(O,1)})]})]}),b.length>0&&o.jsxs("div",{className:"mt-4 pt-4 border-t border-white/10",children:[o.jsx("div",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:"Previous Valuations"}),o.jsx("div",{className:"flex flex-col gap-2",children:w.map(O=>o.jsxs("div",{className:"flex items-center justify-between text-sm",children:[o.jsx("span",{className:"text-gray-400",children:Ct(O.asOfDate)}),o.jsx("span",{className:"text-white font-medium",children:Be(O.value)}),o.jsx("span",{className:"text-gray-500 text-xs flex-1 text-right pr-2",children:O.source||""}),n&&o.jsx("button",{onClick:()=>l(O.id),"aria-label":`Remove valuation from ${Ct(O.asOfDate)}`,className:"text-gray-500 hover:text-error transition-colors",children:o.jsx(Ir,{size:14})})]},O.id))}),S&&!n&&o.jsx("button",{onClick:E,className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto mt-3",children:k?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",j," more)"]})})]}),!p&&!n&&o.jsxs("p",{className:"text-xs text-gray-500 mt-3",children:["Using the purchase price until a valuation is added."," ",o.jsx("button",{onClick:a,className:"text-accent-light hover:text-accent underline transition-colors",children:"Add an appraisal or broker opinion"})," ","to see equity against today's value."]}),n&&o.jsx(Zx,{onSave:()=>s(u),onCancel:i,saving:c})]})};L4.propTypes={property:Q.object,loanPosition:Q.object,valuations:Q.array,isEditing:Q.bool,onEditClick:Q.func.isRequired,onCancel:Q.func.isRequired,onSave:Q.func.isRequired,onDeleteValuation:Q.func.isRequired,saving:Q.bool};L4.defaultProps={property:null,loanPosition:null,valuations:[],isEditing:!1,saving:!1};const ETe=5,kTe=e=>[{key:"purchase_date",label:kt.purchase_date,value:e.purchase_date,type:"date",formatter:Ct},{key:"purchase_price",label:kt.purchase_price,value:e.purchase_price,type:"currency",formatter:Be},{key:"total_investment_amount",label:kt.total_investment_amount,value:e.total_investment_amount,type:"currency",formatter:Be},{key:"purchase_avg_rent",label:kt.purchase_avg_rent,value:e.purchase_avg_rent,type:"currency",formatter:t=>t?`${Be(t)}/unit`:"â"},{key:"purchase_noi",label:kt.purchase_noi,value:e.purchase_noi,type:"currency",formatter:Be},{key:"purchase_occupancy",label:kt.purchase_occupancy,value:e.purchase_occupancy,type:"percentage",formatter:t=>t?pr(t,0):"â"},{key:"purchase_cap_rate",label:kt.purchase_cap_rate,value:e.purchase_cap_rate,type:"percentage",formatter:t=>t?pr(t,1):"â"}],NTe=({property:e,editedProperty:t,isEditing:r,onEditClick:n,onFieldChange:a,onSave:i,onCancel:s,saving:l})=>{const c=r?t:e,u=kTe(c),{displayedItems:d,hasMore:f,remainingCount:p,showAll:m,toggleShowAll:x}=$u(u,r?u.length:ETe);return o.jsxs(mu,{title:"Purchase Information",icon:bl,isEditing:r,onEditClick:n,onCancel:s,children:[o.jsx("div",{className:"details-list",children:d.map(y=>o.jsx(Qt,{label:y.label,value:y.value,isEditing:r,type:y.type,formatter:y.formatter,onChange:v=>a(y.key,v)},y.key))}),f&&!r&&o.jsx("button",{onClick:x,className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto mt-3",children:m?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",p," more)"]})}),(c.total_investment_notes||r)&&o.jsx("div",{className:"detail-notes mt-4 pt-4 border-t border-white/5",children:o.jsx(Qt,{label:kt.total_investment_notes,value:c.total_investment_notes,isEditing:r,type:"textarea",rows:3,onChange:y=>a("total_investment_notes",y)})}),r&&o.jsx(Zx,{onSave:i,onCancel:s,saving:l})]})},TTe=({property:e,editedProperty:t,isEditing:r,onEditClick:n,onFieldChange:a,onSave:i,onCancel:s,saving:l})=>{const c=r?t:e,u=lk.filter(f=>{var p;return(p=c.amenities)==null?void 0:p[f.key]}),d=f=>!f&&f!==0?"none":f>=80?"excellent":f>=60?"good":f>=40?"medium":"low";return o.jsxs(mu,{title:"Amenities & Location",icon:_V,isEditing:r,onEditClick:n,onCancel:s,fullWidth:!0,children:[o.jsxs("div",{className:"amenities-grid",children:[o.jsxs("div",{className:"amenities-column",children:[o.jsx("h5",{children:"Property Amenities"}),r?o.jsx("div",{className:"amenities-checkbox-grid grid grid-cols-2 gap-3",children:lk.map(f=>{var p;return o.jsx(Qt,{label:f.label,value:((p=c.amenities)==null?void 0:p[f.key])||!1,isEditing:!0,type:"checkbox",onChange:m=>a(`amenities.${f.key}`,m)},f.key)})}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"amenities-container",children:u.length>0?u.map(f=>o.jsx("span",{className:"amenity-tag",children:f.label},f.key)):o.jsx("span",{className:"text-gray-500 text-sm",children:"No amenities set"})}),o.jsxs("p",{className:"amenities-count text-xs text-gray-500",children:[u.length," of ",lk.length," amenities"]})]})]}),o.jsxs("div",{className:"amenities-column",children:[o.jsx("h5",{children:"Location Scores"}),r?o.jsx("div",{className:"scores-edit-grid space-y-3",children:L$.map(f=>o.jsx(Qt,{label:f.label,value:c[f.key],isEditing:!0,type:"number",min:0,max:100,placeholder:"0-100",onChange:p=>a(f.key,p)},f.key))}):o.jsx("div",{className:"scores-container space-y-3",children:L$.map(f=>{const p=c[f.key],m=d(p),x={excellent:"bg-emerald-500/10 text-emerald-500 border-emerald-500/20",good:"bg-emerald-400/10 text-emerald-400 border-emerald-400/20",medium:"bg-amber-500/10 text-amber-500 border-amber-500/20",low:"bg-red-500/10 text-red-500 border-red-500/20",none:"bg-gray-500/10 text-gray-500 border-gray-500/20"};return o.jsxs("div",{className:"score-item flex items-center justify-between",children:[o.jsx("span",{className:"score-label text-sm text-gray-400",children:f.label}),o.jsx("span",{className:`score-value inline-flex items-center justify-center min-w-[3rem] px-3 py-1 rounded-full text-sm font-semibold border ${x[m]}`,children:p??"â"})]},f.key)})})]})]}),r&&o.jsx(Zx,{onSave:i,onCancel:s,saving:l})]})},kX=({property:e,onUpdate:t=()=>{},onNavigateToTab:r,onDeleteRequest:n})=>
997{const{startTour:a}=Lu();N.useEffect(()=>{const I=setTimeout(()=>a(Fi.PROPERTY_INFO),500);return()=>clearTimeout(I)},[a]);const[i,s]=N.useState(null),[l,c]=N.useState(e),[u,d]=N.useState(!1),[f,p]=N.useState(!1),[m,x]=N.useState(null),y=wX(e);N.useEffect(()=>{if(!(e!=null&&e.id))return;let I=!1;return Promise.resolve().then(()=>na.getLoanPosition(e.id)).then(R=>{I||x(R)}).catch(()=>{I||x(null)}),()=>{I=!0}},[e==null?void 0:e.id,y,e==null?void 0:e.purchase_price]);const[v,b]=N.useState([]),[w,S]=N.useState(0);N.useEffect(()=>{if(!(e!=null&&e.id))return;let I=!1;return Promise.resolve().then(()=>na.listValuations(e.id)).then(R=>{I||b(Array.isArray(R)?R:[])}).catch(()=>{I||b([])}),()=>{I=!0}},[e==null?void 0:e.id,w]);const j=async I=>{var R;d(!0);try{await na.addValuation(e.id,I),S(L=>L+1),s(null);const M=await na.getLoanPosition(e.id);x(M)}catch(M){const L=(R=M==null?void 0:M.response)==null?void 0:R.data,U=[L==null?void 0:L.error,L==null?void 0:L.message].find(W=>typeof W=="string"&&W);ft.error(U||"Failed to save valuation"),console.error("Valuation save error:",M)}finally{d(!1)}},k=async I=>{var R;try{await na.deleteValuation(e.id,I),S(L=>L+1);const M=await na.getLoanPosition(e.id);x(M)}catch(M){const L=(R=M==null?void 0:M.response)==null?void 0:R.data,U=[L==null?void 0:L.error,L==null?void 0:L.message].find(W=>typeof W=="string"&&W);ft.error(U||"Failed to remove valuation"),console.error("Valuation delete error:",M)}};if(N.useEffect(()=>{e&&c({...e,amenities:(e==null?void 0:e.amenities)||{}})},[e]),N.useEffect(()=>{n&&p(!0)},[n]),!e)return null;const E=I=>{if(i&&i!==I){ft.warning("Please save or cancel your current edits first");return}s(I)},T=()=>{c({...e,amenities:(e==null?void 0:e.amenities)||{}}),s(null)},O=(I,R)=>{if(I.includes(".")){const[M,L]=I.split(".");c(U=>({...U,[M]:{...U[M],[L]:R}}))}else c(M=>({...M,[I]:R}))},A=async()=>{var I;try{d(!0);const R=await na.updateProperty(e.id,l);ft.success("Changes saved successfully"),s(null),t(R)}catch(R){const M=(I=R==null?void 0:R.response)==null?void 0:I.data,L=[M==null?void 0:M.error,M==null?void 0:M.message].find(U=>typeof U=="string"&&U);ft.error(L||"Failed to save changes"),console.error("Save error:",R)}finally{d(!1)}},P=async()=>{try{await na.deleteProperty(e.id),ft.success("Property deleted successfully"),p(!1),t(null)}catch(I){ft.error("Failed to delete property"),console.error("Error deleting property:",I)}};return o.jsxs("div",{className:"property-info-tab",children:[o.jsx(YNe,{property:e}),o.jsxs("div",{className:"content-grid",children:[o.jsx("div",{"data-tour":"property-info-details",children:o.jsx(aTe,{property:e,editedProperty:l,isEditing:i==="basic",onEditClick:()=>E("basic"),onFieldChange:O,onSave:A,onCancel:T,saving:u})}),o.jsx("div",{"data-tour":"property-info-valuation",children:o.jsx(L4,{property:e,loanPosition:m,valuations:v,isEditing:i==="valuation",onEditClick:()=>E("valuation"),onCancel:T,onSave:j,onDeleteValuation:k,saving:u})}),o.jsx("div",{"data-tour":"property-info-debt",className:"md:row-span-2",children:o.jsx(mTe,{property:e,editedProperty:l,loanPosition:m,isEditing:i==="debt",onEditClick:()=>E("debt"),onFieldChange:O,onSave:A,onCancel:T,saving:u})}),o.jsx(NTe,{property:e,editedProperty:l,isEditing:i==="purchase",onEditClick:()=>E("purchase"),onFieldChange:O,onSave:A,onCancel:T,saving:u}),o.jsx("div",{"data-tour":"property-info-activity",children:o.jsx(eTe,{propertyId:e.id,onViewAll:()=>r==null?void 0:r("reports")})}),o.jsx("div",{className:"amenities-card-wrapper",children:o.jsx(TTe,{property:e,editedProperty:l,isEditing:i==="amenities",onEditClick:()=>E("amenities"),onFieldChange:O,onSave:A,onCancel:T,saving:u})})]}),o.jsx(ki,{isOpen:f,onClose:()=>p(!1),onConfirm:P,title:"Delete Property",message:`Are you sure you want to delete "${e.name}"? This action cannot be undone.`,confirmText:"Delete",confirmVariant:"danger"})]})},Mg=({variant:e="count",children:t,className:r=""})=>{const n={beta:"badge-beta",new:"badge-new",hot:"badge-hot",instant:"badge-instant",count:"badge-count",legacy:"badge-legacy",alert:"bg-amber-500/20 text-amber-400 border border-amber-500/30"},a="badge",i=n[e]||n.count;return o.jsx("span",{className:`${a} ${i} ${r}`.trim(),children:t})};Mg.propTypes={variant:Q.oneOf(["beta","new","hot","instant","count","legacy","alert"]),children:Q.node.isRequired,className:Q.string};Mg.defaultProps={variant:"count",className:""};const NX=({onDelete:e,itemId:t,itemType:r="item",icon:n=wl,variant:a="ghost",size:i="sm",className:s="",message:l})=>{const c=zC(),u=()=>{e(t),c.close()};return o.jsxs(o.Fragment,{children:[o.jsx(rt,{onClick:c.open,variant:a,size:i,icon:n,title:`Delete ${r}`,className:s}),o.jsx(ki,{...c.modalProps,title:`Delete ${r}?`,message:l||`Are you sure you want to delete this ${r}? This action cannot be undone.`,onConfirm:u,confirmText:"Delete",cancelText:"Cancel",variant:"danger"})]})},n6=({onDelete:e,confirmMessage:t="Are you sure you want to delete this item? This action cannot be undone.",confirmTitle:r="Confirm Delete",size:n="sm",disabled:a=!1,className:i="",loading:s=!1})=>{const[l,c]=N.useState(!1),u=x=>{x.stopPropagation(),c(!0)},d=async()=>{c(!1),e&&await e()},f=()=>{c(!1)},p={sm:"p-1 text-xs",md:"p-2 text-sm",lg:"p-3 text-base"},m={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};return o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:u,disabled:a||s,className:` 998 ${p[n]} 999 rounded-lg 1000 bg-red-500/10 hover:bg-red-500/20 1001 text-red-400 hover:text-red-300 1002 border border-red-500/20 hover:border-red-500/30 1003 transition-all duration-200 1004 disabled:opacity-50 disabled:cursor-not-allowed 1005 focus:outline-none focus:ring-2 focus:ring-red-500/20 1006 ${i} 1007 `,title:"Delete",children:s?o.jsx("div",{className:`animate-spin ${m[n]}`,children:o.jsxs("svg",{className:"w-full h-full",fill:"none",viewBox:"0 0 24 24",children:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):o.jsx(wl,{className:m[n]})}),l&&o.jsx(ki,{isOpen:l,onClose:f,onConfirm:d,title:r,message:t,confirmText:"Delete",cancelText:"Cancel",confirmButtonClass:"bg-red-500 hover:bg-red-600"})]})};class a6{static toPortfolioMetrics(t){var r;return t!=null&&t.success?(r=t.monthlyTrends)!=null&&r.metrics?t.monthlyTrends.metrics.map(n=>({month_year:n.month_year,gross_revenue:n.revenue||n.gross_revenue||0,total_expenses:n.expenses||n.total_expenses||0,noi:n.noi||0,occupancy_rate:n.occupancy||0,average_rent:n.average_rent||0,dscr:n.dscr||null,delinquency_amount:0})):[]:[]}static toSummaryMetrics(t){var i,s,l,c;if(!(t!=null&&t.success)||!(t!=null&&t.breakdowns))return null;const{totalIncome:r,totalOperatingExpenses:n,noi:a}=t.breakdowns;return{gross_revenue:r||0,total_expenses:n||0,noi:a||0,occupancy_rate:((s=(i=t.monthlyTrends)==null?void 0:i.averages)==null?void 0:s.occupancy)||0,dscr:((c=(l=t.monthlyTrends)==null?void 0:l.averages)==null?void 0:c.dscr)||null}}static toChartData(t){var r,n,a,i;return t!=null&&t.success?{trends:((r=t.monthlyTrends)==null?void 0:r.metrics)||[],breakdowns:{revenue:((n=t.breakdowns)==null?void 0:n.income)||[],expenses:((a=t.breakdowns)==null?void 0:a.operatingExpenses)||[]},utilities:((i=t.utilities)==null?void 0:i.metrics)||[]}:{trends:[],breakdowns:{revenue:[],expenses:[]}}}}class uu{static extractPropertyId(t=null){try{const n=window.location.href.match(/\/property\/(\d+)/);if(n&&n[1])return n[1]}catch{}return t&&t.propertyId?t.propertyId:t&&t.property&&t.property.id?t.property.id:t&&t.metadata&&t.metadata.propertyId?t.metadata.propertyId:Array.isArray(t)&&t.length>0&&t[0].property_id?t[0].property_id:(console.warn("Could not extract property ID for metrics"),null)}static async getMetrics(t=null,r=null){const n=t||this.extractPropertyId(r);if(!n)throw new Gt("No property ID available",Bt.VALIDATION_ERROR,"Unable to identify property for metrics lookup",!1);const a=`metrics_${n}`,i=this.cache.get(a);if(i&&Date.now()-i.timestamp<this.cacheExpiry)return i.data;
1007try{const s=await Xe.get(`/metrics/comprehensive/${n}`,{params:{includeBreakdowns:!1,includeTrends:!0,includeComparisons:!1}});if(!s.data.success)throw new Gt(s.data.error||"Failed to load financial metrics",Bt.API_ERROR,"Unable to load financial metrics. Please try again.",!0);const l=a6.toPortfolioMetrics(s.data);return this.cache.set(a,{data:l,timestamp:Date.now()}),l}catch(s){throw s instanceof Gt?s:new Gt(s.message||"Failed to load metrics",Bt.API_ERROR,"Unable to load financial metrics. Please try again.",!0)}}static getAggregatedMetrics(t,r,n){if(!t||t.length===0)return null;if(!r||!n)return t[0];const a=new Date(r),i=new Date(n),s=p=>{try{const[m,x]=p.split(" "),y={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};return new Date(parseInt(x),y[m],1)}catch{return console.warn("Failed to parse month_year:",p),new Date}},l=t.filter(p=>{const m=s(p.month_year);return m>=a&&m<=i});if(l.length===0)return t[0];if(l.length===1){const p=l[0];return{...p,gross_revenue:parseFloat(p.gross_revenue)||0,total_expenses:parseFloat(p.total_expenses)||0,noi:parseFloat(p.noi)||0,occupancy_rate:parseFloat(p.occupancy_rate)||0,delinquency_amount:parseFloat(p.delinquency_amount)||0}}const c=l[0].month_year.split(" ")[0],u=l[l.length-1].month_year.split(" ")[0],d=l[0].month_year.split(" ")[1];return{month_year:`${c}-${u} ${d}`,gross_revenue:l.reduce((p,m)=>p+(parseFloat(m.gross_revenue)||0),0),total_expenses:l.reduce((p,m)=>p+(parseFloat(m.total_expenses)||0),0),noi:l.reduce((p,m)=>p+(parseFloat(m.noi)||0),0),occupancy_rate:l.reduce((p,m)=>p+(parseFloat(m.occupancy_rate)||0),0)/l.length,delinquency_amount:l.reduce((p,m)=>p+(parseFloat(m.delinquency_amount)||0),0)}}static getKPIMetrics(t,r=null,n=null){try{if(!t||t.length===0)return this.getEmptyKPIMetrics();const a=this.getAggregatedMetrics(t,r,n);if(!a)return this.getEmptyKPIMetrics();const i=a.noi||0,s=a.gross_revenue||0,l=a.total_expenses||0,c=a.occupancy_rate||0;return{noi:{value:i,change:0,positive:!0},totalIncome:{value:s,change:0,positive:!0},expenses:{value:l,change:0,positive:!0},occupancy:{value:`${c.toFixed(1)}%`,change:0,positive:!0}}}catch{return this.getEmptyKPIMetrics()}}static getEmptyKPIMetrics(){return{noi:{value:0,change:0,positive:!0},totalIncome:{value:0,change:0,positive:!0},expenses:{value:0,change:0,positive:!0},occupancy:{value:"0%",change:0,positive:!0}}}static clearCache(t=null){t?this.cache.delete(`metrics_${t}`):this.cache.clear()}static async getSummaryMetrics(t){var i;const r=t||typeof rawData=="object"&&((i=rawData==null?void 0:rawData.metadata)==null?void 0:i.propertyId);if(!r)throw new Gt("Property ID is required",Bt.VALIDATION_ERROR,"Unable to load metrics without a property ID.",!0);const n=`summary-${r}`,a=this.cache.get(n);if(a&&Date.now()-a.timestamp<this.cacheExpiry)return a.data;try{const s=await Xe.get(`/metrics/comprehensive/${r}`,{params:{includeBreakdowns:!0,includeTrends:!0,includeComparisons:!1}});if(!s.data.success)throw new Gt(s.data.error||"Failed to load summary metrics",Bt.API_ERROR,"Unable to load summary metrics. Please try again.",!0);const l=a6.toSummaryMetrics(s.data);return this.cache.set(n,{data:l,timestamp:Date.now()}),l}catch(s){throw s instanceof Gt?s:new Gt(s.message||"Failed to load summary metrics",Bt.API_ERROR,"Unable to load summary metrics. Please check your connection and try again.",!0)}}}Wn(uu,"cache",new Map),Wn(uu,"cacheExpiry",300*1e3);const jTe=(e,t,r,n)=>{const[a,i]=N.useState(!1),[s,l]=N.useState(null),c=N.useCallback(async d=>{var f,p;i(!0),l(null);try{const m=`/properties/${t}/reports/${r}/${e}/${d}`,x=await oa.delete(m);return x.data.requiresCacheUpdate&&uu.clearCache(t),ft.success("Row deleted successfully"),n&&n(d,x.data),!0}catch(m){const x=((p=(f=m.response)==null?void 0:f.data)==null?void 0:p.message)||"Failed to delete row";return l(x),ft.error(x),!1}finally{i(!1)}},[e,t,r,n]),u=N.useCallback(()=>{l(null)},[]);return{deleteRow:c,deleting:a,error:s,reset:u}},ey={"rent-roll":{tenant_name:{type:"text",editable:!0,label:"Tenant Name",placeholder:"Enter tenant name",maxLength:255,validation:{required:!0,minLength:1,maxLength:255}},monthly_rent:{type:"currency",editable:!0,label:"Monthly Rent",placeholder:"0.00",min:0,max:999999,validation:{required:!0,min:0,numeric:!0}},lease_start:{type:"date",editable:!0,label:"Lease Start",validation:{required:!0,date:!0}},lease_end:{type:"date",editable:!0,label:"Lease End",validation:{required:!0,date:!0,afterField:"lease_start"}},unit_number:{type:"text",editable:!1,label:"Unit Number"},unit_type:{type:"text",editable:!1,label:"Unit Type"},square_feet:{type:"number",editable:!1,label:"Square Feet"},market_rent:{type:"currency",editable:!1,label:"Market Rent"},deposit:{type:"currency",editable:!1,label:"Deposit"},other_deposit:{type:"currency",editable:!1,label:"Other Deposit"},move_in_date:{type:"date",editable:!1,label:"Move In Date"},move_out_date:{type:"date",editable:!1,label:"Move Out Date"},delinquency:{type:"currency",editable:!1,label:"Delinquency"},lease_status:{type:"text",editable:!1,label:"Lease Status"}},pl:{amount:{type:"currency",editable:!0,label:"Amount",placeholder:"0.00",validation:{required:!0,numeric:!0}},category:{type:"text",editable:!1,label:"Category",note:"Use Category Override to change categories"},gl_code:{type:"text",editable:!1,label:"GL Code"},month:{type:"text",editable:!1,label:"Month"}}},GC=(e,t)=>{const r=ey[e];return!r||!r[t]?!1:r[t].editable===!0},ATe=(e,t)=>
1007{const r=ey[e];return!r||!r[t]?"text":r[t].type||"text"},CTe=(e,t)=>{const r=ey[e];return!r||!r[t]?{}:r[t].validation||{}},OTe=(e,t)=>{const r=ey[e];return!r||!r[t]?t.split("_").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):r[t].label||t},PTe=(e,t,r,n={})=>{const a=ey[e];if(!a||!a[t])return null;const i=a[t],s=i.validation||{};if(s.required&&(!r||r===""))return`${i.label} is required`;if(s.numeric){const l=parseFloat(r);if(isNaN(l))return`${i.label} must be a valid number`}if(s.min!==void 0){const l=parseFloat(r);if(!isNaN(l)&&l<s.min)return`${i.label} must be at least ${s.min}`}if(s.max!==void 0){const l=parseFloat(r);if(!isNaN(l)&&l>s.max)return`${i.label} must be no more than ${s.max}`}if(s.minLength!==void 0&&r&&r.length<s.minLength)return`${i.label} must be at least ${s.minLength} characters`;if(s.maxLength!==void 0&&r&&r.length>s.maxLength)return`${i.label} must be no more than ${s.maxLength} characters`;if(s.date){const l=new Date(r);if(isNaN(l.getTime()))return`${i.label} must be a valid date`}if(s.afterField){const l=n[s.afterField];if(l&&r){const c=new Date(r),u=new Date(l);if(c<=u){const d=OTe(e,s.afterField);return`${i.label} must be after ${d}`}}}return null};class RTe{validateMapping(t,r){const n=[];return t.forEach((a,i)=>{r.forEach(s=>{try{this.validateField(a[s.sourceField],s,i+1)}catch(l){n.push(l.message)}})}),{isValid:n.length===0,errors:n}}validateField(t,r,n){if(r.required&&(t==null||t===""))throw new ok(`Row ${n}: Missing required field "${r.sourceField}"`,{field:r.sourceField,row:n});if(!(!r.required&&!t)){if(!this.validateType(t,r.type))throw new ok(`Row ${n}: Invalid type for field "${r.sourceField}". Expected ${r.type}`,{field:r.sourceField,row:n});if(r.validator&&!r.validator(t))throw new ok(`Row ${n}: Validation failed for field "${r.sourceField}"`,{field:r.sourceField,row:n})}}validateType(t,r){switch(r){case or.STRING:return sk.isString(t);case or.NUMBER:return sk.isNumber(t);case or.DATE:return sk.isDate(t);default:return!0}}validateHeaders(t,r){const n=r.filter(a=>!t.includes(a));return{isValid:n.length===0,errors:n.length>0?[`Missing required headers: ${n.join(", ")}`]:[]}}createRangeValidator(t,r){return n=>{const a=Number(n);return!isNaN(a)&&a>=t&&a<=r}}createPatternValidator(t){return r=>t.test(String(r))}getFieldRules(t,r){return CTe(t,r)}validateReportField(t,r,n,a={}){return PTe(t,r,n,a)}validateFieldValue(t,r){if(r.required&&(!t||t===""))return"This field is required";if(r.numeric){const n=parseFloat(t);if(isNaN(n))return"Must be a valid number"}if(r.min!==void 0){const n=parseFloat(t);if(!isNaN(n)&&n<r.min)return`Must be at least ${r.min}`}if(r.max!==void 0){const n=parseFloat(t);if(!isNaN(n)&&n>r.max)return`Must be no more than ${r.max}`}if(r.minLength!==void 0&&t&&t.length<r.minLength)return`Must be at least ${r.minLength} characters`;if(r.maxLength!==void 0&&t&&t.length>r.maxLength)return`Must be no more than ${r.maxLength} characters`;if(r.pattern&&!(typeof r.pattern=="string"?new RegExp(r.pattern):r.pattern).test(String(t)))return r.patternMessage||"Invalid format";if(r.date){const n=new Date(t);if(isNaN(n.getTime()))return"Must be a valid date"}return null}}const ITe=(e,t,r,n,a)=>{const[i,s]=N.useState(null),[l,c]=N.useState(new Set),[u,d]=N.useState({}),[f,p]=N.useState({}),[m,x]=N.useState(new Set),y=N.useRef({}),v=N.useRef(new Set),b=N.useCallback((R,M,L)=>{const U=`${R}-${M}`;y.current[U]=L,s({rowId:R,column:M}),d(W=>({...W,[U]:L}))},[]),w=N.useCallback((R,M,L)=>{const U=`${R}-${M}`;d(W=>({...W,[U]:L})),L!==y.current[U]?c(W=>new Set([...W,U])):c(W=>{const V=new Set(W);return V.delete(U),V}),p(W=>{const V={...W};return delete V[U],V})},[]),S=N.useCallback((R,M,L={})=>new RTe().validateReportField(t,R,M,L),[t]),j=N.useCallback(async(R,M,L)=>{var V;const U=`${R}-${M}`;if(!R)return ft.error("Cannot save: Invalid row ID"),!1;const W=S(M,L,{});if(W)return p(G=>({...G,[U]:W})),ft.error(W),!1;if(L===y.current[U])return s(null),!0;if(v.current.has(U))return!1;v.current.add(U),x(G=>new Set([...G,U]));try{const G=`/properties/${r}/reports/${n}/${t}/${R}`;let K=0;const F=2;let ne;for(;K<F;)try{ne=await oa.put(G,{[M]:L});break}catch(H){if(K++,K>=F||((V=H.response)==null?void 0:V.status)<500)throw H;await new Promise(B=>setTimeout(B,K*1e3))}return ne.data.requiresCacheUpdate&&uu.clearCache(r),a&&a(R,M,L),c(H=>{const B=new Set(H);return B.delete(U),B}),s(null),d(H=>{const B={...H};return delete B[U],B}),ft.success("Changes saved"),!0}catch(G){const K=N4(G),F=K.userMessage||K.message||"Failed to save changes";return p(ne=>({...ne,[U]:F})),ft.error(F),!1}finally{v.current.delete(U),x(G=>{const K=new Set(G);return K.delete(U),K})}},[r,n,t,S,a]),k=N.useCallback((R,M)=>{const L=`${R}-${M}`;s(null),d(U=>{const W={...U};return delete W[L],W}),c(U=>{const W=new Set(U);return W.delete(L),W}),p(U=>{const W={...U};return delete W[L],W}),delete y.current[L]},[]),E=N.useCallback((R,M)=>(i==null?void 0:i.rowId)===R&&(i==null?void 0:i.column)===M,[i]),T=N.useCallback((R,M)=>{const L=`${R}-${M}`;return l.has(L)},[l]),O=N.useCallback((R,M)=>{const L=`${R}-${M}`;return m.has(L)},[m]),A=N.useCallback((R,M,L)=>{const U=`${R}-${M}`;return u[U]!==void 0?u[U]:L},[u]),P=N.useCallback((R,M)=>{const L=`${R}-${M}`;return f[L]},[f]),I=N.useCallback(()=>{s(null),c(new Set),d({}),p({}),x(new Set),y.current={}},[]);return{editingCell:i,dirtyFields:Array.from(l),hasUnsavedChanges:l.size>0,startEditing:b,updateField:w,saveCell:j,cancelEdit:k,reset:I,isEditing:E,isDirty:T,isSaving:O,getCellValue:A,getError:P}},i6=({rowId:e,column:t,value:r,reportType:n,isEditing:a,isDirty:i,isSaving:s,error:l,onStartEdit:c,onUpdateValue:u,onSave:d,onCancel:f})=>{const[p,m]=N.useState(!1),[x,y]=N.useState(r),v=N.useRef(null);N.useEffect(()=>{y(r)},[r]),N.useEffect(()=>{a&&v.current&&v.current.focus()},[a]);const b=ATe(n,t),w=GC(n,t),S=A=>{if(A==null||A==="")return"-";switch(b){case"currency":return Be(A,{decimals:0});case"date":return Ct(A,"compact");case"number":return Ig(A,0);default:return A}},j=A=>{A.key==="Enter"?(A.preventDefault(),d()):A.key==="Escape"?(A.preventDefault(),y(r),f()):A.key},k=A=>{y(A),u(A)},E=()=>{setTimeout(()=>{var A;(A=document.activeElement)!=null&&A.closest(".edit-action-button")||d()},100)},T=()=>{const A=["py-2 px-3 text-gray-300 relative transition-all duration-200 group"];return w&&A.push("cursor-pointer"),a?A.push("bg-accent/10 ring-2 ring-accent/50 rounded-md z-10"):i?A.push("bg-orange-500/10 ring-1 ring-orange-500/30"):l?A.push("bg-red-500/10 ring-1 ring-red-500/30"):w&&p&&A.push("bg-white/5"),A.join(" ")},O=()=>{const A={ref:v,value:x||"",onChange:k,onKeyDown:j,onBlur:E,isEditing:!0,fieldClassName:"text-sm bg-transparent border-0 focus:ring-0 focus:outline-none text-white font-mono px-1 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",className:"w-full min-w-[100px]"};switch(b){case"currency":return o.jsx(Cke,{...A,min:t==="amount"?void 0:0,className:"w-full min-w-[120px]"});case"date":return o.jsx(UC,{...A,className:"w-full min-w-[140px]"});case"text":default:return o.jsx(v_,{...A,maxLength:t==="tenant_name"?255:void 0})}};return w?a?o.jsxs("td",{className:T(),children:[o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("div",{className:"flex-1",children:O()}),o.jsx("div",{className:"flex items-center space-x-1",children:s?o.jsx(ar,{className:"h-4 w-4 text-accent animate-spin"}):o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:d,className:"edit-action-button p-0.5 hover:bg-white/10 rounded",title:"Save (Enter)",children:o.jsx($n,{className:"h-3 w-3 text-green-400"})}),o.jsx("button",{onClick:()=>{y(r),f()},className:"edit-action-button p-0.5 hover:bg-white/10 rounded",title:"Cancel (Esc)",children:o.jsx(Ir,{className:"h-3 w-3 text-red-400"})})]})})]}),l&&o.jsx("div",{className:"absolute top-full left-0 mt-1 p-1 bg-red-900/90 text-red-200 text-xs rounded shadow-lg z-20",children:l})]}):o.jsxs("td",{className:T(),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),onDoubleClick:()=>{c(r)},children:[S(r),p&&!i&&!l&&o.jsx(_R,{className:"absolute right-2 top-1/2 -translate-y-1/2 h-3 w-3 text-accent/70 opacity-0 group-hover:opacity-100 transition-opacity"}),i&&o.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:o.jsx("div",{className:"h-2 w-2 bg-orange-400 rounded-full animate-pulse",title:"Unsaved changes"})}),l&&o.jsx(Jr,{className:"absolute right-2 top-1/2 -translate-y-1/2 h-3 w-3 text-red-400",title:l}),s&&o.jsx(ar,{className:"absolute right-2 top-1/2 -translate-y-1/2 h-3 w-3 text-accent animate-spin"})]}):o.jsx("td",{className:"py-2 px-3 text-gray-300",children:S(r)})},Xv={INCOME:"Income",FIXED:"Fixed",VARIABLE:"Variable",IGNORE:"Ignore"},FTe={[Xv.INCOME]:[{value:"grossPotentialRent",label:"Gross Potential Rent"},{value:"rent",label:"Rent"},{value:"vacancy",label:"Vacancy"},{value:"concessions",label:"Concessions"},{value:"delinquency",label:"Delinquency"},{value:"utilityIncome",label:"Utility Income"},{value:"parkingIncome",label:"Parking Income"},{value:"petIncome",label:"Pet Income"}
1007,{value:"laundryIncome",label:"Laundry & Vending Income"},{value:"otherIncome",label:"Other Income"}],[Xv.FIXED]:[{value:"taxesInsurance",label:"Taxes & Insurance"},{value:"generalAdmin",label:"General & Admin"},{value:"assetManagement",label:"Asset Management"},{value:"debt",label:"Debt Service"}],[Xv.VARIABLE]:[{value:"managementFees",label:"Management Fees"},{value:"unitTurns",label:"Unit Turns"},{value:"utilities",label:"Utilities"},{value:"repairMaintenance",label:"Repairs & Maintenance"},{value:"contractServices",label:"Contract Services"},{value:"marketing",label:"Marketing"},{value:"payroll",label:"Payroll & Benefits"},{value:"capitalExpenditures",label:"Capital Expenditures"},{value:"other",label:"Other Expenses"}],[Xv.IGNORE]:[{value:"ignore",label:"Ignore"}]},TX=Object.entries(FTe).flatMap(([e,t])=>t.map(r=>({...r,type:e}))),s6=e=>{const t=TX.find(r=>r.value===e);return t?t.label:e},MTe=e=>{const t=TX.find(r=>r.value===e);return t?t.type:"Unknown"},DTe=({reportDetails:e,property:t,onClose:r,onCategoryOverride:n,onDataRefresh:a})=>{var Z,ce,q,xe,pe,Se;const[i,s]=N.useState(new Set),[l,c]=N.useState({}),d=(he=>he.map(ie=>{const we={};return Object.keys(l).forEach(ke=>{const Oe=ke.indexOf("-");if(Oe===-1)return;const Ue=ke.substring(0,Oe),Je=ke.substring(Oe+1);Ue===String(ie.id)&&(we[Je]=l[ke])}),{...ie,...we}}))(((e==null?void 0:e.data)||[]).filter(he=>!i.has(he.id))),f=((Z=e==null?void 0:e.report)==null?void 0:Z.report_type)==="pl"?"pl":"rent-roll",{paginatedData:p,currentPage:m,totalPages:x,totalItems:y,startIndex:v,endIndex:b,searchTerm:w,setSearchTerm:S,nextPage:j,prevPage:k,hasNextPage:E,hasPrevPage:T,isFiltered:O,originalTotalItems:A}=Uke(d,25),P=N.useMemo(()=>f!=="pl"||!d||d.length===0?null:(w?d.filter(we=>Object.values(we).some(ke=>ke==null?!1:String(ke).toLowerCase().includes(w.toLowerCase()))):d).reduce((we,ke)=>{const Oe=ke.current_category,Ue=Oe?MTe(Oe):"Uncategorized";return we[Ue]||(we[Ue]=[]),we[Ue].push(ke),we},{}),[d,f,w]),I=N.useMemo(()=>{if(!P)return null;const he=["Income","Fixed","Variable","Ignore","Uncategorized"];return Object.entries(P).sort(([ie],[we])=>{const ke=he.indexOf(ie),Oe=he.indexOf(we);return(ke===-1?999:ke)-(Oe===-1?999:Oe)})},[P]),R=N.useCallback(he=>{s(ie=>new Set([...ie,he])),a&&a()},[a]),{deleteRow:M,deleting:L}=jTe(f,t==null?void 0:t.id,(ce=e==null?void 0:e.report)==null?void 0:ce.id,R),U=N.useCallback((he,ie,we)=>{const ke=`${he}-${ie}`;c(Oe=>({...Oe,[ke]:we})),a&&a()},[a]),{editingCell:W,hasUnsavedChanges:V,startEditing:G,updateField:K,saveCell:F,cancelEdit:ne,isEditing:H,isDirty:B,isSaving:X,getCellValue:Y,getError:ae}=ITe(d,f,t==null?void 0:t.id,(q=e==null?void 0:e.report)==null?void 0:q.id,U);if(!e)return null;const fe=["monthly_rent","market_rent","deposit","other_deposit","delinquency","amount"],ue=["move_in_date","lease_start","lease_end","move_out_date"],oe=(he,ie)=>{if(ie==null||ie==="")return"-";if(ue.includes(he)){const we=Ct(ie,"compact");return we==="N/A"?"-":we}if(fe.includes(he)){const we=Be(ie,{decimals:0});return we==="N/A"?"-":we}return typeof ie=="number"?Ig(ie,0):ie};return o.jsxs("div",{className:"glass-card p-6 mt-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("h4",{className:"text-lg font-medium text-white",children:"Report Details"}),V&&o.jsx("span",{className:"text-xs text-orange-400 font-medium px-2 py-1 bg-orange-500/10 rounded",children:"Unsaved changes"}),W&&o.jsxs("span",{className:"text-xs text-accent-light font-medium px-2 py-1 bg-accent/10 rounded flex items-center",children:[o.jsx(w5,{className:"h-3 w-3 mr-1"}),"Editing"]})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsxs("div",{className:"relative w-64",children:[o.jsx(ER,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"}),o.jsx(v_,{placeholder:"Search report data...",value:w,onChange:S,fieldClassName:"pl-9"}),w&&o.jsx(rt,{onClick:()=>S(""),variant:"ghost",size:"sm",icon:Ir,className:"absolute right-2 top-1/2 -translate-y-1/2 !p-1"})]}),o.jsx(rt,{onClick:r,variant:"ghost",size:"sm",icon:Ir})]})]}),o.jsxs("div",{className:"space-y-4 mb-6",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Report Type"}),o.jsx("p",{className:"text-white font-medium",children:(xe=e.report)==null?void 0:xe.report_type_display})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Property"}),o.jsx("p",{className:"text-white font-medium",children:((pe=e.report)==null?void 0:pe.property_name)||(t==null?void 0:t.name)})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Records"}),o.jsx("p",{className:"text-white font-medium",children:A})]})]}),((Se=e.report)==null?void 0:Se.report_type)==="pl"&&n&&o.jsx("div",{className:"p-3 bg-accent/10 border border-accent/30 rounded-lg",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(uc,{className:"h-4 w-4 text-accent-light"}),o.jsx("span",{className:"text-sm text-accent-light font-medium",children:"Expense Categorization"})]}),o.jsx(rt,{onClick:n,variant:"accent",size:"sm",children:"Adjust Categories"})]})})]}),o.jsxs("div",{className:"text-xs text-gray-400 mb-4 flex items-center",children:[o.jsx(w5,{className:"h-3 w-3 mr-1"}),"Double-click editable cells to modify values. Press Enter to save, Escape to cancel."]}),I&&I.length>0?o.jsxs("div",{className:"space-y-2",children:[w&&o.jsx("div",{className:"text-sm text-accent-light mb-3 px-4 py-2 bg-accent/10 rounded-lg",children:"Showing categories with matching items (search active)"}),I.map(([he,ie])=>o.jsx(Fg,{title:he,count:ie.length,defaultExpanded:!!w,variant:"compact",className:"border border-white/5 rounded-lg overflow-hidden",children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{className:"text-left py-2 px-3 text-xs font-medium text-gray-400 uppercase",children:"Actions"}),Object.keys(ie[0]||{}).filter(we=>!["id","current_category","auto_category","manual_category","category_source"].includes(we)).map(we=>o.jsx("th",{className:"text-left py-2 px-3 text-xs font-medium text-gray-400 uppercase",children:we.replace(/_/g," ")},we))]})}),o.jsx("tbody",{children:ie.map((we,ke)=>o.jsxs("tr",{className:`border-b border-white/5 transition-colors ${(W==null?void 0:W.rowId)===we.id?"bg-accent/5":"hover:bg-white/5"} group`,children:[o.jsx("td",{className:"py-2 px-3",children:we.id&&o.jsx(n6,{onDelete:()=>M(we.id),confirmMessage:"Are you sure you want to delete this P&L row? This will trigger a recalculation of financial metrics.",confirmTitle:"Delete Row",size:"sm",loading:L,disabled:(W==null?void 0:W.rowId)===we.id})}),Object.entries(we).filter(([Oe])=>!["id","current_category","auto_category","manual_category","category_source"].includes(Oe)).map(([Oe,Ue],Je)=>GC(f,Oe)?o.jsx(i6,{rowId:we.id,column:Oe,value:Y(we.id,Oe,Ue),reportType:f,isEditing:H(we.id,Oe),isDirty:B(we.id,Oe),isSaving:X(we.id,Oe),error:ae(we.id,Oe),onStartEdit:te=>G(we.id,Oe,te),onUpdateValue:te=>K(we.id,Oe,te),onSave:()=>{const te=Y(we.id,Oe,Ue);F(we.id,Oe,te)},onCancel:()=>ne(we.id,Oe)},Je):o.jsx("td",{className:"py-2 px-3 text-gray-300",children:oe(Oe,Ue)},Je))]},we.id||ke))})]})})},he))]}):p.length>0&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{className:"text-left py-2 px-3 text-xs font-medium text-gray-400 uppercase",children:"Actions"}),Object.keys(d[0]||{}).filter(he=>he!=="id").map(he=>o.jsx("th",{className:"text-left py-2 px-3 text-xs font-medium text-gray-400 uppercase",children:he.replace(/_/g," ")},he))]})}),o.jsx("tbody",{children:p.map((he,ie)=>o.jsxs("tr",{className:`border-b border-white/5 transition-colors ${(W==null?void 0:W.rowId)===he.id?"bg-accent/5":"hover:bg-white/5"} group`,children:[o.jsx("td",{className:"py-2 px-3",children:he.id&&o.jsx(n6,{onDelete:()=>M(he.id),confirmMessage:"Are you sure you want to delete this rent roll row? This will trigger a recalculation of financial metrics.",confirmTitle:"Delete Row",size:"sm",loading:L,disabled:(W==null?void 0:W.rowId)===he.id})}),Object.entries(he).filter(([we])=>we!=="id").map(([we,ke],Oe)=>GC(f,we)?o.jsx(i6,{rowId:he.id,column:we,value:Y(he.id,we,ke),reportType:f,isEditing:H(he.id,we),isDirty:B(he.id,we),isSaving:X(he.id,we),error:ae(he.id,we),onStartEdit:Je=>G(he.id,we,Je),onUpdateValue:Je=>K(he.id,we,Je),onSave:()=>{const Je=Y(he.id,we,ke);F(he.id,we,Je)},onCancel:()=>ne(he.id,we)},Oe):o.jsx("td",{className:"py-2 px-3 text-gray-300",children:oe(we,ke)},Oe))]},he.id||ie))})]})}),x>1&&o.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-t border-white/10",children:[o.jsxs("div",{className:"text-sm text-gray-400",children:["Showing ",v," to ",b," of ",y," records",O&&` (filtered from ${A} total)`]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(rt,{onClick:k,disabled:!T,variant:"secondary",size:"sm",children:"Previous"}),o.jsxs("span",{className:"text-sm text-gray-400",children:["Page ",m," of ",x]}),o.jsx(rt,{onClick:j,disabled:!E,variant:"secondary",size:"sm",children:"Next"})]})]})]})]})},LTe=5,$Te={live:{variant:"instant",label:()=>"Live"},superseded:{variant:"legacy",label:()=>"Superseded"},partial:{variant:"alert",label:(e,t)=>
1007`${Ig(e)} of ${Ig(e+t)} rows live`}},BTe=({report:e})=>{const t=$Te[e.liveness];if(!t)return null;const r=e.liveRowCount,n=e.supersededRowCount;return e.liveness==="partial"&&!(Number.isFinite(r)&&Number.isFinite(n))?null:o.jsx(Mg,{variant:t.variant,children:t.label(r,n)})},UTe=e=>e.start===e.end?e.start:`${e.start} â ${e.end}`,zTe=(e,t)=>{const r=t?` on ${t}`:"",n=a=>a.contiguous?UTe(a):`${Ig(a.monthCount)} months`;return e.replacedMonths?`This report replaced earlier figures for ${n(e.replacedMonths)}${r}. If you delete it, those earlier figures will be used again.`:e.liveness==="superseded"?"A newer upload has already replaced this one, so your reports and figures won't change.":e.liveMonths?`This is the only data you have for ${n(e.liveMonths)}${r}. Deleting it will leave those months empty.`:null},HTe=({property:e,onUploadClick:t,onCategoryOverride:r,onCountChange:n,reportToAutoLoad:a,onClearReportToAutoLoad:i})=>{var R;const[s,l]=N.useState([]),[c,u]=N.useState(!1),[d,f]=N.useState("all"),[p,m]=N.useState(null),[x,y]=N.useState(null),{handleError:v}=Qx();N.useEffect(()=>{e&&b()},[e]),N.useEffect(()=>{a&&a.id&&(w(a.id),i&&i())},[a]);const b=async()=>{if(e){u(!0);try{const L=(await Xe.get(`/properties/${e.id}/reports`)).data||[];l(L),n&&n(L.length)}catch(M){v(M,"Failed to load reports"),l([]),n&&n(0)}finally{u(!1)}}},w=async M=>{try{const L=await Xe.get(`/properties/${e.id}/reports/${M}`);m(M),y(L.data)}catch(L){v(L,"Failed to load report details")}},S=async M=>{try{await Xe.delete(`/properties/${e.id}/reports/${M}`),ft.success("Report deleted successfully");const L=s.filter(U=>U.id!==M);l(L),n&&n(L.length),p===M&&(m(null),y(null))}catch(L){v(L,"Failed to delete report")}},j=()=>{m(null),y(null)},k=()=>{t&&t(e.id)},E=s.filter(M=>d==="all"||M.report_type===d),{displayedItems:T,hasMore:O,remainingCount:A,showAll:P,toggleShowAll:I}=$u(E,LTe,{sortKey:"created_at",sortDirection:"desc"});return o.jsx(o.Fragment,{children:c?o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-accent border-t-transparent rounded-full"})}):s.length===0?o.jsxs("div",{className:"text-center py-12",children:[o.jsx(Sn,{className:"h-16 w-16 text-gray-600 mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-400 mb-2",children:"No Reports Uploaded"}),o.jsx("p",{className:"text-gray-500 mb-6",children:"Upload your first report to start analyzing property data"}),o.jsx(rt,{onClick:k,variant:"primary",size:"lg",children:"Upload Your First Report"})]}):o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"glass-card overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{className:"text-left py-2 px-4",children:o.jsx(al,{value:d,onChange:f,options:[{value:"all",label:"All Reports"},{value:"rent-roll",label:"Rent Roll"},{value:"pl",label:"Profit & Loss"},{value:"leasing",label:"Leasing"}],className:"w-36 text-xs","aria-label":"Filter reports by type"})}),o.jsx("th",{className:"text-left py-2 px-4 text-sm font-medium text-gray-400",children:"Period"}),o.jsx("th",{className:"text-left py-2 px-4 text-sm font-medium text-gray-400",children:"Records"}),o.jsx("th",{className:"text-left py-2 px-4 text-sm font-medium text-gray-400",children:"Uploaded"}),o.jsx("th",{className:"text-right py-2 px-4 text-sm font-medium text-gray-400",children:"Actions"})]})}),o.jsx("tbody",{children:T.map(M=>o.jsxs("tr",{className:"border-b border-white/5 hover:bg-white/5 transition-colors",children:[o.jsx("td",{className:"py-2 px-4",children:o.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-accent/20 text-accent-light",children:M.report_type_display||M.report_type})}),o.jsx("td",{className:"py-2 px-4 text-sm text-white",children:M.start_date&&M.end_date?o.jsxs(o.Fragment,{children:[Ct(M.start_date)," - ",Ct(M.end_date)]}):Ct(M.start_date||M.processed_date)}),o.jsxs("td",{className:"py-2 px-4 text-sm text-gray-400",children:[o.jsxs("div",{children:[M.record_count||0," records"]}),o.jsx(BTe,{report:M})]}),o.jsx("td",{className:"py-2 px-4 text-sm text-gray-400",children:Ct(M.created_at)}),o.jsx("td",{className:"py-2 px-4 text-right",children:o.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[o.jsx(rt,{onClick:()=>w(M.id),variant:"ghost",size:"sm",icon:cc,title:"View Details"}),o.jsx(rt,{onClick:()=>{},variant:"ghost",size:"sm",icon:vc,title:"Download"}),o.jsx(NX,{onDelete:S,itemId:M.id,itemType:"report",message:zTe(M,e==null?void 0:e.name)})]})})]},M.id))})]})}),O&&o.jsx("button",{onClick:I,className:"w-full flex items-center justify-center py-2 text-sm text-gray-400 hover:text-accent-light transition-colors duration-200",children:P?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",A," more)"]})}),p&&x&&o.jsx(DTe,{reportDetails:x,property:e,onClose:j,onCategoryOverride:((R=x.report)==null?void 0:R.report_type)==="pl"?r:null})]})})},qTe=5,WTe=({property:e,onViewAnalysis:t,onCountChange:r})=>{const[n,a]=N.useState([]),[i,s]=N.useState(!1),{handleError:l}=Qx();N.useEffect(()=>{e&&c()},[e]);const c=async()=>
1007{if(e){s(!0);try{const w=(await Xe.get(`/saved-analyses/${e.id}`)).data||[];a(w),r&&r(w.length)}catch(b){l(b,"Failed to load saved analyses"),a([]),r&&r(0)}finally{s(!1)}}},u=async b=>{try{await Xe.delete(`/saved-analyses/${b}`),ft.success("Analysis deleted successfully");const w=n.filter(S=>S.id!==b);a(w),r&&r(w.length)}catch(w){l(w,"Failed to delete analysis")}},d=async b=>{try{const S=(await Xe.get(`/saved-analyses/detail/${b.id}`)).data;t&&t(S)}catch(w){l(w,"Failed to load saved analysis")}},f=async b=>{try{await Xe.put(`/saved-analyses/${b}/activate`),await c(),ft.success("Analysis set as active")}catch(w){l(w,"Failed to activate analysis")}},{displayedItems:p,hasMore:m,remainingCount:x,showAll:y,toggleShowAll:v}=$u(n,qTe,{sortKey:"created_at",sortDirection:"desc"});return o.jsx(o.Fragment,{children:i?o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-accent border-t-transparent rounded-full"})}):n.length===0?o.jsxs("div",{className:"text-center py-12 glass-card",children:[o.jsx(yc,{className:"h-16 w-16 text-gray-600 mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-400 mb-2",children:"No Saved Analyses"}),o.jsx("p",{className:"text-gray-500 mb-6",children:"Generate and save AI analyses to access them here"}),o.jsx(rt,{onClick:()=>{},variant:"primary",size:"lg",children:"Go to AI Analysis"})]}):o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"glass-card overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Analysis Name"}),o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Date Range"}),o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Created"}),o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Status"}),o.jsx("th",{className:"text-right py-3 px-4 text-sm font-medium text-gray-400",children:"Actions"})]})}),o.jsx("tbody",{children:p.map(b=>o.jsxs("tr",{className:"border-b border-white/5 hover:bg-white/5 transition-colors",children:[o.jsx("td",{className:"py-3 px-4",children:o.jsx("span",{className:"text-white font-medium",children:b.name})}),o.jsx("td",{className:"py-3 px-4 text-sm text-gray-400",children:b.date_range?o.jsxs(o.Fragment,{children:[Ct(b.date_range.start)," -"," ",Ct(b.date_range.end)]}):"N/A"}),o.jsx("td",{className:"py-3 px-4 text-sm text-gray-400",children:Ct(b.created_at)}),o.jsx("td",{className:"py-3 px-4",children:b.is_active?o.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-green-900/20 text-green-400",children:"Active"}):o.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-gray-900/20 text-gray-400",children:"Saved"})}),o.jsx("td",{className:"py-3 px-4 text-right",children:o.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[o.jsx(rt,{onClick:()=>d(b),variant:"ghost",size:"sm",icon:cc,title:"View Analysis"}),!b.is_active&&o.jsx(rt,{onClick:()=>f(b.id),variant:"ghost",size:"sm",icon:cC,title:"Set as Active"}),o.jsx(NX,{onDelete:u,itemId:b.id,itemType:"analysis"})]})})]},b.id))})]})}),m&&o.jsx("button",{onClick:v,className:"w-full flex items-center justify-center py-2 text-sm text-gray-400 hover:text-accent-light transition-colors duration-200",children:y?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4 mr-1"}),"Show Less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4 mr-1"}),"Show All (",x," more)"]})})]})})},Xl={INCOME:"Income",FIXED:"Fixed",VARIABLE:"Variable",IGNORE:"Ignore"},VTe={[Xl.INCOME]:[{value:"grossPotentialRent",label:"Gross Potential Rent"},{value:"rent",label:"Rent"},{value:"vacancy",label:"Vacancy"},{value:"concessions",label:"Concessions"},{value:"delinquency",label:"Delinquency"},{value:"utilityIncome",label:"Utility Income"},{value:"parkingIncome",label:"Parking Income"},{value:"petIncome",label:"Pet Income"}
1007,{value:"laundryIncome",label:"Laundry & Vending Income"},{value:"otherIncome",label:"Other Income"}],[Xl.FIXED]:[{value:"taxesInsurance",label:"Taxes & Insurance"},{value:"generalAdmin",label:"General & Admin"},{value:"assetManagement",label:"Asset Management"},{value:"debt",label:"Debt Service"}],[Xl.VARIABLE]:[{value:"managementFees",label:"Management Fees"},{value:"unitTurns",label:"Unit Turns"},{value:"utilities",label:"Utilities"},{value:"repairMaintenance",label:"Repairs & Maintenance"},{value:"contractServices",label:"Contract Services"},{value:"marketing",label:"Marketing"},{value:"payroll",label:"Payroll & Benefits"},{value:"capitalExpenditures",label:"Capital Expenditures"},{value:"other",label:"Other Expenses"}],[Xl.IGNORE]:[{value:"ignore",label:"Ignore"}]},$4=Object.entries(VTe).flatMap(([e,t])=>t.map(r=>({...r,type:e}))),Dg=e=>{const t=$4.find(r=>r.value===e);return t?t.type:Xl.VARIABLE},GTe="·······",jX=({totalCount:e,selectedCount:t,allSelected:r,onSelectAll:n,onClearSelection:a,onBulkCategoryChange:i})=>{const s=l=>{const c=l.target.value;c&&i(c)};return t===0?null:o.jsx("div",{className:"sticky top-0 z-10 px-6 py-3 bg-card/95 backdrop-blur-sm border-b border-white/10 shadow-lg",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("button",{onClick:r?a:n,className:"flex items-center gap-2 px-3 py-1.5 bg-card/50 border border-white/20 rounded-lg text-white hover:bg-card/70 transition-all",children:r?o.jsxs(o.Fragment,{children:[o.jsx(Xue,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Deselect All"})]}):o.jsxs(o.Fragment,{children:[o.jsx(Gue,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Select All"})]})}),o.jsxs("span",{className:"text-sm text-white font-medium",children:[t," of ",e," selected"]}),o.jsxs("button",{onClick:a,className:"flex items-center gap-2 text-sm text-gray-400 hover:text-white transition-colors",children:[o.jsx(Ir,{className:"h-4 w-4"}),"Clear"]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-sm text-gray-400",children:"Apply category to selected:"}),o.jsxs("select",{onChange:s,defaultValue:"","aria-label":"Apply category to selected items",className:` 1008 px-4 py-2 bg-card/50 border border-white/20 rounded-lg 1009 text-white text-sm 1010 focus:outline-none focus:border-accent 1011 cursor-pointer 1012 min-w-[180px] 1013 `,children:[o.jsx("option",{value:"",disabled:!0,children:"Choose category..."}),$4.map(l=>o.jsx("option",{value:l.value,children:l.label},l.value))]})]})]})})};jX.propTypes={totalCount:Q.number.isRequired,selectedCount:Q.number.isRequired,allSelected:Q.bool.isRequired,onSelectAll:Q.func.isRequired,onClearSelection:Q.func.isRequired,onBulkCategoryChange:Q.func.isRequired};const AX=({newItemsCount:e,onExpand:t})=>e===0?null:o.jsxs("div",{className:"p-4 bg-amber-500/10 border border-amber-500/30 rounded-lg flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Jr,{className:"h-5 w-5 text-amber-400"}),o.jsxs("div",{children:[o.jsxs("p",{className:"text-white font-medium",children:[e," new ",e===1?"item":"items"," need categorization"]}),o.jsx("p",{className:"text-sm text-amber-400 mt-0.5",children:"New items are highlighted below. Review and assign categories."})]})]}),t&&o.jsxs("button",{onClick:t,className:"px-4 py-2 bg-amber-500/20 border border-amber-500/40 rounded-lg text-amber-300 hover:bg-amber-500/30 transition-all flex items-center gap-2",children:[o.jsx("span",{className:"text-sm",children:"Show All Items"}),o.jsx(kr,{className:"h-4 w-4"})]})]});AX.propTypes={newItemsCount:Q.number.isRequired,onExpand:Q.func};const B4=({propertyId:e,onApplyPreset:t,hasChanges:r})=>{const[n,a]=N.useState([]),[i,s]=N.useState(""),[l,c]=N.useState(!1),[u,d]=N.useState(!1),f=JY(["applyPresetModal"]),[p,m]=N.useState(null),x=N.useCallback(async()=>{try{const j=await Xe.get("/categorization/presets");a(j.data.presets||[])}catch(j){console.error("Error loading presets:",j)}},[]);N.useEffect(()=>{x()},[x]);const y=async j=>{const k=j.target.value;if(!k){s("");return}if(r){m(k),f.applyPresetModal.open();return}await v(k)},v=async j=>{var k;c(!0),s(j);try{await Xe.post(`/categorization/property/${e}/apply-preset`,{presetId:j});const E=((k=n.find(T=>T.id===j))==null?void 0:k.name)||"Preset";ft.success(`Applied "${E}" successfully`),t&&t(),s("")}catch(E){console.error("Error applying preset:",E),ft.error("Failed to apply preset")}finally{c(!1),m(null),f.applyPresetModal.close()}},b=()=>{p&&v(p)},w=()=>{m(null),s(""),f.applyPresetModal.close()},S=()=>{d(!1),x()};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("select",{value:i,onChange:y,disabled:l,"aria-label":"Select a preset to load",className:"text-xs bg-card/50 border border-white/20 rounded px-2 py-1.5 text-gray-300 focus:border-accent focus:outline-none focus:ring-1 focus:ring-accent/20 disabled:opacity-50",children:[o.jsx("option",{value:"",children:"Load Preset..."}),n.map(j=>o.jsx("option",{value:j.id,children:j.name},j.id))]}),o.jsxs("button",{onClick:()=>d(!0),className:"flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium bg-gray-700/50 hover:bg-gray-700/70 border border-white/10 hover:border-white/20 rounded text-gray-300 hover:text-white transition-all duration-200 whitespace-nowrap",title:"Manage saved presets",children:[o.jsx(uc,{className:"w-3.5 h-3.5"}),"Manage Presets"]}
1013)]}),o.jsx(M4,{isOpen:u,onClose:S}),o.jsx(ki,{...f.applyPresetModal.modalProps,title:"Apply Preset?",message:"You have unsaved changes. Applying a preset will discard your current changes. Continue?",onConfirm:b,onCancel:w,confirmText:"Apply Preset",cancelText:"Cancel",variant:"warning"})]})};B4.propTypes={propertyId:Q.string.isRequired,onApplyPreset:Q.func,hasChanges:Q.bool};B4.defaultProps={hasChanges:!1};const CX=({onSearch:e,placeholder:t="Search by description or GL code...",debounceMs:r=300})=>{const[n,a]=N.useState(""),i=b_(n,r);N.useEffect(()=>{e(i)},[i,e]);const s=N.useCallback(()=>{a("")},[]),l=N.useCallback(c=>{a(c.target.value)},[]);return o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:o.jsx(ER,{className:"h-4 w-4 text-gray-500"})}),o.jsx("input",{type:"text",value:n,onChange:l,placeholder:t,className:` 1014 w-full pl-10 pr-10 py-2 1015 bg-card/50 border border-white/20 rounded-lg 1016 text-white text-sm 1017 placeholder-gray-500 1018 focus:outline-none focus:border-accent 1019 transition-colors 1020 `}),n&&o.jsx("button",{onClick:s,className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-500 hover:text-white transition-colors","aria-label":"Clear search",children:o.jsx(Ir,{className:"h-4 w-4"})})]})};CX.propTypes={onSearch:Q.func.isRequired,placeholder:Q.string,debounceMs:Q.number};const KTe=[{key:"description",label:"Description",sortable:!0},{key:"glCode",label:"GL Code",sortable:!0,align:"right"},{key:"type",label:"Type",sortable:!0},{key:"category",label:"Category",sortable:!0},{key:"override",label:"Override",sortable:!0,align:"center"}],OX=({sortConfig:e,onSort:t,showCheckbox:r})=>{const n=a=>e.key!==a?null:e.direction==="asc"?o.jsx(eo,{className:"w-3 h-3"}):o.jsx(kr,{className:"w-3 h-3"});return o.jsxs("div",{className:"grid items-center gap-4 h-10 px-4 text-xs text-gray-400 uppercase tracking-wide border-b border-white/10 bg-card/30 sticky top-0 z-10",style:{gridTemplateColumns:r?"24px minmax(180px, 1fr) 90px 80px 200px 70px":"minmax(180px, 1fr) 90px 80px 200px 70px"},children:[r&&o.jsx("div",{}),KTe.map(a=>o.jsx("div",{className:`flex items-center gap-1 ${a.align==="right"?"justify-end":a.align==="center"?"justify-center":""}`,"aria-sort":e.key===a.key?e.direction==="asc"?"ascending":"descending":void 0,children:a.sortable?o.jsxs("button",{type:"button",onClick:()=>t(a.key),className:"flex items-center gap-1 bg-transparent border-none p-0 cursor-pointer hover:text-white transition-colors text-xs text-gray-400 uppercase tracking-wide","aria-label":`Sort by ${a.label}`,children:[a.label,n(a.key)]}):o.jsx("span",{children:a.label})},a.key))]})};OX.propTypes={sortConfig:Q.shape({key:Q.string,direction:Q.oneOf(["asc","desc"])}).isRequired,onSort:Q.func.isRequired,showCheckbox:Q.bool};const PX=({item:e,isSelected:t=!1,isNew:r=!1,onSelect:n,onCategoryChange:a,currentCategory:i,hasPendingChange:s=!1,showCheckbox:l=!1})=>{const c=Dg(i),u=f=>{a(e.description,f.target.value,e.currentCategory)},d=f=>{n&&n(e.description,f.target.checked,f.shiftKey)};return o.jsxs("div",{className:` 1021 grid items-center gap-4 h-10 px-4 rounded 1022 transition-colors hover:bg-card/30 1023 ${r?"bg-amber-500/10 border border-amber-500/30":""} 1024 ${t?"bg-accent/10":""} 1025 `,style:{gridTemplateColumns:l?"24px minmax(180px, 1fr) 90px 80px 200px 70px":"minmax(180px, 1fr) 90px 80px 200px 70px"},children:[l&&o.jsx("div",{className:"flex items-center",children:o.jsx("input",{type:"checkbox",checked:t,onChange:d,className:"w-4 h-4 bg-card/50 border-white/20 rounded text-accent focus:ring-accent focus:ring-offset-0","aria-label":`Select ${e.description}`})}),o.jsx("div",{className:"min-w-0 pr-4",title:e.description,children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"text-white text-sm truncate",children:e.description}),s&&o.jsx("span",{className:"text-xs px-1.5 py-0.5 bg-accent/20 text-accent rounded flex-shrink-0",children:"Pending"})]})}),o.jsx("div",{className:"text-right text-xs text-gray-500 font-mono",children:e.glCode||GTe}),o.jsx("div",{className:"text-sm text-gray-300",children:c}),o.jsx("select",{value:i,onChange:u,"data-tour":"categorization-dropdown",className:` 1026 w-full px-2 py-1 1027 bg-card/50 border border-white/20 rounded 1028 text-white text-xs 1029 focus:outline-none focus:border-accent 1030 cursor-pointer 1031 `,"aria-label":`Category for ${e.description}`,children:$4.map(f=>o.jsx("option",{value:f.value,children:f.label},f.value))}),o.jsx("div",{className:"flex items-center justify-center",children:e.isManualOverride&&o.jsx($n,{className:"w-4 h-4 text-blue-400"})})]})};PX.propTypes={item:Q.shape({description:Q.string.isRequired,glCode:Q.string,currentCategory:Q.string.isRequired,isManualOverride:Q.bool,amount:Q.number}).isRequired,isSelected:Q.bool,isNew:Q.bool,onSelect:Q.func,onCategoryChange:Q.func.isRequired,currentCategory:Q.string.isRequired,hasPendingChange:Q.bool,showCheckbox:Q.bool};const YTe=se.memo(PX),XTe=[{key:Xl.INCOME,label:"Income",color:"green"},{key:Xl.FIXED,label:"Fixed",color:"blue"},{key:Xl.VARIABLE,label:"Variable",color:"purple"},{key:Xl.IGNORE,label:"Ignore",color:"gray"}],RX=({selectedTypes:e,onToggle:t,counts:r={},showNewFilter:n=!1,newItemsCount:a=0,newFilterSelected:i=!1,onNewFilterToggle:s})=>{const l=(c,u)=>{const d="flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium transition-all duration-200 cursor-pointer border";if(u)switch(c){case"green":return`${d} bg-green-500/20 text-green-400 border-green-500/50 hover:bg-green-500/30`;case"blue":return`${d} bg-blue-500/20 text-blue-400 border-blue-500/50 hover:bg-blue-500/30`;case"purple":return`${d} bg-purple-500/20 text-purple-400 border-purple-500/50 hover:bg-purple-500/30`;case"gray":return`${d} bg-gray-500/20 text-gray-400 border-gray-500/50 hover:bg-gray-500/30`;case"amber":return`${d} bg-amber-500/20 text-amber-400 border-amber-500/50 hover:bg-amber-500/30`;default:return`${d} bg-accent/20 text-accent border-accent/50 hover:bg-accent/30`}else return`${d} bg-transparent text-gray-400 border-white/10 hover:border-white/30 hover:text-white`};return o.jsxs("div",{className:"flex items-center gap-1.5",role:"group","aria-label":"Filter by category type",children:[n&&a>0&&o.jsxs("button",{onClick:s,"aria-pressed":i,className:l("amber",i),title:`Click to ${i?"show all items":"show only new items"}`,children:[o.jsx("span",{children:"New"}),o.jsx("span",{className:`px-1.5 py-0.5 rounded-full text-[10px] ${i?"bg-white/10":"bg-white/5"}`,children:a})]}),n&&a>0&&o.jsx("div",{className:"w-px h-4 bg-white/10 mx-1"}),XTe.map(c=>{const u=e.has(c.key),d=r[c.key]||0;return o.jsxs("button",{onClick:()=>t(c.key),"aria-pressed":u,className:l(c.color,u),title:`Click to ${u?"exclude":"include"} ${c.label} items`,children:[o.jsx("span",{children:c.label}),d>0&&o.jsx("span",{className:`px-1.5 py-0.5 rounded-full text-[10px] ${u?"bg-white/10":"bg-white/5"}`,children:d})]},c.key)})]})};RX.propTypes={selectedTypes:Q.instanceOf(Set).isRequired,onToggle:Q.func.isRequired,counts:Q.object,showNewFilter:Q.bool,newItemsCount:Q.number,newFilterSelected:Q.bool,onNewFilterToggle:Q.func};const IX="SET_ITEMS",FX="UPDATE_CATEGORY",MX="BULK_UPDATE_CATEGORY",DX="RESET_CHANGES",LX="SET_SAVING",$X="SET_ERROR",BX="RESET",UX={items:[],changes:{},saving:!1,error:null},JTe=(e,t)=>
1031{switch(t.type){case IX:return{...e,items:t.payload};case FX:const{description:r,newCategory:n,originalCategory:a}=t.payload;if(n===a){const{[r]:c,...u}=e.changes;return{...e,changes:u}}return{...e,changes:{...e.changes,[r]:n}};case MX:const{descriptions:i,category:s}=t.payload,l={};return i.forEach(c=>{const u=e.items.find(d=>d.description===c);u&&s!==u.currentCategory&&(l[c]=s)}),{...e,changes:{...e.changes,...l}};case DX:return{...e,changes:{}};case LX:return{...e,saving:t.payload};case $X:return{...e,error:t.payload};case BX:return UX;default:return e}},QTe=(e=[])=>{const[t,r]=N.useReducer(JTe,{...UX,items:e}),n=N.useMemo(()=>Object.keys(t.changes).length>0,[t.changes]),a=N.useMemo(()=>Object.keys(t.changes).length,[t.changes]),i=N.useCallback(x=>{r({type:IX,payload:x})},[]),s=N.useCallback((x,y,v)=>{r({type:FX,payload:{description:x,newCategory:y,originalCategory:v}})},[]),l=N.useCallback((x,y)=>{r({type:MX,payload:{descriptions:x,category:y}})},[]),c=N.useCallback(()=>{r({type:DX})},[]),u=N.useCallback(x=>{r({type:LX,payload:x})},[]),d=N.useCallback(x=>{r({type:$X,payload:x})},[]),f=N.useCallback(()=>{r({type:BX})},[]),p=N.useCallback((x,y)=>t.changes[x]||y,[t.changes]),m=N.useCallback(x=>x in t.changes,[t.changes]);return{items:t.items,changes:t.changes,saving:t.saving,error:t.error,hasChanges:n,changesCount:a,setItems:i,updateCategory:s,bulkUpdateCategory:l,resetChanges:c,setSaving:u,setError:d,reset:f,getCurrentCategory:p,hasPendingChange:m}},ZTe=(e=[])=>{const[t,r]=N.useState(new Set),[n,a]=N.useState(null),i=N.useMemo(()=>t.size,[t]),s=N.useMemo(()=>t.size>0,[t]),l=N.useMemo(()=>e.length>0&&t.size===e.length,[t,e]),c=N.useMemo(()=>Array.from(t),[t]),u=N.useCallback((x,y,v=!1)=>{r(w=>{const S=new Set(w);if(v&&n!==null){const j=e.findIndex(k=>k.description===x);if(j!==-1){const k=Math.min(n,j),E=Math.max(n,j);for(let T=k;T<=E;T++)y?S.add(e[T].description):S.delete(e[T].description)}}else y?S.add(x):S.delete(x);return S});const b=e.findIndex(w=>w.description===x);b!==-1&&a(b)},[e,n]),d=N.useCallback(()=>{const x=new Set(e.map(y=>y.description));r(x)},[e]),f=N.useCallback(()=>{r(new Set),a(null)},[]),p=N.useCallback(x=>t.has(x),[t]),m=N.useCallback(x=>{r(new Set(x))},[]);return{selectedIds:t,selectedCount:i,hasSelection:s,allSelected:l,selectedDescriptions:c,toggleSelection:u,selectAll:d,clearSelection:f,isSelected:p,selectItems:m}},eje=(e,t=[])=>t.some(r=>r.description===e.description&&(r.glCode===e.glCode||!r.glCode&&!e.glCode)),tje=(e,t)=>`${e.description}-${e.glCode||t}`,rje=(e,t)=>{if(!t||t.trim()==="")return e;const r=t.toLowerCase().trim();return e.filter(n=>n.description.toLowerCase().includes(r)||n.glCode&&n.glCode.toLowerCase().includes(r))},nje=(e,t,r)=>t.key?[...e].sort((n,a)=>{let i,s;switch(t.key){case"description":i=n.description.toLowerCase(),s=a.description.toLowerCase();break;case"glCode":i=n.glCode||"",s=a.glCode||"";break;case"type":i=Dg(r(n.description,n.currentCategory)),s=Dg(r(a.description,a.currentCategory));break;case"category":i=r(n.description,n.currentCategory),s=r(a.description,a.currentCategory);break;case"override":i=n.isManualOverride?1:0,s=a.isManualOverride?1:0;break;default:return 0}return i<s?t.direction==="asc"?-1:1:i>s?t.direction==="asc"?1:-1:0}):e,aje=(e,t,r)=>!t||t.size===0?e:e.filter(n=>{const a=r(n.description,n.currentCategory),i=Dg(a);return t.has(i)}),ije=(e,t)=>{const r={Income:0,Fixed:0,Variable:0,Ignore:0};return e.forEach(n=>{const a=t(n.description,n.currentCategory),i=Dg(a);r[i]!==void 0&&r[i]++}),r},U4=({propertyId:e,propertyName:t,mode:r="manual",items:n=[],newItems:a=[],onSave:i,onCancel:s,onClose:l})=>{const{items:c,changes:u,saving:d,error:f,hasChanges:p,changesCount:m,setItems:x,updateCategory:y,bulkUpdateCategory:v,resetChanges:b,setSaving:w,setError:S,getCurrentCategory:j,hasPendingChange:k}=QTe(n),{startTour:E}=Lu();N.useEffect(()=>{const Ee=setTimeout(()=>E(Fi.CATEGORIZATION),500);return()=>clearTimeout(Ee)},[E]);const{selectedCount:T,hasSelection:O,allSelected:A,selectedDescriptions:P,toggleSelection:I,selectAll:R,clearSelection:M,isSelected:L}=ZTe(c),U=JY(["cancelModal","skipModal","savePresetModal"]),[W,V]=N.useState(""),[G,K]=N.useState(""),[F,ne]=N.useState(!1),[H,B]=N.useState(r==="review-new"&&a.length>0),[X,Y]=N.useState(""),[ae,fe]=N.useState({key:null,direction:"asc"}),[ue,oe]=N.useState(new Set),Z=r==="manual"||r==="initial"||r==="review-new";N.useEffect(()=>{x(n)},[n,x]);const ce=N.useMemo(()=>ije(c,j),[c,j]),q=N.useMemo(()=>{let Ee=c;return r==="review-new"&&H&&(Ee=c.filter(Me=>a.some(Ae=>Ae.description===Me.description&&(Ae.glCode===Me.glCode||!Ae.glCode&&!Me.glCode)))),ue.size>0&&(Ee=aje(Ee,ue,j)),X&&(Ee=rje(Ee,X)),Ee=nje(Ee,ae,j),Ee},[c,a,r,H,ue,X,ae,j]),xe=N.useCallback((Ee,Me,Ae)=>{y(Ee,Me,Ae)},[y]),pe=N.useCallback((Ee,Me,Ae=!1)=>{I(Ee,Me,Ae)},[I]),Se=N.useCallback(Ee=>{v(P,Ee),M(),ft.success(`Applied ${Ee} to ${T} items`)},[v,P,T,M]),he=N.useCallback(Ee=>{Y(Ee)},[]),ie=N.useCallback(Ee=>{fe(Me=>Me.key===Ee?{key:Ee,direction:Me.direction==="asc"?"desc":"asc"}:{key:Ee,direction:"asc"})},[]),we=N.useCallback(Ee=>{oe(Me=>{const Ae=new Set(Me);return Ae.has(Ee)?Ae.delete(Ee):Ae.add(Ee),Ae})},[]),ke=N.useMemo(()=>{const Ee={};
1031return c.forEach(Me=>{(Me.isManualOverride||u[Me.description])&&(Ee[Me.description]=j(Me.description,Me.currentCategory))}),Ee},[c,u,j]),Oe=N.useCallback(()=>{i&&i()},[i]),Ue=N.useCallback(()=>{V(""),K(""),U.savePresetModal.open()},[U.savePresetModal]),Je=N.useCallback(async()=>{var Ee,Me;if(!W.trim())throw new Error("Preset name is required");if(Object.keys(ke).length===0)throw new Error("No category overrides to save. Make changes to categories first.");ne(!0);try{await Xe.post("/categorization/presets",{name:W.trim(),description:G.trim()||null,mappings:ke}),ft.success(`Preset "${W}" saved successfully`),V(""),K(""),U.savePresetModal.close()}catch(Ae){throw console.error("Error saving preset:",Ae),new Error(((Me=(Ee=Ae==null?void 0:Ae.response)==null?void 0:Ee.data)==null?void 0:Me.error)||Ae.message||"Failed to save preset")}finally{ne(!1)}},[W,G,ke,U.savePresetModal]),Ze=async()=>{var Ee,Me;if(!p){ft.warning("No changes to save");return}w(!0),S(null);try{const Ae=Object.entries(u).map(([Ce,xt])=>Xe.put(`/categorization/property/${e}/expense`,{expenseDescription:Ce,newCategory:xt})),Ke=await Promise.allSettled(Ae),jt=Ke.filter(Ce=>Ce.status==="rejected");if(jt.length>0){const Ce=Ke.length-jt.length;if(Ce>0)ft.warning(`Saved ${Ce} of ${Ke.length} changes. ${jt.length} failed.`);else throw new Error(`All ${jt.length} updates failed`)}r==="initial"&&await Xe.post(`/categorization/property/${e}/set-baseline`),ft.success(`Successfully updated ${m} ${m===1?"categorization":"categorizations"}`),b(),i&&i()}catch(Ae){console.error("Error saving categorizations:",Ae);const Ke=((Me=(Ee=Ae==null?void 0:Ae.response)==null?void 0:Ee.data)==null?void 0:Me.error)||Ae.message||"Failed to save changes";S(Ke),ft.error(Ke)}finally{w(!1)}},te=()=>{p?U.cancelModal.open():(s&&s(),l&&l())},ve=()=>{b(),U.cancelModal.close(),s&&s(),l&&l()},J=()=>{U.skipModal.open()},me=async()=>{try{await Xe.post(`/categorization/property/${e}/set-baseline`),ft.success("Categorization skipped"),U.skipModal.close(),i&&i()}catch(Ee){console.error("Error skipping categorization:",Ee),ft.error("Failed to skip categorization"),U.skipModal.close()}};return o.jsxs(rp,{children:[o.jsxs("div",{className:"flex flex-col h-full bg-gradient-to-br from-primary via-primary-dark to-card/50",children:[o.jsxs("div",{className:"px-6 py-4 border-b border-white/10",children:[o.jsxs("div",{className:"flex items-start justify-between mb-3",children:[o.jsx("div",{children:r==="initial"?o.jsxs(o.Fragment,{children:[o.jsxs("h2",{className:"text-xl font-bold text-white",children:["Initial Categorization Review",o.jsxs("span",{className:"text-gray-400 font-normal text-base ml-2",children:["â ",t]})]}),o.jsx("p",{className:"text-sm text-gray-400 mt-1.5",children:"One-time setup ⢠Future uploads only highlight new items ⢠Review and update anytime via the Reports tab"})]}):o.jsxs(o.Fragment,{children:[o.jsx("h2",{className:"text-xl font-bold text-white",children:"Expense Categorization"}),o.jsx("p",{className:"text-sm text-gray-400 mt-0.5",children:t})]})}),o.jsx("button",{onClick:te,className:"p-1.5 text-gray-400 hover:text-white hover:bg-white/10 rounded-lg transition-all",title:p?"Cancel changes":"Close",children:o.jsx(Ir,{className:"h-5 w-5"})})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[(r==="manual"||r==="initial"||r==="review-new")&&o.jsx(B4,{propertyId:e,onApplyPreset:Oe,hasChanges:p}),c.length>0&&o.jsx("div",{className:"w-px h-5 bg-white/10"}),c.length>0&&o.jsx(RX,{selectedTypes:ue,onToggle:we,counts:ce,showNewFilter:r==="review-new",newItemsCount:a.length,newFilterSelected:H,onNewFilterToggle:()=>B(!H)})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[r==="initial"&&o.jsx("button",{onClick:J,className:"px-3 py-1.5 text-sm bg-card border border-white/20 rounded-lg text-white hover:bg-card/70 transition-all",children:"Skip for Now"}),r==="review-new"&&!p&&o.jsx("button",{onClick:J,className:"px-3 py-1.5 text-sm bg-card border border-white/20 rounded-lg text-white hover:bg-card/70 transition-all",children:"Continue"}),p&&o.jsxs("span",{className:"text-sm text-gray-400",children:[m," ",m===1?"change":"changes"]}),Object.keys(ke).length>0&&o.jsxs("button",{onClick:Ue,className:"px-3 py-1.5 text-sm bg-card border border-white/20 rounded-lg text-white hover:bg-card/70 transition-all flex items-center gap-2",title:"Save current category mappings as a reusable preset",children:[o.jsx(Cce,{className:"h-4 w-4"}),"Save as Preset"]}),o.jsx("button",{onClick:Ze,disabled:!p||d,"data-tour":"categorization-save",className:"px-4 py-1.5 text-sm bg-gradient-to-r from-accent to-accent-light text-primary font-medium rounded-lg hover:shadow-glow disabled:opacity-50 transition-all flex items-center gap-2",children:d?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),"Saving..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Po,{className:"h-4 w-4"}),"Save Changes"]})})]})]})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:[Z&&O&&o.jsx(jX,{totalCount:c.length,selectedCount:T,allSelected:A,onSelectAll:R,onClearSelection:M,onBulkCategoryChange:Se}),o.jsxs("div",{className:"p-4 space-y-3",children:[c.length>0&&r!=="initial"&&o.jsx(CX,{onSearch:he}),f&&o.jsx("div",{className:"p-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:o.jsx("p",{className:"text-sm",children:f})}),r==="review-new"&&a.length>0&&o.jsx(AX,{newItemsCount:a.length}),q.length>0&&o.jsxs("div",{className:"bg-card/30 rounded-lg border border-white/10 overflow-hidden","data-tour":"categorization-line-items",children:[o.jsx(OX,{sortConfig:ae,onSort:ie,showCheckbox:Z}),o.jsx("div",{className:"divide-y divide-white/5",children:q.map((Ee,Me)=>o.jsx(YTe,{item:Ee,isSelected:L(Ee.description),isNew:eje(Ee,a),onSelect:Z?pe:void 0,onCategoryChange:xe,currentCategory:j(Ee.description,Ee.currentCategory),hasPendingChange:k(Ee.description),showCheckbox:Z},tje(Ee,Me)))})]}),c.length===0&&o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx("p",{className:"text-gray-500",children:"No categorizations to review"})})]})]})]}),o.jsx(ki,{...U.cancelModal.modalProps,title:"Discard Changes?",message:"You have unsaved changes. Are you sure you want to cancel?",onConfirm:ve,confirmText:"Discard Changes",cancelText:"Keep Editing",variant:"warning"}),o.jsx(ki,{...U.skipModal.modalProps,title:"Skip Categorization?",message:"You can categorize these expenses later from the Reports tab. Are you sure you want to skip?",onConfirm:me,confirmText:"Skip",cancelText:"Keep Editing",variant:"info"}),o.jsxs(A4,{...U.savePresetModal.modalProps,title:"Save as Preset",onSubmit:Je,submitText:"Save Preset",loading:F,submitDisabled:!W.trim(),size:"sm",children:[o.jsx(Qt,{label:"Preset Name",value:W,onChange:V,isEditing:!0,placeholder:"e.g., Property Management Company A",required:!0}),o.jsx(Qt,{label:"Description",value:G,onChange:K,isEditing:!0,type:"textarea",placeholder:"Optional description of when to use this preset",rows:2}),o.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["This preset will save ",Object.keys(ke).length," category"," ",Object.keys(ke).length===1?"mapping":"mappings"," for reuse on other properties."]})]})]})};
1031U4.propTypes={propertyId:Q.string.isRequired,propertyName:Q.string.isRequired,mode:Q.oneOf(["initial","review-new","manual"]),items:Q.arrayOf(Q.shape({description:Q.string.isRequired,glCode:Q.string,currentCategory:Q.string.isRequired,isManualOverride:Q.bool,amount:Q.number})),newItems:Q.arrayOf(Q.shape({description:Q.string.isRequired,glCode:Q.string,currentCategory:Q.string.isRequired})),onSave:Q.func,onCancel:Q.func,onClose:Q.func};const zX=({isOpen:e,propertyId:t,propertyName:r,onClose:n})=>{const[a,i]=N.useState([]),[s,l]=N.useState(!1),[c,u]=N.useState(null),d=N.useRef(!1),f=N.useCallback(w=>{const S=[];return Object.entries(w).forEach(([j,k])=>{k.items.forEach(E=>{S.push({description:E.description,glCode:E.glCode||null,currentCategory:j,isManualOverride:E.isManualOverride||!1,amount:E.amount||null})})}),S.sort((j,k)=>j.description.localeCompare(k.description)),S},[]),p=N.useCallback(()=>{ft.info("No expense categories found. Upload a P&L statement first to set up expense categorization."),n&&n()},[n]),m=N.useCallback(async()=>{var w,S;if(t){l(!0),u(null);try{const j=await Xe.get(`/categorization/property/${t}`),k=f(j.data.categorizations);if(k.length===0){l(!1),p();return}i(k)}catch(j){console.error("Error loading categorization data:",j);const k=((S=(w=j==null?void 0:j.response)==null?void 0:w.data)==null?void 0:S.error)||j.message||"Failed to load data";u(k),ft.error(k)}finally{l(!1)}}},[t,f,p]);N.useEffect(()=>{e&&t&&m()},[e,t,m]);const x=N.useCallback(()=>{m()},[m]),y=N.useCallback(()=>{n&&n()},[n]),v=N.useCallback(w=>{d.current=w.target===w.currentTarget},[]),b=N.useCallback(w=>{w.target===w.currentTarget&&d.current&&(d.current=!1,y())},[y]);return e?o.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm flex items-center justify-center z-50",onMouseDown:v,onClick:b,children:o.jsx("div",{className:"bg-card rounded-xl border border-white/20 w-full max-w-6xl h-[90vh] flex flex-col",children:s?o.jsx("div",{className:"flex items-center justify-center py-24",children:o.jsxs("div",{className:"flex flex-col items-center gap-4",children:[o.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-accent"}),o.jsx("span",{className:"text-gray-400",children:"Loading categorizations..."})]})}):c?o.jsx("div",{className:"flex flex-col items-center justify-center py-24 px-6",children:o.jsxs("div",{className:"p-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400 max-w-md text-center",children:[o.jsx("p",{className:"text-sm",children:c}),o.jsx("button",{onClick:m,className:"mt-4 px-4 py-2 bg-card border border-white/20 rounded-lg text-white hover:bg-card/70 transition-all",children:"Retry"})]})}):o.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:o.jsx(U4,{propertyId:t,propertyName:r,mode:"manual",items:a,newItems:[],onSave:x,onClose:y})})})}):null};zX.propTypes={isOpen:Q.bool.isRequired,propertyId:Q.string,propertyName:Q.string,onClose:Q.func.isRequired};const HX=({property:e,onUploadClick:t,onViewAnalysis:r,reportToAutoLoad:n,onClearReportToAutoLoad:a})=>{const[i,s]=N.useState(!1),[l,c]=N.useState(0),[u,d]=N.useState(0),f=()=>{t&&e&&t(e.id)};return o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-white",children:"Property Reports"}),o.jsx("p",{className:"text-sm text-gray-400",children:"Upload and manage rent rolls and P&L statements"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(rt,{onClick:()=>s(!0),variant:"secondary",icon:uc,size:"md",children:"Adjust Categories"}),o.jsx(rt,{onClick:f,variant:"primary",icon:t1,size:"md",children:"Upload Report"})]})]}),o.jsx(Fg,{title:"Uploaded Reports",icon:Sn,defaultExpanded:!0,count:l,children:o.jsx(HTe,{property:e,onUploadClick:t,onCategoryOverride:()=>s(!0),onCountChange:c,reportToAutoLoad:n,onClearReportToAutoLoad:a})}),o.jsx(Fg,{title:"AI Analysis Reports",icon:yc,defaultExpanded:!1,count:u,className:"mt-6",children:o.jsx(WTe,{property:e,onViewAnalysis:r,onCountChange:d})}),i&&o.jsx(zX,{isOpen:i,propertyId:e==null?void 0:e.id,propertyName:e==null?void 0:e.name,onClose:()=>s(!1)})]})},E_=({message:e="Loading...",size:t="default"})=>{const r={small:"h-6 w-6",default:"h-8 w-8",large:"h-12 w-12"},n={small:"text-sm",default:"text-base",large:"text-lg"};return o.jsxs("div",{className:"flex flex-col items-center justify-center p-8 space-y-4",children:[o.jsx(ar,{className:`${r[t]} text-amber-400 animate-spin`}),o.jsx("p",{className:`${n[t]} text-gray-400 animate-pulse`,children:e})]})},k_=({error:e,onRetry:t,title:r="Unable to Load Data",showDetail
1031s:n=!0})=>{const a=(e==null?void 0:e.userMessage)||(e==null?void 0:e.message)||"Something went wrong. Please try again.";return o.jsx("div",{className:"flex flex-col items-center justify-center p-8",children:o.jsx("div",{className:"bg-red-950/20 border border-red-900/50 rounded-lg p-6 max-w-md w-full backdrop-blur-sm",children:o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx(Jr,{className:"h-6 w-6 text-red-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-lg font-semibold text-red-400 mb-2",children:r}),o.jsx("p",{className:"text-gray-300 text-sm",children:a}),n&&!1,(t||(e==null?void 0:e.retryable))&&o.jsxs("button",{onClick:t,className:`mt-4 flex items-center space-x-2 bg-amber-900/50 hover:bg-amber-900/70 1032 text-white px-4 py-2 rounded text-sm transition-colors`,children:[o.jsx(Gh,{className:"h-4 w-4"}),o.jsx("span",{children:"Try Again"})]})]})]})})})},qX=({message:e="No data found",description:t,icon:r=fue,action:n})=>o.jsxs("div",{className:"flex flex-col items-center justify-center p-12 text-center",children:[o.jsx(r,{className:"h-12 w-12 text-gray-600 mb-4"}),o.jsx("p",{className:"text-gray-300 text-lg font-medium mb-2",children:e}),t&&o.jsx("p",{className:"text-gray-500 text-sm max-w-md",children:t}),n&&o.jsx("div",{className:"mt-6",children:n})]}),z4=({loading:e,error:t,onRetry:r,empty:n,emptyProps:a={},loadingMessage:i="Loading...",errorTitle:s="Unable to Load Data",children:l})=>e?o.jsx(E_,{message:i}):t?o.jsx(k_,{error:t,onRetry:r,title:s}):n?o.jsx(qX,{...a}):l;class sje{async generateAnalysis(t,r,n="comprehensive",a={},i={}){var c,u;const s=(i==null?void 0:i.batch)===!0?"/analysis/agent/batch/generate":"/analysis/agent/generate",l=await Xe.post(s,{propertyId:t,dateRange:r,analysisType:n,context:a},{timeout:12e4});return{success:!0,analysis:l.data.analysis||l.data.message||l.data.response||((u=(c=l.data.results)==null?void 0:c.summary)==null?void 0:u.overall)||"Analysis completed but no text response generated.",data:l.data.data||l.data.results,metadata:l.data.metadata,agentsUsed:l.data.agents||l.data.agentsUsed}}buildAnalysisQuery(t,r,n){const a={financial:`Analyze financial performance for ${r.label}`,variance:`Show variance analysis for ${r.label}`,occupancy:`Analyze occupancy trends for ${r.label}`,comprehensive:`Provide comprehensive property analysis for ${r.label}`,trends:`Analyze trends and patterns for ${r.label}`};let i=a[t]||a.comprehensive;if(n.specificRequest){const s=n.specificRequest.substring(0,500).replace(/[<>]/g,"");i+=`. ${s}`}return i}async getRawData(t,r){return(await Xe.post("/analysis/agent/raw-data",{propertyId:t,startDate:r.start,endDate:r.end})).data}async saveAnalysis(t){const r=t.id?`/saved-analyses/${t.id}`:"/saved-analyses",n=t.id?"put":"post";return(await Xe[n](r,t)).data}async loadAnalysis(t){return(await Xe.get(`/saved-analyses/${t}`)).data}async getSavedAnalyses(t){return(await Xe.get(`/saved-analyses/${t}`)).data||[]}async deleteAnalysis(t){return(await Xe.delete(`/saved-analyses/${t}`)).data}async generateReport(t){return(await Xe.post("/reports/generate",t)).data}async callAnalysisTool(t,r){return console.warn(`Calling legacy tool ${t} - should migrate to agent`),(await Xe.post(`/analysis/tools/${t}`,r)).data}}const k1=new sje;function WX(e,t){return{includeVariance:!0,includeTrends:!0,includeRecommendations:!0,reportType:(t==null?void 0:t.reportType)||e,audience:(t==null?void 0:t.audience)||"general",majorEvents:(t==null?void 0:t.majorEvents)||null,emphasis:(t==null?void 0:t.emphasis)||[],additionalContext:(t==null?void 0:t.additionalContext)||null}}function VX(e,t,r){return{...e,reportType:(r==null?void 0:r.reportType)||t,userContext:r}}function GX({id:e,propertyId:t,name:r,analysisText:n,dateRange:a,rawData:i}){return{id:e,property_id:t,name:r,analysis_text:n,date_range:a,raw_data:i}}const Lh=[{value:"quarterly",label:"Quarterly Operations Report",description:"AI-powered operational analysis with action items",icon:yc,isDeterministic:!1,isLegacy:!0},{value:"quarterlyInvestor",label:"Quarterly Investor Report",description:"Stakeholder-focused analysis with risk factors and forward priorities",icon:Gp,isDeterministic:!1},{value:"monthlyOperations",label:"Monthly Operations Report",description:"Property management analysis with action items and 30-day outlook",icon:vV,isDeterministic:!1}],uk=30,oje=Lh.filter(e=>!e.isLegacy),lje={PENDING:"Waiting",RUNNING:"Generating",DONE:"Saved",FAILED:"Failed"},KX="The AI step failed, so this report was not saved and no credit was used.",cje=[{value:1,label:"Q1"},{value:2,label:"Q2"},{value:3,label:"Q3"},{value:4,label:"Q4"}],f0=[{value:1,label:"January"},{value:2,label:"February"},{value:3,label:"March"},{value:4,label:"April"},{value:5,label:"May"},{value:6,label:"June"},{value:7,label:"July"},{value:8,label:"August"},{value:9,label:"September"},{value:10,label:"October"},{value:11,label:"November"},{value:12,label:"December"}],uje=()=>{const e=new Date().getFullYear(),t=[];for(let r=e;r>=e-5;r--)t.push(r);return t},Jv=` 1033 bg-transparent text-white text-sm 1034 focus:outline-none focus:ring-2 focus:ring-accent rounded 1035 px-3 py-2 cursor-pointer 1036 appearance-none 1037 bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%239ca3af%22%20d%3D%22M2%204l4%204%204-4%22%2F%3
1037E%3C%2Fsvg%3E')] 1038 bg-no-repeat bg-[right_0.5rem_center] 1039 pr-8 1040 border border-white/10 rounded-lg 1041 hover:border-white/20 1042`,H4=({reportType:e,value:t,onChange:r,disabled:n=!1,isLoading:a=!1})=>{const i=e==="quarterly"||e==="quarterlyInvestor",s=e==="monthlyOperations",l=new Date,c=l.getFullYear(),u=Math.floor(l.getMonth()/3)+1,d=l.getMonth()+1,f=u===1?4:u-1,p=u===1?c-1:c,m=d===1?12:d-1,x=d===1?c-1:c,[y,v]=N.useState(f),[b,w]=N.useState(p),[S,j]=N.useState(m),[k,E]=N.useState(x),T=uje();N.useEffect(()=>{if(t&&t.label){const M=t.label.split(" ");if(M.length===2){const L=parseInt(M[1],10);if(M[0].startsWith("Q")){const U=parseInt(M[0].replace("Q",""),10);!isNaN(U)&&!isNaN(L)&&(v(U),w(L))}else{const U=f0.findIndex(W=>W.label===M[0]);U!==-1&&!isNaN(L)&&(j(f0[U].value),E(L))}}}},[t]),N.useEffect(()=>{var M;if(!(!e||n||a)){if(i){const L=HC(p,f);r({start:L.start,end:L.end,label:`Q${f} ${p}`})}else if(s){const L=_1(x,m),U=((M=f0.find(W=>W.value===m))==null?void 0:M.label)||"";r({start:L.start,end:L.end,label:`${U} ${x}`})}}},[e]);const O=(M,L,U,W)=>{var V;if(!(n||a)){if(i){const G=HC(L,M);r({start:G.start,end:G.end,label:`Q${M} ${L}`})}else if(s){const G=_1(W,U),K=((V=f0.find(F=>F.value===U))==null?void 0:V.label)||"";r({start:G.start,end:G.end,label:`${K} ${W}`})}}},A=M=>{const L=parseInt(M.target.value,10);v(L),O(L,b,S,k)},P=M=>{const L=parseInt(M.target.value,10);w(L),O(y,L,S,k)},I=M=>{const L=parseInt(M.target.value,10);j(L),O(y,b,L,k)},R=M=>{const L=parseInt(M.target.value,10);E(L),O(y,b,S,L)};return e?o.jsxs("div",{"data-testid":"period-selector",className:"space-y-2",children:[a&&o.jsxs("div",{"data-testid":"period-selector-loading",className:"flex items-center gap-2 text-sm text-gray-400",children:[o.jsx(ar,{className:"h-4 w-4 animate-spin"}),o.jsx("span",{children:"Loading periods..."})]}),i&&!a&&o.jsxs("div",{className:"flex items-center gap-3","data-testid":"quarterly-selectors",children:[o.jsx("select",{"data-testid":"quarter-dropdown",value:y,onChange:A,disabled:n,"aria-label":"Select quarter",className:Jv,children:cje.map(M=>o.jsx("option",{value:M.value,className:"bg-gray-900",children:M.label},M.value))}),o.jsx("select",{"data-testid":"quarter-year-dropdown",value:b,onChange:P,disabled:n,"aria-label":"Select year",className:Jv,children:T.map(M=>o.jsx("option",{value:M,className:"bg-gray-900",children:M},M))})]}),s&&!a&&o.jsxs("div",{className:"flex items-center gap-3","data-testid":"monthly-selectors",children:[o.jsx("select",{"data-testid":"month-dropdown",value:S,onChange:I,disabled:n,"aria-label":"Select month",className:Jv,children:f0.map(M=>o.jsx("option",{value:M.value,className:"bg-gray-900",children:M.label},M.value))}),o.jsx("select",{"data-testid":"month-year-dropdown",value:k,onChange:R,disabled:n,"aria-label":"Select year",className:Jv,children:T.map(M=>o.jsx("option",{value:M,className:"bg-gray-900",children:M},M))})]})]}):null};H4.propTypes={reportType:Q.oneOf(["quarterly","quarterlyInvestor","monthlyOperations",null]),value:Q.shape({start:Q.string.isRequired,end:Q.string.isRequired,label:Q.string.isRequired}),onChange:Q.func.isRequired,disabled:Q.bool,isLoading:Q.bool};const dk=({onSelect:e,selectedType:t=null,onPeriodSelect:r,isLoading:n=!1,disabled:a=!1,propertyId:i=null})=>{const[s,l]=N.useState({hasPL:null,hasRentRoll:null,hasLoanDetails:null}),[c,u]=N.useState(!1),[d,f]=N.useState(null);N.useEffect(()=>{t&&i&&(u(!0),Xe.get(`/properties/${i}/data-availability`).then(x=>l(x.data)).catch(()=>{}).finally(()=>u(!1)))},[t,i]);const p=x=>{f(x)},m=()=>{d&&r&&r(d)};return o.jsxs("div",{className:"max-w-3xl mx-auto",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"Generate Property Analysis"}),o.jsx("p",{className:"text-gray-400",children:"Select the type of analysis you need"})]}),o.jsx("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",children:Lh.map(x=>{const y=x.icon,v=t===x.value;return o.jsxs("button",{"data-testid":`report-type-${x.value}`,onClick:()=>e(x.value),disabled:a,className:` 1043 relative overflow-hidden 1044 p-4 rounded-xl text-left transition-all duration-200 1045 border 1046 ${v?"bg-[rgba(139,92,246,0.1)] border-[rgba(139,92,246,0.4)]":"bg-[rgba(255,255,255,0.02)] border-[rgba(255,255,255,0.08)] hover:bg-[rgba(255,255,255,0.05)] hover:border-[rgba(255,255,255,0.15)]"} 1047 ${a?"opacity-50 cursor-not-allowed":"cursor-pointer"} 1048 `,children:[x.isLegacy&&o.jsx("span",{className:"sash-legacy",children:"Legacy"}),o.jsx("div",{className:` 1049 p-2 rounded-lg w-fit mb-3 1050 ${v?"bg-[rgba(139,92,246,0.2)]":"bg-[rgba(139,92,246,0.1)]"} 1051 `,children:o.jsx(y,{className:"h-5 w-5 text-[#8B5CF6]"})}),o.jsx("h4",{className:`font-semibold mb-1 text-sm ${v?"text-[#A78BFA]":"text-white"}`,children:x.label}),o.jsx("p",{className:"text-xs text-gray-400 leading-relaxed",children:x.description}),x.isDeterministic&&o.jsx("span",{className:"inline-block mt-2 text-xs bg-green-500/20 text-green-400 px-2 py-0.5 rounded",children:"Instant"})]},x.value)})}),t&&o.jsxs("div",{className:"mt-8","data-testid":"period-selector-container",children:[o.jsxs("div",{className:"text-center mb-4",children:[o.jsx("h4",{className:"text-sm font-medium text-white mb-1",children:"Select Analysis Period"}),o.jsx("p",{className:"text-xs text-gray-400",children:"Choose the time period for your report"})]}),o.jsxs("div",{className:"flex items-center justify-center gap-4",children:[o.jsx(H4,{reportType:t,onChange:p,isLoading:n,disabled:a},t),o.jsxs("button",{"data-testid":"generate-report-button",onClick:m,disabled:a||n||!d,className:` 1052 flex items-center gap-2 px-5 py-2.5 rounded-lg font-medium text-sm 1053 transition-all duration-200 1054 ${d&&!a&&!n?"bg-[#8B5CF6] hover:bg-[#7C3AED] text-white shadow-lg shadow-purple-500/20":"bg-gray-700 text-gray-400 cursor-not-allowed"} 1055 `,children:["Generate Report",o.jsx(yV,{className:"h-4 w-4"})]})]})]}),o.jsx("div",{className:"mt-6 pt-4 border-t border-[rgba(255,255,255,0.05)]","data-testid":"data-requirements",children:o.jsxs("div",{className:"flex items-center gap-6 text-xs text-gray-500",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[c?o.jsx(ar,{className:"h-4 w-4 text-gray-400 animate-spin","data-testid":"pl-checking"}):s.hasPL===!0?o.jsx(O2,{className:"h-4 w-4 text-emerald-500","data-testid":"pl-check"}):s.hasPL===!1?o.jsx($d,{className:"h-4 w-4 text-red-500","data-testid":"pl-missing"}):o.jsx(P2,{className:"h-4 w-4 text-gray-500","data-testid":"pl-unknown"}),o.jsx("span",{className:s.hasPL===!0?"text-gray-400":"text-gray-500",children:"P&L data"})]}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[c?o.jsx(ar,{className:"h-4 w-4 text-gray-400 animate-spin","data-testid":"rentroll-checking"}):s.hasRentRoll===!0?o.jsx(O2,{className:"h-4 w-4 text-emerald-500","data-testid":"rentroll-check"}):s.hasRentRoll===!1?o.jsx($d,{className:"h-4 w-4 text-red-500","data-testid":"rentroll-missing"}):o.jsx(P2,{className:"h-4 w-4 text-gray-500","data-testid":"rentroll-unknown"}),o.jsx("span",{className:s.hasRentRoll===!0?"text-gray-400":"text-gray-500",children:"Rent roll"})]}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[c?o.jsx(ar,{className:"h-4 w-4 text-gray-400 animate-spin","data-testid":"loan-checking"}
1055):s.hasLoanDetails===!0?o.jsx(O2,{className:"h-4 w-4 text-emerald-500","data-testid":"loan-check"}):s.hasLoanDetails===!1?o.jsx($d,{className:"h-4 w-4 text-red-500","data-testid":"loan-missing"}):o.jsx(P2,{className:"h-4 w-4 text-gray-500","data-testid":"loan-unknown"}),o.jsx("span",{className:s.hasLoanDetails===!0?"text-gray-400":"text-gray-500",children:"Loan details"})]})]})})]})},fk=({chatPanel:e,previewPanel:t})=>o.jsxs("div",{className:"flex flex-col lg:flex-row h-full overflow-hidden",children:[o.jsx("div",{className:` 1056 lg:w-[30%] lg:min-w-[280px] 1057 border-b lg:border-b-0 lg:border-r border-white/10 1058 h-[300px] lg:h-full 1059 overflow-y-auto 1060 shrink-0 1061 `,children:e}),o.jsx("div",{className:` 1062 flex-1 1063 overflow-y-auto 1064 min-h-0 1065 `,children:t})]}),dje=e=>{if(!e||typeof e!="string")return e;const t=[],r=/\*\*(.+?)\*\*/g;let n=0,a;for(;(a=r.exec(e))!==null;)a.index>n&&t.push(e.slice(n,a.index)),t.push(o.jsx("span",{className:"text-accent font-semibold",children:a[1]},a.index)),n=r.lastIndex;return n<e.length&&t.push(e.slice(n)),t.length>0?t:e},fje=({type:e,content:t})=>o.jsx("div",{className:`flex ${e==="user"?"justify-end":"justify-start"}`,children:o.jsx("div",{className:`max-w-3xl rounded-lg p-3 ${e==="user"?"bg-amber-500/20 text-amber-100 border border-amber-500/30":"bg-gray-800/50 text-gray-100 border border-gray-700"}`,children:o.jsx("div",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:dje(t)})})}),hje=({options:e,onSelect:t,disabled:r=!1})=>o.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((n,a)=>o.jsx("button",{onClick:()=>t(n),disabled:r,className:"text-xs px-3 py-1.5 bg-gray-800 hover:bg-gray-700 text-gray-300 rounded-full transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:n.label},a))}),o6=e=>{var t;return(t=Lh.find(r=>r.value===e))==null?void 0:t.label},rn={GATHERING:"gathering",GENERATING:"generating",EDITING:"editing"},hk={CHOICE:"choice",MULTISELECT:"multiselect",TEXT:"text"};let pje=0;const $l=()=>`msg-${Date.now()}-${++pje}`,X0=({property:e,subjectLabel:t,submitLabel:r,reportType:n,mode:a=rn.GATHERING,onModeChange:i,onContextComplete:s,onGenerateRequest:l,onRefinementRequest:c,availableSections:u=[],focusedSection:d=null,onFocusedSectionClear:f})=>{const p=N.useRef(null),[m,x]=N.useState([]),[y,v]=N.useState(!0),[b,w]=N.useState(null),[S,j]=N.useState([]),[k,E]=N.useState(0),[T,O]=N.useState({}),[A,P]=N.useState(""),[I,R]=N.useState(!1),[M,L]=N.useState(null),[U,W]=N.useState([]),V=N.useRef(null),G=N.useRef(null),K=r||"Generate Analysis";N.useEffect(()=>{const q=async()=>{if(!n||a===rn.EDITING){v(!1);return}v(!0),w(null);try{const xe=await Xe.get(`/analysis/agent/pre-generation-questions/${n}`);if(xe.data.success&&xe.data.questions){const pe=xe.data.questions;x(pe);const Se=t||(e==null?void 0:e.name)||"this property",he=o6(n)||"Analysis Report",ie=[{id:$l(),type:"assistant",content:`Let's create a ${he} for **${Se}**. I have a few quick questions to tailor the analysis.`}];pe.length>0&&(ie.push({id:$l(),type:"assistant",content:pe[0].text}),E(1)),j(ie)}else throw new Error("Failed to load questions")}catch(xe){console.error("Failed to fetch pre-generation questions:",xe),w("Failed to load questions. Using defaults.");const pe=t||(e==null?void 0:e.name)||"this property";j([{id:$l(),type:"assistant",content:`Let's create your report for **${pe}**. Click **${K}** when ready.`}]),x([]),E(0)}finally{v(!1)}};a===rn.GATHERING?q():v(!1)},[n,e==null?void 0:e.name,t,K,a]),N.useEffect(()=>{var q;if(p.current!==a){if(a===rn.EDITING&&p.current!==rn.EDITING){const xe=(e==null?void 0:e.name)||"this property",pe=((q=o6(n))==null?void 0:q.toLowerCase())||"analysis report";j([{id:$l(),type:"assistant",content:`Your ${pe} for **${xe}** is ready. You can: 1066 1067⢠Click **Refine** on any section to improve it 1068⢠Type a request here (e.g., "make the executive summary shorter") 1069⢠Say "refine the whole report" to apply changes everywhere`}]),E(m.length+1)}p.current=a}},[a,e==null?void 0:e.name,n,m.length]),N.useEffect(()=>{var q;(q=V.current)==null||q.scrollIntoView({behavior:"smooth"})},[S]),N.useEffect(()=>{var q;d&&a===rn.EDITING&&(L(d),j(xe=>[...xe,{id:$l(),type:"assistant",content:`Refining: **${d}** - What changes would you like?`}]),(q=G.current)==null||q.focus(),f==null||f())},[d,a,f]);const F=k>0&&k<=m.length?m[k-1]:null,ne=N.useCallback((q,xe)=>{if(!F)return;j(he=>[...he,{id:$l(),type:"user",content:xe||String(q)||"Skipped"}]);const pe={...T,[F.id]:q};O(pe),W([]);const Se=k+1;E(Se),Se<=m.length?setTimeout(()=>{j(he=>[...he,{id:$l(),type:"assistant",content:m[Se-1].text}])},300):setTimeout(()=>{j(he=>[...he,{id:$l(),type:"assistant",content:`Perfect! I have everything I need. Click **${K}** when ready.`}]),s==null||s(pe)},300)},[k,F,T,m,s,K]),H=N.useCallback(q=>{W(xe=>{if(xe.includes(q))return xe.filter(Se=>Se!==q);const pe=(F==null?void 0:F.maxSelections)||10;return xe.length>=pe?xe:[...xe,q]})},[F]),B=N.useCallback(()=>
1069{if(U.length===0&&(F!=null&&F.optional))ne(null,"Skipped");else if(U.length>0){const q=U.map(xe=>{var pe;return((pe=F.options.find(Se=>Se.value===xe))==null?void 0:pe.label)||xe}).join(", ");ne(U,q)}},[U,F,ne]),X=N.useCallback(()=>{if(!A.trim())return;const q=A.trim();P(""),a===rn.GATHERING&&F?ne(q,q):a===rn.EDITING&&(j(xe=>[...xe,{id:$l(),type:"user",content:q}]),M?(c==null||c(q,M),L(null)):c==null||c(q,null))},[A,a,F,ne,c,M]),Y=q=>{q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),X())},ae=N.useCallback(()=>{F!=null&&F.optional&&ne(null,"Skipped")},[F,ne]),fe=k>m.length&&m.length>0,ue=a===rn.EDITING||a===rn.GATHERING&&(F==null?void 0:F.type)===hk.TEXT,oe=a===rn.GATHERING&&(F==null?void 0:F.type)===hk.CHOICE&&!fe,Z=a===rn.GATHERING&&(F==null?void 0:F.type)===hk.MULTISELECT&&!fe,ce=a===rn.GATHERING&&fe||a===rn.GATHERING&&m.length===0&&!y;return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"px-4 py-3 border-b border-white/10 flex items-center gap-2 shrink-0",children:[o.jsx(yc,{className:"h-4 w-4 text-accent"}),o.jsx("span",{className:"text-sm font-medium text-gray-300",children:a===rn.GENERATING?"Generating...":"AI Assistant"}),o.jsxs("span",{className:"text-xs text-gray-500 ml-auto",children:[y&&"Loading...",!y&&a===rn.GATHERING&&!fe&&m.length>0&&`Question ${k}/${m.length}`,a===rn.GATHERING&&fe&&"Ready",a===rn.GENERATING&&"Please wait...",a===rn.EDITING&&"Ask to refine"]})]}),o.jsxs("div",{className:"flex-1 p-4 overflow-y-auto space-y-3",children:[y?o.jsxs("div",{className:"flex items-center gap-2 text-gray-400 text-sm",children:[o.jsx(ar,{className:"h-4 w-4 animate-spin"}),o.jsx("span",{children:"Loading questions..."})]}):S.map(q=>o.jsx(fje,{type:q.type,content:q.content},q.id)),b&&o.jsxs("div",{className:"flex items-center gap-2 text-yellow-500 text-sm",children:[o.jsx(Jr,{className:"h-4 w-4"}),o.jsx("span",{children:b})]}),a===rn.GENERATING&&o.jsxs("div",{className:"flex items-center gap-2 text-gray-400 text-sm",children:[o.jsx(ar,{className:"h-4 w-4 animate-spin"}),o.jsx("span",{children:"Analyzing property data..."})]}),o.jsx("div",{ref:V})]}),o.jsxs("div",{className:"px-4 pb-4 shrink-0",children:[oe&&F.options&&o.jsx("div",{className:"mb-3",children:o.jsx(hje,{options:F.options.map(q=>({label:q.label,value:q.value,description:q.description})),onSelect:q=>ne(q.value,q.label),disabled:I})}),Z&&F.options&&o.jsxs("div",{className:"mb-3 space-y-2",children:[o.jsx("div",{className:"flex flex-wrap gap-2",children:F.options.map(q=>o.jsx("button",{onClick:()=>H(q.value),disabled:I,className:`px-3 py-1.5 text-sm rounded-lg border transition-colors ${U.includes(q.value)?"bg-accent text-black border-accent":"bg-gray-800/50 text-gray-300 border-gray-700 hover:border-accent/50"}`,children:q.label},q.value))}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:B,disabled:I,className:"px-3 py-1.5 text-sm bg-accent hover:bg-accent/80 text-black rounded-lg transition-colors",children:U.length>0?`Confirm (${U.length})`:"Confirm"}),F.optional&&o.jsx("button",{onClick:ae,disabled:I,className:"px-3 py-1.5 text-sm text-gray-400 hover:text-white transition-colors",children:"Skip"})]})]}),ce&&o.jsxs("button",{onClick:()=>l==null?void 0:l({...T,reportType:n}),className:"w-full py-2.5 bg-accent hover:bg-accent/80 text-black font-medium rounded-lg transition-colors flex items-center justify-center gap-2",children:[o.jsx(vl,{className:"h-4 w-4"}),K]}),ue&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{ref:G,type:"text",value:A,onChange:q=>P(q.target.value),onKeyDown:Y,placeholder:a===rn.EDITING?"Type to refine (e.g., 'make summary shorter')":(F==null?void 0:F.placeholder)||"Type your answer...",disabled:I||a===rn.GENERATING,className:"flex-1 px-3 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-sm text-white placeholder-gray-500 focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50"}),A.trim()&&o.jsx("button",{onClick:X,disabled:I||a===rn.GENERATING,className:"px-3 py-2 bg-accent hover:bg-accent/80 text-black rounded-lg transition-colors disabled:opacity-50",children:o.jsx(Uue,{className:"h-4 w-4"})})]}),a===rn.GATHERING&&(F==null?void 0:F.optional)&&o.jsx("button",{onClick:ae,disabled:I,className:"text-sm text-gray-500 hover:text-gray-300 transition-colors",children:"Skip this question"})]})]})]})};X0.MODES=rn;function mje(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const gje=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xje=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yje={};function l6(e,t){return(yje.jsx?xje:gje).test(e)}const vje=/[ \t\n\f\r]/g;function bje(e){return typeof e=="object"?e.type==="text"?c6(e.value):!1:c6(e)}function c6(e){return e.replace(vje,"")===""}class ty{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}ty.prototype.normal={};ty.prototype.property={};ty.prototype.space=void 0;function YX(e,t){const r={},n={};for(const a of e)Object.assign(r,a.property),Object.assign(n,a.normal);return new ty(r,n,t)}function KC(e){return e.toLowerCase()}class Vi{constructor(t,r){this.attribute=r,this.property=t}}Vi.prototype.attribute="";Vi.prototype.booleanish=!1;Vi.prototype.boolean=!1;Vi.prototype.commaOrSpaceSeparated=!1;Vi.prototype.commaSeparated=!1;Vi.prototype.defined=!1;Vi.prototype.mustUseProperty=!1;Vi.prototype.number=!1;Vi.prototype.overloadedBoolean=!1;Vi.prototype.property="";Vi.prototype.spaceSeparated=!1;Vi.prototype.space=void 0;let wje=0;const rr=wf(),Yn=wf(),YC=wf(),at=wf(),Gr=wf(),$h=wf(),es=wf();function wf(){return 2**++wje}const XC=Object.freeze(Object.defineProperty({__proto__:null,boolean:rr,booleanish:Yn,commaOrSpaceSeparated:es,commaSeparated:$h,number:at,overloadedBoolean:YC,spaceSeparated:Gr},Symbol.toStringTag,{value:"Module"})),pk=Object.keys(XC);class q4 extends Vi{constructor(t,r,n,a){let i=-1;
vendor: 4,264 bytes, line 1069
1069if(super(t,r),u6(this,"space",a),typeof n=="number")for(;++i<pk.length;){const s=pk[i];u6(this,pk[i],(n&XC[s])===XC[s])}}}q4.prototype.defined=!0;function u6(e,t,r){r&&(e[t]=r)}function rm(e){const t={},r={};for(const[n,a]of Object.entries(e.properties)){const i=new q4(n,e.transform(e.attributes||{},n),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[KC(n)]=n,r[KC(i.attribute)]=n}return new ty(t,r,e.space)}const XX=rm({properties:{ariaActiveDescendant:null,ariaAtomic:Yn,ariaAutoComplete:null,ariaBusy:Yn,ariaChecked:Yn,ariaColCount:at,ariaColIndex:at,ariaColSpan:at,ariaControls:Gr,ariaCurrent:null,ariaDescribedBy:Gr,ariaDetails:null,ariaDisabled:Yn,ariaDropEffect:Gr,ariaErrorMessage:null,ariaExpanded:Yn,ariaFlowTo:Gr,ariaGrabbed:Yn,ariaHasPopup:null,ariaHidden:Yn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gr,ariaLevel:at,ariaLive:null,ariaModal:Yn,ariaMultiLine:Yn,ariaMultiSelectable:Yn,ariaOrientation:null,ariaOwns:Gr,ariaPlaceholder:null,ariaPosInSet:at,ariaPressed:Yn,ariaReadOnly:Yn,ariaRelevant:null,ariaRequired:Yn,ariaRoleDescription:Gr,ariaRowCount:at,ariaRowIndex:at,ariaRowSpan:at,ariaSelected:Yn,ariaSetSize:at,ariaSort:null,ariaValueMax:at,ariaValueMin:at,ariaValueNow:at,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function JX(e,t){return t in e?e[t]:t}function QX(e,t){return JX(e,t.toLowerCase())}const _je=rm({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$h,acceptCharset:Gr,accessKey:Gr,action:null,allow:null,allowFullScreen:rr,allowPaymentRequest:rr,allowUserMedia:rr,alt:null,as:null,async:rr,autoCapitalize:null,autoComplete:Gr,autoFocus:rr,autoPlay:rr,blocking:Gr,capture:null,charSet:null,checked:rr,cite:null,className:Gr,cols:at,colSpan:null,content:null,contentEditable:Yn,controls:rr,controlsList:Gr,coords:at|$h,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rr,defer:rr,dir:null,dirName:null,disabled:rr,download:YC,draggable:Yn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rr,formTarget:null,headers:Gr,height:at,hidden:YC,high:at,href:null,hrefLang:null,htmlFor:Gr,httpEquiv:Gr,id:null,imageSizes:null,imageSrcSet:null,inert:rr,inputMode:null,integrity:null,is:null,isMap:rr,itemId:null,itemProp:Gr,itemRef:Gr,itemScope:rr,itemType:Gr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rr,low:at,manifest:null,max:null,maxLength:at,media:null,method:null,min:null,minLength:at,multiple:rr,muted:rr,name:null,nonce:null,noModule:rr,noValidate:rr,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:rr,optimum:at,pattern:null,ping:Gr,placeholder:null,playsInl
1069ine:rr,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rr,referrerPolicy:null,rel:Gr,required:rr,reversed:rr,rows:at,rowSpan:at,sandbox:Gr,scope:null,scoped:rr,seamless:rr,selected:rr,shadowRootClonable:rr,shadowRootDelegatesFocus:rr,shadowRootMode:null,shape:null,size:at,sizes:null,slot:null,span:at,spellCheck:Yn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:at,step:null,style:null,tabIndex:at,target:null,title:null,translate:null,type:null,typeMustMatch:rr,useMap:null,value:Yn,width:at,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gr,axis:null,background:null,bgColor:null,border:at,borderColor:null,bottomMargin:at,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rr,declare:rr,event:null,face:null,frame:null,frameBorder:null,hSpace:at,leftMargin:at,link:null,longDesc:null,lowSrc:null,marginHeight:at,marginWidth:at,noResize:rr,noHref:rr,noShade:rr,noWrap:rr,object:null,profile:null,prompt:null,rev:null,rightMargin:at,rules:null,scheme:null,scrolling:Yn,standby:null,summary:null,text:null,topMargin:at,valueType:null,version:null,vAlign:null,vLink:null,vSpace:at,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:rr,disableRemotePlayback:rr,prefix:null,property:null,results:at,security:null,unselectable:null},space:"html",transform:QX}),Sje=rm({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
1069-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:es,accentHeight:at,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:at,amplitude:at,arabicForm:null,ascent:at,attributeName:null,attributeType:null,azimuth:at,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:at,by:null,calcMode:null,capHeight:at,className:Gr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:at,diffuseConstant:at,direction:null,display:null,dur:null,divisor:at,dominantBaseline:null,download:rr,dx:null,dy:null,edgeMode:null,editable:null,elevation:at,enableBackground:null,end:null,event:null,exponent:at,externalResourcesRequired:null,fill:null,fillOpacity:at,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$h,g2:$h,glyphName:$h,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:at,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:at,horizOriginX:at,horizOriginY:at,id:null,ideographic:at,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:at,k:at,k1:at,k2:at,k3:at,k4:at,kernelMatrix:es,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:at,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:at,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 4,108 bytes, lines 1069-1070
1069Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:at,overlineThickness:at,paintOrder:null,panose1:null,path:null,pathLength:at,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:at,pointsAtY:at,pointsAtZ:at,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:es,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:es,rev:es,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:es,requiredFeatures:es,requiredFonts:es,requiredFormats:es,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:at,specularExponent:at,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:at,strikethroughThickness:at,string:null,stroke:null,strokeDashArray:es,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:at,strokeOpacity:at,strokeWidth:null,style:null,surfaceScale:at,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:es,tabIndex:at,tableValues:null,target:null,targetX:at,targetY:at,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:es,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:at,underlineThickness:at,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:at,values:null,vAlphabetic:at,vMathematical:at,vectorEffect:null,vHanging:at,vIdeographic:at,version:null,vertAdvY:at,vertOriginX:at,vertOriginY:at,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:at,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:JX}),ZX=rm({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),eJ=rm({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:QX}),tJ=rm({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Eje={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},kje=/[A-Z]/g,d6=/-[a-z]/g,Nje=/^data[-\w.:]+$/i;function Tje(e,t){const r=KC(t);let n=t,a=Vi;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Nje.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(d6,Aje);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!d6.test(i)){let s=i.replace(kje,jje);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=q4}return new a(n,t)}function jje(e){return"-"+e.toLowerCase()}function Aje(e){return e.charAt(1).toUpperCase()}const Cje=YX([XX,_je,ZX,eJ,tJ],"html"),W4=YX([XX,Sje,ZX,eJ,tJ],"svg");function Oje(e){return e.join(" ").trim()}var ih={},mk,f6;function Pje(){if(f6)return mk;f6=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c=` 1070`,u="/",d="*",f="",p="comment",m="declaration";mk=function(y,v){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];v=v||{};var b=1,w=1;function S(M){var L=M.match(t);
vendor: 4,978 bytes, line 1070
1070L&&(b+=L.length);var U=M.lastIndexOf(c);w=~U?M.length-U:w+M.length}function j(){var M={line:b,column:w};return function(L){return L.position=new k(M),O(),L}}function k(M){this.start=M,this.end={line:b,column:w},this.source=v.source}k.prototype.content=y;function E(M){var L=new Error(v.source+":"+b+":"+w+": "+M);if(L.reason=M,L.filename=v.source,L.line=b,L.column=w,L.source=y,!v.silent)throw L}function T(M){var L=M.exec(y);if(L){var U=L[0];return S(U),y=y.slice(U.length),L}}function O(){T(r)}function A(M){var L;for(M=M||[];L=P();)L!==!1&&M.push(L);return M}function P(){var M=j();if(!(u!=y.charAt(0)||d!=y.charAt(1))){for(var L=2;f!=y.charAt(L)&&(d!=y.charAt(L)||u!=y.charAt(L+1));)++L;if(L+=2,f===y.charAt(L-1))return E("End of comment missing");var U=y.slice(2,L-2);return w+=2,S(U),y=y.slice(L),w+=2,M({type:p,comment:U})}}function I(){var M=j(),L=T(n);if(L){if(P(),!T(a))return E("property missing ':'");var U=T(i),W=M({type:m,property:x(L[0].replace(e,f)),value:U?x(U[0].replace(e,f)):f});return T(s),W}}function R(){var M=[];A(M);for(var L;L=I();)L!==!1&&(M.push(L),A(M));return M}return O(),R()};function x(y){return y?y.replace(l,f):f}return mk}var h6;function Rje(){if(h6)return ih;h6=1;var e=ih&&ih.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ih,"__esModule",{value:!0}),ih.default=r;var t=e(Pje());function r(n,a){var i=null;if(!n||typeof n!="string")return i;var s=(0,t.default)(n),l=typeof a=="function";return s.forEach(function(c){if(c.type==="declaration"){var u=c.property,d=c.value;l?a(u,d,c):d&&(i=i||{},i[u]=d)}}),i}return ih}var h0={},p6;function Ije(){if(p6)return h0;p6=1,Object.defineProperty(h0,"__esModule",{value:!0}),h0.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(u){return!u||r.test(u)||e.test(u)},s=function(u,d){return d.toUpperCase()},l=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(a,l):u=u.replace(n,l),u.replace(t,s))};return h0.camelCase=c,h0}var p0,m6;function Fje(){if(m6)return p0;m6=1;var e=p0&&p0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Rje()),r=Ije();function n(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(l,c){l&&c&&(s[(0,r.camelCase)(l,i)]=c)}),s}return n.default=n,p0=n,p0}var Mje=Fje();const Dje=tr(Mje),rJ=nJ("end"),V4=nJ("start");function nJ(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Lje(e){const t=V4(e),r=rJ(e);if(t&&r)return{start:t,end:r}}function J0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?g6(e.position):"start"in e||"end"in e?g6(e):"line"in e||"column"in e?JC(e):""}function JC(e){return x6(e&&e.line)+":"+x6(e&&e.column)}function g6(e){return JC(e&&e.start)+"-"+JC(e&&e.end)}function x6(e){return e&&typeof e=="number"?e:1}class ri extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let a="",i={},s=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i={...r}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?i.ruleId=n:(i.source=n.slice(0,c),i.ruleId=n.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=l?l.line:void 0,this.name=J0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}ri.prototype.file="";ri.prototype.name="";ri.prototype.reason="";ri.prototype.message="";ri.prototype.stack="";ri.prototype.column=void 0;ri.prototype.line=void 0;ri.prototype.ancestors=void 0;ri.prototype.cause=void 0;ri.prototype.fatal=void 0;ri.prototype.place=void 0;ri.prototype.ruleId=void 0;ri.prototype.source=void 0;const G4={}.hasOwnProperty,$je=new Map,Bje=/[A-Z]/g,Uje=new Set(["table","tbody","thead","tfoot","tr"]),zje=new Set(["td","th"]),aJ="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Hje(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=Jje(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 9,577 bytes, line 1070
1070if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=Xje(r,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?W4:Cje,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=iJ(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function iJ(e,t,r){if(t.type==="element")return qje(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Wje(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Gje(e,t,r);if(t.type==="mdxjsEsm")return Vje(e,t);if(t.type==="root")return Kje(e,t,r);if(t.type==="text")return Yje(e,t)}function qje(e,t,r){const n=e.schema;let a=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=W4,e.schema=a),e.ancestors.push(t);const i=oJ(e,t.tagName,!1),s=Qje(e,t);let l=Y4(e,t);return Uje.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!bje(c):!0})),sJ(e,s,i,t),K4(s,l),e.ancestors.pop(),e.schema=n,e.create(t,i,s,r)}function Wje(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Lg(e,t.position)}function Vje(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Lg(e,t.position)}function Gje(e,t,r){const n=e.schema;let a=n;t.name==="svg"&&n.space==="html"&&(a=W4,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:oJ(e,t.name,!0),s=Zje(e,t),l=Y4(e,t);return sJ(e,s,i,t),K4(s,l),e.ancestors.pop(),e.schema=n,e.create(t,i,s,r)}function Kje(e,t,r){const n={};return K4(n,Y4(e,t)),e.create(t,e.Fragment,n,r)}function Yje(e,t){return t.value}function sJ(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function K4(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Xje(e,t,r){return n;function n(a,i,s,l){const u=Array.isArray(s.children)?r:t;return l?u(i,s,l):u(i,s)}}function Jje(e,t){return r;function r(n,a,i,s){const l=Array.isArray(i.children),c=V4(n);return t(a,i,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Qje(e,t){const r={};let n,a;for(a in t.properties)if(a!=="children"&&G4.call(t.properties,a)){const i=eAe(e,a,t.properties[a]);if(i){const[s,l]=i;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&zje.has(t.tagName)?n=l:r[s]=l}}if(n){const i=r.style||(r.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function Zje(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];i.type;const s=i.expression;s.type;const l=s.properties[0];l.type,Object.assign(r,e.evaluater.evaluateExpression(l.argument))}else Lg(e,t.position);else{const a=n.name;let i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const l=n.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else Lg(e,t.position);else i=n.value===null?!0:n.value;r[a]=i}return r}function Y4(e,t){const r=[];let n=-1;const a=e.passKeys?new Map:$je;for(;++n<t.children.length;){const i=t.children[n];let s;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=a.get(c)||0;s=c+"-"+u,a.set(c,u+1)}}const l=iJ(e,i,s);l!==void 0&&r.push(l)}return r}function eAe(e,t,r){const n=Tje(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?mje(r):Oje(r)),n.property==="style"){let a=typeof r=="object"?r:tAe(e,String(r));return e.stylePropertyNameCase==="css"&&(a=rAe(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&n.space?Eje[n.property]||n.property:n.attribute,r]}}function tAe(e,t){try{return Dje(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,a=new ri("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=aJ+"#cannot-parse-style-attribute",a}}function oJ(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const l=l6(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}n=s}else n=l6(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const a=n.value;return G4.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(n);Lg(e)}function Lg(e,t){const r=new ri("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=aJ+"#cannot-handle-mdx-estrees-without-createevaluater",r}function rAe(e){const t={};let r;for(r in e)G4.call(e,r)&&(t[nAe(r)]=e[r]);return t}function nAe(e){let t=e.replace(Bje,aAe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function aAe(e){return"-"+e.toLowerCase()}const gk={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},iAe={};function X4(e,t){const r=iAe,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,a=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return lJ(e,n,a)}function lJ(e,t,r){if(sAe(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return y6(e.children,t,r)}return Array.isArray(e)?y6(e,t,r):""}function y6(e,t,r){const n=[];let a=-1;for(;++a<e.length;)n[a]=lJ(e[a],t,r);return n.join("")}function sAe(e){return!!(e&&typeof e=="object")}const v6=document.createElement("i");function J4(e){const t="&"+e+";";v6.innerHTML=t;const r=v6.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function ds(e,t,r,n){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);i<n.length;)s=n.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function zs(e,t){return e.length>0?(ds(e,e.length,0,t),e):t}const b6={}.hasOwnProperty;function cJ(e){const t={};let r=-1;for(;++r<e.length;)oAe(t,e[r]);return t}function oAe(e,t){let r;for(r in t){const a=(b6.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let s;if(i)for(s in i){b6.call(a,s)||(a[s]=[]);const l=i[s];lAe(a[s],Array.isArray(l)?l:l?[l]:[])}}}function lAe(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);ds(e,0,0,n)}function uJ(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function jo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mi=Bu(/[A-Za-z]/),Ja=Bu(/[\dA-Za-z]/),cAe=Bu(/[#-'*+\--9=?A-Z^-~]/);function N1(e){return e!==null&&(e<32||e===127)}const QC=Bu(/\d/),uAe=Bu(/[\dA-Fa-f]/),dAe=Bu(/[!-/:-@[-`{-~]/);function Ft(e){return e!==null&&e<-2}function Hr(e){return e!==null&&(e<0||e===32)}function fr(e){return e===-2||e===-1||e===32}const N_=Bu(new RegExp("\\p{P}|\\p{S}","u")),rf=Bu(/\s/);function Bu(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function nm(e){const t=[];let r=-1,n=0,a=0;for(;++r<e.length;){const i=e.charCodeAt(r);let s="";if(i===37&&Ja(e.charCodeAt(r+1))&&Ja(e.charCodeAt(r+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(r+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+a+1,s=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}function gr(e,t,r,n){const a=n?n-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(c){return fr(c)?(e.enter(r),l(c)):t(c)}function l(c){return fr(c)&&i++<a?(e.consume(c),l):(e.exit(r),t(c))}}const fAe={tokenize:hAe};function hAe(e){const t=e.attempt(this.parser.constructs.contentInitial,n,a);let r;return t;function n(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),gr(e,t,"linePrefix")}function a(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=c),r=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Ft(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}const pAe={tokenize:mAe},w6={tokenize:gAe};function mAe(e){const t=this,r=[];let n=0,a,i,s;return l;function l(S){if(n<r.length){const j=r[n];return t.containerState=j[1],e.attempt(j[0].continuation,c,u)(S)}return u(S)}function c(S){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&w();const j=t.events.length;let k=j,E;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){E=t.events[k][1].end;break}
vendor: 7,689 bytes, line 1070
1070b(n);let T=j;for(;T<t.events.length;)t.events[T][1].end={...E},T++;return ds(t.events,k+1,0,t.events.slice(j)),t.events.length=T,u(S)}return l(S)}function u(S){if(n===r.length){if(!a)return p(S);if(a.currentConstruct&&a.currentConstruct.concrete)return x(S);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(w6,d,f)(S)}function d(S){return a&&w(),b(n),p(S)}function f(S){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,x(S)}function p(S){return t.containerState={},e.attempt(w6,m,x)(S)}function m(S){return n++,r.push([t.currentConstruct,t.containerState]),p(S)}function x(S){if(S===null){a&&w(),b(0),e.consume(S);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),y(S)}function y(S){if(S===null){v(e.exit("chunkFlow"),!0),b(0),e.consume(S);return}return Ft(S)?(e.consume(S),v(e.exit("chunkFlow")),n=0,t.interrupt=void 0,l):(e.consume(S),y)}function v(S,j){const k=t.sliceStream(S);if(j&&k.push(null),S.previous=i,i&&(i.next=S),i=S,a.defineSkip(S.start),a.write(k),t.parser.lazy[S.start.line]){let E=a.events.length;for(;E--;)if(a.events[E][1].start.offset<s&&(!a.events[E][1].end||a.events[E][1].end.offset>s))return;const T=t.events.length;let O=T,A,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(A){P=t.events[O][1].end;break}A=!0}for(b(n),E=T;E<t.events.length;)t.events[E][1].end={...P},E++;ds(t.events,O+1,0,t.events.slice(T)),t.events.length=E}}function b(S){let j=r.length;for(;j-- >S;){const k=r[j];t.containerState=k[1],k[0].exit.call(t,e)}r.length=S}function w(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function gAe(e,t,r){return gr(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function np(e){if(e===null||Hr(e)||rf(e))return 1;if(N_(e))return 2}function T_(e,t,r){const n=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}const ZC={name:"attention",resolveAll:xAe,tokenize:yAe};function xAe(e,t){let r=-1,n,a,i,s,l,c,u,d;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;c=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f={...e[n][1].end},p={...e[r][1].start};_6(f,-c),_6(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},a={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[n][1].end={...s.start},e[r][1].start={...l.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=zs(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=zs(u,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),u=zs(u,T_(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=zs(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",a,t]]),e[r][1].end.offset-e[r][1].start.offset?(d=2,u=zs(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):d=0,ds(e,n-1,r-n+3,u),r=n+u.length-d-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function yAe(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,a=np(n);let i;return s;function s(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const u=e.exit("attentionSequence"),d=np(c),f=!d||d===2&&a||r.includes(c),p=!a||a===2&&d||r.includes(n);return u._open=!!(i===42?f:f&&(a||!p)),u._close=!!(i===42?p:p&&(d||!f)),t(c)}}function _6(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vAe={name:"autolink",tokenize:bAe};function bAe(e,t,r){let n=0;return a;function a(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(m){return mi(m)?(e.consume(m),s):m===64?r(m):u(m)}function s(m){return m===43||m===45||m===46||Ja(m)?(n=1,l(m)):u(m)}function l(m){return m===58?(e.consume(m),n=0,c):(m===43||m===45||m===46||Ja(m))&&n++<32?(e.consume(m),l):(n=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||N1(m)?r(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),d):cAe(m)?(e.consume(m),u):r(m)}function d(m){return Ja(m)?f(m):r(m)}function f(m){return m===46?(e.consume(m),n=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||Ja(m))&&n++<63){const x=m===45?p:f;return e.consume(m),x}return r(m)}}const ry={partial:!0,tokenize:wAe};function wAe(e,t,r){return n;function n(i){return fr(i)?gr(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||Ft(i)?t(i):r(i)}}const dJ={continuation:{tokenize:SAe},exit:EAe,name:"blockQuote",tokenize:_Ae};function _Ae(e,t,r){const n=this;return a;function a(s){if(s===62){const l=n.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return r(s)}function i(s){return fr(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function SAe(e,t,r){const n=this;return a;function a(s){return fr(s)?gr(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(dJ,t,r)(s)}}function EAe(e){e.exit("blockQuote")}const fJ={name:"characterEscape",tokenize:kAe};function kAe(e,t,r){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return dAe(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}const hJ={name:"characterReference",tokenize:NAe};function NAe(e,t,r){const n=this;let a=0,i,s;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,s=Ja,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=uAe,d):(e.enter("characterReferenceValue"),i=7,s=QC,d(f))}function d(f){if(f===59&&a){const p=e.exit("characterReferenceValue");return s===Ja&&!J4(n.sliceSerialize(p))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&a++<i?(e.consume(f),d):r(f)}}const S6={partial:!0,tokenize:jAe},E6={concrete:!0,name:"codeFenced",tokenize:TAe};function TAe(e,t,r){const n=this,a={partial:!0,tokenize:k};let i=0,s=0,l;return c;function c(E){return u(E)}function u(E){const T=n.events[n.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,l=E,e.enter("co
1070deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(E)}function d(E){return E===l?(s++,e.consume(E),d):s<3?r(E):(e.exit("codeFencedFenceSequence"),fr(E)?gr(e,f,"whitespace")(E):f(E))}function f(E){return E===null||Ft(E)?(e.exit("codeFencedFence"),n.interrupt?t(E):e.check(S6,y,j)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||Ft(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):fr(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),gr(e,m,"whitespace")(E)):E===96&&E===l?r(E):(e.consume(E),p)}function m(E){return E===null||Ft(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===null||Ft(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===l?r(E):(e.consume(E),x)}function y(E){return e.attempt(a,j,v)(E)}function v(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),b}function b(E){return i>0&&fr(E)?gr(e,w,"linePrefix",i+1)(E):w(E)}function w(E){return E===null||Ft(E)?e.check(S6,y,j)(E):(e.enter("codeFlowValue"),S(E))}function S(E){return E===null||Ft(E)?(e.exit("codeFlowValue"),w(E)):(e.consume(E),S)}function j(E){return e.exit("codeFenced"),t(E)}function k(E,T,O){let A=0;return P;function P(U){return E.enter("lineEnding"),E.consume(U),E.exit("lineEnding"),I}function I(U){return E.enter("codeFencedFence"),fr(U)?gr(E,R,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):R(U)}function R(U){return U===l?(E.enter("codeFencedFenceSequence"),M(U)):O(U)}function M(U){return U===l?(A++,E.consume(U),M):A>=s?(E.exit("codeFencedFenceSequence"),fr(U)?gr(E,L,"whitespace")(U):L(U)):O(U)}function L(U){return U===null||Ft(U)?(E.exit("codeFencedFence"),T(U)):O(U)}}}function jAe(e,t,r){const n=this;return a;function a(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}const xk={name:"codeIndented",tokenize:CAe},AAe={partial:!0,tokenize:OAe};function CAe(e,t,r){const n=this;return a;function a(u){return e.enter("codeIndented"),gr(e,i,"linePrefix",5)(u)}function i(u){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):r(u)}function s(u){return u===null?c(u):Ft(u)?e.attempt(AAe,s,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||Ft(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function OAe(e,t,r){const n=this;return a;function a(s){return n.parser.lazy[n.now().line]?r(s):Ft(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):gr(e,i,"linePrefix",5)(s)}function i(s){const l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):Ft(s)?a(s):r(s)}}const PAe={name:"codeText",previous:IAe,resolve:RAe,tokenize:FAe};function RAe(e){let t=e.length-4,r=3,n,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)a===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(a=n):(n===t||e[n][1].type==="lineEnding")&&(e[a][1].type="codeTextData",n!==a+2&&(e[a][1].end=e[n-1][1].end,e.splice(a+2,n-a-2),t-=n-a-2,n=a+2),a=void 0);return e}function IAe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function FAe(e,t,r){let n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(i=e.enter("codeTextSequence"),a=0,d(f)):Ft(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||Ft(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),a++,d):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",u(f))}}class MAe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const a=r||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return n&&m0(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),m0(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),m0(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);m0(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);m0(this.left,r.reverse())}}}function m0(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function pJ(e){const t={};let r=-1,n,a,i,s,l,c,u;const d=new MAe(e);for(;++r<d.length;){for(;r in t;)r=t[r];if(n=d.get(r),r&&n[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(c=n[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,DAe(d,r)),r=t[r],u=!0);else if(n[1]._container){for(i=r,a=void 0;i--;)if(s=d.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(n[1].end={...d.get(a)[1].start},l=d.slice(a,r),l.unshift(n),d.splice(a,r-a+1,l))}}return ds(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function DAe(e,t){const r=e.get(t)[1],n=e.get(t)[2];let a=t-1;const i=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._c
vendor: 5,973 bytes, line 1070
1070ontentTypeTextTrailing=!0));const l=s.events,c=[],u={};let d,f,p=-1,m=r,x=0,y=0;const v=[y];for(;m;){for(;e.get(++a)[1]!==m;);i.push(a),m._tokenizer||(d=n.sliceStream(m),m.next||d.push(null),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=r;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(y=p+1,v.push(y),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):v.pop(),p=v.length;p--;){const b=l.slice(v[p],v[p+1]),w=i.pop();c.push([w,w+b.length-1]),e.splice(w,2,b)}for(c.reverse(),p=-1;++p<c.length;)u[x+c[p][0]]=x+c[p][1],x+=c[p][1]-c[p][0]-1;return u}const LAe={resolve:BAe,tokenize:UAe},$Ae={partial:!0,tokenize:zAe};function BAe(e){return pJ(e),e}function UAe(e,t){let r;return n;function n(l){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),a(l)}function a(l){return l===null?i(l):Ft(l)?e.check($Ae,s,i)(l):(e.consume(l),a)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,a}}function zAe(e,t,r){const n=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),gr(e,i,"linePrefix")}function i(s){if(s===null||Ft(s))return r(s);const l=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function mJ(e,t,r,n,a,i,s,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(b){return b===60?(e.enter(n),e.enter(a),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||N1(b)?r(b):(e.enter(n),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(a),e.exit(n),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(l),p(b)):b===null||b===60||Ft(b)?r(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function y(b){return!d&&(b===null||b===41||Hr(b))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(n),t(b)):d<u&&b===40?(e.consume(b),d++,y):b===41?(e.consume(b),d--,y):b===null||b===32||b===40||N1(b)?r(b):(e.consume(b),b===92?v:y)}function v(b){return b===40||b===41||b===92?(e.consume(b),y):y(b)}}function gJ(e,t,r,n,a,i){const s=this;let l=0,c;return u;function u(m){return e.enter(n),e.enter(a),e.consume(m),e.exit(a),e.enter(i),d}function d(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(m):m===93?(e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(n),t):Ft(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Ft(m)||l++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!fr(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}}function xJ(e,t,r,n,a,i){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(n),e.enter(a),e.consume(p),e.exit(a),s=p===40?41:p,c):r(p)}function c(p){return p===s?(e.enter(a),e.consume(p),e.exit(a),e.exit(n),t):(e.enter(i),u(p))}function u(p){return p===s?(e.exit(i),c(s)):p===null?r(p):Ft(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),gr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||Ft(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:d)}function f(p){return p===s||p===92?(e.consume(p),d):d(p)}}function Q0(e,t){let r;return n;function n(a){return Ft(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,n):fr(a)?gr(e,n,r?"linePrefix":"lineSuffix")(a):t(a)}}const HAe={name:"definition",tokenize:WAe},qAe={partial:!0,tokenize:VAe};function WAe(e,t,r){const n=this;let a;return i;function i(m){return e.enter("definition"),s(m)}function s(m){return gJ.call(n,e,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return a=jo(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):r(m)}function c(m){return Hr(m)?Q0(e,u)(m):u(m)}function u(m){return mJ(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(qAe,f,f)(m)}function f(m){return fr(m)?gr(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Ft(m)?(e.exit("definition"),n.parser.defined.push(a),t(m)):r(m)}}function VAe(e,t,r){return n;function n(l){return Hr(l)?Q0(e,a)(l):r(l)}function a(l){return xJ(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return fr(l)?gr(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Ft(l)?t(l):r(l)}}const GAe={name:"hardBreakEscape",tokenize:KAe};function KAe(e,t,r){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Ft(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}const YAe={name:"headingAtx",resolve:XAe,tokenize:JAe};function XAe(e,t){let r=e.length-2,n=3,a,i;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(a={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},i={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},ds(e,n,r-n+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]]
vendor: 12,869 bytes, line 1070
1070)),e}function JAe(e,t,r){let n=0;return a;function a(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&n++<6?(e.consume(d),s):d===null||Hr(d)?(e.exit("atxHeadingSequence"),l(d)):r(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Ft(d)?(e.exit("atxHeading"),t(d)):fr(d)?gr(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||Hr(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const QAe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],k6=["pre","script","style","textarea"],ZAe={concrete:!0,name:"htmlFlow",resolveTo:rCe,tokenize:nCe},eCe={partial:!0,tokenize:iCe},tCe={partial:!0,tokenize:aCe};function rCe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function nCe(e,t,r){const n=this;let a,i,s,l,c;return u;function u(B){return d(B)}function d(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),f}function f(B){return B===33?(e.consume(B),p):B===47?(e.consume(B),i=!0,y):B===63?(e.consume(B),a=3,n.interrupt?t:F):mi(B)?(e.consume(B),s=String.fromCharCode(B),v):r(B)}function p(B){return B===45?(e.consume(B),a=2,m):B===91?(e.consume(B),a=5,l=0,x):mi(B)?(e.consume(B),a=4,n.interrupt?t:F):r(B)}function m(B){return B===45?(e.consume(B),n.interrupt?t:F):r(B)}function x(B){const X="CDATA[";return B===X.charCodeAt(l++)?(e.consume(B),l===X.length?n.interrupt?t:R:x):r(B)}function y(B){return mi(B)?(e.consume(B),s=String.fromCharCode(B),v):r(B)}function v(B){if(B===null||B===47||B===62||Hr(B)){const X=B===47,Y=s.toLowerCase();return!X&&!i&&k6.includes(Y)?(a=1,n.interrupt?t(B):R(B)):QAe.includes(s.toLowerCase())?(a=6,X?(e.consume(B),b):n.interrupt?t(B):R(B)):(a=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(B):i?w(B):S(B))}return B===45||Ja(B)?(e.consume(B),s+=String.fromCharCode(B),v):r(B)}function b(B){return B===62?(e.consume(B),n.interrupt?t:R):r(B)}function w(B){return fr(B)?(e.consume(B),w):P(B)}function S(B){return B===47?(e.consume(B),P):B===58||B===95||mi(B)?(e.consume(B),j):fr(B)?(e.consume(B),S):P(B)}function j(B){return B===45||B===46||B===58||B===95||Ja(B)?(e.consume(B),j):k(B)}function k(B){return B===61?(e.consume(B),E):fr(B)?(e.consume(B),k):S(B)}function E(B){return B===null||B===60||B===61||B===62||B===96?r(B):B===34||B===39?(e.consume(B),c=B,T):fr(B)?(e.consume(B),E):O(B)}function T(B){return B===c?(e.consume(B),c=null,A):B===null||Ft(B)?r(B):(e.consume(B),T)}function O(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||Hr(B)?k(B):(e.consume(B),O)}function A(B){return B===47||B===62||fr(B)?S(B):r(B)}function P(B){return B===62?(e.consume(B),I):r(B)}function I(B){return B===null||Ft(B)?R(B):fr(B)?(e.consume(B),I):r(B)}function R(B){return B===45&&a===2?(e.consume(B),W):B===60&&a===1?(e.consume(B),V):B===62&&a===4?(e.consume(B),ne):B===63&&a===3?(e.consume(B),F):B===93&&a===5?(e.consume(B),K):Ft(B)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(eCe,H,M)(B)):B===null||Ft(B)?(e.exit("htmlFlowData"),M(B)):(e.consume(B),R)}function M(B){return e.check(tCe,L,H)(B)}function L(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),U}function U(B){return B===null||Ft(B)?M(B):(e.enter("htmlFlowData"),R(B))}function W(B){return B===45?(e.consume(B),F):R(B)}function V(B){return B===47?(e.consume(B),s="",G):R(B)}function G(B){if(B===62){const X=s.toLowerCase();return k6.includes(X)?(e.consume(B),ne):R(B)}return mi(B)&&s.length<8?(e.consume(B),s+=String.fromCharCode(B),G):R(B)}function K(B){return B===93?(e.consume(B),F):R(B)}function F(B){return B===62?(e.consume(B),ne):B===45&&a===2?(e.consume(B),F):R(B)}function ne(B){return B===null||Ft(B)?(e.exit("htmlFlowData"),H(B)):(e.consume(B),ne)}function H(B){return e.exit("htmlFlow"),t(B)}}function aCe(e,t,r){const n=this;return a;function a(s){return Ft(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):r(s)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function iCe(e,t,r){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ry,t,r)}}const sCe={name:"htmlText",tokenize:oCe};function oCe(e,t,r){const n=this;let a,i,s;return l;function l(F){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(F),c}function c(F){return F===33?(e.consume(F),u):F===47?(e.consume(F),k):F===63?(e.consume(F),S):mi(F)?(e.consume(F),O):r(F)}function u(F){return F===45?(e.consume(F),d):F===91?(e.consume(F),i=0,x):mi(F)?(e.consume(F),w):r(F)}function d(F){return F===45?(e.consume(F),m):r(F)}function f(F){return F===null?r(F):F===45?(e.consume(F),p):Ft(F)?(s=f,V(F)):(e.consume(F),f)}function p(F){return F===45?(e.consume(F),m):f(F)}function m(F){return F===62?W(F):F===45?p(F):f(F)}function x(F){const ne="CDATA[";return F===ne.charCodeAt(i++)?(e.consume(F),i===ne.length?y:x):r(F)}function y(F){return F===null?r(F):F===93?(e.consume(F),v):Ft(F)?(s=y,V(F)):(e.consume(F),y)}function v(F){return F===93?(e.consume(F),b):y(F)}function b(F){return F===62?W(F):F===93?(e.consume(F),b):y(F)}function w(F){return F===null||F===62?W(F):Ft(F)?(s=w,V(F)):(e.consume(F),w)}function S(F){return F===null?r(F):F===63?(e.consume(F),j):Ft(F)?(s=S,V(F)):(e.consume(F),S)}function j(F){return F===62?W(F):S(F)}function k(F){return mi(F)?(e.consume(F),E):r(F)}function E(F){return F===45||Ja(F)?(e.consume(F),E):T(F)}function T(F){return Ft(F)?(s=T,V(F)):fr(F)?(e.consume(F),T):W(F)}function O(F){return F===45||Ja(F)?(e.consume(F),O):F===47||F===62||Hr(F)?A(F):r(F)}function A(F){return F===47?(e.consume(F),W):F===58||F===95||mi(F)?(e.consume(F),P):Ft(F)?(s=A,V(F)):fr(F)?(e.consume(F),A):W(F)}function P(F){return F===45||F===46||F===58||F===95||Ja(F)?(e.consume(F),P):I(F)}function I(F){return F===61?(e.consume(F),R):Ft(F)?(s=I,V(F)):fr(F)?(e.consume(F),I):A(F)}function R(F){return F===null||F===60||F===61||F===62||F===96?r(F):F===34||F===39?(e.consume(F),a=F,M):Ft(F)?(s=R,V(F)):fr(F)?(e.consume(F),R):(e.consume(F),L)}function M(F){return F===a?(e.consume(F),a=void 0,U):F===null?r(F):Ft(F)?(s=M,V(F)):(e.consume(F),M)}function L(F){return F===null||F===34||F===39||F===60||F===61||F===96?r(F):F===47||F===62||Hr(F)?A(F):(e.consume(F),L)}function U(F){return F===47||F===62||Hr(F)?A(F):r(F)}function W(F){return F===62?(e.consume(F),e.exit("htmlTextData"),e.exit("htmlText"),t):r(F)}function V(F){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),G}function G(F){return fr(F)?gr(e,K,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):K(F)}function K(F){return e.enter("htmlTextData"),s(F)}}const Q4={name:"labelEnd",resolveAll:dCe,resolveTo:fCe,tokenize:hCe},lCe={tokenize:pCe},cCe={tokenize:mCe},uCe={tokenize:gCe};function dCe(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const a=n.type==="labelImage"?4:2;n.type="data",t+=a}}return e.length!==r.length&&ds(e,0,e.length,r),e}function fCe(e,t){let r=e.length,n=0,a,i,s,l;for(;r--;)if(a=e[r][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[r][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=r,a.type!=="labelLink")){n=2;break}}else a.type==="labelEnd"&&(s=r);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[i+n+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=zs(l,e.slice(i+1,i+n+3)),l=zs(l,[["enter",d,t]]),l=zs(l,T_(t.parser.constructs.insideSpan.null,e.slice(i+n+4,s-3),t)),l=zs(l,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),l=zs(l,e.slice(s+1)),l=zs(l,[["exit",c,t]]),ds(e,i,e.length,l),e}function hCe(e,t,r){const n=this;let a=n.events.length,i,s;for(;a--;)if((n.events[a][1].type==="labelImage"||n.events[a][1].type==="labelLink")&&!n.events[a][1]._balanced){i=n.events[a][1];break}return l;function l(p){return i?i._inactive?f(p):(s=n.parser.defined.includes(jo(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):r(p)}function c(p){return p===40?e.attempt(lCe,d,s?d:f)(p):p===91?e.attempt(cCe,d,s?u:f)(p):s?d(p):f(p)}function u(p){return e.attempt(uCe,d,f)(p)}function d(p){return t(p)}function f(p){return i._balanced=!0,r(p)}}function pCe(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),a}function a(f){return Hr(f)?Q0(e,i)(f):i(f)}function i(f){return f===41?d(f):mJ(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Hr(f)?Q0(e,c)(f):d(f)}function l(f){return r(f)}function c(f){return f===34||f===39||f===40?xJ(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return Hr(f)?Q0(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function mCe(e,t,r){const n=this;return a;function a(l){return gJ.call(n,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return n.parser.defined.includes(jo(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(l):r(l)}function s(l){return r(l)}}function gCe(e,t,r){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}const xCe={name:"labelStartImage",resolveAll:Q4.resolveAll,tokenize:yCe};function yCe(e,t,r){const n=this;return a;function a(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):r(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):t(l)}}const vCe={name:"labelStartLink",resolveAll:Q4.resolveAll,tokenize:bCe};function bCe(e,t,r){const n=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const yk={name:"lineEnding",tokenize:wCe};function wCe(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),gr(e,t,"linePrefix")}}const Wb={name:"thematicBreak",tokenize:_Ce};function _Ce(e,t,r){let n=0,a;return i;function i(u){return e.enter("thematicBreak"),s(u)}function s(u){return a=u,l(u)}function l(u){return u===a?(e.enter("thematicBreakSequence"),c(u)):n>=3&&(u===null||Ft(u))?(e.exit("thematicBreak"),t(u)):r(u)}function c(u){return u===a?(e.consume(u),n++,c):(e.exit("thematicBreakSequence"),fr(u)?gr(e,l,"whitespace")(u):l(u))}}const Ri={continuation:{tokenize:NCe},exit:jCe,name:"list",tokenize:kCe},SCe={partial:!0,tokenize:ACe},ECe={partial:!0,tokenize:TCe};function kCe(e,t,r){const n=this,a=n.events[n.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(m){const x=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:QC(m)){if(n.containerState.type||(n.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Wb,r,u)(m):u(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return r(m)}function c(m){return QC(m)&&++s<10?(e.consume(m),c):(!n.interrupt||s<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):r(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(ry,n.interrupt?r:d,e.attempt(SCe,p,f))}
vendor: 6,262 bytes, line 1070
1070function d(m){return n.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return fr(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):r(m)}function p(m){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function NCe(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(ry,a,i);function a(l){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,gr(e,t,"listItemIndent",n.containerState.size+1)(l)}function i(l){return n.containerState.furtherBlankLines||!fr(l)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(l)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(ECe,t,s)(l))}function s(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,gr(e,e.attempt(Ri,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function TCe(e,t,r){const n=this;return gr(e,a,"listItemIndent",n.containerState.size+1);function a(i){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(i):r(i)}}function jCe(e){e.exit(this.containerState.type)}function ACe(e,t,r){const n=this;return gr(e,a,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=n.events[n.events.length-1];return!fr(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}const N6={name:"setextUnderline",resolveTo:CCe,tokenize:OCe};function CCe(e,t){let r=e.length,n,a,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=s,e.push(["exit",s,t]),e}function OCe(e,t,r){const n=this;let a;return i;function i(u){let d=n.events.length,f;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){f=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),a=u,s(u)):r(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===a?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),fr(u)?gr(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Ft(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const PCe={tokenize:RCe};function RCe(e){const t=this,r=e.attempt(ry,n,e.attempt(this.parser.constructs.flowInitial,a,gr(e,e.attempt(this.parser.constructs.flow,a,e.attempt(LAe,a)),"linePrefix")));return r;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const ICe={resolveAll:vJ()},FCe=yJ("string"),MCe=yJ("text");function yJ(e){return{resolveAll:vJ(e==="text"?DCe:void 0),tokenize:t};function t(r){const n=this,a=this.parser.constructs[e],i=r.attempt(a,s,l);return s;function s(d){return u(d)?i(d):l(d)}function l(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),c}function c(d){return u(d)?(r.exit("data"),i(d)):(r.consume(d),c)}function u(d){if(d===null)return!0;const f=a[d];let p=-1;if(f)for(;++p<f.length;){const m=f[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function vJ(e){return t;function t(r,n){let a=-1,i;for(;++a<=r.length;)i===void 0?r[a]&&r[a][1].type==="data"&&(i=a,a++):(!r[a]||r[a][1].type!=="data")&&(a!==i+2&&(r[i][1].end=r[a-1][1].end,r.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(r,n):r}}function DCe(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],a=t.sliceStream(n);let i=a.length,s=-1,l=0,c;for(;i--;){const u=a[i];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)c=!0,l++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(l=0),l){const u={type:r===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:n.start._bufferIndex+s,_index:n.start._index+i,line:n.end.line,column:n.end.column-l,offset:n.end.offset-l},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}const LCe={42:Ri,43:Ri,45:Ri,48:Ri,49:Ri,50:Ri,51:Ri,52:Ri,53:Ri,54:Ri,55:Ri,56:Ri,57:Ri,62:dJ},$Ce={91:HAe},BCe={[-2]:xk,[-1]:xk,32:xk},UCe={35:YAe,42:Wb,45:[N6,Wb],60:ZAe,61:N6,95:Wb,96:E6,126:E6},zCe={38:hJ,92:fJ},HCe={[-5]:yk,[-4]:yk,[-3]:yk,33:xCe,38:hJ,42:ZC,60:[vAe,sCe],91:vCe,92:[GAe,fJ],93:Q4,95:ZC,96:PAe},qCe={null:[ZC,ICe]},WCe={null:[42,95]},VCe={null:[]},GCe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:WCe,contentInitial:$Ce,disable:VCe,document:LCe,flow:UCe,flowInitial:BCe,insideSpan:qCe,string:zCe,text:HCe},Symbol.toStringTag,{value:"Module"}));function KCe(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const a={},i=[];let s=[],l=[];const c={attempt:T(k),check:T(E),consume:w,enter:S,exit:j,interrupt:T(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f};let d=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function f(I){return s=zs(s,I),v(),s[s.length-1]!==null?[]:(O(t,0),u.events=T_(i,u.events,u),u.events)}function p(I,R){return XCe(m(I),R)}function m(I){return YCe(s,I)}function x(){const{_bufferIndex:I,_index:R,line:M,column:L,offset:U}=n;return{_bufferIndex:I,_index:R,line:M,column:L,offset:U}}function y(I){a[I.line]=I.column,P()}function v(){let I;for(;n._index<s.length;){const R=s[n._index];if(typeof R=="string")for(I=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===I&&n._bufferIndex<R.length;
vendor: 13,279 bytes, lines 1070-1072
1070)b(R.charCodeAt(n._bufferIndex));else b(R)}}function b(I){d=d(I)}function w(I){Ft(I)?(n.line++,n.column=1,n.offset+=I===-3?2:1,P()):I!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=I}function S(I,R){const M=R||{};return M.type=I,M.start=x(),u.events.push(["enter",M,u]),l.push(M),M}function j(I){const R=l.pop();return R.end=x(),u.events.push(["exit",R,u]),R}function k(I,R){O(I,R.from)}function E(I,R){R.restore()}function T(I,R){return M;function M(L,U,W){let V,G,K,F;return Array.isArray(L)?H(L):"tokenize"in L?H([L]):ne(L);function ne(ae){return fe;function fe(ue){const oe=ue!==null&&ae[ue],Z=ue!==null&&ae.null,ce=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return H(ce)(ue)}}function H(ae){return V=ae,G=0,ae.length===0?W:B(ae[G])}function B(ae){return fe;function fe(ue){return F=A(),K=ae,ae.partial||(u.currentConstruct=ae),ae.name&&u.parser.constructs.disable.null.includes(ae.name)?Y():ae.tokenize.call(R?Object.assign(Object.create(u),R):u,c,X,Y)(ue)}}function X(ae){return I(K,F),U}function Y(ae){return F.restore(),++G<V.length?B(V[G]):W}}}function O(I,R){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&ds(u.events,R,u.events.length-R,I.resolve(u.events.slice(R),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function A(){const I=x(),R=u.previous,M=u.currentConstruct,L=u.events.length,U=Array.from(l);return{from:L,restore:W};function W(){n=I,u.previous=R,u.currentConstruct=M,u.events.length=L,l=U,P()}}function P(){n.line in a&&n.column<2&&(n.column=a[n.line],n.offset+=a[n.line]-1)}}function YCe(e,t){const r=t.start._index,n=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(r===a)s=[e[r].slice(n,i)];else{if(s=e.slice(r,a),n>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(n):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function XCe(e,t){let r=-1;const n=[];let a;for(;++r<e.length;){const i=e[r];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=` 1071`;break}case-3:{s=`\r 1072`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,n.push(s)}return n.join("")}function JCe(e){const n={constructs:cJ([GCe,...(e||{}).extensions||[]]),content:a(fAe),defined:[],document:a(pAe),flow:a(PCe),lazy:{},string:a(FCe),text:a(MCe)};return n;function a(i){return s;function s(l){return KCe(n,i,l)}}}function QCe(e){for(;!pJ(e););return e}const T6=/[\0\t\n\r]/g;function ZCe(){let e=1,t="",r=!0,n;return a;function a(i,s,l){const c=[];let u,d,f,p,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),f=0,t="",r&&(i.charCodeAt(0)===65279&&f++,r=void 0);f<i.length;){if(T6.lastIndex=f,u=T6.exec(i),p=u&&u.index!==void 0?u.index:i.length,m=i.charCodeAt(p),!u){t=i.slice(f);break}if(m===10&&f===p&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),f<p&&(c.push(i.slice(f,p)),e+=p-f),m){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:n=!0,e=1}f=p+1}return l&&(n&&c.push(-5),t&&c.push(t),c.push(null)),c}}const eOe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tOe(e){return e.replace(eOe,rOe)}function rOe(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),i=a===120||a===88;return uJ(r.slice(i?2:1),i?16:10)}return J4(r)||e}const bJ={}.hasOwnProperty;function nOe(e,t,r){return typeof t!="string"&&(r=t,t=void 0),aOe(r)(QCe(JCe(r).document().write(ZCe()(e,t,!0))))}function aOe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ke),autolinkProtocol:A,autolinkEmail:A,atxHeading:i(Se),blockQuote:i(Z),characterEscape:A,characterReference:A,codeFenced:i(ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(ce,s),codeText:i(q,s),codeTextData:A,data:A,codeFlowValue:A,definition:i(xe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(pe),hardBreakEscape:i(he),hardBreakTrailing:i(he),htmlFlow:i(ie,s),htmlFlowData:A,htmlText:i(ie,s),htmlTextData:A,image:i(we),label:s,link:i(ke),listItem:i(Ue),listItemValue:p,listOrdered:i(Oe,f),listUnordered:i(Oe),paragraph:i(Je),reference:B,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Se),strong:i(Ze),thematicBreak:i(ve)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:oe,autolinkProtocol:ue,blockQuote:c(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:ae,characterReference:fe,codeFenced:c(v),codeFencedFence:y,codeFencedFenceInfo:m,codeFencedFenceMeta:x,codeFlowValue:P,codeIndented:c(b),codeText:c(U),codeTextData:P,data:P,definition:c(),definitionDestinationString:j,definitionLabelString:w,definitionTitleString:S,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(M),htmlFlowData:P,htmlText:c(L),htmlTextData:P,image:c(V),label:K,labelText:G,lineEnding:I,link:c(W),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:X,resourceDestinationString:F,resourceTitleString:ne,resource:H,setextHeading:c(O),setextHeadingLineSequence:T,setextHeadingText:E,strong:c(),thematicBreak:c()}};wJ(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(J){let me={type:"root",children:[]};const Ee={stack:[me],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:d,data:r},Me=[];let Ae=-1;for(;++Ae<J.length;)if(J[Ae][1].type==="listOrdered"||J[Ae][1].type==="listUnordered")if(J[Ae][0]==="enter")Me.push(Ae);else{const Ke=Me.pop();Ae=a(J,Ke,Ae)}for(Ae=-1;++Ae<J.length;){const Ke=t[J[Ae][0]];bJ.call(Ke,J[Ae][1].type)&&Ke[J[Ae][1].type].call(Object.assign({sliceSerialize:J[Ae][2].sliceSerialize},Ee),J[Ae][1])}if(Ee.tokenStack.length>0){const Ke=Ee.tokenStack[Ee.tokenStack.length-1];(Ke[1]||j6).call(Ee,void 0,Ke[0])}for(me.position={start:Jc(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Jc(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae<t.transforms.length;)me=t.transforms[Ae](me)||me;return me}function a(J,me,Ee){let Me=me-1,Ae=-1,Ke=!1,jt,Ce,xt,bt;for(;++Me<=Ee;){const Pt=J[Me];switch(Pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pt[0]==="enter"?Ae++:Ae--,bt=void 0;break}case"lineEndingBlank":{Pt[0]==="enter"&&(jt&&!bt&&!Ae&&!xt&&(xt=Me),bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bt=void 0}if(!Ae&&Pt[0]==="enter"&&Pt[1].type==="listItemPrefix"||Ae===-1&&Pt[0]==="exit"&&(Pt[1].type==="listUnordered"||Pt[1].type==="listOrdered")){if(jt){let _r=Me;for(Ce=void 0;_r--;){const Ht=J[_r];if(Ht[1].type==="lineEnding"||Ht[1].type==="lineEndingBlank"){if(Ht[0]==="exit")continue;Ce&&(J[Ce][1].type="lineEndingBlank",Ke=!0),Ht[1].type="lineEnding",Ce=_r}else if(!(Ht[1].type==="linePrefix"||Ht[1].type==="blockQuotePrefix"||Ht[1].type==="blockQuotePrefixWhitespace"||Ht[1].type==="blockQuoteMarker"||Ht[1].type==="listItemIndent"))break}xt&&(!Ce||xt<Ce)&&(jt._spread=!0),jt.end=Object.assign({},Ce?J[Ce][1].start:Pt[1].end),J.splice(Ce||Me,0,["exit",jt,Pt[2]]),Me++,Ee++}if(Pt[1].type==="listItemPrefix"){const _r={type:"listItem",_spread:!1,start:Object.assign({},Pt[1].start),end:void 0};jt=_r,J.splice(Me,0,["enter",_r,Pt[2]]),Me++,Ee++,xt=void 0,bt=!0}}}return J[me][1]._spread=Ke,Ee}function i(J,me){return Ee;function Ee(Me){l.call(this,J(Me),Me),me&&me.call(this,Me)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(J,me,Ee){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([me,Ee||void 0]),J.position={start:Jc(me.start),end:void 0}}function c(J){return me;function me(Ee){J&&J.call(this,Ee),u.call(this,Ee)}}function u(J,me){const Ee=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==J.type&&(me?me.call(this,J,Me[0]):(Me[1]||j6).call(this,J,Me[0]));else throw new Error("Cannot close `"+J.type+"` ("+J0({start:J.start,end:J.end})+"): itâs not open");Ee.position.end=Jc(J.end)}function d(){return X4(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(J){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function m(){const J=this.resume(),me=this.stack[this.stack.length-1];me.lang=J}function x(){const J=this.resume(),me=this.stack[this.stack.length-1];me.meta=J}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J.replace(/(\r?\n|\r)$/g,"")}function w(J){const me=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=me,Ee.identifier=jo(this.sliceSerialize(J)).toLowerCase()}function S(){const J=this.resume(),me=this.stack[this.stack.length-1];me.title=J}function j(){const J=this.resume(),me=this.stack[this.stack.length-1];me.url=J}function k(J){const me=this.stack[this.stack.length-1];if(!me.depth){const Ee=this.sliceSerialize(J).length;me.depth=Ee}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(J){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function A(J){const Ee=this.stack[this.stack.length-1].children;let Me=Ee[Ee.length-1];(!Me||Me.type!=="text")&&(Me=te(),Me.position={start:Jc(J.start),end:void 0},Ee.push(Me)),this.stack.push(Me)}function P(J){const me=this.stack.pop();me.value+=this.sliceSerialize(J),me.position.end=Jc(J.end)}function I(J){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=me.children[me.children.length-1];Ee.position.end=Jc(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(A.call(this,J),P.call(this,J))}function R(){this.data.atHardBreak=!0}function M(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function L(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function U(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function W(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=me,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function V(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=me,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function G(J){const me=this.sliceSerialize(J),Ee=this.stack[this.stack.length-2];Ee.label=tOe(me),Ee.identifier=jo(me).toLowerCase()}function K(){const J=this.stack[this.stack.length-1],me=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const Me=J.children;Ee.children=Me}else Ee.alt=me}function F(){const J=this.resume(),me=this.stack[this.stack.length-1];me.url=J}function ne(){const J=this.resume(),me=this.stack[this.stack.length-1];me.title=J}function H(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function X(J){const me=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=me,Ee.identifier=jo(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Y(J){this.data.characterReferenceType=J.type}function ae(J){const me=this.sliceSerialize(J),Ee=this.data.characterReferenceType;let Me;Ee?(Me=uJ(me,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=J4(me);const Ae=this.stack[this.stack.length-1];Ae.value+=Me}function fe(J){const me=this.stack.pop();me.position.end=Jc(J.end)}function ue(J){P.call(this,J);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(J)}function oe(J){P.call(this,J);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(J)}function Z(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pe(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function he(){return{type:"break"}}function ie(){return{type:"html",value:""}}function we(){return{type:"image",title:null,url:"",alt:null}}function ke(){return{type:"link",title:null,url:"",children:[]}}function Oe(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ue(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Je(){return{type:"paragraph",children:[]}}function Ze(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function ve(){return{type:"thematicBreak"}}}
vendor: 11,241 bytes, lines 1072-1076
1072function Jc(e){return{line:e.line,column:e.column,offset:e.offset}}function wJ(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?wJ(e,n):iOe(e,n)}}function iOe(e,t){let r;for(r in t)if(bJ.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function j6(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+J0({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+J0({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+J0({start:t.start,end:t.end})+") is still open")}function sOe(e){const t=this;t.parser=r;function r(n){return nOe(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oOe(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function lOe(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:` 1073`}]}function cOe(e,t){const r=t.value?t.value+` 1074`:"",n={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(n.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function uOe(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function dOe(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fOe(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),a=nm(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let s,l=e.footnoteCounts.get(n);l===void 0?(l=0,e.footnoteOrder.push(n),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(n,l);const c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function hOe(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pOe(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function _J(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=n:a.push({type:"text",value:n}),a}function mOe(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return _J(e,t);const a={src:nm(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function gOe(e,t){const r={src:nm(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function xOe(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function yOe(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return _J(e,t);const a={href:nm(n.url||"")};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function vOe(e,t){const r={href:nm(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bOe(e,t,r){const n=e.all(t),a=r?wOe(r):SJ(t),i={},s=[];if(typeof t.checked=="boolean"){const d=n[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<n.length;){const d=n[l];(a||l!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:` 1075`}),d.type==="element"&&d.tagName==="p"&&!a?s.push(...d.children):s.push(d)}const c=n[n.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:` 1076`});const u={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,u),e.applyData(t,u)}function wOe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=SJ(r[n])}return t}function SJ(e){const t=e.spread;return t??e.children.length>1}function _Oe(e,t){const r={},n=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++a<n.length;){const s=n[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,i),e.applyData(t,i)}function SOe(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function EOe(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function kOe(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function NOe(e,t){const r=e.all(t),n=r.shift(),a=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),a.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},l=V4(t.children[1]),c=rJ(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function TOe(e,t,r){const n=r?r.children:void 0,i=(n?n.indexOf(t):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,l=s?s.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const f=t.children[c],p={},m=s?s[c]:void 0;m&&(p.align=m);let x={type:"element",tagName:i,properties:p,children:[]};f&&(x.children=e.all(f),e.patch(f,x),x=e.applyData(f,x)),u.push(x)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function jOe(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const A6=9,C6=32;function AOe(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),a=0;const i=[];for(;n;)i.push(O6(t.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(t);return i.push(O6(t.slice(a),a>0,!1)),i.join("")}function O6(e,t,r){let n=0,a=e.length;if(t){let i=e.codePointAt(n);for(;i===A6||i===C6;)n++,i=e.codePointAt(n)}if(r){let i=e.codePointAt(a-1);for(;i===A6||i===C6;)a--,i=e.codePointAt(a-1)}return a>n?e.slice(n,a):""}function COe(e,t){const r={type:"text",value:AOe(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function OOe(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const POe={blockquote:oOe,break:lOe,code:cOe,delete:uOe,emphasis:dOe,footnoteReference:fOe,heading:hOe,html:pOe,imageReference:mOe,image:gOe,inlineCode:xOe,linkReference:yOe,link:vOe,listItem:bOe,list:_Oe,paragraph:SOe,root:EOe,strong:kOe,table:NOe,tableCell:jOe,tableRow:TOe,text:COe,thematicBreak:OOe,toml:Qv,yaml:Qv,definition:Qv,footnoteDefinition:Qv};function Qv(){}const EJ=-1,j_=0,Z0=1,T1=2,Z4=3,eI=4,tI=5,rI=6,kJ=7,NJ=8,P6=typeof self=="object"?self:globalThis,ROe=(e,t)=>{const r=(a,i)=>(e.set(i,a),a),n=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case j_:case EJ:return r(s,a);case Z0:{const l=r([],a);for(const c of s)l.push(n(c));return l}case T1:{const l=r({},a);for(const[c,u]of s)l[n(c)]=n(u);return l}case Z4:return r(new Date(s),a);case eI:{const{source:l,flags:c}=s;return r(new RegExp(l,c),a)}case tI:{const l=r(new Map,a);for(const[c,u]of s)l.set(n(c),n(u));return l}case rI:{const l=r(new Set,a);for(const c of s)l.add(n(c));return l}case kJ:{const{name:l,message:c}=s;return r(new P6[l](c),a)}case NJ:return r(BigInt(s),a);case"BigInt":return r(Object(BigInt(s)),a);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return r(new DataView(l),s)}}return r(new P6[i](s),a)};return n},R6=e=>ROe(new Map,e)(0),sh="",{toString:IOe}={},{keys:FOe}=Object,g0=e=>{const t=typeof e;if(t!=="object"||!e)return[j_,t];const r=IOe.call(e).slice(8,-1);switch(r){case"Array":return[Z0,sh];case"Object":return[T1,sh];case"Date":return[Z4,sh];case"RegExp":return[eI,sh];case"Map":return[tI,sh];case"Set":return[rI,sh];case"DataView":return[Z0,r]}return r.includes("Array")?[Z0,r]:r.includes("Error")?[kJ,r]:[T1,r]},Zv=([e,t])=>e===j_&&(t==="function"||t==="symbol"),MOe=(e,t,r,n)=>{const a=(s,l)=>{const c=n.push(s)-1;return r.set(l,c),c},i=s=>{if(r.has(s))return r.get(s);let[l,c]=g0(s);switch(l){case j_:{let d=s;switch(c){case"bigint":l=NJ,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return a([EJ],s)}return a([l,d],s)}case Z0:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),a([c,[...p]],s)}const d=[],f=a([l,d],s);for(const p of s)d.push(i(p));return f}case T1:{if(c)switch(c){case"BigInt":return a([c,s.toString()],s);case"Boolean":case"Number":case"String":return a([c,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const d=[],f=a([l,d],s);for(const p of FOe(s))(e||!Zv(g0(s[p])))&&d.push([i(p),i(s[p])]);return f}case Z4:return a([l,s.toISOString()],s);case eI:{const{source:d,flags:f}=s;return a([l,{source:d,flags:f}],s)}case tI:{const d=[],f=a([l,d],s);for(const[p,m]of s)(e||!(Zv(g0(p))||Zv(g0(m))))&&d.push([i(p),i(m)]);return f}case rI:{const d=[],f=a([l,d],s);for(const p of s)(e||!Zv(g0(p)))&&d.push(i(p));return f}}const{message:u}=s;return a([l,{name:c,message:u}],s)};return i},I6=(e,{json:t,lossy:r}={})=>{const n=[];return MOe(!(t||r),!!t,new Map,n)(e),n},j1=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?R6(I6(e,t)):structuredClone(e):(e,t)=>R6(I6(e,t));function DOe(e,t){const r=[{type:"text",value:"â©"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function LOe(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}
vendor: 7,148 bytes, lines 1076-1082
1076function $Oe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||DOe,n=e.options.footnoteBackLabel||LOe,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),f=String(u.identifier).toUpperCase(),p=nm(f.toLowerCase());let m=0;const x=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++m<=y;){x.length>0&&x.push({type:"text",value:" "});let w=typeof r=="string"?r:r(c,m);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(c,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else d.push(...x);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,b),l.push(b)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...j1(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:` 1077`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` 1078`}]}}const A_=(function(e){if(e==null)return HOe;if(typeof e=="function")return C_(e);if(typeof e=="object")return Array.isArray(e)?BOe(e):UOe(e);if(typeof e=="string")return zOe(e);throw new Error("Expected function, string, or object as test")});function BOe(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=A_(e[r]);return C_(n);function n(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function UOe(e){const t=e;return C_(r);function r(n){const a=n;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function zOe(e){return C_(t);function t(r){return r&&r.type===e}}function C_(e){return t;function t(r,n,a){return!!(qOe(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function HOe(){return!0}function qOe(e){return e!==null&&typeof e=="object"&&"type"in e}const TJ=[],WOe=!0,eO=!1,VOe="skip";function jJ(e,t,r,n){let a;typeof t=="function"&&typeof r!="function"?(n=r,r=t):a=t;const i=A_(a),s=n?-1:1;l(e,void 0,[])();function l(c,u,d){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=TJ,x,y,v;if((!t||i(c,u,d[d.length-1]||void 0))&&(m=GOe(r(c,d)),m[0]===eO))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==VOe)for(y=(n?b.children.length:-1)+s,v=d.concat(b);y>-1&&y<b.children.length;){const w=b.children[y];if(x=l(w,y,v)(),x[0]===eO)return x;y=typeof x[1]=="number"?x[1]:y+s}}return m}}}function GOe(e){return Array.isArray(e)?e:typeof e=="number"?[WOe,e]:e==null?TJ:[e]}function nI(e,t,r,n){let a,i,s;typeof t=="function"&&typeof r!="function"?(i=void 0,s=t,a=r):(i=t,s=r,a=n),jJ(e,i,l,a);function l(c,u){const d=u[u.length-1],f=d?d.children.indexOf(c):void 0;return s(c,f,d)}}const tO={}.hasOwnProperty,KOe={};function YOe(e,t){const r=t||KOe,n=new Map,a=new Map,i=new Map,s={...POe,...r.handlers},l={all:u,applyData:JOe,definitionById:n,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:c,options:r,patch:XOe,wrap:ZOe};return nI(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?n:a,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),l;function c(d,f){const p=d.type,m=l.handlers[p];if(tO.call(l.handlers,p)&&m)return m(l,d,f);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in d){const{children:y,...v}=d,b=j1(v);return b.children=l.all(d),b}return j1(d)}return(l.options.unknownHandler||QOe)(l,d,f)}function u(d){const f=[];if("children"in d){const p=d.children;let m=-1;for(;++m<p.length;){const x=l.one(p[m],d);if(x){if(m&&p[m-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=F6(x.value)),!Array.isArray(x)&&x.type==="element")){const y=x.children[0];y&&y.type==="text"&&(y.value=F6(y.value))}Array.isArray(x)?f.push(...x):f.push(x)}}}return f}}function XOe(e,t){e.position&&(t.position=Lje(e))}function JOe(e,t){let r=t;if(e&&e.data){const n=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const s="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:s}}r.type==="element"&&i&&Object.assign(r.properties,j1(i)),"children"in r&&r.children&&a!==null&&a!==void 0&&(r.children=a)}return r}function QOe(e,t){const r=t.data||{},n="value"in t&&!(tO.call(r,"hProperties")||tO.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZOe(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:` 1079`});++n<e.length;)n&&r.push({type:"text",value:` 1080`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:` 1081`}),r}function F6(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function M6(e,t){const r=YOe(e,t),n=r.one(e,void 0),a=$Oe(r),i=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return a&&i.children.push({type:"text",value:` 1082`},a),i}function ePe(e,t){return e&&"run"in e?async function(r,n){const a=M6(r,{file:n,...t});await e.run(a,n)}:function(r,n){return M6(r,{file:n,...e||t})}}function D6(e){if(e)throw e}var vk,L6;function tPe(){if(L6)return vk;L6=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},s=function(u,d){r&&d.name==="__proto__"?r(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},l=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(n)return n(u,d).value}else return;return u[d]};return vk=function c(){var u,d,f,p,m,x,y=arguments[0],v=1,b=arguments.length,w=!1;for(typeof y=="boolean"&&(w=y,y=arguments[1]||{},v=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});v<b;++v)if(u=arguments[v],u!=null)for(d in u)f=l(y,d),p=l(u,d),y!==p&&(w&&p&&(i(p)||(m=a(p)))?(m?(m=!1,x=f&&a(f)?f:[]):x=f&&i(f)?f:{},s(y,{name:d,newValue:c(w,x,p)})):typeof p<"u"&&s(y,{name:d,newValue:p}));return y},vk}var rPe=tPe();const bk=tr(rPe);function rO(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);
vendor: 4,474 bytes, line 1082
1082return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function nPe(){const e=[],t={run:r,use:n};return t;function r(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...a);function l(c,...u){const d=e[++i];let f=-1;if(c){s(c);return}for(;++f<a.length;)(u[f]===null||u[f]===void 0)&&(u[f]=a[f]);a=u,d?aPe(d,l)(...u):s(null,...u)}}function n(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function aPe(e,t){let r;return n;function n(...s){const l=e.length>s.length;let c;l&&s.push(a);try{c=e.apply(this,s)}catch(u){const d=u;if(l&&r)throw d;return a(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...l){r||(r=!0,t(s,...l))}function i(s){a(null,s)}}const Qo={basename:iPe,dirname:sPe,extname:oPe,join:lPe,sep:"/"};function iPe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ny(e);let r=0,n=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){r=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let s=-1,l=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){r=a+1;break}}else s<0&&(i=!0,s=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(n=a):(l=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function sPe(e){if(ny(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function oPe(e){ny(e);let t=e.length,r=-1,n=0,a=-1,i=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),l===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||r<0||i===0||i===1&&a===r-1&&a===n+1?"":e.slice(a,r)}function lPe(...e){let t=-1,r;for(;++t<e.length;)ny(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":cPe(r)}function cPe(e){ny(e);const t=e.codePointAt(0)===47;let r=uPe(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function uPe(e,t){let r="",n=0,a=-1,i=0,s=-1,l,c;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(c=r.lastIndexOf("/"),c!==r.length-1){c<0?(r="",n=0):(r=r.slice(0,c),n=r.length-1-r.lastIndexOf("/")),a=s,i=0;continue}}else if(r.length>0){r="",n=0,a=s,i=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),n=s-a-1;a=s,i=0}else l===46&&i>-1?i++:i=-1}return r}function ny(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const dPe={cwd:fPe};function fPe(){return"/"}function nO(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hPe(e){if(typeof e=="string")e=new URL(e);else if(!nO(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return pPe(e)}function pPe(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const wk=["history","path","basename","stem","extname","dirname"];class AJ{constructor(t){let r;t?nO(t)?r={path:t}:typeof t=="string"||mPe(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":dPe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<wk.length;){const i=wk[n];i in r&&r[i]!==void 0&&r[i]!==null&&(this[i]=i==="history"?[...r[i]]:r[i])}let a;for(a in r)wk.includes(a)||(this[a]=r[a])}get basename(){return typeof this.path=="string"?Qo.basename(this.path):void 0}
vendor: 14,121 bytes, lines 1082-1083
1082set basename(t){Sk(t,"basename"),_k(t,"basename"),this.path=Qo.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qo.dirname(this.path):void 0}set dirname(t){$6(this.basename,"dirname"),this.path=Qo.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qo.extname(this.path):void 0}set extname(t){if(_k(t,"extname"),$6(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qo.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){nO(t)&&(t=hPe(t)),Sk(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qo.basename(this.path,this.extname):void 0}set stem(t){Sk(t,"stem"),_k(t,"stem"),this.path=Qo.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const a=this.message(t,r,n);throw a.fatal=!0,a}info(t,r,n){const a=this.message(t,r,n);return a.fatal=void 0,a}message(t,r,n){const a=new ri(t,r,n);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function _k(e,t){if(e&&e.includes(Qo.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qo.sep+"`")}function Sk(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function $6(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function mPe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gPe=(function(e){const n=this.constructor.prototype,a=n[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,n),i}),xPe={}.hasOwnProperty;class aI extends gPe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=nPe()}copy(){const t=new aI;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(bk(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Nk("data",this.frozen),this.namespace[t]=r,this):xPe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Nk("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const a=r.call(t,...n);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=eb(t),n=this.parser||this.Parser;return Ek("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Ek("process",this.parser||this.Parser),kk("process",this.compiler||this.Compiler),r?a(void 0,r):new Promise(a);function a(i,s){const l=eb(t),c=n.parse(l);n.run(c,l,function(d,f,p){if(d||!f||!p)return u(d);const m=f,x=n.stringify(m,p);bPe(x)?p.value=x:p.result=x,u(d,p)});function u(d,f){d||!f?s(d):i?i(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Ek("processSync",this.parser||this.Parser),kk("processSync",this.compiler||this.Compiler),this.process(t,a),U6("processSync","process",r),n;function a(i,s){r=!0,D6(i),n=s}}run(t,r,n){B6(t),this.freeze();const a=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?i(void 0,n):new Promise(i);function i(s,l){const c=eb(r);a.run(t,c,u);function u(d,f,p){const m=f||t;d?l(d):s?s(m):n(void 0,m,p)}}}runSync(t,r){let n=!1,a;return this.run(t,r,i),U6("runSync","run",n),a;function i(s,l){D6(s),a=l,n=!0}}stringify(t,r){this.freeze();const n=eb(r),a=this.compiler||this.Compiler;return kk("stringify",a),B6(t),a(t,n)}use(t,...r){const n=this.attachers,a=this.namespace;if(Nk("use",this.frozen),t!=null)if(typeof t=="function")c(t,r);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...f]=u;c(d,f)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(a.settings=bk(!0,a.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const f=u[d];i(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===u){p=f;break}if(p===-1)n.push([u,...d]);else if(d.length>0){let[m,...x]=d;const y=n[p][1];rO(y)&&rO(m)&&(m=bk(!0,y,m)),n[p]=[u,m,...x]}}}}const yPe=new aI().freeze();function Ek(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kk(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Nk(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function B6(e){if(!rO(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function U6(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function eb(e){return vPe(e)?e:new AJ(e)}function vPe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bPe(e){return typeof e=="string"||wPe(e)}function wPe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _Pe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",z6=[],H6={allowDangerousHtml:!0},SPe=/^(https?|ircs?|mailto|xmpp)$/i,EPe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function CJ(e){const t=kPe(e),r=NPe(e);return TPe(t.runSync(t.parse(r),r),e)}function kPe(e){const t=e.rehypePlugins||z6,r=e.remarkPlugins||z6,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...H6}:H6;return yPe().use(sOe).use(r).use(ePe,n).use(t)}function NPe(e){const t=e.children||"",r=new AJ;return typeof t=="string"&&(r.value=t),r}function TPe(e,t){const r=t.allowedElements,n=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||jPe;for(const d of EPe)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+_Pe+d.id,void 0);return nI(e,u),Hje(e,{Fragment:o.Fragment,components:a,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function u(d,f,p){if(d.type==="raw"&&p&&typeof f=="number")return s?p.children.splice(f,1):p.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let m;for(m in gk)if(Object.hasOwn(gk,m)&&Object.hasOwn(d.properties,m)){const x=d.properties[m],y=gk[m];(y===null||y.includes(d.tagName))&&(d.properties[m]=c(String(x||""),m,d))}}if(d.type==="element"){let m=r?!r.includes(d.tagName):i?i.includes(d.tagName):!1;if(!m&&n&&typeof f=="number"&&(m=!n(d,f,p)),m&&p&&typeof f=="number")return l&&d.children?p.children.splice(f,1,...d.children):p.children.splice(f,1),f}}}function jPe(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||r!==-1&&t>r||n!==-1&&t>n||SPe.test(e.slice(0,t))?e:""}function q6(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}function APe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function CPe(e,t,r){const a=A_((r||{}).ignore||[]),i=OPe(t);let s=-1;for(;++s<i.length;)jJ(e,"text",l);function l(u,d){let f=-1,p;for(;++f<d.length;){const m=d[f],x=p?p.children:void 0;if(a(m,x?x.indexOf(m):void 0,p))return;p=m}if(p)return c(u,d)}function c(u,d){const f=d[d.length-1],p=i[s][0],m=i[s][1];let x=0;const v=f.children.indexOf(u);let b=!1,w=[];p.lastIndex=0;let S=p.exec(u.value);for(;S;){const j=S.index,k={index:S.index,input:S.input,stack:[...d,u]};let E=m(...S,k);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=j+1:(x!==j&&w.push({type:"text",value:u.value.slice(x,j)}),Array.isArray(E)?w.push(...E):E&&w.push(E),x=j+S[0].length,b=!0),!p.global)break;S=p.exec(u.value)}return b?(x<u.value.length&&w.push({type:"text",value:u.value.slice(x)}),f.children.splice(v,1,...w)):w=[u],v+w.length}}function OPe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const a=r[n];t.push([PPe(a[0]),RPe(a[1])])}return t}function PPe(e){return typeof e=="string"?new RegExp(APe(e),"g"):e}function RPe(e){return typeof e=="function"?e:function(){return e}}const Tk="phrasing",jk=["autolink","link","image","label"];function IPe(){return{transforms:[UPe],enter:{literalAutolink:MPe,literalAutolinkEmail:Ak,literalAutolinkHttp:Ak,literalAutolinkWww:Ak},exit:{literalAutolink:BPe,literalAutolinkEmail:$Pe,literalAutolinkHttp:DPe,literalAutolinkWww:LPe}}}function FPe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tk,notInConstruct:jk},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tk,notInConstruct:jk},{character:":",before:"[ps]",after:"\\/",inConstruct:Tk,notInConstruct:jk}]}}function MPe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ak(e){this.config.enter.autolinkProtocol.call(this,e)}function DPe(e){this.config.exit.autolinkProtocol.call(this,e)}function LPe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function $Pe(e){this.config.exit.autolinkEmail.call(this,e)}function BPe(e){this.exit(e)}function UPe(e){CPe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zPe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),HPe]],{ignore:["link","linkReference"]})}function zPe(e,t,r,n,a){let i="";if(!OJ(a)||(/^w/i.test(t)&&(r=t+r,t="",i="http://"),!qPe(r)))return!1;const s=WPe(r+n);if(!s[0])return!1;const l={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function HPe(e,t,r,n){return!OJ(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function qPe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function WPe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const a=q6(e,"(");let i=q6(e,")");for(;n!==-1&&a>i;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),i++;return[e,r]}function OJ(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||rf(r)||N_(r))&&(!t||r!==47)}PJ.peek=eRe;function VPe(){this.buffer()}function GPe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function KPe(){this.buffer()}function YPe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function XPe(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=jo(this.sliceSerialize(e)).toLowerCase(),r.label=t}function JPe(e){this.exit(e)}function QPe(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=jo(this.sliceSerialize(e)).toLowerCase(),r.label=t}function ZPe(e){this.exit(e)}function eRe(){return"["}function PJ(e,t,r,n){const a=r.createTracker(n);let i=a.move("[^");const s=r.enter("footnoteReference"),l=r.enter("reference");return i+=a.move(r.safe(r.associationId(e),{after:"]",before:i})),l(),s(),i+=a.move("]"),i}function tRe(){return{enter:{gfmFootnoteCallString:VPe,gfmFootnoteCall:GPe,gfmFootnoteDefinitionLabelString:KPe,gfmFootnoteDefinition:YPe},exit:{gfmFootnoteCallString:XPe,gfmFootnoteCall:JPe,gfmFootnoteDefinitionLabelString:QPe,gfmFootnoteDefinition:ZPe}}}function rRe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:PJ},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,a,i,s){const l=i.createTracker(s);let c=l.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=l.move(i.safe(i.associationId(n),{before:c,after:"]"})),d(),c+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),c+=l.move((t?` 1083`:" ")+i.indentLines(i.containerFlow(n,l.current()),t?RJ:nRe))),u(),c}}function nRe(e,t,r){return t===0?e:RJ(e,t,r)}function RJ(e,t,r){return(r?"":" ")+e}const aRe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];IJ.peek=cRe;
vendor: 13,715 bytes, lines 1083-1095
1083function iRe(){return{canContainEols:["delete"],enter:{strikethrough:oRe},exit:{strikethrough:lRe}}}function sRe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aRe}],handlers:{delete:IJ}}}function oRe(e){this.enter({type:"delete",children:[]},e)}function lRe(e){this.exit(e)}function IJ(e,t,r,n){const a=r.createTracker(n),i=r.enter("strikethrough");let s=a.move("~~");return s+=r.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function cRe(){return"~"}function uRe(e){return e.length}function dRe(e,t){const r=t||{},n=(r.align||[]).concat(),a=r.stringLength||uRe,i=[],s=[],l=[],c=[];let u=0,d=-1;for(;++d<e.length;){const y=[],v=[];let b=-1;for(e[d].length>u&&(u=e[d].length);++b<e[d].length;){const w=fRe(e[d][b]);if(r.alignDelimiters!==!1){const S=a(w);v[b]=S,(c[b]===void 0||S>c[b])&&(c[b]=S)}y.push(w)}s[d]=y,l[d]=v}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<u;)i[f]=W6(n[f]);else{const y=W6(n);for(;++f<u;)i[f]=y}f=-1;const p=[],m=[];for(;++f<u;){const y=i[f];let v="",b="";y===99?(v=":",b=":"):y===108?v=":":y===114&&(b=":");let w=r.alignDelimiters===!1?1:Math.max(1,c[f]-v.length-b.length);const S=v+"-".repeat(w)+b;r.alignDelimiters!==!1&&(w=v.length+w+b.length,w>c[f]&&(c[f]=w),m[f]=w),p[f]=S}s.splice(1,0,p),l.splice(1,0,m),d=-1;const x=[];for(;++d<s.length;){const y=s[d],v=l[d];f=-1;const b=[];for(;++f<u;){const w=y[f]||"";let S="",j="";if(r.alignDelimiters!==!1){const k=c[f]-(v[f]||0),E=i[f];E===114?S=" ".repeat(k):E===99?k%2?(S=" ".repeat(k/2+.5),j=" ".repeat(k/2-.5)):(S=" ".repeat(k/2),j=S):j=" ".repeat(k)}r.delimiterStart!==!1&&!f&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&w==="")&&(r.delimiterStart!==!1||f)&&b.push(" "),r.alignDelimiters!==!1&&b.push(S),b.push(w),r.alignDelimiters!==!1&&b.push(j),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||f!==u-1)&&b.push("|")}x.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return x.join(` 1084`)}function fRe(e){return e==null?"":String(e)}function W6(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function hRe(e,t,r,n){const a=r.enter("blockquote"),i=r.createTracker(n);i.move("> "),i.shift(2);const s=r.indentLines(r.containerFlow(e,i.current()),pRe);return a(),s}function pRe(e,t,r){return">"+(r?"":" ")+e}function mRe(e,t){return V6(e,t.inConstruct,!0)&&!V6(e,t.notInConstruct,!1)}function V6(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function G6(e,t,r,n){let a=-1;for(;++a<r.unsafe.length;)if(r.unsafe[a].character===` 1085`&&mRe(r.stack,r.unsafe[a]))return/[ \t]/.test(n.before)?"":" ";return`\\ 1086`}function gRe(e,t){const r=String(e);let n=r.indexOf(t),a=n,i=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===a?++i>s&&(s=i):i=1,a=n+t.length,n=r.indexOf(t,a);return s}function xRe(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function yRe(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function vRe(e,t,r,n){const a=yRe(r),i=e.value||"",s=a==="`"?"GraveAccent":"Tilde";if(xRe(e,r)){const f=r.enter("codeIndented"),p=r.indentLines(i,bRe);return f(),p}const l=r.createTracker(n),c=a.repeat(Math.max(gRe(i,a)+1,3)),u=r.enter("codeFenced");let d=l.move(c);if(e.lang){const f=r.enter(`codeFencedLang${s}`);d+=l.move(r.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${s}`);d+=l.move(" "),d+=l.move(r.safe(e.meta,{before:d,after:` 1087`,encode:["`"],...l.current()})),f()}return d+=l.move(` 1088`),i&&(d+=l.move(i+` 1089`)),d+=l.move(c),u(),d}function bRe(e,t,r){return(r?"":" ")+e}function iI(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wRe(e,t,r,n){const a=iI(r),i=a==='"'?"Quote":"Apostrophe",s=r.enter("definition");let l=r.enter("label");const c=r.createTracker(n);let u=c.move("[");return u+=c.move(r.safe(r.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":` 1090`,...c.current()}))),l(),e.title&&(l=r.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(r.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),s(),u}function _Re(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $g(e){return"&#x"+e.toString(16).toUpperCase()+";"}function A1(e,t,r){const n=np(e),a=np(t);return n===void 0?a===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}FJ.peek=SRe;function FJ(e,t,r,n){const a=_Re(r),i=r.enter("emphasis"),s=r.createTracker(n),l=s.move(a);let c=s.move(r.containerPhrasing(e,{after:a,before:l,...s.current()}));const u=c.charCodeAt(0),d=A1(n.before.charCodeAt(n.before.length-1),u,a);d.inside&&(c=$g(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=A1(n.after.charCodeAt(0),f,a);p.inside&&(c=c.slice(0,-1)+$g(f));const m=s.move(a);return i(),r.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},l+c+m}function SRe(e,t,r){return r.options.emphasis||"*"}function ERe(e,t){let r=!1;return nI(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,eO}),!!((!e.depth||e.depth<3)&&X4(e)&&(t.options.setext||r))}function kRe(e,t,r,n){const a=Math.max(Math.min(6,e.depth||1),1),i=r.createTracker(n);if(ERe(e,r)){const d=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(e,{...i.current(),before:` 1091`,after:` 1092`});return f(),d(),p+` 1093`+(a===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` 1094`))+1))}const s="#".repeat(a),l=r.enter("headingAtx"),c=r.enter("phrasing");i.move(s+" ");let u=r.containerPhrasing(e,{before:"# ",after:` 1095`,...i.current()});return/^[\t ]/.test(u)&&(u=$g(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,r.options.closeAtx&&(u+=" "+s),c(),l(),u}MJ.peek=NRe;function MJ(e){return e.value||""}function NRe(){return"<"}DJ.peek=TRe;function DJ(e,t,r,n){const a=iI(r),i=a==='"'?"Quote":"Apostrophe",s=r.enter("image");let l=r.enter("label");const c=r.createTracker(n);let u=c.move("![");return u+=c.move(r.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=r.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(r.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),u+=c.move(")"),s(),u}function TRe(){return"!"}LJ.peek=jRe;function LJ(e,t,r,n){const a=e.referenceType,i=r.enter("imageReference");let s=r.enter("label");const l=r.createTracker(n);let c=l.move("![");const u=r.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const d=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:c,after:"]",...l.current()});return s(),r.stack=d,i(),a==="full"||!u||u!==f?c+=l.move(f+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function jRe(){return"!"}$J.peek=ARe;function $J(e,t,r){let n=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(n);)a+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<r.unsafe.length;){const s=r.unsafe[i],l=r.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(n);){let u=c.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(c.index+1)}}return a+n+a}function ARe(){return"`"}function BJ(e,t){const r=X4(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}UJ.peek=CRe;function UJ(e,t,r,n){const a=iI(r),i=a==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let l,c;if(BJ(e,r)){const d=r.stack;r.stack=[],l=r.enter("autolink");let f=s.move("<");return f+=s.move(r.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),l(),r.stack=d,f}l=r.enter("link"),c=r.enter("label");let u=s.move("[");return u+=s.move(r.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(r.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=r.enter("destinationRaw"),u+=s.move(r.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=r.enter(`title${i}`),u+=s.move(" "+a),u+=s.move(r.safe(e.title,{before:u,after:a,...s.current()})),u+=s.move(a),c()),u+=s.move(")"),l(),u}function CRe(e,t,r){return BJ(e,r)?"<":"["}zJ.peek=ORe;function zJ(e,t,r,n){const a=e.referenceType,i=r.enter("linkReference");let s=r.enter("label");const l=r.createTracker(n);let c=l.move("[");const u=r.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const d=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:c,after:"]",...l.current()});return s(),r.stack=d,i(),a==="full"||!u||u!==f?c+=l.move(f+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function ORe(){return"["}function sI(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function PRe(e){const t=sI(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function RRe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function HJ(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function IRe(e,t,r,n){const a=r.enter("list"),i=r.bulletCurrent;let s=e.ordered?RRe(r):sI(r);const l=e.ordered?s==="."?")":".":PRe(r);let c=t&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(c=!0),HJ(r)===s&&d){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),r.bulletCurrent=s;const u=r.containerFlow(e,n);return r.bulletLastUsed=s,r.bulletCurrent=i,a(),u}function FRe(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function MRe(e,t,r,n){const a=FRe(r);let i=r.bulletCurrent||sI(r);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=r.createTracker(n);l.move(i+" ".repeat(s-i.length)),l.shift(s);const c=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,l.current()),d);return c(),u;function d(f,p,m){return p?(m?"":" ".repeat(s))+f:(m?i:i+" ".repeat(s-i.length))+f}}function DRe(e,t,r,n){const a=r.enter("paragraph"),i=r.enter("phrasing"),s=r.containerPhrasing(e,n);return i(),a(),s}const LRe=A_(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $Re(e,t,r,n){return(e.children.some(function(s){return LRe(s)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function BRe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qJ.peek=URe;function qJ(e,t,r,n){const a=BRe(r),i=r.enter("strong"),s=r.createTracker(n),l=s.move(a+a);let c=s.move(r.containerPhrasing(e,{after:a,before:l,...s.current()}));const u=c.charCodeAt(0),d=A1(n.before.charCodeAt(n.before.length-1),u,a);d.inside&&(c=$g(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=A1(n.after.charCodeAt(0),f,a);p.inside&&(c=c.slice(0,-1)+$g(f));const m=s.move(a+a);return i(),r.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},l+c+m}function URe(e,t,r){return r.options.strong||"*"}
vendor: 10,092 bytes, lines 1095-1097
1095function zRe(e,t,r,n){return r.safe(e.value,n)}function HRe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function qRe(e,t,r){const n=(HJ(r)+(r.options.ruleSpaces?" ":"")).repeat(HRe(r));return r.options.ruleSpaces?n.slice(0,-1):n}const WJ={blockquote:hRe,break:G6,code:vRe,definition:wRe,emphasis:FJ,hardBreak:G6,heading:kRe,html:MJ,image:DJ,imageReference:LJ,inlineCode:$J,link:UJ,linkReference:zJ,list:IRe,listItem:MRe,paragraph:DRe,root:$Re,strong:qJ,text:zRe,thematicBreak:qRe};function WRe(){return{enter:{table:VRe,tableData:K6,tableHeader:K6,tableRow:KRe},exit:{codeText:YRe,table:GRe,tableData:Ck,tableHeader:Ck,tableRow:Ck}}}function VRe(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function GRe(e){this.exit(e),this.data.inTable=void 0}function KRe(e){this.enter({type:"tableRow",children:[]},e)}function Ck(e){this.exit(e)}function K6(e){this.enter({type:"tableCell",children:[]},e)}function YRe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,XRe));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function XRe(e,t){return t==="|"?t:e}function JRe(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,a=t.stringLength,i=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` 1096`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:l}};function s(m,x,y,v){return u(d(m,y,v),m.align)}function l(m,x,y,v){const b=f(m,y,v),w=u([b]);return w.slice(0,w.indexOf(` 1097`))}function c(m,x,y,v){const b=y.enter("tableCell"),w=y.enter("phrasing"),S=y.containerPhrasing(m,{...v,before:i,after:i});return w(),b(),S}function u(m,x){return dRe(m,{align:x,alignDelimiters:n,padding:r,stringLength:a})}function d(m,x,y){const v=m.children;let b=-1;const w=[],S=x.enter("table");for(;++b<v.length;)w[b]=f(v[b],x,y);return S(),w}function f(m,x,y){const v=m.children;let b=-1;const w=[],S=x.enter("tableRow");for(;++b<v.length;)w[b]=c(v[b],m,x,y);return S(),w}function p(m,x,y){let v=WJ.inlineCode(m,x,y);return y.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function QRe(){return{exit:{taskListCheckValueChecked:Y6,taskListCheckValueUnchecked:Y6,paragraph:e4e}}}function ZRe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:t4e}}}function Y6(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function e4e(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const a=t.children;let i=-1,s;for(;++i<a.length;){const l=a[i];if(l.type==="paragraph"){s=l;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function t4e(e,t,r,n){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=r.createTracker(n);i&&l.move(s);let c=WJ.listItem(e,t,r,{...n,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+s}}function r4e(){return[IPe(),tRe(),iRe(),WRe(),QRe()]}function n4e(e){return{extensions:[FPe(),rRe(e),sRe(),JRe(e),ZRe()]}}const a4e={tokenize:u4e,partial:!0},VJ={tokenize:d4e,partial:!0},GJ={tokenize:f4e,partial:!0},KJ={tokenize:h4e,partial:!0},i4e={tokenize:p4e,partial:!0},YJ={name:"wwwAutolink",tokenize:l4e,previous:JJ},XJ={name:"protocolAutolink",tokenize:c4e,previous:QJ},Sc={name:"emailAutolink",tokenize:o4e,previous:ZJ},kl={};function s4e(){return{text:kl}}let cd=48;for(;cd<123;)kl[cd]=Sc,cd++,cd===58?cd=65:cd===91&&(cd=97);kl[43]=Sc;kl[45]=Sc;kl[46]=Sc;kl[95]=Sc;kl[72]=[Sc,XJ];kl[104]=[Sc,XJ];kl[87]=[Sc,YJ];kl[119]=[Sc,YJ];function o4e(e,t,r){const n=this;let a,i;return s;function s(f){return!aO(f)||!ZJ.call(n,n.previous)||oI(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(f))}function l(f){return aO(f)?(e.consume(f),l):f===64?(e.consume(f),c):r(f)}function c(f){return f===46?e.check(i4e,d,u)(f):f===45||f===95||Ja(f)?(i=!0,e.consume(f),c):d(f)}function u(f){return e.consume(f),a=!0,c}function d(f){return i&&a&&mi(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function l4e(e,t,r){const n=this;return a;function a(s){return s!==87&&s!==119||!JJ.call(n,n.previous)||oI(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(a4e,e.attempt(VJ,e.attempt(GJ,i),r),r)(s))}function i(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function c4e(e,t,r){const n=this;let a="",i=!1;return s;function s(f){return(f===72||f===104)&&QJ.call(n,n.previous)&&!oI(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(f),e.consume(f),l):r(f)}function l(f){if(mi(f)&&a.length<5)return a+=String.fromCodePoint(f),e.consume(f),l;if(f===58){const p=a.toLowerCase();if(p==="http"||p==="https")return e.consume(f),c}return r(f)}function c(f){return f===47?(e.consume(f),i?u:(i=!0,c)):r(f)}function u(f){return f===null||N1(f)||Hr(f)||rf(f)||N_(f)?r(f):e.attempt(VJ,e.attempt(GJ,d),r)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function u4e(e,t,r){let n=0;return a;function a(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),a):s===46&&n===3?(e.consume(s),i):r(s)}function i(s){return s===null?r(s):t(s)}}function d4e(e,t,r){let n,a,i;return s;function s(u){return u===46||u===95?e.check(KJ,c,l)(u):u===null||Hr(u)||rf(u)||u!==45&&N_(u)?c(u):(i=!0,e.consume(u),s)}function l(u){return u===95?n=!0:(a=n,n=void 0),e.consume(u),s}function c(u){return a||n||!i?r(u):t(u)}}function f4e(e,t){let r=0,n=0;return a;function a(s){return s===40?(r++,e.consume(s),a):s===41&&n<r?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(KJ,t,i)(s):s===null||Hr(s)||rf(s)?t(s):(e.consume(s),a)}function i(s){return s===41&&n++,e.consume(s),a}}function h4e(e,t,r){return n;function n(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),n):l===38?(e.consume(l),i):l===93?(e.consume(l),a):l===60||l===null||Hr(l)||rf(l)?t(l):r(l)}function a(l){return l===null||l===40||l===91||Hr(l)||rf(l)?t(l):n(l)}function i(l){return mi(l)?s(l):r(l)}function s(l){return l===59?(e.consume(l),n):mi(l)?(e.consume(l),s):r(l)}}function p4e(e,t,r){return n;function n(i){return e.consume(i),a}function a(i){return Ja(i)?r(i):t(i)}}function JJ(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Hr(e)}function QJ(e){return!mi(e)}function ZJ(e){return!(e===47||aO(e))}function aO(e){return e===43||e===45||e===46||e===95||Ja(e)}function oI(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const m4e={tokenize:S4e,partial:!0};function g4e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:b4e,continuation:{tokenize:w4e},exit:_4e}},text:{91:{name:"gfmFootnoteCall",tokenize:v4e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:x4e,resolveTo:y4e}}}}function x4e(e,t,r){const n=this;let a=n.events.length;const i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;a--;){const c=n.events[a][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return r(c);const u=jo(n.sliceSerialize({start:s.end,end:n.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?r(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function y4e(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...l),e}function v4e(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i=0,s;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(i>999||f===93&&!s||f===null||f===91||Hr(f))return r(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(jo(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Hr(f)||(s=!0),i++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}
vendor: 4,276 bytes, line 1097
1097}function b4e(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i,s=0,l;return c;function c(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):r(x)}function d(x){if(s>999||x===93&&!l||x===null||x===91||Hr(x))return r(x);if(x===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=jo(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Hr(x)||(l=!0),s++,e.consume(x),x===92?f:d}function f(x){return x===91||x===92||x===93?(e.consume(x),s++,d):d(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),a.includes(i)||a.push(i),gr(e,m,"gfmFootnoteDefinitionWhitespace")):r(x)}function m(x){return t(x)}}function w4e(e,t,r){return e.check(ry,t,e.attempt(m4e,t,r))}function _4e(e){e.exit("gfmFootnoteDefinition")}function S4e(e,t,r){const n=this;return gr(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):r(i)}}function E4e(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:i,resolveAll:a};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function a(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let u=c;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[c][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[c][1].end)},f={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[c][1].start)},p=[["enter",d,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",f,l]],m=l.parser.constructs.insideSpan.null;m&&ds(p,p.length,0,T_(m,s.slice(u+1,c),l)),ds(p,p.length,0,[["exit",f,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",d,l]]),ds(s,u-1,c-u+3,p),c=u+p.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function i(s,l,c){const u=this.previous,d=this.events;let f=0;return p;function p(x){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(x):(s.enter("strikethroughSequenceTemporary"),m(x))}function m(x){const y=np(u);if(x===126)return f>1?c(x):(s.consume(x),f++,m);if(f<2&&!r)return c(x);const v=s.exit("strikethroughSequenceTemporary"),b=np(x);return v._open=!b||b===2&&!!y,v._close=!y||y===2&&!!b,l(x)}}}class k4e{constructor(){this.map=[]}add(t,r,n){N4e(this,t,r,n)}consume(t){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let a=n.pop();for(;a;){for(const i of a)t.push(i);a=n.pop()}this.map.length=0}}function N4e(e,t,r,n){let a=0;if(!(r===0&&n.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=r,e.map[a][2].push(...n);return}a+=1}e.map.push([t,r,n])}}function T4e(e,t){let r=!1;const n=[];for(;t<e.length;){const a=e[t];if(r){if(a[0]==="enter")a[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function j4e(){return{flow:{null:{name:"table",tokenize:A4e,resolveAll:C4e}}}}function A4e(e,t,r){const n=this;let a=0,i=0,s;return l;function l(P){let I=n.events.length-1;for(;I>-1;
vendor: 5,304 bytes, line 1097
1097){const L=n.events[I][1].type;if(L==="lineEnding"||L==="linePrefix")I--;else break}const R=I>-1?n.events[I][1].type:null,M=R==="tableHead"||R==="tableRow"?E:c;return M===E&&n.parser.lazy[n.now().line]?r(P):M(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),u(P)}function u(P){return P===124||(s=!0,i+=1),d(P)}function d(P){return P===null?r(P):Ft(P)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),m):r(P):fr(P)?gr(e,d,"whitespace")(P):(i+=1,s&&(s=!1,a+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(P)))}function f(P){return P===null||P===124||Hr(P)?(e.exit("data"),d(P)):(e.consume(P),P===92?p:f)}function p(P){return P===92||P===124?(e.consume(P),f):f(P)}function m(P){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(P):(e.enter("tableDelimiterRow"),s=!1,fr(P)?gr(e,x,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):x(P))}function x(P){return P===45||P===58?v(P):P===124?(s=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),y):k(P)}function y(P){return fr(P)?gr(e,v,"whitespace")(P):v(P)}function v(P){return P===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),b):P===45?(i+=1,b(P)):P===null||Ft(P)?j(P):k(P)}function b(P){return P===45?(e.enter("tableDelimiterFiller"),w(P)):k(P)}function w(P){return P===45?(e.consume(P),w):P===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(P))}function S(P){return fr(P)?gr(e,j,"whitespace")(P):j(P)}function j(P){return P===124?x(P):P===null||Ft(P)?!s||a!==i?k(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):k(P)}function k(P){return r(P)}function E(P){return e.enter("tableRow"),T(P)}function T(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),T):P===null||Ft(P)?(e.exit("tableRow"),t(P)):fr(P)?gr(e,T,"whitespace")(P):(e.enter("data"),O(P))}function O(P){return P===null||P===124||Hr(P)?(e.exit("data"),T(P)):(e.consume(P),P===92?A:O)}function A(P){return P===92||P===124?(e.consume(P),O):O(P)}}function C4e(e,t){let r=-1,n=!0,a=0,i=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,u,d,f;const p=new k4e;for(;++r<e.length;){const m=e[r],x=m[1];m[0]==="enter"?x.type==="tableHead"?(l=!1,c!==0&&(X6(p,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},p.add(r,0,[["enter",u,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(n=!0,f=void 0,i=[0,0,0,0],s=[0,r+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},p.add(r,0,[["enter",d,t]])),a=x.type==="tableDelimiterRow"?2:d?3:1):a&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],f=tb(p,t,i,a,void 0,f),i=[0,0,0,0]),s[2]=r)):x.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(s[0]=s[1],f=tb(p,t,i,a,void 0,f)),i=s,s=[i[1],r,0,0])):x.type==="tableHead"?(l=!0,c=r):x.type==="tableRow"||x.type==="tableDelimiterRow"?(c=r,i[1]!==0?(s[0]=s[1],f=tb(p,t,i,a,r,f)):s[1]!==0&&(f=tb(p,t,s,a,r,f)),a=0):a&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(s[3]=r)}for(c!==0&&X6(p,t,c,u,d),p.consume(t.events),r=-1;++r<t.events.length;){const m=t.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=T4e(t.events,r))}return e}function tb(e,t,r,n,a,i){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(i.end=Object.assign({},mh(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const c=mh(t.events,r[1]);if(i={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(r[1],0,[["enter",i,t]]),r[2]!==0){const u=mh(t.events,r[2]),d=mh(t.events,r[3]),f={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const p=t.events[r[2]],m=t.events[r[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const x=r[2]+1,y=r[3]-r[2]-1;e.add(x,y,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return a!==void 0&&(i.end=Object.assign({},mh(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function X6(e,t,r,n,a){const i=[],s=mh(t.events,r);a&&(a.end=Object.assign({},s),i.push(["exit",a,t])),n.end=Object.assign({},s),i.push(["exit",n,t]),e.add(r+1,0,i)}function mh(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const O4e={name:"tasklistCheck",tokenize:R4e};function P4e(){return{text:{91:O4e}}}function R4e(e,t,r){const n=this;return a;function a(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Hr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):r(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):r(c)}function l(c){return Ft(c)?t(c):fr(c)?e.check({tokenize:I4e},t,r)(c):r(c)}}function I4e(e,t,r){return gr(e,n,"whitespace");
1097function n(a){return a===null?r(a):t(a)}}function F4e(e){return cJ([s4e(),g4e(),E4e(e),j4e(),P4e()])}const M4e={};function eQ(e){const t=this,r=e||M4e,n=t.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(F4e(r)),i.push(r4e()),s.push(n4e(r))}function D4e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}function iO(e,t){return Array(t+1).join(e)}function tQ(e){return e.replace(/^\n*/,"")}function rQ(e){for(var t=e.length;t>0&&e[t-1]===` 1098`;)t--;return e.substring(0,t)}function nQ(e){return rQ(tQ(e))}var L4e=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function lI(e){return cI(e,L4e)}var aQ=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function iQ(e){return cI(e,aQ)}function $4e(e){return oQ(e,aQ)}var sQ=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function B4e(e){return cI(e,sQ)}function U4e(e){return oQ(e,sQ)}function cI(e,t){return t.indexOf(e.nodeName)>=0}function oQ(e,t){return e.getElementsByTagName&&t.some(function(r){return e.getElementsByTagName(r).length})}var ni={};ni.paragraph={filter:"p",replacement:function(e){return` 1099 1100`+e+` 1101 1102`}};ni.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+` 1103`}};ni.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var n=Number(t.nodeName.charAt(1));if(r.headingStyle==="setext"&&n<3){var a=iO(n===1?"=":"-",e.length);return` 1104 1105`+e+` 1106`+a+` 1107 1108`}else return` 1109 1110`+iO("#",n)+" "+e+` 1111 1112`}};ni.blockquote={filter:"blockquote",replacement:function(e){return e=nQ(e).replace(/^/gm,"> "),` 1113 1114`+e+` 1115 1116`}};ni.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return r.nodeName==="LI"&&r.lastElementChild===t?` 1117`+e:` 1118 1119`+e+` 1120 1121`}};ni.listItem={filter:"li",replacement:function(e,t,r){var n=r.bulletListMarker+" ",a=t.parentNode;if(a.nodeName==="OL"){var i=a.getAttribute("start"),s=Array.prototype.indexOf.call(a.children,t);n=(i?Number(i)+s:s+1)+". "}var l=/\n$/.test(e);return e=nQ(e)+(l?` 1122`:""),e=e.replace(/\n/gm,` 1123`+" ".repeat(n.length)),n+e+(t.nextSibling?` 1124`:"")}};ni.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="indented"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){return` 1125 1126 `+t.firstChild.textContent.replace(/\n/g,` 1127 `)+` 1128 1129`}};ni.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){for(var n=t.firstChild.getAttribute("class")||"",a=(n.match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=r.fence.charAt(0),l=3,c=new RegExp("^"+s+"{3,}","gm"),u;u=c.exec(i);)u[0].length>=l&&(l=u[0].length+1);var d=iO(s,l);return` 1130 1131`+d+a+` 1132`+i.replace(/\n$/,"")+` 1133`+d+` 1134 1135`}};ni.horizontalRule={filter:"hr",replacement:function(e,t,r){return` 1136 1137`+r.hr+` 1138 1139`}};ni.inlineLink={filter:function(e,t){return t.linkStyle==="inlined"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href");r&&(r=r.replace(/([()])/g,"\\$1"));var n=C1(t.getAttribute("title"));return n&&(n=' "'+n.replace(/"/g,'\\"')+'"'),"["+e+"]("+r+n+")"}};ni.referenceLink={filter:function(e,t){return t.linkStyle==="referenced"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t,r){var n=t.getAttribute("href"),a=C1(t.getAttribute("title"));a&&(a=' "'+a+'"');var i,s;switch(r.linkReferenceStyle){case"collapsed":i="["+e+"][]",s="["+e+"]: "+n+a;break;case"shortcut":i="["+e+"]",s="["+e+"]: "+n+a;break;default:var l=this.references.length+1;i="["+e+"]["+l+"]",s="["+l+"]: "+n+a}return this.references.push(s),i},references:[],append:function(e){var t="";return this.references.length&&(t=` 1140 1141`+this.references.join(` 1142`)+` 1143 1144`,this.references=[]),t}};ni.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}};ni.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}};ni.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r=e.parentNode.nodeName==="PRE"&&!t;
1144return e.nodeName==="CODE"&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];n.indexOf(r)!==-1;)r=r+"`";return r+t+e+t+r}};ni.image={filter:"img",replacement:function(e,t){var r=C1(t.getAttribute("alt")),n=t.getAttribute("src")||"",a=C1(t.getAttribute("title")),i=a?' "'+a+'"':"";return n?"":""}};function C1(e){return e?e.replace(/(\n+\s*)+/g,` 1145`):""}function lQ(e){this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[];for(var t in e.rules)this.array.push(e.rules[t])}lQ.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=Ok(this.array,e,this.options))||(t=Ok(this._keep,e,this.options))||(t=Ok(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};function Ok(e,t,r){for(var n=0;n<e.length;n++){var a=e[n];if(z4e(a,t,r))return a}}function z4e(e,t,r){var n=e.filter;if(typeof n=="string"){if(n===t.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(t.nodeName.toLowerCase())>-1)return!0}else if(typeof n=="function"){if(n.call(e,t,r))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function H4e(e){var t=e.element,r=e.isBlock,n=e.isVoid,a=e.isPre||function(f){return f.nodeName==="PRE"};
1145if(!(!t.firstChild||a(t))){for(var i=null,s=!1,l=null,c=J6(l,t,a);c!==t;){if(c.nodeType===3||c.nodeType===4){var u=c.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&u[0]===" "&&(u=u.substr(1)),!u){c=Pk(c);continue}c.data=u,i=c}else if(c.nodeType===1)r(c)||c.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):n(c)||a(c)?(i=null,s=!0):i&&(s=!1);else{c=Pk(c);continue}var d=J6(l,c,a);l=c,c=d}i&&(i.data=i.data.replace(/ $/,""),i.data||Pk(i))}}function Pk(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function J6(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var uI=typeof window<"u"?window:{};function q4e(){var e=uI.DOMParser,t=!1;try{new e().parseFromString("","text/html")&&(t=!0)}catch{}return t}function W4e(){var e=function(){};return V4e()?e.prototype.parseFromString=function(t){var r=new window.ActiveXObject("htmlfile");return r.designMode="on",r.open(),r.write(t),r.close(),r}:e.prototype.parseFromString=function(t){var r=document.implementation.createHTMLDocument("");return r.open(),r.write(t),r.close(),r},e}function V4e(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch{uI.ActiveXObject&&(e=!0)}return e}var G4e=q4e()?uI.DOMParser:W4e();function K4e(e,t){var r;if(typeof e=="string"){var n=Y4e().parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html");r=n.getElementById("turndown-root")}else r=e.cloneNode(!0);return H4e({element:r,isBlock:lI,isVoid:iQ,isPre:t.preformattedCode?X4e:null}),r}var Rk;function Y4e(){return Rk=Rk||new G4e,Rk}function X4e(e){return e.nodeName==="PRE"||e.nodeName==="CODE"}function J4e(e,t){return e.isBlock=lI(e),e.isCode=e.nodeName==="CODE"||e.parentNode.isCode,e.isBlank=Q4e(e),e.flankingWhitespace=Z4e(e,t),e}function Q4e(e){return!iQ(e)&&!B4e(e)&&/^\s*$/i.test(e.textContent)&&!$4e(e)&&!U4e(e)}function Z4e(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=eIe(e.textContent);return r.leadingAscii&&Q6("left",e,t)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&Q6("right",e,t)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}function eIe(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function Q6(e,t,r){var n,a,i;return e==="left"?(n=t.previousSibling,a=/ $/):(n=t.nextSibling,a=/^ /),n&&(n.nodeType===3?i=a.test(n.nodeValue):r.preformattedCode&&n.nodeName==="CODE"?i=!1:n.nodeType===1&&!lI(n)&&(i=a.test(n.textContent))),i}var tIe=Array.prototype.reduce,rIe=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Bg(e){if(!(this instanceof Bg))return new Bg(e);var t={rules:ni,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(r,n){return n.isBlock?` 1146 1147`:""},keepReplacement:function(r,n){return n.isBlock?` 1148 1149`+n.outerHTML+` 1150 1151`:n.outerHTML},defaultReplacement:function(r,n){return n.isBlock?` 1152 1153`+r+` 1154 1155`:r}};this.options=D4e({},t,e),this.rules=new lQ(this.options)}Bg.prototype={turndown:function(e){if(!iIe(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var t=cQ.call(this,new K4e(e,this.options));return nIe.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if(typeof e=="function")e(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return rIe.reduce(function(t,r){return t.replace(r[0],r[1])},e)}};function cQ(e){var t=this;return tIe.call(e.childNodes,function(r,n){n=new J4e(n,t.options);var a="";return n.nodeType===3?a=n.isCode?n.nodeValue:t.escape(n.nodeValue):n.nodeType===1&&(a=aIe.call(t,n)),uQ(r,a)},"")}function nIe(e){var t=this;
1155return this.rules.forEach(function(r){typeof r.append=="function"&&(e=uQ(e,r.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function aIe(e){var t=this.rules.forNode(e),r=cQ.call(this,e),n=e.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+t.replacement(r,e,this.options)+n.trailing}function uQ(e,t){var r=rQ(e),n=tQ(t),a=Math.max(e.length-r.length,t.length-n.length),i=` 1156 1157`.substring(0,a);return r+i+n}function iIe(e){return e!=null&&(typeof e=="string"||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}const sIe=e=>{if(!e)return[];const t=[],r=/^## (.+)$/gm;let n,a=0,i=null;for(;(n=r.exec(e))!==null;)i&&t.push({name:i,content:e.slice(a,n.index).trim()}),i=n[1].trim(),a=n.index;return i&&t.push({name:i,content:e.slice(a).trim()}),t},oIe=e=>{const t=e.toLowerCase();return t.includes("executive")||t.includes("summary")?"summary":t.includes("financial")||t.includes("performance")?"financial":t.includes("occupancy")||t.includes("leasing")?"occupancy":t.includes("operational")||t.includes("insights")?"operational":t.includes("variance")||t.includes("comparison")?"variance":t.includes("market")||t.includes("competitive")?"market":t.includes("action")||t.includes("recommendation")?"action":"default"},lIe=e=>{const t={summary:"border-blue-500",financial:"border-green-500",occupancy:"border-purple-500",operational:"border-yellow-500",variance:"border-orange-500",market:"border-pink-500",action:"border-accent",default:"border-gray-500"};return t[e]||t.default}
1157,cIe=({sectionTitle:e,content:t,onSave:r,onRefine:n,isRefining:a,refiningSection:i,borderColor:s="border-gray-500"})=>{const[l,c]=N.useState(!1),u=N.useRef(null),d=N.useRef(new Bg),f=N.useRef(null),p=N.useRef(null),m=b=>{!l&&!a&&(u.current&&(f.current=u.current.innerHTML),p.current={x:b.clientX,y:b.clientY},c(!0))},x=b=>{var w;if(!((w=b.relatedTarget)!=null&&w.closest("button"))&&l&&u.current){const S=u.current.innerHTML;if(S!==f.current){const j=d.current.turndown(S);r(e,j)}c(!1),f.current=null}},y=b=>{b.key==="Escape"&&(c(!1),f.current=null)};N.useEffect(()=>{if(!l||!u.current)return;const b=u.current;b.focus();const w=p.current;if(!w)return;const S=window.getSelection();if(!S){p.current=null;return}let j=null;if(typeof document.caretRangeFromPoint=="function")j=document.caretRangeFromPoint(w.x,w.y);else if(typeof document.caretPositionFromPoint=="function"){const k=document.caretPositionFromPoint(w.x,w.y);k&&(j=document.createRange(),j.setStart(k.offsetNode,k.offset),j.collapse(!0))}if(j)S.removeAllRanges(),S.addRange(j);
1157else{const k=document.createRange();k.selectNodeContents(b),k.collapse(!1),S.removeAllRanges(),S.addRange(k)}p.current=null},[l]);const v=i===e;return o.jsxs("div",{className:` 1158 bg-card/30 backdrop-blur border-l-4 ${s} rounded-lg p-4 1159 ${v?"ring-1 ring-accent/50":""} 1160 `,children:[o.jsxs("div",{className:"flex justify-between items-center mb-3",children:[o.jsx("h2",{className:"text-lg font-semibold text-white",children:e}),o.jsx("button",{onClick:()=>n(e),disabled:a,className:` 1161 flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm 1162 transition-all duration-200 1163 ${v?"bg-accent/20 text-accent":"bg-gray-700/50 text-gray-300 hover:bg-gray-600/50 hover:text-white"} 1164 disabled:opacity-50 disabled:cursor-not-allowed 1165 `,children:v?o.jsxs(o.Fragment,{children:[o.jsx(ar,{className:"h-4 w-4 animate-spin"}),o.jsx("span",{children:"Refining..."})]}):o.jsxs(o.Fragment,{children:[o.jsx(Cx,{className:"h-3.5 w-3.5"}),o.jsx(SR,{className:"h-4 w-4"}),o.jsx("span",{children:"Refine"})]})})]}),l?o.jsx("div",{ref:u,contentEditable:!0,suppressContentEditableWarning:!0,onBlur:x,onKeyDown:y,className:"prose prose-invert prose-sm max-w-none ring-2 ring-accent/50 rounded-lg p-3 bg-gray-800/50 outline-none cursor-text",dangerouslySetInnerHTML:{__html:f.current||""}},"editing"):o.jsx("div",{ref:u,onClick:m,className:"prose prose-invert prose-sm max-w-none cursor-text hover:bg-gray-800/30 rounded-lg p-3 transition-colors",children:o.jsx(CJ,{remarkPlugins:[eQ],components:uIe,children:t||""})},"display")]})},uIe={h2:()=>null,h3:({children:e,...t})=>o.jsx("h3",{...t,className:"text-lg font-medium mt-4 mb-2 text-gray-200",children:e}),p:({children:e,...t})=>o.jsx("p",{...t,className:"text-gray-300 mb-3 leading-relaxed",children:e}),ul:({children:e,...t})=>o.jsx("ul",{...t,className:"list-disc list-inside text-gray-300 mb-3 space-y-1",children:e}),ol:({children:e,...t})=>o.jsx("ol",{...t,className:"list-decimal list-inside text-gray-300 mb-3 space-y-1",children:e}),li:({children:e,...t})=>o.jsx("li",{...t,className:"text-gray-300",children:e}),strong:({children:e,...t})=>o.jsx("strong",{...t,className:"font-semibold text-white",children:e}),code:({inline:e,children:t,...r})=>e?o.jsx("code",{...r,className:"bg-gray-700/50 px-1 py-0.5 rounded text-sm text-gray-200",children:t}):o.jsx("code",{...r,className:"block bg-gray-800/50 p-3 rounded text-sm text-gray-200 overflow-x-auto",children:t}),table:({children:e,...t})=>o.jsx("div",{className:"overflow-x-auto mb-4",children:o.jsx("table",{...t,className:"min-w-full divide-y divide-gray-600",children:e})}),thead:({children:e,...t})=>o.jsx("thead",{...t,className:"bg-gray-800/50",children:e}),tbody:({children:e,...t})=>o.jsx("tbody",{...t,className:"divide-y divide-gray-700",children:e}),th:({children:e,...t})=>o.jsx("th",{...t,className:"px-3 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider",children:e}),td:({children:e,...t})=>o.jsx("td",{...t,className:"px-3 py-2 text-sm text-gray-300",children:e}),blockquote:({children:e,...t})=>o.jsx("blockquote",{...t,className:"border-l-4 border-gray-500 pl-4 italic text-gray-400 my-3",children:e})},dIe=({analysisText:e,onSectionRefine:t,isRefining:r=!1,refiningSection:n=null,onExportPDF:a,onSaveDraft:i,onSectionEdit:s})=>{const l=N.useMemo(()=>sIe(e),[e]);return e?o.jsxs("div",{className:"p-6 space-y-6",children:[o.jsxs("div",{className:"flex justify-end gap-2",children:[i&&o.jsxs(rt,{variant:"secondary",onClick:i,className:"flex items-center gap-2",children:[o.jsx(Po,{className:"h-4 w-4"}),"Save Draft"]}),a&&o.jsxs(rt,{variant:"primary",onClick:a,className:"flex items-center gap-2",children:[o.jsx(vc,{className:"h-4 w-4"}),"Export PDF"]})]}),o.jsx("div",{className:"flex flex-col gap-6",children:l.map(c=>{const u=oIe(c.name),d=c.content.replace(/^## .+\n?/,"").trim();return o.jsx(cIe,{sectionTitle:c.name,content:d,onSave:s,onRefine:t,isRefining:r,refiningSection:n,borderColor:lIe(u)},c.name)})})]}):o.jsx("div",{className:"flex items-center justify-center h-full text-gray-500 p-6",children:o.jsx("p",{children:"Complete the chat to generate your report"})})},fIe=({sectionName:e,onRefine:t,isRefining:r,isCurrentSection:n})=>t?o.jsx("button",{onClick:()=>t(e),disabled:r,className:` 1166 flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm 1167 transition-all duration-200 1168 ${n?"bg-accent/20 text-accent":"bg-gray-100 text-gray-600 hover:bg-gray-200 hover:text-gray-900"} 1169 disabled:opacity-50 disabled:cursor-not-allowed 1170 `,children:n?o.jsxs(o.Fragment,{children:[o.jsx(ar,{className:"h-4 w-4 animate-spin"}),o.jsx("span",{children:"Refining..."})]}):o.jsxs(o.Fragment,{children:[o.jsx(Cx,{className:"h-3.5 w-3.5"}),o.jsx(SR,{className:"h-4 w-4"}),o.jsx("span",{children:"Refine"})]})}):null,Td={h3:({children:e})=>o.jsx("h3",{className:"text-base font-semibold mt-3 mb-2 text-gray-800",children:e}),p:({children:e})=>o.jsx("p",{className:"text-gray-700 mb-3 leading-relaxed text-sm",children:e}),ul:({children:e})=>o.jsx("ul",{className:"text-gray-700 mb-3 space-y-2 text-sm list-disc pl-4",children:e}),ol:({children:e})=>o.jsx("ol",{className:"list-decimal text-gray-700 mb-3 space-y-2 text-sm pl-4",children:e}),li:({children:e})=>o.jsx("li",{className:"text-gray-700 mb-1",children:e}),strong:({children:e})=>o.jsx("strong",{className:"font-semibold text-gray-900",children:e}),table:({children:e})=>o.jsx("div",{className:"overflow-x-auto mb-4",children:o.jsx("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:e})}),thead:({children:e})=>o.jsx("thead",{className:"bg-gray-50",children:e}),tbody:({children:e})=>o.jsx("tbody",{className:"divide-y divide-gray-100",children:e}),th:({children:e})=>o.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e}),td:({children:e})=>o.jsx("td",{className:"px-3 py-2 text-gray-700",children:e})}
1170,Us=({sectionTitle:e,content:t,onSave:r,onRefine:n,isRefining:a,refiningSection:i,className:s="",headerClassName:l="",contentClassName:c="",customMarkdownComponents:u,editModeClassName:d="",hoverClassName:f=""})=>{const[p,m]=N.useState(!1),x=N.useRef(null),y=N.useRef(new Bg),v=N.useRef(null),b=N.useRef(null),w=T=>{!p&&!a&&(x.current&&(v.current=x.current.innerHTML),b.current={x:T.clientX,y:T.clientY},m(!0))},S=T=>{var O;if(!((O=T.relatedTarget)!=null&&O.closest("button"))&&p&&x.current){const A=x.current.innerHTML;if(A!==v.current){const P=y.current.turndown(A);r(e,P)}m(!1),v.current=null}},j=T=>{T.key==="Escape"&&(m(!1),v.current=null)};N.useEffect(()=>{if(!p||!x.current)return;const T=x.current;T.focus();const O=b.current;if(!O)return;const A=window.getSelection();if(!A){b.current=null;return}let P=null;if(typeof document.caretRangeFromPoint=="function")P=document.caretRangeFromPoint(O.x,O.y);else if(typeof document.caretPositionFromPoint=="function"){const I=document.caretPositionFromPoint(O.x,O.y);I&&(P=document.createRange(),P.setStart(I.offsetNode,I.offset),P.collapse(!0))}if(P)A.removeAllRanges(),A.addRange(P);else{const I=document.createRange();I.selectNodeContents(T),I.collapse(!1),A.removeAllRanges(),A.addRange(I)}b.current=null},[p]);const k=i===e,E=` 1171 prose prose-sm max-w-none transition-all duration-200 1172 ${p?d||"ring-2 ring-amber-400/50 rounded-lg p-3 bg-white outline-none cursor-text":`cursor-text rounded-lg p-3 ${f||"hover:bg-gray-50"}`} 1173 ${c} 1174 `;return o.jsxs("div",{className:s,children:[o.jsxs("div",{className:`flex justify-between items-center mb-2 ${l}`,children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-600 uppercase tracking-wider",children:e}
1174),o.jsx(fIe,{sectionName:e,onRefine:n,isRefining:a,isCurrentSection:k})]}),p?o.jsx("div",{ref:x,contentEditable:!0,suppressContentEditableWarning:!0,onBlur:S,onKeyDown:j,className:E,dangerouslySetInnerHTML:{__html:v.current||""}},"editing"):o.jsx("div",{ref:x,onClick:w,className:E,children:o.jsx(CJ,{remarkPlugins:[eQ],components:u||Td,children:t||""})},"display")]})};function Vb(e){return e==null||isNaN(e)?"$0":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function dI(e={},t={}){const r=[],n=(e==null?void 0:e.vacantUnits)||[],i=((e==null?void 0:e.upcomingExpirations)||[]).filter(l=>l.daysUntilExpiry!==void 0&&l.daysUntilExpiry<=30);if(i.length>0){const l=i.reduce((c,u)=>c+(u.monthlyRent||0),0);r.push({type:"expiring",text:`${i.length} lease${i.length>1?"s":""} expiring in next 30 days â renewal decisions needed`,value:`${Vb(l)}/mo revenue`,priority:"high"})}if(n.length>0){const l=n.slice(0,3).map(m=>m.unitNumber),c=n.length-l.length,u=`unit${l.length>1?"s":""} ${l.join(", ")}`,d=c>0?` and ${c} more`:"",f=l.length>1||c>0?"are":"is",p=n.reduce((m,x)=>m+(x.marketRent||0),0);r.push({type:"vacancy",text:`${n.length} vacant unit${n.length>1?"s":""} â ${u}${d} ${f} currently unleased`,value:`${Vb(p)}/mo loss`,priority:"medium"})}const s=t==null?void 0:t.expenseChange;if(s!==void 0&&Math.abs(s)>=10){const l=s>0?"+":"";r.push({type:"expense",text:`Operating Expenses ${l}${s.toFixed(0)}% MoM â review for anomalies`,value:Vb(t.expenses),priority:"medium"})}return r}function hIe(e){return!e||e.length===0}typeof On<"u"&&On.exports&&(On.exports={buildAttentionItems:dI,hasNoAttentionItems:hIe,formatCurrency:Vb});const dQ=["grossPotentialRent","rent","vacancy","concessions","delinquency","otherIncome","parkingIncome","petIncome","utilityIncome","laundryIncome"],fQ=["utilities","repairMaintenance","contractServices","payroll","managementFees","generalAdmin","marketing","taxesInsurance","unitTurns","other"];function hQ(e){return dQ.includes(e)}function pQ(e){return fQ.includes(e)}function pIe(e){const t=(e==null?void 0:e.amount)||(e==null?void 0:e.total)||0,r=Number(t);return Number.isFinite(r)?r:0}function Z6(e,t,r){return Object.entries(e).filter(([n])=>t(n)).map(([n,a])=>({category:(a==null?void 0:a.displayName)||n,amount:pIe(a)})).filter(n=>n.amount!==0).sort((n,a)=>Math.abs(a.amount)-Math.abs(n.amount)).slice(0,r)}function O_(e={},t=5){return!e||typeof e!="object"?{topIncome:[],topExpenses:[]}:{topIncome:Z6(e,hQ,t),topExpenses:Z6(e,pQ,t)}}function sO(e,t){const r=Number(t);if(!Number.isFinite(r)||r===0)return null;const n=Number(e);return Number.isFinite(n)?(n/r*100).toFixed(1):null}const mQ={income:"% of Gross Revenue",operatingExpense:"% of Operating Expenses"},mIe={income:e=>`Top ${e} Income Categories`,operatingExpense:e=>`Top ${e} Operating Expense Categories`};function gQ(e,t){const r=mQ[e];if(!r)throw new Error(`percentColumn: unknown table kind "${e}"`);const n=sO(1,t)!==null;return{show:n,heading:n?r:null,percentOf:a=>sO(a,t)}}function xQ(e,t){const r=mIe[e];if(!r)throw new Error(`topCategoryTableTitle: unknown table kind "${e}"`);return r(t)}function gIe(e){return e==null||isNaN(e)||e===0?"â":`${e>0?"+":""}${e.toFixed(1)}%`}function xIe(e){var t,r;return e?(((t=e.topIncome)==null?void 0:t.length)||0)>0||(((r=e.topExpenses)==null?void 0:r.length)||0)>0:!1}typeof On<"u"&&On.exports&&(On.exports={REVENUE_CATEGORIES:dQ,OPERATING_EXPENSE_CATEGORIES:fQ,isRevenueCategory:hQ,isOperatingExpenseCategory:pQ,buildTopCategories:O_,calculatePercentOfTotal:sO,percentColumn:gQ,topCategoryTableTitle:xQ,TOP_CATEGORY_COLUMN_HEADINGS:mQ,formatMomChange:gIe,hasTopCategories:xIe});const yQ=({data:e,dateRange:t})=>{var f,p,m,x,y,v;const{revenue:r={total:0,byMonth:{},categories:[],extendedByMonth:{}},operatingExpenses:n={total:0,byMonth:{},categories:[],extendedByMonth:{}},belowTheLine:a={total:0,byMonth:{},categories:[],extendedByMonth:{}},noi:i={total:0,byMonth:{},extendedByMonth:{}},cashFlow:s={total:0,byMonth:{},extendedByMonth:{}}}=e,l=Object.keys(r.byMonth||{}).sort((b,w)=>{const S=new Date(b+" 1"),j=new Date(w+" 1");return S-j}),c=b=>new Date(b+" 1").toLocaleDateString("en-US",{month:"short"}),u=((f=e.t4qTotals)==null?void 0:f.quarters)||[],d={revenue:r.byQuarter||{},expenses:n.byQuarter||{},noi:i.byQuarter||{},belowLine:a.byQuarter||{},netIncome:s.byQuarter||{}};return o.jsxs("div",{className:"overflow-x-auto",children:[o.jsxs("table",{className:"w-full text-xs border-collapse",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-gray-100 border-b border-gray-300",children:[o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700 w-40",children:"Category"}),l.map(b=>o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700 w-20",children:c(b)},b)),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700 bg-gray-200 w-24",children:"Total"})]})}),o.jsxs("tbody",{children:[o.jsx("tr",{className:"bg-gray-50",children:o.jsx("td",{colSpan:l.length+2,className:"py-2 px-2 font-semibold text-gray-600 uppercase text-xs",children:"Revenue"})}),r.categories.map(b=>o.jsxs("tr",{className:"border-b border-gray-100",children:[o.jsx("td",{className:"py-1.5 px-2 text-gray-700",children:b.name}),l.map(w=>{var S;return o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-600",children:Be(((S=b.byMonth)==null?void 0:S[w])||0)},w)}),o.jsx("td",{className:"py-1.5 px-2 text-right font-semibold bg-gray-50",children:Be(b.periodTotal||0)})]},b.category)),o.jsxs("tr",{className:"border-b-2 border-gray-300 bg-gray-100",children:[o.jsx("td",{className:"py-2 px-2 font-semibold",children:"Total Revenue"}),l.map(b=>o.jsx("td",{className:"py-2 px-2 text-right font-semibold",children:Be(r.byMonth[b]||0)},b)),o.jsx("td",{className:"py-2 px-2 text-right font-bold bg-gray-200",children:Be(r.total||0)})]}),o.jsx("tr",{className:"bg-gray-50",children:o.jsx("td",{colSpan:l.length+2,className:"py-2 px-2 font-semibold text-gray-600 uppercase text-xs",children:"Operating Expenses"})}),n.categories.map(b=>o.jsxs("tr",{className:"border-b border-gray-100",children:[o.jsx("td",{className:"py-1.5 px-2 text-gray-700",children:b.name}),l.map(w=>{var S;return o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-600",children:Be(((S=b.byMonth)==null?void 0:S[w])||0)},w)}),o.jsx("td",{className:"py-1.5 px-2 text-right font-semibold bg-gray-50",children:Be(b.periodTotal||0)})]},b.category)),o.jsxs("tr",{className:"border-b-2 border-gray-300 bg-gray-100",children:[o.jsx("td",{className:"py-2 px-2 font-semibold",children:"Total Expenses"}),l.map(b=>o.jsx("td",{className:"py-2 px-2 text-right font-semibold",children:Be(n.byMonth[b]||0)},b)),o.jsx("td",{className:"py-2 px-2 text-right font-bold bg-gray-200",children:Be(n.total||0)})]}),o.jsxs("tr",{className:"bg-green-50 border-t-2 border-b-2 border-green-700",children:[o.jsx("td",{className:"py-2 px-2 font-bold text-green-800",children:"Net Operating Income"}),l.map(b=>o.jsx("td",{className:"py-2 px-2 text-right font-bold text-green-700",children:Be(i.byMonth[b]||0)},b)),o.jsx("td",{className:"py-2 px-2 text-right font-bold text-green-800 bg-green-100",children:Be(i.total||0)})]}),a.categories.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("tr",{className:"bg-amber-50",children:o.jsx("td",{colSpan:l.length+2,className:"py-2 px-2 font-semibold text-amber-700 uppercase text-xs",children:"Below-the-Line"})}),a.categories.map(b=>o.jsxs("tr",{className:"border-b border-gray-100",children:[o.jsx("td",{className:"py-1.5 px-2 text-gray-700",children:b.name}),l.map(w=>{var S;return o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-600",children:Be(((S=b.byMonth)==null?void 0:S[w])||0)},w)}),o.jsx("td",{className:"py-1.5 px-2 text-right font-semibold bg-gray-50",children:Be(b.periodTotal||0)})]},b.category)),o.jsxs("tr",{className:"border-b-2 border-gray-300 bg-gray-100",children:[o.jsx("td",{className:"py-2 px-2 font-semibold",children:"Total Below-the-Line"}),l.map(b=>o.jsx("td",{className:"py-2 px-2 text-right font-semibold",children:Be(a.byMonth[b]||0)},b)),o.jsx("td",{className:"py-2 px-2 text-right font-bold bg-gray-200",children:Be(a.total||0)})]}),o.jsxs("tr",{className:"bg-blue-50 border-t-2 border-b-2 border-blue-700",children:[o.jsx("td",{className:"py-2 px-2 font-bold text-blue-800",children:"Net Income"}),l.map(b=>o.jsx("td",{className:"py-2 px-2 text-right font-bold text-blue-700",children:Be(s.byMonth[b]||0)},b)),o.jsx("td",{className:"py-2 px-2 text-right font-bold text-blue-800 bg-blue-100",children:Be(s.total||0)})]})]})]})]}),u.length>0&&o.jsxs("div",{className:"mt-6",children:[o.jsxs("h4",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Trailing ",u.length," Quarters Comparison"]}),o.jsxs("table",{className:"w-full text-xs border-collapse",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-gray-100 border-b border-gray-300",children:[o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700 w-40",children:"Category"}),u.map(b=>o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700 w-24",children:b},b)),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700 bg-gray-200 w-24",children:"Total"})]})}),o.jsxs("tbody",{children:[o.jsx("tr",{className:"bg-gray-50",children:o.jsx("td",{colSpan:u.length+2,className:"py-2 px-2 font-semibold text-gray-600 uppercase text-xs",children:"Revenue"})}),r.categories.map(b=>{const w=b.byQuarter||{},S=b.t4qTotal||0;return o.jsxs("tr",{className:"border-b border-gray-100",children:[o.jsx("td",{className:"py-1.5 px-2 text-gray-700",children:b.name}),u.map(j=>o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-600",children:Be(w[j]||0)},j)),o.jsx("td",{className:"py-1.5 px-2 text-right font-semibold bg-gray-50",children:Be(S)})]},b.category)}),o.jsxs("tr",{className:"border-b-2 border-gray-300 bg-gray-100",children:[o.jsx("td",{className:"py-2 px-2 font-semibold",children:"Total Revenue"}),u.map(b=>{var w;return o.jsx("td",{className:"py-2 px-2 text-right font-semibold",children:Be(((w=d.revenue[b])==null?void 0:w.total)||0)},b)}),o.jsx("td",{className:"py-2 px-2 text-right font-bold bg-gray-200",children:Be(((p=e.t4qTotals)==null?void 0:p.revenue)||0)})]}),o.jsx("tr",{className:"bg-gray-50",children:o.jsx("td",{colSpan:u.length+2,className:"py-2 px-2 font-semibold text-gray-600 uppercase text-xs",children:"Operating Expenses"})}),n.categories.map(b=>{const w=b.byQuarter||{},S=b.t4qTotal||0;return o.jsxs("tr",{className:"border-b border-gray-100",children:[o.jsx("td",{className:"py-1.5 px-2 text-gray-700",children:b.name}),u.map(j=>o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-600",children:Be(w[j]||0)},j)),o.jsx("td",{className:"py-1.5 px-2 text-right font-semibold bg-gray-50",children:Be(S)})]},b.category)}),o.jsxs("tr",{className:"border-b-2 border-gray-300 bg-gray-100",children:[o.jsx("td",{className:"py-2 px-2 font-semibold",children:"Total Operating Expenses"}),u.map(b=>{var w;return o.jsx("td",{className:"py-2 px-2 text-right font-semibold",children:Be(((w=d.expenses[b])==null?void 0:w.total)||0)},b)}),o.jsx("td",{className:"py-2 px-2 text-right font-bold bg-gray-200",children:Be(((m=e.t4qTotals)==null?void 0:m.operatingExpenses)||0)})]}),o.jsxs("tr",{className:"bg-green-50 border-b-2 border-green-700",children:[o.jsx("td",{className:"py-2 px-2 font-bold text-green-800",children:"Net Operating Income (NOI)"}),u.map(b=>{var w;return o.jsx("td",{className:"py-2 px-2 text-right font-bold text-green-700",children:Be(((w=d.noi[b])==null?void 0:w.total)||0)},b)}),o.jsx("td",{className:"py-2 px-2 text-right font-bold text-green-800 bg-green-100",children:Be(((x=e.t4qTotals)==null?void 0:x.noi)||0)})]}),a.categories.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("tr",{className:"bg-amber-50",children:o.jsx("td",{colSpan:u.length+2,className:"py-2 px-2 font-semibold text-amber-700 uppercase text-xs",children:"Below-the-Line"})}),a.categories.map(b=>{const w=b.byQuarter||{},S=b.t4qTotal||0;return o.jsxs("tr",{className:"border-b border-gray-100",children:[o.jsx("td",{className:"py-1.5 px-2 text-gray-700",children:b.name}),u.map(j=>o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-600",children:Be(w[j]||0)},j)),o.jsx("td",{className:"py-1.5 px-2 text-right font-semibold bg-gray-50",children:Be(S)})]},b.category)}),o.jsxs("tr",{className:"border-b-2 border-gray-300 bg-gray-100",children:[o.jsx("td",{className:"py-2 px-2 font-semibold",children:"Total Below-the-Line"}),u.map(b=>{var w;return o.jsx("td",{className:"py-2 px-2 text-right font-semibold",children:Be(((w=d.belowLine[b])==null?void 0:w.total)||0)},b)}),o.jsx("td",{className:"py-2 px-2 text-right font-bold bg-gray-200",children:Be(((y=e.t4qTotals)==null?void 0:y.belowTheLine)||0)})]}),o.jsxs("tr",{className:"bg-blue-50 border-t-2 border-b-2 border-blue-700",children:[o.jsx("td",{className:"py-2 px-2 font-bold text-blue-800",children:"Net Income"}),u.map(b=>{var w;return o.jsx("td",{className:"py-2 px-2 text-right font-bold text-blue-700",children:Be(((w=d.netIncome[b])==null?void 0:w.total)||0)},b)}),o.jsx("td",{className:"py-2 px-2 text-right font-bold text-blue-800 bg-blue-100",children:Be(((v=e.t4qTotals)==null?void 0:v.cashFlow)||0)})]})]})]})]})]})]})},O1=({rows:e,kind:t,total:r})=>{const n=gQ(t,r);return o.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 mb-3",children:xQ(t,e.length)}),o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-left text-xs text-gray-400 uppercase",children:[o.jsx("th",{className:"pb-2",children:"Category"}),o.jsx("th",{className:"pb-2 text-right",children:"Amount"}),n.show&&o.jsx("th",{className:"pb-2 text-right",children:n.heading})]})}),o.jsx("tbody",{children:e.map((a,i)=>{const s=n.percentOf(a.amount);return o.jsxs("tr",{className:"border-t border-gray-100",children:[o.jsx("td",{className:"py-2 text-gray-700",children:a.category}),o.jsx("td",{className:"py-2 text-right text-gray-900",children:Be(a.amount)}),s!==null&&o.jsxs("td",{className:"py-2 text-right text-gray-500",children:[s,"%"]})]},i)})})]})]})},yIe=e=>{if(!e)return{};const t={},r=/^#{2,3}\s+(?:\d+\.\s+)?(.+)$/gm,n=[];let a;for(;(a=r.exec(e))!==null;){const i=a[1].trim().toUpperCase();i.includes("MONTHLY OPERATIONS REPORT")||i.includes("QUARTERLY INVESTMENT REPORT")||n.push({name:i,index:a.index})}
1174return n.forEach((i,s)=>{var u;const l=((u=n[s+1])==null?void 0:u.index)||e.length,c=e.slice(i.index,l).replace(/^#{2,3}\s+(?:\d+\.\s+)?.+\n?/,"").trim();i.name==="MONTHLY SUMMARY"?t.monthlySummary={name:i.name,content:c}:i.name==="RECOMMENDED ACTIONS"?t.recommendedActions={name:i.name,content:c}:i.name==="INVESTMENT SUMMARY"||i.name.includes("EXECUTIVE SUMMARY")?t.investmentSummary={name:i.name,content:c}:i.name.includes("OCCUPANCY")&&i.name.includes("FINANCIAL")?t.occupancyFinancial={name:i.name,content:c}:i.name.includes("FINANCIAL")?t.financial={name:i.name,content:c}:i.name.includes("PERFORMANCE")||i.name.includes("KPI")?t.kpis={name:i.name,content:c}:i.name.includes("OPERATIONAL ALERTS")||i.name.includes("ACTION ITEMS")?t.operationalAlerts={name:i.name,content:c}:i.name.includes("RISK")?t.riskFactors={name:i.name,content:c}:i.name.includes("FORWARD")||i.name.includes("PRIORITIES")?t.forwardPriorities={name:i.name,content:c}:i.name.includes("OUTLOOK")&&(t.outlook={name:i.name,content:c})}),t},vIe=e=>{if(e.precision==="unknown"||e.daysVacant===null)return{label:"Unknown",className:"bg-slate-200 text-slate-600"};const r=e.precision==="approximate"?`⥠${e.daysVacant} days`:`${e.daysVacant} days`,n=e.daysVacant>30?"bg-red-100 text-red-700":"bg-gray-100 text-gray-700";return{label:r,className:n}},bIe=({analysisText:e,financialMetrics:t={},financialData:r={},occupancyData:n={},property:a={},dateRange:i={},onSectionRefine:s,isRefining:l=!1,refiningSection:c=null,onExportPDF:u,chatContext:d={},onSectionEdit:f,reportType:p="quarterlyInvestor"})=>{var ce,q,xe,pe,Se,he,ie,we,ke,Oe,Ue,Je,Ze,te,ve;const m=N.useMemo(()=>yIe(e),[e]),x=N.useMemo(()=>({...Td,p:({children:J})=>o.jsx("p",{className:"text-gray-200 mb-3 leading-relaxed text-sm",children:J}),ul:({children:J})=>o.jsx("ul",{className:"text-gray-200 mb-3 space-y-2 text-sm list-disc pl-4",children:J}),li:({children:J})=>o.jsx("li",{className:"text-gray-200 mb-2",children:J}),strong:({children:J})=>o.jsx("strong",{className:"font-semibold text-amber-400",children:J})}),[]),[y,v]=N.useState({income:[],expenses:[]}),[b,w]=N.useState([]),[S,j]=N.useState(null),[k,E]=N.useState(!1),[T,O]=N.useState({vacantUnits:[],upcomingExpirations:[],actionItems:[],kpis:{},summary:{}}),[A,P]=N.useState(null),[I,R]=N.useState(!1);N.useEffect(()=>{(async()=>{var Ee;const me=(a==null?void 0:a.id)||(a==null?void 0:a.property_id);if(!(!me||!(i!=null&&i.start)||!(i!=null&&i.end)))try{const Me=await oa.get(`/metrics/comprehensive/${me}`,{params:{includeBreakdowns:!0,includeTrends:!1,includeComparisons:!1,startDate:i.start,endDate:i.end}});if((Ee=Me.data)!=null&&Ee.breakdowns){const{income:Ae,operatingExpenses:Ke}=Me.data.breakdowns,jt=[];Ae&&Object.entries(Ae).forEach(([xt,bt])=>{if(Array.isArray(bt)){const Pt=bt.reduce((_r,Ht)=>_r+(Ht.value||0),0);Pt>0&&jt.push({name:xt,value:Pt})}});const Ce=[];Ke&&Object.entries(Ke).forEach(([xt,bt])=>{if(Array.isArray(bt)){const Pt=bt.reduce((_r,Ht)=>_r+(Ht.value||0),0);Pt>0&&Ce.push({name:xt,value:Pt})}}),v({income:jt.sort((xt,bt)=>bt.value-xt.value).slice(0,5),expenses:Ce.sort((xt,bt)=>bt.value-xt.value).slice(0,5)})}}catch(Me){console.error("[InvestorReportPreview] Failed to fetch breakdown:",Me)}})()},[a==null?void 0:a.id,a==null?void 0:a.property_id,i==null?void 0:i.start,i==null?void 0:i.end]),N.useEffect(()=>{(async()=>{var Ae,Ke,jt,Ce,xt,bt;const me=(a==null?void 0:a.id)||(a==null?void 0:a.property_id),Ee=d==null?void 0:d.includeRentRoll;if(!me||!(p==="monthlyOperations")&&!Ee){w([]),j(null),O({vacantUnits:[],upcomingExpirations:[],actionItems:[],kpis:{},summary:{}});return}E(!0);try{const Pt=await oa.get(`/pdf/rent-roll-data/${me}`);(Ae=Pt.data)!=null&&Ae.unitRoster&&(w(Pt.data.unitRoster),j(Pt.data.dataDate)),O({vacantUnits:((Ke=Pt.data)==null?void 0:Ke.vacantUnits)||[],upcomingExpirations:((jt=Pt.data)==null?void 0:jt.upcomingExpirations)||[],actionItems:((Ce=Pt.data)==null?void 0:Ce.actionItems)||[],kpis:((xt=Pt.data)==null?void 0:xt.kpis)||{},summary:((bt=Pt.data)==null?void 0:bt.summary)||{}})}catch(Pt){console.error("[InvestorReportPreview] Failed to fetch rent roll data:",Pt),w([]),O({vacantUnits:[],upcomingExpirations:[],actionItems:[],kpis:{},summary:{}})}finally{E(!1)}})()},[a==null?void 0:a.id,a==null?void 0:a.property_id,d==null?void 0:d.includeRentRoll,p]),N.useEffect(()=>{(async()=>{const me=(a==null?void 0:a.id)||(a==null?void 0:a.property_id),Ee=d==null?void 0:d.includePLStatement;if(!me||!Ee||!(i!=null&&i.start)||!(i!=null&&i.end)){P(null);return}R(!0);try{const Me=await oa.get(`/pdf/pl-statement-data/${me}`,{params:{startDate:i.start,endDate:i.end}});P(Me.data)}catch(Me){console.error("[InvestorReportPreview] Failed to fetch P&L data:",Me),P(null)}finally{R(!1)}})()},[a==null?void 0:a.id,a==null?void 0:a.property_id,d==null?void 0:d.includePLStatement,i==null?void 0:i.start,i==null?void 0:i.end]);const M=t==null?void 0:t.noi,L=((ce=T==null?void 0:T.kpis)==null?void 0:ce.physicalOccupancy)??((xe=(q=n==null?void 0:n.metrics)==null?void 0:q.physical)==null?void 0:xe.rate)??((pe=n==null?void 0:n.physical)==null?void 0:pe.rate)??(t==null?void 0:t.occupancy)??(t==null?void 0:t.physical_occupancy),U=L&&L<=1?L:L/100,W=((Se
1174=T==null?void 0:T.kpis)==null?void 0:Se.economicOccupancy)??((ie=(he=n==null?void 0:n.metrics)==null?void 0:he.economic)==null?void 0:ie.rate)??((we=n==null?void 0:n.economic)==null?void 0:we.rate)??(t==null?void 0:t.economic_occupancy),V=W&&W<=1?W:W/100,G=t==null?void 0:t.revenue,K=t==null?void 0:t.expenses,F=t==null?void 0:t.expenseRatio,ne=t==null?void 0:t.dscr,H=(t==null?void 0:t.avgRentPerUnit)??((ke=T==null?void 0:T.kpis)==null?void 0:ke.avgRentPerUnit)??((Oe=T==null?void 0:T.summary)==null?void 0:Oe.averageRent)??((Ue=n==null?void 0:n.summary)==null?void 0:Ue.averageRent)??(n==null?void 0:n.averageRent),B=((Je=T==null?void 0:T.summary)==null?void 0:Je.vacantUnits)??((Ze=n==null?void 0:n.metrics)==null?void 0:Ze.vacantUnits)??(n==null?void 0:n.vacantUnits)??0,X=(T==null?void 0:T.vacantUnits)||[],Y=(T==null?void 0:T.upcomingExpirations)||[],ae=X.reduce((J,me)=>J+(me.marketRent||0),0),fe=N.useMemo(()=>{const J={vacantUnits:X,upcomingExpirations:Y},me={expenseChange:t==null?void 0:t.expenseChange,expenses:K};return dI(J,me)},[Y,X,t==null?void 0:t.expenseChange,K]),ue=N.useMemo(()=>{var me,Ee;const J=((me=r==null?void 0:r.breakdown)==null?void 0:me.byCategory)||(r==null?void 0:r.byCategory)||{};return console.log("[InvestorReportPreview] Building top categories from:",{hasFinancialData:!!r,hasBreakdown:!!(r!=null&&r.breakdown),hasByCategory:!!((Ee=r==null?void 0:r.breakdown)!=null&&Ee.byCategory),categoryKeys:Object.keys(J)}),O_(J,5)},[(te=r==null?void 0:r.breakdown)==null?void 0:te.byCategory,r==null?void 0:r.byCategory]),oe=()=>{if(!(i!=null&&i.end))return"";const J=new Date(i.end);return p==="monthlyOperations"?`${J.toLocaleString("default",{month:"long"})} ${J.getFullYear()}`:`Q${Math.ceil((J.getMonth()+1)/3)} ${J.getFullYear()}`},Z=p==="monthlyOperations"?"Monthly Operations Report":"Quarterly Investment Report";return e?o.jsxs("div",{className:"bg-white text-gray-900 p-8 max-w-4xl mx-auto",style:{fontFamily:"system-ui, -apple-system, sans-serif"},children:[o.jsx("div",{className:"flex justify-end gap-2 mb-6 print:hidden",children:u&&o.jsxs(rt,{variant:"primary",onClick:u,className:"flex items-center gap-2",children:[o.jsx(vc,{className:"h-4 w-4"}),"Export PDF"]})}),o.jsxs("div",{className:"grid grid-cols-3 items-center pb-4 border-b-2 border-gray-900 mb-6",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-lg font-semibold text-gray-900",children:a.name||"Property"}),o.jsx("div",{className:"text-xs text-gray-500",children:a.address||""})]}),o.jsx("div",{className:"text-center",children:o.jsx("h1",{className:"text-sm font-semibold uppercase tracking-widest text-gray-500",children:Z})}),o.jsxs("div",{className:"text-right",children:[o.jsx("div",{className:"text-base font-semibold",children:oe()}),o.jsxs("div",{className:"text-xs text-gray-500",children:[a.unit_count?`${a.unit_count} Units`:"",a.class?` | Class ${a.class}`:""]})]})]}),o.jsx("div",{className:"grid grid-cols-2 gap-6 mb-6",children:p==="monthlyOperations"?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-center p-5 bg-gray-50 border border-gray-200",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 mb-2",children:"Physical Occupancy"}),o.jsx("div",{className:`text-4xl font-bold ${U>=.94?"text-green-600":U>=.9?"text-yellow-600":"text-red-600"}`,children:U?pr(U*100):"N/A"}),o.jsx("div",{className:"text-sm text-gray-500 mt-2",children:B>0?`${B} vacant unit${B>1?"s":""}`:""})]}),o.jsxs("div",{className:"text-center p-5 bg-gray-50 border border-gray-200",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 mb-2",children:"Net Operating Income"}),o.jsx("div",{className:`text-4xl font-bold ${M>0?"text-green-600":"text-gray-900"}`,children:M?Be(M):"N/A"}),o.jsx("div",{className:"text-sm text-gray-500 mt-2",children:"This Month"})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-center p-5 bg-gray-50 border border-gray-200",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 mb-2",children:"Net Operating Income"}),o.jsx("div",{className:`text-4xl font-bold ${M>0?"text-green-600":"text-gray-900"}`,children:M?Be(M):"N/A"}),o.jsx("div",{className:"text-sm text-gray-500 mt-2",children:t!=null&&t.noiChangeYoY?`${t.noiChangeYoY>0?"+":""}${t.noiChangeYoY.toFixed(1)}% YoY`:""})]}),o.jsxs("div",{className:"text-center p-5 bg-gray-50 border border-gray-200",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 mb-2",children:"Occupancy Rate"}),o.jsx("div",{className:`text-4xl font-bold ${U>=.94?"text-green-600":U>=.9?"text-yellow-600":"text-red-600"}`,children:U?pr(U*100):"N/A"}),o.jsx("div",{className:"text-sm text-gray-500 mt-2",children:(t==null?void 0:t.occupancyContext)||""})]})]})}),p==="monthlyOperations"&&o.jsxs(o.Fragment,{children:[fe.length>0?o.jsxs("div",{className:"mb-6 bg-amber-50 border border-amber-200 border-l-4 border-l-amber-500 p-4",children:[o.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wide text-amber-800 mb-3",children:"Attention Items"}),o.jsx("div",{className:"space-y-2",children:fe.map((J,me)=>o.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-amber-200/50 last:border-b-0",children:[o.jsxs("span",{className:"text-sm text-gray-900 flex-1",children:[o.jsx("strong",{children:J.text.split("â")[0]}),J.text.includes("â")&&` â ${J.text.split("â")[1]}`]}),o.jsx("span",{className:"text-sm font-semibold text-amber-800 ml-4 whitespace-nowrap",children:J.value})]},me))})]}):o.jsxs("div",{className:"mb-6 bg-green-50 border border-green-200 border-l-4 border-l-green-500 p-4",children:[o.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wide text-green-800 mb-3",children:"Status"}),o.jsxs("div",{className:"text-sm text-green-800",children:[o.jsx("strong",{children:"No urgent attention items"})," â property operations are stable"]})]}),m.monthlySummary&&o.jsx(Us,{sectionTitle:"MONTHLY SUMMARY",content:m.monthlySummary.content,onSave:f,onRefine:s,isRef
1174ining:l,refiningSection:c,className:"bg-gray-50 border-l-4 border-gray-300 p-4 mb-6"}),o.jsxs("div",{className:"grid grid-cols-4 border border-gray-200 mb-6",children:[o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Economic Occupancy"}),o.jsx("div",{className:"text-lg font-semibold",children:V?pr(V*100):"N/A"})]}),o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Avg Rent/Unit"}),o.jsx("div",{className:"text-lg font-semibold",children:H?Be(H):"N/A"})]}),o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Vacancy Loss"}),o.jsx("div",{className:"text-lg font-semibold text-red-600",children:ae>0?Be(ae):"$0"})]}),o.jsxs("div",{className:"p-3 text-center",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Vacant Units"}),o.jsx("div",{className:"text-lg font-semibold",children:B})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[o.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[o.jsx("div",{className:"bg-gray-100 px-4 py-2 border-b border-gray-200",children:o.jsx("h3",{className:"text-sm font-semibold text-gray-700",children:"Lease Expirations"})}),o.jsx("div",{className:"p-4",children:Y.length>0?o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-left text-xs text-gray-500 uppercase",children:[o.jsx("th",{className:"pb-2",children:"Unit"}),o.jsx("th",{className:"pb-2",children:"Tenant"}),o.jsx("th",{className:"pb-2 text-right",children:"Timeframe"})]})}),o.jsx("tbody",{children:Y.slice(0,5).map((J,me)=>{const Ee=J.priority||"low",Me=J.timeframe||(Ee==="high"?"30 Days":Ee==="medium"?"60 Days":"90 Days");return o.jsxs("tr",{className:"border-t border-gray-100",children:[o.jsx("td",{className:"py-2 font-medium",children:J.unitNumber||J.unit}),o.jsx("td",{className:"py-2 text-gray-600",children:J.tenantName||J.tenant||"-"}),o.jsx("td",{className:"py-2 text-right",children:o.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${Ee==="high"?"bg-red-100 text-red-700":Ee==="medium"?"bg-amber-100 text-amber-700":"bg-gray-100 text-gray-700"}`,children:Me})})]},me)})})]}):o.jsx("p",{className:"text-sm text-gray-500 text-center py-4",children:"No lease expirations in next 90 days"})})]}),o.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[o.jsx("div",{className:"bg-gray-100 px-4 py-2 border-b border-gray-200",children:o.jsx("h3",{className:"text-sm font-semibold text-gray-700",children:"Current Vacancies"})}),o.jsx("div",{className:"p-4",children:X.length>0?o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-left text-xs text-gray-500 uppercase",children:[o.jsx("th",{className:"pb-2",children:"Unit"}),o.jsx("th",{className:"pb-2 text-right",children:"Market Rent"}),o.jsx("th",{className:"pb-2 text-right",children:"Days Vacant"})]})}),o.jsx("tbody",{children:X.slice(0,5).map((J,me)=>{const Ee=vIe(J);return o.jsxs("tr",{className:"border-t border-gray-100",children:[o.jsx("td",{className:"py-2 font-medium",children:J.unitNumber||J.unit}),o.jsx("td",{className:"py-2 text-right text-gray-600",children:Be(J.marketRent||0)}),o.jsx("td",{className:"py-2 text-right",children:o.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${Ee.className}`,children:Ee.label})})]},me)})})]}):o.jsx("p",{className:"text-sm text-gray-500 text-center py-4",children:"No current vacancies"})})]})]}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-5 mb-6",children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-gray-400 mb-4",children:"Financial Performance"}),o.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Gross Revenue"}),o.jsx("div",{className:"text-xl font-bold text-white",children:G?Be(G):"N/A"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Operating Expenses"}),o.jsx("div",{className:"text-xl font-bold text-white",children:K?Be(K):"N/A"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Net Operating Income"}),o.jsx("div",{className:"text-xl font-bold text-green-400",children:M?Be(M):"N/A"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Expense Ratio"}),o.jsx("div",{className:"text-xl font-bold text-white",children:F?pr(F):"N/A"})]})]})]}),(ue.topIncome.length>0||ue.topExpenses.length>0)&&o.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[ue.topIncome.length>0&&o.jsx(O1,{rows:ue.topIncome,kind:"income",total:G}),ue.topExpenses.length>0&&o.jsx(O1,{rows:ue.topExpenses,kind:"operatingExpense",total:K})]}),m.recommendedActions&&o.jsx(Us,{sectionTitle:"RECOMMENDED ACTIONS",content:m.recommendedActions.content,onSave:f,onRefine:s,isRef
1174ining:l,refiningSection:c,className:"bg-blue-50 border-l-4 border-blue-400 p-4 mb-6",customMarkdownComponents:{...Td,p:({children:J})=>o.jsx("p",{className:"text-blue-900 mb-3 leading-relaxed text-sm",children:J}),ul:({children:J})=>o.jsx("ul",{className:"text-blue-900 mb-3 space-y-2 text-sm list-disc pl-4",children:J}),li:({children:J})=>o.jsx("li",{className:"text-blue-900 mb-2",children:J}),strong:({children:J})=>o.jsx("strong",{className:"font-semibold text-blue-800",children:J})}}),!m.monthlySummary&&m.investmentSummary&&o.jsx(Us,{sectionTitle:"EXECUTIVE SUMMARY",content:m.investmentSummary.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"bg-gray-50 border-l-4 border-gray-300 p-4 mb-6"}),!m.recommendedActions&&m.forwardPriorities&&o.jsx(Us,{sectionTitle:"FORWARD LOOK",content:m.forwardPriorities.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"bg-gray-900 p-5 mb-6",headerClassName:"text-gray-400",contentClassName:"prose-invert",hoverClassName:"hover:bg-gray-800/50",editModeClassName:"ring-2 ring-amber-400/50 rounded-lg p-3 bg-gray-800 outline-none cursor-text",customMarkdownComponents:{...Td,p:({children:J})=>o.jsx("p",{className:"text-gray-200 mb-3 leading-relaxed text-sm",children:J}),ul:({children:J})=>o.jsx("ul",{className:"text-gray-200 mb-3 space-y-2 text-sm list-disc pl-4",children:J}),li:({children:J})=>o.jsx("li",{className:"text-gray-200 mb-2",children:J}),strong:({children:J})=>o.jsx("strong",{className:"font-semibold text-amber-400",children:J})}})]}),p!=="monthlyOperations"&&o.jsxs(o.Fragment,{children:[m.investmentSummary&&o.jsx(Us,{sectionTitle:"INVESTMENT SUMMARY",content:m.investmentSummary.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"bg-gray-50 border-l-4 border-gray-300 p-4"}),o.jsxs("div",{className:"grid grid-cols-4 border border-gray-200 mb-6",children:[o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Gross Revenue"}),o.jsx("div",{className:"text-lg font-semibold",children:G?Be(G):"N/A"})]}),o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Expense Ratio"}),o.jsx("div",{className:"text-lg font-semibold",children:F?pr(F):"N/A"})]}),o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Avg Rent/Unit"}),o.jsx("div",{className:"text-lg font-semibold",children:H?Be(H):"N/A"})]}),o.jsxs("div",{className:"p-3 text-center",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"DSCR"}),o.jsx("div",{className:"text-lg font-semibold",children:ne?`${ne.toFixed(2)}x`:"N/A"})]})]}),m.riskFactors&&o.jsx(Us,{sectionTitle:"RISK FACTORS & MITIGATIONS",content:m.riskFactors.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"bg-amber-50 border-l-4 border-amber-400 p-4",contentClassName:"text-amber-900",customMarkdownComponents:{...Td,p:({children:J})=>o.jsx("p",{className:"text-amber-900 mb-3 leading-relaxed text-sm",children:J}),ul:({children:J})=>o.jsx("ul",{className:"text-amber-900 mb-3 space-y-2 text-sm list-disc pl-4",children:J}),li:({children:J})=>o.jsx("li",{className:"text-amber-900 mb-2",children:J}),strong:({children:J})=>o.jsx("strong",{className:"font-semibold text-amber-800",children:J})}}),y.income.length>0&&o.jsxs("div",{className:"mb-6",children:[o.jsxs("h2",{className:"text-sm font-semibold uppercase tracking-wide mb-3 pb-2 border-b border-gray-200",children:["Top ",y.income.length," Income Categories"]}),o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-left text-xs text-gray-500 uppercase",children:[o.jsx("th",{className:"pb-2",children:"Category"}),o.jsx("th",{className:"pb-2 text-right",children:"Amount"}),o.jsx("th",{className:"pb-2 text-right",children:"% of Total"})]})}),o.jsx("tbody",{children:(()=>{const J=y.income.reduce((me,Ee)=>me+Ee.value,0);return y.income.map((me,Ee)=>o.jsxs("tr",{className:"border-t border-gray-100",children:[o.jsx("td",{className:"py-2 text-gray-700",children:s6(me.name)}),o.jsx("td",{className:"py-2 text-right text-gray-900",children:Be(me.value)}),o.jsxs("td",{className:"py-2 text-right text-gray-500",children:[J>0?(me.value/J*100).toFixed(1):"0.0","%"]})]},Ee))})()})]})]}),y.expenses.length>0&&o.jsxs("div",{className:"mb-6",children:[o.jsxs("h2",{className:"text-sm font-semibold uppercase tracking-wide mb-3 pb-2 border-b border-gray-200",children:["Top ",y.expenses.length," Expense Categories"]}),o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-left text-xs text-gray-500 uppercase",children:[o.jsx("th",{className:"pb-2",children:"Category"}),o.jsx("th",{className:"pb-2 text-right",children:"Amount"}),o.jsx("th",{className:"pb-2 text-right",children:"% of Total"})]})}),o.jsx("tbody",{children:(()=>{const J=y.expenses.reduce((me,Ee)=>me+Ee.value,0);return y.expenses.map((me,Ee)=>o.jsxs("tr",{className:"border-t border-gray-100",children:[o.jsx("td",{className:"py-2 text-gray-700",children:s6(me.name)}),o.jsx("td",{className:"py-2 text-right text-gray-900",children:Be(me.value)}),o.jsxs("td",{className:"py-2 text-right text-gray-500",children:[J>0?(me.value/J*100).toFixed(1):"0.0","%"]})]},Ee))})()})]})]}),m.forwardPriorities&&o.jsx(Us,{sectionTitle:"FORWARD PRIORITIES",content:m.forwardPriorities.content,onSave:f,onRefine:s,isRef
1174ining:l,refiningSection:c,className:"bg-gray-900 p-5 mb-6",headerClassName:"text-gray-400",contentClassName:"prose-invert",hoverClassName:"hover:bg-gray-800/50",editModeClassName:"ring-2 ring-amber-400/50 rounded-lg p-3 bg-gray-800 outline-none cursor-text",customMarkdownComponents:x}),m.outlook&&o.jsx(Us,{sectionTitle:"OUTLOOK",content:m.outlook.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"border-b border-gray-200 pb-4"})]}),(d==null?void 0:d.includeRentRoll)&&o.jsxs("div",{className:"mt-8 pt-6 border-t-2 border-gray-300",children:[o.jsxs("div",{className:"mb-4",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900",children:"Complete Unit Roster"}),S&&o.jsxs("p",{className:"text-sm text-gray-500",children:["Data as of: ",Ct(S)]})]}),k?o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx(ar,{className:"h-6 w-6 animate-spin text-gray-400"}),o.jsx("span",{className:"ml-2 text-gray-500",children:"Loading unit roster..."})]}):b.length>0?o.jsxs("div",{className:"overflow-x-auto",children:[o.jsxs("table",{className:"w-full text-xs border-collapse",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-gray-100 border-b border-gray-300",children:[o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Unit"}),o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Type"}),o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Tenant"}),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700",children:"Rent"}),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700",children:"Market"}),o.jsx("th",{className:"text-center py-2 px-2 font-semibold text-gray-700",children:"Lease Start"}),o.jsx("th",{className:"text-center py-2 px-2 font-semibold text-gray-700",children:"Lease End"}),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700",children:"Balance"}),o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Status"})]})}),o.jsx("tbody",{children:b.map((J,me)=>{const Ee=J.isVacant,Me=J.isDelinquent;return o.jsxs("tr",{className:`border-b border-gray-200 ${Ee?"bg-red-50":Me?"bg-amber-50":""}`,children:[o.jsx("td",{className:"py-1.5 px-2 font-medium",children:J.unitNumber||"-"}),o.jsx("td",{className:"py-1.5 px-2 text-gray-600",children:J.type||"-"}),o.jsx("td",{className:"py-1.5 px-2",children:J.tenant||"-"}),o.jsx("td",{className:"py-1.5 px-2 text-right",children:J.monthlyRent?Be(J.monthlyRent):"-"}),o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-500",children:J.marketRent?Be(J.marketRent):"-"}),o.jsx("td",{className:"py-1.5 px-2 text-center text-gray-600",children:J.leaseStart?new Date(J.leaseStart).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"2-digit"}):"-"}),o.jsx("td",{className:"py-1.5 px-2 text-center text-gray-600",children:J.leaseEnd?new Date(J.leaseEnd).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"2-digit"}):"-"}),o.jsx("td",{className:`py-1.5 px-2 text-right ${Me?"text-red-600 font-medium":""}`,children:J.balance?Be(J.balance):"-"}),o.jsx("td",{className:"py-1.5 px-2",children:o.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs ${Ee?"bg-red-100 text-red-700":Me?"bg-amber-100 text-amber-700":"bg-green-100 text-green-700"}`,children:Ee?"Vacant":"Occupied"})})]},J.unitNumber||me)})})]}),o.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-4 text-sm",children:[o.jsxs("div",{className:"text-center p-2 bg-gray-50 border border-gray-200 rounded",children:[o.jsx("div",{className:"text-xs text-gray-500",children:"Total Units"}),o.jsx("div",{className:"font-semibold",children:b.length})]}),o.jsxs("div",{className:"text-center p-2 bg-green-50 border border-green-200 rounded",children:[o.jsx("div",{className:"text-xs text-green-600",children:"Occupied"}),o.jsx("div",{className:"font-semibold text-green-700",children:b.filter(J=>J.isOccupied).length})]}),o.jsxs("div",{className:"text-center p-2 bg-red-50 border border-red-200 rounded",children:[o.jsx("div",{className:"text-xs text-red-600",children:"Vacant"}),o.jsx("div",{className:"font-semibold text-red-700",children:b.filter(J=>J.isVacant).length})]}),o.jsxs("div",{className:"text-center p-2 bg-amber-50 border border-amber-200 rounded",children:[o.jsx("div",{className:"text-xs text-amber-600",children:"Delinquent"}),o.jsx("div",{className:"font-semibold text-amber-700",children:b.filter(J=>J.isDelinquent).length})]})]})]}):o.jsx("div",{className:"text-center py-8 text-gray-500",children:o.jsx("p",{children:"No unit roster data available"})})]}),(d==null?void 0:d.includePLStatement)&&o.jsxs("div",{className:"mt-8 pt-6 border-t-2 border-gray-300",children:[o.jsxs("div",{className:"mb-4",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900",children:"Profit & Loss Statement"}),(i==null?void 0:i.start)&&(i==null?void 0:i.end)&&o.jsxs("p",{className:"text-sm text-gray-500",children:[Ct(i.start)," - ",Ct
1174(i.end)]})]}),I?o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx(ar,{className:"h-6 w-6 animate-spin text-gray-400"}),o.jsx("span",{className:"ml-2 text-gray-500",children:"Loading P&L data..."})]}):A&&Object.keys(((ve=A.revenue)==null?void 0:ve.byMonth)||{}).length>0?o.jsx(yQ,{data:A,dateRange:i}):o.jsx("div",{className:"text-center py-8 text-gray-500",children:o.jsx("p",{children:"No P&L data available for this period"})})]}),o.jsxs("div",{className:"mt-8 pt-3 border-t border-gray-200 flex justify-between text-xs text-gray-400",children:[o.jsxs("span",{children:["Report Generated: ",new Date().toLocaleDateString()]}),o.jsx("span",{children:"SAMI Property Intelligence"})]})]}):o.jsx("div",{className:"flex items-center justify-center h-full text-gray-500 p-6",children:o.jsx("p",{children:"Complete the chat to generate your report"})})},wIe=e=>{if(!e)return{};const t={},r=/^#{2,3}\s+(?:\d+\.\s+)?(.+)$/gm,n=[];let a;for(;(a=r.exec(e))!==null;){const i=a[1].trim().toUpperCase();i.includes("MONTHLY OPERATIONS REPORT")||n.push({name:i,index:a.index})}return n.forEach((i,s)=>{var u;const l=((u=n[s+1])==null?void 0:u.index)||e.length,c=e.slice(i.index,l).replace(/^#{2,3}\s+(?:\d+\.\s+)?.+\n?/,"").trim();i.name==="MONTHLY SUMMARY"?t.monthlySummary={name:i.name,content:c}:i.name==="RECOMMENDED ACTIONS"?t.recommendedActions={name:i.name,content:c}:i.name==="INVESTMENT SUMMARY"||i.name.includes("EXECUTIVE SUMMARY")?t.investmentSummary={name:i.name,content:c}:(i.name.includes("FORWARD")||i.name.includes("PRIORITIES"))&&(t.forwardPriorities={name:i.name,content:c})}),t},_Ie=e=>{if(e.precision==="unknown"||e.daysVacant===null)return{label:"Unknown",className:"bg-slate-200 text-slate-600"};const r=e.precision==="approximate"?`⥠${e.daysVacant} days`:`${e.daysVacant} days`,n=e.daysVacant>30?"bg-red-100 text-red-700":"bg-gray-100 text-gray-700";return{label:r,className:n}},SIe=({analysisText:e,financialMetrics:t={},financialData:r={},occupancyData:n={},property:a={},dateRange:i={},onSectionRefine:s,isRefining:l=!1,refiningSection:c=null,onExportPDF:u,chatContext:d={},onSectionEdit:f})=>{var oe,Z,ce,q,xe,pe,Se,he,ie,we,ke,Oe,Ue,Je,Ze;const p=N.useMemo(()=>wIe(e),[e]),m=N.useMemo(()=>({...Td,p:({children:te})=>o.jsx("p",{className:"text-blue-900 mb-3 leading-relaxed text-sm",children:te}),ul:({children:te})=>o.jsx("ul",{className:"text-blue-900 mb-3 space-y-2 text-sm list-disc pl-4",children:te}),li:({children:te})=>o.jsx("li",{className:"text-blue-900 mb-2",children:te}),strong:({children:te})=>o.jsx("strong",{className:"font-semibold text-blue-800",children:te})}),[]),x=N.useMemo(()=>({...Td,p:({children:te})=>o.jsx("p",{className:"text-gray-200 mb-3 leading-relaxed text-sm",children:te}),ul:({children:te})=>o.jsx("ul",{className:"text-gray-200 mb-3 space-y-2 text-sm list-disc pl-4",children:te}),li:({children:te})=>o.jsx("li",{className:"text-gray-200 mb-2",children:te}),strong:({children:te})=>o.jsx("strong",{className:"font-semibold text-amber-400",children:te})}),[]),y=N.useMemo(()=>{var ve;const te=((ve=r==null?void 0:r.breakdown)==null?void 0:ve.byCategory)||(r==null?void 0:r.byCategory)||{};return O_(te,5)},[(oe=r==null?void 0:r.breakdown)==null?void 0:oe.byCategory,r==null?void 0:r.byCategory]),[v,b]=N.useState({vacantUnits:[],upcomingExpirations:[],actionItems:[],kpis:{},summary:{}}),[w,S]=N.useState(!1),[j,k]=N.useState([]),[E,T]=N.useState(null),[O,A]=N.useState(!1),[P,I]=N.useState(null),[R,M]=N.useState(!1);N.useEffect(()=>{(async()=>{var me,Ee,Me,Ae,Ke,jt;const ve=(a==null?void 0:a.id)||(a==null?void 0:a.property_id),J=d==null?void 0:d.includeRentRoll;if(!ve){b({vacantUnits:[],upcomingExpirations:[],actionItems:[],kpis:{},summary:{}}),k([]),T(null);return}S(!0),J&&A(!0);try{const Ce=await oa.get(`/pdf/rent-roll-data/${ve}`);b({vacantUnits:((me=Ce.data)==null?void 0:me.vacantUnits)||[],upcomingExpirations:((Ee=Ce.data)==null?void 0:Ee.upcomingExpirations)||[],actionItems:((Me=Ce.data)==null?void 0:Me.actionItems)||[],kpis:((Ae=Ce.data)==null?void 0:Ae.kpis)||{},summary:((Ke=Ce.data)==null?void 0:Ke.summary)||{}}),J&&((jt=Ce.data)!=null&&jt.unitRoster)&&(k(Ce.data.unitRoster),T(Ce.data.dataDate))}catch(Ce){console.error("[MonthlyOperationsPreview] Failed to fetch rent roll data:",Ce),b({vacantUnits:[],upcomingExpirations:[],actionItems:[],kpis:{},summary:{}}),k([])}finally{S(!1),A(!1)}})()},[a==null?void 0:a.id,a==null?void 0:a.property_id,d==null?void 0:d.includeRentRoll]),N.useEffect(()=>{(async()=>{const ve=(a==null?void 0:a.id)||(a==null?void 0:a.property_id),J=d==null?void 0:d.includePLStatement;if(!ve||!J||!(i!=null&&i.start)||!(i!=null&&i.end)){I(null);return}M(!0);try{const me=await oa.get(`/pdf/pl-statement-data/${ve}`,{params:{startDate:i.start,endDate:i.end}});I(me.data)}catch(me){console.error("[MonthlyOperationsPreview] Failed to fetch P&L data:",me),I(null)}finally{M(!1)}})()},[a==null?void 0:a.id,a==null?void 0:a.property_id,d==null?void 0:d.includePLStatement,i==null?void 0:i.start,i==null?void 0:i.end]);const L=t==null?void 0:t.noi,U=((Z=v==null?void 0:v.kpis)==null?void 0:Z.physicalOccupancy)??((q=(ce=n==null?void 0:n.metrics)==null?void 0:ce.physical)==null?void 0:q.rate)??((xe=n==null?void 0:n.physical)==null?void 0:xe.rate)??(t==null?void 0:t.occupancy)??(t==null?void 0:t.physical_occupancy),W=U&&U<=1?U:U/100,V=((pe=v==null?void 0:v.kpis)==null?void 0:pe.economicOccupancy)??((he=(Se=n==null?void 0:n.metrics)==null?void 0:Se.economic)==null?void 0:he.rate)??((ie=n==null?void 0:n.economic)==null?void 0:ie.rate)??(t==null?void 0:t.economic_occupancy),G=V&&V<=1?V:V/100,K=t==null?void 0:t.revenue,F=t==null?void 0:t.expenses,ne=t==null?void 0:t.expenseRatio,H=(t==null?void 0:t.avgRentPerUnit)??((we=v==null?void 0:v.kpis)==null?void 0:we.avgRentPerUnit)??((ke=v==null?void 0:v.summary)==null?void 0:ke.averageRent)??((Oe=n==null?void 0:n.summary)==null?void 0:Oe.averageRent)??(n==null?void 0:n.averageRent),B=((Ue=v==null?void 0:v.summary)==null?void 0:Ue.vacantUnits)??((Je=n==null?void 0:n.metrics)==null?void 0:Je.vacantUnits)??(n==null?void 0:n.vacantUnits)??0,X=(v==null?void 0:v.vacantUnits)||[],Y=(v==null?void 0:v.upcomingExpirations)||[],ae=X.reduce((te,ve)=>te+(ve.marketRent||0),0),fe=N.useMemo(()=>{const te={vacantUnits:X,upcomingExpirations:Y},ve={expenseChange:t==null?void 0:t.expenseChange,expenses:F};return dI(te,ve)},[Y,X,t==null?void 0:t.expenseChange,F]),ue=()=>{if(!(i!=null&&i.end))return"";const te=new Date(i.end);
1174return`${te.toLocaleString("default",{month:"long"})} ${te.getFullYear()}`};return e?o.jsxs("div",{className:"bg-white text-gray-900 p-8 max-w-4xl mx-auto",style:{fontFamily:"system-ui, -apple-system, sans-serif"},children:[o.jsx("div",{className:"flex justify-end gap-2 mb-6 print:hidden",children:u&&o.jsxs(rt,{variant:"primary",onClick:u,className:"flex items-center gap-2",children:[o.jsx(vc,{className:"h-4 w-4"}),"Export PDF"]})}),o.jsxs("div",{className:"grid grid-cols-3 items-center pb-4 border-b-2 border-gray-900 mb-6",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-lg font-semibold text-gray-900",children:a.name||"Property"}),o.jsx("div",{className:"text-xs text-gray-500",children:a.address||""})]}),o.jsx("div",{className:"text-center",children:o.jsx("h1",{className:"text-sm font-semibold uppercase tracking-widest text-gray-500",children:"Monthly Operations Report"})}),o.jsxs("div",{className:"text-right",children:[o.jsx("div",{className:"text-base font-semibold",children:ue()}),o.jsxs("div",{className:"text-xs text-gray-500",children:[a.unit_count?`${a.unit_count} Units`:"",a.class?` | Class ${a.class}`:""]})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[o.jsxs("div",{className:"text-center p-5 bg-gray-50 border border-gray-200",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 mb-2",children:"Physical Occupancy"}),o.jsx("div",{className:`text-4xl font-bold ${W>=.94?"text-green-600":W>=.9?"text-yellow-600":"text-red-600"}`,children:W?pr(W*100):"N/A"}),o.jsx("div",{className:"text-sm text-gray-500 mt-2",children:B>0?`${B} vacant unit${B>1?"s":""}`:""})]}),o.jsxs("div",{className:"text-center p-5 bg-gray-50 border border-gray-200",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 mb-2",children:"Net Operating Income"}),o.jsx("div",{className:`text-4xl font-bold ${L>0?"text-green-600":"text-gray-900"}`,children:L?Be(L):"N/A"}),o.jsx("div",{className:"text-sm text-gray-500 mt-2",children:"This Month"})]})]}),fe.length>0?o.jsxs("div",{className:"mb-6 bg-amber-50 border border-amber-200 border-l-4 border-l-amber-500 p-4",children:[o.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wide text-amber-800 mb-3",children:"Attention Items"}),o.jsx("div",{className:"space-y-2",children:fe.map((te,ve)=>o.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-amber-200/50 last:border-b-0",children:[o.jsxs("span",{className:"text-sm text-gray-900 flex-1",children:[o.jsx("strong",{children:te.text.split("â")[0]}),te.text.includes("â")&&` â ${te.text.split("â")[1]}`]}),o.jsx("span",{className:"text-sm font-semibold text-amber-800 ml-4 whitespace-nowrap",children:te.value})]},ve))})]}):o.jsxs("div",{className:"mb-6 bg-green-50 border border-green-200 border-l-4 border-l-green-500 p-4",children:[o.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wide text-green-800 mb-3",children:"Status"}),o.jsxs("div",{className:"text-sm text-green-800",children:[o.jsx("strong",{children:"No urgent attention items"})," â property operations are stable"]})]}),p.monthlySummary&&o.jsx(Us,{sectionTitle:"MONTHLY SUMMARY",content:p.monthlySummary.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"bg-gray-50 border-l-4 border-gray-300 p-4 mb-6"}),o.jsxs("div",{className:"grid grid-cols-4 border border-gray-200 mb-6",children:[o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Economic Occupancy"}),o.jsx("div",{className:"text-lg font-semibold",children:G?pr(G*100):"N/A"})]}),o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Avg Rent/Unit"}),o.jsx("div",{className:"text-lg font-semibold",children:H?Be(H):"N/A"})]}),o.jsxs("div",{className:"p-3 text-center border-r border-gray-200",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Vacancy Loss"}),o.jsx("div",{className:"text-lg font-semibold text-red-600",children:ae>0?Be(ae):"$0"})]}),o.jsxs("div",{className:"p-3 text-center",children:[o.jsx("div",{className:"text-xs uppercase text-gray-500 mb-1",children:"Vacant Units"}),o.jsx("div",{className:"text-lg font-semibold",children:B})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[o.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[o.jsx("div",{className:"bg-gray-100 px-4 py-2 border-b border-gray-200",children:o.jsx("h3",{className:"text-sm font-semibold text-gray-700",children:"Lease Expirations"})}),o.jsx("div",{className:"p-4",children:Y.length>0?o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-left text-xs text-gray-500 uppercase",children:[o.jsx("th",{className:"pb-2",children:"Unit"}),o.jsx("th",{className:"pb-2",children:"Tenant"}),o.jsx("th",{className:"pb-2 text-right",children:"Timeframe"})]})}),o.jsx("tbody",{children:Y.slice(0,5).map((te,ve)=>{const J=te.priority||"low",me=te.timeframe||(J==="high"?"30 Days":J==="medium"?"60 Days":"90 Days");return o.jsxs("tr",{className:"border-t border-gray-100",children:[o.jsx("td",{className:"py-2 font-medium",children:te.unitNumber||te.unit}),o.jsx("td",{className:"py-2 text-gray-600",children:te.tenantName||te.tenant||"-"}),o.jsx("td",{className:"py-2 text-right",children:o.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${J==="high"?"bg-red-100 text-red-700":J==="medium"?"bg-amber-100 text-amber-700":"bg-gray-100 text-gray-700"}`,children:me})})]},ve)})})]}):o.jsx("p",{className:"text-sm text-gray-500 text-center py-4",children:"No lease expirations in next 90 days"})})]}),o.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[o.jsx("div",{className:"bg-gray-100 px-4 py-2 border-b border-gray-200",children:o.jsx("h3",{className:"text-sm font-semibold text-gray-700",children:"Current Vacancies"})}),o.jsx("div",{className:"p-4",children:X.length>0?o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-left text-xs text-gray-500 uppercase",children:[o.jsx("th",{className:"pb-2",children:"Unit"}),o.jsx("th",{className:"pb-2 text-right",children:"Market Rent"}),o.jsx("th",{className:"pb-2 text-right",children:"Days Vacant"})]})}),o.jsx("tbody",{children:X.slice(0,5).map((te,ve)=>{const J=_Ie(te);return o.jsxs("tr",{className:"border-t border-gray-100",children:[o.jsx("td",{className:"py-2 font-medium",children:te.unitNumber||te.unit}),o.jsx("td",{className:"py-2 text-right text-gray-600",children:Be(te.marketRent||0)}),o.jsx("td",{className:"py-2 text-right",children:o.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${J.className}`,children:J.label})})]},ve)})})]}):o.jsx("p",{className:"text-sm text-gray-500 text-center py-4",children:"No current vacancies"})})]})]}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-5 mb-6",children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-gray-400 mb-4",children:"Financial Performance"}),o.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Gross Revenue"}),o.jsx("div",{className:"text-xl font-bold text-white",children:K?Be(K):"N/A"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Operating Expenses"}),o.jsx("div",{className:"text-xl font-bold text-white",children:F?Be(F):"N/A"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Net Operating Income"}),o.jsx("div",{className:"text-xl font-bold text-green-400",children:L?Be(L):"N/A"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Expense Ratio"}),o.jsx("div",{className:"text-xl font-bold text-white",children:ne?pr(ne):"N/A"})]})]})]}),(y.topIncome.length>0||y.topExpenses.length>0)&&o.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[y.topIncome.length>0&&o.jsx(O1,{rows:y.topIncome,kind:"income",total:K}),y.topExpenses.length>0&&o.jsx(O1,{rows:y.topExpenses,kind:"operatingExpense",total:F})]}),p.recommendedActions&&o.jsx(Us,{sectionTitle:"RECOMMENDED ACTIONS",content:p.recommendedActions.content,onSave:f,onRefine:s,isRef
1174ining:l,refiningSection:c,className:"bg-blue-50 border-l-4 border-blue-400 p-4 mb-6",customMarkdownComponents:m}),!p.monthlySummary&&p.investmentSummary&&o.jsx(Us,{sectionTitle:"EXECUTIVE SUMMARY",content:p.investmentSummary.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"bg-gray-50 border-l-4 border-gray-300 p-4 mb-6"}),!p.recommendedActions&&p.forwardPriorities&&o.jsx(Us,{sectionTitle:"FORWARD LOOK",content:p.forwardPriorities.content,onSave:f,onRefine:s,isRefining:l,refiningSection:c,className:"bg-gray-900 p-5 mb-6",headerClassName:"text-gray-400",contentClassName:"prose-invert",hoverClassName:"hover:bg-gray-800/50",editModeClassName:"ring-2 ring-amber-400/50 rounded-lg p-3 bg-gray-800 outline-none cursor-text",customMarkdownComponents:x}),(d==null?void 0:d.includeRentRoll)&&o.jsxs("div",{className:"mt-8 pt-6 border-t-2 border-gray-300",children:[o.jsxs("div",{className:"mb-4",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900",children:"Complete Unit Roster"}),E&&o.jsxs("p",{className:"text-sm text-gray-500",children:["Data as of: ",Ct(E)]})]}),O?o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx(ar,{className:"h-6 w-6 animate-spin text-gray-400"}),o.jsx("span",{className:"ml-2 text-gray-500",children:"Loading unit roster..."})]}):j.length>0?o.jsxs("div",{className:"overflow-x-auto",children:[o.jsxs("table",{className:"w-full text-xs border-collapse",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-gray-100 border-b border-gray-300",children:[o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Unit"}),o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Type"}),o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Tenant"}),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700",children:"Rent"}),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700",children:"Market"}),o.jsx("th",{className:"text-center py-2 px-2 font-semibold text-gray-700",children:"Lease Start"}),o.jsx("th",{className:"text-center py-2 px-2 font-semibold text-gray-700",children:"Lease End"}),o.jsx("th",{className:"text-right py-2 px-2 font-semibold text-gray-700",children:"Balance"}),o.jsx("th",{className:"text-left py-2 px-2 font-semibold text-gray-700",children:"Status"})]})}),o.jsx("tbody",{children:j.map((te,ve)=>{const J=te.isVacant,me=te.isDelinquent;return o.jsxs("tr",{className:`border-b border-gray-200 ${J?"bg-red-50":me?"bg-amber-50":""}`,children:[o.jsx("td",{className:"py-1.5 px-2 font-medium",children:te.unitNumber||"-"}),o.jsx("td",{className:"py-1.5 px-2 text-gray-600",children:te.type||"-"}),o.jsx("td",{className:"py-1.5 px-2",children:te.tenant||"-"}),o.jsx("td",{className:"py-1.5 px-2 text-right",children:te.monthlyRent?Be(te.monthlyRent):"-"}),o.jsx("td",{className:"py-1.5 px-2 text-right text-gray-500",children:te.marketRent?Be(te.marketRent):"-"}),o.jsx("td",{className:"py-1.5 px-2 text-center text-gray-600",children:te.leaseStart?new Date(te.leaseStart).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"2-digit"}):"-"}),o.jsx("td",{className:"py-1.5 px-2 text-center text-gray-600",children:te.leaseEnd?new Date(te.leaseEnd).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"2-digit"}):"-"}),o.jsx("td",{className:`py-1.5 px-2 text-right ${me?"text-red-600 font-medium":""}`,children:te.balance?Be(te.balance):"-"}),o.jsx("td",{className:"py-1.5 px-2",children:o.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs ${J?"bg-red-100 text-red-700":me?"bg-amber-100 text-amber-700":"bg-green-100 text-green-700"}`,children:J?"Vacant":"Occupied"})})]},te.unitNumber||ve)})})]}),o.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-4 text-sm",children:[o.jsxs("div",{className:"text-center p-2 bg-gray-50 border border-gray-200 rounded",children:[o.jsx("div",{className:"text-xs text-gray-500",children:"Total Units"}),o.jsx("div",{className:"font-semibold",children:j.length})]}),o.jsxs("div",{className:"text-center p-2 bg-green-50 border border-green-200 rounded",children:[o.jsx("div",{className:"text-xs text-green-600",children:"Occupied"}),o.jsx("div",{className:"font-semibold text-green-700",children:j.filter(te=>te.isOccupied).length})]}),o.jsxs("div",{className:"text-center p-2 bg-red-50 border border-red-200 rounded",children:[o.jsx("div",{className:"text-xs text-red-600",children:"Vacant"}),o.jsx("div",{className:"font-semibold text-red-700",children:j.filter(te=>te.isVacant).length})]}),o.jsxs("div",{className:"text-center p-2 bg-amber-50 border border-amber-200 rounded",children:[o.jsx("div",{className:"text-xs text-amber-600",children:"Delinquent"}),o.jsx("div",{className:"font-semibold text-amber-700",children:j.filter(te=>te.isDelinquent).length})]})]})]}):o.jsx("div",{className:"text-center py-8 text-gray-500",children:o.jsx("p",{children:"No unit roster data available"})})]}),(d==null?void 0:d.includePLStatement)&&o.jsxs("div",{className:"mt-8 pt-6 border-t-2 border-gray-300",children:[o.jsxs("div",{className:"mb-4",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900",children:"Profit & Loss Statement"}),(i==null?void 0:i.start)&&(i==null?void 0:i.end)&&o.jsxs("p",{className:"text-sm text-gray-500",children:[Ct(i.start)," - ",Ct
1174(i.end)]})]}),R?o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx(ar,{className:"h-6 w-6 animate-spin text-gray-400"}),o.jsx("span",{className:"ml-2 text-gray-500",children:"Loading P&L data..."})]}):P&&Object.keys(((Ze=P.revenue)==null?void 0:Ze.byMonth)||{}).length>0?o.jsx(yQ,{data:P,dateRange:i}):o.jsx("div",{className:"text-center py-8 text-gray-500",children:o.jsx("p",{children:"No P&L data available for this period"})})]}),o.jsxs("div",{className:"mt-8 pt-3 border-t border-gray-200 flex justify-between text-xs text-gray-400",children:[o.jsxs("span",{children:["Report Generated: ",new Date().toLocaleDateString()]}),o.jsx("span",{children:"SAMI Property Intelligence"})]})]}):o.jsx("div",{className:"flex items-center justify-center h-full text-gray-500 p-6",children:o.jsx("p",{children:"Complete the chat to generate your report"})})};class EIe{async getChartData(t,r=null){try{const n={};r&&(n.referenceDate=r);const a=await Xe.get(`/occupancy/${t}/chart-data`,{params:n});if(!a.data.success)throw new Gt(a.data.error||"Failed to load occupancy data",Bt.API_ERROR,"Unable to load occupancy data. Please try again.",!0);return a.data.data}catch(n){throw n instanceof Gt?n:new Gt(n.message||"Failed to load occupancy data",Bt.API_ERROR,"Unable to load occupancy data. Please check your connection and try again.",!0)}}async getMetrics(t,r=null){try{const n={};r&&(n.referenceDate=r);const a=await Xe.get(`/occupancy/${t}/metrics`,{params:n});if(!a.data.success)throw new Gt(a.data.error||"Failed to load occupancy metrics",Bt.API_ERROR,"Unable to load occupancy metrics. Please try again.",!0);return a.data.data}catch(n){throw n instanceof Gt?n:new Gt(n.message||"Failed to load occupancy metrics",Bt.API_ERROR,"Unable to load occupancy metrics. Please check your connection and try again.",!0)}}async getLeaseStatus(t,r=null,n=!0){try{const a={includeColors:n.toString()};r&&(a.referenceDate=r);const i=await Xe.get(`/occupancy/${t}/lease-status`,{params:a});if(!i.data.success)throw new Gt(i.data.error||"Failed to load lease status",Bt.API_ERROR,"Unable to load lease status. Please try again.",!0);return i.data.data}catch(a){throw a instanceof Gt?a:new Gt(a.message||"Failed to load lease status",Bt.API_ERROR,"Unable to load lease status. Please check your connection and try again.",!0)}}async getLeaseExpirations(t,r=12,n="array",a=null){try{const i={monthsAhead:r,format:n};a&&(i.referenceDate=a);const s=await Xe.get(`/occupancy/${t}/lease-expirations`,{params:i});if(!s.data.success)throw new Gt(s.data.error||"Failed to load lease expirations",Bt.API_ERROR,"Unable to load lease expirations. Please try again.",!0);return s.data.data}catch(i){throw i instanceof Gt?i:new Gt(i.message||"Failed to load lease expirations",Bt.API_ERROR,"Unable to load lease expirations. Please check your connection and try again.",!0)}}async getUnitDetails(t,r=null){try{const n={};r&&(n.referenceDate=r);const a=await Xe.get(`/occupancy/${t}/unit-details`,{params:n});if(!a.data.success)throw new Gt(a.data.error||"Failed to load unit details",Bt.API_ERROR,"Unable to load unit details. Please try again.",!0);return a.data.data}catch(n){throw n instanceof Gt?n:new Gt(n.message||"Failed to load unit details",Bt.API_ERROR,"Unable to load unit details. Please check your connection and try again.",!0)}}async getAvailableRentRolls(t,r=null){try{const n={};return r!=null&&r.start&&(n.startDate=r.start),r!=null&&r.end&&(n.endDate=r.end),(await Xe.get(`/occupancy/${t}/rent-rolls`,{params:n})).data.data}catch(n){throw n instanceof Gt?n:new Gt(n.message||"Failed to load available rent rolls",Bt.API_ERROR,"Unable to load rent roll list. Please try again.",!0)}}async getRentRollByReportId(t,r){try{const n=await Xe.get(`/occupancy/${t}/rent-roll/${r}`);if(!n.data.success)throw new Gt(n.data.error||"Failed to load rent roll data",Bt.API_ERROR,"Unable to load rent roll data. Please try again.",!0);return n.data.data}catch(n){throw n instanceof Gt?n:new Gt(n.message||"Failed to load rent roll data",Bt.API_ERROR,"Unable to load rent roll data. Please check your connection and try again.",!0)}}async getUnitHistory(t,r){try{const n=encodeURIComponent(r),a=await Xe.get(`/occupancy/${t}/unit-history/${n}`);if(!a.data.success)throw new Gt(a.data.error||"Failed to load unit history",Bt.API_ERROR,"Unable to load unit history. Please try again.",!0);return a.data.data}catch(n){throw n instanceof Gt?n:new Gt(n.message||"Failed to load unit history",Bt.API_ERROR,"Unable to load unit history. Please check your connection and try again.",!0)}}}const Hl=new EIe,rb=({label:e,value:t,icon:r,border:n=!1})=>o.jsxs("div",{className:`py-3 px-4 ${n?"border-r border-white/10":""}`,children:[o.jsxs("div",{className:"flex items-center gap-2 text-gray-400 text-xs mb-1",children:[r&&o.jsx(r,{className:"h-3.5 w-3.5"}),o.jsx("span",{children:e})]}),o.jsx("div",{className:"text-xl font-semibold text-white",children:t})]}),kIe=({status:e})=>{var a;const t={occupied:{bg:"bg-green-500/20",text:"text-green-400",label:"Occupied"},current:{bg:"bg-green-500/20",text:"text-green-400",label:"Current"},vacant:{bg:"bg-red-500/20",text:"text-red-400",label:"Vacant"},"notice-to-vacate":{bg:"bg-amber-500/20",text:"text-amber-400",label:"Notice"},"month-to-month":{bg:"bg-blue-500/20",text:"text-blue-400",label:"M2M"},"pending-move-in":{bg:"bg-purple-500/20",text:"text-purple-400",label:"Pending"},"pre-leased":{bg:"bg-purple-500/20",text:"text-purple-400",label:"Pre-leased"}},r=((a=e==null?void 0:e.toLowerCase())==null?void 0:a.replace(/\s+/g,"-"))||"vacant",n=t[r]||t.occupied;return o.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${n.bg} ${n.text}`,children:n.label})},NIe=({propertyId:e,property:t,dateRange:r,onBack:n})=>{var A;const[a,i]=N.useState(!0),[s,l]=N.useState(null),[c,u]=N.useState(null),[d,f]=N.useState([]),[p,m]=N.useState([]),[x,y]=N.useState(!1),[v,b]=N.useState(!1),w=N.useCallback(async()=>
1174{if(!e){l("Property ID is required"),i(!1);return}i(!0),l(null);try{const[P,I]=await Promise.all([Hl.getChartData(e),Hl.getUnitDetails(e)]);u(P.stats),f(I||[]),S(P.stats,I||[])}catch(P){console.error("Failed to fetch occupancy data:",P),l(P.userMessage||P.message||"Failed to load rent roll data")}finally{i(!1)}},[e]),S=N.useCallback(async(P,I)=>{var R;y(!0);try{const M=await Xe.post("/analysis/rent-roll-actions",{propertyId:e,dateRange:r,occupancyData:{metrics:P,units:I}});m(((R=M.data)==null?void 0:R.actions)||[])}catch(M){console.error("Failed to generate action items:",M),m([])}finally{y(!1)}},[e,r]);N.useEffect(()=>{w()},[w]);const j=async()=>{b(!0);try{const P="https://oyster-app-2hw4z.ondigitalocean.app",I=localStorage.getItem("accessToken"),R=await fetch(`${P}/api/pdf/rent-roll-report`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:I?`Bearer ${I}`:""},body:JSON.stringify({propertyId:e,options:{theme:"dark",includeUnitDetail:!0}})});if(!R.ok){const W=await R.json().catch(()=>({}));throw new Error(W.message||`Export failed: ${R.statusText}`)}const M=await R.blob(),L=window.URL.createObjectURL(M),U=document.createElement("a");U.href=L,U.download=`${(t==null?void 0:t.name)||"Property"}_Rent_Roll_${new Date().toISOString().split("T")[0]}.pdf`,document.body.appendChild(U),U.click(),document.body.removeChild(U),window.URL.revokeObjectURL(L),ft.success("Rent Roll Analysis downloaded")}catch(P){console.error("PDF export error:",P),ft.error("Failed to export PDF. Please try again.")}finally{b(!1)}};if(a)return o.jsx("div",{className:"p-6",children:o.jsx(z4,{loading:!0,loadingMessage:"Loading rent roll data..."})});if(s)return o.jsx("div",{className:"p-6",children:o.jsxs("div",{className:"glass-card p-6 text-center",children:[o.jsx(Jr,{className:"h-12 w-12 text-red-400 mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"Failed to Load Data"}),o.jsx("p",{className:"text-gray-400 mb-4",children:s}),o.jsxs("div",{className:"flex justify-center gap-3",children:[o.jsx(rt,{variant:"secondary",onClick:n,children:"Go Back"}),o.jsx(rt,{variant:"primary",onClick:w,children:"Retry"})]})]})});const k=(c==null?void 0:c.totalUnits)||0,E=(c==null?void 0:c.occupiedUnits)||0,T=((A=c==null?void 0:c.physicalOccupancy)==null?void 0:A.toFixed(1))||"0.0",O=(c==null?void 0:c.averageRent)||0;return o.jsxs("div",{className:"p-6 space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("button",{onClick:n,className:"p-2 text-gray-400 hover:text-white hover:bg-white/5 rounded-lg transition-colors",children:o.jsx(wu,{className:"h-5 w-5"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-semibold text-white",children:"Rent Roll Analysis"}),o.jsx("p",{className:"text-sm text-gray-400",children:t==null?void 0:t.name})]})]}),o.jsx(rt,{variant:"primary",onClick:j,disabled:v,loading:v,icon:vc,children:v?"Exporting...":"Export PDF"})]}),o.jsx("div",{className:"glass-card py-2 px-4",children:o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-0",children:[o.jsx(rb,{label:"Total Units",value:k,icon:Ru,border:!0}),o.jsx(rb,{label:"Occupied",value:E,icon:Gp,border:!0}),o.jsx(rb,{label:"Occupancy",value:`${T}%`,icon:_u,border:!0}),o.jsx(rb,{label:"Avg Rent",value:Be(O),icon:bl})]})}),o.jsxs("section",{className:"glass-card p-5",children:[o.jsxs("h3",{className:"text-lg font-medium text-white mb-4 flex items-center gap-2",children:[o.jsx(yc,{className:"h-5 w-5 text-accent"}),"Recommended Actions",x&&o.jsx(ar,{className:"h-4 w-4 animate-spin text-gray-400"})]}),x&&p.length===0?o.jsxs("div",{className:"flex items-center gap-2 text-gray-400 text-sm",children:[o.jsx(ar,{className:"h-4 w-4 animate-spin"}),o.jsx("span",{children:"Analyzing rent roll data..."})]}):p.length>0?o.jsx("ul",{className:"space-y-3",children:p.map((P,I)=>o.jsxs("li",{className:"flex gap-3 text-sm",children:[o.jsx("span",{className:"text-accent mt-0.5",children:"â¢"}),o.jsx("span",{className:"text-gray-300",children:P})]},I))}):o.jsx("p",{className:"text-gray-500 text-sm",children:"No immediate actions recommended. Your rent roll looks healthy."})]}),o.jsxs("section",{className:"glass-card p-5",children:[o.jsx("h3",{className:"text-lg font-medium text-white mb-4",children:"Rent Roll"}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{className:"text-left py-3 px-3 text-gray-400 font-medium",children:"Unit"}),o.jsx("th",{className:"text-left py-3 px-3 text-gray-400 font-medium",children:"Type"}),o.jsx("th",{className:"text-left py-3 px-3 text-gray-400 font-medium",children:"Status"}),o.jsx("th",{className:"text-right py-3 px-3 text-gray-400 font-medium",children:"Rent"}),o.jsx("th",{className:"text-left py-3 px-3 text-gray-400 font-medium",children:"Lease End"}),o.jsx("th",{className:"text-left py-3 px-3 text-gray-400 font-medium",children:"Tenant"})]})}),o.jsx("tbody",{children:d.length===0?o.jsx("tr",{children:o.jsx("td",{colSpan:6,className:"py-8 text-center text-gray-500",children:"No units found in rent roll"})}):d.map((P,I)=>o.jsxs("tr",{className:"border-b border-white/5 hover:bg-white/5 transition-colors",children:[o.jsx("td",{className:"py-3 px-3 text-white font-medium",children:P.unitNumber||"-"}),o.jsx("td",{className:"py-3 px-3 text-gray-300",children:P.unitType||"-"}),o.jsx("td",{className:"py-3 px-3",children:o.jsx(kIe,{status:P.status})}),o.jsx("td",{className:"py-3 px-3 text-right text-white",children:P.monthlyRent?Be(P.monthlyRent):"-"}),o.jsx("td",{className:"py-3 px-3 text-gray-300",children:P.leaseEnd?Ct(P.leaseEnd):"-"}),o.jsx("td",{className:"py-3 px-3 text-gray-400",children:P.tenantName||"-"})]},P.unitNumber||I))})]})}),d.length>20&&o.jsxs("div",{className:"mt-4 text-center text-sm text-gray-500",children:["Showing ",d.length," units"]})]})]})},TIe=({property:e,analysisText:t,dateRange:r,rawData:n,currentAnalysisId:a,currentAnalysisName:i,onSaved:s})=>{const[l,c]=N.useState(!1),[u,d]=N.useState(""),[f,p]=N.useState(!1),{handleError:m}=Qx(),x=async(y=!1)=>{var v;
1174if(!u.trim()){ft.warning("Please enter a name for the analysis");return}p(!0);try{const b=GX({id:y?null:a,propertyId:e.id,name:u,analysisText:t,dateRange:r,rawData:n}),w=await k1.saveAnalysis(b);ft.success("Analysis saved successfully"),c(!1),d(""),s&&s(w.id,u)}catch(b){((v=b.response)==null?void 0:v.status)===409?ft.error("An analysis with this name already exists"):m(b,"Failed to save analysis")}finally{p(!1)}};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex justify-between items-center",children:o.jsx(rt,{onClick:()=>{c(!0),d(i||`Analysis ${new Date().toLocaleDateString()}`)},variant:"primary",icon:Po,disabled:!t,children:"Save Analysis"})}),o.jsx(A4,{isOpen:l,onClose:()=>c(!1),onSubmit:y=>{y.preventDefault(),x(!1)},title:"Save Analysis",size:"sm",submitText:a?"Update":"Save",loading:f,footerContent:a&&o.jsx(rt,{onClick:()=>x(!0),variant:"secondary",disabled:f,size:"sm",children:"Save as New"}),children:o.jsx(v_,{value:u,onChange:d,placeholder:"Enter analysis name",label:"Analysis Name"})})]})},jIe=24,e8=({analysisText:e,onTextChange:t,onUnsavedChangesUpdate:r,isEditMode:n,onEditModeChange:a})=>{const[i,s]=N.useState(""),[l,c]=N.useState(!1),[u,d]=N.useState(!1),f=N.useRef(null);N.useEffect(()=>{n&&!i&&e?s(e):n||(s(""),c(!1))},[n,e,i]);const p=()=>{n?l?d(!0):(a(!1),s(""),c(!1),r&&r(!1)):(s(e),a(!0))},m=y=>{s(y);const v=y!==e;c(v),t&&t(y),r&&r(v)},x=()=>{t&&t(i),c(!1),r&&r(!1),a(!1)};return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"hidden",children:[o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(rt,{onClick:p,variant:n?"primary":"secondary",size:"sm",icon:_R,children:n?"Cancel Edit":"Edit Analysis"}),n&&l&&o.jsx(rt,{onClick:x,variant:"accent",size:"sm",children:"Apply Changes"})]}),n&&o.jsxs("div",{className:"bg-card/50 backdrop-blur border border-card-border rounded-lg p-6",children:[o.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Edit Analysis"}),o.jsx("textarea",{ref:f,value:i,onChange:y=>m(y.target.value),placeholder:"Edit your analysis here...",rows:jIe,className:"w-full p-4 bg-gray-800/50 text-gray-100 rounded border border-gray-700 focus:border-blue-500 focus:outline-none resize-none font-mono text-sm"})]})]}),o.jsx(ki,{isOpen:u,onClose:()=>d(!1),onConfirm:()=>{a(!1),s(""),c(!1),r&&r(!1),d(!1)},title:"Discard Changes?",message:"You have unsaved changes. Are you sure you want to discard them?",confirmText:"Discard",cancelText:"Cancel",variant:"warning"})]})};class AIe{constructor(){this.dbName="ReportsDB",this.version=1,this.storeName="reports",this.db=null,this.initPromise=this.init()}
1174async init(){return new Promise((t,r)=>{const n=indexedDB.open(this.dbName,this.version);n.onerror=()=>r(new Error("Failed to open IndexedDB")),n.onsuccess=()=>{this.db=n.result,t(this.db)},n.onupgradeneeded=a=>{const i=a.target.result;if(!i.objectStoreNames.contains(this.storeName)){const s=i.createObjectStore(this.storeName,{keyPath:"id"});s.createIndex("timestamp","timestamp",{unique:!1}),s.createIndex("propertyId","propertyId",{unique:!1})}}})}async ensureReady(){this.db||await this.initPromise}async save(t,r){return await this.ensureReady(),new Promise((n,a)=>{var u;const s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName),l={id:t,timestamp:Date.now(),propertyId:(u=r.property)==null?void 0:u.id,data:r},c=s.put(l);c.onsuccess=()=>n(t),c.onerror=()=>a(new Error("Failed to save report to IndexedDB"))})}async get(t){return await this.ensureReady(),new Promise((r,n)=>{const s=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);s.onsuccess=()=>{const l=s.result;r(l?l.data:null)},s.onerror=()=>n(new Error("Failed to get report from IndexedDB"))})}async delete(t){return await this.ensureReady(),new Promise((r,n)=>{const s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);s.onsuccess=()=>r(!0),s.onerror=()=>n(new Error("Failed to delete report from IndexedDB"))})}async cleanup(t=1440*60*1e3){await this.ensureReady();const r=Date.now()-t;return new Promise((n,a)=>{const s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName),l=s.index("timestamp"),c=IDBKeyRange.upperBound(r),u=l.openCursor(c);let d=0;u.onsuccess=f=>{const p=f.target.result;p?(s.delete(p.primaryKey),d++,p.continue()):n(d)},u.onerror=()=>a(new Error("Failed to cleanup old reports"))})}async getAll(){return await this.ensureReady(),new Promise((t,r)=>{const i=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).getAll();i.onsuccess=()=>t(i.result||[]),i.onerror=()=>r(new Error("Failed to get all reports"))})}}class CIe{constructor(){this.baseUrl="https://oyster-app-2hw4z.ondigitalocean.app"}async backup(t,r){try{const n=localStorage.getItem("accessToken"),a=await fetch(`${this.baseUrl}/api/reports/backup`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:n?`Bearer ${n}`:""},body:JSON.stringify({reportId:t,data:r,timestamp:Date.now()})});return a.ok||console.warn("Failed to backup report to database:",a.statusText),a.ok}catch(n){return console.warn("Database backup failed:",n.message),!1}}async restore(t){try{const r=localStorage.getItem("accessToken"),n=await fetch(`${this.baseUrl}/api/reports/backup/${t}`,{headers:{Authorization:r?`Bearer ${r}`:""}});return n.ok?await n.json():null}catch(r){return console.warn("Database restore failed:",r.message),null}}}class OIe{constructor(){this.storage=new AIe,this.api=new CIe,this.BACKUP_THRESHOLD=500*1024}needsBackup(t){return JSON.stringify(t).length>this.BACKUP_THRESHOLD}async save(t,r){if(!t||!r)throw new Error("Report ID and data are required");return await this.storage.save(t,r),this.needsBackup(r)&&this.api.backup(t,r).catch(n=>{console.warn("Background backup failed:",n)}),t}async get(t){if(!t)throw new Error("Report ID is required");let r=await this.storage.get(t);if(!r){const n=await this.api.restore(t);n&&(await this.storage.save(t,n.data),r=n.data)}return r}async delete(t){if(!t)throw new Error("Report ID is required");return await this.storage.delete(t),this.api.backup(t,null).catch(()=>{}),!0}async cleanup(t=1440*60*1e3){return await this.storage.cleanup(t)}async getAll(){return await this.storage.getAll()}generateReportId(t){return`report_${t}_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}}const Ik=new OIe;class P_{static detectSections(t){if(!t)return[];const r=[];return t.split(` 1175`).forEach((a,i)=>{const s=a.match(/^(#{2,3})\s+(.+)/);if(s){const l=s[1].length,c=s[2].trim(),u=this.identifySectionType(c);r.push({title:c,originalTitle:c,type:u,standardName:this.STANDARD_NAMES[u]||c.toUpperCase(),line:i+1,level:l,recognized:u!==this.SECTION_TYPES.UNKNOWN,confidence:this.getConfidenceScore(c,u)})}}),r}static identifySectionType(t){if(!t)return this.SECTION_TYPES.UNKNOWN;const r=t.toUpperCase().replace(/[^A-Z ]/g,"");return r.includes("EXECUTIVE")||r.includes("SUMMARY")||r.includes("OVERVIEW")||r.includes("KEY FINDINGS")?this.SECTION_TYPES.EXECUTIVE_SUMMARY:r.includes("FINANCIAL")||r.includes("REVENUE")||r.includes("INCOME")||r.includes("CASH FLOW")||r.includes("NOI")||r.includes("PROFIT")?this.SECTION_TYPES.FINANCIAL_PERFORMANCE:r.includes("OCCUPANCY")||r.includes("LEASING")||r.includes("TENANT")||r.includes("VACANCY")||r.includes("RENT ROLL")||r.includes("LEASE")?this.SECTION_TYPES.OCCUPANCY_LEASING:r.includes("OPERATIONAL")||r.includes("OPERATIONS")||r.includes("INSIGHTS")||r.includes("EFFICIENCY")||r.includes("MANAGEMENT")||r.includes("MAINTENANCE")?this.SECTION_TYPES.OPERATIONAL_INSIGHTS:r.includes("STRATEGIC")||r.includes("RECOMMENDATION")||r.includes("STRATEGY")||r.includes("ACTION")||r.includes("NEXT STEPS")||r.includes("OPPORTUNITIES")?this.SECTION_TYPES.STRATEGIC_RECOMMENDATIONS:r.includes("RISK")||r.includes("THREAT")||r.includes("CHALLENGE")||r.includes("CONCERN")||r.includes("MITIGATION")||r.includes("WARNING")?this.SECTION_TYPES.RISK_ASSESSMENT:r.includes("MARKET")||r.includes("COMPETITIVE")||r.includes("COMP")||r.includes("BENCHMARK")||r.includes("INDUSTRY")?this.SECTION_TYPES.MARKET_ANALYSIS:r.includes("VARIANCE")||r.includes("COMPARISON")||r.includes("CHANGE")||r.includes("TREND")||r.includes("YOY")||r.includes("MONTH OVER")?this.SECTION_TYPES.VARIANCE_ANALYSIS:r.includes("CONCLUSION")||r.includes("OUTLOOK")||r.includes("FORWARD")||r.includes("SUMMARY")||r.includes("CLOSING")?this.SECTION_TYPES.CONCLUSION:this.SECTION_TYPES.UNKNOWN}static getConfidenceScore(t,r){if(r===this.SECTION_TYPES.UNKNOWN)return 0;const n=t.toUpperCase(),a=this.STANDARD_NAMES[r];if(n===a)return 1;const i=a.split(/\s+/);return i.filter(l=>n.includes(l)).length/i.length}static normalizeSection(t){const r=this.identifySectionType(t);return this.STANDARD_NAMES[r]||t.toUpperCase()}static parseToStandardFormat(t){if(!t)return{};const r={},a=this.detectSections(t).map(i=>{const s=t.split(` 1176`);let l=0;for(let c=0;c<i.line-1;c++)l+=s[c].length+1;return{...i,startPos:l}});return a.forEach((i,s)=>{const l=a[s+1],c=l?l.startPos:t.length,u=t.indexOf(` 1177`,i.startPos);if(u!==-1&&u<c){const d=t.substring(u+1,c).trim(),f=this.CAMELCASE_KEYS[i.type]||i.type;r[f]=d}}),r}static getMissingSections(t){const r=[this.SECTION_TYPES.EXECUTIVE_SUMMARY,this.SECTION_TYPES.FINANCIAL_PERFORMANCE,this.SECTION_TYPES.OCCUPANCY_LEASING,this.SECTION_TYPES.OPERATIONAL_INSIGHTS],n=t.map(a=>a.type);return r.filter(a=>!n.includes(a)).map(a=>({type:a,standardName:this.STANDARD_NAMES[a],displayName:this.STANDARD_NAMES[a].toLowerCase().split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}))}static insertSectionHeader(t,r,n){const a=this.getSectionTemplate(n);return r>=t.length?t+` 1178 1179`+a:t.slice(0,r)+a+` 1180 1181`+t.slice(r)}static getSectionTemplate(t){return{[this.SECTION_TYPES.EXECUTIVE_SUMMARY]:`## Executive Summary 1182`,[this.SECTION_TYPES.FINANCIAL_PERFORMANCE]:`## Financial Performance 1183`,[this.SECTION_TYPES.OCCUPANCY_LEASING]:`## Occupancy & Leasing 1184`,[this.SECTION_TYPES.OPERATIONAL_INSIGHTS]:`## Operational Insights 1185`,[this.SECTION_TYPES.STRATEGIC_RECOMMENDATIONS]:`## Strategic Recommendations 1186`,[this.SECTION_TYPES.RISK_ASSESSMENT]:`## Risk Assessment 1187`,[this.SECTION_TYPES.MARKET_ANALYSIS]:`## Market Analysis 1188`,[this.SECTION_TYPES.VARIANCE_ANALYSIS]:`## Variance Analysis 1189`}[t]||`## New Section 1190`}}P_.SECTION_TYPES={EXECUTIVE_SUMMARY:"executive_summary",FINANCIAL_PERFORMANCE:"financial_performance",OCCUPANCY_LEASING:"occupancy_leasing",OPERATIONAL_INSIGHTS:"operational_insights",STRATEGIC_RECOMMENDATIONS:"strategic_recommendations",RISK_ASSESSMENT:"risk_assessment",MARKET_ANALYSIS:"market_analysis",VARIANCE_ANALYSIS:"variance_analysis",CONCLUSION:"conclusion",UNKNOWN:"unknown"};P_.STANDARD_NAMES={executive_summary:"EXECUTIVE SUMMARY",financial_performance:"FINANCIAL PERFORMANCE",occupancy_leasing:"OCCUPANCY & LEASING",operational_insights:"OPERATIONAL INSIGHTS",strategic_recommendations:"STRATEGIC RECOMMENDATIONS",risk_assessment:"RISK ASSESSMENT",market_analysis:"MARKET ANALYSIS",variance_analysis:"VARIANCE ANALYSIS",conclusion:"CONCLUSION"};P_.CAMELCASE_KEYS={executive_summary:"executiveSummary",financial_performance:"financial",occupancy_leasing:"occupancy",operational_insights:"operational",strategic_recommendations:"strategic",risk_assessment:"risk",market_analysis:"market",variance_analysis:"variance",conclusion:"conclusion",unknown:"unknown"};const PIe={maxContentHeight:468,wordsPerSlide:110,maxLinesPerSlide:19,lineHeight:1.5,avgCharsPerLine:75,paragraphSpacing:16,firstSlideTolerance:2,baseFontSize:14},Vl={slide:PIe};class fI{constructor(t={}){this.WORDS_PER_SLIDE=t.wordsPerSlide||Vl.slide.wordsPerSlide,this.MAX_CONTENT_HEIGHT=t.maxContentHeight||Vl.slide.maxContentHeight,this.BASE_FONT_SIZE=t.baseFontSize||Vl.slide.baseFontSize,this.LINE_HEIGHT=t.lineHeight||Vl.slide.lineHeight,this.PARAGRAPH_SPACING=t.paragraphSpacing||Vl.slide.paragraphSpacing,this.AVG_CHARS_PER_LINE=t.avgCharsPerLine||Vl.slide.avgCharsPerLine,this.HEIGHT_SAFETY_MARGIN=t.heightSafetyMargin||.25,this.INTER_FONT_WIDTH_FACTOR=t.interFontWidthFactor||.88,this.LIST_ITEM_OVERHEAD=t.listItemOverhead||10}splitContent(t,r=null){if(!t)return[];const n=r||this.WORDS_PER_SLIDE,a=this.MAX_CONTENT_HEIGHT*(1-this.HEIGHT_SAFETY_MARGIN),i=[],s=t.split(/\n\n+/);let l=[],c=0;for(const u of s){const d=u.trim();if(!d)continue;const f=d.split(/\s+/).length;if(this.isListContent(d)){const m=l.concat([d]).join(` 1191 1192`),x=this.calculateContentHeight(m);(c+f>n||x>a)&&l.length>0?(i.push(l.join(` 1193 1194`)),l=[d],c=f):(l.push(d),c+=f)}else{const m=l.concat([d]).join(` 1195 1196`),x=this.calculateContentHeight(m);if((c+f>n||x>a)&&l.length>0)if(f>n){l.length>0&&(i.push(l.join(` 1197 1198`)),l=[],c=0);const y=this.splitBySentences(d,n,a);if(i.push(...y.slice(0,-1)),y.length>0){const v=y[y.length-1];l=[v],c=v.split(/\s+/).length}}else i.push(l.join(` 1199 1200`)),l=[d],c=f;else l.push(d),c+=f}}return l.length>0&&i.push(l.join(` 1201 1202`)),i}splitBySentences(t,r,n){const a=t.match(/[^.!?]+[.!?]+/g)||[t],i=[];let s=[],l=0;const c=n;for(const u of a){const d=u.trim().split(/\s+/).length,f=s.concat([u.trim()]).join(" "),p=this.calculateContentHeight(f);(l+d>r||p>c)&&s.length>0?(i.push(s.join(" ")),s=[u.trim()],l=d):(s.push(u.trim()),l+=d)}return s.length>0&&i.push(s.join(" ")),i}isListContent(t){return/^[*\-â¢\d.]\s/.test(t)||t.split(` 1203`).every(r=>/^[*\-â¢\d.]\s/.test(r.trim()))}calculateContentHeight(t,r=this.BASE_FONT_SIZE){if(!t)return 0;const n=t.split(/\n\n+/);let a=0;for(const i of n){if(!i.trim())continue;const s=i.length*this.INTER_FONT_WIDTH_FACTOR;let l=Math.ceil(s/this.AVG_CHARS_PER_LINE);if(this.isListContent(i)){const d=i.split(` 1204`).filter(f=>f.trim());l=Math.max(l,d.length),a+=d.length*this.LIST_ITEM_OVERHEAD}const c=r*1.333,u=l*(c*this.LINE_HEIGHT);a+=u,n.indexOf(i)<n.length-1&&(a+=this.PARAGRAPH_SPACING)}return a>this.MAX_CONTENT_HEIGHT*.7&&console.warn(`[ContentSplitter] Height approaching limit: ${Math.round(a)}px (effective limit with 25% margin: ${Math.round(this.MAX_CONTENT_HEIGHT*.75)}
1204px)`),a}truncateText(t,r){if(!t)return"";const n=t.split(/\s+/);return n.length<=r?t:n.slice(0,r).join(" ")+"..."}}new fI;class vQ{constructor(t={}){this.MAX_LINES_PER_SLIDE=t.maxLinesPerSlide||19,this.AVG_CHARS_PER_LINE=t.avgCharsPerLine||70,this.PARAGRAPH_SPACING_LINES=t.paragraphSpacingLines||1,this.HEADER_LINES=t.headerLines||2.5}countLines(t){if(!t)return 0;let r=0;const n=t.split(/\n\n+/);for(let a=0;a<n.length;a++){const i=n[a].trim();i&&(this.isListContent(i)?r+=this.countListLines(i):r+=this.countParagraphLines(i),a<n.length-1&&(r+=this.PARAGRAPH_SPACING_LINES))}return r}countParagraphLines(t){if(!t)return 0;const r=t.split(` 1205`);let n=0;for(const a of r)n+=this.estimateWrappedLines(a);return console.log("[LineCounter] Counted paragraph lines:",{preview:t.substring(0,50)+"...",charCount:t.length,explicitLines:r.length,wrappedLines:n,avgCharsPerLine:this.AVG_CHARS_PER_LINE}),n}countListLines(t){const r=t.split(` 1206`).filter(a=>a.trim());let n=0;for(const a of r)n+=Math.max(1,this.estimateWrappedLines(a));return n}estimateWrappedLines(t){if(!t)return 0;const r=this.cleanText(t),n=this.calculateEffectiveLength(r);return Math.ceil(n/this.AVG_CHARS_PER_LINE)}cleanText(t){return t.replace(/<[^>]*>/g,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\d+\.\s+/,"").replace(/^[*\-â¢]\s+/,"").trim()}calculateEffectiveLength(t){let r=t.length;const n=(t.match(/\d/g)||[]).length,a=(t.match(/[.,;:!?]/g)||[]).length;r-=n*.2,r-=a*.3;const i=(t.match(/[A-Z]/g)||[]).length;return r+=i*.1,Math.ceil(r)}isListContent(t){return/^[*\-â¢\d.]\s/.test(t)||t.split(` 1207`).every(r=>/^[*\-â¢\d.]\s/.test(r.trim())||!r.trim())}getAvailableLinesPerSlide(t=!1){let r=this.MAX_LINES_PER_SLIDE;return t&&(r-=this.HEADER_LINES),r}willFit(t,r=0,n=null){const a=this.countLines(t),i=n||this.MAX_LINES_PER_SLIDE;return r+a<=i}}new vQ;class bQ extends fI{constructor(t={}){super(t),this.lineCounter=new vQ({maxLinesPerSlide:t.maxLinesPerSlide||Vl.slide.maxLinesPerSlide,avgCharsPerLine:t.avgCharsPerLine||Vl.slide.avgCharsPerLine,paragraphSpacingLines:t.paragraphSpacingLines||1,headerLines:t.headerLines||2.5}),this.headerStrategy=t.headerStrategy||"first-slide-only",this.firstSlideTolerance=t.firstSlideTolerance!==void 0?t.firstSlideTolerance:Vl.slide.firstSlideTolerance}splitContent(t,r={}){if(!t)return[];const n=[],a=t.split(/\n\n+/);let i=[],s=0,l=!0,c=this.lineCounter.getAvailableLinesPerSlide(l&&this.headerStrategy==="first-slide-only");console.log("[LineLimitedContentSplitter] Starting split:",{totalParagraphs:a.length,firstSlideMaxLines:c,headerStrategy:this.headerStrategy,config:{maxLinesPerSlide:this.lineCounter.MAX_LINES_PER_SLIDE,headerLines:this.lineCounter.HEADER_LINES,avgCharsPerLine:this.lineCounter.AVG_CHARS_PER_LINE,firstSlideTolerance:this.firstSlideTolerance}});for(const u of a){const d=u.trim();if(!d)continue;const f=this.lineCounter.countParagraphLines(d),p=this.lineCounter.isListContent(d),x=a.indexOf(u)<a.length-1?this.lineCounter.PARAGRAPH_SPACING_LINES:0,y=s+f+x;console.log("[LineLimitedContentSplitter] Processing paragraph:",{preview:d.substring(0,60)+"...",estimatedLines:f,currentLineCount:s,spacingToAdd:x,totalWithSpacing:y,maxLines:c,wouldExceed:y>c,currentChunkLength:i.length,isFirstSlide:l});const v=l?this.firstSlideTolerance:0,b=c+v;if(y>b&&i.length>0&&(console.log("[LineLimitedContentSplitter] â ï¸ SPLITTING - Would exceed limit:",{currentLines:s,paraLines:f,spacingLines:x,totalWithSpacing:y,maxLines:c,tolerance:v,effectiveMaxLines:b,chunkUtilization:`${Math.round(s/c*100)}%`}),n.push({content:i.join(` 1208 1209`),lineCount:s,isFirstSlide:l}),i=[],s=0,l=!1,c=this.lineCounter.getAvailableLinesPerSlide(!1)),p&&f>c){i.length>0&&(n.push({content:i.join(` 1210 1211`),lineCount:s,isFirstSlide:l}),i=[],s=0,l=!1,c=this.lineCounter.getAvailableLinesPerSlide(!1));const w=this.splitList(d,c);for(let S=0;S<w.length;S++)n.push({content:w[S],lineCount:this.lineCounter.countLines(w[S]),isFirstSlide:!1,isContinuation:S>0})}else if(f>c){i.length>0&&(n.push({content:i.join(` 1212 1213`),lineCount:s,isFirstSlide:l}),i=[],s=0,l=!1,c=this.lineCounter.getAvailableLinesPerSlide(!1));const w=this.splitParagraphByLines(d,c);for(let S=0;S<w.length;S++)n.push({content:w[S],lineCount:this.lineCounter.countLines(w[S]),isFirstSlide:!1,isContinuation:S>0})}else i.push(d),s+=f,a.indexOf(u)<a.length-1&&(s+=this.lineCounter.PARAGRAPH_SPACING_LINES),console.log("[LineLimitedContentSplitter] â Added paragraph to chunk:",{newTotal:s,maxLines:c,utilization:`${Math.round(s/c*100)}%`,paragraphsInChunk:i.length})}return i.length>0&&n.push({content:i.join(` 1214 1215`),lineCount:s,isFirstSlide:l}),console.log("[LineLimitedContentSplitter] â Split complete:",{totalChunks:n.length,chunkDetails:n.map((u,d)=>{const f=u.isFirstSlide?this.lineCounter.getAvailableLinesPerSlide(!0):this.lineCounter.MAX_LINES_PER_SLIDE,p=u.isFirstSlide?this.firstSlideTolerance:0,m=f+p;return{chunk:d+1,lines:u.lineCount,isFirstSlide:u.isFirstSlide,maxAvailable:`${f} (+${p} tolerance)`,effectiveMax:m,utilization:`${Math.round(u.lineCount/m*100)}%`,utilizationWithoutTolerance:u.isFirstSlide?`${Math.round(u.lineCount/f*100)}%`:null}})}),n}splitList(t,r){const n=t.split(` 1216`).filter(l=>l.trim()),a=[];let i=[],s=0;for(const l of n){const c=this.lineCounter.estimateWrappedLines(l);s+c>r&&i.length>0?(a.push(i.join(` 1217`)),i=[l],s=c):(i.push(l),s+=c)}return i.length>0&&a.push(i.join(` 1218`)),a}splitParagraphByLines(t,r){const n=t.match(/[^.!?]+[.!?]+/g)||[t],a=[];let i=[],s=0;for(const l of n){const c=this.lineCounter.estimateWrappedLines(l.trim());s+c>r&&i.length>0?(a.push(i.join(" ")),i=[l.trim()],s=c):(i.push(l.trim()),s+=c)}return i.length>0&&a.push(i.join(" ")),a}validateContentFit(t,r=null){const n=this.lineCounter.countLines(t),a=r||this.lineCounter.MAX_LINES_PER_SLIDE;return n<=a}}
1218new bQ;class vh{static applyHeaders(t,r,n=this.FIRST_SLIDE_ONLY){if(!t||t.length===0)return t;switch(n){case this.FIRST_SLIDE_ONLY:return this.applyFirstSlideOnly(t,r);case this.ALL_SLIDES:return this.applyAllSlides(t,r);case this.NO_HEADERS:return this.applyNoHeaders(t);case this.CONTINUATION_INDICATOR:return this.applyContinuationIndicator(t,r);default:return this.applyFirstSlideOnly(t,r)}}static applyFirstSlideOnly(t,r){return t.map((n,a)=>({...n,content:{...n.content,title:r,showHeader:a===0,sectionStart:a===0,sectionName:r}}))}static applyAllSlides(t,r){return t.map(n=>({...n,content:{...n.content,title:r,showHeader:!0,sectionName:r}}))}static applyNoHeaders(t){return t.map(r=>({...r,content:{...r.content,title:null,showHeader:!1,sectionName:null}}))}static applyContinuationIndicator(t,r){return t.map((n,a)=>{const i=a===0,s=i?r:`${r} (cont.)`;return{...n,content:{...n.content,title:s,showHeader:!0,sectionStart:i,sectionName:r,isContinuation:!i}}})}static shouldShowHeader(t,r=null){var n,a,i;return(n=t.content)!=null&&n.sectionStart?!0:((a=r==null?void 0:r.content)==null?void 0:a.sectionName)!==((i=t.content)==null?void 0:i.sectionName)}static cleanupTitles(t){let r=null;return t.map((n,a)=>{var l;const i=(l=n.content)==null?void 0:l.sectionName,s=i!==r;return r=i,{...n,content:{...n.content,showHeader:s,sectionStart:s}}})}static addSectionPageNumbers(t){const r=t.length;return r<=1?t:t.map((n,a)=>({...n,content:{...n.content,pageNumber:{current:a+1,total:r,display:`${a+1} of ${r}`}}}))}}Wn(vh,"FIRST_SLIDE_ONLY","first-slide-only"),Wn(vh,"ALL_SLIDES","all-slides"),Wn(vh,"NO_HEADERS","no-headers"),Wn(vh,"CONTINUATION_INDICATOR","continuation-indicator");const Go=(e,t=null)=>e==="title"&&typeof t=="number"?`slide-${t}`:e==="metrics"&&t?`slide-metrics-${t}`:t!=null?`slide-${Date.now()}-${e}-${t}`:`slide-${Date.now()}-${e}`,ja={TITLE:"title",NARRATIVE:"narrative",CHART:"chart",DATA:"data"},oh={CHART_INSIGHTS:"chart-insights"},t8={quarterly:{includeTitle:!0,includeExecutiveSummary:!0,includeFinancialMetrics:!0,includeOperational:!0,includeOccupancy:!0,includeVariance:!0,includeCharts:!0,includeNarratives:!0,includeConclusion:!0},monthly:{includeTitle:!0,includeExecutiveSummary:!0,includeFinancialMetrics:!0,includeOperational:!1,includeOccupancy:!1,includeVariance:!0,includeCharts:!0,includeNarratives:!1,includeConclusion:!0},executive:{includeTitle:!0,includeExecutiveSummary:!0,includeFinancialMetrics:!0,includeOperational:!0,includeOccupancy:!0,includeVariance:!1,includeCharts:!0,includeNarratives:!1,includeConclusion:!0},detailed:{includeTitle:!0,includeExecutiveSummary:!0,includeFinancialMetrics:!0,includeOperational:!0,includeOccupancy:!0,includeVariance:!0,includeCharts:!0,includeNarratives:!0,includeConclusion:!0}},r8=e=>t8[e]||t8.quarterly,ra={LINE:"line",AREA:"area",STACKED_AREA:"stacked_area",DUAL_AXIS:"dual_axis"},jd={"noi-metrics":{chartType:ra.DUAL_AXIS,title:"NOI, Occupancy & Expense Ratio",height:"h-[600px]",leftAxis:{formatter:Be,formatType:"currency",domain:[e=>e*.2,e=>e*2.5],label:"NOI ($)"},rightAxis:{formatter:pr,formatType:"percentage",domain:[0,100],label:"Percentage (%)"},dataKeys:[{key:"noi",axis:"left",name:"NOI",formatType:"currency"},{key:"expenseRatio",axis:"right",name:"Expense Ratio",formatType:"percentage"},{key:"occupancy",axis:"right",name:"Occupancy",formatType:"percentage"}],showGradients:!0,allowToggle:!1,noWrapper:!0},"noi-summary":{chartType:ra.DUAL_AXIS,title:"NOI, Occupancy & Expense Ratio",height:"h-48",leftAxis:{formatter:Be,formatType:"currency",domain:[e=>e*.8,e=>e*1.2]},rightAxis:{formatter:pr,formatType:"percentage",domain:[0,100]},dataKeys:[{key:"noi",axis:"left",name:"NOI",formatType:"currency"},{key:"expenseRatio",axis:"right",name:"Expense Ratio",formatType:"percentage"},{key:"occupancy",axis:"right",name:"Occupancy",formatType:"percentage"}],showGradients:!0,allowToggle:!1,noWrapper:!0},utilities:{chartType:ra.LINE,title:"Utilities Expense Trend",height:"h-[600px]",leftAxis:{formatter:Be,formatType:"currency",domain:[e=>e*.9,e=>e*1.1],label:"Monthly Utilities Cost"},showGradients:!0,allowToggle:!0,toggleOptions:[ra.LINE,ra.STACKED_AREA],noWrapper:!0,xAxisKey:"month"},"expense-category":{chartType:ra.LINE,height:"h-[600px]",leftAxis:{formatter:Be,formatType:"currency",domain:[0,e=>e*1.25],label:"Monthly Expense"},showGradients:!0,allowToggle:!0,toggleOptions:[ra.LINE,ra.STACKED_AREA],noWrapper:!0},"revenue-streams":{chartType:ra.STACKED_AREA,title:"Revenue Breakdown",height:"h-96",leftAxis:{formatter:Be,formatType:"currency",domain:["auto","auto"],label:"Revenue ($)"},showGradients:!0,allowToggle:!0,toggleOptions:[ra.LINE,ra.STACKED_AREA],noWrapper:!0},"dscr-revenue":{chartType:ra.DUAL_AXIS,title:"DSCR & Total Revenue",height:"h-[500px]",leftAxis:{formatter:jke,formatType:"ratio",domain:[0,e=>e*1.5],label:"Debt Service Coverage Ratio"},rightAxis:{formatter:Be,formatType:"currency",domain:[e=>e*.2,e=>e*2.5],label:"Monthly Revenue"},dataKeys:[{key:"dscr",axis:"left",name:"DSCR",formatType:"ratio"},{key:"revenue",axis:"right",name:"Total Revenue",formatType:"currency"}],showGradients:!0,allowToggle:!1,alertThreshold:{key:"dscr",value:1,type:"below"},noWrapper:!0},"average-rent":{chartType:ra.DUAL_AXIS,title:"Average Rent & Occupancy Trends",height:"h-[500px]",leftAxis:{formatter:Be,formatType:"currency",domain:[e=>e*.9,e=>e*1.1],label:"Average Rent ($)"},rightAxis:{formatter:pr,formatType:"percentage",domain:[0,100],label:"Occupancy Rate (%)"},dataKeys:[{key:"average_rent",axis:"left",name:"Average Rent",color:"accent",formatType:"currency"},{key:"occupancy",axis:"right",name:"Occupancy Rate",color:"success",formatType:"percentage"}],showGradients:!0,allowToggle:!1,noWrapper:!0}},RIe={series:["#FBBF24","#8B5CF6","#10B981","#F59E0B","#3B82F6","#EF4444","#EC4899","#6366F1"],metrics:{adjustments:"#EF4444"},ui:{axis:"#9CA3AF"}},IIe={fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontSize:{axis:11,legend:14},fontColor:{axis:"#9CA3AF",legend:"#F3F4F6"}},FIe={strokeDasharray:"3 3",color:"rgba(55, 65, 81, 0.3)"}
1218,hl={colors:RIe,typography:IIe,grid:FIe},ht=hl.colors.series,MIe=hl.colors.metrics,n8={default:{top:20,right:20,bottom:50,left:20},withRotatedLabels:{top:20,right:20,bottom:80,left:20}},fo={tick:{fontSize:hl.typography.fontSize.axis,fill:hl.typography.fontColor.axis,fontFamily:"JetBrains Mono"},stroke:hl.colors.ui.axis},Ad={strokeDasharray:hl.grid.strokeDasharray,stroke:hl.grid.color},ud={color:hl.typography.fontColor.legend,fontSize:hl.typography.fontSize.legend,fontFamily:hl.typography.fontFamily},xa={default:{innerRadius:75,outerRadius:120}},DIe={preferredLayouts:[{name:"trendWithTwoDonuts",match:{trends:1,pies:2},priority:1,description:"One trend chart with two pie charts below"},{name:"twoTrendsStacked",match:{trends:2},priority:2,description:"Two trend charts stacked vertically"},{name:"twoLargeDonuts",match:{pies:2},priority:3,description:"Two large pie charts side by side"},{name:"fourDonutsGrid",match:{pies:4},priority:4,description:"2x2 grid of pie charts"},{name:"singleTrend",match:{trends:1},priority:5,description:"Single trend chart"},{name:"singleDonut",match:{pies:1},priority:6,description:"Single pie/donut chart"}]},LIe={expiring:"#f59e0b",rent:"#10b981",occupancy:"#f59e0b",gradients:{rent:{start:{color:"#10b981",opacity:.8},end:{color:"#10b981",opacity:.3}},occupancy:{start:{color:"#f59e0b",opacity:.8},end:{color:"#f59e0b",opacity:.3}},expiring:{start:{color:"#f59e0b",opacity:.8},end:{color:"#f59e0b",opacity:.3}}}},$Ie={statusPie:{dataKey:"value",innerRadius:60,outerRadius:110,paddingAngle:2,cornerRadius:4},leaseExpiration:{height:320},rentTrends:{height:320,compactHeight:300}},BIe={container:{backgroundColor:"rgba(15, 23, 42, 0.95)",border:"1px solid rgba(255, 200, 87, 0.3)",borderRadius:"8px",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.5)",padding:"12px"},label:{color:"#FFC857",fontWeight:"600",marginBottom:"4px",fontFamily:"Inter, sans-serif"},item:{color:"#E5E7EB",fontFamily:"JetBrains Mono, monospace"}},wQ={colors:LIe,chartTypes:$Ie,tooltipStyles:BIe};class UIe{constructor(t={}){this.parser=P_,this.metricsService=uu,this.contentSplitter=t.useLineLimits!==!1?new bQ(t):new fI,this.headerStrategy=t.headerStrategy||vh.FIRST_SLIDE_ONLY}async map(t,r={},n="quarterly",a=null){var d,f,p,m,x;if(!t||t.length===0)return this.createEmptySlides(r);if(!t)return this.createEmptySlides(r);const i=this.parser.parseToStandardFormat(t);let s={},l={};if(a){const y={metrics:Array.isArray(a.monthlyTrends)?a.monthlyTrends:((d=a.monthlyTrends)==null?void 0:d.metrics)||[]},v={};Array.isArray((f=a.categoryBreakdown)==null?void 0:f.expenses)&&a.categoryBreakdown.expenses.forEach(b=>{b.name&&b.value>0&&(v[b.name]=b.value)}),s={monthlyTrends:y,breakdowns:{operatingExpenses:v,income:((p=a.categoryBreakdown)==null?void 0:p.revenue)||[],...a.breakdowns||{}},utilities:a.utilitiesTrends||{},expenseTrends:a.expenseTrends||{},occupancyMetrics:((m=a.kpiMetrics)==null?void 0:m.occupancy)||{},rentRoll:a.rentRoll||[],metrics:a.metricsData||[],categoryBreakdown:a.categoryBreakdown},l=a}else{const y=uu.extractPropertyId(r);if(!y){const v=r8(n);return this.createSlides(i,{},r,v)}try{l=await this.metricsService.getSummaryMetrics(y),s=l}catch(v){console.error("[SlideMapper] Error fetching metrics:",v),s={}}}const c={...s,metrics:((x=s.breakdowns)==null?void 0:x.metrics)||s.metrics,monthlyTrends:s.monthlyTrends,breakdowns:s.breakdowns,utilities:s.utilities,summaryData:l,narrativeSections:i,categoryBreakdown:s.categoryBreakdown},u=r8(n);return this.createSlides(i,c,r,u)}createSlides(t,r,n,a){var l,c,u,d,f,p,m,x,y,v,b;const i={narrative:t,metricsData:r,metadata:n,strategy:a};if(a.includeExecutiveSummary&&t.executiveSummary){const w=this.createNarrativeSlides("Executive Summary",t.executiveSummary,"executive-summary");i.executiveSummaryChunks=w.map(S=>({title:S.content.title,content:S.content.content,pageNumber:S.content.pageNumber,showHeader:S.content.showHeader,sectionStart:S.content.sectionStart,sectionName:S.content.sectionName}))}if(a.includeOccupancy&&t.occupancy){const w=[];w.push({id:Go(ja.DATA,"occupancy"),title:"Occupancy Analysis",narrative:t.occupancy?this.contentSplitter.truncateText(t.occupancy,50):null,visualizations:[{type:"kpis",data:r.occupancyMetrics},{type:"statusChart",data:r.rentRoll},{type:"leaseExpiration",data:r.rentRoll},{type:"rentTrends",data:r.monthlyTrends}],kpis:r.occupancyMetrics,displayMode:"full",data:{rentRoll:r.rentRoll,metrics:r.occupancyMetrics,propertyId:n.propertyId,timeframe:n.dateRange},pdfData:{metrics:r.occupancyMetrics,rentRollSummary:(l=r.rentRoll)==null?void 0:l.slice(0,10)}}),i.occupancyConfigs=w}if(a.includeCharts&&r){const w=[],S=uu.extractPropertyId(n),j={...r,property_id:S,propertyId:S,property:{id:S},timeframe:{start:((c=n.dateRange)==null?void 0:c.start)||((u=n.dateRange)==null?void 0:u.startDate),end:((d=n.dateRange)==null?void 0:d.end)||((f=n.dateRange)==null?void 0:f.endDate)}};(p=r.monthlyTrends)!=null&&p.metrics&&r.monthlyTrends.metrics.length>
12180&&w.push({id:Go(ja.CHART,"trends"),templateType:oh.CHART,content:{title:"Financial Trends",type:"trend",data:j,options:{preset:"noi-metrics"},description:"Monthly financial performance metrics",pdfData:{processedData:r.monthlyTrends.metrics,chartConfig:{type:"line",colors:ht,dataKeys:((m=jd["noi-metrics"].dataKeys)==null?void 0:m.map(E=>({key:E.key,axis:E.axis,name:E.name,formatType:E.formatType})))||["noi","expenseRatio","occupancy"],xAxisKey:"month_year"}}}});const k=((x=r.categoryBreakdown)==null?void 0:x.expenses)||((y=r.breakdowns)==null?void 0:y.operatingExpenses);if(k&&Object.keys(k).length>0){const E=Array.isArray(k)?k:Object.entries(k).map(([T,O])=>({name:T,value:O,color:ht[Object.keys(k).indexOf(T)%ht.length]}));w.push({id:Go(ja.CHART,"expense"),templateType:oh.CHART_INSIGHTS,content:{title:"Expense Breakdown",type:"expenseBreakdown",data:j,options:{printMode:!0},description:"Operating expenses by category",pdfData:{processedData:E,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(v=xa.default)==null?void 0:v.innerRadius,outerRadius:(b=xa.default)==null?void 0:b.outerRadius}}}})}i.chartConfigs=w}if(a.includeNarratives){const w=this.extractAdditionalNarratives(t),S=[];for(const[j,k]of Object.entries(w)){const E=this.createNarrativeSlides(j,k,"narrative");S.push(...E.map(T=>({title:T.content.title,content:T.content.content,pageNumber:T.content.pageNumber,slideClass:"narrative",showHeader:T.content.showHeader,sectionStart:T.content.sectionStart,sectionName:T.content.sectionName})))}i.narrativeChunks=S}if(a.includeConclusion&&(t.conclusion||t.outlook)){const w=this.createNarrativeSlides("Conclusion & Outlook",t.conclusion||t.outlook,"conclusion");i.conclusionChunks=w.map(S=>({title:S.content.title,content:S.content.content,pageNumber:S.content.pageNumber,showHeader:S.content.showHeader,sectionStart:S.content.sectionStart,sectionName:S.content.sectionName}))}return this.assembleSlides(i,r,n,a)}assembleSlides(t,r,n,a){const i=[];if(a.includeTitle&&i.push({id:Go(ja.TITLE,0),type:ja.TITLE,class:"title",content:{property:n.property,dateRange:n.dateRange,reportType:n.reportType||"Property Report",generatedDate:new Date().toISOString()}}),a.includeExecutiveSummary&&t.executiveSummaryChunks&&i.push(...this.convertChunksToSlides(t.executiveSummaryChunks,"executive-summary")),a.includeFinancialMetrics){if(t.narrative.financial){const s=this.createNarrativeSlides("Financial Performance",t.narrative.financial,"narrative");i.push(...s)}if(a.includeCharts&&r){const s=this.buildAllChartSpecs(r,n),l=this.groupChartsBySection(s);if(l.financial&&l.financial.length>0){const c=this.groupChartsForLayout(l.financial);for(const u of c)i.push({id:Go(ja.CHART,`financial-${i.length}`),type:ja.CHART,class:"chart",templateType:oh.CHART,content:{title:u.charts.length===1?u.charts[0].title:"Financial Metrics",layout:u.layout,charts:u.charts,sectionName:"Financial Performance"}})}}}if(a.includeOperational){if(t.narrative.operational){const s=this.createNarrativeSlides("Operational Metrics",t.narrative.operational,"narrative");i.push(...s)}if(a.includeCharts&&r){const s=this.buildAllChartSpecs(r,n),l=this.groupChartsBySection(s);if(l.operational&&l.operational.length>0){const c=this.groupChartsForLayout(l.operational);for(const u of c)i.push({id:Go(ja.CHART,`operational-${i.length}`),type:ja.CHART,class:"chart",templateType:oh.CHART,content:{title:u.charts.length===1?u.charts[0].title:"Operational Metrics",layout:u.layout,charts:u.charts,sectionName:"Operational Metrics"}})}}}if(a.includeOccupancy){if(t.narrative.occupancy){const s=this.createNarrativeSlides("Occupancy Analysis",t.narrative.occupancy,"narrative");i.push(...s)}if(a.includeCharts&&r){const s=this.buildAllChartSpecs(r,n),l=this.groupChartsBySection(s);if(l.occupancy&&l.occupancy.length>0){const c=this.groupChartsForLayout(l.occupancy);for(const u of c)i.push({id:Go(ja.CHART,`occupancy-${i.length}`),type:ja.CHART,class:"chart",templateType:oh.CHART,content:{title:u.charts.length===1?u.charts[0].title:"Occupancy Metrics",layout:u.layout,charts:u.charts,sectionName:"Occupancy Analysis"}})}}}if(a.includeVariance){if(t.narrative.variance){const s=this.createNarrativeSlides("Variance Analysis",t.narrative.variance,"narrative");i.push(...s)}if(a.includeCharts&&r){const s=this.buildAllChartSpecs(r,n),l=this.groupChartsBySection(s);if(l.variance&&l.variance.length>0){const c=this.groupChartsForLayout(l.variance);
1218for(const u of c)i.push({id:Go(ja.CHART,`variance-${i.length}`),type:ja.CHART,class:"chart",templateType:oh.CHART,content:{title:u.charts.length===1?u.charts[0].title:"Variance Metrics",layout:u.layout,charts:u.charts,sectionName:"Variance Analysis"}})}}}return a.includeNarratives&&t.narrativeChunks&&i.push(...this.convertChunksToSlides(t.narrativeChunks,"narrative")),a.includeConclusion&&t.conclusionChunks&&i.push(...this.convertChunksToSlides(t.conclusionChunks,"conclusion")),i}convertChunksToSlides(t,r){return t.map((n,a)=>({id:Go(ja.NARRATIVE,`${r}-${a}`),type:ja.NARRATIVE,class:r,content:{title:n.title,content:n.content,hasOverflow:!1,pageNumber:n.pageNumber,showHeader:n.showHeader,sectionStart:n.sectionStart,sectionName:n.sectionName||n.title}}))}createNarrativeSlides(t,r,n="narrative"){const a=[],i=typeof r=="string"?r:(r==null?void 0:r.text)||(r==null?void 0:r.content)||String(r||"");if(!i)return a;const s=this.contentSplitter.splitContent(i),l=s.map((u,d)=>{const f=typeof u=="string"?u:u.content,p=typeof u=="object"?u.isFirstSlide:d===0;return{id:Go(ja.NARRATIVE,d),type:ja.NARRATIVE,class:n,content:{title:t,content:f,hasOverflow:!1,pageNumber:s.length>1?{current:d+1,total:s.length}:null,sectionStart:p,sectionName:t}}});return vh.applyHeaders(l,t,this.headerStrategy)}extractAdditionalNarratives(t){const r=["executiveSummary","financial","operational","occupancy","variance","conclusion","outlook"],n={};for(const[a,i]of Object.entries(t))!r.includes(a)&&i&&(n[a]=i);return n}createEmptySlides(t){return[{id:"slide-1",type:"title",content:{property:t.property,dateRange:t.dateRange,reportType:"Report",generatedDate:new Date().toISOString()}},{id:"slide-2",type:"narrative",content:{title:"No Data Available",content:"No analysis data is available for this report. Please generate an analysis first.",hasOverflow:!1}}]}getTemplateTypeForSlide(t){if(t.templateType)return t.templateType;const{type:r,class:n}=t;if(r==="title")return"title";if(r==="narrative")return n==="executive-summary"?"executive-summary":"narrative";if(r==="chart"){const a=t.content||{};return a.charts&&a.charts.length>1?"two-charts":"chart-insights"}return r==="data"||n==="financial-metrics"?"metrics-grid":r==="composite"&&n==="variance"?"variance-analysis":"narrative"}buildAllChartSpecs(t,r){var l,c,u,d,f,p,m,x,y,v,b,w,S,j,k,E,T,O,A,P,I,R,M,L,U,W,V,G,K,F,ne,H,B,X,Y,ae,fe,ue,oe,Z,ce,q,xe,pe,Se,he,ie,we,ke,Oe,Ue,Je,Ze,te;const n=[];uu.extractPropertyId(r),{...t,timeframe:((l=r.dateRange)!=null&&l.start||((c=r.dateRange)==null||c.startDate),(u=r.dateRange)!=null&&u.end||((d=r.dateRange)==null||d.endDate))},(f=t.monthlyTrends)!=null&&f.metrics&&t.monthlyTrends.metrics.length>0&&n.push({chartType:"trend",title:"Financial Trends",category:"operational",pdfData:{processedData:t.monthlyTrends.metrics,chartConfig:{type:"line",colors:ht,dataKeys:((p=jd["noi-metrics"].dataKeys)==null?void 0:p.map(ve=>({key:ve.key,axis:ve.axis,name:ve.name,formatType:ve.formatType})))||["noi","expenseRatio","occupancy"],xAxisKey:"month_year"}}}),(m=t.monthlyTrends)!=null&&m.metrics&&t.monthlyTrends.metrics.length>0&&n.push({chartType:"trend",title:"DSCR & Total Revenue",category:"operational",pdfData:{processedData:t.monthlyTrends.metrics,chartConfig:{type:"line",colors:ht,dataKeys:((y=(x=jd["dscr-revenue"])==null?void 0:x.dataKeys)==null?void 0:y.map(ve=>({key:ve.key,axis:ve.axis,name:ve.name,formatType:ve.formatType})))||[{key:"dscr",name:"DSCR",axis:"left"},{key:"revenue",name:"Total Revenue",axis:"right"}],xAxisKey:"month_year"}}}),(v=t.monthlyTrends)!=null&&v.metrics&&t.monthlyTrends.metrics.length>0&&n.push({chartType:"trend",title:"Average Rent & Occupancy Trends",category:"occupancy",pdfData:{processedData:t.monthlyTrends.metrics,chartConfig:{type:"line",colors:ht,dataKeys:((w=(b=jd["average-rent"])==null?void 0:b.dataKeys)==null?void 0:w.map(ve=>({key:ve.key,axis:ve.axis,name:ve.name,formatType:ve.formatType})))||[{key:"average_rent",name:"Average Rent",axis:"left"},{key:"occupancy",name:"Occupancy Rate",axis:"right"}],xAxisKey:"month_year"}}});const a=((S=t.occupancyMetrics)==null?void 0:S.leaseStatus)||[];if(a.length>0&&n.push({chartType:"pie",title:"Lease Status Distribution",category:"occupancy",pdfData:{processedData:a,chartConfig:{type:"pie",colors:a.map(ve=>ve.color),dataKey:"value",nameKey:"name",innerRadius:(j=xa.default)==null?void 0:j.innerRadius,outerRadius:(k=xa.default)==null?void 0:k.outerRadius}}}),t.rentRoll&&Array.isArray(t.rentRoll)&&t.rentRoll.length>0){const ve={},J=new Date,me=new Date;me.setMonth(me.getMonth()+12),t.rentRoll.forEach(Me=>{if(!Me.lease_end)return;const Ae=Jn(Me.lease_end);if(Ae>=J&&Ae<=me){const Ke=Ae.toLocaleDateString("en-US",{year:"numeric",month:"short"});ve[Ke]||(ve[Ke]=0),ve[Ke]++}});const Ee=Object.entries(ve).sort(([Me],[Ae])=>new Date(Me)-new Date(Ae)).map(([Me,Ae])=>({month_year:Me,expiring:Ae}));Ee.length>0&&n.push({chartType:"trend",title:"Lease Expiration Timeline",category:"occupancy",pdfData:{processedData:Ee,chartConfig:{type:"bar",colors:[wQ.colors.expiring],dataKeys:[{key:"expiring",name:"Units Expiring",axis:"left",formatType:"number"}],xAxisKey:"month_year"}}})}if((E=t.utilities)!=null&&E.data&&t.utilities.data.length>0){const ve=t.utilities.data[0],J=Object.keys(ve).filter(me=>!["month","month_year","total","total_utilities"].includes(me));J.length>0&&n.push({chartType:"trend",title:"Utilities Expense Trend",category:"variance",pdfData:{processedData:t.utilities.data,chartConfig:{type:"line",colors:ht,dataKeys:J.map(me=>({key:me,axis:"left",name:me.charAt(0).toUpperCase()+me.slice(1).replace(/_/g," ")})),xAxisKey:"month_year"}}})}if((O=(T=t.expenseTrends)==null?void 0:T.repairMaintenance)!=null&&O.metrics&&t.expenseTrends.repairMaintenance.metrics.length>0){const ve=new Set;t.expenseTrends.repairMaintenance.metrics.forEach(me=>{Object.keys(me).forEach(Ee=>{["month","month_year","total","total_repairMaintenance"].includes(Ee)||ve.add(Ee)})});const J=Array.from(ve);J.length>0&&n.push({chartType:"trend",title:"Repair & Maintenance Expense Trend",category:"variance",forceLayout:"singleTrend",pdfData:{processedData:t.expenseTrends.repairMaintenance.metrics,chartConfig:{type:"line",colors:ht,dataKeys:J.map(me=>({key:me,axis:"left",name:me.charAt(0).toUpperCase()+me.slice(1).replace(/_/g," ")})),xAxisKey:"month_year"}}})}if((P=(A=t.expenseTrends)==null?void 0:A.generalAdmin)!=null&&P.metrics&&t.expenseTrends.generalAdmin.metrics.length>0){const ve=new Set;t.expenseTrends.generalAdmin.metrics.forEach(me=>{Object.keys(me).forEach(Ee=>{["month","month_year","total","total_generalAdmin"].includes(Ee)||ve.add(Ee)})});const J=Array.from(ve);J.length>0&&n.push({chartType:"trend",title:"General & Admin Expense Trend",category:"variance",pdfData:{processedData:t.expenseTrends.generalAdmin.metrics,chartConfig:{type:"line",colors:ht,dataKeys:J.map(me=>({key:me,axis:"left",name:me.charAt(0).toUpperCase()+me.slice(1).replace(/_/g," ")})),xAxisKey:"month_year"}}})}if((R=(I=t.expenseTrends)==null?void 0:I.marketing)!=null&&R.metrics&&t.expenseTrends.marketing.metrics.length>0){const ve=new Set;t.expenseTrends.marketing.metrics.forEach(me=>{Object.keys(me).forEach(Ee=>{["month","month_year","total","total_marketing"].includes(Ee)||ve.add(Ee)})});const J=Array.from(ve);J.length>0&&n.push({chartType:"trend",title:"Marketing Expense Trend",category:"variance",pdfData:{processedData:t.expenseTrends.marketing.metrics,chartConfig:{type:"line",colors:ht,dataKeys:J.map(me=>({key:me,axis:"left",name:me.charAt(0).toUpperCase()+me.slice(1).replace(/_/g," ")})),xAxisKey:"month_year"}}})}if((L=(M=t.expenseTrends)==null?void 0:M.contractServices)!=null&&L.metrics&&t.expenseTrends.contractServices.metrics.length>0){const ve=new Set;t.expenseTrends.contractServices.metrics.forEach(me=>{Object.keys(me).forEach(Ee=>{["month","month_year","total","total_contractServices"].includes(Ee)||ve.add(Ee)})});const J=Array.from(ve);J.length>0&&n.push({chartType:"trend",title:"Contract Services Expense Trend",category:"variance",pdfData:{processedData:t.expenseTrends.contractServices.metrics,chartConfig:{type:"line",colors:ht,dataKeys:J.map(me=>({key:me,axis:"left",name:me.charAt(0).toUpperCase()+me.slice(1).replace(/_/g," ")})),xAxisKey:"month_year"}}})}const i=((U=t.categoryBreakdown)==null?void 0:U.expenses)||((W=t.breakdowns)==null?void 0:W.operatingExpenses);if(i&&Object.keys(i).length>0){const ve=Array.isArray(i)?i:Object.entries(i).map(([J,me])=>({name:J,value:me,color:ht[Object.keys(i).indexOf(J)%ht.length]}));n.push({chartType:"pie",title:"Expense Breakdown",category:"financial",pdfData:{processedData:ve,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(V=xa.default)==null?void 0:V.innerRadius,outerRadius:(G=xa.default)==null?void 0:G.outerRadius}}})}const s=((K=t.categoryBreakdown)==null?void 0:K.income)||((F=t.breakdowns)==null?void 0:F.income);if(s&&Object.keys(s).length>0){const ve=Array.isArray(s)?s:Object.entries(s).map(([J,me])=>({name:J,value:me,color:ht[Object.keys(s).indexOf(J)%ht.length]}));n.push({chartType:"pie",title:"Income Breakdown",category:"financial",forceLayout:"singleDonut",pdfData:{processedData:ve,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(ne=xa.default)==null?void 0:ne.innerRadius,outerRadius:(H=xa.default)==null?void 0:H.outerRadius}}})}return(X=(B=t.categoryBreakdown)==null?void 0:B.expensesByCategory)!=null&&X.utilities&&t.categoryBreakdown.expensesByCategory.utilities.length>0&&n.push({chartType:"pie",title:"Utilities Breakdown",category:"financial",pdfData:{processedData:t.categoryBreakdown.expensesByCategory.utilities,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(Y=xa.default)==null?void 0:Y.innerRadius,outerRadius:(ae=xa.default)==null?void 0:ae.outerRadius}}}),(ue=(fe=t.categoryBreakdown)==null?void 0:fe.expensesByCategory)!=null&&ue.repairMaintenance&&t.categoryBreakdown.expensesByCategory.repairMaintenance.length>0&&n.push({chartType:"pie",title:"Repair & Maintenance Breakdown",category:"financial",pdfData:{processedData:t.categoryBreakdown.expensesByCategory.repairMaintenance,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(oe=xa.default)==null?void 0:oe.innerRadius,outerRadius:(Z=xa.default)==null?void 0:Z.outerRadius}}}),(q=(ce=t.categoryBreakdown)==null?void 0:ce.expensesByCategory)!=null&&q.generalAdmin&&t.categoryBreakdown.expensesByCategory.generalAdmin.length>0&&n.push({chartType:"pie",title:"General & Admin Breakdown",category:"occupancy",pdfData:{processedData:t.categoryBreakdown.expensesByCategory.generalAdmin,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(xe=xa.default)==null?void 0:xe.innerRadius,outerRadius:(pe=xa.default)==null?void 0:pe.outerRadius}}}),(he=(Se=t.categoryBreakdown)==null?void 0:Se.expensesByCategory)!=null&&he.marketing&&t.categoryBreakdown.expensesByCategory.marketing.length>0&&n.push({chartType:"pie",title:"Marketing Breakdown",category:"occupancy",pdfData:{processedData:t.categoryBreakdown.expensesByCategory.marketing,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(ie=xa.default)==null?void 0:ie.innerRadius,outerRadius:(we=xa.default)==null?void 0:we.outerRadius}}}),(Oe=(ke=t.categoryBreakdown)==null?void 0:ke.expensesByCategory)!=null&&Oe.contractServices&&t.categoryBreakdown.expensesByCategory.contractServices.length>0&&n.push({chartType:"pie",title:"Contract Services Breakdown",category:"financial",pdfData:{processedData:t.categoryBreakdown.expensesByCategory.contractServices,chartConfig:{type:"pie",colors:ht,dataKey:"value",nameKey:"name",innerRadius:(Ue=xa.default)==null?void 0:Ue.innerRadius,outerRadius:(Je=xa.default)==null?void 0:Je.outerRadius}}}),(Ze=t.monthlyTrends)!=null&&Ze.occupancy&&t.monthlyTrends.occupancy.length>0&&n.push({chartType:"trend",title:"Occupancy Trend",category:"occupancy",pdfData:{processedData:t.monthlyTrends.occupancy,chartConfig:{type:"line",colors:ht,dataKeys:[{key:"occupancyRate",name:"Occupancy Rate",axis:"left"}],xAxisKey:"month_year"}}}),(te=t.monthlyTrends)!=null&&te.averageRent&&t.monthlyTrends.averageRent.length>0&&n.push({chartType:"trend",title:"Average Rent Trend",category:"occupancy",pdfData:{processedData:t.monthlyTrends.averageRent,chartConfig:{type:"line",colors:ht,dataKeys:[{key:"averageRent",name:"Average Rent",axis:"left"}],xAxisKey:"month_year"}}}),t.varianceData&&t.varianceData.length>0&&n.push({chartType:"trend",title:"Budget vs Actual",category:"variance",pdfData:{processedData:t.varianceData,chartConfig:{type:"line",colors:ht,dataKeys:[{key:"budget",name:"Budget",axis:"left"},{key:"actual",name:"Actual",axis:"left"}],xAxisKey:"month_year"}}}),n}groupChartsBySection(t){const r={financial:[],operational:[],occupancy:[],variance:[]};
1218for(const n of t)r[n.category]&&r[n.category].push(n);return r}groupChartsForLayout(t){if(!t||t.length===0)return[];const r=[],n=[...t],a=[];for(let s=n.length-1;s>=0;s--)n[s].forceLayout&&a.push(n.splice(s,1)[0]);for(const s of a)r.push({layout:s.forceLayout,charts:[s]});const i=s=>{const l=s.filter(u=>u.chartType==="trend").length,c=s.filter(u=>u.chartType==="pie").length;return{trends:l,pies:c}};for(;n.length>0;){let s=!1;for(const l of DIe.preferredLayouts){const{trends:c=0,pies:u=0}=l.match,d=c+u;if(n.length<d)continue;const f=i(n);if(f.trends>=c&&f.pies>=u){const p=[];for(let m=0;m<c;m++){const x=n.findIndex(y=>y.chartType==="trend");x>=0&&p.push(n.splice(x,1)[0])}for(let m=0;m<u;m++){const x=n.findIndex(y=>y.chartType==="pie");x>=0&&p.push(n.splice(x,1)[0])}r.push({layout:l.name,charts:p}),s=!0;break}}if(!s){const l=n.shift(),c=l.chartType==="trend"?"singleTrend":"singleDonut";r.push({layout:c,charts:[l]})}}return r}}const _Q=e=>{const[t,r]=N.useState(!0),[n,a]=N.useState(null),[i,s]=N.useState({kpiMetrics:null,monthlyTrends:[],categoryBreakdown:{revenue:[],expenses:[],expensesByCategory:{}},utilitiesTrends:{data:[],items:[]},comparisonData:null,metricsData:[],expenseTrends:{}});return N.useEffect(()=>{e&&(async()=>{var c,u,d,f,p,m,x,y,v,b,w,S,j,k,E,T,O;try{r(!0),a(null);const A=((c=e==null?void 0:e.property)==null?void 0:c.id)||((u=e==null?void 0:e.metadata)==null?void 0:u.propertyId)||((d=e==null?void 0:e.analysis)==null?void 0:d.property_id)||(e==null?void 0:e.propertyId)||(e==null?void 0:e.id);if(!A)throw console.error("[useFinancialData] Could not extract property ID from:",e),new Error("No property ID available");const P=((f=e==null?void 0:e.timeframe)==null?void 0:f.start)||((p=e==null?void 0:e.dateRange)==null?void 0:p.start)||((m=e==null?void 0:e.timeframe)==null?void 0:m.startDate)||((x=e==null?void 0:e.dateRange)==null?void 0:x.startDate),I=((y=e==null?void 0:e.timeframe)==null?void 0:y.end)||((v=e==null?void 0:e.dateRange)==null?void 0:v.end)||((b=e==null?void 0:e.timeframe)==null?void 0:b.endDate)||((w=e==null?void 0:e.dateRange)==null?void 0:w.endDate),R=await oa.get(`/metrics/comprehensive/${A}`,{params:{includeBreakdowns:!0,includeTrends:!0,includeComparisons:!0,includeExpenseTrends:!0,startDate:P,endDate:I}}),M={revenue:[],expenses:[],expensesByCategory:{}};if(R.data.breakdowns){const{breakdown:K,operatingExpenses:F,belowTheLineExpenses:ne,income:H,totalExpenses:B,totalIncome:X}=R.data.breakdowns,Y=F||K;if(H){const ae=[];Object.entries(H).forEach(([fe,ue])=>{Array.isArray(ue)&&ue.forEach(oe=>{ae.push({name:oe.name||fe,value:oe.value||0,category:fe})})}),M.revenue=ae.sort((fe,ue)=>ue.value-fe.value)}if(Y){const ae=[],fe={};Object.entries(Y).forEach(([ue,oe])=>{if(Array.isArray(oe)){fe[ue]=oe;const Z=oe.reduce((ce,q)=>ce+(q.value||0),0);if(Z!==0){const ce={utilities:"Utilities",repairMaintenance:"Repairs & Maintenance",contractServices:"Contract Services",payroll:"Payroll & Benefits",managementFees:"Management Fees",generalAdmin:"General & Admin",marketing:"Marketing",taxesInsurance:"Taxes & Insurance",capitalExpenditures:"Capital Expenditures",assetManagement:"Asset Management",debt:"Debt Service",unitTurns:"Unit Turns",other:"Other Expenses"};ae.push({name:ce[ue]||ue,value:Z,category:ue})}}}),M.expenses=ae.sort((ue,oe)=>oe.value-ue.value),M.expensesByCategory=fe}ne&&Object.entries(ne).forEach(([ae,fe])=>{Array.isArray(fe)&&(M.expensesByCategory[ae]=fe)})}const L={data:[],items:[]};(S=R.data.utilities)!=null&&S.metrics&&(L.data=R.data.utilities.metrics.map(K=>{var F;return{month:K.month_year,total:K.total_utilities||0,...Object.fromEntries(((F=R.data.utilities.utilityItems)==null?void 0:F.map(ne=>[ne,K[ne]||0]))||[])}}),L.items=R.data.utilities.utilityItems||[]);let U=[];(j=R.data.monthlyTrends)!=null&&j.metrics&&(U=R.data.monthlyTrends.metrics);let W=null;if(R.data.comparisons){const{current:K,comparisons:F}=R.data.comparisons;if(K&&(F!=null&&F.yearOverYear)){const ne=F.yearOverYear;W={noi:{current:K.noi,prior:ne.metric.noi,percentChange:ne.changes.noi},income:{current:K.gross_revenue,prior:ne.metric.gross_revenue,percentChange:ne.changes.gross_revenue},expenses:{current:K.total_expenses,prior:ne.metric.total_expenses,percentChange:ne.changes.total_expenses},expenseRatio:{current:K.expense_ratio||0,prior:ne.metric.expense_ratio||0,percentChange:ne.changes.expense_ratio||0}}}}let V={noi:{value:0,change:0,positive:!0},totalIncome:{value:0,change:0,positive:!0},expenses:{value:0,change:0,positive:!0}
1218,occupancy:{value:"0%",change:0,positive:!0},dscr:{value:null,change:0,positive:!0}};if(R.data.breakdowns){const{totalIncome:K,totalExpenses:F,totalOperatingExpenses:ne,noi:H}=R.data.breakdowns;if(V={noi:{value:H,change:0,positive:!0},totalIncome:{value:K,change:0,positive:!0},expenses:{value:ne,change:0,positive:!0},occupancy:{value:"0%",change:0,positive:!0},dscr:{value:null,change:0,positive:!0}},U&&U.length>0){const B=U.find(X=>{const Y=new Date(X.month_year+" 01"),ae=new Date(P),fe=new Date(I);return Y>=ae&&Y<=fe});if(B&&B.occupancy!==null&&B.occupancy!==void 0)V.occupancy.value=`${B.occupancy.toFixed(1)}%`;else if(U.length>0){const X=U.filter(Y=>Y.occupancy!==null&&Y.occupancy!==void 0);if(X.length>0){const Y=X.reduce((ae,fe)=>ae+fe.occupancy,0)/X.length;V.occupancy.value=`${Y.toFixed(1)}%`}else V.occupancy.value="N/A"}}((E=(k=R.data.monthlyTrends)==null?void 0:k.averages)==null?void 0:E.dscr)!==null&&((O=(T=R.data.monthlyTrends)==null?void 0:T.averages)==null?void 0:O.dscr)!==void 0&&(V.dscr.value=R.data.monthlyTrends.averages.dscr)}const G=R.data.expenseTrends||{};s({kpiMetrics:V,monthlyTrends:U,categoryBreakdown:M,utilitiesTrends:L,comparisonData:W,expenseTrends:G})}catch(A){console.error("[useFinancialData] Error fetching financial data:",A),a(A.message||"Failed to load financial data")}finally{r(!1)}})()},[e]),{loading:t,error:n,...i}},a8=new UIe,zIe=({property:e,dateRange:t,analysisText:r,rawData:n,financialMetrics:a})=>{const[i,s]=N.useState(!1),[l,c]=N.useState(!1),[u,d]=N.useState(null),[f,p]=N.useState("dark"),m=N.useMemo(()=>({property:e,propertyId:(e==null?void 0:e.property_id)||(e==null?void 0:e.id)||(e==null?void 0:e._id),dateRange:t,...n}),[e,t,n]),{loading:x,error:y,kpiMetrics:v,monthlyTrends:b,categoryBreakdown:w,utilitiesTrends:S,comparisonData:j,expenseTrends:k}=_Q(m),E={kpiMetrics:v,monthlyTrends:b,categoryBreakdown:w,utilitiesTrends:S,comparisonData:j,expenseTrends:k},T=async(A,P,I,R)=>{try{const M="https://oyster-app-2hw4z.ondigitalocean.app",L=localStorage.getItem("accessToken");fetch(`${M}/api/pdf/pre-warm-charts`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:L?`Bearer ${L}`:""},body:JSON.stringify({slides:A,propertyId:(P==null?void 0:P.property_id)||(P==null?void 0:P.id)||(P==null?void 0:P._id),dateRange:I,theme:R||"dark"})}).catch(U=>{console.warn("[Pre-Warm] Chart pre-warming request failed:",U)}),console.log("[Pre-Warm] Chart pre-warming initiated")}catch(M){console.warn("[Pre-Warm] Failed to initiate chart pre-warming:",M)}};N.useEffect(()=>{(async()=>{if(!(!r||x||!e||!t||!(v||b||w)))try{console.log("[Pre-Warm] New analysis detected, preparing slides for pre-warming...");const I={property:e,propertyId:(e==null?void 0:e.property_id)||(e==null?void 0:e.id)||(e==null?void 0:e._id),dateRange:t,financialMetrics:a,reportType:"Quarterly Performance Report"},R=await a8.map(r,I,"quarterly",E);T(R,e,t,f)}catch(I){console.warn("[Pre-Warm] Failed to prepare slides for pre-warming:",I)}})()},[r,x]);const O=async()=>
1218{if(!r){ft.error("No analysis available to generate report");return}if(x){ft.warning("Financial data is still loading. Please wait...");return}y&&(console.error("Metrics loading error:",y),ft.warning("Unable to load all financial data. Report may be incomplete.")),s(!0),c(!0);try{const A=Ik.generateReportId(e.id);d(A);const P={property:e,propertyId:(e==null?void 0:e.property_id)||(e==null?void 0:e.id)||(e==null?void 0:e._id),dateRange:t,financialMetrics:a,reportType:"Quarterly Performance Report"},I=await a8.map(r,P,"quarterly",E),R={property:e,dateRange:t,analysisResult:r,rawData:n,financialMetrics:a,slides:I,generatedAt:new Date().toISOString()};await Ik.save(A,R);const M="https://oyster-app-2hw4z.ondigitalocean.app",L=localStorage.getItem("accessToken"),U=await fetch(`${M}/api/pdf/generate-enhanced`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:L?`Bearer ${L}`:""},body:JSON.stringify({reportId:A,slides:I,property:e,options:{format:"Letter",landscape:!1,scale:2,theme:f}})});if(!U.ok)throw new Error(`PDF generation failed: ${U.statusText}`);const W=await U.blob(),V=window.URL.createObjectURL(W),G=document.createElement("a");G.href=V,G.download=`${e.name}_Report_${new Date().toISOString().split("T")[0]}.pdf`,document.body.appendChild(G),G.click(),document.body.removeChild(G),window.URL.revokeObjectURL(V),ft.success("Report generated and downloaded successfully")}catch(A){console.error("Report generation error:",A),ft.error("Failed to generate report")}finally{s(!1),c(!1)}};return N.useEffect(()=>{Ik.cleanup(1440*60*1e3).then(A=>{})},[]),o.jsxs("div",{className:"flex gap-3 items-center",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("label",{htmlFor:"pdf-theme",className:"text-sm text-gray-400",children:"Theme:"}),o.jsxs("select",{id:"pdf-theme",value:f,onChange:A=>p(A.target.value),disabled:i||l,className:"px-3 py-2 bg-card/50 border border-white/20 rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-accent-primary/50 disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx("option",{value:"dark",children:"Dark"}),o.jsx("option",{value:"white",children:"White"})]})]}),o.jsx(rt,{onClick:O,disabled:i||!r||x,variant:"accent",icon:x||l?ar:i?Sn:vc,className:i||l||x?"animate-pulse":"",children:x?"Loading Financial Data...":l?"Downloading...":i?"Generating...":"Generate & Download PDF"})]})},SQ=({property:e,rawData:t,analysisResult:r,onAnalysisUpdate:n,dateRange:a,onDateRangeChange:i,onPresetSelect:s,isLoading:l,savedAnalysis:c,onClearSavedAnalysis:u,onUnsavedChangesUpdate:d})=>{var we,ke,Oe,Ue,Je,Ze,te,ve;const{startTour:f}=Lu(),{refreshCredits:p}=Wi();N.useEffect(()=>{const J=setTimeout(()=>f(Fi.AI_ANALYSIS_TAB),500);return()=>clearTimeout(J)},[f]);const[m,x]=N.useState(null),[y,v]=N.useState(null),[b,w]=N.useState(r||""),[S,j]=N.useState(null),[k,E]=N.useState(""),[T,O]=N.useState(t),[A,P]=N.useState(!1),[I,R]=N.useState(!1),[M,L]=N.useState("gathering"),[U,W]=N.useState(null),[V,G]=N.useState(!1),[K,F]=N.useState(null),[ne,H]=N.useState(null),B=N.useCallback(J=>{v(J),i&&i({start:J.start,end:J.end})},[i]),X=N.useCallback(J=>{m===J?(x(null),v(null)):(x(J),v(null))},[m]);N.useEffect(()=>{if(r&&(w(r),L("editing"),!m)){const J=r.toLowerCase();let me="quarterly";J.includes("quarterly investor report")||J.includes("investment summary")||J.includes("quarterly investment report")||J.includes("forward priorities")?me="quarterlyInvestor":J.includes("monthly operations report")||J.includes("30-day outlook")||J.includes("operational alerts")||J.includes("monthly")?me="monthlyOperations":J.includes("rent roll")&&(me="rent-roll"),x(me)}},[r,m]),N.useEffect(()=>{var J;if(c){j(c.id),E(c.name),w(c.analysis_text),L("editing");let me="quarterly";const Ee=c.analysis_text||"",Me=c.raw_data||{};if(Me.reportType)me=Me.reportType;else if(Me.analysisType)me=Me.analysisType;else{const Ae=Ee.toLowerCase();Ae.includes("quarterly investor report")||Ae.includes("investment summary")||Ae.includes("quarterly investment report")||Ae.includes("forward priorities")?me="quarterlyInvestor":Ae.includes("monthly operations report")||Ae.includes("30-day outlook")||Ae.includes("operational alerts")||Ae.includes("monthly")?me="monthlyOperations":Ae.includes("rent roll")&&(me="rent-roll")}if(x(me),c.raw_data){const Ke=(Ce=>!!(Ce&&Ce.start&&Ce.end))(c.date_range)?c.date_range:(J=c.raw_data)==null?void 0:J.dateRange,jt={...c.raw_data,timeframe:Ke||c.raw_data.timeframe,dateRange:Ke};O(jt),c.raw_data.userContext&&W(c.raw_data.userContext),Ke!=null&&Ke.start&&(Ke!=null&&Ke.end)&&(i&&i({start:Ke.start,end:Ke.end}),v({start:Ke.start,end:Ke.end,label:Ke.label||"Saved Period"}))}u&&u()}},[c,u]);const Y=N.useCallback(J=>{if(!J)return[];const me=/^## (.+)$/gm,Ee=[];let Me;for(;(Me=me.exec(J))!==null;)Ee.push(Me[1].trim());return Ee},[]),ae=N.useCallback((J,me)=>{const Ee=me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Me=new RegExp(`(## ${Ee}[\\s\\S]*?)(?=## [A-Z]|$)`,"i"),Ae=J.match(Me);return Ae?Ae[1].trim():""},[]),fe=N.useCallback((J,me,Ee)=>{const Me=me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ae=new RegExp(`## ${Me}[\\s\\S]*?(?=\\n## |$)`,"i"),Ke=Ee.trim().startsWith("## ")?Ee.trim():`## ${me} 1219${Ee.trim()}`;return J.replace(Ae,Ke)},[]),ue=N.useCallback(J=>{W(J)},[]),oe=N.useCallback(async J=>{var me;if(!(e!=null&&e.id)||!a){ft.error("Missing property or date range");return}L("generating"),W(J);try{const Ee=await k1.generateAnalysis(e.id,a,"comprehensive",WX(m,J));if(((me=Ee.metadata)==null?void 0:me.aiNarrativeFailed)===!0){ft.error(KX),L("gathering");return}Ee.success?(w(Ee.analysis),O(VX(Ee.data,m,J)),L("editing"),j(null),E(""),n&&n(Ee.analysis,Ee.data),ft.success("Analysis generated successfully"),p()):(ft.error("Analysis generation failed"),L("gathering"))}catch(Ee){console.error("Analysis generation error:",Ee),ft.error("Failed to generate analysis. Please try again."),L("gathering")}},[e==null?void 0:e.id,a,m,n,y,p]),Z=N.useCallback(async(J,me=null)=>{var Ee,Me;if(!me){H(J);return}G(!0),F(J);try{const Ae=ae(b,J);if(!Ae){ft.error(`Could not find section: ${J}`);return}const Ke=await Xe.post("/analysis/agent/refine-section",{sectionName:J,currentContent:Ae,refinementRequest:me,originalContext:U||{}});if(Ke.data.success&&Ke.data.refinedContent){const jt=fe(b,J,Ke.data.refinedContent.trim());w(jt),P(!0),d&&d(!0),ft.success(`${J} refined successfully`)}else ft.error(Ke.data.error||"Section refinement failed")}catch(Ae){console.error("Section refinement error:",Ae);const Ke=((Me=(Ee=Ae.response)==null?void 0:Ee.data)==null?void 0:Me.error)||Ae.message||"Failed to refine section";ft.error(Ke)}finally{G(!1),F(null)}},[b,U,ae,fe,d]),ce=N.useCallback((J,me)=>{const Ee=fe(b,J,me);w(Ee),P(!0),d&&d(!0)},[b,fe,d]),q=N.useCallback(async(J,me=null)=>{var Ce,xt;if(!b)return;if(me){await Z(me,J);return}const Ee=J.toLowerCase();if(["whole report","entire report","full report","all sections","everything","the whole thing","all of it","entire analysis","whole analysis","the report"].some(bt=>Ee.includes(bt))){G(!0);try{const bt=await Xe.post("/analysis/agent/refine-report",{fullReport:b,refinementRequest:J,originalContext:U||{}});bt.data.success&&bt.data.refinedReport?(w(bt.data.refinedReport),P(!0),d&&d(!0),ft.success("Report refined successfully")):ft.error(bt.data.error||"Report refinement failed")}catch(bt){console.error("Full report refinement error:",bt),ft.error(((xt=(Ce=bt.response)==null?void 0:Ce.data)==null?void 0:xt.error)||"Failed to refine report")}finally{G(!1)}return}const Ke=Y(b),jt={"executive summary":["executive","summary","overview"],financial:["financial","finances","revenue","expenses","noi"],occupancy:["occupancy","vacancy","leasing","units"],variance:["variance","variances","changes"],recommendations:["recommendations","recommend","actions"],outlook:["outlook","forecast","future"]};for(const bt of Ke){const Pt=bt.toLowerCase();if(Ee.includes(Pt)){await Z(bt,J);return}for(const[_r,Ht]of Object.entries(jt))if(Pt.includes(_r)){for(const Zr of Ht)if(Ee.includes(Zr)){await Z(bt,J);return}}}ft.info('Which section would you like to refine? Click "Refine" on a section, or say "refine the whole report" to change everything.')},[b,U,Y,Z,d]),xe=(J,me)=>{j(J),E(me),P(!1),d&&d(!1)},pe=J=>{w(J.analysis_text),j(J.id),E(J.name),L("editing"),J.raw_data&&O(J.raw_data),P(!1),d&&d(!1)},Se=N.useCallback(async()=>{var J,me,Ee,Me,Ae,Ke,jt,Ce,xt,bt,Pt,_r,Ht;if(m==="monthlyOperations")try{ft.info("Generating monthly operations report PDF...");const Zr="https://oyster-app-2hw4z.ondigitalocean.app",ai=localStorage.getItem("accessToken"),Ia=((J=T==null?void 0:T.userContext)==null?void 0:J.includeRentRoll)||(U==null?void 0:U.includeRentRoll)||!1,Ki=((me=T==null?void 0:T.userContext)==null?void 0:me.includePLStatement)||(U==null?void 0:U.includePLStatement)||!1,fa=((Ee=T==null?void 0:T.detailed)==null?void 0:Ee.FinancialAgent)||(T==null?void 0:T.financial)||{},xs=((Me=fa==null?void 0:fa.breakdown)==null?void 0:Me.byCategory)||{},{topIncome:Hn,topExpenses:gn}=O_(xs,5),Rn=await fetch(`${Zr}/api/pdf/monthly-report`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:ai?`Bearer ${ai}`:""},body:JSON.stringify({propertyId:(e==null?void 0:e.property_id)||(e==null?void 0:e.id),analysisText:b,property:{name:e==null?void 0:e.name,address:e==null?void 0:e.address,unit_count:e==null?void 0:e.unit_count,class:e==null?void 0:e.class},dateRange:(T==null?void 0:T.dateRange)||a,financialData:fa,occupancyData:((Ke=(Ae=T==null?void 0:T.detailed)==null?void 0:Ae.OccupancyAgent)==null?void 0:Ke.metrics)||(T==null?void 0:T.occupancy)||{},metrics:(T==null?void 0:T.metrics)||((jt=T==null?void 0:T.data)==null?void 0:jt.financial)||{},topIncome:Hn,topExpenses:gn,includeRentRoll:Ia,includePLStatement:Ki})});if(!Rn.ok)throw new Error(`PDF generation failed: ${Rn.statusText}`);const ys=await Rn.blob(),Lo=window.URL.createObjectURL(ys),Fa=document.createElement("a");Fa.href=Lo;
1219const no=a!=null&&a.end?new Date(a.end).toLocaleString("default",{month:"short",year:"numeric"}).replace(" ","_"):"report";Fa.download=`${((e==null?void 0:e.name)||"Property").replace(/[^a-z0-9-]/gi,"_")}_monthly_operations_${no}.pdf`,document.body.appendChild(Fa),Fa.click(),document.body.removeChild(Fa),window.URL.revokeObjectURL(Lo),ft.success("Monthly operations report downloaded successfully")}catch(Zr){console.error("Monthly operations report PDF error:",Zr),ft.error("Failed to generate monthly operations report PDF")}else if(m==="quarterlyInvestor")try{ft.info("Generating investor report PDF...");const Zr="https://oyster-app-2hw4z.ondigitalocean.app",ai=localStorage.getItem("accessToken"),Ia=((Ce=T==null?void 0:T.userContext)==null?void 0:Ce.includeRentRoll)||(U==null?void 0:U.includeRentRoll)||!1,Ki=((xt=T==null?void 0:T.userContext)==null?void 0:xt.includePLStatement)||(U==null?void 0:U.includePLStatement)||!1,fa=await fetch(`${Zr}/api/pdf/investor-report`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:ai?`Bearer ${ai}`:""},body:JSON.stringify({propertyId:(e==null?void 0:e.property_id)||(e==null?void 0:e.id),analysisText:b,property:{name:e==null?void 0:e.name,address:e==null?void 0:e.address,unit_count:e==null?void 0:e.unit_count,class:e==null?void 0:e.class},dateRange:(T==null?void 0:T.dateRange)||a,financialData:((bt=T==null?void 0:T.detailed)==null?void 0:bt.FinancialAgent)||(T==null?void 0:T.financial)||{},occupancyData:((_r=(Pt=T==null?void 0:T.detailed)==null?void 0:Pt.OccupancyAgent)==null?void 0:_r.metrics)||(T==null?void 0:T.occupancy)||{},metrics:(T==null?void 0:T.metrics)||((Ht=T==null?void 0:T.data)==null?void 0:Ht.financial)||{},insights:(T==null?void 0:T.insights)||[],recommendations:(T==null?void 0:T.recommendations)||[],includeRentRoll:Ia,includePLStatement:Ki})});if(!fa.ok)throw new Error(`PDF generation failed: ${fa.statusText}`);const xs=await fa.blob(),Hn=window.URL.createObjectURL(xs),gn=document.createElement("a");gn.href=Hn;const Rn=a!=null&&a.end?`Q${Math.ceil((new Date(a.end).getMonth()+1)/3)}_${new Date(a.end).getFullYear()}`:"report";gn.download=`${((e==null?void 0:e.name)||"Property").replace(/[^a-z0-9-]/gi,"_")}_investor_report_${Rn}.pdf`,document.body.appendChild(gn),gn.click(),document.body.removeChild(gn),window.URL.revokeObjectURL(Hn),ft.success("Investor report downloaded successfully")}catch(Zr){console.error("Investor report PDF error:",Zr),ft.error("Failed to generate investor report PDF")}else ft.info("Use the Export PDF button in the action bar")},[m,e,b,T,a]);N.useCallback(()=>{ft.info("Use the Save Analysis button in the action bar")},[]);const he=J=>{w(J);const me=J!==r;P(me),d&&d(me)};if(l)return o.jsx("div",{className:"p-6",children:o.jsx(z4,{loading:!0,loadingMessage:"Loading analysis data..."})});if(!b)return m?m&&!y?o.jsx("div",{className:"p-6","data-tour":"ai-report-selector",children:o.jsx(dk,{selectedType:m,onSelect:X,onPeriodSelect:B,isLoading:l,propertyId:e==null?void 0:e.id})}):((we=Lh.find(J=>J.value===m))!=null&&we.label,o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsx("div",{className:"p-6 border-b border-white/10 shrink-0",children:o.jsx(dk,{selectedType:m,onSelect:X,onPeriodSelect:B,isLoading:l,propertyId:e==null?void 0:e.id})}),o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(fk,{chatPanel:o.jsx(X0,{property:e,reportType:m,mode:M,onModeChange:L,onContextComplete:ue,onGenerateRequest:oe,onRefinementRequest:q,availableSections:[],focusedSection:null,onFocusedSectionClear:()=>{}}),previewPanel:o.jsx("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 p-6",children:M==="generating"?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsx(ar,{className:"h-8 w-8 animate-spin text-accent"}),o.jsx("p",{children:"Generating your analysis..."}),o.jsx("p",{className:"text-sm text-gray-600",children:"This may take 15-30 seconds"})]}):o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-lg mb-2",children:"Complete the chat to generate your report"}),o.jsx("p",{className:"text-sm",children:"Answer a few quick questions to tailor the analysis"})]})})})})]})):o.jsx("div",{className:"p-6","data-tour":"ai-report-selector",children:o.jsx(dk,{selectedType:m,onSelect:X,onPeriodSelect:B,isLoading:l,propertyId:e==null?void 0:e.id})});if(Lh.find(J=>J.value===m),m==="rent-roll")return o.jsx(NIe,{propertyId:e==null?void 0:e.id,property:e,dateRange:a,onBack:()=>x(null)});if(b)return o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsx("div",{className:"p-4 border-b border-white/10 flex justify-between items-center shrink-0",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx(TIe,{property:e,analysisText:b,dateRange:a,rawData:T,currentAnalysisId:S,currentAnalysisName:k,onSaved:xe,onLoadAnalysis:pe}),m!=="quarterlyInvestor"&&m!=="monthlyOperations"&&o.jsx(zIe,{property:e,dateRange:a,analysisText:b,rawData:T,financialMetrics:T==null?void 0:T.financialMetrics}),m==="monthlyOperations"&&o.jsx("button",{onClick:Se,className:"px-4 py-2 bg-accent text-white rounded-lg hover:bg-accent/90 transition-colors text-sm font-medium",children:"Export PDF"})]})}),I?o.jsx("div",{className:"flex-1 overflow-auto p-4","data-tour":"ai-report-content",children:o.jsx(e8,{analysisText:b,onTextChange:he,onUnsavedChangesUpdate:J=>{P(J),d&&d(J)},isEditMode:I,onEditModeChange:R})}):o.jsxs("div",{className:"flex-1 min-h-0 flex flex-col","data-tour":"ai-report-content",children:[o.jsx("div",{className:"p-4 shrink-0",children:o.jsx(e8,{analysisText:b,onTextChange:he,onUnsavedChangesUpdate:J=>{P(J),d&&d(J)},isEditMode:I,onEditModeChange:R})}),o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(fk,{chatPanel:o.jsx(X0,{property:e,reportType:m,mode:M,onModeChange:L,onContextComplete:ue,onGenerateRequest:oe,onRefinementRequest:q,availableSections:Y(b),focusedSection:ne,onFocusedSectionClear:()=>H(null)}),previewPanel:m==="monthlyOperations"?o.jsx(SIe,{analysisText:b,financialMetrics:(T==null?void 0:T.metrics)||((ke=T==null?void 0:T.data)==null?void 0:ke.financial),financialData:((Oe=T==null?void 0:T.detailed)==null?void 0:Oe.FinancialAgent)||(T==null?void 0:T.financial),occupancyData:((Ue=T==null?void 0:T.detailed)==null?void 0:Ue.OccupancyAgent)||(T==null?void 0:T.occupancy),property:e,dateRange:(T==null?void 0:T.dateRange)||a,onSectionRefine:Z,isRefining:V,refiningSection:K,onExportPDF:Se,chatContext:(T==null?void 0:T.userContext)||U,onSectionEdit:ce}):m==="quarterlyInvestor"?o.jsx(bIe,{analysisText:b,financialMetrics:(T==null?void 0:T.metrics)||((Je=T==null?void 0:T.data)==null?void 0:Je.financial),financialData:((Ze=T==null?void 0:T.detailed)==null?void 0:Ze.FinancialAgent)||(T==null?void 0:T.financial),occupancyData:((te=T==null?void 0:T.detailed)==null?void 0:te.OccupancyAgent)||(T==null?void 0:T.occupancy),property:e,dateRange:(T==null?void 0:T.dateRange)||a,onSectionRefine:Z,isRefining:V,refiningSection:K,onExportPDF:Se,chatContext:(T==null?void 0:T.userContext)||U,onSectionEdit:ce}):o.jsx(dIe,{analysisText:b,onSectionRefine:Z,isRefining:V,refiningSection:K,onSectionEdit:ce})})})]})]});const ie=((ve=Lh.find(J=>J.value===m))==null?void 0:ve.label)||"AI Report";return o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsxs("div",{className:"px-4 py-3 border-b border-white/10 flex items-center gap-3 shrink-0",children:[o.jsx("button",{onClick:()=>x(null),className:"p-1.5 text-gray-400 hover:text-white hover:bg-white/5 rounded-lg transition-colors",children:o.jsx(wu,{className:"h-4 w-4"})}),o.jsx("span",{className:"text-sm font-medium text-white",children:ie})]}),o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(fk,{chatPanel:o.jsx(X0,{property:e,reportType:m,mode:M,onModeChange:L,onContextComplete:ue,onGenerateRequest:oe,onRefinementRequest:q,availableSections:[],focusedSection:null,onFocusedSectionClear:()=>{}}),previewPanel:o.jsx("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 p-6",children:M==="generating"?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsx(ar,{className:"h-8 w-8 animate-spin text-accent"}),o.jsx("p",{children:"Generating your analysis..."}),o.jsx("p",{className:"text-sm text-gray-600",children:"This may take 15-30 seconds"})]}):o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-lg mb-2",children:"Complete the chat to generate your report"}),o.jsx("p",{className:"text-sm",children:"Answer a few quick questions to tailor the analysis"})]})})})})]})},i8=({kpiMetrics:e,printMode:t=!1,showOnlyKPIs:r=!1})=>{if(!e)return null;if(t)return o.jsx("div",{className:"kpi-summary bg-gray-900/50 border border-gray-800 rounded-lg p-8 print:bg-white print:border-gray-300",children:o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 ga
1219p-6",children:[o.jsxs("div",{className:"text-center py-4 border-r border-gray-800 last:border-r-0 print:border-gray-300",children:[o.jsx("h3",{className:"text-xs uppercase tracking-wider text-gray-400 mb-2 print:text-gray-600 font-sans",children:"Net Operating Income"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2 print:text-gray-900",children:hi(e.noi.value)})]}),o.jsxs("div",{className:"text-center py-4 border-r border-gray-800 last:border-r-0 print:border-gray-300",children:[o.jsx("h3",{className:"text-xs uppercase tracking-wider text-gray-400 mb-2 print:text-gray-600 font-sans",children:"Total Income"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2 print:text-gray-900",children:hi(e.totalIncome.value)})]}),o.jsxs("div",{className:"text-center py-4 border-r border-gray-800 last:border-r-0 print:border-gray-300",children:[o.jsx("h3",{className:"text-xs uppercase tracking-wider text-gray-400 mb-2 print:text-gray-600 font-sans",children:"Operating Expenses"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2 print:text-gray-900",children:hi(e.expenses.value)})]}),o.jsxs("div",{className:"text-center py-4 border-r border-gray-800 last:border-r-0 print:border-gray-300",children:[o.jsx("h3",{className:"text-xs uppercase tracking-wider text-gray-400 mb-2 print:text-gray-600 font-sans",children:"Operating Ratio"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2 print:text-gray-900",children:e.totalIncome.value>0?pr(e.expenses.value/e.totalIncome.value*100):"0.0%"})]}),e.dscr&&e.dscr.value!==null&&o.jsxs("div",{className:"text-center py-4 print:border-gray-300",children:[o.jsx("h3",{className:"text-xs uppercase tracking-wider text-gray-400 mb-2 print:text-gray-600 font-sans",children:"DSCR"}),o.jsxs("div",{className:`text-xl font-semibold mb-2 print:text-gray-900 ${e.dscr.value>=1.25?"text-green-400":e.dscr.value>=1?"text-yellow-400":"text-red-400"}`,children:[e.dscr.value.toFixed(2),"x"]})]})]})});const n=e.dscr&&e.dscr.value!==null;return o.jsx("div",{className:"glass-card py-2 px-4",children:o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-0",children:[o.jsxs("div",{className:"py-2 px-3 border-r border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"NOI"}),o.jsx(bl,{className:"h-4 w-4 text-primary"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:hi(e.noi.value)})]}),o.jsxs("div",{className:"py-2 px-3 border-r border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"Total Income"}),o.jsx(_i,{className:"h-4 w-4 text-accent"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:hi(e.totalIncome.value)})]}),o.jsxs("div",{className:"py-2 px-3 border-r border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"Operating Expenses"}),o.jsx(cC,{className:"h-4 w-4 text-warning"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:hi(e.expenses.value)})]}),o.jsxs("div",{className:`py-2 px-3 ${n?"border-r border-white/10":""}`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"Operating Ratio"}),o.jsx(cC,{className:"h-4 w-4 text-info"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:e.totalIncome.value>0?pr(e.expenses.value/e.totalIncome.value*100):"0.0%"})]}),n&&o.jsxs("div",{className:"py-2 px-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"DSCR"}),o.jsx(Vp,{className:`h-4 w-4 ${e.dscr.value>=1.25?"text-green-400":e.dscr.value>=1?"text-yellow-400":"text-red-400"}`})]}),o.jsxs("div",{className:"text-2xl font-bold metric-gradient font-mono",children:[e.dscr.value.toFixed(2),"x"]}),o.jsx("div",{className:`text-xs font-medium uppercase tracking-wide ${e.dscr.value>=1.25?"text-green-400/80":e.dscr.value>=1?"text-yellow-400/80":"text-red-400/80"}`,children:e.dscr.value>=1.25?"Strong":e.dscr.value>=1?"Adequate":"Below Target"})]})]})})};function EQ(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<a;t++)e[t]&&(r=EQ(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Jt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=EQ(e))&&(n&&(n+=" "),n+=t);return n}var Fk,s8;
vendor: 8,533 bytes, line 1219
1219function Gi(){if(s8)return Fk;s8=1;var e=Array.isArray;return Fk=e,Fk}var Mk,o8;function kQ(){if(o8)return Mk;o8=1;var e=typeof kv=="object"&&kv&&kv.Object===Object&&kv;return Mk=e,Mk}var Dk,l8;function Nl(){if(l8)return Dk;l8=1;var e=kQ(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Dk=r,Dk}var Lk,c8;function ay(){if(c8)return Lk;c8=1;var e=Nl(),t=e.Symbol;return Lk=t,Lk}var $k,u8;function HIe(){if(u8)return $k;u8=1;var e=ay(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(s){var l=r.call(s,a),c=s[a];try{s[a]=void 0;var u=!0}catch{}var d=n.call(s);return u&&(l?s[a]=c:delete s[a]),d}return $k=i,$k}var Bk,d8;function qIe(){if(d8)return Bk;d8=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Bk=r,Bk}var Uk,f8;function Ec(){if(f8)return Uk;f8=1;var e=ay(),t=HIe(),r=qIe(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?a:n:i&&i in Object(l)?t(l):r(l)}return Uk=s,Uk}var zk,h8;function kc(){if(h8)return zk;h8=1;function e(t){return t!=null&&typeof t=="object"}return zk=e,zk}var Hk,p8;function am(){if(p8)return Hk;p8=1;var e=Ec(),t=kc(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return Hk=n,Hk}var qk,m8;function hI(){if(m8)return qk;m8=1;var e=Gi(),t=am(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,s){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||s!=null&&i in Object(s)}return qk=a,qk}var Wk,g8;function Uu(){if(g8)return Wk;g8=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Wk=e,Wk}var Vk,x8;function pI(){if(x8)return Vk;x8=1;var e=Ec(),t=Uu(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function s(l){if(!t(l))return!1;var c=e(l);return c==n||c==a||c==r||c==i}return Vk=s,Vk}var Gk,y8;function WIe(){if(y8)return Gk;y8=1;var e=Nl(),t=e["__core-js_shared__"];return Gk=t,Gk}var Kk,v8;function VIe(){if(v8)return Kk;v8=1;var e=WIe(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Kk=r,Kk}var Yk,b8;function NQ(){if(b8)return Yk;b8=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Yk=r,Yk}var Xk,w8;function GIe(){if(w8)return Xk;w8=1;var e=pI(),t=VIe(),r=Uu(),n=NQ(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!r(p)||t(p))return!1;var m=e(p)?d:i;return m.test(n(p))}return Xk=f,Xk}var Jk,_8;function KIe(){if(_8)return Jk;_8=1;function e(t,r){return t==null?void 0:t[r]}return Jk=e,Jk}var Qk,S8;function _f(){if(S8)return Qk;S8=1;var e=GIe(),t=KIe();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return Qk=r,Qk}var Zk,E8;function R_(){if(E8)return Zk;E8=1;var e=_f(),t=e(Object,"create");return Zk=t,Zk}var eN,k8;function YIe(){if(k8)return eN;k8=1;var e=R_();function t(){this.__data__=e?e(null):{},this.size=0}return eN=t,eN}var tN,N8;function XIe(){if(N8)return tN;N8=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return tN=e,tN}var rN,T8;function JIe(){if(T8)return rN;T8=1;var e=R_(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var s=this.__data__;if(e){var l=s[i];return l===t?void 0:l}return n.call(s,i)?s[i]:void 0}return rN=a,rN}var nN,j8;function QIe(){if(j8)return nN;j8=1;var e=R_(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return nN=n,nN}var aN,A8;function ZIe(){if(A8)return aN;A8=1;var e=R_(),t="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?t:a,this}return aN=r,aN}var iN,C8;function e3e(){if(C8)return iN;C8=1;var e=YIe(),t=XIe(),r=JIe(),n=QIe(),a=ZIe();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,iN=i,iN}var sN,O8;function t3e(){if(O8)return sN;O8=1;function e(){this.__data__=[],this.size=0}return sN=e,sN}var oN,P8;function mI(){if(P8)return oN;P8=1;function e(t,r){return t===r||t!==t&&r!==r}return oN=e,oN}var lN,R8;function I_(){if(R8)return lN;R8=1;var e=mI();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return lN=t,lN}var cN,I8;function r3e(){if(I8)return cN;I8=1;var e=I_(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,s=e(i,a);if(s<0)return!1;var l=i.length-1;return s==l?i.pop():r.call(i,s,1),--this.size,!0}return cN=n,cN}var uN,F8;function n3e(){if(F8)return uN;F8=1;var e=I_();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return uN=t,uN}var dN,M8;function a3e(){if(M8)return dN;M8=1;var e=I_();function t(r){return e(this.__data__,r)>-1}return dN=t,dN}var fN,D8;function i3e(){if(D8)return fN;D8=1;var e=I_();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 fN=t,fN}var hN,L8;function F_(){if(L8)return hN;L8=1;var e=t3e(),t=r3e(),r=n3e(),n=a3e(),a=i3e();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,hN=i,hN}var pN,$8;function gI(){if($8)return pN;$8=1;var e=_f(),t=Nl(),r=e(t,"Map");return pN=r,pN}var mN,B8;function s3e(){if(B8)return mN;B8=1;var e=e3e(),t=F_(),r=gI();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return mN=n,mN}var gN,U8;function o3e(){if(U8)return gN;U8=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return gN=e,gN}var xN,z8;function M_(){if(z8)return xN;z8=1;var e=o3e();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return xN=t,xN}var yN,H8;function l3e(){if(H8)return yN;H8=1;var e=M_();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return yN=t,yN}var vN,q8;function c3e(){if(q8)return vN;q8=1;var e=M_();function t(r){return e(this,r).get(r)}return vN=t,vN}var bN,W8;function u3e(){if(W8)return bN;W8=1;var e=M_();function t(r){return e(this,r).has(r)}return bN=t,bN}var wN,V8;function d3e(){if(V8)return wN;V8=1;var e=M_();function t(r,n){var a=e(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return wN=t,wN}var _N,G8;function xI(){if(G8)return _N;G8=1;var e=s3e(),t=l3e(),r=c3e(),n=u3e(),a=d3e();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,_N=i,_N}var SN,K8;function TQ(){if(K8)return SN;K8=1;var e=xI(),t="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var s=arguments,l=a?a.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);var u=n.apply(this,s);return i.cache=c.set(l,u)||c,u};return i.cache=new(r.Cache||e),i}return r.Cache=e,SN=r,SN}var EN,Y8;function f3e(){if(Y8)return EN;Y8=1;var e=TQ(),t=500;function r(n){var a=e(n,function(s){return i.size===t&&i.clear(),s}),i=a.cache;return a}return EN=r,EN}var kN,X8;function h3e(){if(X8)return kN;X8=1;var e=f3e(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(s,l,c,u){i.push(c?u.replace(r,"$1"):l||s)}),i});return kN=n,kN}var NN,J8;function yI(){if(J8)return NN;J8=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=Array(a);++n<a;)i[n]=r(t[n],n,t);return i}return NN=e,NN}var TN,Q8;function p3e(){if(Q8)return TN;Q8=1;var e=ay(),t=yI(),r=Gi(),n=am(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function s(l){if(typeof l=="string")return l;if(r(l))return t(l,s)+"";if(n(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return TN=s,TN}var jN,Z8;function jQ(){if(Z8)return jN;Z8=1;var e=p3e();function t(r){return r==null?"":e(r)}
vendor: 9,509 bytes, lines 1219-1227
1219return jN=t,jN}var AN,eB;function AQ(){if(eB)return AN;eB=1;var e=Gi(),t=hI(),r=h3e(),n=jQ();function a(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return AN=a,AN}var CN,tB;function D_(){if(tB)return CN;tB=1;var e=am();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return CN=t,CN}var ON,rB;function vI(){if(rB)return ON;rB=1;var e=AQ(),t=D_();function r(n,a){a=e(a,n);for(var i=0,s=a.length;n!=null&&i<s;)n=n[t(a[i++])];return i&&i==s?n:void 0}return ON=r,ON}var PN,nB;function CQ(){if(nB)return PN;nB=1;var e=vI();function t(r,n,a){var i=r==null?void 0:e(r,n);return i===void 0?a:i}return PN=t,PN}var m3e=CQ();const fs=tr(m3e);var RN,aB;function g3e(){if(aB)return RN;aB=1;function e(t){return t==null}return RN=e,RN}var x3e=g3e();const Dt=tr(x3e);var IN,iB;function y3e(){if(iB)return IN;iB=1;var e=Ec(),t=Gi(),r=kc(),n="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return IN=a,IN}var v3e=y3e();const iy=tr(v3e);var b3e=pI();const Mt=tr(b3e);var w3e=Uu();const im=tr(w3e);var FN={exports:{}},Ar={};/** 1220 * @license React 1221 * react-is.production.min.js 1222 * 1223 * Copyright (c) Facebook, Inc. and its affiliates. 1224 * 1225 * This source code is licensed under the MIT license found in the 1226 * LICENSE file in the root directory of this source tree. 1227 */var sB;function _3e(){if(sB)return Ar;sB=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.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var b=v.$$typeof;switch(b){case e:switch(v=v.type,v){case r:case a:case n:case u:case d:return v;default:switch(v=v&&v.$$typeof,v){case l:case s:case c:case p:case f:case i:return v;default:return b}}case t:return b}}}return Ar.ContextConsumer=s,Ar.ContextProvider=i,Ar.Element=e,Ar.ForwardRef=c,Ar.Fragment=r,Ar.Lazy=p,Ar.Memo=f,Ar.Portal=t,Ar.Profiler=a,Ar.StrictMode=n,Ar.Suspense=u,Ar.SuspenseList=d,Ar.isAsyncMode=function(){return!1},Ar.isConcurrentMode=function(){return!1},Ar.isContextConsumer=function(v){return y(v)===s},Ar.isContextProvider=function(v){return y(v)===i},Ar.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Ar.isForwardRef=function(v){return y(v)===c},Ar.isFragment=function(v){return y(v)===r},Ar.isLazy=function(v){return y(v)===p},Ar.isMemo=function(v){return y(v)===f},Ar.isPortal=function(v){return y(v)===t},Ar.isProfiler=function(v){return y(v)===a},Ar.isStrictMode=function(v){return y(v)===n},Ar.isSuspense=function(v){return y(v)===u},Ar.isSuspenseList=function(v){return y(v)===d},Ar.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===a||v===n||v===u||v===d||v===m||typeof v=="object"&&v!==null&&(v.$$typeof===p||v.$$typeof===f||v.$$typeof===i||v.$$typeof===s||v.$$typeof===c||v.$$typeof===x||v.getModuleId!==void 0)},Ar.typeOf=y,Ar}var oB;function S3e(){return oB||(oB=1,FN.exports=_3e()),FN.exports}var E3e=S3e(),MN,lB;function OQ(){if(lB)return MN;lB=1;var e=Ec(),t=kc(),r="[object Number]";function n(a){return typeof a=="number"||t(a)&&e(a)==r}return MN=n,MN}var DN,cB;function k3e(){if(cB)return DN;cB=1;var e=OQ();function t(r){return e(r)&&r!=+r}return DN=t,DN}var N3e=k3e();const sm=tr(N3e);var T3e=OQ();const j3e=tr(T3e);var yi=function(t){return t===0?0:t>0?1:-1},Cd=function(t){return iy(t)&&t.indexOf("%")===t.length-1},it=function(t){return j3e(t)&&!sm(t)},ca=function(t){return it(t)||iy(t)},A3e=0,zu=function(t){var r=++A3e;return"".concat(t||"").concat(r)},vi=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(!it(t)&&!iy(t))return n;var i;if(Cd(t)){var s=t.indexOf("%");i=r*parseFloat(t.slice(0,s))/100}else i=+t;return sm(i)&&(i=n),a&&i>r&&(i=r),i},su=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},C3e=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},bn=function(t,r){return it(t)&&it(r)?function(n){return t+n*(r-t)}:function(){return r}};function P1(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):fs(n,t))===r})}var O3e=function(t){if(!t||!t.length)return null;for(var r=t.length,n=0,a=0,i=0,s=0,l=1/0,c=-1/0,u=0,d=0,f=0;f<r;f++)u=t[f].cx||0,d=t[f].cy||0,n+=u,a+=d,i+=u*d,s+=u*u,l=Math.min(l,u),c=Math.max(c,u);var p=r*s!==n*n?(r*i-n*a)/(r*s-n*n):0;return{xmin:l,xmax:c,a:p,b:(a-p*n)/r}};function Bh(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function oO(e){"@babel/helpers - typeof";return oO=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},oO(e)}var P3e=["viewBox","children"],R3e=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],uB=["points","pathLength"],LN={svg:P3e,polygon:uB,polyline:uB},bI=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
1227ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],R1=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(N.isValidElement(t)&&(n=t.props),!im(n))return null;var a={};return Object.keys(n).forEach(function(i){bI.includes(i)&&(a[i]=r||function(s){return n[i](n,s)})}),a},I3e=function(t,r,n){return function(a){return t(r,n,a),null}},ju=function(t,r,n){if(!im(t)||oO(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var s=t[i];bI.includes(i)&&typeof s=="function"&&(a||(a={}),a[i]=I3e(s,r,n))}),a},F3e=["children"],M3e=["children"];function dB(e,t){if(e==null)return{};var r=D3e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function D3e(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 lO(e){"@babel/helpers - typeof";return lO=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},lO(e)}var fB={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"}
vendor: 4,251 bytes, line 1227
1227,ac=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},hB=null,$N=null,wI=function e(t){if(t===hB&&Array.isArray($N))return $N;var r=[];return N.Children.forEach(t,function(n){Dt(n)||(E3e.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),$N=r,hB=t,r};function Ei(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return ac(a)}):n=[ac(t)],wI(e).forEach(function(a){var i=fs(a,"type.displayName")||fs(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function ns(e,t){var r=Ei(e,t);return r&&r[0]}var pB=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!it(n)||n<=0||!it(a)||a<=0)},L3e=["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"],$3e=function(t){return t&&t.type&&iy(t.type)&&L3e.indexOf(t.type)>=0},PQ=function(t){return t&&lO(t)==="object"&&"clipDot"in t},B3e=function(t,r,n,a){var i,s=(i=LN==null?void 0:LN[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!Mt(t)&&(a&&s.includes(r)||R3e.includes(r))||n&&bI.includes(r)},Nt=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(N.isValidElement(t)&&(a=t.props),!im(a))return null;var i={};return Object.keys(a).forEach(function(s){var l;B3e((l=a)===null||l===void 0?void 0:l[s],s,r,n)&&(i[s]=a[s])}),i},cO=function e(t,r){if(t===r)return!0;var n=N.Children.count(t);if(n!==N.Children.count(r))return!1;if(n===0)return!0;if(n===1)return mB(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],s=r[a];if(Array.isArray(i)||Array.isArray(s)){if(!e(i,s))return!1}else if(!mB(i,s))return!1}return!0},mB=function(t,r){if(Dt(t)&&Dt(r))return!0;if(!Dt(t)&&!Dt(r)){var n=t.props||{},a=n.children,i=dB(n,F3e),s=r.props||{},l=s.children,c=dB(s,M3e);return a&&l?Bh(i,c)&&cO(a,l):!a&&!l?Bh(i,c):!1}return!1},gB=function(t,r){var n=[],a={};return wI(t).forEach(function(i,s){if($3e(i))n.push(i);else if(i){var l=ac(i.type),c=r[l]||{},u=c.handler,d=c.once;if(u&&(!d||!a[l])){var f=u(i,l,s);n.push(f),a[l]=!0}}}),n},U3e=function(t){var r=t&&t.type;return r&&fB[r]?fB[r]:null},z3e=function(t,r){return wI(r).indexOf(t)},H3e=["children","width","height","viewBox","className","style","title","desc"];function uO(){return uO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uO.apply(this,arguments)}function q3e(e,t){if(e==null)return{};var r=W3e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W3e(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 dO(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,s=e.style,l=e.title,c=e.desc,u=q3e(e,H3e),d=a||{width:r,height:n,x:0,y:0},f=Jt("recharts-surface",i);return se.createElement("svg",uO({},Nt(u,!0,"svg"),{className:f,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),se.createElement("title",null,l),se.createElement("desc",null,c),t)}var V3e=["children","className"];function fO(){return fO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1227for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fO.apply(this,arguments)}function G3e(e,t){if(e==null)return{};var r=K3e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function K3e(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 er=se.forwardRef(function(e,t){var r=e.children,n=e.className,a=G3e(e,V3e),i=Jt("recharts-layer",n);return se.createElement("g",fO({className:i},Nt(a,!0),{ref:t}),r)}),Ao=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]},BN,xB;function Y3e(){if(xB)return BN;xB=1;function e(t,r,n){var a=-1,i=t.length;r<0&&(r=-r>i?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;)s[a]=t[a+r];return s}return BN=e,BN}var UN,yB;function X3e(){if(yB)return UN;yB=1;var e=Y3e();function t(r,n,a){var i=r.length;return a=a===void 0?i:a,!n&&a>=i?r:e(r,n,a)}return UN=t,UN}var zN,vB;function RQ(){if(vB)return zN;vB=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 c(u){return l.test(u)}return zN=c,zN}var HN,bB;function J3e(){if(bB)return HN;bB=1;function e(t){return t.split("")}return HN=e,HN}var qN,wB;function Q3e(){if(wB)return qN;wB=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+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",x=u+"?",y="["+i+"]?",v="(?:"+m+"(?:"+[d,f,p].join("|")+")"+y+x+")*",b=y+x+v,w="(?:"+[d+l+"?",l,f,p,s].join("|")+")",S=RegExp(c+"(?="+c+")|"+w+b,"g");function j(k){return k.match(S)||[]}return qN=j,qN}var WN,_B;function Z3e(){if(_B)return WN;_B=1;var e=J3e(),t=RQ(),r=Q3e();function n(a){return t(a)?r(a):e(a)}return WN=n,WN}var VN,SB;function eFe(){if(SB)return VN;SB=1;var e=X3e(),t=RQ(),r=Z3e(),n=jQ();function a(i){return function(s){s=n(s);var l=t(s)?r(s):void 0,c=l?l[0]:s.charAt(0),u=l?e(l,1).join(""):s.slice(1);return c[i]()+u}}return VN=a,VN}var GN,EB;function tFe(){if(EB)return GN;EB=1;var e=eFe(),t=e("toUpperCase");return GN=t,GN}var rFe=tFe();const L_=tr(rFe);function Xr(e){return function(){return e}}const IQ=Math.cos,I1=Math.sin,Do=Math.sqrt,F1=Math.PI,$_=2*F1,hO=Math.PI,pO=2*hO,gd=1e-6,nFe=pO-gd;function FQ(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function aFe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return FQ;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class iFe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?FQ:aFe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,l=this._y1,c=n-t,u=a-r,d=s-t,f=l-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>gd)if(!(Math.abs(f*c-u*d)>gd)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-s,x=a-l,y=c*c+u*u,v=m*m+x*x,b=Math.sqrt(y),w=Math.sqrt(p),S=i*Math.tan((hO-Math.acos((y+p-v)/(2*b*w)))/2),j=S/w,k=S/b;Math.abs(j-1)>gd&&this._append`L${t+j*d},${r+j*f}`,this._append`A${i},${i},0,0,${+(f*m>d*x)},${this._x1=t+k*c},${this._y1=r+k*u}`}}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),c=n*Math.sin(a),u=t+l,d=r+c,f=1^s,p=s?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>gd||Math.abs(this._y1-d)>gd)&&this._append`L${u},${d}`,n&&(p<0&&(p=p%pO+pO),p>nFe?this._append`A${n},${n},0,1,${f},${t-l},${r-c}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:p>gd&&this._append`A${n},${n},0,${+(p>=hO)},${f},${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 _I(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 iFe(t)}function SI(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function MQ(e){this._context=e}MQ.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 B_(e){return new MQ(e)}function DQ(e){return e[0]}function LQ(e){return e[1]}
1227function $Q(e,t){var r=Xr(!0),n=null,a=B_,i=null,s=_I(l);e=typeof e=="function"?e:e===void 0?DQ:Xr(e),t=typeof t=="function"?t:t===void 0?LQ:Xr(t);function l(c){var u,d=(c=SI(c)).length,f,p=!1,m;for(n==null&&(i=a(m=s())),u=0;u<=d;++u)!(u<d&&r(f=c[u],u,c))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(f,u,c),+t(f,u,c));if(m)return i=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Xr(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:Xr(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:Xr(!!c),l):r},l.curve=function(c){return arguments.length?(a=c,n!=null&&(i=a(n)),l):a},l.context=function(c){return arguments.length?(c==null?n=i=null:i=a(n=c),l):n},l}function nb(e,t,r){var n=null,a=Xr(!0),i=null,s=B_,l=null,c=_I(u);e=typeof e=="function"?e:e===void 0?DQ:Xr(+e),t=typeof t=="function"?t:Xr(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?LQ:Xr(+r);function u(f){var p,m,x,y=(f=SI(f)).length,v,b=!1,w,S=new Array(y),j=new Array(y);for(i==null&&(l=s(w=c())),p=0;p<=y;++p){if(!(p<y&&a(v=f[p],p,f))===b)if(b=!b)m=p,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),x=p-1;x>=m;--x)l.point(S[x],j[x]);l.lineEnd(),l.areaEnd()}b&&(S[p]=+e(v,p,f),j[p]=+t(v,p,f),l.point(n?+n(v,p,f):S[p],r?+r(v,p,f):j[p]))}if(w)return l=null,w+""||null}function d(){return $Q().defined(a).curve(s).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Xr(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Xr(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Xr(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Xr(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Xr(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Xr(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:Xr(!!f),u):a},u.curve=function(f){return arguments.length?(s=f,i!=null&&(l=s(i)),u):s},u.context=function(f){return arguments.length?(f==null?i=l=null:l=s(i=f),u):i},u}class BQ{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 sFe(e){return new BQ(e,!0)}function oFe(e){return new BQ(e,!1)}const EI={draw(e,t){const r=Do(t/F1);e.moveTo(r,0),e.arc(0,0,r,0,$_)}},lFe={draw(e,t){const r=Do(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()}},UQ=Do(1/3),cFe=UQ*2,uFe={draw(e,t){const r=Do(t/cFe),n=r*UQ;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},dFe={draw(e,t){const r=Do(t),n=-r/2;e.rect(n,n,r,r)}},fFe=.8908130915292852,zQ=I1(F1/10)/I1(7*F1/10),hFe=I1($_/10)*zQ,pFe=-IQ($_/10)*zQ,mFe={draw(e,t){const r=Do(t*fFe),n=hFe*r,a=pFe*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const s=$_*i/5,l=IQ(s),c=I1(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*a,c*n+l*a)}e.closePath()}},KN=Do(3),gFe={draw(e,t){const r=-Do(t/(KN*3));e.moveTo(0,r*2),e.lineTo(-KN*r,-r),e.lineTo(KN*r,-r),e.closePath()}},As=-.5,Cs=Do(3)/2,mO=1/Do(12),xFe=(mO/2+1)*3,yFe={draw(e,t){const r=Do(t/xFe),n=r/2,a=r*mO,i=n,s=r*mO+r,l=-i,c=s;e.moveTo(n,a),e.lineTo(i,s),e.lineTo(l,c),e.lineTo(As*n-Cs*a,Cs*n+As*a),e.lineTo(As*i-Cs*s,Cs*i+As*s),e.lineTo(As*l-Cs*c,Cs*l+As*c),e.lineTo(As*n+Cs*a,As*a-Cs*n),e.lineTo(As*i+Cs*s,As*s-Cs*i),e.lineTo(As*l+Cs*c,As*c-Cs*l),e.closePath()}};function vFe(e,t){let r=null,n=_I(a);
vendor: 6,737 bytes, line 1227
1227e=typeof e=="function"?e:Xr(e||EI),t=typeof t=="function"?t:Xr(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:Xr(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Xr(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function M1(){}function D1(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 HQ(e){this._context=e}HQ.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:D1(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:D1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bFe(e){return new HQ(e)}function qQ(e){this._context=e}qQ.prototype={areaStart:M1,areaEnd:M1,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:D1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wFe(e){return new qQ(e)}function WQ(e){this._context=e}WQ.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:D1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _Fe(e){return new WQ(e)}function VQ(e){this._context=e}VQ.prototype={areaStart:M1,areaEnd:M1,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 SFe(e){return new VQ(e)}function kB(e){return e<0?-1:1}function NB(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(kB(i)+kB(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(l))||0}function TB(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function YN(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 L1(e){this._context=e}L1.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:YN(this,this._t0,TB(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,YN(this,TB(this,r=NB(this,e,t)),r);break;default:YN(this,this._t0,r=NB(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function GQ(e){this._context=new KQ(e)}(GQ.prototype=Object.create(L1.prototype)).point=function(e,t){L1.prototype.point.call(this,t,e)};function KQ(e){this._context=e}KQ.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 EFe(e){return new L1(e)}function kFe(e){return new GQ(e)}function YQ(e){this._context=e}YQ.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=jB(e),a=jB(t),i=0,s=1;s<r;++i,++s)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function jB(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,s[t]-=n*s[t-1];for(a[r-1]=s[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function NFe(e){return new YQ(e)}function U_(e,t){this._context=e,this._t=t}U_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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;
vendor: 17,160 bytes, lines 1227-1230
1227default:{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 TFe(e){return new U_(e,.5)}function jFe(e){return new U_(e,0)}function AFe(e){return new U_(e,1)}function ap(e,t){if((s=e.length)>1)for(var r=1,n,a,i=e[t[0]],s,l=i.length;r<s;++r)for(a=i,i=e[t[r]],n=0;n<l;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function gO(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function CFe(e,t){return e[t]}function OFe(e){const t=[];return t.key=e,t}function PFe(){var e=Xr([]),t=gO,r=ap,n=CFe;function a(i){var s=Array.from(e.apply(this,arguments),OFe),l,c=s.length,u=-1,d;for(const f of i)for(l=0,++u;l<c;++l)(s[l][u]=[0,+n(f,s[l].key,u,i)]).data=f;for(l=0,d=SI(t(s));l<c;++l)s[d[l]].index=l;return r(s,d),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Xr(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Xr(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?gO:typeof i=="function"?i:Xr(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??ap,a):r},a}function RFe(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,s;a<i;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}ap(e,t)}}function IFe(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var s=0,l=0;s<a;++s)l+=e[s][r][1]||0;n[r][1]+=n[r][0]=-l/2}ap(e,t)}}function FFe(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,s;n<i;++n){for(var l=0,c=0,u=0;l<s;++l){for(var d=e[t[l]],f=d[n][1]||0,p=d[n-1][1]||0,m=(f-p)/2,x=0;x<l;++x){var y=e[t[x]],v=y[n][1]||0,b=y[n-1][1]||0;m+=v-b}c+=f,u+=m*f}a[n-1][1]+=a[n-1][0]=r,c&&(r-=u/c)}a[n-1][1]+=a[n-1][0]=r,ap(e,t)}}function Ug(e){"@babel/helpers - typeof";return Ug=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},Ug(e)}var MFe=["type","size","sizeType"];function xO(){return xO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xO.apply(this,arguments)}function AB(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 CB(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AB(Object(r),!0).forEach(function(n){DFe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AB(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DFe(e,t,r){return t=LFe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LFe(e){var t=$Fe(e,"string");return Ug(t)=="symbol"?t:t+""}function $Fe(e,t){if(Ug(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ug(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BFe(e,t){if(e==null)return{};var r=UFe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function UFe(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 XQ={symbolCircle:EI,symbolCross:lFe,symbolDiamond:uFe,symbolSquare:dFe,symbolStar:mFe,symbolTriangle:gFe,symbolWye:yFe},zFe=Math.PI/180,HFe=function(t){var r="symbol".concat(L_(t));return XQ[r]||EI},qFe=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*zFe;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}},WFe=function(t,r){XQ["symbol".concat(L_(t))]=r},z_=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,c=BFe(t,MFe),u=CB(CB({},c),{},{type:n,size:i,sizeType:l}),d=function(){var v=HFe(n),b=vFe().type(v).size(qFe(i,l,n));return b()},f=u.className,p=u.cx,m=u.cy,x=Nt(u,!0);return p===+p&&m===+m&&i===+i?se.createElement("path",xO({},x,{className:Jt("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(m,")"),d:d()})):null};z_.registerSymbol=WFe;function ip(e){"@babel/helpers - typeof";return ip=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},ip(e)}function yO(){return yO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yO.apply(this,arguments)}function OB(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 VFe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OB(Object(r),!0).forEach(function(n){zg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OB(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KFe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,QQ(n.key),n)}}function YFe(e,t,r){return t&&KFe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XFe(e,t,r){return t=$1(t),JFe(e,JQ()?Reflect.construct(t,r||[],$1(e).constructor):t.apply(e,r))}function JFe(e,t){if(t&&(ip(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QFe(e)}function QFe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JQ=function(){return!!e})()}function $1(e){return $1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$1(e)}function ZFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vO(e,t)}function vO(e,t){return vO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vO(e,t)}function zg(e,t,r){return t=QQ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QQ(e){var t=eMe(e,"string");return ip(t)=="symbol"?t:t+""}function eMe(e,t){if(ip(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ip(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Os=32,kI=(function(e){function t(){return GFe(this,t),XFe(this,t,arguments)}return ZFe(t,e),YFe(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Os/2,s=Os/6,l=Os/3,c=n.inactive?a:n.color;if(n.type==="plainline")return se.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Os,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return se.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,` 1228 A`).concat(s,",").concat(s,",0,1,1,").concat(2*l,",").concat(i,` 1229 H`).concat(Os,"M").concat(2*l,",").concat(i,` 1230 A`).concat(s,",").concat(s,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return se.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Os/8,"h").concat(Os,"v").concat(Os*3/4,"h").concat(-Os,"z"),className:"recharts-legend-icon"});if(se.isValidElement(n.legendIcon)){var u=VFe({},n);return delete u.legendIcon,se.cloneElement(n.legendIcon,u)}return se.createElement(z_,{fill:c,cx:i,cy:i,size:Os,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,s=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:Os,height:Os},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,x){var y=m.formatter||c,v=Jt(zg(zg({"recharts-legend-item":!0},"legend-item-".concat(x),!0),"inactive",m.inactive));if(m.type==="none")return null;var b=Mt(m.value)?null:m.value;Ao(!Mt(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var w=m.inactive?u:m.color;return se.createElement("li",yO({className:v,style:f,key:"legend-item-".concat(x)},ju(n.props,m,x)),se.createElement(dO,{width:s,height:s,viewBox:d,style:p},n.renderIcon(m)),se.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},y?y(b,m,x):b))})}},{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 se.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(N.PureComponent);zg(kI,"displayName","Legend");zg(kI,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var XN,PB;function tMe(){if(PB)return XN;PB=1;var e=F_();function t(){this.__data__=new e,this.size=0}return XN=t,XN}var JN,RB;function rMe(){if(RB)return JN;RB=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return JN=e,JN}var QN,IB;function nMe(){if(IB)return QN;IB=1;function e(t){return this.__data__.get(t)}return QN=e,QN}var ZN,FB;function aMe(){if(FB)return ZN;FB=1;function e(t){return this.__data__.has(t)}return ZN=e,ZN}var eT,MB;function iMe(){if(MB)return eT;MB=1;var e=F_(),t=gI(),r=xI(),n=200;function a(i,s){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<n-1)return c.push([i,s]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(i,s),this.size=l.size,this}return eT=a,eT}var tT,DB;function ZQ(){if(DB)return tT;DB=1;var e=F_(),t=tMe(),r=rMe(),n=nMe(),a=aMe(),i=iMe();function s(l){var c=this.__data__=new e(l);this.size=c.size}return s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=a,s.prototype.set=i,tT=s,tT}var rT,LB;function sMe(){if(LB)return rT;LB=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return rT=t,rT}var nT,$B;function oMe(){if($B)return nT;$B=1;function e(t){return this.__data__.has(t)}return nT=e,nT}var aT,BB;function eZ(){if(BB)return aT;BB=1;var e=xI(),t=sMe(),r=oMe();function n(a){var i=-1,s=a==null?0:a.length;for(this.__data__=new e;++i<s;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,aT=n,aT}var iT,UB;function tZ(){if(UB)return iT;UB=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return iT=e,iT}var sT,zB;function rZ(){if(zB)return sT;zB=1;function e(t,r){return t.has(r)}return sT=e,sT}var oT,HB;function nZ(){if(HB)return oT;HB=1;var e=eZ(),t=tZ(),r=rZ(),n=1,a=2;function i(s,l,c,u,d,f){var p=c&n,m=s.length,x=l.length;if(m!=x&&!(p&&x>m))return!1;var y=f.get(s),v=f.get(l);if(y&&v)return y==l&&v==s;var b=-1,w=!0,S=c&a?new e:void 0;for(f.set(s,l),f.set(l,s);++b<m;){var j=s[b],k=l[b];if(u)var E=p?u(k,j,b,l,s,f):u(j,k,b,s,l,f);if(E!==void 0){if(E)continue;w=!1;break}if(S){if(!t(l,function(T,O){if(!r(S,O)&&(j===T||d(j,T,c,u,f)))return S.push(O)})){w=!1;break}}else if(!(j===k||d(j,k,c,u,f))){w=!1;break}}return f.delete(s),f.delete(l),w}return oT=i,oT}var lT,qB;function lMe(){if(qB)return lT;qB=1;var e=Nl(),t=e.Uint8Array;return lT=t,lT}var cT,WB;function cMe(){if(WB)return cT;WB=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return cT=e,cT}var uT,VB;function NI(){if(VB)return uT;VB=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return uT=e,uT}var dT,GB;function uMe(){if(GB)return dT;GB=1;var e=ay(),t=lMe(),r=mI(),n=nZ(),a=cMe(),i=NI(),s=1,l=2,c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",x="[object Set]",y="[object String]",v="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",S=e?e.prototype:void 0,j=S?S.valueOf:void 0;function k(E,T,O,A,P,I,R){switch(O){case w:if(E.byteLength!=T.byteLength||E.byteOffset!=T.byteOffset)return!1;E=E.buffer,T=T.buffer;case b:return!(E.byteLength!=T.byteLength||!I(new t(E),new t(T)));case c:case u:case p:return r(+E,+T);case d:return E.name==T.name&&E.message==T.message;case m:case y:return E==T+"";case f:var M=a;case x:var L=A&s;if(M||(M=i),E.size!=T.size&&!L)return!1;var U=R.get(E);if(U)return U==T;A|=l,R.set(E,T);var W=n(M(E),M(T),A,P,I,R);return R.delete(E),W;case v:if(j)return j.call(E)==j.call(T)}return!1}return dT=k,dT}var fT,KB;function aZ(){if(KB)return fT;KB=1;function e(t,r){for(var n=-1,a=r.length,i=t.length;++n<a;)t[i+n]=r[n];return t}return fT=e,fT}var hT,YB;function dMe(){if(YB)return hT;YB=1;var e=aZ(),t=Gi();function r(n,a,i){var s=a(n);return t(n)?s:e(s,i(n))}return hT=r,hT}var pT,XB;function fMe(){if(XB)return pT;XB=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,s=[];++n<a;){var l=t[n];r(l,n,t)&&(s[i++]=l)}return s}return pT=e,pT}var mT,JB;function hMe(){if(JB)return mT;JB=1;function e(){return[]}return mT=e,mT}var gT,QB;function pMe(){if(QB)return gT;QB=1;var e=fMe(),t=hMe(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(s){return s==null?[]:(s=Object(s),e(a(s),function(l){return n.call(s,l)}))}:t;return gT=i,gT}var xT,ZB;function mMe(){if(ZB)return xT;ZB=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return xT=e,xT}var yT,eU;function gMe(){if(eU)return yT;eU=1;var e=Ec(),t=kc(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return yT=n,yT}var vT,tU;function TI(){if(tU)return vT;tU=1;var e=gMe(),t=kc(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&n.call(s,"callee")&&!a.call(s,"callee")};return vT=i,vT}var I0={exports:{}},bT,rU;function xMe(){if(rU)return bT;rU=1;function e(){return!1}return bT=e,bT}I0.exports;var nU;function iZ(){return nU||(nU=1,(function(e,t){var r=Nl(),n=xMe(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u})(I0,I0.exports)),I0.exports}var wT,aU;function jI(){if(aU)return wT;aU=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return wT=r,wT}var _T,iU;function AI(){if(iU)return _T;iU=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return _T=t,_T}var ST,sU;function yMe(){if(sU)return ST;sU=1;var e=Ec(),t=AI(),r=kc(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",x="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",S="[object Float64Array]",j="[object Int8Array]",k="[object Int16Array]",E="[object Int32Array]",T="[object Uint8Array]",O="[object Uint8ClampedArray]",A="[object Uint16Array]",P="[object Uint32Array]",I={};I[w]=I[S]=I[j]=I[k]=I[E]=I[T]=I[O]=I[A]=I[P]=!0,I[n]=I[a]=I[v]=I[i]=I[b]=I[s]=I[l]=I[c]=I[u]=I[d]=I[f]=I[p]=I[m]=I[x]=I[y]=!1;function R(M){return r(M)&&t(M.length)&&!!I[e(M)]}return ST=R,ST}var ET,oU;function sZ(){if(oU)return ET;oU=1;function e(t){return function(r){return t(r)}}return ET=e,ET}var F0={exports:{}};F0.exports;var lU;function vMe(){return lU||(lU=1,(function(e,t){var r=kQ(),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 c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l}
vendor: 2,928 bytes, line 1230
1230)(F0,F0.exports)),F0.exports}var kT,cU;function oZ(){if(cU)return kT;cU=1;var e=yMe(),t=sZ(),r=vMe(),n=r&&r.isTypedArray,a=n?t(n):e;return kT=a,kT}var NT,uU;function bMe(){if(uU)return NT;uU=1;var e=mMe(),t=TI(),r=Gi(),n=iZ(),a=jI(),i=oZ(),s=Object.prototype,l=s.hasOwnProperty;function c(u,d){var f=r(u),p=!f&&t(u),m=!f&&!p&&n(u),x=!f&&!p&&!m&&i(u),y=f||p||m||x,v=y?e(u.length,String):[],b=v.length;for(var w in u)(d||l.call(u,w))&&!(y&&(w=="length"||m&&(w=="offset"||w=="parent")||x&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||a(w,b)))&&v.push(w);return v}return NT=c,NT}var TT,dU;function wMe(){if(dU)return TT;dU=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return TT=t,TT}var jT,fU;function lZ(){if(fU)return jT;fU=1;function e(t,r){return function(n){return t(r(n))}}return jT=e,jT}var AT,hU;function _Me(){if(hU)return AT;hU=1;var e=lZ(),t=e(Object.keys,Object);return AT=t,AT}var CT,pU;function SMe(){if(pU)return CT;pU=1;var e=wMe(),t=_Me(),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 CT=a,CT}var OT,mU;function sy(){if(mU)return OT;mU=1;var e=pI(),t=AI();function r(n){return n!=null&&t(n.length)&&!e(n)}return OT=r,OT}var PT,gU;function H_(){if(gU)return PT;gU=1;var e=bMe(),t=SMe(),r=sy();function n(a){return r(a)?e(a):t(a)}return PT=n,PT}var RT,xU;function EMe(){if(xU)return RT;xU=1;var e=dMe(),t=pMe(),r=H_();function n(a){return e(a,r,t)}return RT=n,RT}var IT,yU;function kMe(){if(yU)return IT;yU=1;var e=EMe(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,s,l,c,u,d){var f=l&t,p=e(i),m=p.length,x=e(s),y=x.length;if(m!=y&&!f)return!1;for(var v=m;v--;){var b=p[v];if(!(f?b in s:n.call(s,b)))return!1}var w=d.get(i),S=d.get(s);if(w&&S)return w==s&&S==i;var j=!0;d.set(i,s),d.set(s,i);for(var k=f;++v<m;){b=p[v];var E=i[b],T=s[b];if(c)var O=f?c(T,E,b,s,i,d):c(E,T,b,i,s,d);if(!(O===void 0?E===T||u(E,T,l,c,d):O)){j=!1;break}k||(k=b=="constructor")}if(j&&!k){var A=i.constructor,P=s.constructor;A!=P&&"constructor"in i&&"constructor"in s&&!(typeof A=="function"&&A instanceof A&&typeof P=="function"&&P instanceof P)&&(j=!1)}return d.delete(i),d.delete(s),j}return IT=a,IT}var FT,vU;function NMe(){if(vU)return FT;vU=1;var e=_f(),t=Nl(),r=e(t,"DataView");return FT=r,FT}var MT,bU;function TMe(){if(bU)return MT;bU=1;var e=_f(),t=Nl(),r=e(t,"Promise");return MT=r,MT}var DT,wU;function cZ(){if(wU)return DT;wU=1;var e=_f(),t=Nl(),r=e(t,"Set");return DT=r,DT}var LT,_U;function jMe(){if(_U)return LT;_U=1;var e=_f(),t=Nl(),r=e(t,"WeakMap");return LT=r,LT}var $T,SU;function AMe(){if(SU)return $T;SU=1;var e=NMe(),t=gI(),r=TMe(),n=cZ(),a=jMe(),i=Ec(),s=NQ(),l="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=s(e),x=s(t),y=s(r),v=s(n),b=s(a),w=i;
vendor: 46,493 bytes, lines 1230-1238
1230return(e&&w(new e(new ArrayBuffer(1)))!=p||t&&w(new t)!=l||r&&w(r.resolve())!=u||n&&w(new n)!=d||a&&w(new a)!=f)&&(w=function(S){var j=i(S),k=j==c?S.constructor:void 0,E=k?s(k):"";if(E)switch(E){case m:return p;case x:return l;case y:return u;case v:return d;case b:return f}return j}),$T=w,$T}var BT,EU;function CMe(){if(EU)return BT;EU=1;var e=ZQ(),t=nZ(),r=uMe(),n=kMe(),a=AMe(),i=Gi(),s=iZ(),l=oZ(),c=1,u="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function x(y,v,b,w,S,j){var k=i(y),E=i(v),T=k?d:a(y),O=E?d:a(v);T=T==u?f:T,O=O==u?f:O;var A=T==f,P=O==f,I=T==O;if(I&&s(y)){if(!s(v))return!1;k=!0,A=!1}if(I&&!A)return j||(j=new e),k||l(y)?t(y,v,b,w,S,j):r(y,v,T,b,w,S,j);if(!(b&c)){var R=A&&m.call(y,"__wrapped__"),M=P&&m.call(v,"__wrapped__");if(R||M){var L=R?y.value():y,U=M?v.value():v;return j||(j=new e),S(L,U,b,w,j)}}return I?(j||(j=new e),n(y,v,b,w,S,j)):!1}return BT=x,BT}var UT,kU;function CI(){if(kU)return UT;kU=1;var e=CMe(),t=kc();function r(n,a,i,s,l){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,s,r,l)}return UT=r,UT}var zT,NU;function OMe(){if(NU)return zT;NU=1;var e=ZQ(),t=CI(),r=1,n=2;function a(i,s,l,c){var u=l.length,d=u,f=!c;if(i==null)return!d;for(i=Object(i);u--;){var p=l[u];if(f&&p[2]?p[1]!==i[p[0]]:!(p[0]in i))return!1}for(;++u<d;){p=l[u];var m=p[0],x=i[m],y=p[1];if(f&&p[2]){if(x===void 0&&!(m in i))return!1}else{var v=new e;if(c)var b=c(x,y,m,i,s,v);if(!(b===void 0?t(y,x,r|n,c,v):b))return!1}}return!0}return zT=a,zT}var HT,TU;function uZ(){if(TU)return HT;TU=1;var e=Uu();function t(r){return r===r&&!e(r)}return HT=t,HT}var qT,jU;function PMe(){if(jU)return qT;jU=1;var e=uZ(),t=H_();function r(n){for(var a=t(n),i=a.length;i--;){var s=a[i],l=n[s];a[i]=[s,l,e(l)]}return a}return qT=r,qT}var WT,AU;function dZ(){if(AU)return WT;AU=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return WT=e,WT}var VT,CU;function RMe(){if(CU)return VT;CU=1;var e=OMe(),t=PMe(),r=dZ();function n(a){var i=t(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(s){return s===a||e(s,a,i)}}return VT=n,VT}var GT,OU;function IMe(){if(OU)return GT;OU=1;function e(t,r){return t!=null&&r in Object(t)}return GT=e,GT}var KT,PU;function FMe(){if(PU)return KT;PU=1;var e=AQ(),t=TI(),r=Gi(),n=jI(),a=AI(),i=D_();function s(l,c,u){c=e(c,l);for(var d=-1,f=c.length,p=!1;++d<f;){var m=i(c[d]);if(!(p=l!=null&&u(l,m)))break;l=l[m]}return p||++d!=f?p:(f=l==null?0:l.length,!!f&&a(f)&&n(m,f)&&(r(l)||t(l)))}return KT=s,KT}var YT,RU;function MMe(){if(RU)return YT;RU=1;var e=IMe(),t=FMe();function r(n,a){return n!=null&&t(n,a,e)}return YT=r,YT}var XT,IU;function DMe(){if(IU)return XT;IU=1;var e=CI(),t=CQ(),r=MMe(),n=hI(),a=uZ(),i=dZ(),s=D_(),l=1,c=2;function u(d,f){return n(d)&&a(f)?i(s(d),f):function(p){var m=t(p,d);return m===void 0&&m===f?r(p,d):e(f,m,l|c)}}return XT=u,XT}var JT,FU;function om(){if(FU)return JT;FU=1;function e(t){return t}return JT=e,JT}var QT,MU;function LMe(){if(MU)return QT;MU=1;function e(t){return function(r){return r==null?void 0:r[t]}}return QT=e,QT}var ZT,DU;function $Me(){if(DU)return ZT;DU=1;var e=vI();function t(r){return function(n){return e(n,r)}}return ZT=t,ZT}var ej,LU;function BMe(){if(LU)return ej;LU=1;var e=LMe(),t=$Me(),r=hI(),n=D_();function a(i){return r(i)?e(n(i)):t(i)}return ej=a,ej}var tj,$U;function Tl(){if($U)return tj;$U=1;var e=RMe(),t=DMe(),r=om(),n=Gi(),a=BMe();function i(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?t(s[0],s[1]):e(s):a(s)}return tj=i,tj}var rj,BU;function fZ(){if(BU)return rj;BU=1;function e(t,r,n,a){for(var i=t.length,s=n+(a?1:-1);a?s--:++s<i;)if(r(t[s],s,t))return s;return-1}return rj=e,rj}var nj,UU;function UMe(){if(UU)return nj;UU=1;function e(t){return t!==t}return nj=e,nj}var aj,zU;function zMe(){if(zU)return aj;zU=1;function e(t,r,n){for(var a=n-1,i=t.length;++a<i;)if(t[a]===r)return a;return-1}return aj=e,aj}var ij,HU;function HMe(){if(HU)return ij;HU=1;var e=fZ(),t=UMe(),r=zMe();function n(a,i,s){return i===i?r(a,i,s):e(a,t,s)}return ij=n,ij}var sj,qU;function qMe(){if(qU)return sj;qU=1;var e=HMe();function t(r,n){var a=r==null?0:r.length;return!!a&&e(r,n,0)>-1}return sj=t,sj}var oj,WU;function WMe(){if(WU)return oj;WU=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;)if(n(r,t[a]))return!0;return!1}return oj=e,oj}var lj,VU;function VMe(){if(VU)return lj;VU=1;function e(){}return lj=e,lj}var cj,GU;function GMe(){if(GU)return cj;GU=1;var e=cZ(),t=VMe(),r=NI(),n=1/0,a=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return cj=a,cj}var uj,KU;function KMe(){if(KU)return uj;KU=1;var e=eZ(),t=qMe(),r=WMe(),n=rZ(),a=GMe(),i=NI(),s=200;function l(c,u,d){var f=-1,p=t,m=c.length,x=!0,y=[],v=y;if(d)x=!1,p=r;else if(m>=s){var b=u?null:a(c);if(b)return i(b);x=!1,p=n,v=new e}else v=u?[]:y;e:for(;++f<m;){var w=c[f],S=u?u(w):w;if(w=d||w!==0?w:0,x&&S===S){for(var j=v.length;j--;)if(v[j]===S)continue e;u&&v.push(S),y.push(w)}else p(v,S,d)||(v!==y&&v.push(S),y.push(w))}return y}return uj=l,uj}var dj,YU;function YMe(){if(YU)return dj;YU=1;var e=Tl(),t=KMe();function r(n,a){return n&&n.length?t(n,e(a,2)):[]}return dj=r,dj}var XMe=YMe();const XU=tr(XMe);function hZ(e,t,r){return t===!0?XU(e,r):Mt(t)?XU(e,t):e}function sp(e){"@babel/helpers - typeof";return sp=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},sp(e)}var JMe=["ref"];function JU(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 Bl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JU(Object(r),!0).forEach(function(n){q_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QU(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mZ(n.key),n)}}function ZMe(e,t,r){return t&&QU(e.prototype,t),r&&QU(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eDe(e,t,r){return t=B1(t),tDe(e,pZ()?Reflect.construct(t,r||[],B1(e).constructor):t.apply(e,r))}function tDe(e,t){if(t&&(sp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rDe(e)}function rDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pZ=function(){return!!e})()}function B1(e){return B1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},B1(e)}function nDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bO(e,t)}function bO(e,t){return bO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bO(e,t)}function q_(e,t,r){return t=mZ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mZ(e){var t=aDe(e,"string");return sp(t)=="symbol"?t:t+""}function aDe(e,t){if(sp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function iDe(e,t){if(e==null)return{};var r=sDe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sDe(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 oDe(e){return e.value}function lDe(e,t){if(se.isValidElement(e))return se.cloneElement(e,t);if(typeof e=="function")return se.createElement(e,t);t.ref;var r=iDe(t,JMe);return se.createElement(kI,r)}var ZU=1,pl=(function(e){function t(){var r;QMe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=eDe(this,t,[].concat(a)),q_(r,"lastBoundingBox",{width:-1,height:-1}),r}return nDe(t,e),ZMe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>ZU||Math.abs(a.height-this.lastBoundingBox.height)>ZU)&&(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?Bl({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,s=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,d=a.chartHeight,f,p;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();f={left:((u||0)-m.width)/2}}else f=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var x=this.getBBoxSnapshot();p={top:((d||0)-x.height)/2}}else p=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Bl(Bl({},f),p)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,s=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,f=Bl(Bl({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return se.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){n.wrapperNode=m}},lDe(i,Bl(Bl({},this.props),{},{payload:hZ(d,u,oDe)})))}}],[{key:"getWithHeight",value:function(n,a){var i=Bl(Bl({},this.defaultProps),n.props),s=i.layout;return s==="vertical"&&it(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||a}:null}}])})(N.PureComponent);q_(pl,"displayName","Legend");q_(pl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var fj,e9;function cDe(){if(e9)return fj;e9=1;var e=ay(),t=TI(),r=Gi(),n=e?e.isConcatSpreadable:void 0;function a(i){return r(i)||t(i)||!!(n&&i&&i[n])}return fj=a,fj}var hj,t9;function gZ(){if(t9)return hj;t9=1;var e=aZ(),t=cDe();function r(n,a,i,s,l){var c=-1,u=n.length;for(i||(i=t),l||(l=[]);++c<u;){var d=n[c];a>0&&i(d)?a>1?r(d,a-1,i,s,l):e(l,d):s||(l[l.length]=d)}return l}return hj=r,hj}var pj,r9;function uDe(){if(r9)return pj;r9=1;function e(t){return function(r,n,a){for(var i=-1,s=Object(r),l=a(r),c=l.length;c--;){var u=l[t?c:++i];if(n(s[u],u,s)===!1)break}return r}}return pj=e,pj}var mj,n9;function dDe(){if(n9)return mj;n9=1;var e=uDe(),t=e();return mj=t,mj}var gj,a9;function xZ(){if(a9)return gj;a9=1;var e=dDe(),t=H_();function r(n,a){return n&&e(n,a,t)}return gj=r,gj}var xj,i9;function fDe(){if(i9)return xj;i9=1;var e=sy();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,c=Object(a);(n?l--:++l<s)&&i(c[l],l,c)!==!1;);return a}}return xj=t,xj}var yj,s9;function OI(){if(s9)return yj;s9=1;var e=xZ(),t=fDe(),r=t(e);return yj=r,yj}var vj,o9;function yZ(){if(o9)return vj;o9=1;var e=OI(),t=sy();function r(n,a){var i=-1,s=t(n)?Array(n.length):[];return e(n,function(l,c,u){s[++i]=a(l,c,u)}),s}return vj=r,vj}var bj,l9;function hDe(){if(l9)return bj;l9=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return bj=e,bj}var wj,c9;function pDe(){if(c9)return wj;c9=1;var e=am();function t(r,n){if(r!==n){var a=r!==void 0,i=r===null,s=r===r,l=e(r),c=n!==void 0,u=n===null,d=n===n,f=e(n);if(!u&&!f&&!l&&r>n||l&&c&&d&&!u&&!f||i&&c&&d||!a&&d||!s)return 1;if(!i&&!l&&!f&&r<n||f&&a&&s&&!i&&!l||u&&a&&s||!c&&s||!d)return-1}return 0}return wj=t,wj}var _j,u9;function mDe(){if(u9)return _j;u9=1;var e=pDe();function t(r,n,a){for(var i=-1,s=r.criteria,l=n.criteria,c=s.length,u=a.length;++i<c;){var d=e(s[i],l[i]);if(d){if(i>=u)return d;var f=a[i];return d*(f=="desc"?-1:1)}}return r.index-n.index}return _j=t,_j}var Sj,d9;function gDe(){if(d9)return Sj;d9=1;var e=yI(),t=vI(),r=Tl(),n=yZ(),a=hDe(),i=sZ(),s=mDe(),l=om(),c=Gi();function u(d,f,p){f.length?f=e(f,function(y){return c(y)?function(v){return t(v,y.length===1?y[0]:y)}:y}):f=[l];var m=-1;f=e(f,i(r));var x=n(d,function(y,v,b){var w=e(f,function(S){return S(y)});return{criteria:w,index:++m,value:y}});return a(x,function(y,v){return s(y,v,p)})}return Sj=u,Sj}var Ej,f9;function xDe(){if(f9)return Ej;f9=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 Ej=e,Ej}var kj,h9;function yDe(){if(h9)return kj;h9=1;var e=xDe(),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,c=t(s.length-a,0),u=Array(c);++l<c;)u[l]=s[a+l];l=-1;for(var d=Array(a+1);++l<a;)d[l]=s[l];return d[a]=i(u),e(n,this,d)}}return kj=r,kj}var Nj,p9;function vDe(){if(p9)return Nj;p9=1;function e(t){return function(){return t}}return Nj=e,Nj}var Tj,m9;function vZ(){if(m9)return Tj;m9=1;var e=_f(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Tj=t,Tj}var jj,g9;function bDe(){if(g9)return jj;g9=1;var e=vDe(),t=vZ(),r=om(),n=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return jj=n,jj}var Aj,x9;function wDe(){if(x9)return Aj;x9=1;var e=800,t=16,r=Date.now;function n(a){var i=0,s=0;return function(){var l=r(),c=t-(l-s);if(s=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Aj=n,Aj}var Cj,y9;function _De(){if(y9)return Cj;y9=1;var e=bDe(),t=wDe(),r=t(e);return Cj=r,Cj}var Oj,v9;function SDe(){if(v9)return Oj;v9=1;var e=om(),t=yDe(),r=_De();function n(a,i){return r(t(a,i,e),a+"")}return Oj=n,Oj}var Pj,b9;function W_(){if(b9)return Pj;b9=1;var e=mI(),t=sy(),r=jI(),n=Uu();function a(i,s,l){if(!n(l))return!1;var c=typeof s;return(c=="number"?t(l)&&r(s,l.length):c=="string"&&s in l)?e(l[s],i):!1}return Pj=a,Pj}var Rj,w9;function EDe(){if(w9)return Rj;w9=1;var e=gZ(),t=gDe(),r=SDe(),n=W_(),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 Rj=a,Rj}var kDe=EDe();const PI=tr(kDe);function Hg(e){"@babel/helpers - typeof";return Hg=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},Hg(e)}function wO(){return wO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wO.apply(this,arguments)}function NDe(e,t){return CDe(e)||ADe(e,t)||jDe(e,t)||TDe()}function TDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1231In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jDe(e,t){if(e){if(typeof e=="string")return _9(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 _9(e,t)}}function _9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ADe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function CDe(e){if(Array.isArray(e))return e}function S9(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 Ij(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S9(Object(r),!0).forEach(function(n){ODe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ODe(e,t,r){return t=PDe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PDe(e){var t=RDe(e,"string");return Hg(t)=="symbol"?t:t+""}function RDe(e,t){if(Hg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hg(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IDe(e){return Array.isArray(e)&&ca(e[0])&&ca(e[1])?e.join(" ~ "):e}var FDe=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,s=t.itemStyle,l=s===void 0?{}:s,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,p=t.itemSorter,m=t.wrapperClassName,x=t.labelClassName,y=t.label,v=t.labelFormatter,b=t.accessibilityLayer,w=b===void 0?!1:b,S=function(){if(d&&d.length){var R={padding:0,margin:0},M=(p?PI(d,p):d).map(function(L,U){if(L.type==="none")return null;var W=Ij({display:"block",paddingTop:4,paddingBottom:4,color:L.color||"#000"},l),V=L.formatter||f||IDe,G=L.value,K=L.name,F=G,ne=K;if(V&&F!=null&&ne!=null){var H=V(G,K,L,U,d);if(Array.isArray(H)){var B=NDe(H,2);F=B[0],ne=B[1]}else F=H}return se.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:W},ca(ne)?se.createElement("span",{className:"recharts-tooltip-item-name"},ne):null,ca(ne)?se.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,se.createElement("span",{className:"recharts-tooltip-item-value"},F),se.createElement("span",{className:"recharts-tooltip-item-unit"},L.unit||""))});return se.createElement("ul",{className:"recharts-tooltip-item-list",style:R},M)}return null},j=Ij({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),k=Ij({margin:0},u),E=!Dt(y),T=E?y:"",O=Jt("recharts-default-tooltip",m),A=Jt("recharts-tooltip-label",x);E&&v&&d!==void 0&&d!==null&&(T=v(y,d));var P=w?{role:"status","aria-live":"assertive"}:{};return se.createElement("div",wO({className:O,style:j},P),se.createElement("p",{className:A,style:k},se.isValidElement(T)?T:"".concat(T)),S())};function qg(e){"@babel/helpers - typeof";return qg=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},qg(e)}function ab(e,t,r){return t=MDe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MDe(e){var t=DDe(e,"string");return qg(t)=="symbol"?t:t+""}function DDe(e,t){if(qg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qg(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x0="recharts-tooltip-wrapper",LDe={visibility:"hidden"};function $De(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Jt(x0,ab(ab(ab(ab({},"".concat(x0,"-right"),it(r)&&t&&it(t.x)&&r>=t.x),"".concat(x0,"-left"),it(r)&&t&&it(t.x)&&r<t.x),"".concat(x0,"-bottom"),it(n)&&t&&it(t.y)&&n>=t.y),"".concat(x0,"-top"),it(n)&&t&&it(t.y)&&n<t.y))}function E9(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&it(i[n]))return i[n];var d=r[n]-l-a,f=r[n]+a;if(t[n])return s[n]?d:f;if(s[n]){var p=d,m=c[n];return p<m?Math.max(f,c[n]):Math.max(d,c[n])}var x=f+l,y=c[n]+u;return x>y?Math.max(d,c[n]):Math.max(f,c[n])}function BDe(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 UDe(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,d,f;return s.height>0&&s.width>0&&r?(d=E9({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=E9({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=BDe({translateX:d,translateY:f,useTranslate3d:l})):u=LDe,{cssProperties:u,cssClasses:$De({translateX:d,translateY:f,coordinate:r})}}function op(e){"@babel/helpers - typeof";return op=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},op(e)}function k9(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 N9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k9(Object(r),!0).forEach(function(n){SO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wZ(n.key),n)}}function qDe(e,t,r){return t&&HDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WDe(e,t,r){return t=U1(t),VDe(e,bZ()?Reflect.construct(t,r||[],U1(e).constructor):t.apply(e,r))}function VDe(e,t){if(t&&(op(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GDe(e)}function GDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bZ=function(){return!!e})()}function U1(e){return U1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},U1(e)}function KDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_O(e,t)}function _O(e,t){return _O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_O(e,t)}function SO(e,t,r){return t=wZ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wZ(e){var t=YDe(e,"string");return op(t)=="symbol"?t:t+""}function YDe(e,t){if(op(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(op(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var T9=1,XDe=(function(e){function t(){var r;zDe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=WDe(this,t,[].concat(a)),SO(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),SO(r,"handleKeyDown",function(s){if(s.key==="Escape"){var l,c,u,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),r}return KDe(t,e),qDe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>T9||Math.abs(n.height-this.state.lastBoundingBox.height)>T9)&&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,c=a.animationEasing,u=a.children,d=a.coordinate,f=a.hasPayload,p=a.isAnimationActive,m=a.offset,x=a.position,y=a.reverseDirection,v=a.useTranslate3d,b=a.viewBox,w=a.wrapperStyle,S=UDe({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:m,position:x,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:b}),j=S.cssClasses,k=S.cssProperties,E=N9(N9({transition:p&&i?"transform ".concat(l,"ms ").concat(c):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},w);return se.createElement("div",{tabIndex:-1,className:j,style:E,ref:function(O){n.wrapperNode=O}},u)}}])})(N.PureComponent),JDe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Nc={isSsr:JDe()};function lp(e){"@babel/helpers - typeof";return lp=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},lp(e)}function j9(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 A9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j9(Object(r),!0).forEach(function(n){RI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,SZ(n.key),n)}}function e5e(e,t,r){return t&&ZDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function t5e(e,t,r){return t=z1(t),r5e(e,_Z()?Reflect.construct(t,r||[],z1(e).constructor):t.apply(e,r))}function r5e(e,t){if(t&&(lp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n5e(e)}function n5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_Z=function(){return!!e})()}function z1(e){return z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},z1(e)}function a5e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EO(e,t)}function EO(e,t){return EO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},EO(e,t)}function RI(e,t,r){return t=SZ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SZ(e){var t=i5e(e,"string");return lp(t)=="symbol"?t:t+""}function i5e(e,t){if(lp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function s5e(e){return e.dataKey}function o5e(e,t){return se.isValidElement(e)?se.cloneElement(e,t):typeof e=="function"?se.createElement(e,t):se.createElement(FDe,t)}var Ln=(function(e){function t(){return QDe(this,t),t5e(this,t,arguments)}return a5e(t,e),e5e(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,d=a.coordinate,f=a.filterNull,p=a.isAnimationActive,m=a.offset,x=a.payload,y=a.payloadUniqBy,v=a.position,b=a.reverseDirection,w=a.useTranslate3d,S=a.viewBox,j=a.wrapperStyle,k=x??[];f&&k.length&&(k=hZ(x.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),y,s5e));var E=k.length>0;return se.createElement(XDe,{allowEscapeViewBox:s,animationDuration:l,animationEasing:c,isAnimationActive:p,active:i,coordinate:d,hasPayload:E,offset:m,position:v,reverseDirection:b,useTranslate3d:w,viewBox:S,wrapperStyle:j},o5e(u,A9(A9({},this.props),{},{payload:k})))}}])})(N.PureComponent);RI(Ln,"displayName","Tooltip");RI(Ln,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Nc.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 Fj,C9;function l5e(){if(C9)return Fj;C9=1;var e=Nl(),t=function(){return e.Date.now()};return Fj=t,Fj}var Mj,O9;function c5e(){if(O9)return Mj;O9=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Mj=t,Mj}var Dj,P9;function u5e(){if(P9)return Dj;P9=1;var e=c5e(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Dj=r,Dj}var Lj,R9;function EZ(){if(R9)return Lj;R9=1;var e=u5e(),t=Uu(),r=am(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=i.test(u);return f||s.test(u)?l(u.slice(2),f?2:8):a.test(u)?n:+u}return Lj=c,Lj}var $j,I9;function d5e(){if(I9)return $j;I9=1;var e=Uu(),t=l5e(),r=EZ(),n="Expected a function",a=Math.max,i=Math.min;function s(l,c,u){var d,f,p,m,x,y,v=0,b=!1,w=!1,S=!0;if(typeof l!="function")throw new TypeError(n);c=r(c)||0,e(u)&&(b=!!u.leading,w="maxWait"in u,p=w?a(r(u.maxWait)||0,c):p,S="trailing"in u?!!u.trailing:S);function j(M){var L=d,U=f;return d=f=void 0,v=M,m=l.apply(U,L),m}function k(M){return v=M,x=setTimeout(O,c),b?j(M):m}function E(M){var L=M-y,U=M-v,W=c-L;return w?i(W,p-U):W}function T(M){var L=M-y,U=M-v;return y===void 0||L>=c||L<0||w&&U>=p}function O(){var M=t();if(T(M))return A(M);x=setTimeout(O,E(M))}function A(M){return x=void 0,S&&d?j(M):(d=f=void 0,m)}function P(){x!==void 0&&clearTimeout(x),v=0,d=y=f=x=void 0}function I(){return x===void 0?m:A(t())}function R(){var M=t(),L=T(M);if(d=arguments,f=this,y=M,L){if(x===void 0)return k(y);if(w)return clearTimeout(x),x=setTimeout(O,c),j(y)}return x===void 0&&(x=setTimeout(O,c)),m}return R.cancel=P,R.flush=I,R}return $j=s,$j}var Bj,F9;function f5e(){if(F9)return Bj;F9=1;var e=d5e(),t=Uu(),r="Expected a function";function n(a,i,s){var l=!0,c=!0;if(typeof a!="function")throw new TypeError(r);return t(s)&&(l="leading"in s?!!s.leading:l,c="trailing"in s?!!s.trailing:c),e(a,i,{leading:l,maxWait:i,trailing:c})}return Bj=n,Bj}var h5e=f5e();const kZ=tr(h5e);function Wg(e){"@babel/helpers - typeof";return Wg=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},Wg(e)}function M9(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 ib(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M9(Object(r),!0).forEach(function(n){p5e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p5e(e,t,r){return t=m5e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m5e(e){var t=g5e(e,"string");return Wg(t)=="symbol"?t:t+""}function g5e(e,t){if(Wg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wg(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x5e(e,t){return w5e(e)||b5e(e,t)||v5e(e,t)||y5e()}function y5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1232In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v5e(e,t){if(e){if(typeof e=="string")return D9(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 D9(e,t)}}function D9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b5e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function w5e(e){if(Array.isArray(e))return e}var Hs=N.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,s=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,p=e.maxHeight,m=e.children,x=e.debounce,y=x===void 0?0:x,v=e.id,b=e.className,w=e.onResize,S=e.style,j=S===void 0?{}:S,k=N.useRef(null),E=N.useRef();E.current=w,N.useImperativeHandle(t,function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})});var T=N.useState({containerWidth:a.width,containerHeight:a.height}),O=x5e(T,2),A=O[0],P=O[1],I=N.useCallback(function(M,L){P(function(U){var W=Math.round(M),V=Math.round(L);return U.containerWidth===W&&U.containerHeight===V?U:{containerWidth:W,containerHeight:V}})},[]);N.useEffect(function(){var M=function(K){var F,ne=K[0].contentRect,H=ne.width,B=ne.height;I(H,B),(F=E.current)===null||F===void 0||F.call(E,H,B)};y>0&&(M=kZ(M,y,{trailing:!0,leading:!1}));var L=new ResizeObserver(M),U=k.current.getBoundingClientRect(),W=U.width,V=U.height;return I(W,V),L.observe(k.current),function(){L.disconnect()}},[I,y]);var R=N.useMemo(function(){var M=A.containerWidth,L=A.containerHeight;if(M<0||L<0)return null;Ao(Cd(s)||Cd(c),`The width(%s) and height(%s) are both fixed numbers, 1233 maybe you don't need to use a ResponsiveContainer.`,s,c),Ao(!r||r>0,"The aspect(%s) must be greater than zero.",r);var U=Cd(s)?M:s,W=Cd(c)?L:c;r&&r>0&&(U?W=U/r:W&&(U=W*r),p&&W>p&&(W=p)),Ao(U>0||W>0,`The width(%s) and height(%s) of chart should be greater than 0, 1234 please check the style of container, or the props width(%s) and height(%s), 1235 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 1236 height and width.`,U,W,s,c,d,f,r);var V=!Array.isArray(m)&&ac(m.type).endsWith("Chart");return se.Children.map(m,function(G){return se.isValidElement(G)?N.cloneElement(G,ib({width:U,height:W},V?{style:ib({height:"100%",width:"100%",maxHeight:W,maxWidth:U},G.props.style)}:{})):G})},[r,m,c,p,f,d,A,s]);return se.createElement("div",{id:v?"".concat(v):void 0,className:Jt("recharts-responsive-container",b),style:ib(ib({},j),{},{width:s,height:c,minWidth:d,minHeight:f,maxHeight:p}),ref:k},R)}),Li=function(t){return null};Li.displayName="Cell";function Vg(e){"@babel/helpers - typeof";return Vg=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},Vg(e)}function L9(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 kO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L9(Object(r),!0).forEach(function(n){_5e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _5e(e,t,r){return t=S5e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S5e(e){var t=E5e(e,"string");return Vg(t)=="symbol"?t:t+""}function E5e(e,t){if(Vg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vg(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lh={widthCache:{},cacheCount:0},k5e=2e3,N5e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},$9="recharts_measurement_span";function T5e(e){var t=kO({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var eg=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Nc.isSsr)return{width:0,height:0};var n=T5e(r),a=JSON.stringify({text:t,copyStyle:n});if(lh.widthCache[a])return lh.widthCache[a];try{var i=document.getElementById($9);i||(i=document.createElement("span"),i.setAttribute("id",$9),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=kO(kO({},N5e),n);Object.assign(i.style,s),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return lh.widthCache[a]=c,++lh.cacheCount>k5e&&(lh.cacheCount=0,lh.widthCache={}),c}catch{return{width:0,height:0}}},j5e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Gg(e){"@babel/helpers - typeof";return Gg=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},Gg(e)}function H1(e,t){return P5e(e)||O5e(e,t)||C5e(e,t)||A5e()}function A5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1237In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C5e(e,t){if(e){if(typeof e=="string")return B9(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 B9(e,t)}}function B9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O5e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function P5e(e){if(Array.isArray(e))return e}function R5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U9(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F5e(n.key),n)}}function I5e(e,t,r){return t&&U9(e.prototype,t),r&&U9(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function F5e(e){var t=M5e(e,"string");return Gg(t)=="symbol"?t:t+""}function M5e(e,t){if(Gg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gg(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var z9=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,H9=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,D5e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,L5e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,NZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},$5e=Object.keys(NZ),bh="NaN";function B5e(e,t){return e*NZ[t]}var sb=(function(){function e(t,r){R5e(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!D5e.test(r)&&(this.num=NaN,this.unit=""),$5e.includes(r)&&(this.num=B5e(t,r),this.unit="px")}return I5e(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=L5e.exec(r))!==null&&n!==void 0?n:[],i=H1(a,3),s=i[1],l=i[2];return new e(parseFloat(s),l??"")}}])})();function TZ(e){if(e.includes(bh))return bh;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=z9.exec(t))!==null&&r!==void 0?r:[],a=H1(n,4),i=a[1],s=a[2],l=a[3],c=sb.parse(i??""),u=sb.parse(l??""),d=s==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return bh;t=t.replace(z9,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,p=(f=H9.exec(t))!==null&&f!==void 0?f:[],m=H1(p,4),x=m[1],y=m[2],v=m[3],b=sb.parse(x??""),w=sb.parse(v??""),S=y==="+"?b.add(w):b.subtract(w);if(S.isNaN())return bh;t=t.replace(H9,S.toString())}return t}var q9=/\(([^()]*)\)/;function U5e(e){for(var t=e;t.includes("(");){var r=q9.exec(t),n=H1(r,2),a=n[1];t=t.replace(q9,TZ(a))}return t}function z5e(e){var t=e.replace(/\s+/g,"");return t=U5e(t),t=TZ(t),t}function H5e(e){try{return z5e(e)}catch{return bh}}function Uj(e){var t=H5e(e.slice(5,-1));return t===bh?"":t}var q5e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],W5e=["dx","dy","angle","className","breakAll"];function NO(){return NO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},NO.apply(this,arguments)}function W9(e,t){if(e==null)return{};var r=V5e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function V5e(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 V9(e,t){return X5e(e)||Y5e(e,t)||K5e(e,t)||G5e()}function G5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1238In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K5e(e,t){if(e){if(typeof e=="string")return G9(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 G9(e,t)}}function G9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Y5e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}
1238finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function X5e(e){if(Array.isArray(e))return e}var jZ=/[ \f\n\r\t\v\u2028\u2029]+/,AZ=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];Dt(r)||(n?i=r.toString().split(""):i=r.toString().split(jZ));var s=i.map(function(c){return{word:c,width:eg(c,a).width}}),l=n?0:eg(" ",a).width;return{wordsWithComputedWidth:s,spaceWidth:l}}catch{return null}},J5e=function(t,r,n,a,i){var s=t.maxLines,l=t.children,c=t.style,u=t.breakAll,d=it(s),f=l,p=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce(function(W,V){var G=V.word,K=V.width,F=W[W.length-1];if(F&&(a==null||i||F.width+K+n<Number(a)))F.words.push(G),F.width+=K+n;else{var ne={words:[G],width:K};W.push(ne)}return W},[])},m=p(r),x=function(U){return U.reduce(function(W,V){return W.width>V.width?W:V})};if(!d)return m;for(var y="â¦",v=function(U){var W=f.slice(0,U),V=AZ({breakAll:u,style:c,children:W+y}).wordsWithComputedWidth,G=p(V),K=G.length>s||x(G).width>Number(a);return[K,G]},b=0,w=f.length-1,S=0,j;b<=w&&S<=f.length-1;){var k=Math.floor((b+w)/2),E=k-1,T=v(E),O=V9(T,2),A=O[0],P=O[1],I=v(k),R=V9(I,1),M=R[0];if(!A&&!M&&(b=k+1),A&&M&&(w=k-1),!A&&M){j=P;break}S++}return j||m},K9=function(t){var r=Dt(t)?[]:t.toString().split(jZ);return[{words:r}]},Q5e=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,l=t.maxLines;if((r||n)&&!Nc.isSsr){var c,u,d=AZ({breakAll:s,children:a,style:i});if(d){var f=d.wordsWithComputedWidth,p=d.spaceWidth;c=f,u=p}else return K9(a);return J5e({breakAll:s,children:a,maxLines:l,style:i},c,u,r,n)}return K9(a)},Y9="#808080",nf=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,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,p=t.textAnchor,m=p===void 0?"start":p,x=t.verticalAnchor,y=x===void 0?"end":x,v=t.fill,b=v===void 0?Y9:v,w=W9(t,q5e),S=N.useMemo(function(){return Q5e({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:f,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,f,w.style,w.width]),j=w.dx,k=w.dy,E=w.angle,T=w.className,O=w.breakAll,A=W9(w,W5e);if(!ca(n)||!ca(i))return null;var P=n+(it(j)?j:0),I=i+(it(k)?k:0),R;switch(y){case"start":R=Uj("calc(".concat(u,")"));break;case"middle":R=Uj("calc(".concat((S.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:R=Uj("calc(".concat(S.length-1," * -").concat(l,")"));break}var M=[];if(f){var L=S[0].width,U=w.width;M.push("scale(".concat((it(U)?U/L:1)/L,")"))}return E&&M.push("rotate(".concat(E,", ").concat(P,", ").concat(I,")")),M.length&&(A.transform=M.join(" ")),se.createElement("text",NO({},Nt(A,!0),{x:P,y:I,className:Jt("recharts-text",T),textAnchor:m,fill:b.includes("url")?Y9:b}),S.map(function(W,V){var G=W.words.join(O?"":" ");return se.createElement("tspan",{x:P,dy:V===0?R:l,key:"".concat(G,"-").concat(V)},G)}))};function gu(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Z5e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function II(e){let t,r,n;e.length!==2?(t=gu,r=(l,c)=>gu(e(l),c),n=(l,c)=>e(l)-c):(t=e===gu||e===Z5e?e:eLe,r=e,n=e);function a(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(l[f],c)<0?u=f+1:d=f}while(u<d)}return u}function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(l[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function s(l,c,u=0,d=l.length){const f=a(l,c,u,d-1);return f>u&&n(l[f-1],c)>-n(l[f],c)?f-1:f}return{left:a,center:s,right:i}}function eLe(){return 0}function CZ(e){return e===null?NaN:+e}function*tLe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const rLe=II(gu),oy=rLe.right;II(CZ).center;class X9 extends Map{constructor(t,r=iLe){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(J9(this,t))}has(t){return super.has(J9(this,t))}set(t,r){return super.set(nLe(this,t),r)}delete(t){return super.delete(aLe(this,t))}}function J9({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function nLe({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function aLe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function iLe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function sLe(e=gu){if(e===gu)return OZ;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 OZ(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}
1238const oLe=Math.sqrt(50),lLe=Math.sqrt(10),cLe=Math.sqrt(2);function q1(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>=oLe?10:i>=lLe?5:i>=cLe?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/s,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*s,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=r&&r<2?q1(e,t,r*2):[l,c,u]}function TO(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,s]=n?q1(t,e,r):q1(e,t,r);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(n)if(s<0)for(let u=0;u<l;++u)c[u]=(i-u)/-s;else for(let u=0;u<l;++u)c[u]=(i-u)*s;else if(s<0)for(let u=0;u<l;++u)c[u]=(a+u)/-s;else for(let u=0;u<l;++u)c[u]=(a+u)*s;return c}function jO(e,t,r){return t=+t,e=+e,r=+r,q1(e,t,r)[2]}function AO(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?jO(t,e,r):jO(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Q9(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Z9(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function PZ(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?OZ:sLe(a);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),m=Math.max(r,Math.floor(t-u*f/c+p)),x=Math.min(n,Math.floor(t+(c-u)*f/c+p));PZ(e,t,m,x,a)}const i=e[t];let s=r,l=n;for(y0(e,r,t),a(e[n],i)>0&&y0(e,r,n);s<l;){for(y0(e,s,l),++s,--l;a(e[s],i)<0;)++s;for(;a(e[l],i)>0;)--l}a(e[r],i)===0?y0(e,r,l):(++l,y0(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function y0(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function uLe(e,t,r){if(e=Float64Array.from(tLe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Z9(e);if(t>=1)return Q9(e);var n,a=(n-1)*t,i=Math.floor(a),s=Q9(PZ(e,i).subarray(0,i+1)),l=Z9(e.subarray(i+1));return s+(l-s)*(a-i)}}function dLe(e,t,r=CZ){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 fLe(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<a;)i[n]=e+n*r;return i}function ro(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Tc(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const CO=Symbol("implicit");function FI(){var e=new X9,t=[],r=[],n=CO;function a(i){let s=e.get(i);if(s===void 0){if(n!==CO)return n;e.set(i,s=t.push(i)-1)}return r[s%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new X9;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return FI(t,r).unknown(n)},ro.apply(a,arguments),a}function Kg(){var e=FI().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,s,l=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var p=t().length,m=a<n,x=m?a:n,y=m?n:a;i=(y-x)/Math.max(1,p-c+u*2),l&&(i=Math.floor(i)),x+=(y-x-i*(p-c))*d,s=i*(1-c),l&&(x=Math.round(x),s=Math.round(s));var v=fLe(p).map(function(b){return x+i*b});return r(m?v.reverse():v)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([n,a]=p,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(p){return[n,a]=p,n=+n,a=+a,l=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(p){return arguments.length?(l=!!p,f()):l},e.padding=function(p){return arguments.length?(c=Math.min(1,u=+p),f()):c},e.paddingInner=function(p){return arguments.length?(c=Math.min(1,p),f()):c},e.paddingOuter=function(p){return arguments.length?(u=+p,f()):u},e.align=function(p){return arguments.length?(d=Math.max(0,Math.min(1,p)),f()):d},e.copy=function(){return Kg(t(),[n,a]).round(l).paddingInner(c).paddingOuter(u).align(d)},ro.apply(f(),arguments)}function RZ(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return RZ(t())},e}function tg(){return RZ(Kg.apply(null,arguments).paddingInner(1))}function MI(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function IZ(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ly(){}var Yg=.7,W1=1/Yg,Uh="\\s*([+-]?\\d+)\\s*",Xg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ml="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hLe=/^#([0-9a-f]{3,8})$/,pLe=new RegExp(`^rgb\\(${Uh},${Uh},${Uh}\\)$`),mLe=new RegExp(`^rgb\\(${ml},${ml},${ml}\\)$`),gLe=new RegExp(`^rgba\\(${Uh},${Uh},${Uh},${Xg}\\)$`),xLe=new RegExp(`^rgba\\(${ml},${ml},${ml},${Xg}\\)$`),yLe=new RegExp(`^hsl\\(${Xg},${ml},${ml}\\)$`),vLe=new RegExp(`^hsla\\(${Xg},${ml},${ml},${Xg}\\)$`),e7={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};MI(ly,Jg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:t7,formatHex:t7,formatHex8:bLe,formatHsl:wLe,formatRgb:r7,toString:r7});function t7(){return this.rgb().formatHex()}function bLe(){return this.rgb().formatHex8()}function wLe(){return FZ(this).formatHsl()}function r7(){return this.rgb().formatRgb()}function Jg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=hLe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?n7(t):r===3?new $i(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ob(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ob(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=pLe.exec(e))?new $i(t[1],t[2],t[3],1):(t=mLe.exec(e))?new $i(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gLe.exec(e))?ob(t[1],t[2],t[3],t[4]):(t=xLe.exec(e))?ob(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yLe.exec(e))?s7(t[1],t[2]/100,t[3]/100,1):(t=vLe.exec(e))?s7(t[1],t[2]/100,t[3]/100,t[4]):e7.hasOwnProperty(e)?n7(e7[e]):e==="transparent"?new $i(NaN,NaN,NaN,0):null}function n7(e){return new $i(e>>16&255,e>>8&255,e&255,1)}function ob(e,t,r,n){return n<=0&&(e=t=r=NaN),new $i(e,t,r,n)}function _Le(e){return e instanceof ly||(e=Jg(e)),e?(e=e.rgb(),new $i(e.r,e.g,e.b,e.opacity)):new $i}function OO(e,t,r,n){return arguments.length===1?_Le(e):new $i(e,t,r,n??1)}function $i(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}MI($i,OO,IZ(ly,{brighter(e){return e=e==null?W1:Math.pow(W1,e),new $i(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yg:Math.pow(Yg,e),new $i(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $i(Wd(this.r),Wd(this.g),Wd(this.b),V1(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:a7,formatHex:a7,formatHex8:SLe,formatRgb:i7,toString:i7}));function a7(){return`#${Od(this.r)}${Od(this.g)}${Od(this.b)}`}function SLe(){return`#${Od(this.r)}${Od(this.g)}${Od(this.b)}${Od((isNaN(this.opacity)?1:this.opacity)*255)}`}function i7(){const e=V1(this.opacity);return`${e===1?"rgb(":"rgba("}${Wd(this.r)}, ${Wd(this.g)}, ${Wd(this.b)}${e===1?")":`, ${e})`}`}function V1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wd(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Od(e){return e=Wd(e),(e<16?"0":"")+e.toString(16)}function s7(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new vo(e,t,r,n)}function FZ(e){if(e instanceof vo)return new vo(e.h,e.s,e.l,e.opacity);if(e instanceof ly||(e=Jg(e)),!e)return new vo;if(e instanceof vo)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,c=(i+a)/2;return l?(t===i?s=(r-n)/l+(r<n)*6:r===i?s=(n-t)/l+2:s=(t-r)/l+4,l/=c<.5?i+a:2-i-a,s*=60):l=c>0&&c<1?0:s,new vo(s,l,c,e.opacity)}function ELe(e,t,r,n){return arguments.length===1?FZ(e):new vo(e,t,r,n??1)}function vo(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}MI(vo,ELe,IZ(ly,{brighter(e){return e=e==null?W1:Math.pow(W1,e),new vo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yg:Math.pow(Yg,e),new vo(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 $i(zj(e>=240?e-240:e+120,a,n),zj(e,a,n),zj(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new vo(o7(this.h),lb(this.s),lb(this.l),V1(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=V1(this.opacity);return`${e===1?"hsl(":"hsla("}${o7(this.h)}, ${lb(this.s)*100}%, ${lb(this.l)*100}%${e===1?")":`, ${e})`}`}}));function o7(e){return e=(e||0)%360,e<0?e+360:e}function lb(e){return Math.max(0,Math.min(1,e||0))}function zj(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 DI=e=>()=>e;function kLe(e,t){return function(r){return e+r*t}}function NLe(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 TLe(e){return(e=+e)==1?MZ:function(t,r){return r-t?NLe(t,r,e):DI(isNaN(t)?r:t)}}function MZ(e,t){var r=t-e;return r?kLe(e,r):DI(isNaN(e)?t:e)}const l7=(function e(t){var r=TLe(t);function n(a,i){var s=r((a=OO(a)).r,(i=OO(i)).r),l=r(a.g,i.g),c=r(a.b,i.b),u=MZ(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=l(d),a.b=c(d),a.opacity=u(d),a+""}}return n.gamma=e,n})(1);function jLe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function ALe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function CLe(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),s;for(s=0;s<n;
vendor: 5,248 bytes, line 1238
1238++s)a[s]=lm(e[s],t[s]);for(;s<r;++s)i[s]=t[s];return function(l){for(s=0;s<n;++s)i[s]=a[s](l);return i}}function OLe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function G1(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function PLe(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=lm(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var PO=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hj=new RegExp(PO.source,"g");function RLe(e){return function(){return e}}function ILe(e){return function(t){return e(t)+""}}function FLe(e,t){var r=PO.lastIndex=Hj.lastIndex=0,n,a,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(n=PO.exec(e))&&(a=Hj.exec(t));)(i=a.index)>r&&(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,c.push({i:s,x:G1(n,a)})),r=Hj.lastIndex;return r<t.length&&(i=t.slice(r),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?ILe(c[0].x):RLe(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function lm(e,t){var r=typeof t,n;return t==null||r==="boolean"?DI(t):(r==="number"?G1:r==="string"?(n=Jg(t))?(t=n,l7):FLe:t instanceof Jg?l7:t instanceof Date?OLe:ALe(t)?jLe:Array.isArray(t)?CLe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?PLe:G1)(e,t)}function LI(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function MLe(e,t){t===void 0&&(t=e,e=lm);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(s){var l=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return i[l](s-l)}}function DLe(e){return function(){return e}}function K1(e){return+e}var c7=[0,1];function bi(e){return e}function RO(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:DLe(isNaN(t)?NaN:.5)}function LLe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function $Le(e,t,r){var n=e[0],a=e[1],i=t[0],s=t[1];return a<n?(n=RO(a,n),i=r(s,i)):(n=RO(n,a),i=r(i,s)),function(l){return i(n(l))}}function BLe(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=RO(e[s],e[s+1]),i[s]=r(t[s],t[s+1]);return function(l){var c=oy(e,l,1,n)-1;return i[c](a[c](l))}}function cy(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function V_(){var e=c7,t=c7,r=lm,n,a,i,s=bi,l,c,u;function d(){var p=Math.min(e.length,t.length);return s!==bi&&(s=LLe(e[0],e[p-1])),l=p>2?BLe:$Le,c=u=null,f}function f(p){return p==null||isNaN(p=+p)?i:(c||(c=l(e.map(n),t,r)))(n(s(p)))}return f.invert=function(p){return s(a((u||(u=l(t,e.map(n),G1)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,K1),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),r=LI,d()},f.clamp=function(p){return arguments.length?(s=p?!0:bi,d()):s!==bi},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,m){return n=p,a=m,d()}}function $I(){return V_()(bi,bi)}function ULe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Y1(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function cp(e){return e=Y1(Math.abs(e)),e?e[1]:NaN}function zLe(e,t){return function(r,n){for(var a=r.length,i=[],s=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),i.push(r.substring(a-=l,a+l)),!((c+=l+1)>n));)l=e[s=(s+1)%e.length];return i.reverse().join(t)}}function HLe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var qLe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qg(e){if(!(t=qLe.exec(e)))throw new Error("invalid format: "+e);var t;return new BI({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]})}Qg.prototype=BI.prototype;function BI(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+""}BI.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 WLe(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var DZ;function VLe(e,t){var r=Y1(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(DZ=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>
vendor: 5,906 bytes, line 1238
12380?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Y1(e,Math.max(0,t+i-1))[0]}function u7(e,t){var r=Y1(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 d7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ULe,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)=>u7(e*100,t),r:u7,s:VLe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function f7(e){return e}var h7=Array.prototype.map,p7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function GLe(e){var t=e.grouping===void 0||e.thousands===void 0?f7:zLe(h7.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?f7:HLe(h7.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Qg(f);var p=f.fill,m=f.align,x=f.sign,y=f.symbol,v=f.zero,b=f.width,w=f.comma,S=f.precision,j=f.trim,k=f.type;k==="n"?(w=!0,k="g"):d7[k]||(S===void 0&&(S=12),j=!0,k="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var E=y==="$"?r:y==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",T=y==="$"?n:/[%p]/.test(k)?s:"",O=d7[k],A=/[defgprs%]/.test(k);S=S===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function P(I){var R=E,M=T,L,U,W;if(k==="c")M=O(I)+M,I="";else{I=+I;var V=I<0||1/I<0;if(I=isNaN(I)?c:O(Math.abs(I),S),j&&(I=WLe(I)),V&&+I==0&&x!=="+"&&(V=!1),R=(V?x==="("?x:l:x==="-"||x==="("?"":x)+R,M=(k==="s"?p7[8+DZ/3]:"")+M+(V&&x==="("?")":""),A){for(L=-1,U=I.length;++L<U;)if(W=I.charCodeAt(L),48>W||W>57){M=(W===46?a+I.slice(L+1):I.slice(L))+M,I=I.slice(0,L);break}}}w&&!v&&(I=t(I,1/0));var G=R.length+I.length+M.length,K=G<b?new Array(b-G+1).join(p):"";switch(w&&v&&(I=t(K+I,K.length?b-M.length:1/0),K=""),m){case"<":I=R+I+M+K;break;case"=":I=R+K+I+M;break;case"^":I=K.slice(0,G=K.length>>1)+R+I+M+K.slice(G);break;default:I=K+R+I+M;break}return i(I)}return P.toString=function(){return f+""},P}function d(f,p){var m=u((f=Qg(f),f.type="f",f)),x=Math.max(-8,Math.min(8,Math.floor(cp(p)/3)))*3,y=Math.pow(10,-x),v=p7[8+x/3];return function(b){return m(y*b)+v}}return{format:u,formatPrefix:d}}var cb,UI,LZ;KLe({thousands:",",grouping:[3],currency:["$",""]});function KLe(e){return cb=GLe(e),UI=cb.format,LZ=cb.formatPrefix,cb}function YLe(e){return Math.max(0,-cp(Math.abs(e)))}function XLe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(cp(t)/3)))*3-cp(Math.abs(e)))}function JLe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,cp(t)-cp(e))+1}function $Z(e,t,r,n){var a=AO(e,t,r),i;switch(n=Qg(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=XLe(a,s))&&(n.precision=i),LZ(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=JLe(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=YLe(a))&&(n.precision=i-(n.type==="%")*2);break}}return UI(n)}function Hu(e){var t=e.domain;return e.ticks=function(r){var n=t();return TO(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return $Z(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],c,u,d=10;for(l<s&&(u=s,s=l,l=u,u=a,a=i,i=u);d-- >0;){if(u=jO(s,l,r),u===c)return n[a]=s,n[i]=l,t(n);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function X1(){var e=$I();return e.copy=function(){return cy(e,X1())},ro.apply(e,arguments),Hu(e)}function BZ(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,K1),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return BZ(e).unknown(t)},e=arguments.length?Array.from(e,K1):[0,1],Hu(r)}function UZ(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],s;return i<a&&(s=r,r=n,n=s,s=a,a=i,i=s),e[r]=t.floor(a),e[n]=t.ceil(i),e}function m7(e){return Math.log(e)}function g7(e){return Math.exp(e)}function QLe(e){return-Math.log(-e)}function ZLe(e){return-Math.exp(-e)}function e$e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function t$e(e){return e===10?e$e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function r$e(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 x7(e){return(t,r)=>-e(-t,r)}function zI(e){const t=e(m7,g7),r=t.domain;let n=10,a,i;function s(){return a=r$e(n),i=t$e(n),r()[0]<0?(a=x7(a),i=x7(i),e(QLe,ZLe)):e(m7,g7),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 c=r();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let p=a(u),m=a(d),x,y;const v=l==null?10:+l;let b=[];if(!(n%1)&&m-p<v){if(p=Math.floor(p),m=Math.ceil(m),u>0){for(;p<=m;++p)for(x=1;x<n;++x)if(y=p<0?x/i(-p):x*i(p),!(y<u)){if(y>d)break;b.push(y)}}else for(;p<=m;++p)for(x=n-1;x>=1;--x)if(y=p>0?x/i(-p):x*i(p),!(y<u)){if(y>d)break;b.push(y)}b.length*2<v&&(b=TO(u,d,v))}else b=TO(p,m,Math.min(m-p,v)).map(i);return f?b.reverse():b},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Qg(c)).precision==null&&(c.trim=!0),c=UI(c)),l===1/0)return c;const u=Math.max(1,n*l/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*n<n-.5&&(f*=n),f<=u?c(d):""}},t.nice=()=>r(UZ(r(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function zZ(){const e=zI(V_()).domain([1,10]);return e.copy=()=>cy(e,zZ()).base(e.base()),ro.apply(e,arguments),e}
1238function y7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function v7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function HI(e){var t=1,r=e(y7(t),v7(t));return r.constant=function(n){return arguments.length?e(y7(t=+n),v7(t)):t},Hu(r)}function HZ(){var e=HI(V_());return e.copy=function(){return cy(e,HZ()).constant(e.constant())},ro.apply(e,arguments)}function b7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function n$e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function a$e(e){return e<0?-e*e:e*e}function qI(e){var t=e(bi,bi),r=1;function n(){return r===1?e(bi,bi):r===.5?e(n$e,a$e):e(b7(r),b7(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Hu(t)}function WI(){var e=qI(V_());return e.copy=function(){return cy(e,WI()).exponent(e.exponent())},ro.apply(e,arguments),e}function i$e(){return WI.apply(null,arguments).exponent(.5)}function w7(e){return Math.sign(e)*e*e}function s$e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function qZ(){var e=$I(),t=[0,1],r=!1,n;function a(i){var s=s$e(e(i));return isNaN(s)?n:r?Math.round(s):s}return a.invert=function(i){return e.invert(w7(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,K1)).map(w7)),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 qZ(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ro.apply(a,arguments),Hu(a)}function WZ(){var e=[],t=[],r=[],n;function a(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s<l;)r[s-1]=dLe(e,s/l);return i}function i(s){return s==null||isNaN(s=+s)?n:t[oy(r,s)]}return i.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(gu),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return WZ().domain(e).range(t).unknown(n)},ro.apply(i,arguments)}function VZ(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function s(c){return c!=null&&c<=c?a[oy(n,c,0,r)]:i}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,l()):a.slice()},s.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return VZ().domain([e,t]).range(a).unknown(i)},ro.apply(Hu(s),arguments)}function GZ(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[oy(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 GZ().domain(e).range(t).unknown(r)},ro.apply(a,arguments)}const qj=new Date,Wj=new Date;function da(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<l-i?s:l},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<s)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<s);return c},a.filter=i=>da(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)=>(qj.setTime(+i),Wj.setTime(+s),e(qj),e(Wj),Math.floor(r(qj,Wj))),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 J1=da(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);J1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?da(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):J1);J1.range;const Jl=1e3,Vs=Jl*60,Ql=Vs*60,hc=Ql*24,VI=hc*7,_7=hc*30,Vj=hc*365,Pd=da(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Jl)},(e,t)=>(t-e)/Jl,e=>e.getUTCSeconds());Pd.range;const GI=da(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jl)},(e,t)=>{e.setTime(+e+t*Vs)},(e,t)=>(t-e)/Vs,e=>e.getMinutes());GI.range;const KI=da(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vs)},(e,t)=>(t-e)/Vs,e=>e.getUTCMinutes());KI.range;const YI=da(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jl-e.getMinutes()*Vs)},(e,t)=>{e.setTime(+e+t*Ql)},(e,t)=>(t-e)/Ql,e=>e.getHours());YI.range;const XI=da(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ql)},(e,t)=>(t-e)/Ql,e=>e.getUTCHours());XI.range;const uy=da(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vs)/hc,e=>e.getDate()-1);uy.range;const G_=da(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hc,e=>e.getUTCDate()-1);G_.range;const KZ=da(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hc,e=>Math.floor(e/hc));KZ.range;function Sf(e){return da(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())*Vs)/VI)}const K_=Sf(0),Q1=Sf(1),o$e=Sf(2),l$e=Sf(3),up=Sf(4),c$e=Sf(5),u$e=Sf(6);K_.range;Q1.range;o$e.range;l$e.range;up.range;c$e.range;u$e.range;function Ef(e){return da(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)/VI)}const Y_=Ef(0),Z1=Ef(1),d$e=Ef(2),f$e=Ef(3),dp=Ef(4),h$e=Ef(5),p$e=Ef(6);Y_.range;Z1.range;d$e.range;f$e.range;dp.range;h$e.range;p$e.range;const JI=da(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());JI.range;const QI=da(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());QI.range;const pc=da(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());pc.every=e=>
vendor: 4,516 bytes, line 1238
1238!isFinite(e=Math.floor(e))||!(e>0)?null:da(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)});pc.range;const mc=da(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());mc.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:da(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)});mc.range;function YZ(e,t,r,n,a,i){const s=[[Pd,1,Jl],[Pd,5,5*Jl],[Pd,15,15*Jl],[Pd,30,30*Jl],[i,1,Vs],[i,5,5*Vs],[i,15,15*Vs],[i,30,30*Vs],[a,1,Ql],[a,3,3*Ql],[a,6,6*Ql],[a,12,12*Ql],[n,1,hc],[n,2,2*hc],[r,1,VI],[t,1,_7],[t,3,3*_7],[e,1,Vj]];function l(u,d,f){const p=d<u;p&&([u,d]=[d,u]);const m=f&&typeof f.range=="function"?f:c(u,d,f),x=m?m.range(u,+d+1):[];return p?x.reverse():x}function c(u,d,f){const p=Math.abs(d-u)/f,m=II(([,,v])=>v).right(s,p);if(m===s.length)return e.every(AO(u/Vj,d/Vj,f));if(m===0)return J1.every(Math.max(AO(u,d,f),1));const[x,y]=s[p/s[m-1][2]<s[m][2]/p?m-1:m];return x.every(y)}return[l,c]}const[m$e,g$e]=YZ(mc,QI,Y_,KZ,XI,KI),[x$e,y$e]=YZ(pc,JI,K_,uy,YI,GI);function Gj(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Kj(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function v0(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function v$e(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,u=b0(a),d=w0(a),f=b0(i),p=w0(i),m=b0(s),x=w0(s),y=b0(l),v=w0(l),b=b0(c),w=w0(c),S={a:V,A:G,b:K,B:F,c:null,d:j7,e:j7,f:z$e,g:Q$e,G:e6e,H:$$e,I:B$e,j:U$e,L:XZ,m:H$e,M:q$e,p:ne,q:H,Q:O7,s:P7,S:W$e,u:V$e,U:G$e,V:K$e,w:Y$e,W:X$e,x:null,X:null,y:J$e,Y:Z$e,Z:t6e,"%":C7},j={a:B,A:X,b:Y,B:ae,c:null,d:A7,e:A7,f:i6e,g:m6e,G:x6e,H:r6e,I:n6e,j:a6e,L:QZ,m:s6e,M:o6e,p:fe,q:ue,Q:O7,s:P7,S:l6e,u:c6e,U:u6e,V:d6e,w:f6e,W:h6e,x:null,X:null,y:p6e,Y:g6e,Z:y6e,"%":C7},k={a:P,A:I,b:R,B:M,c:L,d:N7,e:N7,f:F$e,g:k7,G:E7,H:T7,I:T7,j:O$e,L:I$e,m:C$e,M:P$e,p:A,q:A$e,Q:D$e,s:L$e,S:R$e,u:E$e,U:k$e,V:N$e,w:S$e,W:T$e,x:U,X:W,y:k7,Y:E7,Z:j$e,"%":M$e};S.x=E(r,S),S.X=E(n,S),S.c=E(t,S),j.x=E(r,j),j.X=E(n,j),j.c=E(t,j);function E(oe,Z){return function(ce){var q=[],xe=-1,pe=0,Se=oe.length,he,ie,we;for(ce instanceof Date||(ce=new Date(+ce));++xe<Se;)oe.charCodeAt(xe)===37&&(q.push(oe.slice(pe,xe)),(ie=S7[he=oe.charAt(++xe)])!=null?he=oe.charAt(++xe):ie=he==="e"?" ":"0",(we=Z[he])&&(he=we(ce,ie)),q.push(he),pe=xe+1);return q.push(oe.slice(pe,xe)),q.join("")}}function T(oe,Z){return function(ce){var q=v0(1900,void 0,1),xe=O(q,oe,ce+="",0),pe,Se;if(xe!=ce.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(Z&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(pe=Kj(v0(q.y,0,1)),Se=pe.getUTCDay(),pe=Se>4||Se===0?Z1.ceil(pe):Z1(pe),pe=G_.offset(pe,(q.V-1)*7),q.y=pe.getUTCFullYear(),q.m=pe.getUTCMonth(),q.d=pe.getUTCDate()+(q.w+6)%7):(pe=Gj(v0(q.y,0,1)),Se=pe.getDay(),pe=Se>4||Se===0?Q1.ceil(pe):Q1(pe),pe=uy.offset(pe,(q.V-1)*7),q.y=pe.getFullYear(),q.m=pe.getMonth(),q.d=pe.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Se="Z"in q?Kj(v0(q.y,0,1)).getUTCDay():Gj(v0(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Se+5)%7:q.w+q.U*7-(Se+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,Kj(q)):Gj(q)}}function O(oe,Z,ce,q){for(var xe=0,pe=Z.length,Se=ce.length,he,ie;xe<pe;){if(q>=Se)return-1;if(he=Z.charCodeAt(xe++),he===37){if(he=Z.charAt(xe++),ie=k[he in S7?Z.charAt(xe++):he],!ie||(q=ie(oe,ce,q))<0)return-1}else if(he!=ce.charCodeAt(q++))return-1}return q}function A(oe,Z,ce){var q=u.exec(Z.slice(ce));return q?(oe.p=d.get(q[0].toLowerCase()),ce+q[0].length):-1}function P(oe,Z,ce){var q=m.exec(Z.slice(ce));return q?(oe.w=x.get(q[0].toLowerCase()),ce+q[0].length):-1}function I(oe,Z,ce){var q=f.exec(Z.slice(ce));return q?(oe.w=p.get(q[0].toLowerCase()),ce+q[0].length):-1}function R(oe,Z,ce){var q=b.exec(Z.slice(ce));return q?(oe.m=w.get(q[0].toLowerCase()),ce+q[0].length):-1}function M(oe,Z,ce){var q=y.exec(Z.slice(ce));return q?(oe.m=v.get(q[0].toLowerCase()),ce+q[0].length):-1}
vendor: 5,659 bytes, line 1238
1238function L(oe,Z,ce){return O(oe,t,Z,ce)}function U(oe,Z,ce){return O(oe,r,Z,ce)}function W(oe,Z,ce){return O(oe,n,Z,ce)}function V(oe){return s[oe.getDay()]}function G(oe){return i[oe.getDay()]}function K(oe){return c[oe.getMonth()]}function F(oe){return l[oe.getMonth()]}function ne(oe){return a[+(oe.getHours()>=12)]}function H(oe){return 1+~~(oe.getMonth()/3)}function B(oe){return s[oe.getUTCDay()]}function X(oe){return i[oe.getUTCDay()]}function Y(oe){return c[oe.getUTCMonth()]}function ae(oe){return l[oe.getUTCMonth()]}function fe(oe){return a[+(oe.getUTCHours()>=12)]}function ue(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var Z=E(oe+="",S);return Z.toString=function(){return oe},Z},parse:function(oe){var Z=T(oe+="",!1);return Z.toString=function(){return oe},Z},utcFormat:function(oe){var Z=E(oe+="",j);return Z.toString=function(){return oe},Z},utcParse:function(oe){var Z=T(oe+="",!0);return Z.toString=function(){return oe},Z}}}var S7={"-":"",_:" ",0:"0"},ka=/^\s*\d+/,b$e=/^%/,w$e=/[\\^$*+?|[\]().{}]/g;function Nr(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function _$e(e){return e.replace(w$e,"\\$&")}function b0(e){return new RegExp("^(?:"+e.map(_$e).join("|")+")","i")}function w0(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function S$e(e,t,r){var n=ka.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function E$e(e,t,r){var n=ka.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function k$e(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function N$e(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function T$e(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function E7(e,t,r){var n=ka.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function k7(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function j$e(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 A$e(e,t,r){var n=ka.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function C$e(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function N7(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function O$e(e,t,r){var n=ka.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function T7(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function P$e(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function R$e(e,t,r){var n=ka.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function I$e(e,t,r){var n=ka.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function F$e(e,t,r){var n=ka.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function M$e(e,t,r){var n=b$e.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function D$e(e,t,r){var n=ka.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function L$e(e,t,r){var n=ka.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function j7(e,t){return Nr(e.getDate(),t,2)}function $$e(e,t){return Nr(e.getHours(),t,2)}function B$e(e,t){return Nr(e.getHours()%12||12,t,2)}function U$e(e,t){return Nr(1+uy.count(pc(e),e),t,3)}function XZ(e,t){return Nr(e.getMilliseconds(),t,3)}function z$e(e,t){return XZ(e,t)+"000"}function H$e(e,t){return Nr(e.getMonth()+1,t,2)}function q$e(e,t){return Nr(e.getMinutes(),t,2)}function W$e(e,t){return Nr(e.getSeconds(),t,2)}function V$e(e){var t=e.getDay();return t===0?7:t}function G$e(e,t){return Nr(K_.count(pc(e)-1,e),t,2)}function JZ(e){var t=e.getDay();return t>=4||t===0?up(e):up.ceil(e)}function K$e(e,t){return e=JZ(e),Nr(up.count(pc(e),e)+(pc(e).getDay()===4),t,2)}function Y$e(e){return e.getDay()}function X$e(e,t){return Nr(Q1.count(pc(e)-1,e),t,2)}function J$e(e,t){return Nr(e.getFullYear()%100,t,2)}function Q$e(e,t){return e=JZ(e),Nr(e.getFullYear()%100,t,2)}function Z$e(e,t){return Nr(e.getFullYear()%1e4,t,4)}function e6e(e,t){var r=e.getDay();return e=r>=4||r===0?up(e):up.ceil(e),Nr(e.getFullYear()%1e4,t,4)}function t6e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Nr(t/60|0,"0",2)+Nr(t%60,"0",2)}function A7(e,t){return Nr(e.getUTCDate(),t,2)}function r6e(e,t){return Nr(e.getUTCHours(),t,2)}function n6e(e,t){return Nr(e.getUTCHours()%12||12,t,2)}function a6e(e,t){return Nr(1+G_.count(mc(e),e),t,3)}function QZ(e,t){return Nr(e.getUTCMilliseconds(),t,3)}function i6e(e,t){return QZ(e,t)+"000"}function s6e(e,t){return Nr(e.getUTCMonth()+1,t,2)}function o6e(e,t){return Nr(e.getUTCMinutes(),t,2)}function l6e(e,t){return Nr(e.getUTCSeconds(),t,2)}function c6e(e){var t=e.getUTCDay();return t===0?7:t}function u6e(e,t){return Nr(Y_.count(mc(e)-1,e),t,2)}function ZZ(e){var t=e.getUTCDay();return t>=4||t===0?dp(e):dp.ceil(e)}function d6e(e,t){return e=ZZ(e),Nr(dp.count(mc(e),e)+(mc(e).getUTCDay()===4),t,2)}function f6e(e){return e.getUTCDay()}function h6e(e,t){return Nr(Z1.count(mc(e)-1,e),t,2)}function p6e(e,t){return Nr(e.getUTCFullYear()%100,t,2)}function m6e(e,t){return e=ZZ(e),Nr(e.getUTCFullYear()%100,t,2)}function g6e(e,t){return Nr(e.getUTCFullYear()%1e4,t,4)}function x6e(e,t){var r=e.getUTCDay();return e=r>=4||r===0?dp(e):dp.ceil(e),Nr(e.getUTCFullYear()%1e4,t,4)}function y6e(){return"+0000"}function C7(){return"%"}function O7(e){return+e}function P7(e){return Math.floor(+e/1e3)}var ch,eee,tee;v6e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1238ay","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 v6e(e){return ch=v$e(e),eee=ch.format,ch.parse,tee=ch.utcFormat,ch.utcParse,ch}function b6e(e){return new Date(e)}function w6e(e){return e instanceof Date?+e:+new Date(+e)}function ZI(e,t,r,n,a,i,s,l,c,u){var d=$I(),f=d.invert,p=d.domain,m=u(".%L"),x=u(":%S"),y=u("%I:%M"),v=u("%I %p"),b=u("%a %d"),w=u("%b %d"),S=u("%B"),j=u("%Y");function k(E){return(c(E)<E?m:l(E)<E?x:s(E)<E?y:i(E)<E?v:n(E)<E?a(E)<E?b:w:r(E)<E?S:j)(E)}return d.invert=function(E){return new Date(f(E))},d.domain=function(E){return arguments.length?p(Array.from(E,w6e)):p().map(b6e)},d.ticks=function(E){var T=p();return e(T[0],T[T.length-1],E??10)},d.tickFormat=function(E,T){return T==null?k:u(T)},d.nice=function(E){var T=p();return(!E||typeof E.range!="function")&&(E=t(T[0],T[T.length-1],E??10)),E?p(UZ(T,E)):d},d.copy=function(){return cy(d,ZI(e,t,r,n,a,i,s,l,c,u))},d}function _6e(){return ro.apply(ZI(x$e,y$e,pc,JI,K_,uy,YI,GI,Pd,eee).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function S6e(){return ro.apply(ZI(m$e,g$e,mc,QI,Y_,G_,XI,KI,Pd,tee).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function X_(){var e=0,t=1,r,n,a,i,s=bi,l=!1,c;function u(f){return f==null||isNaN(f=+f)?c:s(a===0?.5:(f=(i(f)-r)*a,l?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(l=!!f,u):l},u.interpolator=function(f){return arguments.length?(s=f,u):s};function d(f){return function(p){var m,x;return arguments.length?([m,x]=p,s=f(m,x),u):[s(0),s(1)]}}return u.range=d(lm),u.rangeRound=d(LI),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function qu(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function ree(){var e=Hu(X_()(bi));return e.copy=function(){return qu(e,ree())},Tc.apply(e,arguments)}function nee(){var e=zI(X_()).domain([1,10]);return e.copy=function(){return qu(e,nee()).base(e.base())},Tc.apply(e,arguments)}function aee(){var e=HI(X_());return e.copy=function(){return qu(e,aee()).constant(e.constant())},Tc.apply(e,arguments)}function e3(){var e=qI(X_());return e.copy=function(){return qu(e,e3()).exponent(e.exponent())},Tc.apply(e,arguments)}function E6e(){return e3.apply(null,arguments).exponent(.5)}function iee(){var e=[],t=bi;function r(n){if(n!=null&&!isNaN(n=+n))return t((oy(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(gu),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>uLe(e,i/n))},r.copy=function(){return iee(t).domain(e)},Tc.apply(r,arguments)}function J_(){var e=0,t=.5,r=1,n=1,a,i,s,l,c,u=bi,d,f=!1,p;function m(y){return isNaN(y=+y)?p:(y=.5+((y=+d(y))-i)*(n*y<n*i?l:c),u(f?Math.max(0,Math.min(1,y)):y))}m.domain=function(y){return arguments.length?([e,t,r]=y,a=d(e=+e),i=d(t=+t),s=d(r=+r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,m):[e,t,r]},m.clamp=function(y){return arguments.length?(f=!!y,m):f},m.interpolator=function(y){return arguments.length?(u=y,m):u};function x(y){return function(v){var b,w,S;return arguments.length?([b,w,S]=v,u=MLe(y,[b,w,S]),m):[u(0),u(.5),u(1)]}}return m.range=x(lm),m.rangeRound=x(LI),m.unknown=function(y){return arguments.length?(p=y,m):p},function(y){return d=y,a=y(e),i=y(t),s=y(r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,m}}function see(){var e=Hu(J_()(bi));return e.copy=function(){return qu(e,see())},Tc.apply(e,arguments)}function oee(){var e=zI(J_()).domain([.1,1,10]);return e.copy=function(){return qu(e,oee()).base(e.base())},Tc.apply(e,arguments)}function lee(){var e=HI(J_());return e.copy=function(){return qu(e,lee()).constant(e.constant())},Tc.apply(e,arguments)}function t3(){var e=qI(J_());return e.copy=function(){return qu(e,t3()).exponent(e.exponent())},Tc.apply(e,arguments)}function k6e(){return t3.apply(null,arguments).exponent(.5)}const R7=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Kg,scaleDiverging:see,scaleDivergingLog:oee,scaleDivergingPow:t3,scaleDivergingSqrt:k6e,scaleDivergingSymlog:lee,scaleIdentity:BZ,scaleImplicit:CO,scaleLinear:X1,scaleLog:zZ,scaleOrdinal:FI,scalePoint:tg,scalePow:WI,scaleQuantile:WZ,scaleQuantize:VZ,scaleRadial:qZ,scaleSequential:ree,scaleSequentialLog:nee,scaleSequentialPow:e3,scaleSequentialQuantile:iee,scaleSequentialSqrt:E6e,scaleSequentialSymlog:aee,scaleSqrt:i$e,scaleSymlog:HZ,scaleThreshold:GZ,scaleTime:_6e,scaleUtc:S6e,tickFormat:$Z},Symbol.toStringTag,{value:"Module"}));var Yj,I7;function Q_(){if(I7)return Yj;I7=1;var e=am();function t(r,n,a){for(var i=-1,s=r.length;++i<s;){var l=r[i],c=n(l);if(c!=null&&(u===void 0?c===c&&!e(c):a(c,u)))var u=c,d=l}return d}return Yj=t,Yj}var Xj,F7;function cee(){if(F7)return Xj;F7=1;function e(t,r){return t>r}return Xj=e,Xj}var Jj,M7;function N6e(){if(M7)return Jj;
vendor: 63,141 bytes, lines 1238-1265
1238M7=1;var e=Q_(),t=cee(),r=om();function n(a){return a&&a.length?e(a,r,t):void 0}return Jj=n,Jj}var T6e=N6e();const du=tr(T6e);var Qj,D7;function uee(){if(D7)return Qj;D7=1;function e(t,r){return t<r}return Qj=e,Qj}var Zj,L7;function j6e(){if(L7)return Zj;L7=1;var e=Q_(),t=uee(),r=om();function n(a){return a&&a.length?e(a,r,t):void 0}return Zj=n,Zj}var A6e=j6e();const Z_=tr(A6e);var eA,$7;function C6e(){if($7)return eA;$7=1;var e=yI(),t=Tl(),r=yZ(),n=Gi();function a(i,s){var l=n(i)?e:r;return l(i,t(s,3))}return eA=a,eA}var tA,B7;function O6e(){if(B7)return tA;B7=1;var e=gZ(),t=C6e();function r(n,a){return e(t(n,a),1)}return tA=r,tA}var P6e=O6e();const R6e=tr(P6e);var rA,U7;function I6e(){if(U7)return rA;U7=1;var e=CI();function t(r,n){return e(r,n)}return rA=t,rA}var F6e=I6e();const Au=tr(F6e);var cm=1e9,M6e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},n3,pn=!0,Js="[DecimalError] ",Vd=Js+"Invalid argument: ",r3=Js+"Exponent out of range: ",um=Math.floor,xd=Math.pow,D6e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,us,va=1e7,nn=7,dee=9007199254740991,ew=um(dee/nn),vt={};vt.absoluteValue=vt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};vt.comparedTo=vt.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};vt.decimalPlaces=vt.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*nn;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};vt.dividedBy=vt.div=function(e){return ic(this,new this.constructor(e))};vt.dividedToIntegerBy=vt.idiv=function(e){var t=this,r=t.constructor;return zr(ic(t,new r(e),0,1),r.precision)};vt.equals=vt.eq=function(e){return!this.cmp(e)};vt.exponent=function(){return Qn(this)};vt.greaterThan=vt.gt=function(e){return this.cmp(e)>0};vt.greaterThanOrEqualTo=vt.gte=function(e){return this.cmp(e)>=0};vt.isInteger=vt.isint=function(){return this.e>this.d.length-2};vt.isNegative=vt.isneg=function(){return this.s<0};vt.isPositive=vt.ispos=function(){return this.s>0};vt.isZero=function(){return this.s===0};vt.lessThan=vt.lt=function(e){return this.cmp(e)<0};vt.lessThanOrEqualTo=vt.lte=function(e){return this.cmp(e)<1};vt.logarithm=vt.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(us))throw Error(Js+"NaN");if(r.s<1)throw Error(Js+(r.s?"NaN":"-Infinity"));return r.eq(us)?new n(0):(pn=!1,t=ic(Zg(r,i),Zg(e,i),i),pn=!0,zr(t,a))};vt.minus=vt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pee(t,e):fee(t,(e.s=-e.s,e))};vt.modulo=vt.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Js+"NaN");return r.s?(pn=!1,t=ic(r,e,0,1).times(e),pn=!0,r.minus(t)):zr(new n(r),a)};vt.naturalExponential=vt.exp=function(){return hee(this)};vt.naturalLogarithm=vt.ln=function(){return Zg(this)};vt.negated=vt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};vt.plus=vt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?fee(t,e):pee(t,(e.s=-e.s,e))};vt.precision=vt.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Vd+e);if(t=Qn(a)+1,n=a.d.length-1,r=n*nn+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};vt.squareRoot=vt.sqrt=function(){var e,t,r,n,a,i,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Js+"NaN")}for(e=Qn(l),pn=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=cl(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=um((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 c(t)):n=new c(a.toString()),r=c.precision,a=s=r+3;;)if(i=n,n=i.plus(ic(l,i,s+2)).times(.5),cl(i.d).slice(0,s)===(t=cl(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(zr(i,r+1,0),i.times(i).eq(l)){n=i;break}}else if(t!="9999")break;s+=4}return pn=!0,zr(n,r)};vt.times=vt.mul=function(e){var t,r,n,a,i,s,l,c,u,d=this,f=d.constructor,p=d.d,m=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,c=p.length,u=m.length,c<u&&(i=p,p=m,m=i,s=c,c=u,u=s),i=[],s=c+u,n=s;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=c+n;a>n;)l=i[a]+m[n]*p[a-n-1]+t,i[a--]=l%va|0,t=l/va|0;i[a]=(i[a]+t)%va|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,pn?zr(e,f.precision):e};vt.toDecimalPlaces=vt.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(_l(e,0,cm),t===void 0?t=n.rounding:_l(t,0,8),zr(r,e+Qn(r)+1,t))};vt.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=af(n,!0):(_l(e,0,cm),t===void 0?t=a.rounding:_l(t,0,8),n=zr(new a(n),e+1,t),r=af(n,!0,e+1)),r};vt.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?af(a):(_l(e,0,cm),t===void 0?t=i.rounding:_l(t,0,8),n=zr(new i(a),e+Qn(a)+1,t),r=af(n.abs(),!1,e+Qn(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};vt.toInteger=vt.toint=function(){var e=this,t=e.constructor;return zr(new t(e),Qn(e)+1,t.rounding)};vt.toNumber=function(){return+this};vt.toPower=vt.pow=function(e){var t,r,n,a,i,s,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(us);if(l=new c(l),!l.s){if(e.s<1)throw Error(Js+"Infinity");return l}if(l.eq(us))return l;if(n=c.precision,e.eq(us))return zr(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,i=l.s,s){if((r=d<0?-d:d)<=dee){for(a=new c(us),t=Math.ceil(n/nn+4),pn=!1;r%2&&(a=a.times(l),H7(a.d,t)),r=um(r/2),r!==0;)l=l.times(l),H7(l.d,t);return pn=!0,e.s<0?new c(us).div(a):zr(a,n)}}else if(i<0)throw Error(Js+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,pn=!1,a=e.times(Zg(l,n+u)),pn=!0,a=hee(a),a.s=i,a};vt.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Qn(a),n=af(a,r<=i.toExpNeg||r>=i.toExpPos)):(_l(e,1,cm),t===void 0?t=i.rounding:_l(t,0,8),a=zr(new i(a),e,t),r=Qn(a),n=af(a,e<=r||r<=i.toExpNeg,e)),n};vt.toSignificantDigits=vt.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(_l(e,1,cm),t===void 0?t=n.rounding:_l(t,0,8)),zr(new n(r),e,t)};vt.toString=vt.valueOf=vt.val=vt.toJSON=vt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Qn(e),r=e.constructor;return af(e,t<=r.toExpNeg||t>=r.toExpPos)};function fee(e,t){var r,n,a,i,s,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),pn?zr(t,f):t;if(c=e.d,u=t.d,s=e.e,a=t.e,c=c.slice(),i=s-a,i){for(i<0?(n=c,i=-i,l=u.length):(n=u,a=s,l=c.length),s=Math.ceil(f/nn),l=s>l?s+1:l+1,i>l&&(i=l,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,n=u,u=c,c=n),r=0;i;)r=(c[--i]=c[i]+u[i]+r)/va|0,c[i]%=va;for(r&&(c.unshift(r),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,pn?zr(t,f):t}function _l(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Vd+e)}function cl(e){var t,r,n,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)n=e[t]+"",r=nn-n.length,r&&(i+=Zc(r)),i+=n;s=e[t],n=s+"",r=nn-n.length,r&&(i+=Zc(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var ic=(function(){function e(n,a){var i,s=0,l=n.length;for(n=n.slice();l--;)i=n[l]*a+s,n[l]=i%va|0,s=i/va|0;return s&&n.unshift(s),n}function t(n,a,i,s){var l,c;if(i!=s)c=i>s?1:-1;else for(l=c=0;l<i;l++)if(n[l]!=a[l]){c=n[l]>a[l]?1:-1;break}return c}function r(n,a,i){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*va+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s){var l,c,u,d,f,p,m,x,y,v,b,w,S,j,k,E,T,O,A=n.constructor,P=n.s==a.s?1:-1,I=n.d,R=a.d;if(!n.s)return new A(n);if(!a.s)throw Error(Js+"Division by zero");for(c=n.e-a.e,T=R.length,k=I.length,m=new A(P),x=m.d=[],u=0;R[u]==(I[u]||0);)++u;if(R[u]>(I[u]||0)&&--c,i==null?w=i=A.precision:s?w=i+(Qn(n)-Qn(a))+1:w=i,w<0)return new A(0);if(w=w/nn+2|0,u=0,T==1)for(d=0,R=R[0],w++;(u<k||d)&&w--;u++)S=d*va+(I[u]||0),x[u]=S/R|0,d=S%R|0;else{for(d=va/(R[0]+1)|0,d>1&&(R=e(R,d),I=e(I,d),T=R.length,k=I.length),j=T,y=I.slice(0,T),v=y.length;v<T;)y[v++]=0;O=R.slice(),O.unshift(0),E=R[0],R[1]>=va/2&&++E;do d=0,l=t(R,y,T,v),l<0?(b=y[0],T!=v&&(b=b*va+(y[1]||0)),d=b/E|0,d>1?(d>=va&&(d=va-1),f=e(R,d),p=f.length,v=y.length,l=t(f,y,p,v),l==1&&(d--,r(f,T<p?O:R,p))):(d==0&&(l=d=1),f=R.slice()),p=f.length,p<v&&f.unshift(0),r(y,f,v),l==-1&&(v=y.length,l=t(R,y,T,v),l<1&&(d++,r(y,T<v?O:R,v))),v=y.length):l===0&&(d++,y=[0]),x[u++]=d,l&&y[0]?y[v++]=I[j]||0:(y=[I[j]],v=1);while((j++<k||y[0]!==void 0)&&w--)}return x[0]||x.shift(),m.e=c,zr(m,s?i+Qn(m)+1:i)}})();function hee(e,t){var r,n,a,i,s,l,c=0,u=0,d=e.constructor,f=d.precision;if(Qn(e)>16)throw Error(r3+Qn(e));if(!e.s)return new d(us);for(pn=!1,l=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(n=Math.log(xd(2,u))/Math.LN10*2+5|0,l+=n,r=a=i=new d(us),d.precision=l;;){if(a=zr(a.times(e),l),r=r.times(++c),s=i.plus(ic(a,r,l)),cl(s.d).slice(0,l)===cl(i.d).slice(0,l)){for(;u--;)i=zr(i.times(i),l);return d.precision=f,t==null?(pn=!0,zr(i,f)):i}i=s}}function Qn(e){for(var t=e.e*nn,r=e.d[0];r>=10;r/=10)t++;return t}function nA(e,t,r){if(t>e.LN10.sd())throw pn=!0,r&&(e.precision=r),Error(Js+"LN10 precision limit exceeded");return zr(new e(e.LN10),t)}function Zc(e){for(var t="";e--;)t+="0";return t}function Zg(e,t){var r,n,a,i,s,l,c,u,d,f=1,p=10,m=e,x=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(Js+(m.s?"NaN":"-Infinity"));if(m.eq(us))return new y(0);if(t==null?(pn=!1,u=v):u=t,m.eq(10))return t==null&&(pn=!0),nA(y,u);if(u+=p,y.precision=u,r=cl(x),n=r.charAt(0),i=Qn(m),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(e),r=cl(m.d),n=r.charAt(0),f++;i=Qn(m),n>1?(m=new y("0."+r),i++):m=new y(n+"."+r.slice(1))}else return c=nA(y,u+2,v).times(i+""),m=Zg(new y(n+"."+r.slice(1)),u-p).plus(c),y.precision=v,t==null?(pn=!0,zr(m,v)):m;for(l=s=m=ic(m.minus(us),m.plus(us),u),d=zr(m.times(m),u),a=3;;){if(s=zr(s.times(d),u),c=l.plus(ic(s,new y(a),u)),cl(c.d).slice(0,u)===cl(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(nA(y,u+2,v).times(i+""))),l=ic(l,new y(f),u),y.precision=v,t==null?(pn=!0,zr(l,v)):l;l=c,a+=2}}function z7(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=um(r/nn),e.d=[],n=(r+1)%nn,r<0&&(n+=nn),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=nn;n<a;)e.d.push(+t.slice(n,n+=nn));t=t.slice(n),n=nn-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),pn&&(e.e>ew||e.e<-ew))throw Error(r3+r)}else e.s=0,e.e=0,e.d=[0];return e}function zr(e,t,r){var n,a,i,s,l,c,u,d,f=e.d;for(s=1,i=f[0];i>=10;i/=10)s++;if(n=t-s,n<0)n+=nn,a=t,u=f[d=0];else{if(d=Math.ceil((n+1)/nn),i=f.length,d>=i)return e;for(u=i=f[d],s=1;i>=10;i/=10)s++;n%=nn,a=n-nn+s}if(r!==void 0&&(i=xd(10,s-a-1),l=u/i%10|0,c=t<0||f[d+1]!==void 0||u%i,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?a>0?u/xd(10,s-a):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(i=Qn(e),f.length=1,t=t-i-1,f[0]=xd(10,(nn-t%nn)%nn),e.e=um(-t/nn)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,i=1,d--):(f.length=d+1,i=xd(10,nn-n),f[d]=a>0?(u/xd(10,s-a)%xd(10,a)|0)*i:0),c)for(;;)if(d==0){(f[0]+=i)==va&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=va)break;f[d--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(pn&&(e.e>ew||e.e<-ew))throw Error(r3+Qn(e));return e}function pee(e,t){var r,n,a,i,s,l,c,u,d,f,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),pn?zr(t,m):t;if(c=e.d,f=t.d,n=t.e,u=e.e,c=c.slice(),s=u-n,s){for(d=s<0,d?(r=c,s=-s,l=f.length):(r=f,n=u,l=c.length),a=Math.max(Math.ceil(m/nn),l)+2,s>a&&(s=a,r.length=1),r.reverse(),a=s;a--;)r.push(0);r.reverse()}else{for(a=c.length,l=f.length,d=a<l,d&&(l=a),a=0;a<l;a++)if(c[a]!=f[a]){d=c[a]<f[a];break}s=0}for(d&&(r=c,c=f,f=r,t.s=-t.s),l=c.length,a=f.length-l;a>0;--a)c[l++]=0;for(a=f.length;a>s;){if(c[--a]<f[a]){for(i=a;i&&c[--i]===0;)c[i]=va-1;--c[i],c[a]+=va}c[a]-=f[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,pn?zr(t,m):t):new p(0)}function af(e,t,r){var n,a=Qn(e),i=cl(e.d),s=i.length;return t?(r&&(n=r-s)>0?i=i.charAt(0)+"."+i.slice(1)+Zc(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Zc(-a-1)+i,r&&(n=r-s)>0&&(i+=Zc(n))):a>=s?(i+=Zc(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+Zc(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-s)>0&&(a+1===s&&(i+="."),i+=Zc(n))),e.s<0?"-"+i:i}function H7(e,t){if(e.length>t)return e.length=t,!0}function mee(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(Vd+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 z7(s,i.toString())}else if(typeof i!="string")throw Error(Vd+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,D6e.test(i))z7(s,i);else throw Error(Vd+i)}if(a.prototype=vt,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=mee,a.config=a.set=L6e,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function L6e(e){if(!e||typeof e!="object")throw Error(Js+"Object expected");var t,r,n,a=["precision",1,cm,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(um(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Vd+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Vd+r+": "+n);return this}var n3=mee(M6e);us=new n3(1);const Dr=n3;function $6e(e){return H6e(e)||z6e(e)||U6e(e)||B6e()}function B6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1239In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U6e(e,t){if(e){if(typeof e=="string")return IO(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 IO(e,t)}}function z6e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function H6e(e){if(Array.isArray(e))return IO(e)}function IO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var q6e=function(t){return t},gee={},xee=function(t){return t===gee},q7=function(t){return function r(){return arguments.length===0||arguments.length===1&&xee(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},W6e=function e(t,r){return t===1?r:q7(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var s=a.filter(function(l){return l!==gee}).length;return s>=t?r.apply(void 0,a):e(t-s,q7(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=a.map(function(f){return xee(f)?c.shift():f});return r.apply(void 0,$6e(d).concat(c))}))})},eS=function(t){return W6e(t.length,t)},FO=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},V6e=eS(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),G6e=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return q6e;var a=r.reverse(),i=a[0],s=a.slice(1);return function(){return s.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},MO=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},yee=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return r&&i.every(function(l,c){return l===r[c]})||(r=i,n=t.apply(void 0,i)),n}};function K6e(e){var t;return e===0?t=1:t=Math.floor(new Dr(e).abs().log(10).toNumber())+1,t}function Y6e(e,t,r){for(var n=new Dr(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var X6e=eS(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),J6e=eS(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),Q6e=eS(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const tS={rangeStep:Y6e,getDigitCount:K6e,interpolateNumber:X6e,uninterpolateNumber:J6e,uninterpolateTruncation:Q6e};function DO(e){return t8e(e)||e8e(e)||vee(e)||Z6e()}function Z6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1240In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e8e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function t8e(e){if(Array.isArray(e))return LO(e)}function ex(e,t){return a8e(e)||n8e(e,t)||vee(e,t)||r8e()}function r8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1241In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vee(e,t){if(e){if(typeof e=="string")return LO(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 LO(e,t)}}function LO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n8e(e,t){if(!(typeof Symbol>"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(c){a=!0,i=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw i}}return r}}function a8e(e){if(Array.isArray(e))return e}function bee(e){var t=ex(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function wee(e,t,r){if(e.lte(0))return new Dr(0);var n=tS.getDigitCount(e.toNumber()),a=new Dr(10).pow(n),i=e.div(a),s=n!==1?.05:.1,l=new Dr(Math.ceil(i.div(s).toNumber())).add(r).mul(s),c=l.mul(a);return t?c:new Dr(Math.ceil(c))}function i8e(e,t,r){var n=1,a=new Dr(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Dr(10).pow(tS.getDigitCount(e)-1),a=new Dr(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Dr(Math.floor(e)))}else e===0?a=new Dr(Math.floor((t-1)/2)):r||(a=new Dr(Math.floor(e)));var s=Math.floor((t-1)/2),l=G6e(V6e(function(c){return a.add(new Dr(c-s).mul(n)).toNumber()}),FO);return l(0,t)}function _ee(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 Dr(0),tickMin:new Dr(0),tickMax:new Dr(0)};var i=wee(new Dr(t).sub(e).div(r-1),n,a),s;e<=0&&t>=0?s=new Dr(0):(s=new Dr(e).add(t).div(2),s=s.sub(new Dr(s).mod(i)));var l=Math.ceil(s.sub(e).div(i).toNumber()),c=Math.ceil(new Dr(t).sub(s).div(i).toNumber()),u=l+c+1;return u>r?_ee(e,t,r,n,a+1):(u<r&&(c=t>0?c+(r-u):c,l=t>0?l:l+(r-u)),{step:i,tickMin:s.sub(new Dr(l).mul(i)),tickMax:s.add(new Dr(c).mul(i))})}function s8e(e){var t=ex(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=bee([r,n]),c=ex(l,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(DO(FO(0,a-1).map(function(){return 1/0}))):[].concat(DO(FO(0,a-1).map(function(){return-1/0})),[d]);return r>n?MO(f):f}if(u===d)return i8e(u,a,i);var p=_ee(u,d,s,i),m=p.step,x=p.tickMin,y=p.tickMax,v=tS.rangeStep(x,y.add(new Dr(.1).mul(m)),m);return r>n?MO(v):v}function o8e(e,t){var r=ex(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=bee([n,a]),l=ex(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[n,a];if(c===u)return[c];var d=Math.max(t,2),f=wee(new Dr(u).sub(c).div(d-1),i,0),p=[].concat(DO(tS.rangeStep(new Dr(c),new Dr(u).sub(new Dr(.99).mul(f)),f)),[u]);return n>a?MO(p):p}var l8e=yee(s8e),c8e=yee(o8e),u8e="Invariant failed";function sf(e,t){throw new Error(u8e)}var d8e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function fp(e){"@babel/helpers - typeof";return fp=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},fp(e)}function tw(){return tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tw.apply(this,arguments)}function f8e(e,t){return g8e(e)||m8e(e,t)||p8e(e,t)||h8e()}function h8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1242In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p8e(e,t){if(e){if(typeof e=="string")return W7(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 W7(e,t)}}function W7(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m8e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function g8e(e){if(Array.isArray(e))return e}function x8e(e,t){if(e==null)return{};var r=y8e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function y8e(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 v8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b8e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kee(n.key),n)}}function w8e(e,t,r){return t&&b8e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _8e(e,t,r){return t=rw(t),S8e(e,See()?Reflect.construct(t,r||[],rw(e).constructor):t.apply(e,r))}function S8e(e,t){if(t&&(fp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E8e(e)}function E8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function See(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(See=function(){return!!e})()}function rw(e){return rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rw(e)}function k8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$O(e,t)}function $O(e,t){return $O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$O(e,t)}function Eee(e,t,r){return t=kee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kee(e){var t=N8e(e,"string");return fp(t)=="symbol"?t:t+""}function N8e(e,t){if(fp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dm=(function(e){function t(){return v8e(this,t),_8e(this,t,arguments)}return k8e(t,e),w8e(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,s=n.width,l=n.dataKey,c=n.data,u=n.dataPointFormatter,d=n.xAxis,f=n.yAxis,p=x8e(n,d8e),m=Nt(p,!1);this.props.direction==="x"&&d.type!=="number"&&sf();var x=c.map(function(y){var v=u(y,l),b=v.x,w=v.y,S=v.value,j=v.errorVal;if(!j)return null;var k=[],E,T;if(Array.isArray(j)){var O=f8e(j,2);E=O[0],T=O[1]}else E=T=j;if(i==="vertical"){var A=d.scale,P=w+a,I=P+s,R=P-s,M=A(S-E),L=A(S+T);k.push({x1:L,y1:I,x2:L,y2:R}),k.push({x1:M,y1:P,x2:L,y2:P}),k.push({x1:M,y1:I,x2:M,y2:R})}else if(i==="horizontal"){var U=f.scale,W=b+a,V=W-s,G=W+s,K=U(S-E),F=U(S+T);k.push({x1:V,y1:F,x2:G,y2:F}),k.push({x1:W,y1:K,x2:W,y2:F}),k.push({x1:V,y1:K,x2:G,y2:K})}return se.createElement(er,tw({className:"recharts-errorBar",key:"bar-".concat(k.map(function(ne){return"".concat(ne.x1,"-").concat(ne.x2,"-").concat(ne.y1,"-").concat(ne.y2)}))},m),k.map(function(ne){return se.createElement("line",tw({},ne,{key:"line-".concat(ne.x1,"-").concat(ne.x2,"-").concat(ne.y1,"-").concat(ne.y2)}))}))});return se.createElement(er,{className:"recharts-errorBars"},x)}}])})(se.Component);Eee(dm,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Eee(dm,"displayName","ErrorBar");function tx(e){"@babel/helpers - typeof";return tx=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},tx(e)}function V7(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 dd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V7(Object(r),!0).forEach(function(n){T8e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V7(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T8e(e,t,r){return t=j8e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j8e(e){var t=A8e(e,"string");return tx(t)=="symbol"?t:t+""}function A8e(e,t){if(tx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nee=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,s=ns(r,pl);if(!s)return null;var l=pl.defaultProps,c=l!==void 0?dd(dd({},l),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:i==="children"?u=(n||[]).reduce(function(d,f){var p=f.item,m=f.props,x=m.sectors||m.data||[];return d.concat(x.map(function(y){return{type:s.props.iconType||p.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):u=(n||[]).map(function(d){var f=d.item,p=f.type.defaultProps,m=p!==void 0?dd(dd({},p),f.props):{},x=m.dataKey,y=m.name,v=m.legendType,b=m.hide;return{inactive:b,dataKey:x,type:c.iconType||v||"square",color:a3(f),value:y||x,payload:m}}),dd(dd(dd({},c),pl.getWithHeight(s,a)),{},{payload:u,item:s})};function rx(e){"@babel/helpers - typeof";return rx=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},rx(e)}function G7(e){return R8e(e)||P8e(e)||O8e(e)||C8e()}function C8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1243In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O8e(e,t){if(e){if(typeof e=="string")return BO(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 BO(e,t)}}function P8e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R8e(e){if(Array.isArray(e))return BO(e)}function BO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function K7(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 jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K7(Object(r),!0).forEach(function(n){zh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K7(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zh(e,t,r){return t=I8e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I8e(e){var t=F8e(e,"string");return rx(t)=="symbol"?t:t+""}function F8e(e,t){if(rx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function on(e,t,r){return Dt(e)||Dt(t)?r:ca(t)?fs(e,t,r):Mt(t)?t(e):r}function rg(e,t,r,n){var a=R6e(e,function(l){return on(l,t)});if(r==="number"){var i=a.filter(function(l){return it(l)||parseFloat(l)});return i.length?[Z_(i),du(i)]:[1/0,-1/0]}var s=n?a.filter(function(l){return!Dt(l)}):a;return s.map(function(l){return ca(l)||l instanceof Date?l:""})}var M8e=function(t){var r,n=arguments.length>1&&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 c=i.range,u=0;u<l;u++){var d=u>0?a[u-1].coordinate:a[l-1].coordinate,f=a[u].coordinate,p=u>=l-1?a[0].coordinate:a[u+1].coordinate,m=void 0;if(yi(f-d)!==yi(p-f)){var x=[];if(yi(p-f)===yi(c[1]-c[0])){m=p;var y=f+c[1]-c[0];x[0]=Math.min(y,(y+d)/2),x[1]=Math.max(y,(y+d)/2)}else{m=d;var v=p+c[1]-c[0];x[0]=Math.min(f,(v+f)/2),x[1]=Math.max(f,(v+f)/2)}var b=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(t>b[0]&&t<=b[1]||t>=x[0]&&t<=x[1]){s=a[u].index;break}}else{var w=Math.min(d,p),S=Math.max(d,p);if(t>(w+f)/2&&t<=(S+f)/2){s=a[u].index;break}}}else for(var j=0;j<l;j++)if(j===0&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j>0&&j<l-1&&t>(n[j].coordinate+n[j-1].coordinate)/2&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j===l-1&&t>(n[j].coordinate+n[j-1].coordinate)/2){s=n[j].index;break}return s},a3=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?jn(jn({},t.type.defaultProps),t.props):t.props,s=i.stroke,l=i.fill,c;switch(a){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:l;break;default:c=l;break}return c},D8e=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),c=0,u=l.length;c<u;c++)for(var d=i[l[c]].stackGroups,f=Object.keys(d),p=0,m=f.length;p<m;p++){var x=d[f[p]],y=x.items,v=x.cateAxisId,b=y.filter(function(T){return ac(T.type).indexOf("Bar")>=0});if(b&&b.length){var w=b[0].type.defaultProps,S=w!==void 0?jn(jn({},w),b[0].props):b[0].props,j=S.barSize,k=S[v];s[k]||(s[k]=[]);var E=Dt(j)?r:j;s[k].push({item:b[0],stackList:b.slice(1),barSize:Dt(E)?void 0:vi(E,n,0)})}}return s},L8e=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,s=i===void 0?[]:i,l=t.maxBarSize,c=s.length;if(c<1)return null;var u=vi(r,a,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var p=!1,m=a/c,x=s.reduce(function(j,k){return j+k.barSize||0},0);x+=(c-1)*u,x>=a&&(x-=(c-1)*u,u=0),x>=a&&m>0&&(p=!0,m*=.9,x=c*m);var y=(a-x)/2>>0,v={offset:y-u,size:0};d=s.reduce(function(j,k){var E={item:k.item,position:{offset:v.offset+v.size+u,size:p?m:k.barSize}},T=[].concat(G7(j),[E]);return v=T[T.length-1].position,k.stackList&&k.stackList.length&&k.stackList.forEach(function(O){T.push({item:O,position:v})}),T},f)}else{var b=vi(n,a,0,!0);a-2*b-(c-1)*u<=0&&(u=0);var w=(a-2*b-(c-1)*u)/c;w>1&&(w>>=0);var S=l===+l?Math.min(w,l):w;d=s.reduce(function(j,k,E){var T=[].concat(G7(j),[{item:k.item,position:{offset:b+(w+u)*E+(w-S)/2,size:S}}]);return k.stackList&&k.stackList.length&&k.stackList.forEach(function(O){T.push({item:O,position:T[T.length-1].position})}),T},f)}return d},$8e=function(t,r,n,a){var i=n.children,s=n.width,l=n.margin,c=s-(l.left||0)-(l.right||0),u=Nee({children:i,legendWidth:c});if(u){var d=a||{},f=d.width,p=d.height,m=u.align,x=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&x==="middle")&&m!=="center"&&it(t[m]))return jn(jn({},t),{},zh({},m,t[m]+(f||0)));if((y==="horizontal"||y==="vertical"&&m==="center")&&x!=="middle"&&it(t[x]))return jn(jn({},t),{},zh({},x,t[x]+(p||0)))}return t},B8e=function(t,r,n){return Dt(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Tee=function(t,r,n,a,i){var s=r.props.children,l=Ei(s,dm).filter(function(u){return B8e(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=on(d,n);if(Dt(f))return u;var p=Array.isArray(f)?[Z_(f),du(f)]:[f,f],m=c.reduce(function(x,y){var v=on(d,y,0),b=p[0]-Math.abs(Array.isArray(v)?v[0]:v),w=p[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(b,x[0]),Math.max(w,x[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},U8e=function(t,r,n,a,i){var s=r.map(function(l){return Tee(t,l,n,i,a)}).filter(function(l){return!Dt(l)});return s&&s.length?s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},jee=function(t,r,n,a,i){var s=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&Tee(t,c,u,a)||rg(t,u,n,i)});if(n==="number")return s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return s.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)l[u[d]]||(l[u[d]]=!0,c.push(u[d]));return c},[])},Aee=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Cee=function(t,r,n,a){if(a)return t.map(function(c){return c.coordinate});var i,s,l=t.map(function(c){return c.coordinate===r&&(i=!0),c.coordinate===n&&(s=!0),c.coordinate});return i||l.push(r),s||l.push(n),l},Zl=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,s=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&s==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?yi(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var p=i?i.indexOf(f):f;return{coordinate:a(p)+u,value:f,offset:u}});return d.filter(function(f){return!sm(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,p){return{coordinate:a(f)+u,value:f,index:p,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,p){return{coordinate:a(f)+u,value:i?i[f]:f,index:p,offset:u}})},aA=new WeakMap,ub=function(t,r){if(typeof r!="function")return t;aA.has(t)||aA.set(t,new WeakMap);var n=aA.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},Oee=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:Kg(),realScaleType:"band"}:s==="radial"&&l==="angleAxis"?{scale:X1(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:tg(),realScaleType:"point"}:i==="category"?{scale:Kg(),realScaleType:"band"}:{scale:X1(),realScaleType:"linear"};if(iy(a)){var c="scale".concat(L_(a));return{scale:(R7[c]||tg)(),realScaleType:R7[c]?c:"point"}}return Mt(a)?{scale:a}:{scale:tg(),realScaleType:"point"}},Y7=1e-4,Pee=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])-Y7,s=Math.max(a[0],a[1])+Y7,l=t(r[0]),c=t(r[n-1]);(l<i||l>s||c<i||c>s)&&t.domain([r[0],r[n-1]])}},z8e=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},H8e=function(t,r){if(!r||r.length!==2||!it(r[0])||!it(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!it(t[0])||t[0]<n)&&(i[0]=n),(!it(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},q8e=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0,l=0;l<r;++l){var c=sm(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=i,t[l][n][1]=i+c,i=t[l][n][1]):(t[l][n][0]=s,t[l][n][1]=s+c,s=t[l][n][1])}},W8e=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0;s<r;++s){var l=sm(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=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)}},V8e={sign:q8e,expand:RFe,none:ap,silhouette:IFe,wiggle:FFe,positive:W8e},G8e=function(t,r,n){var a=r.map(function(l){return l.props.dataKey}),i=V8e[n],s=PFe().keys(a).value(function(l,c){return+on(l,c,0)}).order(gO).offset(i);return s(t)},K8e=function(t,r,n,a,i,s){if(!t)return null;var l=s?r.reverse():r,c={},u=l.reduce(function(f,p){var m,x=(m=p.type)!==null&&m!==void 0&&m.defaultProps?jn(jn({},p.type.defaultProps),p.props):p.props,y=x.stackId,v=x.hide;if(v)return f;var b=x[n],w=f[b]||{hasStack:!1,stackGroups:{}};if(ca(y)){var S=w.stackGroups[y]||{numericAxisId:n,cateAxisId:a,items:[]};S.items.push(p),w.hasStack=!0,w.stackGroups[y]=S}else w.stackGroups[zu("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[p]};return jn(jn({},f),{},zh({},b,w))},c),d={};return Object.keys(u).reduce(function(f,p){var m=u[p];if(m.hasStack){var x={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(y,v){var b=m.stackGroups[v];return jn(jn({},y),{},zh({},v,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:G8e(t,b.items,i)}))},x)}return jn(jn({},f),{},zh({},p,m))},d)},Ree=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,s=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=l8e(u,i,l);return t.domain([Z_(d),du(d)]),{niceTicks:d}}if(i&&a==="number"){var f=t.domain(),p=c8e(f,i,l);return{niceTicks:p}}return null};function hp(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&&!Dt(a[t.dataKey])){var l=P1(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var c=on(a,Dt(s)?t.dataKey:s);return Dt(c)?null:t.scale(c)}var X7=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 c=on(s,r.dataKey,r.domain[l]);return Dt(c)?null:r.scale(c)-i/2+a},Y8e=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]},X8e=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?jn(jn({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(ca(i)){var s=r[i];if(s){var l=s.items.indexOf(t);return l>=0?s.stackedData[l]:null}}return null},J8e=function(t){return t.reduce(function(r,n){return[Z_(n.concat([r[0]]).filter(it)),du(n.concat([r[1]]).filter(it))]},[1/0,-1/0])},Iee=function(t,r,n){return Object.keys(t).reduce(function(a,i){var s=t[i],l=s.stackedData,c=l.reduce(function(u,d){var f=J8e(d.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},J7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Q7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,UO=function(t,r,n){if(Mt(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(it(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(J7.test(t[0])){var i=+J7.exec(t[0])[1];a[0]=r[0]-i}else Mt(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(it(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Q7.test(t[1])){var s=+Q7.exec(t[1])[1];a[1]=r[1]+s}else Mt(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},nw=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=PI(r,function(f){return f.coordinate}),s=1/0,l=1,c=i.length;l<c;l++){var u=i[l],d=i[l-1];s=Math.min((u.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},Z7=function(t,r,n){return!t||!t.length||Au(t,fs(n,"type.defaultProps.domain"))?r:t},Fee=function(t,r){var n=t.type.defaultProps?jn(jn({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,s=n.unit,l=n.formatter,c=n.tooltipType,u=n.chartType,d=n.hide;return jn(jn({},Nt(t,!1)),{},{dataKey:a,unit:s,formatter:l,name:i||a,color:a3(t),value:on(r,a),type:c,payload:r,chartType:u,hide:d})};function nx(e){"@babel/helpers - typeof";return nx=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},nx(e)}function ez(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 ql(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ez(Object(r),!0).forEach(function(n){Mee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ez(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mee(e,t,r){return t=Q8e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q8e(e){var t=Z8e(e,"string");return nx(t)=="symbol"?t:t+""}function Z8e(e,t){if(nx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eBe(e,t){return aBe(e)||nBe(e,t)||rBe(e,t)||tBe()}function tBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1244In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rBe(e,t){if(e){if(typeof e=="string")return tz(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 tz(e,t)}}function tz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nBe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function aBe(e){if(Array.isArray(e))return e}var aw=Math.PI/180,iBe=function(t){return t*180/Math.PI},Qr=function(t,r,n,a){return{x:t+Math.cos(-aw*a)*n,y:r+Math.sin(-aw*a)*n}},Dee=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},sBe=function(t,r,n,a,i){var s=t.width,l=t.height,c=t.startAngle,u=t.endAngle,d=vi(t.cx,s,s/2),f=vi(t.cy,l,l/2),p=Dee(s,l,n),m=vi(t.innerRadius,p,0),x=vi(t.outerRadius,p,p*.8),y=Object.keys(r);return y.reduce(function(v,b){var w=r[b],S=w.domain,j=w.reversed,k;if(Dt(w.range))a==="angleAxis"?k=[c,u]:a==="radiusAxis"&&(k=[m,x]),j&&(k=[k[1],k[0]]);else{k=w.range;var E=k,T=eBe(E,2);c=T[0],u=T[1]}var O=Oee(w,i),A=O.realScaleType,P=O.scale;P.domain(S).range(k),Pee(P);var I=Ree(P,ql(ql({},w),{},{realScaleType:A})),R=ql(ql(ql({},w),I),{},{range:k,radius:x,realScaleType:A,scale:P,cx:d,cy:f,innerRadius:m,outerRadius:x,startAngle:c,endAngle:u});return ql(ql({},v),{},Mee({},b,R))},{})},oBe=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-s,2))},lBe=function(t,r){var n=t.x,a=t.y,i=r.cx,s=r.cy,l=oBe({x:n,y:a},{x:i,y:s});if(l<=0)return{radius:l};var c=(n-i)/l,u=Math.acos(c);return a>s&&(u=2*Math.PI-u),{radius:l,angle:iBe(u),angleInRadian:u}},cBe=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}},uBe=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},rz=function(t,r){var n=t.x,a=t.y,i=lBe({x:n,y:a},r),s=i.radius,l=i.angle,c=r.innerRadius,u=r.outerRadius;if(s<c||s>u)return!1;if(s===0)return!0;var d=cBe(r),f=d.startAngle,p=d.endAngle,m=l,x;if(f<=p){for(;m>p;)m-=360;for(;m<f;)m+=360;x=m>=f&&m<=p}else{for(;m>f;)m-=360;for(;m<p;)m+=360;x=m>=p&&m<=f}return x?ql(ql({},r),{},{radius:s,angle:uBe(m,r)}):null},Lee=function(t){return!N.isValidElement(t)&&!Mt(t)&&typeof t!="boolean"?t.className:""};function ax(e){"@babel/helpers - typeof";return ax=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},ax(e)}var dBe=["offset"];function fBe(e){return gBe(e)||mBe(e)||pBe(e)||hBe()}function hBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1245In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pBe(e,t){if(e){if(typeof e=="string")return zO(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 zO(e,t)}}function mBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gBe(e){if(Array.isArray(e))return zO(e)}function zO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xBe(e,t){if(e==null)return{};var r=yBe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yBe(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 nz(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 ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nz(Object(r),!0).forEach(function(n){vBe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vBe(e,t,r){return t=bBe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bBe(e){var t=wBe(e,"string");return ax(t)=="symbol"?t:t+""}function wBe(e,t){if(ax(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ax(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ix.apply(this,arguments)}var _Be=function(t){var r=t.value,n=t.formatter,a=Dt(t.children)?r:t.children;return Mt(n)?n(a):a},SBe=function(t,r){var n=yi(r-t),a=Math.min(Math.abs(r-t),360);return n*a},EBe=function(t,r,n){var a=t.position,i=t.viewBox,s=t.offset,l=t.className,c=i,u=c.cx,d=c.cy,f=c.innerRadius,p=c.outerRadius,m=c.startAngle,x=c.endAngle,y=c.clockWise,v=(f+p)/2,b=SBe(m,x),w=b>=0?1:-1,S,j;a==="insideStart"?(S=m+w*s,j=y):a==="insideEnd"?(S=x-w*s,j=!y):a==="end"&&(S=x+w*s,j=y),j=b<=0?j:!j;var k=Qr(u,d,v,S),E=Qr(u,d,v,S+(j?1:-1)*359),T="M".concat(k.x,",").concat(k.y,` 1246 A`).concat(v,",").concat(v,",0,1,").concat(j?0:1,`, 1247 `).concat(E.x,",").concat(E.y),O=Dt(t.id)?zu("recharts-radial-line-"):t.id;return se.createElement("text",ix({},n,{dominantBaseline:"central",className:Jt("recharts-radial-bar-label",l)}),se.createElement("defs",null,se.createElement("path",{id:O,d:T})),se.createElement("textPath",{xlinkHref:"#".concat(O)},r))},kBe=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,s=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,p=(d+f)/2;if(a==="outside"){var m=Qr(s,l,u+n,p),x=m.x,y=m.y;return{x,y,textAnchor:x>=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 v=(c+u)/2,b=Qr(s,l,v,p),w=b.x,S=b.y;return{x:w,y:S,textAnchor:"middle",verticalAnchor:"middle"}},NBe=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,s=r,l=s.x,c=s.y,u=s.width,d=s.height,f=d>=0?1:-1,p=f*a,m=f>0?"end":"start",x=f>0?"start":"end",y=u>=0?1:-1,v=y*a,b=y>0?"end":"start",w=y>0?"start":"end";if(i==="top"){var S={x:l+u/2,y:c-f*a,textAnchor:"middle",verticalAnchor:m};return ta(ta({},S),n?{height:Math.max(c-n.y,0),width:u}:{})}if(i==="bottom"){var j={x:l+u/2,y:c+d+p,textAnchor:"middle",verticalAnchor:x};return ta(ta({},j),n?{height:Math.max(n.y+n.height-(c+d),0),width:u}:{})}if(i==="left"){var k={x:l-v,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return ta(ta({},k),n?{width:Math.max(k.x-n.x,0),height:d}:{})}if(i==="right"){var E={x:l+u+v,y:c+d/2,textAnchor:w,verticalAnchor:"middle"};return ta(ta({},E),n?{width:Math.max(n.x+n.width-E.x,0),height:d}:{})}var T=n?{width:u,height:d}:{};return i==="insideLeft"?ta({x:l+v,y:c+d/2,textAnchor:w,verticalAnchor:"middle"},T):i==="insideRight"?ta({x:l+u-v,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},T):i==="insideTop"?ta({x:l+u/2,y:c+p,textAnchor:"middle",verticalAnchor:x},T):i==="insideBottom"?ta({x:l+u/2,y:c+d-p,textAnchor:"middle",verticalAnchor:m},T):i==="insideTopLeft"?ta({x:l+v,y:c+p,textAnchor:w,verticalAnchor:x},T):i==="insideTopRight"?ta({x:l+u-v,y:c+p,textAnchor:b,verticalAnchor:x},T):i==="insideBottomLeft"?ta({x:l+v,y:c+d-p,textAnchor:w,verticalAnchor:m},T):i==="insideBottomRight"?ta({x:l+u-v,y:c+d-p,textAnchor:b,verticalAnchor:m},T):im(i)&&(it(i.x)||Cd(i.x))&&(it(i.y)||Cd(i.y))?ta({x:l+vi(i.x,u),y:c+vi(i.y,d),textAnchor:"end",verticalAnchor:"end"},T):ta({x:l+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},T)},TBe=function(t){return"cx"in t&&it(t.cx)};function ba(e){var t=e.offset,r=t===void 0?5:t,n=xBe(e,dBe),a=ta({offset:r},n),i=a.viewBox,s=a.position,l=a.value,c=a.children,u=a.content,d=a.className,f=d===void 0?"":d,p=a.textBreakAll;if(!i||Dt(l)&&Dt(c)&&!N.isValidElement(u)&&!Mt(u))return null;if(N.isValidElement(u))return N.cloneElement(u,a);var m;if(Mt(u)){if(m=N.createElement(u,a),N.isValidElement(m))return m}else m=_Be(a);var x=TBe(i),y=Nt(a,!0);if(x&&(s==="insideStart"||s==="insideEnd"||s==="end"))return EBe(a,m,y);var v=x?kBe(a):NBe(a);return se.createElement(nf,ix({className:Jt("recharts-label",f)},y,v,{breakAll:p}),m)}ba.displayName="Label";var $ee=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,s=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,p=t.y,m=t.top,x=t.left,y=t.width,v=t.height,b=t.clockWise,w=t.labelViewBox;if(w)return w;if(it(y)&&it(v)){if(it(f)&&it(p))return{x:f,y:p,width:y,height:v};if(it(m)&&it(x))return{x:m,y:x,width:y,height:v}}return it(f)&&it(p)?{x:f,y:p,width:0,height:0}:it(r)&&it(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:s||a||0,innerRadius:u||0,outerRadius:d||c||l||0,clockWise:b}:t.viewBox?t.viewBox:{}},jBe=function(t,r){return t?t===!0?se.createElement(ba,{key:"label-implicit",viewBox:r}):ca(t)?se.createElement(ba,{key:"label-implicit",viewBox:r,value:t}):N.isValidElement(t)?t.type===ba?N.cloneElement(t,{key:"label-implicit",viewBox:r}):se.createElement(ba,{key:"label-implicit",content:t,viewBox:r}):Mt(t)?se.createElement(ba,{key:"label-implicit",content:t,viewBox:r}):im(t)?se.createElement(ba,ix({viewBox:r},t,{key:"label-implicit"})):null:null},ABe=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=$ee(t),s=Ei(a,ba).map(function(c,u){return N.cloneElement(c,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return s;var l=jBe(t.label,r||i);return[l].concat(fBe(s))};ba.parseViewBox=$ee;ba.renderCallByParent=ABe;var iA,az;function CBe(){if(az)return iA;az=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return iA=e,iA}var OBe=CBe();const PBe=tr(OBe);function sx(e){"@babel/helpers - typeof";return sx=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},sx(e)}var RBe=["valueAccessor"],IBe=["data","dataKey","clockWise","id","textBreakAll"];function FBe(e){return $Be(e)||LBe(e)||DBe(e)||MBe()}function MBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1248In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DBe(e,t){if(e){if(typeof e=="string")return HO(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 HO(e,t)}}function LBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $Be(e){if(Array.isArray(e))return HO(e)}function HO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iw.apply(this,arguments)}function iz(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 sz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iz(Object(r),!0).forEach(function(n){BBe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BBe(e,t,r){return t=UBe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UBe(e){var t=zBe(e,"string");return sx(t)=="symbol"?t:t+""}function zBe(e,t){if(sx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oz(e,t){if(e==null)return{};var r=HBe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function HBe(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 qBe=function(t){return Array.isArray(t.value)?PBe(t.value):t.value};function Co(e){var t=e.valueAccessor,r=t===void 0?qBe:t,n=oz(e,RBe),a=n.data,i=n.dataKey,s=n.clockWise,l=n.id,c=n.textBreakAll,u=oz(n,IBe);return!a||!a.length?null:se.createElement(er,{className:"recharts-label-list"},a.map(function(d,f){var p=Dt(i)?r(d,f):on(d&&d.payload,i),m=Dt(l)?{}:{id:"".concat(l,"-").concat(f)};return se.createElement(ba,iw({},Nt(d,!0),u,m,{parentViewBox:d.parentViewBox,value:p,textBreakAll:c,viewBox:ba.parseViewBox(Dt(s)?d:sz(sz({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}Co.displayName="LabelList";function WBe(e,t){return e?e===!0?se.createElement(Co,{key:"labelList-implicit",data:t}):se.isValidElement(e)||Mt(e)?se.createElement(Co,{key:"labelList-implicit",data:t,content:e}):im(e)?se.createElement(Co,iw({data:t},e,{key:"labelList-implicit"})):null:null}function VBe(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=Ei(n,Co).map(function(s,l){return N.cloneElement(s,{data:t,key:"labelList-".concat(l)})});if(!r)return a;var i=WBe(e.label,t);return[i].concat(FBe(a))}Co.renderCallByParent=VBe;function ox(e){"@babel/helpers - typeof";return ox=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},ox(e)}function qO(){return qO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qO.apply(this,arguments)}function lz(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 cz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lz(Object(r),!0).forEach(function(n){GBe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GBe(e,t,r){return t=KBe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KBe(e){var t=YBe(e,"string");return ox(t)=="symbol"?t:t+""}function YBe(e,t){if(ox(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ox(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XBe=function(t,r){var n=yi(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},db=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,s=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(l?1:-1)+a,f=Math.asin(c/d)/aw,p=u?i:i+s*f,m=Qr(r,n,d,p),x=Qr(r,n,a,p),y=u?i-s*f:i,v=Qr(r,n,d*Math.cos(f*aw),y);return{center:m,circleTangency:x,lineTangency:v,theta:f}},Bee=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.startAngle,l=t.endAngle,c=XBe(s,l),u=s+c,d=Qr(r,n,i,s),f=Qr(r,n,i,u),p="M ".concat(d.x,",").concat(d.y,` 1249 A `).concat(i,",").concat(i,`,0, 1250 `).concat(+(Math.abs(c)>180),",").concat(+(s>u),`, 1251 `).concat(f.x,",").concat(f.y,` 1252 `);if(a>0){var m=Qr(r,n,a,s),x=Qr(r,n,a,u);p+="L ".concat(x.x,",").concat(x.y,` 1253 A `).concat(a,",").concat(a,`,0, 1254 `).concat(+(Math.abs(c)>180),",").concat(+(s<=u),`, 1255 `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(r,",").concat(n," Z");return p},JBe=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=yi(d-u),p=db({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:s,cornerIsExternal:c}),m=p.circleTangency,x=p.lineTangency,y=p.theta,v=db({cx:r,cy:n,radius:i,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:c}),b=v.circleTangency,w=v.lineTangency,S=v.theta,j=c?Math.abs(u-d):Math.abs(u-d)-y-S;if(j<0)return l?"M ".concat(x.x,",").concat(x.y,` 1256 a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 1257 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 1258 `):Bee({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d});var k="M ".concat(x.x,",").concat(x.y,` 1259 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(m.x,",").concat(m.y,` 1260 A`).concat(i,",").concat(i,",0,").concat(+(j>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,` 1261 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(w.x,",").concat(w.y,` 1262 `);if(a>0){var E=db({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),T=E.circleTangency,O=E.lineTangency,A=E.theta,P=db({cx:r,cy:n,radius:a,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),I=P.circleTangency,R=P.lineTangency,M=P.theta,L=c?Math.abs(u-d):Math.abs(u-d)-A-M;if(L<0&&s===0)return"".concat(k,"L").concat(r,",").concat(n,"Z");k+="L".concat(R.x,",").concat(R.y,` 1263 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(I.x,",").concat(I.y,` 1264 A`).concat(a,",").concat(a,",0,").concat(+(L>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,` 1265 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,"Z")}else k+="L".concat(r,",").concat(n,"Z");return k},QBe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Uee=function(t){var r=cz(cz({},QBe),t),n=r.cx,a=r.cy,i=r.innerRadius,s=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,p=r.className;if(s<i||d===f)return null;var m=Jt("recharts-sector",p),x=s-i,y=vi(l,x,0,!0),v;return y>0&&Math.abs(d-f)<360?v=JBe({cx:n,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(y,x/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):v=Bee({cx:n,cy:a,innerRadius:i,outerRadius:s,startAngle:d,endAngle:f}),se.createElement("path",qO({},Nt(r,!0),{className:m,d:v,role:"img"}))};function lx(e){"@babel/helpers - typeof";return lx=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},lx(e)}function WO(){return WO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1265for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WO.apply(this,arguments)}function uz(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 dz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uz(Object(r),!0).forEach(function(n){ZBe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZBe(e,t,r){return t=eUe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eUe(e){var t=tUe(e,"string");return lx(t)=="symbol"?t:t+""}function tUe(e,t){if(lx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fz={curveBasisClosed:wFe,curveBasisOpen:_Fe,curveBasis:bFe,curveBumpX:sFe,curveBumpY:oFe,curveLinearClosed:SFe,curveLinear:B_,curveMonotoneX:EFe,curveMonotoneY:kFe,curveNatural:NFe,curveStep:TFe,curveStepAfter:AFe,curveStepBefore:jFe},fb=function(t){return t.x===+t.x&&t.y===+t.y},_0=function(t){return t.x},S0=function(t){return t.y},rUe=function(t,r){if(Mt(t))return t;var n="curve".concat(L_(t));return(n==="curveMonotone"||n==="curveBump")&&r?fz["".concat(n).concat(r==="vertical"?"Y":"X")]:fz[n]||B_},nUe=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,s=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=rUe(n,l),f=u?i.filter(function(y){return fb(y)}):i,p;if(Array.isArray(s)){var m=u?s.filter(function(y){return fb(y)}):s,x=f.map(function(y,v){return dz(dz({},y),{},{base:m[v]})});return l==="vertical"?p=nb().y(S0).x1(_0).x0(function(y){return y.base.x}):p=nb().x(_0).y1(S0).y0(function(y){return y.base.y}),p.defined(fb).curve(d),p(x)}return l==="vertical"&&it(s)?p=nb().y(S0).x1(_0).x0(s):it(s)?p=nb().x(_0).y1(S0).y0(s):p=$Q().x(_0).y(S0),p.defined(fb).curve(d),p(f)},xu=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var s=n&&n.length?nUe(t):a;return se.createElement("path",WO({},Nt(t,!1),R1(t),{className:Jt("recharts-curve",r),d:s,ref:i}))},aUe=Object.getOwnPropertyNames,iUe=Object.getOwnPropertySymbols,sUe=Object.prototype.hasOwnProperty;function hz(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function hb(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,s=i.get(r),l=i.get(n);if(s&&l)return s===n&&l===r;i.set(r,n),i.set(n,r);var c=e(r,n,a);return i.delete(r),i.delete(n),c}}function pz(e){return aUe(e).concat(iUe(e))}var oUe=Object.hasOwn||(function(e,t){return sUe.call(e,t)});function kf(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var lUe="__v",cUe="__o",uUe="_owner",mz=Object.getOwnPropertyDescriptor,gz=Object.keys;function dUe(e,t,r){var 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 fUe(e,t){return kf(e.getTime(),t.getTime())}function hUe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function pUe(e,t){return e===t}function xz(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),s,l,c=0;(s=i.next())&&!s.done;){for(var u=t.entries(),d=!1,f=0;(l=u.next())&&!l.done;){if(a[f]){f++;continue}var p=s.value,m=l.value;if(r.equals(p[0],m[0],c,f,e,t,r)&&r.equals(p[1],m[1],p[0],m[0],e,t,r)){d=a[f]=!0;break}f++}if(!d)return!1;c++}return!0}var mUe=kf;function gUe(e,t,r){var n=gz(e),a=n.length;if(gz(t).length!==a)return!1;for(;a-- >0;)if(!zee(e,t,r,n[a]))return!1;return!0}function E0(e,t,r){var n=pz(e),a=n.length;if(pz(t).length!==a)return!1;for(var i,s,l;a-- >0;)if(i=n[a],!zee(e,t,r,i)||(s=mz(e,i),l=mz(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function xUe(e,t){return kf(e.valueOf(),t.valueOf())}function yUe(e,t){return e.source===t.source&&e.flags===t.flags}function yz(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),s,l;(s=i.next())&&!s.done;){for(var c=t.values(),u=!1,d=0;(l=c.next())&&!l.done;){if(!a[d]&&r.equals(s.value,l.value,s.value,l.value,e,t,r)){u=a[d]=!0;break}d++}if(!u)return!1}return!0}function vUe(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function bUe(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 zee(e,t,r,n){return(n===uUe||n===cUe||n===lUe)&&(e.$$typeof||t.$$typeof)?!0:oUe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var wUe="[object Arguments]",_Ue="[object Boolean]",SUe="[object Date]",EUe="[object Error]",kUe="[object Map]",NUe="[object Number]",TUe="[object Object]",jUe="[object RegExp]",AUe="[object Set]",CUe="[object String]",OUe="[object URL]",PUe=Array.isArray,vz=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,bz=Object.assign,RUe=Object.prototype.toString.call.bind(Object.prototype.toString);function IUe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,s=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,p=e.areUrlsEqual;return function(x,y,v){if(x===y)return!0;
1265if(x==null||y==null)return!1;var b=typeof x;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?s(x,y,v):b==="function"?a(x,y,v):!1;var w=x.constructor;if(w!==y.constructor)return!1;if(w===Object)return l(x,y,v);if(PUe(x))return t(x,y,v);if(vz!=null&&vz(x))return f(x,y,v);if(w===Date)return r(x,y,v);if(w===RegExp)return u(x,y,v);if(w===Map)return i(x,y,v);if(w===Set)return d(x,y,v);var S=RUe(x);return S===SUe?r(x,y,v):S===jUe?u(x,y,v):S===kUe?i(x,y,v):S===AUe?d(x,y,v):S===TUe?typeof x.then!="function"&&typeof y.then!="function"&&l(x,y,v):S===OUe?p(x,y,v):S===EUe?n(x,y,v):S===wUe?l(x,y,v):S===_Ue||S===NUe||S===CUe?c(x,y,v):!1}}function FUe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?E0:dUe,areDatesEqual:fUe,areErrorsEqual:hUe,areFunctionsEqual:pUe,areMapsEqual:n?hz(xz,E0):xz,areNumbersEqual:mUe,areObjectsEqual:n?E0:gUe,arePrimitiveWrappersEqual:xUe,areRegExpsEqual:yUe,areSetsEqual:n?hz(yz,E0):yz,areTypedArraysEqual:n?E0:vUe,areUrlsEqual:bUe};if(r&&(a=bz({},a,r(a))),t){var i=hb(a.areArraysEqual),s=hb(a.areMapsEqual),l=hb(a.areObjectsEqual),c=hb(a.areSetsEqual);a=bz({},a,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:l,areSetsEqual:c})}return a}function MUe(e){return function(t,r,n,a,i,s,l){return e(t,r,l)}}function DUe(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(c,u){var d=n(),f=d.cache,p=f===void 0?t?new WeakMap:void 0:f,m=d.meta;return r(c,u,{cache:p,equals:a,meta:m,strict:i})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var s={cache:void 0,equals:a,meta:void 0,strict:i};return function(c,u){return r(c,u,s)}}var LUe=Wu();Wu({strict:!0});Wu({circular:!0});Wu({circular:!0,strict:!0});Wu({createInternalComparator:function(){return kf}});Wu({strict:!0,createInternalComparator:function(){return kf}});Wu({circular:!0,createInternalComparator:function(){return kf}});Wu({circular:!0,createInternalComparator:function(){return kf},strict:!0});function Wu(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,s=i===void 0?!1:i,l=FUe(e),c=IUe(l),u=n?n(c):MUe(c);return DUe({circular:r,comparator:c,createState:a,equals:u,strict:s})}function $Ue(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function wz(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):$Ue(a)};requestAnimationFrame(n)}function VO(e){"@babel/helpers - typeof";return VO=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},VO(e)}function BUe(e){return qUe(e)||HUe(e)||zUe(e)||UUe()}function UUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1266In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zUe(e,t){if(e){if(typeof e=="string")return _z(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 _z(e,t)}}function _z(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function HUe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qUe(e){if(Array.isArray(e))return e}function WUe(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var s=i,l=BUe(s),c=l[0],u=l.slice(1);if(typeof c=="number"){wz(a.bind(null,u),c);return}a(c),wz(a.bind(null,u));return}VO(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function cx(e){"@babel/helpers - typeof";return cx=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},cx(e)}function Sz(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 Ez(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 58,899 bytes, lines 1266-1284
1266t%2?Sz(Object(r),!0).forEach(function(n){Hee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hee(e,t,r){return t=VUe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VUe(e){var t=GUe(e,"string");return cx(t)==="symbol"?t:String(t)}function GUe(e,t){if(cx(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cx(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KUe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},YUe=function(t){return t},XUe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ng=function(t,r){return Object.keys(r).reduce(function(n,a){return Ez(Ez({},n),{},Hee({},a,t(a,r[a])))},{})},kz=function(t,r,n){return t.map(function(a){return"".concat(XUe(a)," ").concat(r,"ms ").concat(n)}).join(",")};function JUe(e,t){return e9e(e)||ZUe(e,t)||qee(e,t)||QUe()}function QUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1267In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZUe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function e9e(e){if(Array.isArray(e))return e}function t9e(e){return a9e(e)||n9e(e)||qee(e)||r9e()}function r9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1268In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qee(e,t){if(e){if(typeof e=="string")return GO(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 GO(e,t)}}function n9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a9e(e){if(Array.isArray(e))return GO(e)}function GO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var sw=1e-4,Wee=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},Vee=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},Nz=function(t,r){return function(n){var a=Wee(t,r);return Vee(a,n)}},i9e=function(t,r){return function(n){var a=Wee(t,r),i=[].concat(t9e(a.map(function(s,l){return s*l}).slice(1)),[0]);return Vee(i,n)}},Tz=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],s=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,s=1,l=1;break;case"ease":a=.25,i=.1,s=.25,l=1;break;case"ease-in":a=.42,i=0,s=1,l=1;break;case"ease-out":a=.42,i=0,s=.58,l=1;break;case"ease-in-out":a=0,i=0,s=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=JUe(u,4);a=d[0],i=d[1],s=d[2],l=d[3]}}}var f=Nz(a,s),p=Nz(i,l),m=i9e(a,s),x=function(b){return b>1?1:b<0?0:b},y=function(b){for(var w=b>1?1:b,S=w,j=0;j<8;++j){var k=f(S)-w,E=m(S);if(Math.abs(k-w)<sw||E<sw)return p(S);S=x(S-k/E)}return p(S)};return y.isStepper=!1,y},s9e=function(){var t=arguments.length>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,c=function(d,f,p){var m=-(d-f)*n,x=p*i,y=p+(m-x)*l/1e3,v=p*l/1e3+d;return Math.abs(v-f)<sw&&Math.abs(y)<sw?[f,0]:[v,y]};return c.isStepper=!0,c.dt=l,c},o9e=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Tz(a);case"spring":return s9e();default:if(a.split("(")[0]==="cubic-bezier")return Tz(a)}return typeof a=="function"?a:null};function ux(e){"@babel/helpers - typeof";return ux=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},ux(e)}function jz(e){return u9e(e)||c9e(e)||Gee(e)||l9e()}function l9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1269In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u9e(e){if(Array.isArray(e))return YO(e)}function Az(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 Ca(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Az(Object(r),!0).forEach(function(n){KO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Az(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KO(e,t,r){return t=d9e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d9e(e){var t=f9e(e,"string");return ux(t)==="symbol"?t:String(t)}function f9e(e,t){if(ux(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ux(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h9e(e,t){return g9e(e)||m9e(e,t)||Gee(e,t)||p9e()}function p9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1270In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gee(e,t){if(e){if(typeof e=="string")return YO(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 YO(e,t)}}function YO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m9e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function g9e(e){if(Array.isArray(e))return e}var ow=function(t,r,n){return t+(r-t)*n},XO=function(t){var r=t.from,n=t.to;return r!==n},x9e=function e(t,r,n){var a=ng(function(i,s){if(XO(s)){var l=t(s.from,s.to,s.velocity),c=h9e(l,2),u=c[0],d=c[1];return Ca(Ca({},s),{},{from:u,velocity:d})}return s},r);return n<1?ng(function(i,s){return XO(s)?Ca(Ca({},s),{},{velocity:ow(s.velocity,a[i].velocity,n),from:ow(s.from,a[i].from,n)}):s},r):e(t,a,n-1)};const y9e=(function(e,t,r,n,a){var i=KUe(e,t),s=i.reduce(function(v,b){return Ca(Ca({},v),{},KO({},b,[e[b],t[b]]))},{}),l=i.reduce(function(v,b){return Ca(Ca({},v),{},KO({},b,{from:e[b],velocity:0,to:t[b]}))},{}),c=-1,u,d,f=function(){return null},p=function(){return ng(function(b,w){return w.from},l)},m=function(){return!Object.values(l).filter(XO).length},x=function(b){u||(u=b);var w=b-u,S=w/r.dt;l=x9e(r,l,S),a(Ca(Ca(Ca({},e),t),p())),u=b,m()||(c=requestAnimationFrame(f))},y=function(b){d||(d=b);var w=(b-d)/n,S=ng(function(k,E){return ow.apply(void 0,jz(E).concat([r(w)]))},s);if(a(Ca(Ca(Ca({},e),t),S)),w<1)c=requestAnimationFrame(f);else{var j=ng(function(k,E){return ow.apply(void 0,jz(E).concat([r(1)]))},s);a(Ca(Ca(Ca({},e),t),j))}};return f=r.isStepper?x:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function pp(e){"@babel/helpers - typeof";return pp=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},pp(e)}var v9e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function b9e(e,t){if(e==null)return{};var r=w9e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w9e(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function sA(e){return k9e(e)||E9e(e)||S9e(e)||_9e()}function _9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1271In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S9e(e,t){if(e){if(typeof e=="string")return JO(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 JO(e,t)}}function E9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function k9e(e){if(Array.isArray(e))return JO(e)}function JO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cz(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 ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cz(Object(r),!0).forEach(function(n){M0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M0(e,t,r){return t=Kee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T9e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Kee(n.key),n)}}function j9e(e,t,r){return t&&T9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kee(e){var t=A9e(e,"string");return pp(t)==="symbol"?t:String(t)}function A9e(e,t){if(pp(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pp(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QO(e,t)}function QO(e,t){return QO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},QO(e,t)}function O9e(e){var t=P9e();return function(){var n=lw(e),a;if(t){var i=lw(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return ZO(this,a)}}function ZO(e,t){if(t&&(pp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eP(e)}function eP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P9e(){if(typeof Reflect>"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 lw(e){return lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lw(e)}var Qs=(function(e){C9e(r,e);var t=O9e(r);function r(n,a){var i;N9e(this,r),i=t.call(this,n,a);var s=i.props,l=s.isActive,c=s.attributeName,u=s.from,d=s.to,f=s.steps,p=s.children,m=s.duration;if(i.handleStyleChange=i.handleStyleChange.bind(eP(i)),i.changeStyle=i.changeStyle.bind(eP(i)),!l||m<=0)return i.state={style:{}},typeof p=="function"&&(i.state={style:d}),ZO(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof p=="function")return i.state={style:u},ZO(i);i.state={style:c?M0({},c,u):u}}else i.state={style:{}};return i}return j9e(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,c=i.attributeName,u=i.shouldReAnimate,d=i.to,f=i.from,p=this.state.style;if(l){if(!s){var m={style:c?M0({},c,d):d};this.state&&p&&(c&&p[c]!==d||!c&&p!==d)&&this.setState(m);return}if(!(LUe(a.to,d)&&a.canBegin&&a.isActive)){var x=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=x||u?f:a.to;if(this.state&&p){var v={style:c?M0({},c,y):y};(c&&p[c]!==y||!c&&p!==y)&&this.setState(v)}this.runAnimation(ho(ho({},this.props),{},{from:y,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,c=a.duration,u=a.easing,d=a.begin,f=a.onAnimationEnd,p=a.onAnimationStart,m=y9e(s,l,o9e(u),c,this.changeStyle),x=function(){i.stopJSAnimation=m()};this.manager.start([p,d,x,c,f])}},{key:"runStepAnimation",value:function(a){var i=this,s=a.steps,l=a.begin,c=a.onAnimationStart,u=s[0],d=u.style,f=u.duration,p=f===void 0?0:f,m=function(y,v,b){if(b===0)return y;var w=v.duration,S=v.easing,j=S===void 0?"ease":S,k=v.style,E=v.properties,T=v.onAnimationEnd,O=b>0?s[b-1]:v,A=E||Object.keys(k);if(typeof j=="function"||j==="spring")return[].concat(sA(y),[i.runJSAnimation.bind(i,{from:O.style,to:k,duration:w,easing:j}),w]);var P=kz(A,w,j),I=ho(ho(ho({},O.style),k),{},{transition:P});return[].concat(sA(y),[I,w,T]).filter(YUe)};return this.manager.start([c].concat(sA(s.reduce(m,[d,Math.max(p,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=WUe());var i=a.begin,s=a.duration,l=a.attributeName,c=a.to,u=a.easing,d=a.onAnimationStart,f=a.onAnimationEnd,p=a.steps,m=a.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(a);return}if(p.length>1){this.runStepAnimation(a);return}var y=l?M0({},l,c):c,v=kz(Object.keys(y),s,u);x.start([d,i,ho(ho({},y),{},{transition:v}),s,f])}},{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 c=b9e(a,v9e),u=N.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!l||u===0||s<=0)return i;var f=function(m){var x=m.props,y=x.style,v=y===void 0?{}:y,b=x.className,w=N.cloneElement(m,ho(ho({},c),{},{style:ho(ho({},v),d),className:b}));return w};return u===1?f(N.Children.only(i)):se.createElement("div",null,N.Children.map(i,function(p){return f(p)}))}}]),r})(N.PureComponent);Qs.displayName="Animate";Qs.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Qs.propTypes={from:Q.oneOfType([Q.object,Q.string]),to:Q.oneOfType([Q.object,Q.string]),attributeName:Q.string,duration:Q.number,begin:Q.number,easing:Q.oneOfType([Q.string,Q.func]),steps:Q.arrayOf(Q.shape({duration:Q.number.isRequired,style:Q.object.isRequired,easing:Q.oneOfType([Q.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Q.func]),properties:Q.arrayOf("string"),onAnimationEnd:Q.func})),children:Q.oneOfType([Q.node,Q.func]),isActive:Q.bool,canBegin:Q.bool,onAnimationEnd:Q.func,shouldReAnimate:Q.bool,onAnimationStart:Q.func,onAnimationReStart:Q.func};function dx(e){"@babel/helpers - typeof";return dx=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},dx(e)}function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cw.apply(this,arguments)}function R9e(e,t){return D9e(e)||M9e(e,t)||F9e(e,t)||I9e()}function I9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1272In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F9e(e,t){if(e){if(typeof e=="string")return Oz(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 Oz(e,t)}}function Oz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M9e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function D9e(e){if(Array.isArray(e))return e}function Pz(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 Rz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pz(Object(r),!0).forEach(function(n){L9e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L9e(e,t,r){return t=$9e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $9e(e){var t=B9e(e,"string");return dx(t)=="symbol"?t:t+""}function B9e(e,t){if(dx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(dx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iz=function(t,r,n,a,i){var s=Math.min(Math.abs(n)/2,Math.abs(a)/2),l=a>=0?1:-1,c=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,d;if(s>0&&i instanceof Array){for(var f=[0,0,0,0],p=0,m=4;p<m;p++)f[p]=i[p]>s?s:i[p];d="M".concat(t,",").concat(r+l*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(r)),d+="L ".concat(t+n-c*f[1],",").concat(r),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, 1273 `).concat(t+n,",").concat(r+l*f[1])),d+="L ".concat(t+n,",").concat(r+a-l*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, 1274 `).concat(t+n-c*f[2],",").concat(r+a)),d+="L ".concat(t+c*f[3],",").concat(r+a),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, 1275 `).concat(t,",").concat(r+a-l*f[3])),d+="Z"}else if(s>0&&i===+i&&i>0){var x=Math.min(s,i);d="M ".concat(t,",").concat(r+l*x,` 1276 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+c*x,",").concat(r,` 1277 L `).concat(t+n-c*x,",").concat(r,` 1278 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+n,",").concat(r+l*x,` 1279 L `).concat(t+n,",").concat(r+a-l*x,` 1280 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+n-c*x,",").concat(r+a,` 1281 L `).concat(t+c*x,",").concat(r+a,` 1282 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t,",").concat(r+a-l*x," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return d},U9e=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,s=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(i,i+l),d=Math.max(i,i+l),f=Math.min(s,s+c),p=Math.max(s,s+c);return n>=u&&n<=d&&a>=f&&a<=p}return!1},z9e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},i3=function(t){var r=Rz(Rz({},z9e),t),n=N.useRef(),a=N.useState(-1),i=R9e(a,2),s=i[0],l=i[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&l(j)}catch{}},[]);var c=r.x,u=r.y,d=r.width,f=r.height,p=r.radius,m=r.className,x=r.animationEasing,y=r.animationDuration,v=r.animationBegin,b=r.isAnimationActive,w=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var S=Jt("recharts-rectangle",m);return w?se.createElement(Qs,{canBegin:s>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:y,animationEasing:x,isActive:w},function(j){var k=j.width,E=j.height,T=j.x,O=j.y;return se.createElement(Qs,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,isActive:b,easing:x},se.createElement("path",cw({},Nt(r,!0),{className:S,d:Iz(T,O,k,E,p),ref:n})))}):se.createElement("path",cw({},Nt(r,!0),{className:S,d:Iz(c,u,d,f,p)}))},H9e=["points","className","baseLinePoints","connectNulls"];function wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wh.apply(this,arguments)}function q9e(e,t){if(e==null)return{};var r=W9e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W9e(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 Fz(e){return Y9e(e)||K9e(e)||G9e(e)||V9e()}function V9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1283In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G9e(e,t){if(e){if(typeof e=="string")return tP(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 tP(e,t)}}function K9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y9e(e){if(Array.isArray(e))return tP(e)}function tP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Mz=function(t){return t&&t.x===+t.x&&t.y===+t.y},X9e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Mz(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Mz(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},ag=function(t,r){var n=X9e(t);r&&(n=[n.reduce(function(i,s){return[].concat(Fz(i),Fz(s))},[])]);var a=n.map(function(i){return i.reduce(function(s,l,c){return"".concat(s).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(a,"Z"):a},J9e=function(t,r,n){var a=ag(t,n);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(ag(r.reverse(),n).slice(1))},Q9e=function(t){var r=t.points,n=t.className,a=t.baseLinePoints,i=t.connectNulls,s=q9e(t,H9e);if(!r||!r.length)return null;var l=Jt("recharts-polygon",n);if(a&&a.length){var c=s.stroke&&s.stroke!=="none",u=J9e(r,a,i);return se.createElement("g",{className:l},se.createElement("path",wh({},Nt(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),c?se.createElement("path",wh({},Nt(s,!0),{fill:"none",d:ag(r,i)})):null,c?se.createElement("path",wh({},Nt(s,!0),{fill:"none",d:ag(a,i)})):null)}var d=ag(r,i);return se.createElement("path",wh({},Nt(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:l,d}))};function rP(){return rP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rP.apply(this,arguments)}var dy=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,s=Jt("recharts-dot",i);return r===+r&&n===+n&&a===+a?se.createElement("circle",rP({},Nt(t,!1),R1(t),{className:s,cx:r,cy:n,r:a})):null};function fx(e){"@babel/helpers - typeof";return fx=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},fx(e)}var Z9e=["x","y","top","left","width","height","className"];function nP(){return nP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nP.apply(this,arguments)}function Dz(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 e7e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dz(Object(r),!0).forEach(function(n){t7e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t7e(e,t,r){return t=r7e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r7e(e){var t=n7e(e,"string");return fx(t)=="symbol"?t:t+""}function n7e(e,t){if(fx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a7e(e,t){if(e==null)return{};var r=i7e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i7e(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 s7e=function(t,r,n,a,i,s){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(s,",").concat(r,"h").concat(n)},o7e=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,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,p=t.height,m=p===void 0?0:p,x=t.className,y=a7e(t,Z9e),v=e7e({x:n,y:i,top:l,left:u,width:f,height:m},y);return!it(n)||!it(i)||!it(f)||!it(m)||!it(l)||!it(u)?null:se.createElement("path",nP({},Nt(v,!0),{className:Jt("recharts-cross",x),d:s7e(n,i,f,m,l,u)}))},oA,Lz;function l7e(){if(Lz)return oA;Lz=1;var e=Q_(),t=cee(),r=Tl();function n(a,i){return a&&a.length?e(a,r(i,2),t):void 0}return oA=n,oA}var c7e=l7e();const u7e=tr(c7e);var lA,$z;function d7e(){if($z)return lA;$z=1;var e=Q_(),t=Tl(),r=uee();function n(a,i){return a&&a.length?e(a,t(i,2),r):void 0}return lA=n,lA}var f7e=d7e();const h7e=tr(f7e);var p7e=["cx","cy","angle","ticks","axisLine"],m7e=["ticks","tick","angle","tickFormatter","stroke"];function mp(e){"@babel/helpers - typeof";return mp=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},mp(e)}function ig(){return ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ig.apply(this,arguments)}function Bz(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 fd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bz(Object(r),!0).forEach(function(n){rS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uz(e,t){if(e==null)return{};var r=g7e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g7e(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 x7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zz(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xee(n.key),n)}}function y7e(e,t,r){return t&&zz(e.prototype,t),r&&zz(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v7e(e,t,r){return t=uw(t),b7e(e,Yee()?Reflect.construct(t,r||[],uw(e).constructor):t.apply(e,r))}function b7e(e,t){if(t&&(mp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w7e(e)}function w7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yee=function(){return!!e})()}function uw(e){return uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uw(e)}function _7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aP(e,t)}function aP(e,t){return aP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},aP(e,t)}function rS(e,t,r){return t=Xee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xee(e){var t=S7e(e,"string");return mp(t)=="symbol"?t:t+""}function S7e(e,t){if(mp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nS=(function(e){function t(){return x7e(this,t),v7e(this,t,arguments)}return _7e(t,e),y7e(t,[{key:"getTickValueCoord",value:function(n){var a=n.coordinate,i=this.props,s=i.angle,l=i.cx,c=i.cy;return Qr(l,c,a,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,a;switch(n){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=u7e(l,function(d){return d.coordinate||0}),u=h7e(l,function(d){return d.coordinate||0});return{cx:a,cy:i,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=n.axisLine,u=Uz(n,p7e),d=l.reduce(function(x,y){return[Math.min(x[0],y.coordinate),Math.max(x[1],y.coordinate)]},[1/0,-1/0]),f=Qr(a,i,d[0],s),p=Qr(a,i,d[1],s),m=fd(fd(fd({},Nt(u,!1)),{},{fill:"none"},Nt(c,!1)),{},{x1:f.x,y1:f.y,x2:p.x,y2:p.y});return se.createElement("line",ig({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.angle,c=a.tickFormatter,u=a.stroke,d=Uz(a,m7e),f=this.getTickTextAnchor(),p=Nt(d,!1),m=Nt(s,!1),x=i.map(function(y,v){var b=n.getTickValueCoord(y),w=fd(fd(fd(fd({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(b.x,", ").concat(b.y,")")},p),{},{stroke:"none",fill:u},m),{},{index:v},b),{},{payload:y});return se.createElement(er,ig({className:Jt("recharts-polar-radius-axis-tick",Lee(s)),key:"tick-".concat(y.coordinate)},ju(n.props,y,v)),t.renderTickItem(s,w,c?c(y.value,v):y.value))});return se.createElement(er,{className:"recharts-polar-radius-axis-ticks"},x)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.axisLine,s=n.tick;return!a||!a.length?null:se.createElement(er,{className:Jt("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),s&&this.renderTicks(),ba.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,a,i){var s;return se.isValidElement(n)?s=se.cloneElement(n,a):Mt(n)?s=n(a):s=se.createElement(nf,ig({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),s}}])})(N.PureComponent);rS(nS,"displayName","PolarRadiusAxis");rS(nS,"axisType","radiusAxis");rS(nS,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function gp(e){"@babel/helpers - typeof";return gp=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},gp(e)}function bd(){return bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bd.apply(this,arguments)}function Hz(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 hd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hz(Object(r),!0).forEach(function(n){aS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qz(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qee(n.key),n)}}function k7e(e,t,r){return t&&qz(e.prototype,t),r&&qz(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N7e(e,t,r){return t=dw(t),T7e(e,Jee()?Reflect.construct(t,r||[],dw(e).constructor):t.apply(e,r))}function T7e(e,t){if(t&&(gp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j7e(e)}function j7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jee=function(){return!!e})()}function dw(e){return dw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dw(e)}function A7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iP(e,t)}function iP(e,t){return iP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},iP(e,t)}function aS(e,t,r){return t=Qee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qee(e){var t=C7e(e,"string");return gp(t)=="symbol"?t:t+""}function C7e(e,t){if(gp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O7e=Math.PI/180,Wz=1e-5,iS=(function(e){function t(){return E7e(this,t),N7e(this,t,arguments)}return A7e(t,e),k7e(t,[{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.cx,s=a.cy,l=a.radius,c=a.orientation,u=a.tickSize,d=u||8,f=Qr(i,s,l,n.coordinate),p=Qr(i,s,l+(c==="inner"?-1:1)*d,n.coordinate);return{x1:f.x,y1:f.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(n){var a=this.props.orientation,i=Math.cos(-n.coordinate*O7e),s;return i>Wz?s=a==="outer"?"start":"end":i<-Wz?s=a==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.radius,l=n.axisLine,c=n.axisLineType,u=hd(hd({},Nt(this.props,!1)),{},{fill:"none"},Nt(l,!1));if(c==="circle")return se.createElement(dy,bd({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:s}));var d=this.props.ticks,f=d.map(function(p){return Qr(a,i,s,p.coordinate)});return se.createElement(Q9e,bd({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.tickLine,c=a.tickFormatter,u=a.stroke,d=Nt(this.props,!1),f=Nt(s,!1),p=hd(hd({},d),{},{fill:"none"},Nt(l,!1)),m=i.map(function(x,y){var v=n.getTickLineCoord(x),b=n.getTickTextAnchor(x),w=hd(hd(hd({textAnchor:b},d),{},{stroke:"none",fill:u},f),{},{index:y,payload:x,x:v.x2,y:v.y2});return se.createElement(er,bd({className:Jt("recharts-polar-angle-axis-tick",Lee(s)),key:"tick-".concat(x.coordinate)},ju(n.props,x,y)),l&&se.createElement("line",bd({className:"recharts-polar-angle-axis-tick-line"},p,v)),s&&t.renderTickItem(s,w,c?c(x.value,y):x.value))});return se.createElement(er,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.radius,s=n.axisLine;return i<=0||!a||!a.length?null:se.createElement(er,{className:Jt("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,a,i){var s;return se.isValidElement(n)?s=se.cloneElement(n,a):Mt(n)?s=n(a):s=se.createElement(nf,bd({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),s}}])})(N.PureComponent);aS(iS,"displayName","PolarAngleAxis");aS(iS,"axisType","angleAxis");aS(iS,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var cA,Vz;function P7e(){if(Vz)return cA;Vz=1;var e=lZ(),t=e(Object.getPrototypeOf,Object);return cA=t,cA}var uA,Gz;function R7e(){if(Gz)return uA;Gz=1;var e=Ec(),t=P7e(),r=kc(),n="[object Object]",a=Function.prototype,i=Object.prototype,s=a.toString,l=i.hasOwnProperty,c=s.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var f=t(d);if(f===null)return!0;var p=l.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&s.call(p)==c}return uA=u,uA}var I7e=R7e();const F7e=tr(I7e);var dA,Kz;function M7e(){if(Kz)return dA;Kz=1;var e=Ec(),t=kc(),r="[object Boolean]";function n(a){return a===!0||a===!1||t(a)&&e(a)==r}return dA=n,dA}var D7e=M7e();const L7e=tr(D7e);function hx(e){"@babel/helpers - typeof";return hx=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},hx(e)}function fw(){return fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fw.apply(this,arguments)}function $7e(e,t){return H7e(e)||z7e(e,t)||U7e(e,t)||B7e()}function B7e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1284In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U7e(e,t){if(e){if(typeof e=="string")return Yz(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 Yz(e,t)}}function Yz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function z7e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function H7e(e){if(Array.isArray(e))return e}function Xz(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 Jz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xz(Object(r),!0).forEach(function(n){q7e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q7e(e,t,r){return t=W7e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W7e(e){var t=V7e(e,"string");return hx(t)=="symbol"?t:t+""}function V7e(e,t){if(hx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qz=function(t,r,n,a,i){var s=n-a,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-s/2,",").concat(r+i),l+="L ".concat(t+n-s/2-a,",").concat(r+i),l+="L ".concat(t,",").concat(r," Z"),l},G7e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},K7e=function(t){var r=Jz(Jz({},G7e),t),n=N.useRef(),a=N.useState(-1),i=$7e(a,2),s=i[0],l=i[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&l(S)}catch{}},[]);var c=r.x,u=r.y,d=r.upperWidth,f=r.lowerWidth,p=r.height,m=r.className,x=r.animationEasing,y=r.animationDuration,v=r.animationBegin,b=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||p!==+p||d===0&&f===0||p===0)return null;var w=Jt("recharts-trapezoid",m);return b?se.createElement(Qs,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:p,x:c,y:u},duration:y,animationEasing:x,isActive:b},function(S){var j=S.upperWidth,k=S.lowerWidth,E=S.height,T=S.x,O=S.y;return se.createElement(Qs,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,easing:x},se.createElement("path",fw({},Nt(r,!0),{className:w,d:Qz(T,O,j,k,E),ref:n})))}):se.createElement("g",null,se.createElement("path",fw({},Nt(r,!0),{className:w,d:Qz(c,u,d,f,p)})))},Y7e=["option","shapeType","propTransformer","activeClassName","isActive"];function px(e){"@babel/helpers - typeof";return px=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},px(e)}function X7e(e,t){if(e==null)return{};var r=J7e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function J7e(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 Zz(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 hw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zz(Object(r),!0).forEach(function(n){Q7e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q7e(e,t,r){return t=Z7e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z7e(e){var t=eze(e,"string");return px(t)=="symbol"?t:t+""}function eze(e,t){if(px(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(px(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tze(e,t){return hw(hw({},t),e)}function rze(e,t){return e==="symbols"}function eH(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return se.createElement(i3,r);case"trapezoid":return se.createElement(K7e,r);case"sector":return se.createElement(Uee,r);case"symbols":if(rze(t))return se.createElement(z_,r);break;default:return null}}function nze(e){return N.isValidElement(e)?e.props:e}function pw(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?tze:n,i=e.activeClassName,s=i===void 0?"recharts-active-shape":i,l=e.isActive,c=X7e(e,Y7e),u;if(N.isValidElement(t))u=N.cloneElement(t,hw(hw({},c),nze(t)));else if(Mt(t))u=t(c);else if(F7e(t)&&!L7e(t)){var d=a(t,c);u=se.createElement(eH,{shapeType:r,elementProps:d})}else{var f=c;u=se.createElement(eH,{shapeType:r,elementProps:f})}return l?se.createElement(er,{className:s},u):u}function sS(e,t){return t!=null&&"trapezoids"in e.props}function oS(e,t){return t!=null&&"sectors"in e.props}function mx(e,t){return t!=null&&"points"in e.props}function aze(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function ize(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function sze(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function oze(e,t){var r;return sS(e,t)?r=aze:oS(e,t)?r=ize:mx(e,t)&&(r=sze),r}function lze(e,t){var r;return sS(e,t)?r="trapezoids":oS(e,t)?r="sectors":mx(e,t)&&(r="points"),r}function cze(e,t){if(sS(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(oS(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return mx(e,t)?t.payload:{}}function uze(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=lze(r,t),i=cze(r,t),s=n.filter(function(c,u){var d=Au(i,c),f=r.props[a].filter(function(x){var y=oze(r,t);return y(x,t)}),p=r.props[a].indexOf(f[f.length-1]),m=u===p;return d&&m}),l=n.indexOf(s[s.length-1]);return l}var Gb;function xp(e){"@babel/helpers - typeof";return xp=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},xp(e)}function _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_h.apply(this,arguments)}function tH(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 Kr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tH(Object(r),!0).forEach(function(n){qs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ete(n.key),n)}}function fze(e,t,r){return t&&rH(e.prototype,t),r&&rH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function hze(e,t,r){return t=mw(t),pze(e,Zee()?Reflect.construct(t,r||[],mw(e).constructor):t.apply(e,r))}function pze(e,t){if(t&&(xp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mze(e)}function mze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zee=function(){return!!e})()}function mw(e){return mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mw(e)}function gze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sP(e,t)}function sP(e,t){return sP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},sP(e,t)}function qs(e,t,r){return t=ete(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ete(e){var t=xze(e,"string");return xp(t)=="symbol"?t:t+""}function xze(e,t){if(xp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Sa=(function(e){function t(r){var n;return dze(this,t),n=hze(this,t,[r]),qs(n,"pieRef",null),qs(n,"sectorRefs",[]),qs(n,"id",zu("recharts-pie-")),qs(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Mt(a)&&a()}),qs(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Mt(a)&&a()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return gze(t,e),fze(t,[{key:"isActiveIndex",value:function(n){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(n)!==-1:n===a}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.label,l=i.labelLine,c=i.dataKey,u=i.valueKey,d=Nt(this.props,!1),f=Nt(s,!1),p=Nt(l,!1),m=s&&s.offsetRadius||20,x=n.map(function(y,v){var b=(y.startAngle+y.endAngle)/2,w=Qr(y.cx,y.cy,y.outerRadius+m,b),S=Kr(Kr(Kr(Kr({},d),y),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(w.x,y.cx)},w),j=Kr(Kr(Kr(Kr({},d),y),{},{fill:"none",stroke:y.fill},p),{},{index:v,points:[Qr(y.cx,y.cy,y.outerRadius,b),w]}),k=c;return Dt(c)&&Dt(u)?k="value":Dt(c)&&(k=u),se.createElement(er,{key:"label-".concat(y.startAngle,"-").concat(y.endAngle,"-").concat(y.midAngle,"-").concat(v)},l&&t.renderLabelLineItem(l,j,"line"),t.renderLabelItem(s,S,on(y,k)))});return se.createElement(er,{className:"recharts-pie-labels"},x)}},{key:"renderSectorsStatically",value:function(n){var a=this,i=this.props,s=i.activeShape,l=i.blendStroke,c=i.inactiveShape;return n.map(function(u,d){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&n.length!==1)return null;var f=a.isActiveIndex(d),p=c&&a.hasActiveIndex()?c:null,m=f?s:p,x=Kr(Kr({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return se.createElement(er,_h({ref:function(v){v&&!a.sectorRefs.includes(v)&&a.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},ju(a.props,u,d),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(d)}),se.createElement(pw,_h({option:m,isActive:f,shapeType:"sector"},x)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,a=this.props,i=a.sectors,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state,p=f.prevSectors,m=f.prevIsAnimationActive;return se.createElement(Qs,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(x){var y=x.t,v=[],b=i&&i[0],w=b.startAngle;return i.forEach(function(S,j){var k=p&&p[j],E=j>0?fs(S,"paddingAngle",0):0;if(k){var T=bn(k.endAngle-k.startAngle,S.endAngle-S.startAngle),O=Kr(Kr({},S),{},{startAngle:w+E,endAngle:w+T(y)+E});v.push(O),w=O.endAngle}else{var A=S.endAngle,P=S.startAngle,I=bn(0,A-P),R=I(y),M=Kr(Kr({},S),{},{startAngle:w+E,endAngle:w+R+E});v.push(M),w=M.endAngle}}),se.createElement(er,null,n.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(n){var a=this;n.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var s=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"ArrowRight":{var l=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,a=n.sectors,i=n.isAnimationActive,s=this.state.prevSectors;return i&&a&&a.length&&(!s||!Au(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,a=this.props,i=a.hide,s=a.sectors,l=a.className,c=a.label,u=a.cx,d=a.cy,f=a.innerRadius,p=a.outerRadius,m=a.isAnimationActive,x=this.state.isAnimationFinished;if(i||!s||!s.length||!it(u)||!it(d)||!it(f)||!it(p))return null;var y=Jt("recharts-pie",l);return se.createElement(er,{tabIndex:this.props.rootTabIndex,className:y,ref:function(b){n.pieRef=b}},this.renderSectors(),c&&this.renderLabels(s),ba.renderCallByParent(this.props,null,!1),(!m||x)&&Co.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return a.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:n.sectors!==a.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,a){return n>a?"start":n<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,a,i){if(se.isValidElement(n))return se.cloneElement(n,a);if(Mt(n))return n(a);var s=Jt("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return se.createElement(xu,_h({},a,{key:i,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,a,i){if(se.isValidElement(n))return se.cloneElement(n,a);var s=i;if(Mt(n)&&(s=n(a),se.isValidElement(s)))return s;var l=Jt("recharts-pie-label-text",typeof n!="boolean"&&!Mt(n)?n.className:"");return se.createElement(nf,_h({},a,{alignmentBaseline:"middle",className:l}),s)}}])})(N.PureComponent);Gb=Sa;qs(Sa,"displayName","Pie");qs(Sa,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Nc.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});qs(Sa,"parseDeltaAngle",function(e,t){var r=yi(t-e),n=Math.min(Math.abs(t-e),360);return r*n});qs(Sa,"getRealPieData",function(e){var t=e.data,r=e.children,n=Nt(e,!1),a=Ei(r,Li);return t&&t.length?t.map(function(i,s){return Kr(Kr(Kr({payload:i},n),i),a&&a[s]&&a[s].props)}):a&&a.length?a.map(function(i){return Kr(Kr({},n),i.props)}):[]});qs(Sa,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,a=t.width,i=t.height,s=Dee(a,i),l=n+vi(e.cx,a,a/2),c=r+vi(e.cy,i,i/2),u=vi(e.innerRadius,s,0),d=vi(e.outerRadius,s,s*.8),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}});qs(Sa,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?Kr(Kr({},t.type.defaultProps),t.props):t.props,a=Gb.getRealPieData(n);if(!a||!a.length)return null;var i=n.cornerRadius,s=n.startAngle,l=n.endAngle,c=n.paddingAngle,u=n.dataKey,d=n.nameKey,f=n.valueKey,p=n.tooltipType,m=Math.abs(n.minAngle),x=Gb.parseCoordinateOfPie(n,r),y=Gb.parseDeltaAngle(s,l),v=Math.abs(y),b=u;Dt(u)&&Dt(f)?(Ao(!1,`Use "dataKey" to specify the value of pie,
1285 the props "valueKey" will be deprecated in 1.1.0`),b="value"):Dt(u)&&(Ao(!1,`Use "dataKey" to specify the value of pie, 1286 the props "valueKey" will be deprecated in 1.1.0`),b=f);var w=a.filter(function(O){return on(O,b,0)!==0}).length,S=(v>=360?w:w-1)*c,j=v-w*m-S,k=a.reduce(function(O,A){var P=on(A,b,0);return O+(it(P)?P:0)},0),E;if(k>0){var T;E=a.map(function(O,A){var P=on(O,b,0),I=on(O,d,A),R=(it(P)?P:0)/k,M;A?M=T.endAngle+yi(y)*c*(P!==0?1:0):M=s;var L=M+yi(y)*((P!==0?m:0)+R*j),U=(M+L)/2,W=(x.innerRadius+x.outerRadius)/2,V=[{name:I,value:P,payload:O,dataKey:b,type:p}],G=Qr(x.cx,x.cy,W,U);return T=Kr(Kr(Kr({percent:R,cornerRadius:i,name:I,tooltipPayload:V,midAngle:U,middleRadius:W,tooltipPosition:G},O),x),{},{value:on(O,b),startAngle:M,endAngle:L,payload:O,paddingAngle:yi(y)*c}),T})}return Kr(Kr({},x),{},{sectors:E,data:a})});var fA,nH;function yze(){if(nH)return fA;nH=1;var e=Math.ceil,t=Math.max;function r(n,a,i,s){for(var l=-1,c=t(e((a-n)/(i||1)),0),u=Array(c);c--;)u[s?c:++l]=n,n+=i;return u}return fA=r,fA}var hA,aH;function tte(){if(aH)return hA;aH=1;var e=EZ(),t=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*r}return a===a?a:0}return hA=n,hA}var pA,iH;function vze(){if(iH)return pA;iH=1;var e=yze(),t=W_(),r=tte();function n(a){return function(i,s,l){return l&&typeof l!="number"&&t(i,s,l)&&(s=l=void 0),i=r(i),s===void 0?(s=i,i=0):s=r(s),l=l===void 0?i<s?1:-1:r(l),e(i,s,l,a)}}return pA=n,pA}var mA,sH;function bze(){if(sH)return mA;sH=1;var e=vze(),t=e();return mA=t,mA}var wze=bze();const gw=tr(wze);function gx(e){"@babel/helpers - typeof";return gx=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},gx(e)}function oH(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 lH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oH(Object(r),!0).forEach(function(n){rte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rte(e,t,r){return t=_ze(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _ze(e){var t=Sze(e,"string");return gx(t)=="symbol"?t:t+""}function Sze(e,t){if(gx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eze=["Webkit","Moz","O","ms"],kze=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=Eze.reduce(function(i,s){return lH(lH({},i),{},rte({},s+n,r))},{});return a[t]=r,a};function yp(e){"@babel/helpers - typeof";return yp=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},yp(e)}function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xw.apply(this,arguments)}function cH(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 gA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cH(Object(r),!0).forEach(function(n){rs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ate(n.key),n)}}function Tze(e,t,r){return t&&uH(e.prototype,t),r&&uH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jze(e,t,r){return t=yw(t),Aze(e,nte()?Reflect.construct(t,r||[],yw(e).constructor):t.apply(e,r))}function Aze(e,t){if(t&&(yp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cze(e)}function Cze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nte=function(){return!!e})()}
vendor: 146,750 bytes, lines 1286-1291
1286function yw(e){return yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yw(e)}function Oze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oP(e,t)}function oP(e,t){return oP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},oP(e,t)}function rs(e,t,r){return t=ate(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ate(e){var t=Pze(e,"string");return yp(t)=="symbol"?t:t+""}function Pze(e,t){if(yp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Rze=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,s=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=tg().domain(gw(0,c)).range([i,i+s-l]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:d}},dH=function(t){return t.changedTouches&&!!t.changedTouches.length},vp=(function(e){function t(r){var n;return Nze(this,t),n=jze(this,t,[r]),rs(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),rs(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),rs(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()}),rs(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),rs(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),rs(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),rs(n,"handleSlideDragStart",function(a){var i=dH(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 Oze(t,e),Tze(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,c=l.gap,u=l.data,d=u.length-1,f=Math.min(a,i),p=Math.max(a,i),m=t.getIndexInRange(s,f),x=t.getIndexInRange(s,p);return{startIndex:m-m%c,endIndex:x===d?d:x-x%c}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,s=a.tickFormatter,l=a.dataKey,c=on(i[n],l,n);return Mt(s)?s(c,n):c}},{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,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,p=c.startIndex,m=c.endIndex,x=c.onChange,y=n.pageX-i;y>0?y=Math.min(y,u+d-f-l,u+d-f-s):y<0&&(y=Math.max(y,u-s,u-l));var v=this.getIndex({startX:s+y,endX:l+y});(v.startIndex!==p||v.endIndex!==m)&&x&&x(v),this.setState({startX:s+y,endX:l+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=dH(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,c=a.startX,u=this.state[s],d=this.props,f=d.x,p=d.width,m=d.travellerWidth,x=d.onChange,y=d.gap,v=d.data,b={startX:this.state.startX,endX:this.state.endX},w=n.pageX-i;w>0?w=Math.min(w,f+p-m-u):w<0&&(w=Math.max(w,f-u)),b[s]=u+w;var S=this.getIndex(b),j=S.startIndex,k=S.endIndex,E=function(){var O=v.length-1;return s==="startX"&&(l>c?j%y===0:k%y===0)||l<c&&k===O||s==="endX"&&(l>c?k%y===0:j%y===0)||l>c&&k===O};this.setState(rs(rs({},s,u+w),"brushMoveStartX",n.pageX),function(){x&&E()&&x(S)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,s=this.state,l=s.scaleValues,c=s.startX,u=s.endX,d=this.state[a],f=l.indexOf(d);if(f!==-1){var p=f+n;if(!(p===-1||p>=l.length)){var m=l[p];a==="startX"&&m>=u||a==="endX"&&m<=c||this.setState(rs({},a,m),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,c=n.fill,u=n.stroke;return se.createElement("rect",{stroke:u,fill:c,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,c=n.data,u=n.children,d=n.padding,f=N.Children.only(u);return f?se.cloneElement(f,{x:a,y:i,width:s,height:l,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,s,l=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,p=c.traveller,m=c.ariaLabel,x=c.data,y=c.startIndex,v=c.endIndex,b=Math.max(n,this.props.x),w=gA(gA({},Nt(this.props,!1)),{},{x:b,y:u,width:d,height:f}),S=m||"Min value: ".concat((i=x[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((s=x[v])===null||s===void 0?void 0:s.name);return se.createElement(er,{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(k){["ArrowLeft","ArrowRight"].includes(k.key)&&(k.preventDefault(),k.stopPropagation(),l.handleTravellerMoveKeyboard(k.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,w))}},{key:"renderSlide",value:function(n,a){var i=this.props,s=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,d=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return se.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:s,width:f,height:l})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,s=n.y,l=n.height,c=n.travellerWidth,u=n.stroke,d=this.state,f=d.startX,p=d.endX,m=5,x={pointerEvents:"none",fill:u};return se.createElement(er,{className:"recharts-brush-texts"},se.createElement(nf,xw({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,p)-m,y:s+l/2},x),this.getTextOfTick(a)),se.createElement(nf,xw({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,p)+c+m,y:s+l/2},x),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,s=n.children,l=n.x,c=n.y,u=n.width,d=n.height,f=n.alwaysShowText,p=this.state,m=p.startX,x=p.endX,y=p.isTextActive,v=p.isSlideMoving,b=p.isTravellerMoving,w=p.isTravellerFocused;if(!a||!a.length||!it(l)||!it(c)||!it(u)||!it(d)||u<=0||d<=0)return null;var S=Jt("recharts-brush",i),j=se.Children.count(s)===1,k=kze("userSelect","none");return se.createElement(er,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(m,x),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(x,"endX"),(y||v||b||w||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,s=n.width,l=n.height,c=n.stroke,u=Math.floor(i+l/2)-1;return se.createElement(se.Fragment,null,se.createElement("rect",{x:a,y:i,width:s,height:l,fill:c,stroke:"none"}),se.createElement("line",{x1:a+1,y1:u,x2:a+s-1,y2:u,fill:"none",stroke:"#fff"}),se.createElement("line",{x1:a+1,y1:u+2,x2:a+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return se.isValidElement(n)?i=se.cloneElement(n,a):Mt(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,c=n.travellerWidth,u=n.updateId,d=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return gA({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s},i&&i.length?Rze({data:i,width:s,x:l,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+s-c]);var p=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,s=0,l=i-1;l-s>1;){var c=Math.floor((s+l)/2);n[c]>a?l=c:s=c}return a>=n[l]?l:s}}])})(N.PureComponent);rs(vp,"displayName","Brush");rs(vp,"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 xA,fH;function Ize(){if(fH)return xA;fH=1;var e=OI();function t(r,n){var a;return e(r,function(i,s,l){return a=n(i,s,l),!a}),!!a}return xA=t,xA}var yA,hH;function Fze(){if(hH)return yA;hH=1;var e=tZ(),t=Tl(),r=Ize(),n=Gi(),a=W_();function i(s,l,c){var u=n(s)?e:r;return c&&a(s,l,c)&&(l=void 0),u(s,t(l,3))}return yA=i,yA}var Mze=Fze();const Dze=tr(Mze);var gl=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},vA,pH;function Lze(){if(pH)return vA;pH=1;var e=vZ();function t(r,n,a){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return vA=t,vA}var bA,mH;function $ze(){if(mH)return bA;mH=1;var e=Lze(),t=xZ(),r=Tl();function n(a,i){var s={};return i=r(i,3),t(a,function(l,c,u){e(s,c,i(l,c,u))}),s}return bA=n,bA}var Bze=$ze();const Uze=tr(Bze);var wA,gH;function zze(){if(gH)return wA;gH=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(!r(t[n],n,t))return!1;return!0}return wA=e,wA}var _A,xH;function Hze(){if(xH)return _A;xH=1;var e=OI();function t(r,n){var a=!0;return e(r,function(i,s,l){return a=!!n(i,s,l),a}),a}return _A=t,_A}var SA,yH;function qze(){if(yH)return SA;yH=1;var e=zze(),t=Hze(),r=Tl(),n=Gi(),a=W_();function i(s,l,c){var u=n(s)?e:t;return c&&a(s,l,c)&&(l=void 0),u(s,r(l,3))}return SA=i,SA}var Wze=qze();const ite=tr(Wze);var Vze=["x","y"];function xx(e){"@babel/helpers - typeof";return xx=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},xx(e)}function lP(){return lP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lP.apply(this,arguments)}function vH(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 k0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vH(Object(r),!0).forEach(function(n){Gze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gze(e,t,r){return t=Kze(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kze(e){var t=Yze(e,"string");return xx(t)=="symbol"?t:t+""}function Yze(e,t){if(xx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xze(e,t){if(e==null)return{};var r=Jze(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jze(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 Qze(e,t){var r=e.x,n=e.y,a=Xze(e,Vze),i="".concat(r),s=parseInt(i,10),l="".concat(n),c=parseInt(l,10),u="".concat(t.height||a.height),d=parseInt(u,10),f="".concat(t.width||a.width),p=parseInt(f,10);return k0(k0(k0(k0(k0({},t),a),s?{x:s}:{}),c?{y:c}:{}),{},{height:d,width:p,name:t.name,radius:t.radius})}function bH(e){return se.createElement(pw,lP({shapeType:"rectangle",propTransformer:Qze,activeClassName:"recharts-active-bar"},e))}var Zze=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=typeof n=="number";return i?t(n,a):(i||sf(),r)}},eHe=["value","background"],ste;function bp(e){"@babel/helpers - typeof";return bp=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},bp(e)}function tHe(e,t){if(e==null)return{};var r=rHe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rHe(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 vw(){return vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vw.apply(this,arguments)}function wH(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 Xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wH(Object(r),!0).forEach(function(n){fu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _H(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lte(n.key),n)}}function aHe(e,t,r){return t&&_H(e.prototype,t),r&&_H(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function iHe(e,t,r){return t=bw(t),sHe(e,ote()?Reflect.construct(t,r||[],bw(e).constructor):t.apply(e,r))}function sHe(e,t){if(t&&(bp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oHe(e)}function oHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ote(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ote=function(){return!!e})()}function bw(e){return bw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bw(e)}function lHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cP(e,t)}function cP(e,t){return cP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cP(e,t)}function fu(e,t,r){return t=lte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lte(e){var t=cHe(e,"string");return bp(t)=="symbol"?t:t+""}function cHe(e,t){if(bp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ko=(function(e){function t(){var r;nHe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=iHe(this,t,[].concat(a)),fu(r,"state",{isAnimationFinished:!1}),fu(r,"id",zu("recharts-bar-")),fu(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),fu(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return lHe(t,e),aHe(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,s=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,d=Nt(this.props,!1);return n&&n.map(function(f,p){var m=p===c,x=m?u:s,y=Xn(Xn(Xn({},d),f),{},{isActive:m,option:x,index:p,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return se.createElement(er,vw({className:"recharts-bar-rectangle"},ju(a.props,f,p),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(p)}),se.createElement(bH,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,s=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,d=a.animationEasing,f=a.animationId,p=this.state.prevData;return se.createElement(Qs,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var x=m.t,y=i.map(function(v,b){var w=p&&p[b];if(w){var S=bn(w.x,v.x),j=bn(w.y,v.y),k=bn(w.width,v.width),E=bn(w.height,v.height);return Xn(Xn({},v),{},{x:S(x),y:j(x),width:k(x),height:E(x)})}if(s==="horizontal"){var T=bn(0,v.height),O=T(x);return Xn(Xn({},v),{},{y:v.y+v.height-O,height:O})}var A=bn(0,v.width),P=A(x);return Xn(Xn({},v),{},{width:P})});return se.createElement(er,null,n.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!Au(s,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,s=a.dataKey,l=a.activeIndex,c=Nt(this.props.background,!1);return i.map(function(u,d){u.value;var f=u.background,p=tHe(u,eHe);if(!f)return null;var m=Xn(Xn(Xn(Xn(Xn({},p),{},{fill:"#eee"},f),c),ju(n.props,u,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return se.createElement(bH,vw({key:"background-bar-".concat(d),option:n.props.background,isActive:d===l},m))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=Ei(d,dm);if(!f)return null;var p=u==="vertical"?s[0].height/2:s[0].width/2,m=function(v,b){var w=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:w,errorVal:on(v,b)}},x={clipPath:n?"url(#clipPath-".concat(a,")"):null};return se.createElement(er,x,f.map(function(y){return se.cloneElement(y,{key:"error-bar-".concat(a,"-").concat(y.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,s=n.className,l=n.xAxis,c=n.yAxis,u=n.left,d=n.top,f=n.width,p=n.height,m=n.isAnimationActive,x=n.background,y=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=Jt("recharts-bar",s),w=l&&l.allowDataOverflow,S=c&&c.allowDataOverflow,j=w||S,k=Dt(y)?this.id:y;return se.createElement(er,{className:b},w||S?se.createElement("defs",null,se.createElement("clipPath",{id:"clipPath-".concat(k)},se.createElement("rect",{x:w?u:u-f/2,y:S?d:d-p/2,width:w?f:f*2,height:S?p:p*2}))):null,se.createElement(er,{className:"recharts-bar-rectangles",clipPath:j?"url(#clipPath-".concat(k,")"):null},x?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(j,k),(!m||v)&&Co.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])})(N.PureComponent);ste=ko;fu(ko,"displayName","Bar");fu(ko,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Nc.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});fu(ko,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,s=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,m=z8e(n,r);if(!m)return null;var x=t.layout,y=r.type.defaultProps,v=y!==void 0?Xn(Xn({},y),r.props):r.props,b=v.dataKey,w=v.children,S=v.minPointSize,j=x==="horizontal"?s:i,k=u?j.scale.domain():null,E=Y8e({numericAxis:j}),T=Ei(w,Li),O=f.map(function(A,P){var I,R,M,L,U,W;u?I=H8e(u[d+P],k):(I=on(A,b),Array.isArray(I)||(I=[E,I]));var V=Zze(S,ste.defaultProps.minPointSize)(I[1],P);if(x==="horizontal"){var G,K=[s.scale(I[0]),s.scale(I[1])],F=K[0],ne=K[1];R=X7({axis:i,ticks:l,bandSize:a,offset:m.offset,entry:A,index:P}),M=(G=ne??F)!==null&&G!==void 0?G:void 0,L=m.size;var H=F-ne;if(U=Number.isNaN(H)?0:H,W={x:R,y:s.y,width:L,height:s.height},Math.abs(V)>0&&Math.abs(U)<Math.abs(V)){var B=yi(U||V)*(Math.abs(V)-Math.abs(U));M-=B,U+=B}}else{var X=[i.scale(I[0]),i.scale(I[1])],Y=X[0],ae=X[1];if(R=Y,M=X7({axis:s,ticks:c,bandSize:a,offset:m.offset,entry:A,index:P}),L=ae-Y,U=m.size,W={x:i.x,y:M,width:i.width,height:U},Math.abs(V)>0&&Math.abs(L)<Math.abs(V)){var fe=yi(L||V)*(Math.abs(V)-Math.abs(L));L+=fe}}return Xn(Xn(Xn({},A),{},{x:R,y:M,width:L,height:U,value:u?I:I[1],payload:A,background:W},T&&T[P]&&T[P].props),{},{tooltipPayload:[Fee(r,A)],tooltipPosition:{x:R+L/2,y:M+U/2}})});return Xn({data:O,layout:x},p)});function yx(e){"@babel/helpers - typeof";return yx=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},yx(e)}function uHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cte(n.key),n)}}function dHe(e,t,r){return t&&SH(e.prototype,t),r&&SH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function EH(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 xo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EH(Object(r),!0).forEach(function(n){lS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lS(e,t,r){return t=cte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cte(e){var t=fHe(e,"string");return yx(t)=="symbol"?t:t+""}function fHe(e,t){if(yx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cS=function(t,r,n,a,i){var s=t.width,l=t.height,c=t.layout,u=t.children,d=Object.keys(r),f={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},p=!!ns(u,ko);return d.reduce(function(m,x){var y=r[x],v=y.orientation,b=y.domain,w=y.padding,S=w===void 0?{}:w,j=y.mirror,k=y.reversed,E="".concat(v).concat(j?"Mirror":""),T,O,A,P,I;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var R=b[1]-b[0],M=1/0,L=y.categoricalDomain.sort();if(L.forEach(function(X,Y){Y>0&&(M=Math.min((X||0)-(L[Y-1]||0),M))}),Number.isFinite(M)){var U=M/R,W=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(T=U*W/2),y.padding==="no-gap"){var V=vi(t.barCategoryGap,U*W),G=U*W/2;T=G-V-(G-V)/W*V}}}a==="xAxis"?O=[n.left+(S.left||0)+(T||0),n.left+n.width-(S.right||0)-(T||0)]:a==="yAxis"?O=c==="horizontal"?[n.top+n.height-(S.bottom||0),n.top+(S.top||0)]:[n.top+(S.top||0)+(T||0),n.top+n.height-(S.bottom||0)-(T||0)]:O=y.range,k&&(O=[O[1],O[0]]);var K=Oee(y,i,p),F=K.scale,ne=K.realScaleType;F.domain(b).range(O),Pee(F);var H=Ree(F,xo(xo({},y),{},{realScaleType:ne}));a==="xAxis"?(I=v==="top"&&!j||v==="bottom"&&j,A=n.left,P=f[E]-I*y.height):a==="yAxis"&&(I=v==="left"&&!j||v==="right"&&j,A=f[E]-I*y.width,P=n.top);var B=xo(xo(xo({},y),H),{},{realScaleType:ne,x:A,y:P,scale:F,width:a==="xAxis"?n.width:y.width,height:a==="yAxis"?n.height:y.height});return B.bandSize=nw(B,H),!y.hide&&a==="xAxis"?f[E]+=(I?-1:1)*B.height:y.hide||(f[E]+=(I?-1:1)*B.width),xo(xo({},m),{},lS({},x,B))},{})},ute=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)}},hHe=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return ute({x:r,y:n},{x:a,y:i})},dte=(function(){function e(t){uHe(this,e),this.scale=t}return dHe(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 c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}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)}}])})();lS(dte,"EPS",1e-4);var s3=function(t){var r=Object.keys(t).reduce(function(n,a){return xo(xo({},n),{},lS({},a,dte.create(t[a])))},{});return xo(xo({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.bandAware,l=i.position;return Uze(a,function(c,u){return r[u].apply(c,{bandAware:s,position:l})})},isInRange:function(a){return ite(a,function(i,s){return r[s].isInRange(i)})}})};function pHe(e){return(e%180+180)%180}var mHe=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=pHe(a),s=i*Math.PI/180,l=Math.atan(n/r),c=s>l&&s<Math.PI-l?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},EA,kH;function gHe(){if(kH)return EA;kH=1;var e=Tl(),t=sy(),r=H_();function n(a){return function(i,s,l){var c=Object(i);if(!t(i)){var u=e(s,3);i=r(i),s=function(f){return u(c[f],f,c)}}var d=a(i,s,l);return d>-1?c[u?i[d]:d]:void 0}}return EA=n,EA}var kA,NH;function xHe(){if(NH)return kA;NH=1;var e=tte();function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return kA=t,kA}var NA,TH;function yHe(){if(TH)return NA;TH=1;var e=fZ(),t=Tl(),r=xHe(),n=Math.max;function a(i,s,l){var c=i==null?0:i.length;if(!c)return-1;var u=l==null?0:r(l);return u<0&&(u=n(c+u,0)),e(i,t(s,3),u)}return NA=a,NA}var TA,jH;function vHe(){if(jH)return TA;jH=1;var e=gHe(),t=yHe(),r=e(t);return TA=r,TA}var bHe=vHe();const wHe=tr(bHe);var _He=TQ();const SHe=tr(_He);var EHe=SHe(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("")}),o3=N.createContext(void 0),l3=N.createContext(void 0),fte=N.createContext(void 0),hte=N.createContext({}),pte=N.createContext(void 0),mte=N.createContext(0),gte=N.createContext(0),AH=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,s=t.clipPathId,l=t.children,c=t.width,u=t.height,d=EHe(i);return se.createElement(o3.Provider,{value:n},se.createElement(l3.Provider,{value:a},se.createElement(hte.Provider,{value:i},se.createElement(fte.Provider,{value:d},se.createElement(pte.Provider,{value:s},se.createElement(mte.Provider,{value:u},se.createElement(gte.Provider,{value:c},l)))))))},kHe=function(){return N.useContext(pte)},xte=function(t){var r=N.useContext(o3);r==null&&sf();var n=r[t];return n==null&&sf(),n},NHe=function(){var t=N.useContext(o3);return su(t)},THe=function(){var t=N.useContext(l3),r=wHe(t,function(n){return ite(n.domain,Number.isFinite)});return r||su(t)},yte=function(t){var r=N.useContext(l3);r==null&&sf();var n=r[t];return n==null&&sf(),n},jHe=function(){var t=N.useContext(fte);return t},AHe=function(){return N.useContext(hte)},c3=function(){return N.useContext(gte)},u3=function(){return N.useContext(mte)};function wp(e){"@babel/helpers - typeof";return wp=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},wp(e)}function CHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OHe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bte(n.key),n)}}function PHe(e,t,r){return t&&OHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RHe(e,t,r){return t=ww(t),IHe(e,vte()?Reflect.construct(t,r||[],ww(e).constructor):t.apply(e,r))}function IHe(e,t){if(t&&(wp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FHe(e)}function FHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vte=function(){return!!e})()}function ww(e){return ww=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ww(e)}function MHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uP(e,t)}function uP(e,t){return uP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},uP(e,t)}function CH(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 OH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CH(Object(r),!0).forEach(function(n){d3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d3(e,t,r){return t=bte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bte(e){var t=DHe(e,"string");return wp(t)=="symbol"?t:t+""}function DHe(e,t){if(wp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function LHe(e,t){return zHe(e)||UHe(e,t)||BHe(e,t)||$He()}function $He(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1287In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BHe(e,t){if(e){if(typeof e=="string")return PH(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 PH(e,t)}}function PH(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function UHe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function zHe(e){if(Array.isArray(e))return e}function dP(){return dP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dP.apply(this,arguments)}var HHe=function(t,r){var n;return se.isValidElement(t)?n=se.cloneElement(t,r):Mt(t)?n=t(r):n=se.createElement("line",dP({},r,{className:"recharts-reference-line-line"})),n},qHe=function(t,r,n,a,i,s,l,c,u){var d=i.x,f=i.y,p=i.width,m=i.height;if(n){var x=u.y,y=t.y.apply(x,{position:s});if(gl(u,"discard")&&!t.y.isInRange(y))return null;var v=[{x:d+p,y},{x:d,y}];return c==="left"?v.reverse():v}if(r){var b=u.x,w=t.x.apply(b,{position:s});if(gl(u,"discard")&&!t.x.isInRange(w))return null;var S=[{x:w,y:f+m},{x:w,y:f}];return l==="top"?S.reverse():S}if(a){var j=u.segment,k=j.map(function(E){return t.apply(E,{position:s})});return gl(u,"discard")&&Dze(k,function(E){return!t.isInRange(E)})?null:k}return null};function WHe(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,s=e.shape,l=e.className,c=e.alwaysShow,u=kHe(),d=xte(a),f=yte(i),p=jHe();if(!u||!p)return null;Ao(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=s3({x:d.scale,y:f.scale}),x=ca(t),y=ca(r),v=n&&n.length===2,b=qHe(m,x,y,v,p,e.position,d.orientation,f.orientation,e);if(!b)return null;var w=LHe(b,2),S=w[0],j=S.x,k=S.y,E=w[1],T=E.x,O=E.y,A=gl(e,"hidden")?"url(#".concat(u,")"):void 0,P=OH(OH({clipPath:A},Nt(e,!0)),{},{x1:j,y1:k,x2:T,y2:O});return se.createElement(er,{className:Jt("recharts-reference-line",l)},HHe(s,P),ba.renderCallByParent(e,hHe({x1:j,y1:k,x2:T,y2:O})))}var vx=(function(e){function t(){return CHe(this,t),RHe(this,t,arguments)}return MHe(t,e),PHe(t,[{key:"render",value:function(){return se.createElement(WHe,this.props)}}])})(se.Component);d3(vx,"displayName","ReferenceLine");d3(vx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function fP(){return fP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fP.apply(this,arguments)}function _p(e){"@babel/helpers - typeof";return _p=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},_p(e)}function RH(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 IH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RH(Object(r),!0).forEach(function(n){uS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GHe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_te(n.key),n)}}function KHe(e,t,r){return t&&GHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YHe(e,t,r){return t=_w(t),XHe(e,wte()?Reflect.construct(t,r||[],_w(e).constructor):t.apply(e,r))}function XHe(e,t){if(t&&(_p(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JHe(e)}function JHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wte=function(){return!!e})()}function _w(e){return _w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_w(e)}function QHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hP(e,t)}function hP(e,t){return hP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hP(e,t)}function uS(e,t,r){return t=_te(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _te(e){var t=ZHe(e,"string");return _p(t)=="symbol"?t:t+""}function ZHe(e,t){if(_p(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_p(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eqe=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,s=s3({x:a.scale,y:i.scale}),l=s.apply({x:r,y:n},{bandAware:!0});return gl(t,"discard")&&!s.isInRange(l)?null:l},dS=(function(e){function t(){return VHe(this,t),YHe(this,t,arguments)}return QHe(t,e),KHe(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,s=n.r,l=n.alwaysShow,c=n.clipPathId,u=ca(a),d=ca(i);if(Ao(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=eqe(this.props);if(!f)return null;var p=f.x,m=f.y,x=this.props,y=x.shape,v=x.className,b=gl(this.props,"hidden")?"url(#".concat(c,")"):void 0,w=IH(IH({clipPath:b},Nt(this.props,!0)),{},{cx:p,cy:m});return se.createElement(er,{className:Jt("recharts-reference-dot",v)},t.renderDot(y,w),ba.renderCallByParent(this.props,{x:p-s,y:m-s,width:2*s,height:2*s}))}}])})(se.Component);uS(dS,"displayName","ReferenceDot");uS(dS,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});uS(dS,"renderDot",function(e,t){var r;return se.isValidElement(e)?r=se.cloneElement(e,t):Mt(e)?r=e(t):r=se.createElement(dy,fP({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function pP(){return pP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pP.apply(this,arguments)}function Sp(e){"@babel/helpers - typeof";return Sp=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},Sp(e)}function FH(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 MH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FH(Object(r),!0).forEach(function(n){fS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rqe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ete(n.key),n)}}function nqe(e,t,r){return t&&rqe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aqe(e,t,r){return t=Sw(t),iqe(e,Ste()?Reflect.construct(t,r||[],Sw(e).constructor):t.apply(e,r))}function iqe(e,t){if(t&&(Sp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sqe(e)}function sqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ste(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ste=function(){return!!e})()}function Sw(e){return Sw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sw(e)}function oqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mP(e,t)}function mP(e,t){return mP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},mP(e,t)}function fS(e,t,r){return t=Ete(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ete(e){var t=lqe(e,"string");return Sp(t)=="symbol"?t:t+""}function lqe(e,t){if(Sp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cqe=function(t,r,n,a,i){var s=i.x1,l=i.x2,c=i.y1,u=i.y2,d=i.xAxis,f=i.yAxis;if(!d||!f)return null;var p=s3({x:d.scale,y:f.scale}),m={x:t?p.x.apply(s,{position:"start"}):p.x.rangeMin,y:n?p.y.apply(c,{position:"start"}):p.y.rangeMin},x={x:r?p.x.apply(l,{position:"end"}):p.x.rangeMax,y:a?p.y.apply(u,{position:"end"}):p.y.rangeMax};return gl(i,"discard")&&(!p.isInRange(m)||!p.isInRange(x))?null:ute(m,x)},hS=(function(e){function t(){return tqe(this,t),aqe(this,t,arguments)}return oqe(t,e),nqe(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,s=n.y1,l=n.y2,c=n.className,u=n.alwaysShow,d=n.clipPathId;Ao(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=ca(a),p=ca(i),m=ca(s),x=ca(l),y=this.props.shape;if(!f&&!p&&!m&&!x&&!y)return null;var v=cqe(f,p,m,x,this.props);if(!v&&!y)return null;var b=gl(this.props,"hidden")?"url(#".concat(d,")"):void 0;return se.createElement(er,{className:Jt("recharts-reference-area",c)},t.renderRect(y,MH(MH({clipPath:b},Nt(this.props,!0)),v)),ba.renderCallByParent(this.props,v))}}])})(se.Component);fS(hS,"displayName","ReferenceArea");fS(hS,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});fS(hS,"renderRect",function(e,t){var r;return se.isValidElement(e)?r=se.cloneElement(e,t):Mt(e)?r=e(t):r=se.createElement(i3,pP({},t,{className:"recharts-reference-area-rect"})),r});function kte(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function uqe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return mHe(n,r)}function dqe(e,t,r){var n=r==="width",a=e.x,i=e.y,s=e.width,l=e.height;return t===1?{start:n?a:i,end:n?a+s:i+l}:{start:n?a+s:i+l,end:n?a:i}}function Ew(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function fqe(e,t){return kte(e,t+1)}function hqe(e,t,r,n,a){for(var i=(n||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,f=function(){var x=n==null?void 0:n[c];if(x===void 0)return{v:kte(n,u)};var y=c,v,b=function(){return v===void 0&&(v=r(x,y)),v},w=x.coordinate,S=c===0||Ew(e,w,b,d,l);S||(c=0,d=s,u+=1),S&&(d=w+e*(b()/2+a),c+=u)},p;u<=i.length;)if(p=f(),p)return p.v;return[]}function bx(e){"@babel/helpers - typeof";return bx=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},bx(e)}function DH(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 Ua(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DH(Object(r),!0).forEach(function(n){pqe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pqe(e,t,r){return t=mqe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mqe(e){var t=gqe(e,"string");return bx(t)=="symbol"?t:t+""}function gqe(e,t){if(bx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xqe(e,t,r,n,a){for(var i=(n||[]).slice(),s=i.length,l=t.start,c=t.end,u=function(p){var m=i[p],x,y=function(){return x===void 0&&(x=r(m,p)),x};if(p===s-1){var v=e*(m.coordinate+e*y()/2-c);i[p]=m=Ua(Ua({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else i[p]=m=Ua(Ua({},m),{},{tickCoord:m.coordinate});var b=Ew(e,m.tickCoord,y,l,c);b&&(c=m.tickCoord-e*(y()/2+a),i[p]=Ua(Ua({},m),{},{isShow:!0}))},d=s-1;d>=0;d--)u(d);return i}function yqe(e,t,r,n,a,i){var s=(n||[]).slice(),l=s.length,c=t.start,u=t.end;if(i){var d=n[l-1],f=r(d,l-1),p=e*(d.coordinate+e*f/2-u);s[l-1]=d=Ua(Ua({},d),{},{tickCoord:p>0?d.coordinate-p*e:d.coordinate});var m=Ew(e,d.tickCoord,function(){return f},c,u);m&&(u=d.tickCoord-e*(f/2+a),s[l-1]=Ua(Ua({},d),{},{isShow:!0}))}for(var x=i?l-1:l,y=function(w){var S=s[w],j,k=function(){return j===void 0&&(j=r(S,w)),j};if(w===0){var E=e*(S.coordinate-e*k()/2-c);s[w]=S=Ua(Ua({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else s[w]=S=Ua(Ua({},S),{},{tickCoord:S.coordinate});var T=Ew(e,S.tickCoord,k,c,u);T&&(c=S.tickCoord+e*(k()/2+a),s[w]=Ua(Ua({},S),{},{isShow:!0}))},v=0;v<x;v++)y(v);return s}function f3(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,s=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(it(c)||Nc.isSsr)return fqe(a,typeof c=="number"&&it(c)?c:0);var p=[],m=l==="top"||l==="bottom"?"width":"height",x=d&&m==="width"?eg(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(S,j){var k=Mt(u)?u(S.value,j):S.value;return m==="width"?uqe(eg(k,{fontSize:t,letterSpacing:r}),x,f):eg(k,{fontSize:t,letterSpacing:r})[m]},v=a.length>=2?yi(a[1].coordinate-a[0].coordinate):1,b=dqe(i,v,m);return c==="equidistantPreserveStart"?hqe(v,b,y,a,s):(c==="preserveStart"||c==="preserveStartEnd"?p=yqe(v,b,y,a,s,c==="preserveStartEnd"):p=xqe(v,b,y,a,s),p.filter(function(w){return w.isShow}))}var vqe=["viewBox"],bqe=["viewBox"],wqe=["ticks"];function Ep(e){"@babel/helpers - typeof";return Ep=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},Ep(e)}function Sh(){return Sh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sh.apply(this,arguments)}function LH(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 oi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LH(Object(r),!0).forEach(function(n){h3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jA(e,t){if(e==null)return{};var r=_qe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _qe(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 Sqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $H(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Tte(n.key),n)}}function Eqe(e,t,r){return t&&$H(e.prototype,t),r&&$H(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function kqe(e,t,r){return t=kw(t),Nqe(e,Nte()?Reflect.construct(t,r||[],kw(e).constructor):t.apply(e,r))}function Nqe(e,t){if(t&&(Ep(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tqe(e)}function Tqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nte=function(){return!!e})()}function kw(e){return kw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kw(e)}function jqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gP(e,t)}function gP(e,t){return gP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gP(e,t)}function h3(e,t,r){return t=Tte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tte(e){var t=Aqe(e,"string");return Ep(t)=="symbol"?t:t+""}function Aqe(e,t){if(Ep(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ep(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fm=(function(e){function t(r){var n;return Sqe(this,t),n=kqe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return jqe(t,e),Eqe(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,s=jA(n,vqe),l=this.props,c=l.viewBox,u=jA(l,bqe);return!Bh(i,c)||!Bh(s,u)||!Bh(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,s=a.y,l=a.width,c=a.height,u=a.orientation,d=a.tickSize,f=a.mirror,p=a.tickMargin,m,x,y,v,b,w,S=f?-1:1,j=n.tickSize||d,k=it(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":m=x=n.coordinate,v=s+ +!f*c,y=v-S*j,w=y-S*p,b=k;break;case"left":y=v=n.coordinate,x=i+ +!f*l,m=x-S*j,b=m-S*p,w=k;break;case"right":y=v=n.coordinate,x=i+ +f*l,m=x+S*j,b=m+S*p,w=k;break;default:m=x=n.coordinate,v=s+ +f*c,y=v+S*j,w=y+S*p,b=k;break}return{line:{x1:m,y1:y,x2:x,y2:v},tick:{x:b,y:w}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s;switch(a){case"left":s=i?"start":"end";break;case"right":s=i?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=i?"start":"end";break;default:s=i?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.orientation,u=n.mirror,d=n.axisLine,f=oi(oi(oi({},Nt(this.props,!1)),Nt(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var p=+(c==="top"&&!u||c==="bottom"&&u);f=oi(oi({},f),{},{x1:a,y1:i+p*l,x2:a+s,y2:i+p*l})}else{var m=+(c==="left"&&!u||c==="right"&&u);f=oi(oi({},f),{},{x1:a+m*s,y1:i,x2:a+m*s,y2:i+l})}return se.createElement("line",Sh({},f,{className:Jt("recharts-cartesian-axis-line",fs(d,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var s=this,l=this.props,c=l.tickLine,u=l.stroke,d=l.tick,f=l.tickFormatter,p=l.unit,m=f3(oi(oi({},this.props),{},{ticks:n}),a,i),x=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=Nt(this.props,!1),b=Nt(d,!1),w=oi(oi({},v),{},{fill:"none"},Nt(c,!1)),S=m.map(function(j,k){var E=s.getTickLineCoord(j),T=E.line,O=E.tick,A=oi(oi(oi(oi({textAnchor:x,verticalAnchor:y},v),{},{stroke:"none",fill:u},b),O),{},{index:k,payload:j,visibleTicksCount:m.length,tickFormatter:f});return se.createElement(er,Sh({className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},ju(s.props,j,k)),c&&se.createElement("line",Sh({},w,T,{className:Jt("recharts-cartesian-axis-tick-line",fs(c,"className"))})),d&&t.renderTickItem(d,A,"".concat(Mt(f)?f(j.value,k):j.value).concat(p||"")))});return se.createElement("g",{className:"recharts-cartesian-axis-ticks"},S)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,s=a.width,l=a.height,c=a.ticksGenerator,u=a.className,d=a.hide;if(d)return null;var f=this.props,p=f.ticks,m=jA(f,wqe),x=p;return Mt(c)&&(x=p&&p.length>0?c(this.props):c(m)),s<=0||l<=0||!x||!x.length?null:se.createElement(er,{className:Jt("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),ba.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var s;return se.isValidElement(n)?s=se.cloneElement(n,a):Mt(n)?s=n(a):s=se.createElement(nf,Sh({},a,{className:"recharts-cartesian-axis-tick-value"}),i),s}}])})(N.Component);h3(fm,"displayName","CartesianAxis");h3(fm,"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 Cqe=["x1","y1","x2","y2","key"],Oqe=["offset"];function of(e){"@babel/helpers - typeof";return of=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},of(e)}function BH(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 Ga(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BH(Object(r),!0).forEach(function(n){Pqe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pqe(e,t,r){return t=Rqe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rqe(e){var t=Iqe(e,"string");return of(t)=="symbol"?t:t+""}function Iqe(e,t){if(of(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(of(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rd(){return Rd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rd.apply(this,arguments)}function UH(e,t){if(e==null)return{};var r=Fqe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Fqe(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 Mqe=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,c=t.ry;return se.createElement("rect",{x:a,y:i,ry:c,width:s,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function jte(e,t){var r;if(se.isValidElement(e))r=se.cloneElement(e,t);else if(Mt(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,s=t.y2,l=t.key,c=UH(t,Cqe),u=Nt(c,!1);u.offset;var d=UH(u,Oqe);r=se.createElement("line",Rd({},d,{x1:n,y1:a,x2:i,y2:s,fill:"none",key:l}))}return r}function Dqe(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,c){var u=Ga(Ga({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return jte(a,u)});return se.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Lqe(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,c){var u=Ga(Ga({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return jte(a,u)});return se.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function $qe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,s=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=l.map(function(p){return Math.round(p+a-a)}).sort(function(p,m){return p-m});a!==d[0]&&d.unshift(0);var f=d.map(function(p,m){var x=!d[m+1],y=x?a+s-p:d[m+1]-p;if(y<=0)return null;var v=m%t.length;return se.createElement("rect",{key:"react-".concat(m),y:p,x:n,height:y,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return se.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function Bqe(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,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var d=u.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==d[0]&&d.unshift(0);var f=d.map(function(p,m){var x=!d[m+1],y=x?i+l-p:d[m+1]-p;if(y<=0)return null;var v=m%n.length;return se.createElement("rect",{key:"react-".concat(m),x:p,y:s,width:y,height:c,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return se.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var Uqe=function(t,r){var n=t.xAxis,a=t.width,i=t.height,s=t.offset;return Cee(f3(Ga(Ga(Ga({},fm.defaultProps),n),{},{ticks:Zl(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.left,s.left+s.width,r)},zqe=function(t,r){var n=t.yAxis,a=t.width,i=t.height,s=t.offset;return Cee(f3(Ga(Ga(Ga({},fm.defaultProps),n),{},{ticks:Zl(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.top,s.top+s.height,r)},uh={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Id(e){var t,r,n,a,i,s,l=c3(),c=u3(),u=AHe(),d=Ga(Ga({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:uh.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:uh.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:uh.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:uh.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:uh.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:uh.verticalFill,x:it(e.x)?e.x:u.left,y:it(e.y)?e.y:u.top,width:it(e.width)?e.width:u.width,height:it(e.height)?e.height:u.height}),f=d.x,p=d.y,m=d.width,x=d.height,y=d.syncWithTicks,v=d.horizontalValues,b=d.verticalValues,w=NHe(),S=THe();if(!it(m)||m<=0||!it(x)||x<=0||!it(f)||f!==+f||!it(p)||p!==+p)return null;var j=d.verticalCoordinatesGenerator||Uqe,k=d.horizontalCoordinatesGenerator||zqe,E=d.horizontalPoints,T=d.verticalPoints;if((!E||!E.length)&&Mt(k)){var O=v&&v.length,A=k({yAxis:S?Ga(Ga({},S),{},{ticks:O?v:S.ticks}):void 0,width:l,height:c,offset:u},O?!0:y);Ao(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(of(A),"]")),Array.isArray(A)&&(E=A)}if((!T||!T.length)&&Mt(j)){var P=b&&b.length,I=j({xAxis:w?Ga(Ga({},w),{},{ticks:P?b:w.ticks}):void 0,width:l,height:c,offset:u},P?!0:y);Ao(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(of(I),"]")),Array.isArray(I)&&(T=I)}return se.createElement("g",{className:"recharts-cartesian-grid"},se.createElement(Mqe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),se.createElement(Dqe,Rd({},d,{offset:u,horizontalPoints:E,xAxis:w,yAxis:S})),se.createElement(Lqe,Rd({},d,{offset:u,verticalPoints:T,xAxis:w,yAxis:S})),se.createElement($qe,Rd({},d,{horizontalPoints:E})),se.createElement(Bqe,Rd({},d,{verticalPoints:T})))}Id.displayName="CartesianGrid";var Hqe=["type","layout","connectNulls","ref"],qqe=["key"];function kp(e){"@babel/helpers - typeof";return kp=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},kp(e)}function zH(e,t){if(e==null)return{};var r=Wqe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wqe(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 sg(){return sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sg.apply(this,arguments)}function HH(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 ts(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HH(Object(r),!0).forEach(function(n){yo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dh(e){return Yqe(e)||Kqe(e)||Gqe(e)||Vqe()}function Vqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1288In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gqe(e,t){if(e){if(typeof e=="string")return xP(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 xP(e,t)}}function Kqe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yqe(e){if(Array.isArray(e))return xP(e)}function xP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Cte(n.key),n)}}function Jqe(e,t,r){return t&&qH(e.prototype,t),r&&qH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qqe(e,t,r){return t=Nw(t),Zqe(e,Ate()?Reflect.construct(t,r||[],Nw(e).constructor):t.apply(e,r))}function Zqe(e,t){if(t&&(kp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eWe(e)}function eWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ate(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ate=function(){return!!e})()}function Nw(e){return Nw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nw(e)}function tWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yP(e,t)}function yP(e,t){return yP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},yP(e,t)}function yo(e,t,r){return t=Cte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cte(e){var t=rWe(e,"string");return kp(t)=="symbol"?t:t+""}function rWe(e,t){if(kp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cu=(function(e){function t(){var r;Xqe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Qqe(this,t,[].concat(a)),yo(r,"state",{isAnimationFinished:!0,totalLength:0}),yo(r,"generateSimpleStrokeDasharray",function(s,l){return"".concat(l,"px ").concat(s-l,"px")}),yo(r,"getStrokeDasharray",function(s,l,c){var u=c.reduce(function(b,w){return b+w});if(!u)return r.generateSimpleStrokeDasharray(l,s);for(var d=Math.floor(s/u),f=s%u,p=l-s,m=[],x=0,y=0;x<c.length;y+=c[x],++x)if(y+c[x]>f){m=[].concat(dh(c.slice(0,x)),[f-y]);break}var v=m.length%2===0?[0,p]:[p];return[].concat(dh(t.repeat(c,d)),dh(m),v).map(function(b){return"".concat(b,"px")}).join(", ")}),yo(r,"id",zu("recharts-line-")),yo(r,"pathRef",function(s){r.mainCurve=s}),yo(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),yo(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return tWe(t,e),Jqe(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,c=i.yAxis,u=i.layout,d=i.children,f=Ei(d,dm);if(!f)return null;var p=function(y,v){return{x:y.x,y:y.y,value:y.value,errorVal:on(y.payload,v)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return se.createElement(er,m,f.map(function(x){return se.cloneElement(x,{key:"bar-".concat(x.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,dataPointFormatter:p})}))}},{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,f=Nt(this.props,!1),p=Nt(c,!0),m=u.map(function(y,v){var b=ts(ts(ts({key:"dot-".concat(v),r:3},f),p),{},{index:v,cx:y.x,cy:y.y,value:y.value,dataKey:d,payload:y.payload,points:u});return t.renderDotItem(c,b)}),x={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return se.createElement(er,sg({className:"recharts-line-dots",key:"dots"},x),m)}},{key:"renderCurveStatically",value:function(n,a,i,s){var l=this.props,c=l.type,u=l.layout,d=l.connectNulls;l.ref;var f=zH(l,Hqe),p=ts(ts(ts({},Nt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},s),{},{type:c,layout:u,connectNulls:d});return se.createElement(xu,sg({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.strokeDasharray,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,p=s.animationEasing,m=s.animationId,x=s.animateNewValues,y=s.width,v=s.height,b=this.state,w=b.prevPoints,S=b.totalLength;return se.createElement(Qs,{begin:d,duration:f,isActive:u,easing:p,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var k=j.t;if(w){var E=w.length/l.length,T=l.map(function(R,M){var L=Math.floor(M*E);if(w[L]){var U=w[L],W=bn(U.x,R.x),V=bn(U.y,R.y);return ts(ts({},R),{},{x:W(k),y:V(k)})}if(x){var G=bn(y*2,R.x),K=bn(v/2,R.y);return ts(ts({},R),{},{x:G(k),y:K(k)})}return ts(ts({},R),{},{x:R.x,y:R.y})});return i.renderCurveStatically(T,n,a)}var O=bn(0,S),A=O(k),P;if(c){var I="".concat(c).split(/[,\s]+/gim).map(function(R){return parseFloat(R)});P=i.getStrokeDasharray(A,S,I)}else P=i.generateSimpleStrokeDasharray(S,A);return i.renderCurveStatically(l,n,a,{strokeDasharray:P})})}},{key:"renderCurve",value:function(n,a){var i=this.props,s=i.points,l=i.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return l&&s&&s.length&&(!u&&d>0||!Au(u,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,c=a.className,u=a.xAxis,d=a.yAxis,f=a.top,p=a.left,m=a.width,x=a.height,y=a.isAnimationActive,v=a.id;if(i||!l||!l.length)return null;var b=this.state.isAnimationFinished,w=l.length===1,S=Jt("recharts-line",c),j=u&&u.allowDataOverflow,k=d&&d.allowDataOverflow,E=j||k,T=Dt(v)?this.id:v,O=(n=Nt(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=O.r,P=A===void 0?3:A,I=O.strokeWidth,R=I===void 0?2:I,M=PQ(s)?s:{},L=M.clipDot,U=L===void 0?!0:L,W=P*2+R;return se.createElement(er,{className:S},j||k?se.createElement("defs",null,se.createElement("clipPath",{id:"clipPath-".concat(T)},se.createElement("rect",{x:j?p:p-m/2,y:k?f:f-x/2,width:j?m:m*2,height:k?x:x*2})),!U&&se.createElement("clipPath",{id:"clipPath-dots-".concat(T)},se.createElement("rect",{x:p-W/2,y:f-W/2,width:m+W,height:x+W}))):null,!w&&this.renderCurve(E,T),this.renderErrorBar(E,T),(w||s)&&this.renderDots(E,U,T),(!y||b)&&Co.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(dh(n),[0]):n,s=[],l=0;l<a;++l)s=[].concat(dh(s),dh(i));return s}},{key:"renderDotItem",value:function(n,a){var i;if(se.isValidElement(n))i=se.cloneElement(n,a);else if(Mt(n))i=n(a);else{var s=a.key,l=zH(a,qqe),c=Jt("recharts-line-dot",typeof n!="boolean"?n.className:"");i=se.createElement(dy,sg({key:s},l,{className:c}))}return i}}])})(N.PureComponent);yo(Cu,"displayName","Line");yo(Cu,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Nc.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});yo(Cu,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,s=e.dataKey,l=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(p,m){var x=on(p,s);return d==="horizontal"?{x:hp({axis:r,ticks:a,bandSize:l,entry:p,index:m}),y:Dt(x)?null:n.scale(x),value:x,payload:p}:{x:Dt(x)?null:r.scale(x),y:hp({axis:n,ticks:i,bandSize:l,entry:p,index:m}),value:x,payload:p}});return ts({points:f,layout:d},u)});var nWe=["layout","type","stroke","connectNulls","isRange","ref"],aWe=["key"],Ote;function Np(e){"@babel/helpers - typeof";return Np=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},Np(e)}function Pte(e,t){if(e==null)return{};var r=iWe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iWe(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 Fd(){return Fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fd.apply(this,arguments)}function WH(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 Qc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WH(Object(r),!0).forEach(function(n){ul(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ite(n.key),n)}}function oWe(e,t,r){return t&&VH(e.prototype,t),r&&VH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lWe(e,t,r){return t=Tw(t),cWe(e,Rte()?Reflect.construct(t,r||[],Tw(e).constructor):t.apply(e,r))}function cWe(e,t){if(t&&(Np(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uWe(e)}function uWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rte=function(){return!!e})()}function Tw(e){return Tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tw(e)}function dWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vP(e,t)}function vP(e,t){return vP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vP(e,t)}function ul(e,t,r){return t=Ite(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ite(e){var t=fWe(e,"string");return Np(t)=="symbol"?t:t+""}function fWe(e,t){if(Np(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Np(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jc=(function(e){function t(){var r;sWe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=lWe(this,t,[].concat(a)),ul(r,"state",{isAnimationFinished:!0}),ul(r,"id",zu("recharts-area-")),ul(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Mt(s)&&s()}),ul(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Mt(s)&&s()}),r}return dWe(t,e),oWe(t,[{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(s&&!l)return null;var c=this.props,u=c.dot,d=c.points,f=c.dataKey,p=Nt(this.props,!1),m=Nt(u,!0),x=d.map(function(v,b){var w=Qc(Qc(Qc({key:"dot-".concat(b),r:3},p),m),{},{index:b,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:d});return t.renderDotItem(u,w)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return se.createElement(er,Fd({className:"recharts-area-dots"},y),x)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].x,u=s[s.length-1].x,d=n*Math.abs(c-u),f=du(s.map(function(p){return p.y||0}));return it(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(du(i.map(function(p){return p.y||0})),f)),it(f)?se.createElement("rect",{x:c<u?c:c-d,y:0,width:d,height:Math.floor(f+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].y,u=s[s.length-1].y,d=n*Math.abs(c-u),f=du(s.map(function(p){return p.x||0}));return it(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(du(i.map(function(p){return p.x||0})),f)),it(f)?se.createElement("rect",{x:0,y:c<u?c:c-d,width:f+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,s){var l=this.props,c=l.layout,u=l.type,d=l.stroke,f=l.connectNulls,p=l.isRange;l.ref;var m=Pte(l,nWe);return se.createElement(er,{clipPath:i?"url(#clipPath-".concat(s,")"):null},se.createElement(xu,Fd({},Nt(m,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),d!=="none"&&se.createElement(xu,Fd({},Nt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:n})),d!=="none"&&p&&se.createElement(xu,Fd({},Nt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.baseLine,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,p=s.animationEasing,m=s.animationId,x=this.state,y=x.prevPoints,v=x.prevBaseLine;return se.createElement(Qs,{begin:d,duration:f,isActive:u,easing:p,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var w=b.t;if(y){var S=y.length/l.length,j=l.map(function(O,A){var P=Math.floor(A*S);if(y[P]){var I=y[P],R=bn(I.x,O.x),M=bn(I.y,O.y);return Qc(Qc({},O),{},{x:R(w),y:M(w)})}return O}),k;if(it(c)&&typeof c=="number"){var E=bn(v,c);k=E(w)}else if(Dt(c)||sm(c)){var T=bn(v,0);k=T(w)}else k=c.map(function(O,A){var P=Math.floor(A*S);if(v[P]){var I=v[P],R=bn(I.x,O.x),M=bn(I.y,O.y);return Qc(Qc({},O),{},{x:R(w),y:M(w)})}return O});return i.renderAreaStatically(j,k,n,a)}return se.createElement(er,null,se.createElement("defs",null,se.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(w))),se.createElement(er,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(l,c,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,s=i.points,l=i.baseLine,c=i.isAnimationActive,u=this.state,d=u.prevPoints,f=u.prevBaseLine,p=u.totalLength;return c&&s&&s.length&&(!d&&p>0||!Au(d,s)||!Au(f,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,c=a.className,u=a.top,d=a.left,f=a.xAxis,p=a.yAxis,m=a.width,x=a.height,y=a.isAnimationActive,v=a.id;if(i||!l||!l.length)return null;var b=this.state.isAnimationFinished,w=l.length===1,S=Jt("recharts-area",c),j=f&&f.allowDataOverflow,k=p&&p.allowDataOverflow,E=j||k,T=Dt(v)?this.id:v,O=(n=Nt(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=O.r,P=A===void 0?3:A,I=O.strokeWidth,R=I===void 0?2:I,M=PQ(s)?s:{},L=M.clipDot,U=L===void 0?!0:L,W=P*2+R;return se.createElement(er,{className:S},j||k?se.createElement("defs",null,se.createElement("clipPath",{id:"clipPath-".concat(T)},se.createElement("rect",{x:j?d:d-m/2,y:k?u:u-x/2,width:j?m:m*2,height:k?x:x*2})),!U&&se.createElement("clipPath",{id:"clipPath-dots-".concat(T)},se.createElement("rect",{x:d-W/2,y:u-W/2,width:m+W,height:x+W}))):null,w?null:this.renderArea(E,T),(s||w)&&this.renderDots(E,U,T),(!y||b)&&Co.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}}])})(N.PureComponent);Ote=jc;ul(jc,"displayName","Area");ul(jc,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Nc.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ul(jc,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,s=t.props.baseValue,l=s??i;if(it(l)&&typeof l=="number")return l;var c=a==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return l==="dataMin"?f:l==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});ul(jc,"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,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,m=t.layout,x=u&&u.length,y=Ote.getBaseValue(t,r,n,a),v=m==="horizontal",b=!1,w=f.map(function(j,k){var E;x?E=u[d+k]:(E=on(j,c),Array.isArray(E)?b=!0:E=[y,E]);var T=E[1]==null||x&&on(j,c)==null;return v?{x:hp({axis:n,ticks:i,bandSize:l,entry:j,index:k}),y:T?null:a.scale(E[1]),value:E,payload:j}:{x:T?null:n.scale(E[1]),y:hp({axis:a,ticks:s,bandSize:l,entry:j,index:k}),value:E,payload:j}}),S;return x||b?S=w.map(function(j){var k=Array.isArray(j.value)?j.value[0]:null;return v?{x:j.x,y:k!=null&&j.y!=null?a.scale(k):null}:{x:k!=null?n.scale(k):null,y:j.y}}):S=v?a.scale(y):n.scale(y),Qc({points:w,baseLine:S,layout:m,isRange:b},p)});ul(jc,"renderDotItem",function(e,t){var r;if(se.isValidElement(e))r=se.cloneElement(e,t);else if(Mt(e))r=e(t);else{var n=Jt("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Pte(t,aWe);r=se.createElement(dy,Fd({},i,{key:a,className:n}))}return r});function Tp(e){"@babel/helpers - typeof";return Tp=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},Tp(e)}function hWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pWe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Dte(n.key),n)}}function mWe(e,t,r){return t&&pWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gWe(e,t,r){return t=jw(t),xWe(e,Fte()?Reflect.construct(t,r||[],jw(e).constructor):t.apply(e,r))}function xWe(e,t){if(t&&(Tp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yWe(e)}function yWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fte=function(){return!!e})()}function jw(e){return jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jw(e)}function vWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bP(e,t)}function bP(e,t){return bP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bP(e,t)}function Mte(e,t,r){return t=Dte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dte(e){var t=bWe(e,"string");return Tp(t)=="symbol"?t:t+""}function bWe(e,t){if(Tp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pS=(function(e){function t(){return hWe(this,t),gWe(this,t,arguments)}return vWe(t,e),mWe(t,[{key:"render",value:function(){return null}}])})(se.Component);Mte(pS,"displayName","ZAxis");Mte(pS,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var wWe=["option","isActive"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},og.apply(this,arguments)}function _We(e,t){if(e==null)return{};var r=SWe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SWe(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 EWe(e){var t=e.option,r=e.isActive,n=_We(e,wWe);return typeof t=="string"?se.createElement(pw,og({option:se.createElement(z_,og({type:t},n)),isActive:r,shapeType:"symbols"},n)):se.createElement(pw,og({option:t,isActive:r,shapeType:"symbols"},n))}function jp(e){"@babel/helpers - typeof";return jp=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},jp(e)}function lg(){return lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lg.apply(this,arguments)}function GH(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 $s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GH(Object(r),!0).forEach(function(n){hu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$te(n.key),n)}}function NWe(e,t,r){return t&&KH(e.prototype,t),r&&KH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function TWe(e,t,r){return t=Aw(t),jWe(e,Lte()?Reflect.construct(t,r||[],Aw(e).constructor):t.apply(e,r))}function jWe(e,t){if(t&&(jp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AWe(e)}function AWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lte=function(){return!!e})()}function Aw(e){return Aw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Aw(e)}function CWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wP(e,t)}function wP(e,t){return wP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},wP(e,t)}function hu(e,t,r){return t=$te(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $te(e){var t=OWe(e,"string");return jp(t)=="symbol"?t:t+""}function OWe(e,t){if(jp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mS=(function(e){function t(){var r;kWe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=TWe(this,t,[].concat(a)),hu(r,"state",{isAnimationFinished:!1}),hu(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),hu(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),hu(r,"id",zu("recharts-scatter-")),r}return CWe(t,e),NWe(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,s=i.shape,l=i.activeShape,c=i.activeIndex,u=Nt(this.props,!1);return n.map(function(d,f){var p=c===f,m=p?l:s,x=$s($s({},u),d);return se.createElement(er,lg({className:"recharts-scatter-symbol",key:"symbol-".concat(d==null?void 0:d.cx,"-").concat(d==null?void 0:d.cy,"-").concat(d==null?void 0:d.size,"-").concat(f)},ju(a.props,d,f),{role:"img"}),se.createElement(EWe,lg({option:m,isActive:p,key:"symbol-".concat(f)},x)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state.prevPoints;return se.createElement(Qs,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var m=p.t,x=i.map(function(y,v){var b=f&&f[v];if(b){var w=bn(b.cx,y.cx),S=bn(b.cy,y.cy),j=bn(b.size,y.size);return $s($s({},y),{},{cx:w(m),cy:S(m),size:j(m)})}var k=bn(0,y.size);return $s($s({},y),{},{size:k(m)})});return se.createElement(er,null,n.renderSymbolsStatically(x))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,s=this.state.prevPoints;return i&&a&&a.length&&(!s||!Au(s,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,s=a.xAxis,l=a.yAxis,c=a.children,u=Ei(c,dm);return u?u.map(function(d,f){var p=d.props,m=p.direction,x=p.dataKey;return se.cloneElement(d,{key:"".concat(m,"-").concat(x,"-").concat(i[f]),data:i,xAxis:s,yAxis:l,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(v,b){return{x:v.cx,y:v.cy,value:m==="x"?+v.node.x:+v.node.y,errorVal:on(v,b)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,s=n.lineType,l=n.lineJointType,c=Nt(this.props,!1),u=Nt(i,!1),d,f;if(s==="joint")d=a.map(function(S){return{x:S.cx,y:S.cy}});else if(s==="fitting"){var p=O3e(a),m=p.xmin,x=p.xmax,y=p.a,v=p.b,b=function(j){return y*j+v};d=[{x:m,y:b(m)},{x,y:b(x)}]}var w=$s($s($s({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:d});return se.isValidElement(i)?f=se.cloneElement(i,w):Mt(i)?f=i(w):f=se.createElement(xu,lg({},w,{type:l})),se.createElement(er,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,s=n.line,l=n.className,c=n.xAxis,u=n.yAxis,d=n.left,f=n.top,p=n.width,m=n.height,x=n.id,y=n.isAnimationActive;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=Jt("recharts-scatter",l),w=c&&c.allowDataOverflow,S=u&&u.allowDataOverflow,j=w||S,k=Dt(x)?this.id:x;return se.createElement(er,{className:b,clipPath:j?"url(#clipPath-".concat(k,")"):null},w||S?se.createElement("defs",null,se.createElement("clipPath",{id:"clipPath-".concat(k)},se.createElement("rect",{x:w?d:d-p/2,y:S?f:f-m/2,width:w?p:p*2,height:S?m:m*2}))):null,s&&this.renderLine(),this.renderErrorBar(),se.createElement(er,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!y||v)&&Co.renderCallByParent(this.props,i))}}],[{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}}])})(N.PureComponent);hu(mS,"displayName","Scatter");hu(mS,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!Nc.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});hu(mS,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,s=e.xAxisTicks,l=e.yAxisTicks,c=e.offset,u=a.props.tooltipType,d=Ei(a.props.children,Li),f=Dt(t.dataKey)?a.props.dataKey:t.dataKey,p=Dt(r.dataKey)?a.props.dataKey:r.dataKey,m=n&&n.dataKey,x=n?n.range:pS.defaultProps.range,y=x&&x[0],v=t.scale.bandwidth?t.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0,w=i.map(function(S,j){var k=on(S,f),E=on(S,p),T=!Dt(m)&&on(S,m)||"-",O=[{name:Dt(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:k,payload:S,dataKey:f,type:u},{name:Dt(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:E,payload:S,dataKey:p,type:u}];T!=="-"&&O.push({name:n.name||n.dataKey,unit:n.unit||"",value:T,payload:S,dataKey:m,type:u});var A=hp({axis:t,ticks:s,bandSize:v,entry:S,index:j,dataKey:f}),P=hp({axis:r,ticks:l,bandSize:b,entry:S,index:j,dataKey:p}),I=T!=="-"?n.scale(T):y,R=Math.sqrt(Math.max(I,0)/Math.PI);return $s($s({},S),{},{cx:A,cy:P,x:A-R,y:P-R,xAxis:t,yAxis:r,zAxis:n,width:2*R,height:2*R,size:I,node:{x:k,y:E,z:T},tooltipPayload:O,tooltipPosition:{x:A,y:P},payload:S},d&&d[j]&&d[j].props)});return $s({points:w},c)});function Ap(e){"@babel/helpers - typeof";return Ap=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},Ap(e)}function PWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RWe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zte(n.key),n)}}function IWe(e,t,r){return t&&RWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function FWe(e,t,r){return t=Cw(t),MWe(e,Bte()?Reflect.construct(t,r||[],Cw(e).constructor):t.apply(e,r))}function MWe(e,t){if(t&&(Ap(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DWe(e)}function DWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bte=function(){return!!e})()}function Cw(e){return Cw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cw(e)}function LWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_P(e,t)}function _P(e,t){return _P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_P(e,t)}function Ute(e,t,r){return t=zte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zte(e){var t=$We(e,"string");return Ap(t)=="symbol"?t:t+""}function $We(e,t){if(Ap(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ap(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function SP(){return SP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},SP.apply(this,arguments)}function BWe(e){var t=e.xAxisId,r=c3(),n=u3(),a=xte(t);return a==null?null:se.createElement(fm,SP({},a,{className:Jt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Zl(s,!0)}}))}var Gs=(function(e){function t(){return PWe(this,t),FWe(this,t,arguments)}return LWe(t,e),IWe(t,[{key:"render",value:function(){return se.createElement(BWe,this.props)}}])})(se.Component);Ute(Gs,"displayName","XAxis");Ute(Gs,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Cp(e){"@babel/helpers - typeof";return Cp=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},Cp(e)}function UWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zWe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Wte(n.key),n)}}function HWe(e,t,r){return t&&zWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qWe(e,t,r){return t=Ow(t),WWe(e,Hte()?Reflect.construct(t,r||[],Ow(e).constructor):t.apply(e,r))}function WWe(e,t){if(t&&(Cp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VWe(e)}function VWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hte=function(){return!!e})()}function Ow(e){return Ow=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ow(e)}function GWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EP(e,t)}function EP(e,t){return EP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},EP(e,t)}function qte(e,t,r){return t=Wte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wte(e){var t=KWe(e,"string");return Cp(t)=="symbol"?t:t+""}function KWe(e,t){if(Cp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kP(){return kP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kP.apply(this,arguments)}var YWe=function(t){var r=t.yAxisId,n=c3(),a=u3(),i=yte(r);return i==null?null:se.createElement(fm,kP({},i,{className:Jt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(l){return Zl(l,!0)}}))},Ka=(function(e){function t(){return UWe(this,t),qWe(this,t,arguments)}return GWe(t,e),HWe(t,[{key:"render",value:function(){return se.createElement(YWe,this.props)}}])})(se.Component);qte(Ka,"displayName","YAxis");qte(Ka,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function YH(e){return ZWe(e)||QWe(e)||JWe(e)||XWe()}function XWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1289In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JWe(e,t){if(e){if(typeof e=="string")return NP(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 NP(e,t)}}function QWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZWe(e){if(Array.isArray(e))return NP(e)}function NP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var TP=function(t,r,n,a,i){var s=Ei(t,vx),l=Ei(t,dS),c=[].concat(YH(s),YH(l)),u=Ei(t,hS),d="".concat(a,"Id"),f=a[0],p=r;if(c.length&&(p=c.reduce(function(y,v){if(v.props[d]===n&&gl(v.props,"extendDomain")&&it(v.props[f])){var b=v.props[f];return[Math.min(y[0],b),Math.max(y[1],b)]}return y},p)),u.length){var m="".concat(f,"1"),x="".concat(f,"2");p=u.reduce(function(y,v){if(v.props[d]===n&&gl(v.props,"extendDomain")&&it(v.props[m])&&it(v.props[x])){var b=v.props[m],w=v.props[x];return[Math.min(y[0],b,w),Math.max(y[1],b,w)]}return y},p)}return i&&i.length&&(p=i.reduce(function(y,v){return it(v)?[Math.min(y[0],v),Math.max(y[1],v)]:y},p)),p},AA={exports:{}},XH;function eVe(){return XH||(XH=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,f,p){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new a(d,f||c,p),x=r?r+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],m]:c._events[x].push(m):(c._events[x]=m,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,m=f.length,x=new Array(m);p<m;p++)x[p]=f[p].fn;return x},l.prototype.listenerCount=function(u){var d=r?r+u:u,f=this._events[d];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,d,f,p,m,x){var y=r?r+u:u;if(!this._events[y])return!1;var v=this._events[y],b=arguments.length,w,S;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,p),!0;case 5:return v.fn.call(v.context,d,f,p,m),!0;case 6:return v.fn.call(v.context,d,f,p,m,x),!0}for(S=1,w=new Array(b-1);S<b;S++)w[S-1]=arguments[S];v.fn.apply(v.context,w)}else{var j=v.length,k;for(S=0;S<j;S++)switch(v[S].once&&this.removeListener(u,v[S].fn,void 0,!0),b){case 1:v[S].fn.call(v[S].context);break;case 2:v[S].fn.call(v[S].context,d);break;case 3:v[S].fn.call(v[S].context,d,f);break;case 4:v[S].fn.call(v[S].context,d,f,p);break;default:if(!w)for(k=1,w=new Array(b-1);k<b;k++)w[k-1]=arguments[k];v[S].fn.apply(v[S].context,w)}}return!0},l.prototype.on=function(u,d,f){return i(this,u,d,f,!1)},l.prototype.once=function(u,d,f){return i(this,u,d,f,!0)},l.prototype.removeListener=function(u,d,f,p){var m=r?r+u:u;if(!this._events[m])return this;if(!d)return s(this,m),this;var x=this._events[m];if(x.fn)x.fn===d&&(!p||x.once)&&(!f||x.context===f)&&s(this,m);else{for(var y=0,v=[],b=x.length;y<b;y++)(x[y].fn!==d||p&&!x[y].once||f&&x[y].context!==f)&&v.push(x[y]);v.length?this._events[m]=v.length===1?v[0]:v:s(this,m)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(AA)),AA.exports}var tVe=eVe();const rVe=tr(tVe);var CA=new rVe,OA="recharts.syncMouseEvents";function wx(e){"@babel/helpers - typeof";return wx=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},wx(e)}function nVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aVe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vte(n.key),n)}}function iVe(e,t,r){return t&&aVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PA(e,t,r){return t=Vte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vte(e){var t=sVe(e,"string");return wx(t)=="symbol"?t:t+""}function sVe(e,t){if(wx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oVe=(function(){function e(){nVe(this,e),PA(this,"activeIndex",0),PA(this,"coordinateList",[]),PA(this,"layout","horizontal")}return iVe(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,s=r.container,l=s===void 0?null:s,c=r.layout,u=c===void 0?null:c,d=r.offset,f=d===void 0?null:d,p=r.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,s=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+c+u,p=s+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:f,pageY:p})}}}])})();function lVe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&it(n)&&it(a))return!0}return!1}function cVe(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Gte(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,s=Qr(t,r,n,a),l=Qr(t,r,n,i);return{points:[s,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function uVe(e,t,r){var n,a,i,s;if(e==="horizontal")n=t.x,i=n,a=r.top,s=r.top+r.height;else if(e==="vertical")a=t.y,s=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,p=Qr(l,c,u,f),m=Qr(l,c,d,f);n=p.x,a=p.y,i=m.x,s=m.y}else return Gte(t);return[{x:n,y:a},{x:i,y:s}]}function _x(e){"@babel/helpers - typeof";return _x=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},_x(e)}function JH(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 pb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JH(Object(r),!0).forEach(function(n){dVe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dVe(e,t,r){return t=fVe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fVe(e){var t=hVe(e,"string");return _x(t)=="symbol"?t:t+""}function hVe(e,t){if(_x(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_x(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pVe(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,m=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!m||!i||!s||p!=="ScatterChart"&&a!=="axis")return null;var x,y=xu;if(p==="ScatterChart")x=s,y=o7e;else if(p==="BarChart")x=cVe(f,s,c,d),y=i3;else if(f==="radial"){var v=Gte(s),b=v.cx,w=v.cy,S=v.radius,j=v.startAngle,k=v.endAngle;x={cx:b,cy:w,startAngle:j,endAngle:k,innerRadius:S,outerRadius:S},y=Uee}else x={points:uVe(f,s,c)},y=xu;var E=pb(pb(pb(pb({stroke:"#ccc",pointerEvents:"none"},c),x),Nt(m,!1)),{},{payload:l,payloadIndex:u,className:Jt("recharts-tooltip-cursor",m.className)});return N.isValidElement(m)?N.cloneElement(m,E):N.createElement(y,E)}var mVe=["item"],gVe=["children","className","width","height","style","compact","title","desc"];function Op(e){"@babel/helpers - typeof";return Op=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},Op(e)}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eh.apply(this,arguments)}function QH(e,t){return vVe(e)||yVe(e,t)||Yte(e,t)||xVe()}function xVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1290In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yVe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function vVe(e){if(Array.isArray(e))return e}function ZH(e,t){if(e==null)return{};var r=bVe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bVe(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 wVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Ve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xte(n.key),n)}}function SVe(e,t,r){return t&&_Ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EVe(e,t,r){return t=Pw(t),kVe(e,Kte()?Reflect.construct(t,r||[],Pw(e).constructor):t.apply(e,r))}function kVe(e,t){if(t&&(Op(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NVe(e)}function NVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kte=function(){return!!e})()}function Pw(e){return Pw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pw(e)}function TVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jP(e,t)}function jP(e,t){return jP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},jP(e,t)}function Pp(e){return CVe(e)||AVe(e)||Yte(e)||jVe()}function jVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1291In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yte(e,t){if(e){if(typeof e=="string")return AP(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 AP(e,t)}}function AVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CVe(e){if(Array.isArray(e))return AP(e)}function AP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eq(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 We(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eq(Object(r),!0).forEach(function(n){$t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eq(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $t(e,t,r){return t=Xte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xte(e){var t=OVe(e,"string");return Op(t)=="symbol"?t:t+""}function OVe(e,t){if(Op(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Op(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PVe={xAxis:["bottom","top"],yAxis:["left","right"]},RVe={width:"100%",height:"100%"},Jte={x:0,y:0};function mb(e){return e}var IVe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},FVe=function(t,r,n,a){var i=r.find(function(d){return d&&d.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var s=i.coordinate,l=a.radius;return We(We(We({},a),Qr(a.cx,a.cy,l,s)),{},{angle:s,radius:l})}var c=i.coordinate,u=a.angle;return We(We(We({},a),Qr(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return Jte},gS=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,s=(n??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(Pp(l),Pp(u)):l},[]);return s.length>0?s:t&&t.length&&it(a)&&it(i)?t.slice(a,i+1):[]};function Qte(e){return e==="number"?[0,"auto"]:void 0}var CP=function(t,r,n,a){var i=t.graphicalItems,s=t.tooltipAxis,l=gS(r,t);return n<0||!i||!i.length||n>=l.length?null:i.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(s.dataKey&&!s.allowDuplicatedCategory){var m=f===void 0?l:f;p=P1(m,s.dataKey,a)}else p=f&&f[n]||l[n];return p?[].concat(Pp(c),[Fee(u,p)]):c},[])},tq=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},s=IVe(i,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=M8e(s,l,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,p=CP(t,r,d,f),m=FVe(n,l,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:p,activeCoordinate:m}}return null},MVe=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,p=t.stackOffset,m=Aee(d,i);return n.reduce(function(x,y){var v,b=y.type.defaultProps!==void 0?We(We({},y.type.defaultProps),y.props):y.props,w=b.type,S=b.dataKey,j=b.allowDataOverflow,k=b.allowDuplicatedCategory,E=b.scale,T=b.ticks,O=b.includeHidden,A=b[s];if(x[A])return x;var P=gS(t.data,{graphicalItems:a.filter(function(H){var B,X=s in H.props?H.props[s]:(B=H.type.defaultProps)===null||B===void 0?void 0:B[s];return X===A}),dataStartIndex:c,dataEndIndex:u}),I=P.length,R,M,L;lVe(b.domain,j,w)&&(R=UO(b.domain,null,j),m&&(w==="number"||E!=="auto")&&(L=rg(P,S,"category")));var U=Qte(w);if(!R||R.length===0){var W,V=(W=b.domain)!==null&&W!==void 0?W:U;if(S){if(R=rg(P,S,w),w==="category"&&m){var G=C3e(R);k&&G?(M=R,R=gw(0,I)):k||(R=Z7(V,R,y).reduce(function(H,B){return H.indexOf(B)>=0?H:[].concat(Pp(H),[B])},[]))}else if(w==="category")k?R=R.filter(function(H){return H!==""&&!Dt(H)}):R=Z7(V,R,y).reduce(function(H,B){return H.indexOf(B)>=0||B===""||Dt(B)?H:[].concat(Pp(H),[B])},[]);else if(w==="number"){var K=U8e(P,a.filter(function(H){var B,X,Y=s in H.props?H.props[s]:(B=H.type.defaultProps)===null||B===void 0?void 0:B[s],ae="hide"in H.props?H.props.hide:(X=H.type.defaultProps)===null||X===void 0?void 0:X.hide;return Y===A&&(O||!ae)}),S,i,d);K&&(R=K)}m&&(w==="number"||E!=="auto")&&(L=rg(P,S,"category"))}else m?R=gw(0,I):l&&l[A]&&l[A].hasStack&&w==="number"?R=p==="expand"?[0,1]:Iee(l[A].stackGroups,c,u):R=jee(P,a.filter(function(H){var B=s in H.props?H.props[s]:H.type.defaultProps[s],X="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return B===A&&(O||!X)}),w,d,!0);if(w==="number")R=TP(f,R,A,i,T),V&&(R=UO(V,R,j));else if(w==="category"&&V){var F=V,ne=R.every(function(H){return F.indexOf(H)>=0});ne&&(R=F)}}return We(We({},x),{},$t({},A,We(We({},b),{},{axisType:i,domain:R,categoricalDomain:L,duplicateDomain:M,originalDomain:(v=b.domain)!==null&&v!==void 0?v:U,isCategorical:m,layout:d})))},{})},DVe=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,p=gS(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),m=p.length,x=Aee(d,i),y=-1;return n.reduce(function(v,b){var w=b.type.defaultProps!==void 0?We(We({},b.type.defaultProps),b.props):b.props,S=w[s],j=Qte("number");if(!v[S]){y++;var k;return x?k=gw(0,m):l&&l[S]&&l[S].hasStack?(k=Iee(l[S].stackGroups,c,u),k=TP(f,k,S,i)):(k=UO(j,jee(p,n.filter(function(E){var T,O,A=s in E.props?E.props[s]:(T=E.type.defaultProps)===null||T===void 0?void 0:T[s],P="hide"in E.props?E.props.hide:(O=E.type.defaultProps)===null||O===void 0?void 0:O.hide;return A===S&&!P}),"number",d),a.defaultProps.allowDataOverflow),k=TP(f,k,S,i)),We(We({},v),{},$t({},S,We(We({axisType:i},a.defaultProps),{},{hide:!0,orientation:fs(PVe,"".concat(i,".").concat(y%2),null),domain:k,originalDomain:j,isCategorical:x,layout:d})))}return v},{})},LVe=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,s=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.children,f="".concat(a,"Id"),p=Ei(d,i),m={};return p&&p.length?m=MVe(t,{axes:p,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):s&&s.length&&(m=DVe(t,{Axis:i,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),m},$Ve=function(t){var r=su(t),n=Zl(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:PI(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:nw(r,n)}},rq=function(t){var r=t.children,n=t.defaultShowTooltip,a=ns(r,vp),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}},BVe=function(t){return!t||!t.length?!1:t.some(function(r){var n=ac(r&&r.type);return n&&n.indexOf("Bar")>=0})},nq=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"}},UVe=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,s=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=n.width,d=n.height,f=n.children,p=n.margin||{},m=ns(f,vp),x=ns(f,pl),y=Object.keys(c).reduce(function(k,E){var T=c[E],O=T.orientation;return!T.mirror&&!T.hide?We(We({},k),{},$t({},O,k[O]+T.width)):k},{left:p.left||0,right:p.right||0}),v=Object.keys(s).reduce(function(k,E){var T=s[E],O=T.orientation;return!T.mirror&&!T.hide?We(We({},k),{},$t({},O,fs(k,"".concat(O))+T.height)):k},{top:p.top||0,bottom:p.bottom||0}),b=We(We({},v),y),w=b.bottom;m&&(b.bottom+=m.props.height||vp.defaultProps.height),x&&r&&(b=$8e(b,a,n,r));var S=u-b.left-b.right,j=d-b.top-b.bottom;return We(We({brushBottom:w},b),{},{width:Math.max(S,0),height:Math.max(j,0)})},zVe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},fy=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,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,p=function(b,w){var S=w.graphicalItems,j=w.stackGroups,k=w.offset,E=w.updateId,T=w.dataStartIndex,O=w.dataEndIndex,A=b.barSize,P=b.layout,I=b.barGap,R=b.barCategoryGap,M=b.maxBarSize,L=nq(P),U=L.numericAxisName,W=L.cateAxisName,V=BVe(S),G=[];return S.forEach(function(K,F){var ne=gS(b.data,{graphicalItems:[K],dataStartIndex:T,dataEndIndex:O}),H=K.type.defaultProps!==void 0?We(We({},K.type.defaultProps),K.props):K.props,B=H.dataKey,X=H.maxBarSize,Y=H["".concat(U,"Id")],ae=H["".concat(W,"Id")],fe={},ue=c.reduce(function(Ue,Je){var Ze=w["".concat(Je.axisType,"Map")],te=H["".concat(Je.axisType,"Id")];Ze&&Ze[te]||Je.axisType==="zAxis"||sf();var ve=Ze[te];return We(We({},Ue),{},$t($t({},Je.axisType,ve),"".concat(Je.axisType,"Ticks"),Zl(ve)))},fe),oe=ue[W],Z=ue["".concat(W,"Ticks")],ce=j&&j[Y]&&j[Y].hasStack&&X8e(K,j[Y].stackGroups),q=ac(K.type).indexOf("Bar")>=0,xe=nw(oe,Z),pe=[],Se=V&&D8e({barSize:A,stackGroups:j,totalSize:zVe(ue,W)});if(q){var he,ie,we=Dt(X)?M:X,ke=(he=(ie=nw(oe,Z,!0))!==null&&ie!==void 0?ie:we)!==null&&he!==void 0?he:0;pe=L8e({barGap:I,barCategoryGap:R,bandSize:ke!==xe?ke:xe,sizeList:Se[ae],maxBarSize:we}),ke!==xe&&(pe=pe.map(function(Ue){return We(We({},Ue),{},{position:We(We({},Ue.position),{},{offset:Ue.position.offset-ke/2})})}))}var Oe=K&&K.type&&K.type.getComposedData;Oe&&G.push({props:We(We({},Oe(We(We({},ue),{},{displayedData:ne,props:b,dataKey:B,item:K,bandSize:xe,barPosition:pe,offset:k,stackedData:ce,layout:P,dataStartIndex:T,dataEndIndex:O}))),{},$t($t($t({key:K.key||"item-".concat(F)},U,ue[U]),W,ue[W]),"animationId",E)),childIndex:z3e(K,b.children),item:K})}),G},m=function(b,w){var S=b.props,j=b.dataStartIndex,k=b.dataEndIndex,E=b.updateId;if(!pB({props:S}))return null;var T=S.children,O=S.layout,A=S.stackOffset,P=S.data,I=S.reverseStackOrder,R=nq(O),M=R.numericAxisName,L=R.cateAxisName,U=Ei(T,n),W=K8e(P,U,"".concat(M,"Id"),"".concat(L,"Id"),A,I),V=c.reduce(function(H,B){var X="".concat(B.axisType,"Map");return We(We({},H),{},$t({},X,LVe(S,We(We({},B),{},{graphicalItems:U,stackGroups:B.axisType===M&&W,dataStartIndex:j,dataEndIndex:k}))))},{}),G=UVe(We(We({},V),{},{props:S,graphicalItems:U}),w==null?void 0:w.legendBBox);Object.keys(V).forEach(function(H){V[H]=d(S,V[H],G,H.replace("Map",""),r)});var K=V["".concat(L,"Map")],F=$Ve(K),ne=p(S,We(We({},V),{},{dataStartIndex:j,dataEndIndex:k,updateId:E,graphicalItems:U,stackGroups:W,offset:G}));return We(We({formattedGraphicalItems:ne,graphicalItems:U,offset:G,stackGroups:W},F),V)},x=(function(v){function b(w){var S,j,k;return wVe(this,b),k=EVe(this,b,[w]),$t(k,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),$t(k,"accessibilityManager",new oVe),$t(k,"handleLegendBBoxUpdate",function(E){if(E){var T=k.state,O=T.dataStartIndex,A=T.dataEndIndex,P=T.updateId;k.setState(We({legendBBox:E},m({props:k.props,dataStartIndex:O,dataEndIndex:A,updateId:P},We(We({},k.state),{},{legendBBox:E}))))}}),$t(k,"handleReceiveSyncEvent",function(E,T,O){if(k.props.syncId===E){if(O===k.eventEmitterSymbol&&typeof k.props.syncMethod!="function")return;k.applySyncEvent(T)}}),$t(k,"handleBrushChange",function(E){var T=E.startIndex,O=E.endIndex;if(T!==k.state.dataStartIndex||O!==k.state.dataEndIndex){var A=k.state.updateId;k.setState(function(){return We({dataStartIndex:T,dataEndIndex:O},m({props:k.props,dataStartIndex:T,dataEndIndex:O,updateId:A},k.state))}),k.triggerSyncEvent({dataStartIndex:T,dataEndIndex:O})}}),$t(k,"handleMouseEnter",function(E){var T=k.getMouseInfo(E);if(T){var O=We(We({},T),{},{isTooltipActive:!0});k.setState(O),k.triggerSyncEvent(O);var A=k.props.onMouseEnter;Mt(A)&&A(O,E)}}),$t(k,"triggeredAfterMouseMove",function(E){var T=k.getMouseInfo(E),O=T?We(We({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};k.setState(O),k.triggerSyncEvent(O);var A=k.props.onMouseMove;Mt(A)&&A(O,E)}),$t(k,"handleItemMouseEnter",function(E){k.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),$t(k,"handleItemMouseLeave",function(){k.setState(function(){return{isTooltipActive:!1}})}),$t(k,"handleMouseMove",function(E){E.persist(),k.throttleTriggeredAfterMouseMove(E)}),$t(k,"handleMouseLeave",function(E){k.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};k.setState(T),k.triggerSyncEvent(T);var O=k.props.onMouseLeave;Mt(O)&&O(T,E)}),$t(k,"handleOuterEvent",function(E){var T=U3e(E),O=fs(k.props,"".concat(T));if(T&&Mt(O)){var A,P;/.*touch.*/i.test(T)?P=k.getMouseInfo(E.changedTouches[0]):P=k.getMouseInfo(E),O((A=P)!==null&&A!==void 0?A:{},E)}}),$t(k,"handleClick",function(E){var T=k.getMouseInfo(E);if(T){var O=We(We({},T),{},{isTooltipActive:!0});k.setState(O),k.triggerSyncEvent(O);var A=k.props.onClick;Mt(A)&&A(O,E)}}),$t(k,"handleMouseDown",function(E){var T=k.props.onMouseDown;if(Mt(T)){var O=k.getMouseInfo(E);T(O,E)}}),$t(k,"handleMouseUp",function(E){var T=k.props.onMouseUp;if(Mt(T)){var O=k.getMouseInfo(E);T(O,E)}}),$t(k,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&k.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),$t(k,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&k.handleMouseDown(E.changedTouches[0])}),$t(k,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&k.handleMouseUp(E.changedTouches[0])}),$t(k,"handleDoubleClick",function(E){var T=k.props.onDoubleClick;if(Mt(T)){var O=k.getMouseInfo(E);T(O,E)}}),$t(k,"handleContextMenu",function(E){var T=k.props.onContextMenu;if(Mt(T)){var O=k.getMouseInfo(E);T(O,E)}}),$t(k,"triggerSyncEvent",function(E){k.props.syncId!==void 0&&CA.emit(OA,k.props.syncId,E,k.eventEmitterSymbol)}),$t(k,"applySyncEvent",function(E){var T=k.props,O=T.layout,A=T.syncMethod,P=k.state.updateId,I=E.dataStartIndex,R=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)k.setState(We({dataStartIndex:I,dataEndIndex:R},m({props:k.props,dataStartIndex:I,dataEndIndex:R,updateId:P},k.state)));else if(E.activeTooltipIndex!==void 0){var M=E.chartX,L=E.chartY,U=E.activeTooltipIndex,W=k.state,V=W.offset,G=W.tooltipTicks;if(!V)return;if(typeof A=="function")U=A(G,E);else if(A==="value"){U=-1;for(var K=0;K<G.length;K++)if(G[K].value===E.activeLabel){U=K;break}}var F=We(We({},V),{},{x:V.left,y:V.top}),ne=Math.min(M,F.x+F.width),H=Math.min(L,F.y+F.height),B=G[U]&&G[U].value,X=CP(k.state,k.props.data,U),Y=G[U]?{x:O==="horizontal"?G[U].coordinate:ne,y:O==="horizontal"?H:G[U].coordinate}:Jte;k.setState(We(We({},E),{},{activeLabel:B,activeCoordinate:Y,activePayload:X,activeTooltipIndex:U}))}else k.setState(E)}),$t(k,"renderCursor",function(E){var T,O=k.state,A=O.isTooltipActive,P=O.activeCoordinate,I=O.activePayload,R=O.offset,M=O.activeTooltipIndex,L=O.tooltipAxisBandSize,U=k.getTooltipEventType(),W=(T=E.props.active)!==null&&T!==void 0?T:A,V=k.props.layout,G=E.key||"_recharts-cursor";return se.createElement(pVe,{key:G,activeCoordinate:P,activePayload:I,activeTooltipIndex:M,chartName:r,element:E,isActive:W,layout:V,offset:R,tooltipAxisBandSize:L,tooltipEventType:U})}),$t(k,"renderPolarAxis",function(E,T,O){var A=fs(E,"type.axisType"),P=fs(k.state,"".concat(A,"Map")),I=E.type.defaultProps,R=I!==void 0?We(We({},I),E.props):E.props,M=P&&P[R["".concat(A,"Id")]];return N.cloneElement(E,We(We({},M),{},{className:Jt(A,M.className),key:E.key||"".concat(T,"-").concat(O),ticks:Zl(M,!0)}))}),$t(k,"renderPolarGrid",function(E){var T=E.props,O=T.radialLines,A=T.polarAngles,P=T.polarRadius,I=k.state,R=I.radiusAxisMap,M=I.angleAxisMap,L=su(R),U=su(M),W=U.cx,V=U.cy,G=U.innerRadius,K=U.outerRadius;return N.cloneElement(E,{polarAngles:Array.isArray(A)?A:Zl(U,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(P)?P:Zl(L,!0).map(function(F){return F.coordinate}),cx:W,cy:V,innerRadius:G,outerRadius:K,key:E.key||"polar-grid",radialLines:O})}),$t(k,"renderLegend",function(){var E=k.state.formattedGraphicalItems,T=k.props,O=T.children,A=T.width,P=T.height,I=k.props.margin||{},R=A-(I.left||0)-(I.right||0),M=Nee({children:O,formattedGraphicalItems:E,legendWidth:R,legendContent:u});if(!M)return null;var L=M.item,U=ZH(M,mVe);return N.cloneElement(L,We(We({},U),{},{chartWidth:A,chartHeight:P,margin:I,onBBoxUpdate:k.handleLegendBBoxUpdate}))}),$t(k,"renderTooltip",function(){var E,T=k.props,O=T.children,A=T.accessibilityLayer,P=ns(O,Ln);if(!P)return null;var I=k.state,R=I.isTooltipActive,M=I.activeCoordinate,L=I.activePayload,U=I.activeLabel,W=I.offset,V=(E=P.props.active)!==null&&E!==void 0?E:R;return N.cloneElement(P,{viewBox:We(We({},W),{},{x:W.left,y:W.top}),active:V,label:U,payload:V?L:[],coordinate:M,accessibilityLayer:A})}),$t(k,"renderBrush",function(E){var T=k.props,O=T.margin,A=T.data,P=k.state,I=P.offset,R=P.dataStartIndex,M=P.dataEndIndex,L=P.updateId;return N.cloneElement(E,{key:E.key||"_recharts-brush",onChange:ub(k.handleBrushChange,E.props.onChange),data:A,x:it(E.props.x)?E.props.x:I.left,y:it(E.props.y)?E.props.y:I.top+I.height+I.brushBottom-(O.bottom||0),width:it(E.props.width)?E.props.width:I.width,startIndex:R,endIndex:M,updateId:"brush-".concat(L)})}),$t(k,"renderReferenceElement",function(E,T,O){if(!E)return null;var A=k,P=A.clipPathId,I=k.state,R=I.xAxisMap,M=I.yAxisMap,L=I.offset,U=E.type.defaultProps||{},W=E.props,V=W.xAxisId,G=V===void 0?U.xAxisId:V,K=W.yAxisId,F=K===void 0?U.yAxisId:K;return N.cloneElement(E,{key:E.key||"".concat(T,"-").concat(O),xAxis:R[G],yAxis:M[F],viewBox:{x:L.left,y:L.top,width:L.width,height:L.height},clipPathId:P})}),$t(k,"renderActivePoints",function(E){var T=E.item,O=E.activePoint,A=E.basePoint,P=E.childIndex,I=E.isRange,R=[],M=T.props.key,L=T.item.type.defaultProps!==void 0?We(We({},T.item.type.defaultProps),T.item.props):T.item.props,U=L.activeDot,W=L.dataKey,V=We(We({index:P,dataKey:W,cx:O.x,cy:O.y,r:4,fill:a3(T.item),strokeWidth:2,stroke:"#fff",payload:O.payload,value:O.value},Nt(U,!1)),R1(U));return R.push(b.renderActiveDot(U,V,"".concat(M,"-activePoint-").concat(P))),A?R.push(b.renderActiveDot(U,We(We({},V),{},{cx:A.x,cy:A.y}),"".concat(M,"-basePoint-").concat(P))):I&&R.push(null),R}),$t(k,"renderGraphicChild",function(E,T,O){var A=k.filterFormatItem(E,T,O);if(!A)return null;var P=k.getTooltipEventType(),I=k.state,R=I.isTooltipActive,M=I.tooltipAxis,L=I.activeTooltipIndex,U=I.activeLabel,W=k.props.children,V=ns(W,Ln),G=A.props,K=G.points,F=G.isRange,ne=G.baseLine,H=A.item.type.defaultProps!==void 0?We(We({},A.item.type.defaultProps),A.item.props):A.item.props,B=H.activeDot,X=H.hide,Y=H.activeBar,ae=H.activeShape,fe=!!(!X&&R&&V&&(B||Y||ae)),ue={};P!=="axis"&&V&&V.props.trigger==="click"?ue={onClick:ub(k.handleItemMouseEnter,E.props.onClick)}:P!=="axis"&&(ue={onMouseLeave:ub(k.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:ub(k.handleItemMouseEnter,E.props.onMouseEnter)});var oe=N.cloneElement(E,We(We({},A.props),ue));function Z(Je){return typeof M.dataKey=="function"?M.dataKey(Je.payload):null}if(fe)if(L>=0){var ce,q;if(M.dataKey&&!M.allowDuplicatedCategory){var xe=typeof M.dataKey=="function"?Z:"payload.".concat(M.dataKey.toString());ce=P1(K,xe,U),q=F&&ne&&P1(ne,xe,U)}else ce=K==null?void 0:K[L],q=F&&ne&&ne[L];if(ae||Y){var pe=E.props.activeIndex!==void 0?E.props.activeIndex:L;return[N.cloneElement(E,We(We(We({},A.props),ue),{},{activeIndex:pe})),null,null]}if(!Dt(ce))return[oe].concat(Pp(k.renderActivePoints({item:A,activePoint:ce,basePoint:q,childIndex:L,isRange:F})))}else{var Se,he=(Se=k.getItemByXY(k.state.activeCoordinate))!==null&&Se!==void 0?Se:{graphicalItem:oe},ie=he.graphicalItem,we=ie.item,ke=we===void 0?E:we,Oe=ie.childIndex,Ue=We(We(We({},A.props),ue),{},{activeIndex:Oe});return[N.cloneElement(ke,Ue),null,null]}return F?[oe,null,null]:[oe,null]}),$t(k,"renderCustomized",function(E,T,O){return N.cloneElement(E,We(We({key:"recharts-customized-".concat(O)},k.props),k.state))}),$t(k,"renderMap",{CartesianGrid:{handler:mb,once:!0},ReferenceArea:{handler:k.renderReferenceElement},ReferenceLine:{handler:mb},ReferenceDot:{handler:k.renderReferenceElement},XAxis:{handler:mb},YAxis:{handler:mb},Brush:{handler:k.renderBrush,once:!0},Bar:{handler:k.renderGraphicChild},Line:{handler:k.renderGraphicChild},Area:{handler:k.renderGraphicChild},Radar:{handler:k.renderGraphicChild},RadialBar:{handler:k.renderGraphicChild},Scatter:{handler:k.renderGraphicChild},Pie:{handler:k.renderGraphicChild},Funnel:{handler:k.renderGraphicChild},Tooltip:{handler:k.renderCursor,once:!0},PolarGrid:{handler:k.renderPolarGrid,once:!0},PolarAngleAxis:{handler:k.renderPolarAxis},PolarRadiusAxis:{handler:k.renderPolarAxis},Customized:{handler:k.renderCustomized}}),k.clipPathId="".concat((S=w.id)!==null&&S!==void 0?S:zu("recharts"),"-clip"),k.throttleTriggeredAfterMouseMove=kZ(k.triggeredAfterMouseMove,(j=w.throttleDelay)!==null&&j!==void 0?j:1e3/60),k.state={},k}return TVe(b,v),SVe(b,[{key:"componentDidMount",value:function(){var S,j;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,j=S.children,k=S.data,E=S.height,T=S.layout,O=ns(j,Ln);if(O){var A=O.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var P=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,I=CP(this.state,k,A,P),R=this.state.tooltipTicks[A].coordinate,M=(this.state.offset.top+E)/2,L=T==="horizontal",U=L?{x:R,y:M}:{y:R,x:M},W=this.state.formattedGraphicalItems.find(function(G){var K=G.item;return K.type.name==="Scatter"});W&&(U=We(We({},U),W.props.points[A].tooltipPosition),I=W.props.points[A].tooltipPayload);var V={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:P,activePayload:I,activeCoordinate:U};this.setState(V),this.renderCursor(O),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,j){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==j.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 k,E;this.accessibilityManager.setDetails({offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(S){cO([ns(S.children,Ln)],[ns(this.props.children,Ln)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=ns(this.props.children,Ln);if(S&&typeof S.props.shared=="boolean"){var j=S.props.shared?"axis":"item";return l.indexOf(j)>=0?j:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var j=this.container,k=j.getBoundingClientRect(),E=j5e(k),T={chartX:Math.round(S.pageX-E.left),chartY:Math.round(S.pageY-E.top)},O=k.width/j.offsetWidth||1,A=this.inRange(T.chartX,T.chartY,O);if(!A)return null;var P=this.state,I=P.xAxisMap,R=P.yAxisMap,M=this.getTooltipEventType(),L=tq(this.state,this.props.data,this.props.layout,A);if(M!=="axis"&&I&&R){var U=su(I).scale,W=su(R).scale,V=U&&U.invert?U.invert(T.chartX):null,G=W&&W.invert?W.invert(T.chartY):null;return We(We({},T),{},{xValue:V,yValue:G},L)}return L?We(We({},T),L):null}},{key:"inRange",value:function(S,j){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,T=S/k,O=j/k;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,P=T>=A.left&&T<=A.left+A.width&&O>=A.top&&O<=A.top+A.height;return P?{x:T,y:O}:null}var I=this.state,R=I.angleAxisMap,M=I.radiusAxisMap;if(R&&M){var L=su(R);return rz({x:T,y:O},L)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,j=this.getTooltipEventType(),k=ns(S,Ln),E={};k&&j==="axis"&&(k.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 T=R1(this.props,this.handleOuterEvent);return We(We({},T),E)}},{key:"addListener",value:function(){CA.on(OA,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){CA.removeListener(OA,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,j,k){for(var E=this.state.formattedGraphicalItems,T=0,O=E.length;T<O;T++){var A=E[T];if(A.item===S||A.props.key===S.key||j===ac(A.item.type)&&k===A.childIndex)return A}return null}},{key:"renderClipPath",value:function(){var S=this.clipPathId,j=this.state.offset,k=j.left,E=j.top,T=j.height,O=j.width;return se.createElement("defs",null,se.createElement("clipPath",{id:S},se.createElement("rect",{x:k,y:E,height:T,width:O})))}},{key:"getXScales",value:function(){var S=this.state.xAxisMap;return S?Object.entries(S).reduce(function(j,k){var E=QH(k,2),T=E[0],O=E[1];return We(We({},j),{},$t({},T,O.scale))},{}):null}},{key:"getYScales",value:function(){var S=this.state.yAxisMap;return S?Object.entries(S).reduce(function(j,k){var E=QH(k,2),T=E[0],O=E[1];return We(We({},j),{},$t({},T,O.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(S){var j;return(j=this.state.xAxisMap)===null||j===void 0||(j=j[S])===null||j===void 0?void 0:j.scale}},{key:"getYScaleByAxisId",value:function(S){var j;return(j=this.state.yAxisMap)===null||j===void 0||(j=j[S])===null||j===void 0?void 0:j.scale}},{key:"getItemByXY",value:function(S){var j=this.state,k=j.formattedGraphicalItems,E=j.activeItem;if(k&&k.length)for(var T=0,O=k.length;T<O;T++){var A=k[T],P=A.props,I=A.item,R=I.type.defaultProps!==void 0?We(We({},I.type.defaultProps),I.props):I.props,M=ac(I.type);if(M==="Bar"){var L=(P.data||[]).find(function(G){return U9e(S,G)});if(L)return{graphicalItem:A,payload:L}}else if(M==="RadialBar"){var U=(P.data||[]).find(function(G){return rz(S,G)});if(U)return{graphicalItem:A,payload:U}}else if(sS(A,E)||oS(A,E)||mx(A,E)){var W=uze({graphicalItem:A,activeTooltipItem:E,itemData:R.data}),V=R.activeIndex===void 0?W:R.activeIndex;return{graphicalItem:We(We({},A),{},{childIndex:V}),payload:mx(A,E)?R.data[W]:A.props.data[W]}}}return null}},{key:"render",value:function(){var S=this;if(!pB(this))return null;var j=this.props,k=j.children,E=j.className,T=j.width,O=j.height,A=j.style,P=j.compact,I=j.title,R=j.desc,M=ZH(j,gVe),L=Nt(M,!1);if(P)return se.createElement(AH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},se.createElement(dO,Eh({},L,{width:T,height:O,title:I,desc:R}),this.renderClipPath(),gB(k,this.renderMap)));if(this.props.accessibilityLayer){var U,W;L.tabIndex=(U=this.props.tabIndex)!==null&&U!==void 0?U:0,L.role=(W=this.props.role)!==null&&W!==void 0?W:"application",L.onKeyDown=function(G){S.accessibilityManager.keyboardEvent(G)},L.onFocus=function(){S.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return se.createElement(AH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},se.createElement("div",Eh({className:Jt("recharts-wrapper",E),style:We({position:"relative",cursor:"default",width:T,height:O},A)},V,{ref:function(K){S.container=K}}),se.createElement(dO,Eh({},L,{width:T,height:O,title:I,desc:R,style:RVe}),this.renderClipPath(),gB(k,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(N.Component);$t(x,"displayName",r),$t(x,"defaultProps",We({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),$t(x,"getDerivedStateFromProps",function(v,b){var w=v.dataKey,S=v.data,j=v.children,k=v.width,E=v.height,T=v.layout,O=v.stackOffset,A=v.margin,P=b.dataStartIndex,I=b.dataEndIndex;if(b.updateId===void 0){var R=rq(v);return We(We(We({},R),{},{updateId:0},m(We(We({props:v},R),{},{updateId:0}),b)),{},{prevDataKey:w,prevData:S,prevWidth:k,prevHeight:E,prevLayout:T,prevStackOffset:O,prevMargin:A,prevChildren:j})}if(w!==b.prevDataKey||S!==b.prevData||k!==b.prevWidth||E!==b.prevHeight||T!==b.prevLayout||O!==b.prevStackOffset||!Bh(A,b.prevMargin)){var M=rq(v),L={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},U=We(We({},tq(b,S,T)),{},{updateId:b.updateId+1}),W=We(We(We({},M),L),U);return We(We(We({},W),m(We({props:v},W),b)),{},{prevDataKey:w,prevData:S,prevWidth:k,prevHeight:E,prevLayout:T,prevStackOffset:O,prevMargin:A,prevChildren:j})}if(!cO(j,b.prevChildren)){var V,G,K,F,ne=ns(j,vp),H=ne&&(V=(G=ne.props)===null||G===void 0?void 0:G.startIndex)!==null&&V!==void 0?V:P,B=ne&&(K=(F=ne.props)===null||F===void 0?void 0:F.endIndex)!==null&&K!==void 0?K:I,X=H!==P||B!==I,Y=!Dt(S),ae=Y&&!X?b.updateId:b.updateId+1;return We(We({updateId:ae},m(We(We({props:v},b),{},{updateId:ae,dataStartIndex:H,dataEndIndex:B}),b)),{},{prevChildren:j,dataStartIndex:H,dataEndIndex:B})}return null}),$t(x,"renderActiveDot",function(v,b,w){var S;return N.isValidElement(v)?S=N.cloneElement(v,b):Mt(v)?S=v(b):S=se.createElement(dy,b),se.createElement(er,{className:"recharts-active-dot",key:w},S)});var y=N.forwardRef(function(b,w){return se.createElement(x,Eh({},b,{ref:w}))});return y.displayName=x.displayName,y},HVe=fy({chartName:"LineChart",GraphicalChild:Cu,axisComponents:[{axisType:"xAxis",AxisComp:Gs},{axisType:"yAxis",AxisComp:Ka}],formatAxisMap:cS}),aq=fy({chartName:"BarChart",GraphicalChild:ko,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Gs},{axisType:"yAxis",AxisComp:Ka}],formatAxisMap:cS}),Rp=fy({chartName:"PieChart",GraphicalChild:Sa,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:iS},{axisType:"radiusAxis",AxisComp:nS}],formatAxisMap:sBe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),qVe=fy({chartName:"AreaChart",GraphicalChild:jc,axisComponents:[{axisType:"xAxis",AxisComp:Gs},{axisType:"yAxis",AxisComp:Ka}],formatAxisMap:cS}
1291),iq=fy({chartName:"ComposedChart",GraphicalChild:[Cu,jc,ko,mS],axisComponents:[{axisType:"xAxis",AxisComp:Gs},{axisType:"yAxis",AxisComp:Ka},{axisType:"zAxis",AxisComp:pS}],formatAxisMap:cS});const sq=7,OP=({categoryBreakdown:e,printMode:t=!1,loading:r=!1,topN:n=null,title:a="Operating Expense Breakdown",compact:i=!1,onCategoryClick:s=null,noWrapper:l=!1})=>{const[c,u]=N.useState(!1);if(r||!e||e.expenses.length===0)return null;const d=[...e.expenses].sort((w,S)=>S.value-w.value),f=e.expenses.reduce((w,S)=>w+S.value,0),p=!n&&d.length>sq,m=n?d.slice(0,n):c?d:d.slice(0,sq),x=i?"h-56":"h-80",y=i?55:75,v=i?90:120,b=i?50:70;return o.jsxs("div",{className:l?"":`glass-card ${i?"p-4":"p-6"}`,children:[o.jsx("h3",{className:"text-lg font-semibold text-white font-sans mb-4",children:a}),o.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 items-center",children:[o.jsx("div",{className:`${x} flex items-center justify-center`,children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(Rp,{children:[o.jsx("defs",{children:m.map((w,S)=>o.jsxs("linearGradient",{id:`expense-gradient-${S}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:ht[S%ht.length],stopOpacity:.8}),o.jsx("stop",{offset:"95%",stopColor:ht[S%ht.length],stopOpacity:.6})]},`expense-gradient-${S}`))}),o.jsx(Sa,{data:m,cx:"50%",cy:"50%",labelLine:!1,innerRadius:y,outerRadius:v,fill:"#8884d8",dataKey:"value",paddingAngle:2,cornerRadius:4,stroke:"none",children:m.map((w,S)=>o.jsx(Li,{fill:t?ht[S%ht.length]:`url(#expense-gradient-${S})`,stroke:"none",style:{cursor:s?"pointer":"default"},onClick:()=>s&&s(w.category)},`cell-${S}`))}),o.jsx(Sa,{data:[{name:"Total Operating Expenses",value:f}],cx:"50%",cy:"50%",innerRadius:0,outerRadius:b,fill:"transparent",dataKey:"value",style:{cursor:"pointer"},stroke:"none",children:o.jsx(Li,{fill:"transparent",stroke:"none"})}),o.jsx(Ln,{formatter:w=>hi(w),content:({active:w,payload:S})=>{if(w&&S&&S[0]){const j=S[0].payload;return o.jsxs("div",{className:"p-3 shadow-lg rounded-lg",style:ia.container,children:[o.jsx("p",{style:ia.label,children:j.name}),o.jsx("p",{style:ia.item,children:hi(j.value)})]})}return null}}),o.jsxs("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",style:{pointerEvents:"none"},children:[o.jsx("tspan",{className:"text-2xl font-bold fill-white",fontFamily:"JetBrains Mono",children:Be(f)}),o.jsx("tspan",{x:"50%",dy:"25",className:"text-sm fill-gray-400",fontFamily:"Inter",children:"Opex"})]})]})})}),o.jsx("div",{className:"flex items-center justify-center",children:o.jsxs("div",{className:"space-y-2 w-full",children:[m.map((w,S)=>o.jsxs("div",{className:`flex items-center justify-between p-1.5 bg-white/5 rounded-lg hover:bg-white/10 transition-all ${s?"cursor-pointer":""}`,onClick:()=>s&&s(w.category),children:[o.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[o.jsx("div",{className:"w-2.5 h-2.5 rounded-full mr-1.5 flex-shrink-0",style:{background:ht[S%ht.length]}}),o.jsx("span",{className:"text-xs font-medium text-gray-300 font-sans truncate",children:w.name})]}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[o.jsxs("span",{className:"text-xs text-muted font-mono",children:[(w.value/f*100).toFixed(1),"%"]}),o.jsx("span",{className:"text-xs font-semibold text-white font-mono",children:Be(w.value)})]})]},S)),p&&o.jsx("button",{onClick:()=>u(!c),className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto mt-3",children:c?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4"}),"Show less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4"}),"Show all ",d.length," categories"]})})]})})]})]})},oq=7,lq=({categoryBreakdown:e,printMode:t=!1,loading:r=!1,noWrapper:n=!1})=>{const[a,i]=N.useState(!1);if(r||!e||e.revenue.length===0)return null;const s=e.revenue.filter(d=>!d.hidden).sort((d,f)=>f.value-d.value),l=e.revenue.reduce((d,f)=>d+f.value,0),c=s.length>oq,u=a?s:s.slice(0,oq);return o.jsxs("div",{className:n?"":"glass-card p-6",children:[o.jsx("h3",{className:"text-lg font-semibold text-white font-sans mb-4",children:"Revenue Breakdown"}),o.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 items-center",children:[o.jsx("div",{className:"h-80 flex items-center justify-center",children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(Rp,{children:[o.jsx("defs",{children:u.map((d,f)=>o.jsxs("linearGradient",{id:`revenue-gradient-${f}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",
1291stopColor:ht[f%ht.length],stopOpacity:.8}),o.jsx("stop",{offset:"95%",stopColor:ht[f%ht.length],stopOpacity:.6})]},`revenue-gradient-${f}`))}),o.jsx(Sa,{data:u,cx:"50%",cy:"50%",labelLine:!1,innerRadius:75,outerRadius:120,fill:"#8884d8",dataKey:"value",paddingAngle:2,cornerRadius:4,stroke:"none",children:u.map((d,f)=>o.jsx(Li,{fill:t?ht[f%ht.length]:`url(#revenue-gradient-${f})`,stroke:"none"},`cell-${f}`))}),o.jsx(Sa,{data:[{name:"Total Net Revenue",value:l}],cx:"50%",cy:"50%",innerRadius:0,outerRadius:70,fill:"transparent",dataKey:"value",style:{cursor:"pointer"},stroke:"none",children:o.jsx(Li,{fill:"transparent",stroke:"none"})}),o.jsx(Ln,{formatter:d=>hi(d),content:({active:d,payload:f})=>{if(d&&f&&f[0]){const p=f[0].payload;return o.jsxs("div",{className:"p-3 shadow-lg rounded-lg",style:ia.container,children:[o.jsx("p",{style:ia.label,children:p.name}),o.jsx("p",{style:ia.item,children:hi(p.value)})]})}return null}}),o.jsxs("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",style:{pointerEvents:"none"},children:[o.jsx("tspan",{className:"text-2xl font-bold fill-white",fontFamily:"JetBrains Mono",children:Be(l)}),o.jsx("tspan",{x:"50%",dy:"25",className:"text-sm fill-gray-400",fontFamily:"Inter",children:"Net Revenue"})]})]})})}),o.jsx("div",{className:"flex items-center justify-center",children:o.jsxs("div",{className:"space-y-2 w-full",children:[u.map((d,f)=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-white/5 rounded-lg hover:bg-white/10 transition-all",children:[o.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[o.jsx("div",{className:"w-3 h-3 rounded-full mr-2 flex-shrink-0",style:{background:ht[f%ht.length]}}),o.jsx("span",{className:"text-sm font-medium text-gray-300 font-sans truncate",children:d.name})]}),o.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[o.jsxs("span",{className:"text-xs text-muted font-mono",children:[(d.value/l*100).toFixed(1),"%"]}),o.jsx("span",{className:"text-sm font-semibold text-white font-mono",children:Be(d.value)})]})]},f)),c&&o.jsx("button",{onClick:()=>i(!a),className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto mt-3",children:a?o.jsxs(o.Fragment,{children:[o.jsx(eo,{className:"w-4 h-4"}),"Show less"]}):o.jsxs(o.Fragment,{children:[o.jsx(kr,{className:"w-4 h-4"}),"Show all ",s.length," categories"]})})]})})]})]})},cq=({categoryBreakdown:e,specificSubcategory:t=null,showExpenseSubcategories:r=!1,printMode:n=!1,loading:a=!1})=>{if(!r||a||!e||!e.expensesByCategory)return null;const i=N.useMemo(()=>{let s=[{key:"unitTurns",title:"Unit Turns Breakdown",data:e.expensesByCategory.unitTurns},{key:"utilities",title:"Utilities Breakdown",data:e.expensesByCategory.utilities},{key:"repairMaintenance",title:"Repairs & Maintenance Breakdown",data:e.expensesByCategory.repairMaintenance},{key:"generalAdmin",title:"General & Admin Breakdown",data:e.expensesByCategory.generalAdmin},{key:"capitalExpenditures",title:"Capital Expenditures Breakdown",data:e.expensesByCategory.capitalExpenditures},{key:"contractServices",title:"Contract Services Breakdown",data:e.expensesByCategory.contractServices},{key:"marketing",title:"Marketing Breakdown",data:e.expensesByCategory.marketing},{key:"assetManagement",title:"Asset Management Breakdown",data:e.expensesByCategory.assetManagement}].filter(l=>l.data&&l.data.length>0);return t&&(s=s.filter(l=>l.key===t)),s},[e,t,r]);if(i.length===0)return null;if(t&&i.length===1){const s=i[0],l=s.data.reduce((c,u)=>c+u.value,0);return o.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[o.jsx("div",{className:"h-52 flex items-center justify-center",children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(Rp,{children:[o.jsx("defs",{children:s.data.map((c,u)=>o.jsxs("linearGradient",{id:`${s.key}-gradient-${u}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:ht[u%ht.length],stopOpacity:.8}),o.jsx("stop",{offset:"95%",stopColor:ht[u%ht.length],stopOpacity:.6})]},`${s.key}-gradient-${u}`))}),o.jsx(Sa,{data:s.data,cx:"50%",cy:"50%",labelLine:!1,innerRadius:55,outerRadius:90,fill:"#8884d8",dataKey:"value",paddingAngle:2,cornerRadius:4,stroke:"none",children:s.data.map((c,u)=>o.jsx(Li,{fill:n?ht[u%ht.length]:`url(#${s.key}-gradient-${u})`,stroke:"none"},`cell-${u}`))}),o.jsx(Ln,{formatter:c=>hi(c),content:({active:c,payload:u})=>
1291{if(c&&u&&u[0]){const d=u[0].payload;return o.jsxs("div",{className:"p-3 shadow-lg rounded-lg",style:ia.container,children:[o.jsx("p",{style:ia.label,children:d.name}),o.jsx("p",{style:ia.item,children:hi(d.value)})]})}return null}}),o.jsx("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",style:{pointerEvents:"none"},children:o.jsx("tspan",{className:"text-lg font-bold fill-white",fontFamily:"JetBrains Mono",children:Be(l)})})]})})}),o.jsx("div",{className:"space-y-2",children:s.data.map((c,u)=>o.jsxs("div",{className:"flex items-center justify-between p-1.5 bg-white/5 rounded-lg hover:bg-white/10 transition-all",children:[o.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[o.jsx("div",{className:"w-2.5 h-2.5 rounded-full mr-1.5 flex-shrink-0",style:{background:ht[u%ht.length]}}),o.jsx("span",{className:"text-xs font-medium text-gray-300 font-sans truncate",children:c.name})]}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[o.jsxs("span",{className:"text-xs text-muted font-mono",children:[(c.value/l*100).toFixed(1),"%"]}),o.jsx("span",{className:"text-xs font-semibold text-white font-mono",children:hi(c.value)})]})]},u))})]})}return o.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:i.map(s=>{const l=s.data.reduce((c,u)=>c+u.value,0);return o.jsxs("div",{className:"glass-card p-4",children:[o.jsx("h3",{className:"text-base font-semibold text-white mb-3 font-sans",children:s.title}),o.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[o.jsx("div",{className:"h-48 flex items-center justify-center",children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(Rp,{children:[o.jsx("defs",{children:s.data.map((c,u)=>o.jsxs("linearGradient",{id:`${s.key}-gradient-${u}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:ht[u%ht.length],stopOpacity:.8}),o.jsx("stop",{offset:"95%",stopColor:ht[u%ht.length],stopOpacity:.6})]},`${s.key}-gradient-${u}`))}),o.jsx(Sa,{data:s.data,cx:"50%",cy:"50%",labelLine:!1,innerRadius:40,outerRadius:65,fill:"#8884d8",dataKey:"value",paddingAngle:2,cornerRadius:4,stroke:"none",children:s.data.map((c,u)=>o.jsx(Li,{fill:`url(#${s.key}-gradient-${u})`,stroke:"none"},`cell-${u}`))}),o.jsx(Ln,{formatter:c=>hi(c),content:({active:c,payload:u})=>{if(c&&u&&u[0]){const d=u[0].payload;return o.jsxs("div",{className:"p-3 shadow-lg rounded-lg",style:ia.container,children:[o.jsx("p",{style:ia.label,children:d.name}),o.jsx("p",{style:ia.item,children:hi(d.value)})]})}return null}}),o.jsx("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",style:{pointerEvents:"none"},children:o.jsx("tspan",{className:"text-sm font-bold fill-white",fontFamily:"JetBrains Mono",children:Be(l)})})]})})}),o.jsx("div",{className:"space-y-2",children:o.jsx("div",{className:"space-y-2 w-full",children:s.data.map((c,u)=>o.jsxs("div",{className:"flex items-center justify-between p-1.5 bg-white/5 rounded-lg hover:bg-white/10 transition-all",children:[o.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[o.jsx("div",{className:"w-2.5 h-2.5 rounded-full mr-1.5 flex-shrink-0",style:{background:ht[u%ht.length]}}),o.jsx("span",{className:"text-xs font-medium text-gray-300 font-sans truncate",children:c.name})]}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[o.jsxs("span",{className:"text-xs text-muted font-mono",children:[(c.value/l*100).toFixed(0),"%"]}),o.jsx("span",{className:"text-xs font-semibold text-white font-mono",children:Be(c.value)})]})]},u))})})]})]},s.key)})})},uq=({title:e,children:t,controls:r=null,height:n="h-64",loading:a=!1,className:i="",noWrapper:s=!1})=>{if(a){const u=o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"h-8 w-8 mx-auto border-3 border-accent border-t-transparent rounded-full animate-spin mb-4"}),o.jsx("p",{className:"text-gray-400 text-sm",children:"Loading chart data..."})]})});return s?o.jsx("div",{className:`${n} ${i}`,children:u}):o.jsxs("div",{className:`glass-card p-6 ${n} ${i}`,children:[e&&o.jsx("div",{className:"flex items-center justify-between mb-4",children:o.jsx("h3",{className:"text-lg font-semibold text-white font-sans",children:e})}),u]})}const l=(e||r)&&o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e&&o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans",children:e}),r]}),c=o.jsx("div",{className:n,children:t});return s?o.jsxs("div",{className:i,children:[l,c]}):o.jsxs("div",{className:`glass-card p-6 ${i}`,children:[l,c]})},WVe=({currentType:e,allowedTypes:t=[],onChange:r,disabled:n=!1})=>{if(!t||t.length<=1)return null;const i=(t.indexOf(e)+1)%t.length,s=t[i];return o.jsx("button",{onClick:()=>r(s),disabled:n,className:"text-xs px-3 py-1 rounded-md bg-card/50 border border-card-border text-gray-300 hover:bg-card/70 hover:text-white transition-all font-sans",children:s===ra.AREA||s===ra.STACKED_AREA?"Show as Stacked":"Show as Lines"})},VVe=({active:e,payload:t,label:r,formatters:n={},dataKeys:a=[]})=>{if(!e||!t||t.length===0)return null;const i=(s,l)=>{if(n[l])return n[l](s);const c=a.find(u=>u.key===l);return c!=null&&c.formatter?c.formatter(s):l.includes("ratio")||l.includes("percentage")||l==="occupancy"?`${s.toFixed(1)}%`:l==="dscr"?`${s.toFixed(2)}x`:typeof s=="number"?Be(s):s};return o.jsxs("div",{className:"p-3 shadow-lg rounded-lg",style:ia.container,children:[o.jsx("p",{style:ia.label,className:"mb-2 font-medium",children:r}),t.map((s,l)=>s.value===null||s.value===void 0?null:o.jsxs("div",{className:"flex items-center justify-between space-x-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s.color}}),o.jsx("span",{style:ia.label,className:"text-xs",children:s.name||s.dataKey})]}),o.jsx("span",{style:ia.item,className:"text-xs font-mono font-semibold",children:i(s.value,s.dataKey)})]},l))]})},GVe=(e,t,r)=>N.useMemo(()=>
1291{if(!e||!Array.isArray(e)||e.length===0)return console.warn("[useChartData] Invalid or empty data received:",e),{data:[],keys:[]};if(!t||t==="dynamic"){const a=new Set;e.forEach(s=>{Object.keys(s).forEach(l=>{l!=="month"&&l!=="month_year"&&!l.startsWith("total_")&&typeof s[l]=="number"&&a.add(l)})});const i=Array.from(a);return{data:e,keys:i.map(s=>({key:s,name:s.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase()),axis:"left"}))}}return{data:e.map(a=>{const i={...a};if(t.some(s=>s.key==="expense_ratio")){const s=a.gross_revenue||a.revenue||0,l=a.total_expenses||a.expenses||0;i.expense_ratio=s>0?Math.round(l/s*100*10)/10:0}return t.some(s=>s.key==="occupancy")&&a.occupancy!==void 0&&(i.occupancy=a.occupancy<1?a.occupancy*100:a.occupancy),i}),keys:t}},[e,t,r]),KVe=(e,t={})=>N.useMemo(()=>{const r=e&&jd[e]?{...jd[e]}:{};(e==="noi-metrics"||e==="dscr-revenue")&&console.log(`[useChartConfig DEBUG] ${e}:`,{presetExists:!!jd[e],baseConfigDataKeys:r.dataKeys,baseConfigTitle:r.title});const n={...r,...t,title:t.title||r.title,dataKeys:t.dataKeys||r.dataKeys,leftAxis:{...r.leftAxis,...t.leftAxis},rightAxis:t.rightAxis||r.rightAxis?{...r.rightAxis,...t.rightAxis}:null};return n.dataKeys&&n.dataKeys!=="dynamic"&&Array.isArray(n.dataKeys)&&!n.colors&&(n.colors=n.dataKeys.map((a,i)=>a.color&&{accent:ht[0],primary:ht[1],success:ht[2],error:ht[3],warning:ht[4]}[a.color]||ht[i%ht.length])),n},[e,t]),Fs=({data:e,dataKeys:t,preset:r,title:n,chartType:a,allowToggle:i=!1,toggleOptions:s,height:l="h-[400px]",leftAxis:c,rightAxis:u,colors:d,showGradients:f=!0,printMode:p=!1,alertThreshold:m,loading:x=!1,className:y=""})=>{var M,L,U,W,V,G,K,F,ne;const v=KVe(r,{title:n,chartType:a,allowToggle:i,toggleOptions:s,height:l,leftAxis:c,rightAxis:u,dataKeys:t,colors:d,showGradients:f,alertThreshold:m}),[b,w]=N.useState(v.chartType||ra.LINE),{data:S,keys:j}=GVe(e,v.dataKeys||t,b),k=v.allowToggle?b:v.chartType,E=k===ra.DUAL_AXIS||v.rightAxis,T=k===ra.STACKED_AREA,O=k===ra.AREA||T,A=N.useMemo(()=>!v.showGradients||p?null:o.jsx("defs",{children:j.map((H,B)=>{var Y;const X=((Y=v.colors)==null?void 0:Y[B])||ht[B%ht.length];return o.jsxs("linearGradient",{id:`gradient-${H.key||H}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:X,stopOpacity:.8}),o.jsx("stop",{offset:"95%",stopColor:X,stopOpacity:.1})]},`gradient-${H.key||H}`)})}),[j,v.colors,v.showGradients,p]),P=v.allowToggle?o.jsx(WVe,{currentType:b,allowedTypes:v.toggleOptions,onChange:w,disabled:x||!S||S.length===0}):null;if(!S||S.length===0)return o.jsx(uq,{title:v.title,height:v.height,loading:x,className:y,children:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx("p",{className:"text-gray-400",children:"No data available"})})});const I=O?qVe:HVe,R=O?jc:Cu;return v.noWrapper?o.jsxs("div",{className:y,children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans",children:v.title}),P]}),o.jsx("div",{className:v.height||"h-96",children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(I,{data:S,margin:n8.withRotatedLabels,children:[A,o.jsx(Id,{strokeDasharray:Ad.strokeDasharray,stroke:Ad.stroke}),o.jsx(Gs,{dataKey:v.xAxisKey||"month_year",angle:-45,textAnchor:"end",height:60,tick:fo.tick,stroke:fo.stroke}),o.jsx(Ka,{yAxisId:"left",tickFormatter:(M=v.leftAxis)==null?void 0:M.formatter,domain:((L=v.leftAxis)==null?void 0:L.domain)||["auto","auto"],tick:fo.tick,stroke:fo.stroke,width:60,tickCount:8}),E&&v.rightAxis&&o.jsx(Ka,{yAxisId:"right",orientation:"right",tickFormatter:v.rightAxis.formatter,domain:v.rightAxis.domain||["auto","auto"],tick:fo.tick,stroke:fo.stroke,width:80,tickCount:8}),o.jsx(Ln,{formatter:(H,B)=>{var fe,ue;const X=j.find(oe=>(oe.key||oe)===B||(oe.name||oe)===B),ae=((X==null?void 0:X.axis)||"left")==="right"?(fe=v.rightAxis)==null?void 0:fe.formatter:(ue=v.leftAxis)==null?void 0:ue.formatter;return ae?ae(H):H},contentStyle:ia.container,labelStyle:ia.label,itemStyle:ia.item}),v.alertThreshold&&o.jsx(vx,{y:v.alertThreshold.value,yAxisId:((U=j.find(H=>H.key===v.alertThreshold.key))==null?void 0:U.axis)||"left",stroke:"#ef4444",strokeDasharray:"3 3",label:{value:`Alert: ${v.alertThreshold.value}`,position:"right",fill:"#ef4444",fontSize:12}}),j.map((H,B)=>{var ue;const X=typeof H=="string"?H:H.key,Y=typeof H=="string"?X:H.name||X,ae=typeof H=="string"?"left"
1291:H.axis||"left",fe=((ue=v.colors)==null?void 0:ue[B])||ht[B%ht.length];return o.jsx(R,{type:"monotone",dataKey:X,name:Y,yAxisId:ae,stroke:fe,strokeWidth:O?1:3,fill:O?v.showGradients&&!p?`url(#gradient-${X})`:fe:"none",fillOpacity:O?1:0,stackId:T?"1":null,connectNulls:!0,dot:!1,activeDot:{r:4,fill:fe,stroke:fe,strokeWidth:2}},X)}),o.jsx(pl,{wrapperStyle:{paddingTop:"20px",fontFamily:ud.fontFamily,fontSize:`${ud.fontSize}px`,display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"8px",color:ud.color},iconType:O?"rect":"line",verticalAlign:"bottom",height:j.length>15?60:30,formatter:H=>o.jsx("span",{style:{color:ud.color},children:H})})]})})})]}):o.jsx(uq,{title:v.title,controls:P,height:v.height,loading:x,className:y,children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(I,{data:S,margin:n8.default,children:[A,o.jsx(Id,{...Ad}),o.jsx(Gs,{dataKey:v.xAxisKey||"month_year",...fo,angle:-45,textAnchor:"end",height:60}),o.jsx(Ka,{yAxisId:"left",...fo,tickFormatter:(W=v.leftAxis)==null?void 0:W.formatter,domain:((V=v.leftAxis)==null?void 0:V.domain)||["auto","auto"],width:80,label:(G=v.leftAxis)!=null&&G.label?{value:v.leftAxis.label,angle:-90,position:"insideLeft",offset:10,style:{...fo.tick,textAnchor:"middle",fontSize:12}}:null}),E&&v.rightAxis&&o.jsx(Ka,{yAxisId:"right",orientation:"right",...fo,tickFormatter:v.rightAxis.formatter,domain:v.rightAxis.domain||["auto","auto"],width:80,label:v.rightAxis.label?{value:v.rightAxis.label,angle:90,position:"insideRight",offset:10,style:{...fo.tick,textAnchor:"middle",fontSize:12}}:null}),o.jsx(Ln,{content:o.jsx(VVe,{formatters:{...((K=v.leftAxis)==null?void 0:K.formatter)&&{left:v.leftAxis.formatter},...((F=v.rightAxis)==null?void 0:F.formatter)&&{right:v.rightAxis.formatter}},dataKeys:j})}),v.alertThreshold&&o.jsx(vx,{y:v.alertThreshold.value,yAxisId:((ne=j.find(H=>H.key===v.alertThreshold.key))==null?void 0:ne.axis)||"left",stroke:"#ef4444",strokeDasharray:"3 3",label:{value:`Alert: ${v.alertThreshold.value}`,position:"right",fill:"#ef4444",fontSize:12}}),j.map((H,B)=>{var ue;const X=typeof H=="string"?H:H.key,Y=typeof H=="string"?X:H.name||X,ae=typeof H=="string"?"left":H.axis||"left",fe=((ue=v.colors)==null?void 0:ue[B])||ht[B%ht.length];return o.jsx(R,{type:"monotone",dataKey:X,name:Y,yAxisId:ae,stroke:fe,strokeWidth:2,fill:O?v.showGradients&&!p?`url(#gradient-${X})`:fe:"none",fillOpacity:O?.6:0,stackId:T?"stack":null,connectNulls:!0,dot:!1,activeDot:{r:4,stroke:fe,strokeWidth:2}},X)}),o.jsx(pl,{verticalAlign:"bottom",height:36,iconType:"line",wrapperStyle:{paddingTop:"10px",fontSize:`${ud.fontSize}px`,fontFamily:ud.fontFamily},formatter:H=>o.jsx("span",{style:{color:ud.color},children:H})})]})})})},YVe=({categoryBreakdown:e,loading:t=!1,topN:r=5,noWrapper:n=!1})=>{if(t||!e||e.revenue.length===0)return null;const a=e.revenue.filter(f=>!f.hidden),i=a.filter(f=>f.value>0).sort((f,p)=>p.value-f.value),s=a.filter(f=>f.value<0).sort((f,p)=>f.value-p.value),l=r?i.slice(0,r):i,c=i.reduce((f,p)=>f+p.value,0),u=s.reduce((f,p)=>f+p.value,0),d=c+u;return l.length===0||c===0?null:o.jsxs("div",{className:n?"":"glass-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("h3",{className:"text-lg font-semibold text-white font-sans flex items-center gap-2",children:[o.jsx(Vp,{className:"w-5 h-5 text-success"}),"Income Summary"]}),o.jsxs("div",{className:"text-right",children:[o.jsx("span",{className:"text-2xl font-bold text-success font-mono",children:Be(d)}),o.jsx("span",{className:"text-sm text-muted ml-2",children:"Total"})]})]}),o.jsx("div",{className:"space-y-3",children:l.map((f,p)=>{const m=f.value/c*100,x=ht[p%ht.length];return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:x}}),o.jsx("span",{className:"text-sm font-medium text-gray-300 font-sans",children:f.name})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-xs text-muted font-mono",children:[m.toFixed(1),"%"]}),o.jsx("span",{className:"text-sm font-semibold text-white font-mono min-w-[90px] text-right",children:Be(f.value)})]})]}),o.jsx("div",{className:"w-full bg-card/50 rounded-full h-2 overflow-hidden",children:o.jsx("div",{className:"h-2 rounded-full transition-all duration-500",style:{width:`${m}%`,backgroundColor:x,opacity:.8}})})]},p)})}),s.length>0&&o.jsx("div",{className:"mt-4 pt-4 border-t border-white/10",children:o.jsx("div",{className:"space-y-3",children:s.map((f,p)=>{const m=f.name.replace(/^Less:\s*/i,""),x=Math.abs(f.value)/c*100;return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0 bg-error"}),o.jsx("span",{className:"text-sm font-medium text-gray-300 font-sans",children:m})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-xs text-muted font-mono",children:[x.toFixed(1),"%"]}),o.jsx("span",{className:"text-sm font-semibold text-error font-mono min-w-[90px] text-right",children:Be(f.value)})]})]}),o.jsx("div",{className:"w-full bg-card/50 rounded-full h-2 overflow-hidden",children:o.jsx("div",{className:"h-2 rounded-full transition-all duration-500 ml-auto",style:{width:`${x}%`,backgroundColor:MIe.adjustments,opacity:.7}})})]},p)})})})]})},XVe=({categoryBreakdown:e,monthlyTrends:t=[],printMode:r=!1,loading:n=!1})=>{const a=t.slice(-12);return o.jsxs("div",{className:"glass-card p-6",children:[o.jsx(YVe,{categoryBreakdown:e,loading:n,noWrapper:!0}),o.jsx("div",{className:"border-t border-white/10 my-6"}
1291),o.jsx(Fs,{preset:"noi-summary",data:a,printMode:r,loading:n}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(OP,{categoryBreakdown:e,topN:5,title:"Top 5 Operating Expenses",printMode:r,loading:n,compact:!0,noWrapper:!0})]})},JVe=e=>{var d,f,p,m,x,y,v,b,w,S,j;const[t,r]=N.useState(!0),[n,a]=N.useState(null),[i,s]=N.useState(null),l=((d=e==null?void 0:e.property)==null?void 0:d.id)||((f=e==null?void 0:e.metadata)==null?void 0:f.propertyId)||((p=e==null?void 0:e.analysis)==null?void 0:p.property_id)||(e==null?void 0:e.propertyId)||(e==null?void 0:e.id),c=((m=e==null?void 0:e.timeframe)==null?void 0:m.start)||((x=e==null?void 0:e.dateRange)==null?void 0:x.start)||((y=e==null?void 0:e.timeframe)==null?void 0:y.startDate)||((v=e==null?void 0:e.dateRange)==null?void 0:v.startDate),u=((b=e==null?void 0:e.timeframe)==null?void 0:b.end)||((w=e==null?void 0:e.dateRange)==null?void 0:w.end)||((S=e==null?void 0:e.timeframe)==null?void 0:S.endDate)||((j=e==null?void 0:e.dateRange)==null?void 0:j.endDate);return N.useEffect(()=>{l&&(async()=>{try{if(r(!0),a(null),!l)throw new Error("No property ID available");const E=await oa.get(`/metrics/operating-statement/${l}`,{params:{startDate:c,endDate:u}});if(E.data.success)s(E.data.statement);else throw new Error(E.data.error||"Failed to load statement data")}catch(E){console.error("[useStatementData] Error fetching statement data:",E),a(E.message||"Failed to load statement data")}finally{r(!1)}})()},[l,c,u]),{loading:t,error:n,statement:i}},N0={showMonthlyColumns:!1,expandAllCategories:!1,showVariance:!1,showPercentOfRevenue:!0,showPerUnit:!0,comparisonPeriod:"prior-year"},QVe="sami-statement-preferences",RA={revenue:{displayName:"Revenue"},operatingExpenses:{displayName:"Operating Expenses"},belowTheLine:{displayName:"Below the Line"}},gb={noi:{label:"Net Operating Income",description:"Revenue minus Operating Expenses"},netIncome:{label:"Net Income",description:"NOI minus Below the Line items"}},Zte=()=>{const[e,t,r]=eX(QVe,N0),n=N.useMemo(()=>({...N0,...e}),[e]),a=N.useCallback((c,u)=>{if(!(c in N0)){console.warn(`[useStatementPreferences] Unknown preference key: ${c}`);return}t(d=>({...d,[c]:u}))},[t]),i=N.useCallback(c=>{const u=Object.keys(N0),d=Object.entries(c).reduce((f,[p,m])=>(u.includes(p)?f[p]=m:console.warn(`[useStatementPreferences] Skipping unknown preference key: ${p}`),f),{});Object.keys(d).length>0&&t(f=>({...f,...d}))},[t]),s=N.useCallback(()=>{r()},[r]),l=N.useCallback(c=>{if(typeof n[c]!="boolean"){console.warn(`[useStatementPreferences] Cannot toggle non-boolean preference: ${c}`);return}a(c,!n[c])},[n,a]);return{preferences:n,setPreference:a,setPreferences:i,togglePreference:l,resetPreferences:s,defaults:N0}},ZVe=(e,t=!1,r="yoy")=>{var b,w,S,j,k,E,T,O,A,P,I;const[n,a]=N.useState(!1),[i,s]=N.useState(null),[l,c]=N.useState(null),u=((b=e==null?void 0:e.property)==null?void 0:b.id)||((w=e==null?void 0:e.metadata)==null?void 0:w.propertyId)||((S=e==null?void 0:e.analysis)==null?void 0:S.property_id)||(e==null?void 0:e.propertyId)||(e==null?void 0:e.id),d=((j=e==null?void 0:e.timeframe)==null?void 0:j.start)||((k=e==null?void 0:e.dateRange)==null?void 0:k.start)||((E=e==null?void 0:e.timeframe)==null?void 0:E.startDate)||((T=e==null?void 0:e.dateRange)==null?void 0:T.startDate),f=((O=e==null?void 0:e.timeframe)==null?void 0:O.end)||((A=e==null?void 0:e.dateRange)==null?void 0:A.end)||((P=e==null?void 0:e.timeframe)==null?void 0:P.endDate)||((I=e==null?void 0:e.dateRange)==null?void 0:I.endDate),p=N.useMemo(()=>{const R=/^\d{4}-\d{2}-\d{2}$/;if(!(d!=null&&d.match(R))||!(f!=null&&f.match(R)))return null;const[M,L,U]=d.split("-").map(Number),[W,V,G]=f.split("-").map(Number),K=`${M-1}-${String(L).padStart(2,"0")}-${String(U).padStart(2,"0")}`,F=`${W-1}-${String(V).padStart(2,"0")}-${String(G).padStart(2,"0")}`;return{start:K,end:F}},[d,f]),m=N.useCallback(async()=>{var R;if(!(!u||!p))try{a(!0),s(null);const M=await oa.get(`/metrics/operating-statement/${u}`,{params:{startDate:p.start,endDate:p.end}});M.data.success&&M.data.statement?c(M.data.statement):c(null)}catch(M){console.error("[useVarianceData] Error fetching prior period data:",M),((R=M.response)==null?void 0:R.status)!==404&&s("Failed to load comparison data"),c(null)}finally{a(!1)}},[u,p]);N.useEffect(()=>{t&&u&&p?(c(null),m()):t||(c(null),s(null))},[t,m,u,p]);const x=N.useMemo(()=>{var L,U,W;if(!l)return{byCategory:{},byLineItem:{}};const R={},M={};return(L=l.revenue)!=null&&L.categories&&l.revenue.categories.forEac
1291h(V=>{var K,F;const G=((K=V.name)==null?void 0:K.toLowerCase())||((F=V.category)==null?void 0:F.toLowerCase());G&&(R[G]={priorTotal:V.total||0},V.lineItems&&V.lineItems.forEach(ne=>{const H=`${G}-${ne.glCode||ne.description||""}`.toLowerCase();M[H]={priorTotal:ne.total||0}}))}),(U=l.operatingExpenses)!=null&&U.categories&&l.operatingExpenses.categories.forEach(V=>{var K,F;const G=((K=V.name)==null?void 0:K.toLowerCase())||((F=V.category)==null?void 0:F.toLowerCase());G&&(R[G]={priorTotal:V.total||0},V.lineItems&&V.lineItems.forEach(ne=>{const H=`${G}-${ne.glCode||ne.description||""}`.toLowerCase();M[H]={priorTotal:ne.total||0}}))}),(W=l.belowTheLine)!=null&&W.categories&&l.belowTheLine.categories.forEach(V=>{var K,F;const G=((K=V.name)==null?void 0:K.toLowerCase())||((F=V.category)==null?void 0:F.toLowerCase());G&&(R[G]={priorTotal:V.total||0},V.lineItems&&V.lineItems.forEach(ne=>{const H=`${G}-${ne.glCode||ne.description||""}`.toLowerCase();M[H]={priorTotal:ne.total||0}}))}),{byCategory:R,byLineItem:M}},[l]),y=N.useCallback((R,M=0)=>{if(!l||!x.byCategory)return null;const L=R==null?void 0:R.toLowerCase(),U=x.byCategory[L];if(!U)return M!==0?{priorTotal:0,dollarVariance:M,percentVariance:100,isNew:!0}:null;const W=M-U.priorTotal,V=U.priorTotal!==0?W/Math.abs(U.priorTotal)*100:M!==0?100:0;return{priorTotal:U.priorTotal,dollarVariance:W,percentVariance:V,isNew:!1}},[l,x]),v=N.useCallback((R,M="",L=0)=>{if(!l||!x.byLineItem)return null;const U=`${R}-${M}`.toLowerCase(),W=x.byLineItem[U];if(!W)return L!==0?{priorTotal:0,dollarVariance:L,percentVariance:100,isNew:!0}:null;const V=L-W.priorTotal,G=W.priorTotal!==0?V/Math.abs(W.priorTotal)*100:L!==0?100:0;return{priorTotal:W.priorTotal,dollarVariance:V,percentVariance:G,isNew:!1}},[l,x]);return{loading:n,error:i,hasPriorData:!!l,priorPeriod:p,getVarianceForCategory:y,getVarianceForLineItem:v,refetch:m}},IA=({name:e,total:t,lineItems:r=[],variant:n="expense",revenueTotal:a,unitCount:i,showPercentOfRevenue:s=!1,showPerUnit:l=!1,showVariance:c=!1,variance:u=null,getVarianceForLineItem:d=null,defaultExpanded:f=!1,onLineItemClick:p,className:m=""})=>{const[x,y]=N.useState(f);N.useEffect(()=>{y(f)},[f]);const v={revenue:{totalColor:"text-success",hoverBg:"hover:bg-success/5"},expense:{totalColor:"text-warning",hoverBg:"hover:bg-warning/5"},"below-line":{totalColor:"text-gray-300",hoverBg:"hover:bg-white/5"}},b=v[n]||v.expense,w=s&&a>0?(Math.abs(t)/a*100).toFixed(1):null,S=l&&i>0?Math.abs(t)/i:null,j=r&&r.length>0,k=(E,T)=>{if(E===0)return"text-gray-500";const O=E>0;return T==="revenue"?O?"text-success":"text-error":O?"text-error":"text-success"};return o.jsxs("div",{className:`${m}`,children:[o.jsxs("button",{onClick:()=>j&&y(!x),disabled:!j,className:` 1292 w-full flex items-center justify-between py-3 px-4 1293 text-left transition-all duration-150 1294 ${j?`cursor-pointer ${b.hoverBg}`:"cursor-default"} 1295 border-b border-white/5 1296 `,"aria-expanded":j?x:void 0,type:"button",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[j?o.jsx(yl,{className:`w-4 h-4 text-gray-500 transition-transform duration-200 flex-shrink-0 ${x?"rotate-90":""}`}):o.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),o.jsx("span",{className:"text-gray-200 font-medium truncate",children:e})]}),o.jsxs("div",{className:"flex items-center gap-6 text-right flex-shrink-0",children:[w!==null&&o.jsxs("span",{className:"text-gray-500 text-sm font-mono w-16",children:[w,"%"]}),S!==null&&o.jsxs("span",{className:"text-gray-500 text-sm font-mono w-20",children:[Be(S),"/u"]}),c&&u&&o.jsxs("span",{className:`text-sm font-mono w-24 ${k(u.dollarVariance,n)}`,children:[u.dollarVariance>=0?"+":"",Be(u.dollarVariance)]}),c&&!u&&o.jsx("span",{className:"text-gray-600 text-sm font-mono w-24",children:"â"}),o.jsx("span",{className:`font-mono font-semibold w-28 ${b.totalColor}`,children:Be(t)})]})]}),j&&x&&o.jsx("div",{className:"bg-card/20",children:r.map((E,T)=>{const O=s&&a>0?(Math.abs(E.total)/a*100).toFixed(1):null,A=l&&i>0?Math.abs(E.total)/i:null;return o.jsxs("button",{onClick:()=>p&&p(E,n),className:` 1297 w-full flex items-center justify-between py-2 px-4 pl-10 1298 text-left transition-colors duration-150 1299 ${p?"cursor-pointer hover:bg-white/5":"cursor-default"} 1300 border-b border-white/5 last:border-b-0 1301 `,type:"button",disabled:!p,children:[o.jsx("span",{className:"text-gray-400 text-sm truncate flex-1 min-w-0",children:E.description}),o.jsxs("div",{className:"flex items-center gap-6 text-right flex-shrink-0",children:[O!==null&&o.jsxs("span",{className:"text-gray-600 text-sm font-mono w-16",children:[O,"%"]}),A!==null&&o.jsxs("span",{className:"text-gray-600 text-sm font-mono w-20",children:[Be(A),"/u"]}),c&&(()=>{const P=d?d(e,E.glCode||E.description,E.total):null;return P?o.jsxs("span",{className:`text-xs font-mono w-24 ${k(P.dollarVariance,n)}`,children:[P.dollarVariance>=0?"+":"",Be(P.dollarVariance)]}):o.jsx("span",{className:"text-gray-700 text-xs font-mono w-24",children:"â"})})(),o.jsx("span",{className:"text-gray-300 text-sm font-mono w-28",children:Be(E.total)})]})]},`${E.description}-${T}`)})})]})},eGe=({isOpen:e,onClose:t,lineItem:r,months:n=[],variant:a="expense",revenueTotal:i,unitCount:s})=>{if(!r)return null;const{description:l,total:c,byMonth:u={}}=r,d=n.map(k=>({month:k,value:u[k]||0})),f=d.filter(k=>k.value!==0).map(k=>k.value),p=f.length>0?f.reduce((k,E)=>k+E,0)/f.length:0,m=f.length>0?Math.max(...f):0,x=f.length>0?Math.min(...f):0,y=d.slice(0,3).reduce((k,E)=>k+E.value,0)/3,v=d.slice(-3).reduce((k,E)=>k+E.value,0)/3,b=y>0?(v-y)/y*100:0,w={revenue:{color:"text-success",bgColor:"bg-success/10",borderColor:"border-success/20"},expense:{color:"text-warning",bgColor:"bg-warning/10",borderColor:"border-warning/20"},"below-line":{color:"text-gray-300",bgColor:"bg-gray-500/10",borderColor:"border-gray-500/20"}},S=w[a]||w.expense,j=Math.max(...d.map(k=>Math.abs(k.value)),1);return o.jsx(bf,{isOpen:e,onClose:t,title:l,size:"lg",children:o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[o.jsx(xb,{label:"Total",value:Be(c),valueClass:S.color}),o.jsx(xb,{label:"Monthly Avg",value:Be(p),valueClass:"text-gray-200"}),o.jsx(xb,{label:"Trend",value:`${b>=0?"+":""}${b.toFixed(1)}%`,valueClass:b>5?"text-error":b<-5?"text-success":"text-gray-400",icon:b>5?Vp:b<-5?NV:wR,iconClass:b>5?"text-error":b<-5?"text-success":"text-gray-500"}),s>
13010&&o.jsx(xb,{label:"$/Unit (Avg)",value:Be(p/s),valueClass:"text-gray-200"})]}),o.jsxs("div",{className:`rounded-lg border ${S.borderColor} ${S.bgColor} p-4`,children:[o.jsx("h4",{className:"text-sm font-medium text-gray-400 mb-4",children:"Monthly Breakdown"}),o.jsx("div",{className:"space-y-2",children:d.map(({month:k,value:E})=>{const T=Math.abs(E)/j*100,O=E===0;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-sm text-gray-400 font-mono w-10",children:k}),o.jsxs("div",{className:"flex-1 h-6 bg-white/5 rounded overflow-hidden relative",children:[o.jsx("div",{className:`h-full transition-all duration-300 ${O?"bg-gray-700":a==="revenue"?"bg-success/60":"bg-warning/60"}`,style:{width:O?"2px":`${T}%`}}),o.jsx("span",{className:`absolute inset-y-0 right-2 flex items-center text-xs font-mono ${O?"text-gray-600":"text-white"}`,children:Be(E)})]})]},k)})})]}),o.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500 px-1",children:[o.jsxs("span",{children:["Range: ",Be(x)," - ",Be(m)]}),i>0&&o.jsxs("span",{children:["% of Revenue: ",(Math.abs(c)/i*100).toFixed(1),"%"]})]})]})})},xb=({label:e,value:t,valueClass:r="text-white",icon:n,iconClass:a})=>o.jsxs("div",{className:"bg-card/50 rounded-lg p-3 border border-white/5",children:[o.jsx("div",{className:"text-xs text-gray-500 mb-1",children:e}),o.jsxs("div",{className:`text-lg font-mono font-semibold ${r} flex items-center gap-2`,children:[n&&o.jsx(n,{className:`w-4 h-4 ${a}`}),t]})]}),tGe=({className:e=""})=>{const[t,r]=N.useState(!1),n=N.useRef(null),a=N.useRef(null),{preferences:i,togglePreference:s,resetPreferences:l}=Zte();return N.useEffect(()=>{const c=u=>{n.current&&!n.current.contains(u.target)&&a.current&&!a.current.contains(u.target)&&r(!1)};if(t)return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[t]),N.useEffect(()=>{const c=u=>{u.key==="Escape"&&r(!1)};if(t)return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t]),o.jsxs("div",{className:`relative ${e}`,children:[o.jsx("button",{ref:a,onClick:()=>r(!t),className:` 1302 p-2 rounded-lg transition-colors 1303 ${t?"bg-white/10 text-white":"text-gray-400 hover:text-white hover:bg-white/5"} 1304 `,"aria-label":"View options","aria-expanded":t,"aria-haspopup":"menu",title:"View Options",children:o.jsx(uc,{className:"h-4 w-4"})}),t&&o.jsxs("div",{ref:n,className:"absolute right-0 top-full mt-2 z-30 bg-card border border-white/10 rounded-lg shadow-xl overflow-hidden min-w-[220px]",role:"menu",children:[o.jsx("div",{className:"px-4 py-2 border-b border-white/10 bg-card/50",children:o.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Display Options"})}),o.jsxs("div",{className:"py-1",role:"group","aria-label":"Display toggles",children:[o.jsx(yb,{label:"Show % of Revenue",checked:i.showPercentOfRevenue,onChange:()=>s("showPercentOfRevenue"),description:"Display percentage relative to total revenue"}),o.jsx(yb,{label:"Show $/Unit",checked:i.showPerUnit,onChange:()=>s("showPerUnit"),description:"Display amount per unit"}),o.jsx(yb,{label:"Expand All Categories",checked:i.expandAllCategories,onChange:()=>s("expandAllCategories"),description:"Show all line items by default"}),o.jsx(yb,{label:"Show Variance (YoY)",checked:i.showVariance,onChange:()=>s("showVariance"),description:"Compare against same period last year"})]}),o.jsx("div",{className:"border-t border-white/10 p-2",children:o.jsxs("button",{onClick:()=>{l(),r(!1)},className:"w-full flex items-center justify-center gap-2 px-3 py-2 text-sm text-gray-400 hover:text-white hover:bg-white/5 rounded transition-colors",children:[o.jsx(EV,{className:"h-3.5 w-3.5"}),o.jsx("span",{children:"Reset to Defaults"})]})})]})]})},yb=({label:e,checked:t,onChange:r,description:n})=>o.jsxs("button",{onClick:r,className:"w-full flex items-center justify-between px-4 py-2 text-sm text-gray-300 hover:bg-white/5 transition-colors group",role:"menuitemcheckbox","aria-checked":t,"aria-describedby":n?`desc-${e.replace(/\s+/g,"-").toLowerCase()}`:void 0,title:n,children:[o.jsxs("div",{className:"flex flex-col items-start",children:[o.jsx("span",{children:e}),n&&o.jsx("span",{id:`desc-${e.replace(/\s+/g,"-").toLowerCase()}`,className:"text-xs text-gray-500 opacity-0 group-hover:opacity-100 transition-opacity",children:n})]}),o.jsx("div",{className:` 1305 w-4 h-4 rounded border flex items-center justify-center transition-colors flex-shrink-0 1306 ${t?"bg-accent border-accent":"border-gray-500 bg-transparent"} 1307 `,children:t&&o.jsx($n,{className:"h-3 w-3 text-primary"})})]}),rGe=(e,t="Property")=>{if(!e)return;const{period:r,revenue:n,operatingExpenses:a,noi:i,belowTheLine:s,cashFlow:l}=e,c=r.monthLabels||[],u=[],d=["",...c,"Total"];u.push(d),u.push([]),u.push(["REVENUE",...c.map(()=>
1307""),""]),n.categories.forEach(v=>{const b=[` ${v.name}`,...c.map(w=>{var S;return((S=v.byMonth)==null?void 0:S[w])||0}),v.total];u.push(b)}),u.push(["Total Revenue",...c.map(v=>{var b;return((b=n.byMonth)==null?void 0:b[v])||0}),n.total]),u.push([]),u.push(["OPERATING EXPENSES",...c.map(()=>""),""]),a.categories.forEach(v=>{const b=[` ${v.name}`,...c.map(w=>{var S;return((S=v.byMonth)==null?void 0:S[w])||0}),v.total];u.push(b)}),u.push(["Total Operating Expenses",...c.map(v=>{var b;return((b=a.byMonth)==null?void 0:b[v])||0}),a.total]),u.push([]),u.push(["NET OPERATING INCOME",...c.map(v=>{var b;return((b=i.byMonth)==null?void 0:b[v])||0}),i.total]),u.push([]),s.categories.length>0&&(u.push(["BELOW THE LINE",...c.map(()=>""),""]),s.categories.forEach(v=>{const b=[` ${v.name}`,...c.map(w=>{var S;return((S=v.byMonth)==null?void 0:S[w])||0}),v.total];u.push(b)}),u.push(["Total Below the Line",...c.map(v=>{var b;return((b=s.byMonth)==null?void 0:b[v])||0}),s.total]),u.push([]),u.push(["NET INCOME",...c.map(v=>{var b;return((b=l.byMonth)==null?void 0:b[v])||0}),l.total]));const f=Lb.aoa_to_sheet(u),p=[{wch:30}];c.forEach(()=>p.push({wch:12})),p.push({wch:14}),f["!cols"]=p;const m=Lb.book_new();Lb.book_append_sheet(m,f,"Operating Statement");const x=r.start&&r.end?`${r.start.slice(0,7)}_to_${r.end.slice(0,7)}`:`${r.months}mo`,y=`${t.replace(/[^a-zA-Z0-9]/g,"_")}_Operating_Statement_${x}.xlsx`;swe(m,y)},nGe=(e,t="Property")=>{if(!e)return;const{period:r,revenue:n,operatingExpenses:a,noi:i,belowTheLine:s,cashFlow:l}=e,c=r.monthLabels||[],u=["Section","Category","Description",...c,"Total"],d=[],f=(y,v)=>{v.forEach(b=>{d.push([y,b.name,"",...c.map(w=>{var S;return((S=b.byMonth)==null?void 0:S[w])||0}),b.total]),b.lineItems&&b.lineItems.length>0&&b.lineItems.forEach(w=>{d.push([y,b.name,w.description,...c.map(S=>{var j;return((j=w.byMonth)==null?void 0:j[S])||0}),w.total])})})};f("Revenue",n.categories),d.push(["Revenue","TOTAL","",...c.map(y=>{var v;return((v=n.byMonth)==null?void 0:v[y])||0}),n.total]),f("Operating Expenses",a.categories),d.push(["Operating Expenses","TOTAL","",...c.map(y=>{var v;return((v=a.byMonth)==null?void 0:v[y])||0}),a.total]),d.push(["NOI","","",...c.map(y=>{var v;return((v=i.byMonth)==null?void 0:v[y])||0}),i.total]),s.categories.length>0&&(f("Below the Line",s.categories),d.push(["Below the Line","TOTAL","",...c.map(y=>{var v;return((v=s.byMonth)==null?void 0:v[y])||0}),s.total]),d.push(["Net Income","","",...c.map(y=>{var v;return((v=l.byMonth)==null?void 0:v[y])||0}),l.total]));const p=SX(u,d),m=r.start&&r.end?`${r.start.slice(0,7)}_to_${r.end.slice(0,7)}`:`${r.months}mo`,x=`${t.replace(/[^a-zA-Z0-9]/g,"_")}_Operating_Statement_${m}.csv`;EX(x,p)},aGe=({rawData:e,printMode:t=!1,unitCount:r})=>{var M,L,U,W;const{loading:n,error:a,statement:i}=JVe(e),{preferences:s}=Zte(),[l,c]=N.useState(!1),[u,d]=N.useState(null),{loading:f,error:p,hasPriorData:m,getVarianceForCategory:x,getVarianceForLineItem:y}=ZVe(e,s.showVariance),v=r||((M=e==null?void 0:e.property)==null?void 0:M.unit_count)||((L=e==null?void 0:e.metadata)==null?void 0:L.unitCount)||0,b=((U=e==null?void 0:e.property)==null?void 0:U.name)||((W=e==null?void 0:e.metadata)==null?void 0:W.propertyName)||"Property",w=()=>{try{rGe(i,b)}catch(V){console.error("[OperatingStatement] Excel export failed:",V)}c(!1)},S=()=>{try{nGe(i,b)}catch(V){console.error("[OperatingStatement] CSV export failed:",V)}c(!1)},j=(V,G)=>{d({...V,variant:G})};if(n)return o.jsx("div",{className:"glass-card p-6",children:o.jsxs("div",{className:"flex items-center justify-center py-12",children:[o.jsx(ar,{className:"h-6 w-6 animate-spin text-accent mr-3"}),o.jsx("span",{className:"text-gray-300 text-sm",children:"Loading statement..."})]})});if(a)return o.jsx("div",{className:"glass-card p-6 border-l-4 border-error",children:o.jsxs("div",{className:"text-center py-8",children:[o.jsx(Sn,{className:"h-10 w-10 text-error mx-auto mb-3"}),o.jsx("h3",{className:"text-base font-medium text-white mb-1",children:"Error Loading Statement"}),o.jsx("p",{className:"text-sm text-gray-400",children:a})]})});if(!i)return o.jsx("div",{className:"glass-card p-6 border-l-4 border-warning",children:o.jsxs("div",{className:"text-center py-8",children:[o.jsx(Sn,{className:"h-10 w-10 text-warning mx-auto mb-3"}),o.jsx("h3",{className:"text-base font-medium text-white mb-1",children:"No Statement Data"}),o.jsx("p",{className:"text-sm text-gray-400",children:"Upload P&L statements to view the operating statement."})]})});const{period:k,revenue:E,operatingExpenses:T,noi:O,belowTheLine:A,cashFlow:P}=i,I=k.start&&k.end?`${Ct(k.start,"short")}
1307 - ${Ct(k.end,"short")}`:`${k.months} Months`,R={revenueTotal:E.total,unitCount:v,showPercentOfRevenue:s.showPercentOfRevenue,showPerUnit:s.showPerUnit&&v>0,showVariance:s.showVariance&&!f&&m,getVarianceForLineItem:s.showVariance&&m?y:null,defaultExpanded:t||s.expandAllCategories,onLineItemClick:j};return o.jsxs("div",{className:"glass-card",children:[o.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-white/10",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Sn,{className:"h-5 w-5 text-accent"}),o.jsx("h3",{className:"text-lg font-semibold text-white",children:"Operating Statement"}),o.jsx("span",{className:"text-sm text-gray-500 font-mono",children:I})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[!t&&o.jsx(tGe,{}),!t&&o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>c(!l),className:"flex items-center gap-1 px-3 py-1.5 text-sm text-gray-400 hover:text-white transition-colors rounded hover:bg-white/5","aria-haspopup":"menu","aria-expanded":l,children:[o.jsx(vc,{className:"h-4 w-4"}),o.jsx("span",{children:"Export"}),o.jsx(kr,{className:`h-3 w-3 transition-transform ${l?"rotate-180":""}`})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>c(!1)}),o.jsxs("div",{className:"absolute right-0 top-full mt-1 z-20 bg-card border border-white/10 rounded-lg shadow-lg overflow-hidden min-w-[120px]",children:[o.jsx("button",{onClick:w,className:"w-full px-4 py-2 text-sm text-left text-gray-300 hover:bg-white/5 hover:text-white transition-colors",children:"Excel (.xlsx)"}),o.jsx("button",{onClick:S,className:"w-full px-4 py-2 text-sm text-left text-gray-300 hover:bg-white/5 hover:text-white transition-colors",children:"CSV (.csv)"})]})]})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between py-2 px-4 border-b border-white/10 bg-card/30",children:[o.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider font-medium",children:"Category"}),o.jsxs("div",{className:"flex items-center gap-6 text-right",children:[s.showPercentOfRevenue&&o.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider w-16",children:"% Rev"}),s.showPerUnit&&v>0&&o.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider w-20",children:"$/Unit"}),s.showVariance&&o.jsx("span",{className:`text-xs uppercase tracking-wider w-24 ${p?"text-error":!m&&!f?"text-gray-600":"text-gray-500"}`,title:p||(!m&&!f?"No prior year data available":"Year-over-Year variance"),children:f?"Loading...":p?"Error":m?"Var YoY":"No Prior"}),o.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider w-28",children:"Total"})]})]}),o.jsxs("div",{className:"divide-y divide-white/5",children:[o.jsxs("section",{children:[o.jsx(FA,{label:RA.revenue.displayName}),E.categories.map((V,G)=>o.jsx(IA,{name:V.name,total:V.total,lineItems:V.lineItems,variant:"revenue",variance:s.showVariance&&m?x(V.name,V.total):null,...R},V.category||V.name||G)),o.jsx(MA,{label:"Total Revenue",total:E.total,variant:"revenue",unitCount:v,showPerUnit:s.showPerUnit&&v>0})]}),o.jsxs("section",{className:"pt-2",children:[o.jsx(FA,{label:RA.operatingExpenses.displayName}),T.categories.map((V,G)=>o.jsx(IA,{name:V.name,total:V.total,lineItems:V.lineItems,variant:"expense",variance:s.showVariance&&m?x(V.name,V.total):null,...R},V.category||V.name||G)),o.jsx(MA,{label:"Total Operating Expenses",total:T.total,variant:"expense",revenueTotal:E.total,unitCount:v,showPercentOfRevenue:s.showPercentOfRevenue,showPerUnit:s.showPerUnit&&v>0})]}),o.jsx(dq,{label:gb.noi.label,total:O.total,description:gb.noi.description,variant:"highlight",revenueTotal:E.total,unitCount:v,showPercentOfRevenue:s.showPercentOfRevenue,showPerUnit:s.showPerUnit&&v>0}),A.categories.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("section",{className:"pt-2",children:[o.jsx(FA,{label:RA.belowTheLine.displayName}),A.categories.map((V,G)=>o.jsx(IA,{name:V.name,total:V.total,lineItems:V.lineItems,variant:"below-line",variance:s.showVariance&&m?x(V.name,V.total):null,...R},V.category||V.name||G)),o.jsx(MA,{label:"Total Below the Line",total:A.total,variant:"below-line",revenueTotal:E.total,unitCount:v,showPercentOfRevenue:s.showPercentOfRevenue,showPerUnit:s.showPerUnit&&v>0})]}),o.jsx(dq,{label:gb.netIncome.label,total:P.total,description:gb.netIncome.description,variant:"highlight-final",revenueTotal:E.total,unitCount:v,showPercentOfRevenue:s.showPercentOfRevenue,showPerUnit:s.showPerUnit&&v>0})]})]}),o.jsx(eGe,{isOpen:!!u,onClose:()=>d(null),lineItem:u,months:k.monthLabels||[],variant:(u==null?void 0:u.variant)||"expense",revenueTotal:E.total,unitCount:v})]})},FA=({label:e})=>o.jsx("div",{className:"px-4 py-2 bg-card/20",children:o.jsx("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:e})}),MA=({label:e,total:t,variant:r,revenueTotal:n,unitCount:a,showPercentOfRevenue:i=!1,showPerUnit:s=!1})=>{const l=r==="revenue"?"text-success":r==="expense"?"text-warning":"text-gray-300",c=i&&n>0?(Math.abs(t)/n*100).toFixed(1):null,u=s&&a>0?Math.abs(t)/a:null;return o.jsxs("div",{className:"flex items-center justify-between py-3 px-4 border-t border-white/10 bg-card/30",children:[o.jsx("span",{className:"text-white font-medium",children:e}),o.jsxs("div",{className:"flex items-center gap-6 text-right",children:[c!==null&&o.jsxs("span",{className:"text-gray-400 text-sm font-mono w-16",children:[c,"%"]}),u!==null&&o.jsxs("span",{className:"text-gray-400 text-sm font-mono w-20",children:[Be(u),"/u"]}),o.jsx("span",{className:`font-mono font-semibold w-28 ${l}`,children:Be(t)})]})]})},dq=({label:e,total:t,description:r,variant:n,revenueTotal:a,unitCount:i,showPercentOfRevenue:s=!1,showPerUnit:l=!1})=>{const u=t>=0?"text-success":"text-error",d=n==="highlight-final"?"bg-card/50":"bg-card/30",f=s&&a>0?(Math.abs(t)/a*100).toFixed(1):null,p=l&&i>0?Math.abs(t)/i:null;return o.jsxs("div",{className:`flex items-center justify-between py-4 px-4 ${d}`,children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-white font-bold",children:e}),r&&o.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:r})]}),o.jsxs("div",{className:"flex items-center gap-6 text-right",children:[f!==null&&o.jsxs("span",{className:`text-sm font-mono w-16 ${u}`,children:[f,"%"]}),p!==null&&o.jsxs("span",{className:`text-sm font-mono w-20 ${u}`,children:[Be(p),"/u"]}),o.jsx("span",{className:`font-mono font-bold text-lg w-28 ${u}`,children:Be(t)})]})]})},iGe=({reportData:e,parsedReport:t,rawData:r,printMode:n=!1,showOnlyKPIs:a=!1,showOnlyRevenueBreakdown:i=!1,showOnlyExpenseBreakdown:s=!1,showExpenseSubcategories:l=!1,showOnlyTrendChart:c=!1,showOnlyMetricsTrend:u=!1,showOnlyUtilitiesTrend:d=!1,specificSubcategory:f=null,periodSelector:p=null})=>{var M,L,U,W;const[m,x]=N.useState("summary"),[y,v]=N.useState(!1),[b,w]=N.useState(null),[S,j]=N.useState(()=>{const V=sessionStorage.getItem("financialChartsBreakdownMode");return V&&["charts","statement"].includes(V)?V:"charts"});N.useEffect(()=>{sessionStorage.setItem("financialChartsView",m)},[m]),N.useEffect(()=>{sessionStorage.setItem("financialChartsBreakdownMode",S)},[S]);const{loading:k,error:E,kpiMetrics:T,monthlyTrends:O,categoryBreakdown:A,utilitiesTrends:P,comparisonData:I,expenseTrends:R}=_Q(r);return E?o.jsx("div",{className:"glass-card p-6 border-l-4 border-error",children:o.jsxs("div",{className:"text-center",children:[o.jsx(bl,{className:"h-12 w-12 text-error mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-medium text-white mb-2 font-sans",children:"Error Loading Financial Data"}),o.jsx("p",{className:"text-sm text-gray-300 font-sans",children:E})]})}):k&&!d?o.jsx("div",{className:"glass-card p-6",children:o.jsxs("div",{className:"flex items-center justify-center",children:[o.jsx(ar,{className:"h-8 w-8 animate-spin text-muted mr-3"}),o.jsx("span",{className:"text-gray-300",children:"Loading financial data..."})]})}):!k&&(!T||O.length===0)&&!d?o.jsx("div",{className:"glass-card p-6 border-l-4 border-warning",children:o.jsxs("div",{className:"text-center",children:[o.jsx(bl,{className:"h-12 w-12 text-warning mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-medium text-white mb-2 font-sans",children:"No Financial Data Available"}),o.jsx("p",{className:"text-sm text-gray-300 font-sans",children:"Upload P&L statements to see financial visualizations."})]})}):a?o.jsx(i8,{kpiMetrics:T,comparisonData:I,printMode:n}
1307):i?o.jsx(lq,{categoryBreakdown:A,printMode:n,loading:k}):s?o.jsx(OP,{categoryBreakdown:A,printMode:n,loading:k}):l?o.jsx(cq,{categoryBreakdown:A,specificSubcategory:f,showExpenseSubcategories:l,printMode:n,loading:k}):u?o.jsx(Fs,{preset:"noi-metrics",data:O,printMode:n,loading:k}):d?o.jsx(Fs,{preset:"utilities",data:P.data,dataKeys:"dynamic",printMode:n,loading:k}):c?o.jsxs("div",{className:"glass-card p-6",children:[o.jsx("h3",{className:"text-lg font-semibold text-white mb-4 font-sans",children:"Financial Trends"}),o.jsx(Fs,{preset:"noi-metrics",data:O,printMode:n,loading:k})]}):o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{children:o.jsx(i8,{kpiMetrics:T,comparisonData:I,printMode:n})}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{"data-tour":"financial-view-summary",onClick:()=>x("summary"),className:`px-4 py-2 rounded-lg font-medium transition-all ${m==="summary"?"bg-primary text-white shadow-glow":"bg-card/50 text-gray-300 hover:bg-card/70"}`,children:"Summary"}),o.jsx("button",{onClick:()=>x("trends"),"data-tour":"financial-view-trends",className:`px-4 py-2 rounded-lg font-medium transition-all ${m==="trends"?"bg-primary text-white shadow-glow":"bg-card/50 text-gray-300 hover:bg-card/70"}`,children:"Trends"}),o.jsx("button",{onClick:()=>x("breakdown"),"data-tour":"financial-view-breakdown",className:`px-4 py-2 rounded-lg font-medium transition-all ${m==="breakdown"?"bg-primary text-white shadow-glow":"bg-card/50 text-gray-300 hover:bg-card/70"}`,children:"Breakdown"})]}),p]}),m==="summary"&&o.jsx(XVe,{categoryBreakdown:A,monthlyTrends:O,printMode:n,loading:k}),m==="trends"&&o.jsxs("div",{className:"glass-card p-6",children:[o.jsx(Fs,{preset:"noi-metrics",data:O,printMode:n,loading:k}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(Fs,{preset:"dscr-revenue",data:O,printMode:n,loading:k}),!y&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsxs("button",{onClick:()=>v(!0),className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto",children:[o.jsx(kr,{className:"w-4 h-4"}),"Show 6 more trend charts"]})]}),y&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(Fs,{preset:"average-rent",title:"Average Rent & Occupancy Trends",data:O,printMode:n,loading:k}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(Fs,{preset:"utilities",data:P.data,dataKeys:"dynamic",printMode:n,loading:k}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(Fs,{preset:"expense-category",title:"Repair & Maintenance Trend",data:((M=R==null?void 0:R.repairMaintenance)==null?void 0:M.metrics)||[],dataKeys:"dynamic",printMode:n,loading:k}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(Fs,{preset:"expense-category",title:"General & Admin Trend",data:((L=R==null?void 0:R.generalAdmin)==null?void 0:L.metrics)||[],dataKeys:"dynamic",printMode:n,loading:k}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(Fs,{preset:"expense-category",title:"Marketing Trend",data:((U=R==null?void 0:R.marketing)==null?void 0:U.metrics)||[],dataKeys:"dynamic",printMode:n,loading:k}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsx(Fs,{preset:"expense-category",title:"Contract Services Trend",data:((W=R==null?void 0:R.contractServices)==null?void 0:W.metrics)||[],dataKeys:"dynamic",printMode:n,loading:k}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsxs("button",{onClick:()=>v(!1),className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mx-auto",children:[o.jsx(eo,{className:"w-4 h-4"}),"Show less"]})]})]}),m==="breakdown"&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex gap-1",children:[o.jsx("button",{onClick:()=>j("charts"),className:`px-3 py-1.5 text-sm rounded transition-all ${S==="charts"?"bg-white/10 text-white font-medium":"text-gray-400 hover:text-gray-300"}`,children:"Charts"}),o.jsx("button",{onClick:()=>j("statement"),className:`px-3 py-1.5 text-sm rounded transition-all ${S==="statement"?"bg-white/10 text-white font-medium":"text-gray-400 hover:text-gray-300"}`,children:"Statement"})]}),S==="charts"&&o.jsxs("div",{className:"glass-card p-6",children:[o.jsx(lq,{c
1307ategoryBreakdown:A,printMode:n,loading:k,noWrapper:!0}),o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsxs("div",{children:[o.jsx(OP,{categoryBreakdown:A,printMode:n,loading:k,onCategoryClick:V=>w(V),noWrapper:!0}),!b&&o.jsx("p",{className:"text-xs text-gray-500 text-center mt-2",children:"Click a category to see detailed breakdown"})]}),b&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t border-white/10 my-6"}),o.jsxs("button",{onClick:()=>w(null),className:"flex items-center gap-1 text-sm text-accent-light hover:text-accent transition-colors mb-4",children:[o.jsx(vR,{className:"w-4 h-4"}),"Back to overview"]}),o.jsx(cq,{categoryBreakdown:A,specificSubcategory:b,showExpenseSubcategories:!0,printMode:n,loading:k})]})]}),S==="statement"&&o.jsx(aGe,{rawData:r,printMode:n})]})]})},ere=({property:e,rawData:t,dateRange:r,onDateRangeChange:n,onFetchData:a,isLoading:i,error:s})=>{const{startTour:l}=Lu();N.useEffect(()=>{const f=setTimeout(()=>l(Fi.FINANCIAL_TAB),500);return()=>clearTimeout(f)},[l]);const c=(f,p)=>{f!=="custom"&&p&&a&&a(p)},u=o.jsx("button",{"data-tour":"financial-fetch-data",onClick:()=>a==null?void 0:a(r),disabled:i||!(r!=null&&r.start)||!(r!=null&&r.end),className:` 1308 px-5 py-2.5 rounded-lg font-medium text-sm transition-all duration-200 1309 ${!i&&(r!=null&&r.start)&&(r!=null&&r.end)?"bg-[#8B5CF6] hover:bg-[#7C3AED] text-white shadow-lg shadow-purple-500/20":"bg-gray-700 text-gray-400 cursor-not-allowed"} 1310 `,children:i?"Fetching...":"Fetch Data"}),d=o.jsxs("div",{className:"flex items-center gap-3",children:[u,o.jsx(D4,{value:r,onChange:n,onPresetSelect:c,disabled:i})]});return o.jsxs("div",{className:"p-6","data-tour":"financial-overview",children:[!t&&!i&&o.jsx("div",{className:"flex items-center justify-end mb-6",children:d}),o.jsx(z4,{loading:i,error:s,empty:!t,emptyProps:{icon:yR,message:"No Financial Data",description:"Select a period and click Fetch Data to load financial metrics."},loadingMessage:"Loading financial data...",errorTitle:"Unable to Load Financial Data",children:o.jsx(iGe,{rawData:t,periodSelector:d})})]})},Lt=wQ,sGe=({rentRolls:e,selectedId:t,onSelect:r,onClose:n,triggerRef:a})=>{const i=N.useRef(null),s=N.useRef(n),[l,c]=N.useState({top:0,left:0}),[u,d]=N.useState(new Set);s.current=n;const f=e.reduce((b,w)=>{const S=Jn(w.start_date).getFullYear();return b[S]||(b[S]=[]),b[S].push(w),b},{}),p=Object.keys(f).map(Number).sort((b,w)=>w-b);N.useEffect(()=>{if(t){const b=e.find(w=>Number(w.id)===Number(t));if(b){const w=Jn(b.start_date).getFullYear();d(S=>new Set([...S,w]))}}p.length>0&&d(b=>new Set([...b,p[0]]))},[t,e,p.length]);const m=N.useCallback(()=>{const b=a==null?void 0:a.current;if(!b)return;const w=b.getBoundingClientRect(),S=220,j=320,k=4;let E=w.bottom+k,T=w.left;if(T+S>window.innerWidth&&(T=w.right-S),T<8&&(T=8),E+j>window.innerHeight){const O=w.top-k,A=window.innerHeight-w.bottom-k;O>A&&(E=w.top-k-Math.min(j,O))}c({top:E,left:T})},[a]);N.useEffect(()=>{const b=requestAnimationFrame(()=>m());return window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{cancelAnimationFrame(b),window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}},[m]),N.useEffect(()=>{const b=w=>{const S=a==null?void 0:a.current;i.current&&!i.current.contains(w.target)&&S&&!S.contains(w.target)&&s.current()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[a]),N.useEffect(()=>{const b=w=>{w.key==="Escape"&&(w.preventDefault(),s.current())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[]),N.useEffect(()=>{var b;(b=i.current)==null||b.focus()},[]);const x=b=>{d(w=>{const S=new Set(w);return S.has(b)?S.delete(b):S.add(b),S})},y=b=>{r(b),n()},v=o.jsxs("div",{ref:i,tabIndex:-1,role:"listbox","aria-label":"Select rent roll report",className:"fixed z-50 w-56 bg-gray-900 border border-white/20 rounded-lg shadow-2xl overflow-hidden",style:{top:l.top,left:l.left,maxHeight:"320px"},children:[o.jsxs("div",{className:"px-3 py-2 bg-gray-800/50 border-b border-white/10",children:[o.jsx("p",{className:"text-xs font-medium text-gray-300",children:"All Reports"}),o.jsxs("p",{className:"text-[10px] text-gray-500",children:[e.length," rent rolls available"]})]}),o.jsx("div",{className:"overflow-y-auto max-h-[260px]",children:p.map(b=>{const w=f[b],S=u.has(b),j=w.some(k=>
1310Number(k.id)===Number(t));return o.jsxs("div",{className:"border-b border-white/5 last:border-b-0",children:[o.jsxs("button",{onClick:()=>x(b),className:` 1311 w-full flex items-center justify-between px-3 py-2 text-left 1312 hover:bg-white/5 transition-colors duration-150 1313 ${j?"text-accent-light":"text-gray-300"} 1314 `,"aria-expanded":S,children:[o.jsxs("span",{className:"text-sm font-medium",children:[b,o.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",w.length,")"]})]}),o.jsx(yl,{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${S?"rotate-90":""}`})]}),S&&o.jsx("div",{className:"pb-1",children:w.map(k=>{const E=Number(k.id)===Number(t);return o.jsxs("button",{onClick:()=>y(k.id),role:"option","aria-selected":E,className:` 1315 w-full flex items-center justify-between px-4 py-1.5 text-left text-sm 1316 transition-colors duration-150 1317 ${E?"bg-accent/20 text-accent-light":"text-gray-400 hover:bg-white/5 hover:text-white"} 1318 `,children:[o.jsx("span",{children:Ct(k.start_date,"short")}),E&&o.jsx($n,{className:"w-3.5 h-3.5"})]},k.id)})})]},b)})})]});return Ld.createPortal(v,document.body)},fq=3,oGe=({rentRolls:e,selectedId:t,onSelect:r,disabled:n=!1})=>{const[a,i]=N.useState(!1),s=N.useRef(null);if(!e||e.length<=1)return null;const l=e.slice(0,fq),c=e.length>fq,d=l.some(m=>Number(m.id)===Number(t))?null:e.find(m=>Number(m.id)===Number(t)),f=()=>{n||i(m=>!m)},p=m=>{r(m),i(!1)};return o.jsxs("div",{className:"flex items-center gap-3 mb-4",role:"group","aria-label":"Rent roll selector",children:[o.jsx("span",{className:"text-sm text-gray-400 font-sans",id:"rent-roll-label",children:"Viewing:"}),o.jsxs("div",{className:"flex gap-1 bg-card/50 rounded-lg p-1 border border-white/10",role:"tablist","aria-labelledby":"rent-roll-label",children:[l.map(m=>{const x=Number(t)===Number(m.id),y=Ct(m.start_date,"short");return o.jsx("button",{onClick:()=>p(m.id),disabled:n,role:"tab","aria-selected":x,"aria-label":`Rent roll from ${y}`,className:` 1319 px-3 py-1.5 text-sm font-medium rounded-md transition-all duration-200 font-sans 1320 ${x?"bg-primary text-white shadow-glow":"text-gray-400 hover:text-white hover:bg-white/5"} 1321 ${n?"opacity-50 cursor-not-allowed":"cursor-pointer"} 1322 `,children:y},m.id)}),d&&o.jsx("button",{disabled:!0,role:"tab","aria-selected":!0,className:"px-3 py-1.5 text-sm font-medium rounded-md bg-primary text-white shadow-glow font-sans",children:Ct(d.start_date,"short")}),c&&o.jsxs("button",{ref:s,onClick:f,disabled:n,"aria-haspopup":"listbox","aria-expanded":a,"aria-label":`Show all ${e.length} rent rolls`,className:` 1323 flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md transition-all duration-200 font-sans 1324 ${a?"bg-white/10 text-white":"text-gray-400 hover:text-white hover:bg-white/5"} 1325 ${n?"opacity-50 cursor-not-allowed":"cursor-pointer"} 1326 `,children:["All",o.jsx(kr,{className:`w-3.5 h-3.5 transition-transform duration-200 ${a?"rotate-180":""}`})]})]}),a&&o.jsx(sGe,{rentRolls:e,selectedId:t,onSelect:p,onClose:()=>i(!1),triggerRef:s})]})},lGe=({isOpen:e,onClose:t,unit:r,history:n=[],loading:a=!1,error:i=null})=>{if(!r)return null;const s=n.length,l=n[0]||{},c=l.monthlyRent||0,u=l.tenantName||"Vacant",d=n.reduce((f,p,m)=>{if(m===0)return 0;const x=n[m-1];return p.tenantName!==x.tenantName?f+1:f},0);return o.jsx(bf,{isOpen:e,onClose:t,title:`Unit ${r.id} - History`,size:"lg",children:a?o.jsx("div",{className:"space-y-4",children:o.jsxs("div",{className:"animate-pulse",children:[o.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[...Array(4)].map((f,p)=>o.jsx("div",{className:"bg-card/50 rounded-lg p-3 h-20 border border-white/5"},p))}),o.jsx("div",{className:"rounded-lg border border-white/10 bg-card/30 h-96"})]})}):i?o.jsxs("div",{className:"text-center py-8",children:[o.jsx("div",{className:"text-error mb-2",children:"Error loading unit history"}),o.jsx("p",{className:"text-gray-400 text-sm",children:i})]}):n.length===0?o.jsxs("div",{className:"text-center py-8",children:[o.jsx(Ru,{className:"w-12 h-12 text-gray-600 mx-auto mb-3"}),o.jsx("p",{className:"text-gray-400",children:"No historical data available for this unit"})]}):o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[o.jsx(vb,{label:"Snapshots",value:s}),o.jsx(vb,{label:"Current Tenant",value:u,valueClass:"text-gray-200"}),o.jsx(vb,{label:"Tenant Changes",value:d}),o.jsx(vb,{label:"Current Rent",value:Be(c)})]}),o.jsx("div",{className:"rounded-lg border border-white/10 bg-card/30 overflow-hidden",children:o.jsx("div",{className:"max-h-96 overflow-y-auto",children:o.jsxs("table",{className:"w-full text-sm",role:"table","aria-label":"Unit history snapshots",children:[o.jsx("thead",{className:"sticky top-0 bg-card/90 backdrop-blur-sm z-10",children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{scope:"col",className:"text-left px-4 py-2 text-gray-400 font-medium",children:"Date"}),o.jsx("th",{scope:"col",className:"text-left px-4 py-2 text-gray-400 font-medium",children:"Status"}),o.jsx("th",{scope:"col",className:"text-left px-4 py-2 text-gray-400 font-medium",children:"Tenant"}),o.jsx("th",{scope:"col",className:"text-right px-4 py-2 text-gray-400 font-medium",children:"Rent"}),o.jsx("th",{scope:"col",className:"text-right px-4 py-2 text-gray-400 font-medium",children:"Market"}),o.jsx("th",{scope:"col",className:"text-right px-4 py-2 text-gray-400 font-medium",children:"Premium"}),o.jsx("th",{scope:"col",className:"text-left px-4 py-2 text-gray-400 font-medium",children:"Lease Period"})]})}),o.jsx("tbody",{children:n.map((f,p)=>{const m=n[p+1],x=m&&f.tenantName!==m.tenantName,y=m&&f.monthlyRent!==m.monthlyRent,v=y&&f.monthlyRent>m.monthlyRent;return o.jsxs("tr",{className:` 1327 border-b border-white/5 1328 ${x?"bg-accent/10 border-l-2 border-l-accent":""} 1329 ${y&&!x?v?"bg-success/5":"bg-warning/5":""} 1330 `,children:[o.jsx("td",{className:"px-4 py-3 text-gray-200 font-mono",children:Ct(f.reportDate,"
1330short")}),o.jsx("td",{className:"px-4 py-3",children:o.jsx(cGe,{status:f.leaseStatus})}),o.jsxs("td",{className:"px-4 py-3 text-gray-300",children:[x&&o.jsx(Gp,{className:"w-3 h-3 inline mr-1 text-accent"}),f.tenantName||"â"]}),o.jsxs("td",{className:"px-4 py-3 text-right font-mono text-gray-200",children:[y&&(v?o.jsx(Vp,{className:"w-3 h-3 inline mr-1 text-success"}):o.jsx(NV,{className:"w-3 h-3 inline mr-1 text-warning"})),Be(f.monthlyRent)]}),o.jsx("td",{className:"px-4 py-3 text-right font-mono text-gray-400",children:Be(f.marketRent)}),o.jsxs("td",{className:"px-4 py-3 text-right font-mono text-gray-400",children:[f.monthlyRent-f.marketRent>=0?"+":"",Be(f.monthlyRent-f.marketRent)]}),o.jsx("td",{className:"px-4 py-3 text-gray-400 text-xs",children:f.leaseStart&&f.leaseEnd?`${Ct(f.leaseStart,"short")} - ${Ct(f.leaseEnd,"short")}`:"â"})]},f.reportId)})})]})})}),n.length===1&&o.jsx("p",{className:"text-center text-gray-500 text-sm",children:"This is the only recorded snapshot for this unit."})]})})},vb=({label:e,value:t,valueClass:r="text-white"})=>o.jsxs("div",{className:"bg-card/50 rounded-lg p-3 border border-white/5",children:[o.jsx("div",{className:"text-xs text-gray-500 mb-1",children:e}),o.jsx("div",{className:`text-lg font-mono font-semibold ${r} truncate`,children:t})]}),cGe=({status:e})=>{const t={Active:{bg:"bg-success/20",text:"text-success"},Vacant:{bg:"bg-gray-500/20",text:"text-gray-400"},Notice:{bg:"bg-warning/20",text:"text-warning"},"Expiring Soon":{bg:"bg-error/20",text:"text-error"},"Month-to-Month":{bg:"bg-accent/20",text:"text-accent"}},r=t[e]||t.Active;return o.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${r.bg} ${r.text}`,children:e||"Unknown"})},p3=({stats:e,renewalRisk:t,noWrapper:r=!1})=>{const n=[];(t==null?void 0:t.expiringUnits)>0&&n.push({id:"expiring",icon:_u,verb:"Lease",count:t.expiringUnits,unit:"expiring unit",amount:t.atRiskRevenue,suffix:"/mo at risk",color:"text-amber-400"}),(e==null?void 0:e.delinquentUnits)>0&&n.push({id:"delinquent",icon:bl,verb:"Collect",count:e.delinquentUnits,unit:"delinquent resident",amount:e.totalDelinquency,suffix:" owed",color:"text-red-400"}),(e==null?void 0:e.vacantUnits)>0&&n.push({id:"vacant",icon:Ru,verb:"Fill",count:e.vacantUnits,unit:"vacant unit",amount:e.vacantUnitsLoss,suffix:"/mo lost",color:"text-amber-400"}),n.sort((s,l)=>l.amount-s.amount);const a=n.slice(0,3);if(a.length===0)return null;const i=r?"p-4":"bg-gray-900/80 border border-white/10 rounded-lg p-4 mb-6";return o.jsxs("div",{className:i,role:"region","aria-label":"Priority action items",children:[o.jsx("h3",{id:"action-items-heading",className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:"Action Items"}),o.jsx("ol",{className:"space-y-2",role:"list","aria-labelledby":"action-items-heading",children:a.map((s,l)=>{const c=s.icon,u=s.count===1?s.unit:`${s.unit}s`,d=`Priority ${l+1}: ${s.verb} ${s.count} ${u}, ${Be(s.amount)}${s.suffix}`;return o.jsxs("li",{className:"flex items-center gap-2 text-sm",role:"listitem","aria-label":d,children:[o.jsxs("span",{className:"text-gray-500 w-4 tabular-nums","aria-hidden":"true",children:[l+1,"."]}),o.jsx(c,{className:`w-4 h-4 flex-shrink-0 ${s.color}`,"aria-hidden":"true"}),o.jsxs("span",{className:"text-gray-300",children:[o.jsx("span",{className:"font-medium",children:s.verb})," ",s.count," ",u," â"," ",o.jsx("span",{className:"text-accent-light tabular-nums",children:Be(s.amount)}),o.jsx("span",{className:"text-gray-500",children:s.suffix})]})]},s.id)})})]})};p3.propTypes={stats:Q.shape({vacantUnits:Q.number,vacantUnitsLoss:Q.number,delinquentUnits:Q.number,totalDelinquency:Q.number}),renewalRisk:Q.shape({expiringUnits:Q.number,atRiskRevenue:Q.number}),noWrapper:Q.bool};p3.defaultProps={stats:null,renewalRisk:null,noWrapper:!1};const m3=({delinquency:e})=>{const[t,r]=N.useState(!1),n=3;if(!e||e.delinquentUnits===0)return null;const{totalDelinquency:a,delinquentUnits:i,byUnit:s}=e,l=N.useMemo(()=>!s||s.length===0?[]:[...s].sort((f,p)=>p.percentOfRent-f.percentOfRent),[s]),c=t?l:l.slice(0,n),u=l.length-n,d=f=>{const p={high:"bg-red-500/20 text-red-400",medium:"bg-amber-500/20 text-amber-400",low:"bg-gray-500/20 text-gray-400"};return p[f]||p.low};return o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-baseline gap-2 mb-3",children:[o.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Delinquencies"}),o.jsxs("span",{className:"text-xs text-gray-500",children:[i," unit",i!==1?"s":""," ·"," ",Be(a)," total"]})]}),o.jsxs("table",{className:"w-full text-sm table-fixed",role:"table","aria-label":"Delinquent units summary",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{scope:"col",className:"w-[12%] text-left px-4 py-2 text-gray-400 font-medium",children:"Unit"}),o.jsx("th",{scope:"col",className:"w-[28%] text-left px-4 py-2 text-gray-400 font-medium",children:"Tenant"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Balance"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"% of Rent"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Priority"})]})}),o.jsx("tbody",{children:c.map(f=>o.jsxs("tr",{className:"border-b border-white/5",children:[o.jsx("td",{className:"px-4 py-3 text-gray-200",children:f.unitNumber}),o.jsx("td",{className:"px-4 py-3 text-gray-400",children:f.tenantName}),o.jsx("td",{className:"px-4 py-3 text-right text-error tabular-nums",children:Be(f.amount)}),o.jsx("td",{className:"px-4 py-3 text-right text-gray-400 tabular-nums",children:pr(f.percentOfRent)}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-medium rounded-full capitalize ${d(f.priority)}`,role:"status","aria-label":`${f.priority} priority`,children:f.priority})})]},f.unitNumber))})]}),u>0&&o.jsx(rt,{variant:"link",size:"sm",onClick:()=>r(!t),icon:kr,iconPosition:"left",className:`mt-3 ${t?"[&_svg]:rotate-180":""}`,children:t?"Show less":`Show ${u} more delinquent unit${u!==1?"s":""}`})]})};m3.propTypes={delinquency:Q.shape({totalDelinquency:Q.number,delinquentUnits:Q.number,byUnit:Q.arrayOf(Q.shape({unitNumber:Q.string,tenantName:Q.string,amount:Q.number,monthlyRent:Q.number,percentOfRent:Q.number,priority:Q.oneOf(["high","medium","low"])}))})};m3.defaultProps={delinquency:null};const g3=({vacancy:e})=>{const[t,r]=N.useState(!1),n=3;if(!e||e.vacantUnits===0)return null;const{vacantUnits:a,totalLostRevenue:i,byUnit:s}=e,l=t?s:s.slice(0,n),c=s.length-n,u=f=>{const p={high:"bg-red-500/20 text-red-400",medium:"bg-amber-500/20 text-amber-400",low:"bg-gray-500/20 text-gray-400",unknown:"bg-white/10 text-gray-300"};return p[f]||p.low},d=f=>f.precision==="unknown"||f.daysVacant===null?"Unknown":f.precision==="approximate"?`⥠${f.daysVacant} days`:`${f.daysVacant} days`;return o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-baseline gap-2 mb-3",children:[o.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Vacancies"}),o.jsxs("span",{className:"text-xs text-gray-500",children:[a," unit",a!==1?"s":""," · ",Be(i),"/mo lost"]})]}),o.jsxs("table",{className:"w-full text-sm table-fixed",role:"table","aria-label":"Vacant units summary",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{scope:"col",className:"w-[12%] text-left px-4 py-2 text-gray-400 font-medium",children:"Unit"}),o.jsx("th",{scope:"col",className:"w-[28%] text-left px-4 py-2 text-gray-400 font-medium",children:"Days Vacant"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Loss to Date"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Market Rent"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Priority"})]})}),o.jsx("tbody",{children:l.map(f=>o.jsxs("tr",{className:"border-b border-white/5",children:[o.jsx("td",{className:"px-4 py-3 text-gray-200",children:f.unitNumber}),o.jsx("td",{className:"px-4 py-3 text-gray-400",children:d(f)}),o.jsx("td",{className:"px-4 py-3 text-right text-error tabular-nums",children:f.vacancyLoss===null?"â":Be(f.vacancyLoss)}),o.jsx("td",{className:"px-4 py-3 text-right text-accent-light tabular-nums",children:Be(f.marketRent)}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-medium rounded-full capitalize ${u(f.priority)}`,role:"status","aria-label":`${f.priority} priority`,children:f.priority})})]},f.unitNumber))})]}),c>0&&o.jsx(rt,{variant:"link",size:"sm",onClick:()=>r(!t),icon:kr,iconPosition:"left",className:`mt-3 ${t?"[&_svg]:rotate-180":""}`,children:t?"Show less":`Show ${c} more vacant unit${c!==1?"s":""}`})]})};g3.propTypes={vacancy:Q.shape({averageDays:Q.number,vacantUnits:Q.number,totalLostRevenue:Q.number,longestVacant:Q.shape({unitNumber:Q.string,daysVacant:Q.number,vacantSince:Q.string}),byUnit:Q.arrayOf(Q.shape({unitNumber:Q.string,unitType:Q.string,marketRent:Q.number,daysVacant:Q.number,precision:Q.oneOf(["exact","approximate","unknown"]),vacantSince:Q.string,vacancyLoss:Q.number,previousRent:Q.number,previousTenant:Q.string,priority:Q.oneOf(["high","medium","low","unknown"])}))})};g3.defaultProps={vacancy:null};const x3=({units:e})=>{const[t,r]=N.useState(!1),n=3,a=N.useMemo(()=>!e||e.length===0?[]:[...e.filter(f=>["urgent","warning","info"].includes(f.alertLevel))].sort((f,p)=>
1330f.expiresIn-p.expiresIn),[e]),i=N.useMemo(()=>a.reduce((d,f)=>d+(f.rent||0),0),[a]);if(a.length===0)return null;const s=t?a:a.slice(0,n),l=a.length-n,c=d=>({urgent:"high",warning:"medium",info:"low"})[d]||"low",u=d=>{const f={high:"bg-red-500/20 text-red-400",medium:"bg-amber-500/20 text-amber-400",low:"bg-gray-500/20 text-gray-400"};return f[d]||f.low};return o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-baseline gap-2 mb-3",children:[o.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Expiring Leases"}),o.jsxs("span",{className:"text-xs text-gray-500",children:[a.length," unit",a.length!==1?"s":""," ·"," ",Be(i),"/mo at risk"]})]}),o.jsxs("table",{className:"w-full text-sm table-fixed",role:"table","aria-label":"Expiring leases summary",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{scope:"col",className:"w-[12%] text-left px-4 py-2 text-gray-400 font-medium",children:"Unit"}),o.jsx("th",{scope:"col",className:"w-[28%] text-left px-4 py-2 text-gray-400 font-medium",children:"Tenant"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Monthly Rent"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Expires In"}),o.jsx("th",{scope:"col",className:"w-[20%] text-right px-4 py-2 text-gray-400 font-medium",children:"Priority"})]})}),o.jsx("tbody",{children:s.map(d=>{const f=c(d.alertLevel);return o.jsxs("tr",{className:"border-b border-white/5",children:[o.jsx("td",{className:"px-4 py-3 text-gray-200",children:d.unitNumber}),o.jsx("td",{className:"px-4 py-3 text-gray-400",children:d.tenantName}),o.jsx("td",{className:"px-4 py-3 text-right text-accent-light tabular-nums",children:Be(d.rent)}),o.jsxs("td",{className:"px-4 py-3 text-right text-gray-400 tabular-nums",children:[d.expiresIn," days"]}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-medium rounded-full capitalize ${u(f)}`,role:"status","aria-label":`${f} priority`,children:f})})]},d.unitNumber)})})]}),l>0&&o.jsx(rt,{variant:"link",size:"sm",onClick:()=>r(!t),icon:kr,iconPosition:"left",className:`mt-3 ${t?"[&_svg]:rotate-180":""}`,children:t?"Show less":`Show ${l} more expiring lease${l!==1?"s":""}`})]})};x3.propTypes={units:Q.arrayOf(Q.shape({unitNumber:Q.string,tenantName:Q.string,rent:Q.number,alertLevel:Q.string,expires
1330In:Q.number}))};x3.defaultProps={units:[]};const y3=({stats:e,renewalRisk:t,delinquency:r,vacancy:n,units:a})=>{const i=(t==null?void 0:t.expiringUnits)>0||(e==null?void 0:e.delinquentUnits)>0||(e==null?void 0:e.vacantUnits)>0,s=(r==null?void 0:r.delinquentUnits)>0,l=(n==null?void 0:n.vacantUnits)>0,c=a==null?void 0:a.some(u=>["urgent","warning","info"].includes(u.alertLevel));return!i&&!s&&!l&&!c?null:o.jsxs("div",{className:"glass-card p-0 overflow-hidden",role:"region","aria-label":"Property issues and action items",children:[i&&o.jsx(p3,{stats:e,renewalRisk:t,noWrapper:!0}),s&&o.jsxs(o.Fragment,{children:[i&&o.jsx("div",{className:"border-t border-white/10"}),o.jsx("div",{className:"p-4",children:o.jsx(m3,{delinquency:r})})]}),l&&o.jsxs(o.Fragment,{children:[(i||s)&&o.jsx("div",{className:"border-t border-white/10"}),o.jsx("div",{className:"p-4",children:o.jsx(g3,{vacancy:n})})]}),c&&o.jsxs(o.Fragment,{children:[(i||s||l)&&o.jsx("div",{className:"border-t border-white/10"}),o.jsx("div",{className:"p-4",children:o.jsx(x3,{units:a})})]})]})};y3.propTypes={stats:Q.shape({vacantUnits:Q.number,vacantUnitsLoss:Q.number,delinquentUnits:Q.number,totalDelinquency:Q.number}),renewalRisk:Q.shape({expiringUnits:Q.number,atRiskRevenue:Q.number}),delinquency:Q.shape({totalDelinquency:Q.number,delinquentUnits:Q.number,byUnit:Q.array}),vacancy:Q.shape({vacantUnits:Q.number,totalLostRevenue:Q.number,byUnit:Q.array}),units:Q.arrayOf(Q.shape({unitNumber:Q.string,tenantName:Q.string,rent:Q.number,alertLevel:Q.string,expires
1330In:Q.number}))};y3.defaultProps={stats:null,renewalRisk:null,delinquency:null,vacancy:null,units:[]};const uGe=({rawData:e,propertyId:t,timeframe:r,showOnlyKPIs:n=!1,showOnlyOccupancyStatus:a=!1,showOnlyLeaseExpiration:i=!1,showOnlyRentTrends:s=!1})=>{const[l,c]=N.useState(null),[u,d]=N.useState(""),[f,p]=N.useState(!0),[m,x]=N.useState(null),[y,v]=N.useState("all"),[b,w]=N.useState([]),[S,j]=N.useState([]),[k,E]=N.useState(null),[T,O]=N.useState(null),[A,P]=N.useState(!1),[I,R]=N.useState([]),[M,L]=N.useState(!1),[U,W]=N.useState(null),[V,G]=N.useState(!1),K=b_(u,300),F=Lt.tooltipStyles.container,ne=Lt.tooltipStyles.label,H=Lt.tooltipStyles.item;N.useEffect(()=>{(async()=>{if(t)try{const ve=await Hl.getAvailableRentRolls(t);j(ve),ve.length>0&&E(ve[0].id)}catch(ve){console.error("Failed to fetch available rent rolls:",ve)}})()},[t]),N.useEffect(()=>{k?B(k):t&&B()},[k]),N.useEffect(()=>{!k&&t&&B()},[t]);const B=async(te=null)=>{if(!t){x("Property ID is required"),p(!1);return}try{p(!0),x(null);let ve,J;if(te){const me=await Hl.getRentRollByReportId(t,te),Ee=S.find(Ae=>Ae.id===te),Me=(Ee==null?void 0:Ee.start_date)||null;[ve,J]=await Promise.all([Hl.getChartData(t,Me),Hl.getUnitDetails(t,Me)])}else[ve,J]=await Promise.all([Hl.getChartData(t,null),Hl.getUnitDetails(t,null)]);c({...ve,units:J}),await X()}catch(ve){console.error("Error loading occupancy data:",ve),x(ve.message||"Failed to load occupancy data")}finally{p(!1)}},X=async()=>{try{const te=await fetch(`/api/metrics/comprehensive/${t}?includeTrends=true`);if(!te.ok)return;const ve=await te.json();if(ve.monthlyTrends&&ve.monthlyTrends.metrics){const J=ve.monthlyTrends.metrics.filter(me=>me.average_rent!==null&&me.average_rent>0).map(me=>({month:me.month_year||me.month,average_rent:me.average_rent,occupancy_rate:me.occupancy||me.occupancy_rate||0,created_at:me.date||me.month_year}));w(J)}}catch(te){console.error("Error loading rent trends:",te)}},Y=(l==null?void 0:l.stats)||{totalUnits:0,occupiedUnits:0,vacantUnits:0,vacantUnitsLoss:0,physicalOccupancy:0,economicOccupancy:0,lossToVacancy:0,averageRent:0,averageMarketRent:0,premiumPercentage:0,unitsByType:{},unitsByStatus:{},totalDelinquency:0,delinquentUnits:0,avgDelinquency:0},ae=(l==null?void 0:l.leaseStatus)||[],fe=(l==null?void 0:l.leaseExpirations)||[],ue=(l==null?void 0:l.renewalRisk)||null,oe=(l==null?void 0:l.delinquency)||null,Z=(l==null?void 0:l.vacancy)||null,ce=se.useMemo(()=>l!=null&&l.units?l.units.map((te,ve)=>({id:te.unitNumber||`Unit ${ve+1}`,unitNumber:te.unitNumber||`${ve+1}`,tenantName:te.tenantName||"Vacant",type:te.unitType||"1x1",rent:te.monthlyRent||0,marketRent:te.marketRent||0,premium:te.premium||0,delinquency:te.delinquency||0,status:te.status||"Unknown",alertLevel:te.alertLevel||"none",expiresIn:te.daysUntilExpiry||0,lease_start:te.leaseStart,lease_end:te.leaseEnd})):[],[l==null?void 0:l.units]),q=te=>{E(te)},xe=N.useCallback(async()=>{G(!0);try{const te="https://oyster-app-2hw4z.ondigitalocean.app",ve=localStorage.getItem("accessToken"),J=await fetch(`${te}/api/pdf/rent-roll-report`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:ve?`Bearer ${ve}`:""},body:JSON.stringify({propertyId:t,options:{theme:"dark",includeUnitDetail:!0}})});if(!J.ok){const Ae=await J.json().catch(()=>({}));throw new Error(Ae.message||`Export failed: ${J.statusText}`)}const me=await J.blob(),Ee=window.URL.createObjectURL(me),Me=document.createElement("a");Me.href=Ee,Me.download=`rent_roll_analysis_${new Date().toISOString().split("T")[0]}.pdf`,document.body.appendChild(Me),Me.click(),document.body.removeChild(Me),window.URL.revokeObjectURL(Ee),ft.success("PDF exported successfully")}catch(te){console.error("[OccupancyVisualization] PDF export failed:",te),ft.error("Failed to export PDF. Please try again.")}finally{G(!1)}},[t]),pe=N.useCallback(async te=>{O(te),P(!0),L(!0),W(null);try{const ve=await Hl.getUnitHistory(t,te.id);R(ve.history||[])}catch(ve){console.error("[OccupancyVisualization] Failed to load unit history:",ve),W(ve.message||"Failed to load unit history"),R([])}finally{L(!1)}},[t]),Se=N.useCallback(()=>{P(!1),O(null),R([]),W(null)},[]),he=se.useMemo(()=>ce.filter(te=>{var J,me,Ee,Me;if(y!=="all"&&te.status!==y)return!1;const ve=K.toLowerCase();return((J=te.id)==null?void 0:J.toLowerCase().includes(ve))||((me=te.tenantName)==null?void 0:me.toLowerCase().includes(ve))||((Ee=te.type)==null?void 0:Ee.toLowerCase().includes(ve))||((Me=te.status)==null?void 0:Me.toLowerCase().includes(ve))}),[ce,y,K]),ie=tX(he,{key:"unitNumber",direction:"asc"}),we=ie.sortedData,ke=()=>fe,Oe=()=>ae,Ue=te=>{const ve=ie.getSortInfo(te);return ve.isSorted?ve.direction==="asc"?o.jsx(Nce,{className:"h-3 w-3"}):o.jsx(bce,{className:"h-3 w-3"}):null},Je=te=>te==="1x1"?"1 Bed / 1 Bath":te==="0x1"?"Studio / 1 Bath":te==="2x1"?"2 Bed / 1 Bath":te==="2x2"?"2 Bed / 2 Bath":te,Ze=()=>o.jsx("div",{className:"relative overflow-hidden",children:o.jsx("div",{className:"h-64 bg-card rounded-xl",children:o.jsx("div",{className:"absolute inset-0 -translate-x-full animate-[shimmer_2s_infinite]",children:o.jsx("div",{className:"h-full w-1/2 bg-gradient-to-r from-transparent via-white/5 to-transparent"})})})});return f?o.jsxs("div",{className:"space-y-8",children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[1,2,3,4].map(te=>o.jsxs("div",{className:"glass-card p-4",children:[o.jsx("div",{className:"h-4 bg-card rounded w-3/4 mb-2 animate-pulse"}),o.jsx("div",{className:"h-8 bg-card rounded w-1/2 animate-pulse"})]},te))}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"glass-card p-6",children:[o.jsx("div",{className:"h-4 bg-card rounded w-1/2 mb-4 animate-pulse"}),o.jsx(Ze,{})]}),o.jsxs("div",{className:"glass-card p-6",children:[o.jsx("div",{className:"h-4 bg-card rounded w-1/2 mb-4 animate-pulse"}),o.jsx(Ze,{})]})]})]}):m?o.jsxs("div",{className:"glass-card p-6 border-l-4 border-error",children:[o.jsxs("div",{className:"flex items-center mb-4",children:[o.jsx(Jr,{className:"h-5 w-5 text-error mr-2"}),o.jsx("h2",{className:"text-lg font-medium text-white font-sans",children:"Error Loading Occupancy Data"})]}),o.jsx("p",{className:"text-gray-300 font-sans",children:m})]}):ce.length?n?o.jsx("div",{className:"kpi-summary bg-gray-900/50 border border-gray-800 rounded-lg p-8",children:o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:[o.jsxs("div",{className:"text-center py-4 border-r border-gray-800 last:border-r-0",children:[o.jsx("h3",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider mb-3",children:"Physical Occupancy"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2",children:pr(Y.physicalOccupancy,0)}),o.jsxs("div",{className:"text-xs text-gray-500",children:[Be(Y.averageRent)," avg rent"]})]}),o.jsxs("div",{className:"text-center py-4 border-r border-gray-800 last:border-r-0",children:[o.jsx("h3",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider mb-3",children:"Economic Occupancy"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2",children:pr(Y.economicOccupancy,0)}),o.jsx("div",{className:"text-xs",children:Y.lossToVacancy>0?o.jsxs("span",{className:"text-yellow-500",children:[Be(Y.lossToVacancy)," not collected"]}):o.jsx("span",{className:"text-green-500",children:"No gap"})})]}),o.jsxs("div",{className:"text-center py-4 border-r border-gray-800 last:border-r-0",children:[o.jsx("h3",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider mb-3",children:"Vacant Units"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2",children:Y.vacantUnits}),o.jsx("div",{className:"text-xs",children:Y.vacantUnits>0?o.jsxs("span",{className:"text-yellow-500",children:[Be(Y.vacantUnitsLoss),"/mo lost"]}):o.jsx("span",{className:"text-green-500",children:"100% occupied"})})]}),o.jsxs("div",{className:"text-center py-4",children:[o.jsx("h3",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider mb-3",children:"Delinquent"}),o.jsx("div",{className:"text-xl font-semibold text-white mb-2",children:ce.filter(te=>(te.delinquency||0)>0).length}),o.jsx("div",{className:"text-xs",children:Y.totalDelinquency>0?o.jsxs("span",{className:"text-red-500",children:[Be(Y.totalDelinquency)," owed"]}):o.jsx("span",{className:"text-green-500",children:"No delinquencies"})})]})]})}):a?o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"glass-card p-5",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans mb-3",children:"OCCUPANCY STATUS BREAKDOWN"}),o.jsx("div",{className:"h-64",children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(Rp,{children:[o.jsx("defs",{children:Oe().map((te,ve)=>o.jsxs("linearGradient",{id:`lease-gradient-${ve}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",
1330stopColor:te.fill,stopOpacity:.8}),o.jsx("stop",{offset:"95%",stopColor:te.fill,stopOpacity:.6})]},`lease-gradient-${ve}`))}),o.jsx(Sa,{data:Oe(),cx:"50%",cy:"50%",innerRadius:Lt.chartTypes.statusPie.innerRadius-10,outerRadius:Lt.chartTypes.statusPie.outerRadius-30,fill:"#8884d8",dataKey:Lt.chartTypes.statusPie.dataKey,label:!1,paddingAngle:Lt.chartTypes.statusPie.paddingAngle,cornerRadius:Lt.chartTypes.statusPie.cornerRadius,stroke:"none",children:Oe().map((te,ve)=>o.jsx(Li,{fill:`url(#lease-gradient-${ve})`,stroke:"none"},`cell-${ve}`))}),o.jsx(Sa,{data:[{name:"Total Units",value:Oe().reduce((te,ve)=>te+ve.value,0),occupancy:Y.physicalOccupancy}],cx:"50%",cy:"50%",innerRadius:0,outerRadius:45,fill:"transparent",dataKey:"value",style:{cursor:"pointer"},stroke:"none",children:o.jsx(Li,{fill:"transparent",stroke:"none"})}),o.jsx(Ln,{content:({active:te,payload:ve})=>{if(te&&ve&&ve[0]){const J=ve[0].payload;return o.jsxs("div",{className:"p-3 shadow-lg rounded-lg",style:F,children:[o.jsx("p",{style:ne,children:J.name}),o.jsx("p",{style:H,children:J.occupancy!==void 0?`${pr(J.occupancy,1)} Occupied`:`${J.value} Units`})]})}return null}}),o.jsxs("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",style:{pointerEvents:"none"},children:[o.jsx("tspan",{className:"text-2xl font-bold fill-white",fontFamily:"JetBrains Mono",children:pr(Y.physicalOccupancy,0)}),o.jsx("tspan",{x:"50%",dy:"28",className:"text-sm fill-gray-400",fontFamily:"Inter",children:"Occupied"})]})]})})})]}),o.jsxs("div",{className:"glass-card p-5",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans mb-3",children:"STATUS SUMMARY"}),o.jsx("div",{className:"space-y-3",children:Oe().map((te,ve)=>o.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-800 last:border-0",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"w-3 h-3 rounded-full mr-3",style:{backgroundColor:te.fill}}),o.jsx("span",{className:"text-sm text-gray-300 font-sans",children:te.name})]}),o.jsxs("span",{className:"text-sm font-semibold text-white font-mono",children:[te.value," units"]})]},ve))})]})]}):i?o.jsxs("div",{className:"glass-card p-5",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans mb-3",children:"LEASE EXPIRATION TIMELINE - NEXT 12 MONTHS"}),o.jsx(Hs,{width:"100%",height:250,children:o.jsxs(aq,{data:ke(),margin:{left:5},children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"barGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:Lt.colors.gradients.expiring.start.color,stopOpacity:Lt.colors.gradients.expiring.start.opacity}),o.jsx("stop",{offset:"95%",stopColor:Lt.colors.gradients.expiring.end.color,stopOpacity:Lt.colors.gradients.expiring.end.opacity})]})}),o.jsx(Id,{...Ad}),o.jsx(Gs,{dataKey:"month",tick:{fontSize:12,fill:"#6b7280",fontFamily:"JetBrains Mono"},angle:-45,textAnchor:"end",height:60,stroke:"rgba(255, 255, 255, 0.1)"}),o.jsx(Ka,{tick:{fontSize:12,fill:"#6b7280",fontFamily:"JetBrains Mono"},stroke:"rgba(255, 255, 255, 0.1)"}),o.jsx(Ln,{formatter:te=>[te,"Units Expiring"],labelFormatter:te=>`${te}`,contentStyle:F,labelStyle:ne,itemStyle:H}),o.jsx(ko,{dataKey:"expiring",fill:"url(#barGradient)",name:"Units Expiring",radius:[4,4,0,0]})]})})]}):s?o.jsxs("div",{className:"glass-card p-5",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans mb-3",children:"AVERAGE RENT & OCCUPANCY TRENDS"}),b.length>0?o.jsx(Hs,{width:"100%",height:Lt.chartTypes.rentTrends.compactHeight,children:o.jsxs(iq,{data:b,margin:{left:20,right:40,top:20,bottom:20},children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:"rentGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:Lt.colors.gradients.rent.start.color,stopOpacity:Lt.colors.gradients.rent.start.opacity}),o.jsx("stop",{offset:"95%",stopColor:Lt.colors.gradients.rent.end.color,stopOpacity:Lt.colors.gradients.rent.end.opacity})]}),o.jsxs("linearGradient",{id:"occupancyGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",
1330stopColor:Lt.colors.gradients.occupancy.start.color,stopOpacity:Lt.colors.gradients.occupancy.start.opacity}),o.jsx("stop",{offset:"95%",stopColor:Lt.colors.gradients.occupancy.end.color,stopOpacity:Lt.colors.gradients.occupancy.end.opacity})]})]}),o.jsx(Id,{...Ad}),o.jsx(Gs,{dataKey:"month",tick:{fontSize:12,fill:"#6b7280",fontFamily:"JetBrains Mono"},angle:-45,textAnchor:"end",height:60,stroke:"rgba(255, 255, 255, 0.1)"}),o.jsx(Ka,{yAxisId:"rent",tick:{fontSize:12,fill:Lt.colors.rent,fontFamily:"JetBrains Mono"},stroke:Lt.colors.rent,tickFormatter:te=>`$${te.toLocaleString()}`,domain:(()=>{if(b.length===0)return["auto","auto"];const te=b.map(Me=>Me.average_rent).filter(Me=>Me>0);if(te.length===0)return["auto","auto"];const ve=Math.min(...te),J=Math.max(...te),me=Math.floor(ve/100)*100-100,Ee=Math.ceil(J/100)*100+100;return[Math.max(0,me),Ee]})()}),o.jsx(Ka,{yAxisId:"occupancy",orientation:"right",tick:{fontSize:12,fill:Lt.colors.occupancy,fontFamily:"JetBrains Mono"},stroke:Lt.colors.occupancy,tickFormatter:te=>pr(te,0),domain:[0,100]}),o.jsx(Ln,{formatter:(te,ve)=>ve==="Average Rent"?[`$${te.toLocaleString()}`,ve]:ve==="Occupancy Rate"?[pr(te,1),ve]:[te,ve],labelFormatter:te=>`${te}`,contentStyle:F,labelStyle:ne,itemStyle:H}),o.jsx(pl,{wrapperStyle:{paddingTop:"20px",fontFamily:"Inter, sans-serif",fontSize:"12px"}}),o.jsx(ko,{yAxisId:"rent",dataKey:"average_rent",fill:"url(#rentGradient)",name:"Average Rent",radius:[4,4,0,0]}),o.jsx(Cu,{yAxisId:"occupancy",type:"monotone",dataKey:"occupancy_rate",stroke:Lt.colors.occupancy,strokeWidth:3,dot:{fill:Lt.colors.occupancy,strokeWidth:2,r:6},activeDot:{r:8,stroke:Lt.colors.occupancy,strokeWidth:2,fill:"#1f2937"},name:"Occupancy Rate"})]})}):o.jsx("div",{className:"h-64 flex items-center justify-center text-gray-500",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"font-medium",children:"No Average Rent Trend Data Available"}),o.jsx("p",{className:"text-sm mt-1",children:"Rent trends will appear here once financial metrics data is uploaded"})]})})]}):o.jsxs("div",{className:"space-y-8",children:[o.jsx("div",{className:"glass-card py-2 px-4",children:o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-0",children:[o.jsxs("div",{className:"py-2 px-3 border-r border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"Physical Occupancy"}),o.jsx(Ru,{className:"h-4 w-4 text-success"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:pr(Y.physicalOccupancy,0)}),o.jsxs("div",{className:"text-xs text-muted font-mono mt-1",children:[Be(Y.averageRent)," avg rent"]})]}),o.jsxs("div",{className:"py-2 px-3 border-r border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"Economic Occupancy"}),o.jsx(bl,{className:"h-4 w-4 text-accent"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:pr(Y.economicOccupancy,0)}),o.jsx("div",{className:"text-xs mt-1",children:Y.lossToVacancy>0?o.jsxs("span",{className:"text-warning font-mono",children:[Be(Y.lossToVacancy)," not collected"]}):o.jsx("span",{className:"text-success font-mono",children:"No gap"})})]}),o.jsxs("div",{className:"py-2 px-3 border-r border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"Vacant Units"}),o.jsx(_i,{className:"h-4 w-4 text-warning"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:Y.vacantUnits}),o.jsx("div",{className:"text-xs mt-1",children:Y.vacantUnits>0?o.jsxs("span",{className:"text-warning font-mono",children:[Be(Y.vacantUnitsLoss),"/mo lost"]}):o.jsx("span",{className:"text-success font-mono",children:"100% occupied"})})]}),o.jsxs("div",{className:"py-2 px-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-gray-400 text-xs uppercase tracking-wide font-sans",children:"Delinquent"}),o.jsx(Jr,{className:"h-4 w-4 text-error"})]}),o.jsx("div",{className:"text-2xl font-bold metric-gradient font-mono",children:ce.filter(te=>(te.delinquency||0)>0).length}),o.jsx("div",{className:"text-xs mt-1",children:Y.totalDelinquency>0?o.jsxs("span",{className:"text-error font-mono",children:[Be(Y.totalDelinquency)," owed"]}):o.jsx("span",{className:"text-success font-mono",children:"No delinquencies"})})]})]})}),o.jsxs("div",{"data-tour":"occupancy-rent-roll-selector",className:"flex items-center justify-between gap-4 mb-6",children:[o.jsx(oGe,{rentRolls:S,selectedId:k,onSelect:q,disabled:f}),o.jsx(rt,{variant:"secondary",onClick:xe,disabled:V||f||!l,loading:V,icon:vc,children:V?"Exporting...":"Export PDF"})]}),o.jsx("div",{"data-tour":"occupancy-property-issues",children:o.jsx(y3,{stats:Y,renewalRisk:ue,delinquency:oe,vacancy:Z,units:ce})}),o.jsx("div",{className:"glass-card overflow-hidden mb-8",children:o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2",children:[o.jsxs("div",{className:"p-5",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans mb-3",children:"LEASE EXPIRATION TIMELINE"}),o.jsx(Hs,{width:"100%",height:Lt.chartTypes.leaseExpiration.height,children:o.jsxs(aq,{data:ke(),margin:{left:5},children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"barGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",
1330stopColor:Lt.colors.gradients.expiring.start.color,stopOpacity:Lt.colors.gradients.expiring.start.opacity}),o.jsx("stop",{offset:"95%",stopColor:Lt.colors.gradients.expiring.end.color,stopOpacity:Lt.colors.gradients.expiring.end.opacity})]})}),o.jsx(Id,{...Ad}),o.jsx(Gs,{dataKey:"month",tick:{fontSize:12,fill:"#6b7280",fontFamily:"JetBrains Mono"},angle:-45,textAnchor:"end",height:60,stroke:"rgba(255, 255, 255, 0.1)"}),o.jsx(Ka,{tick:{fontSize:12,fill:"#6b7280",fontFamily:"JetBrains Mono"},stroke:"rgba(255, 255, 255, 0.1)"}),o.jsx(Ln,{formatter:te=>[te,"Units Expiring"],labelFormatter:te=>`${te}`,contentStyle:F,labelStyle:ne,itemStyle:H}),o.jsx(ko,{dataKey:"expiring",fill:"url(#barGradient)",name:"Units Expiring",radius:[4,4,0,0]})]})})]}),o.jsxs("div",{className:"p-5 border-t lg:border-t-0 lg:border-l border-white/10",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans mb-3",children:"LEASE STATUS DISTRIBUTION"}),o.jsx("div",{className:"h-80",children:o.jsx(Hs,{width:"100%",height:"100%",children:o.jsxs(Rp,{children:[o.jsx("defs",{children:Oe().map((te,ve)=>o.jsxs("linearGradient",{id:`lease-gradient-${ve}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:te.fill,stopOpacity:.8}),o.jsx("stop",{offset:"95%",stopColor:te.fill,stopOpacity:.6})]},`lease-gradient-${ve}`))}),o.jsx(Sa,{data:Oe(),cx:"50%",cy:"50%",innerRadius:70,outerRadius:110,fill:"#8884d8",dataKey:"value",label:!1,paddingAngle:2,cornerRadius:4,stroke:"none",children:Oe().map((te,ve)=>o.jsx(Li,{fill:`url(#lease-gradient-${ve})`,stroke:"none"},`cell-${ve}`))}),o.jsx(Sa,{data:[{name:"Total Units",value:Oe().reduce((te,ve)=>te+ve.value,0),occupancy:Y.physicalOccupancy}],cx:"50%",cy:"50%",innerRadius:0,outerRadius:Lt.chartTypes.statusPie.innerRadius+5,fill:"transparent",dataKey:"value",style:{cursor:"pointer"},stroke:"none",children:o.jsx(Li,{fill:"transparent",stroke:"none"})}),o.jsx(Ln,{content:({active:te,payload:ve})=>{if(te&&ve&&ve[0]){const J=ve[0].payload;return o.jsxs("div",{className:"p-3 shadow-lg rounded-lg",style:F,children:[o.jsx("p",{style:ne,children:J.name}),o.jsx("p",{style:H,children:J.occupancy!==void 0?`${pr(J.occupancy,1)} Occupied`:`${J.value} Units`})]})}return null}}),o.jsxs("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",style:{pointerEvents:"none"},children:[o.jsx("tspan",{className:"text-3xl font-bold fill-white",fontFamily:"JetBrains Mono",children:pr(Y.physicalOccupancy,0)}),o.jsx("tspan",{x:"50%",dy:"35",className:"text-sm fill-gray-400",fontFamily:"Inter",children:"Occupied"})]})]})})})]})]})}),b.length>0&&o.jsx("div",{className:"mt-8",children:o.jsxs("div",{className:"glass-card p-5",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans mb-3",children:"AVERAGE RENT & OCCUPANCY TRENDS"}),o.jsx(Hs,{width:"100%",height:Lt.chartTypes.rentTrends.height,children:o.jsxs(iq,{data:b,margin:{left:20,right:40,top:20,bottom:20},children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:"rentGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:Lt.colors.gradients.rent.start.color,stopOpacity:Lt.colors.gradients.rent.start.opacity}),o.jsx("stop",{offset:"95%",stopColor:Lt.colors.gradients.rent.end.color,stopOpacity:Lt.colors.gradients.rent.end.opacity})]}),o.jsxs("linearGradient",{id:"occupancyGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:Lt.colors.gradients.occupancy.start.color,stopOpacity:Lt.colors.gradients.occupancy.start.opacity}),o.jsx("stop",{offset:"95%",stopColor:Lt.colors.gradients.occupancy.end.color,stopOpacity:Lt.colors.gradients.occupancy.end.opacity})]})]}),o.jsx(Id,{...Ad}),o.jsx(Gs,{dataKey:"month",tick:{fontSize:12,fill:"#6b7280",fontFamily:"JetBrains Mono"},angle:-45,textAnchor:"end",height:60,stroke:"rgba(255, 255, 255, 0.1)"}),o.jsx(Ka,{yAxisId:"rent",tick:{fontSize:12,fill:Lt.colors.rent,fontFamily:"JetBrains Mono"},stroke:Lt.colors.rent,tickFormatter:te=>`$${te.toLocaleString()}`,domain:(()=>
1330{if(b.length===0)return["auto","auto"];const te=b.map(Me=>Me.average_rent).filter(Me=>Me>0);if(te.length===0)return["auto","auto"];const ve=Math.min(...te),J=Math.max(...te),me=Math.floor(ve/100)*100-100,Ee=Math.ceil(J/100)*100+100;return[Math.max(0,me),Ee]})()}),o.jsx(Ka,{yAxisId:"occupancy",orientation:"right",tick:{fontSize:12,fill:Lt.colors.occupancy,fontFamily:"JetBrains Mono"},stroke:Lt.colors.occupancy,tickFormatter:te=>pr(te,0),domain:[0,100]}),o.jsx(Ln,{formatter:(te,ve)=>ve==="Average Rent"?[`$${te.toLocaleString()}`,ve]:ve==="Occupancy Rate"?[pr(te,1),ve]:[te,ve],labelFormatter:te=>`${te}`,contentStyle:F,labelStyle:ne,itemStyle:H}),o.jsx(pl,{wrapperStyle:{paddingTop:"20px",fontFamily:"Inter, sans-serif",fontSize:"12px"}}),o.jsx(ko,{yAxisId:"rent",dataKey:"average_rent",fill:"url(#rentGradient)",name:"Average Rent",radius:[4,4,0,0]}),o.jsx(Cu,{yAxisId:"occupancy",type:"monotone",dataKey:"occupancy_rate",stroke:Lt.colors.occupancy,strokeWidth:3,dot:{fill:Lt.colors.occupancy,strokeWidth:2,r:6},activeDot:{r:8,stroke:Lt.colors.occupancy,strokeWidth:2,fill:"#1f2937"},name:"Occupancy Rate"})]})})]})}),o.jsxs("div",{className:"mt-8",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider font-sans",children:"UNIT DETAILS"}),o.jsxs("div",{className:"text-xs text-muted-foreground font-mono",children:[we.length," / ",ce.length," UNITS"]})]}),o.jsxs("div",{className:"space-y-4 mb-6",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(pd,{label:"All",count:ce.length,active:y==="all",onClick:()=>v("all")}),o.jsx(pd,{label:"Active",count:ce.filter(te=>te.status==="Active").length,active:y==="Active",onClick:()=>v("Active")}),o.jsx(pd,{label:"90-Day",count:ce.filter(te=>te.status==="90-Day Notice").length,active:y==="90-Day Notice",onClick:()=>v("90-Day Notice")}),o.jsx(pd,{label:"Renewal",count:ce.filter(te=>te.status==="Renewal Due").length,active:y==="Renewal Due",onClick:()=>v("Renewal Due")}),o.jsx(pd,{label:"Expiring",count:ce.filter(te=>te.status==="Expiring Soon").length,active:y==="Expiring Soon",onClick:()=>v("Expiring Soon")}),o.jsx(pd,{label:"Month-to-Month",count:ce.filter(te=>te.status==="Month-to-Month").length,active:y==="Month-to-Month",onClick:()=>v("Month-to-Month")}),o.jsx(pd,{label:"Vacant",count:ce.filter(te=>te.status==="Vacant").length,active:y==="Vacant",onClick:()=>v("Vacant")})]}),o.jsx(j4,{value:u,onChange:te=>d(te.target.value),placeholder:"Search by unit, tenant name, or type...",size:"md",showClearButton:!0,className:"w-full"})]}),o.jsxs("div",{className:"data-table","data-tour":"occupancy-unit-breakdown",children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsx("div",{className:"max-h-96 overflow-y-auto custom-scrollbar",children:o.jsxs("table",{className:"min-w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",className:"cursor-pointer hover:text-accent transition-colors",onClick:()=>ie.toggleSort("unitNumber"),children:o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("span",{children:"Unit"}),o.jsx(cc,{className:"w-3 h-3 text-gray-500",title:"Click row to view history"}),Ue("unitNumber")]})}),o.jsx("th",{scope:"col",children:"Type"}),o.jsx("th",{scope:"col",children:"Tenant"}),o.jsx("th",{scope:"col",className:"cursor-pointer hover:text-accent transition-colors",onClick:()=>ie.toggleSort("rent"),children:o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("span",{children:"Rent"}),Ue("rent")]})}),o.jsx("th",{scope:"col",className:"cursor-pointer hover:text-accent transition-colors",onClick:()=>ie.toggleSort("premium"),children:o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("span",{children:"Premium"}),Ue("premium")]})}),o.jsx("th",{scope:"col",className:"cursor-pointer hover:text-accent transition-colors",onClick:()=>ie.toggleSort("delinquency"),children:o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("span",{children:"Delinquency"}),Ue("delinquency")]})}),o.jsx("th",{scope:"col",className:"cursor-pointer hover:text-accent transition-colors",onClick:()=>ie.toggleSort("expiresIn"),children:o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("span",{children:"Lease Expiry"}),Ue("expiresIn")]})}),o.jsx("th",{scope:"col",className:"cursor-pointer hover:text-accent transition-colors",onClick:()=>ie.toggleSort("status"),children:o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("span",{children:"Status"}),Ue("status")]})})]})}),o.jsx("tbody",{children:we.map(te=>o.jsxs("tr",{onClick:()=>pe(te),className:"cursor-pointer hover:bg-white/5 transition-colors",role:"button",tabIndex:0,onKeyDown:ve=>{(ve.key==="Enter"||ve.key===" ")&&(ve.preventDefault(),pe(te))},"aria-label":`View history for unit ${te.id}`,children:[o.jsx("td",{className:"text-gray-300",children:te.id}),o.jsx("td",{className:"text-muted",children:Je(te.type)}),o.jsx("td",{className:"text-muted",children:o.jsx("div",{className:"flex items-center",children:o.jsxs("div",{children:[o.jsx("div",{className:"font-medium text-gray-300",children:te.tenantName||"Vacant"}),te.lease_end&&o.jsxs("div",{className:"text-xs text-muted",children:["Lease ends: ",new Date(te.lease_end).toLocaleDateString()]})]})})}),o.jsx("td",{className:"text-gray-300",children:o.jsxs("div",{children:[o.jsx("div",{className:"font-medium text-gray-300",children:Be(te.rent)}),o.jsxs("div",{className:"text-xs text-muted",children:["Market: ",Be(te.marketRent||0)]})]})}),o.jsx("td",{children:o.jsxs("span",{className:`inline-flex items-center font-medium ${te.premium>=50||te.premium>=0?"text-success":(te.premium>=-50,"text-error")}`,children:[te.premium>=0?"+":"",Be(Math.abs(te.premium)),te.premium!==0&&o.jsx("span",{className:"ml-1",children:te.premium>0?o.jsx(jce,{className:"h-3 w-3"}):o.jsx(_ce,{className:"h-3 w-3"})})]})}),o.jsx("td",{children:te.delinquency>0?o.jsx("span",{className:"font-medium text-error",children:Be(te.delinquency)}):o.jsx("span",{className:"text-muted",children:"$0"})}),o.jsx("td",{children:o.jsx("div",{children:te.alertLevel==="none"&&te.expires
1330In?o.jsxs("div",{className:"text-gray-300",children:[o.jsx("span",{className:"font-medium",children:te.expiresIn})," days"]}):te.alertLevel==="info"?o.jsxs("div",{className:"text-accent",children:[o.jsx("span",{className:"font-medium",children:te.expiresIn})," days",o.jsx("div",{className:"text-xs text-accent",children:"ð 90-Day Notice"})]}):te.alertLevel==="warning"?o.jsxs("div",{className:"text-warning",children:[o.jsx("span",{className:"font-medium",children:te.expiresIn})," days",o.jsx("div",{className:"text-xs text-warning-light",children:"ð Renewal Due"})]}):te.alertLevel==="urgent"?o.jsxs("div",{className:"text-error",children:[o.jsx("span",{className:"font-medium",children:te.expiresIn})," days",o.jsx("div",{className:"text-xs text-error",children:"â° Urgent!"})]}):te.alertLevel==="caution"?o.jsxs("div",{className:"text-purple-400",children:[o.jsx("span",{className:"font-medium",children:"MtM"}),o.jsx("div",{className:"text-xs text-purple-300",children:"ð Month-to-Month"})]}):o.jsx("div",{className:"text-muted",children:"â"})})}),o.jsx("td",{children:o.jsx("span",{className:`px-2 py-1 inline-flex text-xs leading-5 font-semibold rounded-full ${te.alertLevel==="none"?"bg-success/20 text-success":te.alertLevel==="info"?"bg-accent/20 text-accent":te.alertLevel==="warning"?"bg-warning/20 text-warning":te.alertLevel==="urgent"?"bg-error/20 text-error":te.alertLevel==="caution"?"bg-purple-500/20 text-purple-400":"bg-white/10 text-muted"}`,children:te.status})})]},te.id))})]})})}),o.jsx("div",{className:"bg-primary/80 backdrop-blur-md px-6 py-3 border-t border-white/10",children:o.jsxs("div",{className:"flex items-center justify-between text-sm text-muted",children:[o.jsxs("div",{className:"flex space-x-4",children:[o.jsxs("span",{className:"font-mono",children:["Showing ",we.length," of ",ce.length," units"]}),y!=="all"&&o.jsxs("span",{className:"text-accent font-medium font-mono",children:["Filtered by: ",y]})]}),o.jsxs("div",{className:"flex space-x-4 font-mono",children:[o.jsxs("span",{children:["Total Rent:"," ",Be(we.reduce((te,ve)=>te+ve.rent,0))]}),o.jsxs("span",{children:["Avg Rent:"," ",Be(we.length>0?we.reduce((te,ve)=>te+ve.rent,0)/we.length:0)]})]})]})})]})]}),o.jsx(lGe,{isOpen:A,onClose:Se,unit:T,history:I,loading:M,error:U})]}):o.jsxs("div",{className:"glass-card p-6 border-l-4 border-warning",children:[o.jsxs("div",{className:"flex items-center mb-4",children:[o.jsx(Jr,{className:"h-5 w-5 text-warning mr-2"}),o.jsx("h2",{className:"text-lg font-medium text-white font-sans",children:"No Unit Data Available"})]}),o.jsx("p",{className:"text-gray-300 font-sans",children:"No rent roll data found for the selected time period."})]})},pd=({label:e,count:t,active:r,onClick:n})=>o.jsxs("button",{onClick:n,className:` 1331 px-3 py-1.5 text-sm rounded-full border transition-all 1332 ${r?"bg-white/10 border-white/30 text-white":"bg-transparent border-white/10 text-gray-400 hover:border-white/20 hover:text-gray-300"} 1333 `,children:[e,o.jsx("span",{className:`ml-2 text-xs font-mono ${r?"text-white/80":"text-gray-500"}`,children:t})]}),tre=({property:e})=>{const{startTour:t}=Lu();return N.useEffect(()=>{const r=setTimeout(()=>t(Fi.OCCUPANCY_TAB),500);return()=>clearTimeout(r)},[t]),o.jsx("div",{className:"p-6",children:o.jsx("div",{"data-tour":"occupancy-summary",children:o.jsx(uGe,{propertyId:e==null?void 0:e.id})})})},dGe=({property:e,isOpen:t,onClose:r,onUpdate:n,onUploadClick:a})=>{const[i,s]=N.useState("property"),[l,c]=N.useState(!1),[u,d]=N.useState(!1),[f,p]=N.useState(null),[m,x]=N.useState(null),[y,v]=N.useState(0),{dateRange:b,setDateRange:w,rawData:S,analysisResult:j,setAnalysisResult:k,fetchPropertyData:E,isLoading:T}=nX(e),O=[{id:"property",label:"Property Info",icon:_i},{id:"reports",label:"Reports",icon:Sn},{id:"ai-analysis",label:"AI Analysis",icon:yc},{id:"financial",label:"Financial",icon:yR},{id:"occupancy",label:"Occupancy",icon:Gp}],A=M=>{l&&i!==M?(p(M),d(!0)):s(M)},P=()=>{s("property"),c(!1),x(null),r()},I=(M,L)=>{M!=="custom"&&L&&E(L)},R=M=>{x(M),M.date_range&&w({start:M.date_range.start||null,end:M.date_range.end||null}),s("ai-analysis")};return!t||!e?null:o.jsxs("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:[o.jsxs("div",{className:"bg-primary border border-white/10 rounded-xl shadow-2xl w-full max-w-7xl max-h-[90vh] flex flex-col",children:[o.jsxs("div",{className:"bg-gradient-to-r from-primary/90 to-primary/70 backdrop-blur-xl p-6 border-b border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsx("div",{className:"p-3 bg-gradient-to-br from-accent/30 to-accent/20 rounded-xl shadow-lg shadow-accent/20",children:o.jsx(_i,{className:"h-8 w-8 text-accent-light"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold font-mono uppercase tracking-wider",children:o.jsx("span",{className:"bg-gradient-to-r from-white to-gray-200 bg-clip-text text-transparent",children:(e==null?void 0:e.name)||"Property Analysis"})}),o.jsxs("p",{className:"text-gray-400 flex items-center mt-1 font-medium text-sm",children:[(e==null?void 0:e.address)||"No address"," â¢",o.jsxs("span",{className:"text-accent-light ml-1",children:[(e==null?void 0:e.unit_count)||0," units"]})]})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>v(M=>M+1),className:"p-2.5 bg-white/5 hover:bg-red-500/20 rounded-xl transition-all duration-300 hover:shadow-lg border border-white/10 hover:border-red-500/30",title:"Delete property",children:o.jsx(wl,{className:"h-5 w-5 text-gray-400 hover:text-red-400"})}),o.jsx("button",{onClick:P,className:"p-2.5 bg-white/5 hover:bg-white/10 rounded-xl transition-all duration-300 hover:shadow-lg border border-white/10 hover:border-white/20",children:o.jsx(Ir,{className:"h-5 w-5 text-gray-300 hover:text-white"})})]})]}),o.jsx("div",{className:"flex space-x-1 overflow-x-auto",children:O.map(M=>{const L=M.icon;return o.jsxs("button",{onClick:()=>A(M.id),className:`flex items-center space-x-2 px-4 py-3 text-sm font-medium transition-all duration-200 border-b-2 ${i===M.id?"text-accent border-accent":"text-gray-400 border-transparent hover:text-white hover:border-white/20"}`,children:[o.jsx(L,{className:"h-4 w-4"}),o.jsx("span",{children:M.label})]},M.id)})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[i==="property"&&o.jsx(kX,{property:e,onUpdate:n,onNavigateToTab:s,onDeleteRequest:y}),i==="reports"&&o.jsx(HX,{property:e,onViewAnalysis:R,onUploadClick:a}),i==="ai-analysis"&&o.jsx(rp,{children:o.jsx(SQ,{property:e,rawData:S,analysisResult:j,onAnalysisUpdate:k,onUnsavedChangesUpdate:c,dateRange:b,onDateRangeChange:w,onPresetSelect:I,isLoading:T,savedAnalysis:m,onClearSavedAnalysis:()=>x(null)})}),i==="financial"&&o.jsx(ere,{property:e,rawData:S,dateRange:b,onDateRangeChange:w,onFetchData:E,isLoading:T}),i==="occupancy"&&o.jsx(tre,{property:e,rawData:S,dateRange:b,onDateRangeChange:w,onFetchData:E,isLoading:T})]})]}),o.jsx(ki,{isOpen:u,onClose:()=>{d(!1),p(null)},onConfirm:()=>{c(!1),s(f),d(!1),p(null)},title:"Unsaved Changes",message:"You have unsaved changes. Do you want to discard them?",confirmText:"Discard Changes",cancelText:"Keep Editing",variant:"warning"})]})},fGe=({onPropertySelect:e,onAddProperty:t,onUploadClick:r,analysisCache:n,onUpdateCache:a,usePanel:i=!1,initialFilter:s="all"})=>{const{startTour:l}=Lu(),{user:c}=Wi(),u=ei(),[d,f]=N.useState([]),[p,m]=N.useState(!0),[x,y]=N.useState(null),[v,b]=N.useState("name"),[w,S]=N.useState("asc"),[j,k]=N.useState(s),[E,T]=N.useState(""),[O,A]=N.useState(""),[P,I]=N.useState("none"),[R,M]=N.useState(!1),[L,U]=N.useState(null),[W,V]=N.useState(!1),G=b_(O,300);N.useEffect(()=>{K()},[]),N.useEffect(()=>{s!==j&&k(s)},[s]),N.useEffect(()=>{if(p)return;const Z=setTimeout(()=>l(Fi.PORTFOLIO_WELCOME),500);return()=>clearTimeout(Z)},[l,p]);const K=async()=>{try{m(!0),y(null);const Z=await Xe.get("/properties");f(Z.data)}catch(Z){console.error("Error fetching portfolio data:",Z),y("Failed to load portfolio data")}finally{m(!1)}},F=Z=>{if(Z.city||Z.state)return{city:Z.city||"Unknown",state:Z.state||"Unknown",fullAddress:[Z.street_address,Z.city,Z.state,Z.zip_code].filter(
1333Boolean).join(", ")};if(!Z.address)return{city:"Unknown",state:"Unknown",fullAddress:"Unknown"};const ce=Z.address.split(",");if(ce.length>=2){const q=ce[ce.length-2].trim(),pe=ce[ce.length-1].trim().split(" ")[0].trim();return{city:q,state:pe,fullAddress:Z.address}}return{city:"Unknown",state:"Unknown",fullAddress:Z.address}},ne=Z=>Z?Z<=10?"Small (1-10)":Z<=25?"Medium (11-25)":Z<=50?"Large (26-50)":"Very Large (50+)":"Unknown",H={totalUnits:d.reduce((Z,ce)=>Z+(ce.unit_count||0),0),loansExpiringSoon:d.filter(Z=>go(Z.loan_maturity)).length,loansPastDue:d.filter(Z=>mo(Z.loan_maturity)).length,rateResetsSoon:d.filter(Z=>go(Z.rate_lock_date)).length,rateResetsPastDue:d.filter(Z=>mo(Z.rate_lock_date)).length},B=d.filter(Z=>{const{city:ce,state:q,fullAddress:xe}=F(Z),pe=Z.loan_maturity||Z.rate_lock_date;if(G){const Se=G.toLowerCase(),he=Z.name.toLowerCase().includes(Se),ie=xe.toLowerCase().includes(Se),we=ce.toLowerCase().includes(Se),ke=q.toLowerCase().includes(Se);if(!he&&!ie&&!we&&!ke)return!1}switch(j){case"hasLoanData":return pe;case"noLoanData":return!pe;case"city":return ce.toLowerCase().includes(E.toLowerCase());case"state":return q.toLowerCase().includes(E.toLowerCase());case"loansPastDue":return mo(Z.loan_maturity);case"loansExpiringSoon":return go(Z.loan_maturity);case"loansAlert":return mo(Z.loan_maturity)||go(Z.loan_maturity);case"ratesPastDue":return mo(Z.rate_lock_date);case"ratesExpiringSoon":return go(Z.rate_lock_date);case"ratesAlert":return mo(Z.rate_lock_date)||go(Z.rate_lock_date);default:return!0}}),X=[...B].sort((Z,ce)=>{let q=0;switch(v){case"name":q=Z.name.localeCompare(ce.name);break;case"location":const xe=F(Z),pe=F(ce);q=xe.state.localeCompare(pe.state)||xe.city.localeCompare(pe.city);break;case"units":q=(Z.unit_count||0)-(ce.unit_count||0);break;case"yearBuilt":q=(Z.construction_year||9999)-(ce.construction_year||9999);break;case"purchaseDate":const Se=Z.purchase_date?Jn(Z.purchase_date):new Date(0),he=ce.purchase_date?Jn(ce.purchase_date):new Date(0);q=Se-he;break;case"purchaseAmount":q=(parseFloat(Z.purchase_price)||0)-(parseFloat(ce.purchase_price)||0);break;case"loanMaturity":const ie=Z.loan_maturity?Jn(Z.loan_maturity):new Date("9999-12-31T12:00:00"),we=ce.loan_maturity?Jn(ce.loan_maturity):new Date("9999-12-31T12:00:00");q=ie-we;break;case"rateReset":const ke=Z.rate_lock_date?Jn(Z.rate_lock_date):new Date("9999-12-31T12:00:00"),Oe=ce.rate_lock_date?Jn(ce.rate_lock_date):new Date("9999-12-31T12:00:00");q=ke-Oe;break;default:q=0}return w==="asc"?q:-q}),Y={};P!=="none"&&X.forEach(Z=>{let ce="Other";switch(P){case"city":ce=F(Z).city;break;case"state":ce=F(Z).state;break;case"size":ce=ne(Z.unit_count);break}Y[ce]||(Y[ce]=[]),Y[ce].push(Z)});const ae=Z=>{v===Z?S(w==="asc"?"desc":"asc"):(b(Z),S("asc"))},fe=Z=>{i&&e?e(Z):(U(Z),V(!0))},ue=Z=>{if(!Z||Z!=null&&Z.deleted){const ce=(Z==null?void 0:Z.propertyId)||(L==null?void 0:L.id);ce&&f(q=>q.filter(xe=>xe.id!==ce)),U(null),V(!1)}else Z&&(f(ce=>ce.map(q=>q.id===Z.id?Z:q)),U(Z))};if(p)return o.jsx("div",{className:"flex items-center justify-center h-64",children:o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent"})});if(x)return o.jsx("div",{className:"glass-card p-4 border-error/30 bg-error/10 text-error",children:x});const oe=Z=>{const{city:ce,state:q}=F(Z),xe=go(Z.loan_maturity),pe=mo(Z.loan_maturity),Se=go(Z.rate_lock_date),he=mo(Z.rate_lock_date);return o.jsxs("tr",{onClick:()=>fe(Z),className:"border-b border-white/5 transition-all duration-200 hover:bg-white/5 cursor-pointer group",children:[o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-base font-semibold text-white group-hover:text-accent transition-colors",children:Z.name}),Z.is_sample&&o.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-accent/20 text-accent border border-accent/30",children:"Sample"})]}),o.jsxs("div",{className:"text-xs text-muted-foreground",children:[ce,", ",q]})]})}),o.jsx("td",{className:"px-4 py-4 text-center",children:o.jsx("span",{className:"text-sm text-white",children:Z.unit_count||"â"})}),o.jsx("td",{className:"px-4 py-4 text-center",children:o.jsx("span",{className:"text-sm text-white",children:Z.construction_year||"â"})}),o.jsx("td",{className:"px-4 py-4 text-center",children:o.jsx("span",{className:"text-sm text-white",children:Z.purchase_date?Ct(Z.purchase_date,"short"):"â"})}),o.jsx("td",{className:"px-4 py-4 text-center",children:o.jsx("span",{className:"text-sm text-white",children:Z.purchase_price?Be(Z.purchase_price):"â"})}),o.jsx("td",{className:"px-4 py-4 text-center",children:o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{className:`text-sm ${pe?"text-error font-semibold":xe?"text-warning font-semibold":"text-white"}`,children:Z.loan_maturity?Ct(Z.loan_maturity,"short"):"â"}),(xe||pe)&&o.jsx(Jr,{className:`h-4 w-4 ${pe?"text-error":"text-warning"}`})]}),Z.loan_maturity&&(xe||pe)&&o.jsx("span",{className:`text-xs ${pe?"text-error":"text-warning"}`,children:VC(Z.loan_maturity)})]})}),o.jsx("td",{className:"px-4 py-4 text-center",children:o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{className:`text-sm ${he?"text-error font-semibold":Se?"text-warning font-semibold":"text-white"}
1333`,children:Z.rate_lock_date?Ct(Z.rate_lock_date,"short"):"â"}),(Se||he)&&o.jsx(Jr,{className:`h-4 w-4 ${he?"text-error":"text-warning"}`})]}),Z.rate_lock_date&&(Se||he)&&o.jsx("span",{className:`text-xs ${he?"text-error":"text-warning"}`,children:VC(Z.rate_lock_date)})]})})]},Z.id)};return o.jsxs("div",{className:"space-y-6",children:[(c==null?void 0:c.subscription_status)==="trial"&&o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 rounded-xl bg-amber-500/10 border border-amber-500/20",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(mC,{className:"w-4 h-4 text-amber-400 flex-shrink-0"}),o.jsxs("p",{className:"text-sm text-amber-200",children:[o.jsx("span",{className:"font-medium",children:"Free Trial"}),o.jsx("span",{className:"text-amber-200/70 mx-2",children:"â"}),o.jsxs("span",{className:"text-amber-200/70",children:[c.ai_credits??0," AI credits remaining"]})]})]}),o.jsxs("button",{onClick:()=>u("/billing"),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-amber-500/20 text-amber-300 hover:bg-amber-500/30 transition-colors",children:["Upgrade",o.jsx(yV,{className:"w-3 h-3"})]})]}),o.jsx("div",{className:"glass-card py-3 px-4","data-tour":"portfolio-kpi-cards",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-0",children:[o.jsxs("div",{onClick:()=>k("all"),className:"py-3 px-4 border-r border-white/10 cursor-pointer hover:bg-white/5 transition-colors",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("span",{className:"text-xs font-medium text-muted uppercase tracking-wider",children:"Properties"}),o.jsx(_i,{className:"h-5 w-5 text-accent transition-transform hover:scale-110"})]}),o.jsx("p",{className:"text-3xl font-bold text-white tabular-nums",children:d.length}),o.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:j==="all"?"Showing all":"Click to show all"})]}),o.jsxs("div",{className:"py-3 px-4 border-r border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("span",{className:"text-xs font-medium text-muted uppercase tracking-wider",children:"Units"}),o.jsx(Ru,{className:"h-5 w-5 text-accent transition-transform hover:scale-110"})]}),o.jsx("p",{className:"text-3xl font-bold text-white tabular-nums",children:H.totalUnits.toLocaleString()}),o.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Total units"})]}),o.jsxs("div",{"data-tour":"portfolio-loans-maturing",onClick:()=>{(H.loansPastDue>0||H.loansExpiringSoon>0)&&k("loansAlert")},className:`py-3 px-4 border-r border-white/10 transition-colors ${H.loansPastDue>0||H.loansExpiringSoon>0?"cursor-pointer hover:bg-white/5":""} ${j==="loansAlert"?"bg-white/5":""}`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("span",{className:"text-xs font-medium text-muted uppercase tracking-wider",children:"Loans Maturing"}),o.jsx(_u,{className:`h-5 w-5 transition-transform hover:scale-110 ${H.loansPastDue>0?"text-error":H.loansExpiringSoon>0?"text-warning":"text-accent"}`})]}),o.jsxs("div",{className:"flex items-baseline gap-1",children:[H.loansPastDue>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-3xl font-bold text-error tabular-nums",children:H.loansPastDue}),o.jsx("span",{className:"text-3xl font-light text-muted-foreground",children:"/"})]}),o.jsx("p",{className:"text-3xl font-bold tabular-nums text-warning",children:H.loansExpiringSoon})]}),o.jsx("p",{className:"text-sm mt-2",children:j==="loansAlert"?"Filtered":H.loansPastDue>0?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-error",children:"Past due"}),o.jsx("span",{className:"text-muted-foreground",children:" / "}),o.jsx("span",{className:"text-warning",children:"Within 6 mo"})]}):o.jsx("span",{className:"text-muted-foreground",children:"Within 6 months"})})]}),o.jsxs("div",{onClick:()=>{(H.rateResetsPastDue>0||H.rateResetsSoon>0)&&k("ratesAlert")},className:`py-3 px-4 transition-colors ${H.rateResetsPastDue>0||H.rateResetsSoon>0?"cursor-pointer hover:bg-white/5":""} ${j==="ratesAlert"?"bg-white/5":""}`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("span",{className:"text-xs font-medium text-muted uppercase tracking-wider",children:"Rate Resets"}),o.jsx(Jr,{className:`h-5 w-5 transition-transform hover:scale-110 ${H.rateResetsPastDue>0?"text-error":H.rateResetsSoon>0?"text-warning":"text-accent"}`})]}),o.jsxs("div",{className:"flex items-baseline gap-1",children:[H.rateResetsPastDue>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-3xl font-bold text-error tabular-nums",children:H.rateResetsPastDue}),o.jsx("span",{className:"text-3xl font-light text-muted-foreground",children:"/"})]}),o.jsx("p",{className:"text-3xl font-bold tabular-nums text-warning",children:H.rateResetsSoon})]}),o.jsx("p",{className:"text-sm mt-2",children:j==="ratesAlert"?"Filtered":H.rateResetsPastDue>0?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-error",children:"Past due"}),o.jsx("span",{className:"text-muted-foreground",children:" / "}),o.jsx("span",{className:"text-warning",children:"Within 6 mo"})]}):o.jsx("span",{className:"text-muted-foreground",children:"Within 6 months"})})]})]})}),o.jsxs("div",{className:"rounded-2xl p-0 border border-white/10",style:{overflow:"hidden",background:"rgba(30, 41, 59,
13330.5)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},children:[o.jsxs("div",{className:"px-6 py-4 border-b border-white/10",style:{background:"rgba(15, 23, 42, 0.5)",backdropFilter:"blur(8px)"},children:[o.jsxs("div",{className:"flex justify-between items-center mb-4",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("h2",{className:"text-xl font-semibold text-white tracking-wide",children:"PROPERTIES"}),o.jsx("span",{className:"text-sm font-medium text-muted",children:"Click on a property to view more detail"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(rt,{onClick:()=>M(!R),variant:"ghost",size:"sm",icon:bV,className:R?"bg-white/10 text-white border border-white/20":"border border-white/10",children:"Filters"}),o.jsx(rt,{onClick:t,variant:"primary",size:"sm",icon:_i,"data-tour":"portfolio-add-property",children:"Add Property"}),o.jsx(rt,{onClick:()=>r(),variant:"success",size:"sm",icon:uue,"data-tour":"portfolio-add-report",children:"Add Report"})]})]}),R&&o.jsxs("div",{className:"space-y-4 mb-4 p-4 bg-white/5 backdrop-blur-sm rounded-lg border border-white/10",children:[o.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-muted mb-1",children:"Search"}),o.jsx(j4,{value:O,onChange:Z=>A(Z.target.value),placeholder:"Search properties...",size:"md",showClearButton:!0})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-muted mb-1",children:"Filter By"}),o.jsxs("select",{value:j,onChange:Z=>k(Z.target.value),className:"w-full px-3 py-2 bg-white/10 border border-white/20 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-accent focus:border-accent",style:{backgroundColor:"rgba(15, 23, 42, 0.9)"},children:[o.jsx("option",{value:"all",children:"All Properties"}),o.jsx("option",{value:"hasLoanData",children:"Has Loan Data"}),o.jsx("option",{value:"noLoanData",children:"Missing Loan Data"}),o.jsx("option",{value:"city",children:"By City"}),o.jsx("option",{value:"state",children:"By State"})]})]}),(j==="city"||j==="state")&&o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-muted mb-1",children:j==="city"?"City Name":"State Name"}),o.jsx("input",{type:"text",value:E,onChange:Z=>T(Z.target.value),placeholder:`Enter ${j}...`,className:"w-full px-3 py-2 bg-white/10 border border-white/20 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-accent focus:border-accent",style:{backgroundColor:"rgba(15, 23, 42, 0.9)"}})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-muted uppercase tracking-wider mb-2",children:"Group By"}),o.jsxs("select",{value:P,onChange:Z=>I(Z.target.value),className:"w-full px-3 py-2 bg-white/10 border border-white/20 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-accent focus:border-accent",style:{backgroundColor:"rgba(15, 23, 42, 0.9)"},children:[o.jsx("option",{value:"none",children:"No Grouping"}),o.jsx("option",{value:"city",children:"City"}),o.jsx("option",{value:"state",children:"State"}),o.jsx("option",{value:"size",children:"Property Size"})]})]})]}),o.jsxs("div",{className:"text-sm text-gray-400",children:["Showing ",B.length," of ",d.length," properties",(j!=="all"||G)&&" (",G&&`searching: "${G}"`,G&&j!=="all"&&", ",j!=="all"&&`filtered by ${j}${E?`: ${E}`:""}`,(j!=="all"||G)&&")"]})]})]}),o.jsx("div",{className:"overflow-y-auto max-h-[600px] custom-scrollbar",style:{overflowX:"hidden"},"data-tour":"portfolio-properties-table",children:o.jsxs("table",{className:"w-full",style:{tableLayout:"fixed",background:"transparent"},children:[o.jsx("thead",{style:{background:"rgba(15, 23, 42, 0.8)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",position:"sticky",top:0,zIndex:10},children:o.jsxs("tr",{className:"text-left",children:[o.jsx("th",{onClick:()=>ae("name"),className:"cursor-pointer hover:bg-white/5 transition-colors w-[25%] px-6 py-4",children:o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:"Property"}),v==="name"&&o.jsx("span",{className:"text-accent",children:w==="asc"?"â
1333":"â"})]})}),o.jsx("th",{onClick:()=>ae("units"),className:"cursor-pointer hover:bg-white/5 transition-colors w-[10%] px-4 py-4 text-center",children:o.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:"Units"}),v==="units"&&o.jsx("span",{className:"text-accent",children:w==="asc"?"â":"â"})]})}),o.jsx("th",{onClick:()=>ae("yearBuilt"),className:"cursor-pointer hover:bg-white/5 transition-colors w-[10%] px-4 py-4 text-center",children:o.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:"Year Built"}),v==="yearBuilt"&&o.jsx("span",{className:"text-accent",children:w==="asc"?"â":"â"})]})}),o.jsx("th",{onClick:()=>ae("purchaseDate"),className:"cursor-pointer hover:bg-white/5 transition-colors w-[13%] px-4 py-4 text-center",children:o.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:"Purchase Date"}),v==="purchaseDate"&&o.jsx("span",{className:"text-accent",children:w==="asc"?"â":"â"})]})}),o.jsx("th",{onClick:()=>ae("purchaseAmount"),className:"cursor-pointer hover:bg-white/5 transition-colors w-[14%] px-4 py-4 text-center",children:o.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:"Purchase Amt"}),v==="purchaseAmount"&&o.jsx("span",{className:"text-accent",children:w==="asc"?"â":"â"})]})}),o.jsx("th",{onClick:()=>ae("loanMaturity"),className:"cursor-pointer hover:bg-white/5 transition-colors w-[14%] px-4 py-4 text-center",children:o.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:"Loan Maturity"}),v==="loanMaturity"&&o.jsx("span",{className:"text-accent",children:w==="asc"?"â":"â"})]})}),o.jsx("th",{onClick:()=>ae("rateReset"),className:"cursor-pointer hover:bg-white/5 transition-colors w-[14%] px-4 py-4 text-center",children:o.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:"Rate Reset"}),v==="rateReset"&&o.jsx("span",{className:"text-accent",children:w==="asc"?"â":"â"})]})})]})}),o.jsxs("tbody",{children:[P==="none"?X.map(Z=>oe(Z)):Object.entries(Y).map(([Z,ce])=>o.jsxs(se.Fragment,{children:[o.jsx("tr",{className:"bg-white/5",children:o.jsxs("td",{colSpan:7,className:"px-6 py-3 text-sm font-semibold text-accent uppercase tracking-wider",children:[Z," (",ce.length," properties)"]})}),ce.map(q=>oe(q))]},Z)),X.length===0&&o.jsx("tr",{children:o.jsx("td",{colSpan:7,className:"px-6 py-12 text-center",children:o.jsxs("div",{className:"text-muted",children:[o.jsx(_i,{className:"h-12 w-12 mx-auto mb-3 text-muted animate-pulse"}),o.jsx("p",{className:"text-sm mb-2",children:"No properties found"}),o.jsx(rt,{onClick:t,variant:"link",size:"sm",children:"Add your first property"})]})})})]})]})})]}),(H.loansPastDue>0||H.rateResetsPastDue>0)&&o.jsx("div",{className:"glass-card p-4 border-error/30 bg-error/10",children:o.jsxs("div",{className:"flex",children:[o.jsx(Jr,{className:"h-5 w-5 text-error flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"ml-3",children:[o.jsx("h3",{className:"text-sm font-medium text-error",children:"Past Due Loan Events"}),o.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[H.loansPastDue>0&&o.jsxs("span",{children:[H.loansPastDue," loan",H.loansPastDue>1?"s have":" has"," matured."," "]}),H.rateResetsPastDue>0&&o.jsxs("span",{children:[H.rateResetsPastDue," rate",H.rateResetsPastDue>1?"s have":" has"," already reset."]})]})]})]})}),(H.loansExpiringSoon>0||H.rateResetsSoon>0)&&o.jsx("div",{className:"glass-card p-4 border-warning/30 bg-warning/10",children:o.jsxs("div",{className:"flex",children:[o.jsx(Jr,{className:"h-5 w-5 text-warning flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"ml-3",children:[o.jsx("h3",{className:"text-sm font-medium text-warning",children:"Upcoming Loan Events"}),o.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[H.loansExpiringSoon>0&&o.jsxs("span",{children:[H.loansExpiringSoon," loan",H.loansExpiringSoon>1?"s":""," maturing within 6 months."," "]}),H.rateResetsSoon>0&&o.jsxs("span",{children:[H.rateResetsSoon," rate reset",H.rateResetsSoon>1?"s":""," within 6 months."]})]})]})]})}),!i&&o.jsx(dGe,{property:L,isOpen:W,onClose:()=>{V(!1),U(null)},onUpdate:ue,onUploadClick:r,cachedData:n[L==null?void 0:L.id],onUpdateCache:Z=>a(L==null?void 0:L.id,Z)},L==null?void 0:L.id)]})},hGe=()=>{const{user:e,logout:t}=Wi(),[r,n]=N.useState(!1),[a,i]=N.useState(""),[s,l]=N.useState(!1),[c,u]=N.useState(""),[d,f]=N.useState(!1),[p,m]=N.useState(null),[x,y]=N.useState(null),[v,b]=N.useState(!0);N.useEffect(()=>{(async()=>{try{const E=await Xe.get("/auth/deletion-status");y(E.data.deletionStatus)}catch(E){console.error("Failed to check deletion status:",E)}finally{b(!1)}})()},[]);const w=async k=>{var E,T;if(k.preventDefault(),!a){m("Please enter your password to confirm");return}f(!0),m(null);try{const O=await Xe.post("/auth/delete-account",{password:a,reason:c||void 0});O.data.success&&(alert(`Your account has been scheduled for deleti
1333on on ${new Date(O.data.deletionDate).toLocaleDateString()}. You can restore it within 30 days by logging back in.`),t())}catch(O){m(((T=(E=O.response)==null?void 0:E.data)==null?void 0:T.error)||"Failed to process deletion request")}finally{f(!1)}},S=async()=>{var k,E;f(!0),m(null);try{(await Xe.post("/auth/restore-account")).data.success&&(y(null),n(!1))}catch(T){m(((E=(k=T.response)==null?void 0:k.data)==null?void 0:E.error)||"Failed to restore account")}finally{f(!1)}},j=(e==null?void 0:e.auth_provider)==="google"&&!(e!=null&&e.hasPassword);return v?o.jsx("div",{className:"flex items-center justify-center py-8",children:o.jsx(ar,{className:"h-6 w-6 animate-spin text-gray-400"})}):x!=null&&x.isScheduled?o.jsxs("div",{className:"p-6 bg-yellow-500/10 border border-yellow-500/50 rounded-lg",children:[o.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[o.jsx(Bi,{className:"h-6 w-6 text-yellow-500 flex-shrink-0 mt-0.5"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-yellow-400",children:"Account Scheduled for Deletion"}),o.jsxs("p",{className:"text-sm text-gray-300 mt-1",children:["Your account will be permanently deleted on"," ",o.jsx("strong",{children:new Date(x.deletionDate).toLocaleDateString()})," (",x.daysRemaining," days remaining)"]})]})]}),p&&o.jsx("div",{className:"mb-4 p-3 bg-red-500/10 border border-red-500/50 rounded-lg text-red-400 text-sm",children:p}),o.jsxs("button",{onClick:S,disabled:d,className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-green-600 hover:bg-green-700 text-white font-medium rounded-lg transition-colors disabled:opacity-50",children:[d?o.jsx(ar,{className:"h-5 w-5 animate-spin"}):o.jsx(Fue,{className:"h-5 w-5"}),d?"Restoring...":"Restore My Account"]})]}):r?o.jsxs("div",{className:"p-6 bg-red-500/10 border border-red-500/50 rounded-lg",children:[o.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[o.jsx(Bi,{className:"h-6 w-6 text-red-500 flex-shrink-0 mt-0.5"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-red-400",children:"Confirm Account Deletion"}),o.jsx("p",{className:"text-sm text-gray-300 mt-1",children:"Please enter your password to confirm. You will have 30 days to restore your account."})]})]}),p&&o.jsx("div",{className:"mb-4 p-3 bg-red-500/10 border border-red-500/50 rounded-lg text-red-400 text-sm",children:p}),o.jsxs("form",{onSubmit:w,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Enter your password to confirm"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:s?"text":"password",value:a,onChange:k=>i(k.target.value),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-red-500/50 focus:border-red-500 pr-12",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0}),o.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-300",children:s?o.jsx(gg,{size:20}):o.jsx(cc,{size:20})})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Reason for leaving (optional)"}),o.jsxs("select",{value:c,onChange:k=>u(k.target.value),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-red-500/50",children:[o.jsx("option",{value:"",children:"Select a reason..."}),o.jsx("option",{value:"too_expensive",children:"Too expensive"}),o.jsx("option",{value:"not_using",children:"Not using the service"}),o.jsx("option",{value:"missing_features",children:"Missing features I need"}),o.jsx("option",{value:"switching_competitor",children:"Switching to a competitor"}),o.jsx("option",{value:"temporary",children:"Temporary break"}),o.jsx("option",{value:"other",children:"Other"})]})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{type:"button",onClick:()=>{n(!1),i(""),m(null)},className:"flex-1 px-4 py-2 bg-gray-700 hover:bg-gray-600 text-white font-medium rounded-lg transition-colors",children:"Cancel"}),o.jsxs("button",{type:"submit",disabled:d||!a,className:"flex-1 flex items-center justify-center gap-2 px-4 py-2 bg-red-600 hover:bg-red-700 text-white font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[d?o.jsx(ar,{className:"h-5 w-5 animate-spin"}):o.jsx(wl,{className:"h-5 w-5"}),d?"Deleting...":"Delete Account"]})]})]})]}):o.jsxs("div",{className:"p-6 bg-red-500/5 border border-red-500/20 rounded-lg",children:[o.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[o.jsx(Bi,{className:"h-6 w-6 text-red-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-red-400",children:"Danger Zone"}),o.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Once you delete your account, there is a 30-day grace peri
1333od to restore it. After that, all data is permanently deleted."})]})]}),j&&o.jsx("div",{className:"mb-4 p-3 bg-blue-500/10 border border-blue-500/50 rounded-lg text-blue-400 text-sm",children:"Your account uses Google Sign-In. Please contact support to delete your account."}),o.jsxs("button",{onClick:()=>n(!0),disabled:j,className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-red-600/20 hover:bg-red-600/30 text-red-400 font-medium rounded-lg border border-red-500/50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx(wl,{className:"h-5 w-5"}),"Delete My Account"]})]})},pGe={[Fi.PORTFOLIO_WELCOME]:"Portfolio Welcome",[Fi.FINANCIAL_TAB]:"Financial Analysis",[Fi.OCCUPANCY_TAB]:"Occupancy Overview",[Fi.AI_ANALYSIS_TAB]:"AI Analysis",[Fi.UPLOAD_FLOW]:"Upload Flow",[Fi.CATEGORIZATION]:"Expense Categorization",[Fi.PROPERTY_INFO]:"Property Info"},mGe=({isOpen:e,onClose:t,initialTab:r="profile"})=>{const{user:n,updateUserContext:a}=Wi(),{completedTours:i,isTourCompleted:s,resetTour:l,startTour:c}=Lu(),[u,d]=N.useState(!1),[f,p]=N.useState(!1),[m,x]=N.useState(null),[y,v]=N.useState(!1),[b,w]=N.useState(""),[S,j]=N.useState(r);N.useEffect(()=>{e&&j(r)},[e,r]);const[k,E]=N.useState({first_name:"",last_name:"",email:"",phone:"",company_name:"",company_website:""}),[T,O]=N.useState({currentPassword:"",newPassword:"",confirmPassword:""});N.useEffect(()=>{n&&E({first_name:n.first_name||"",last_name:n.last_name||"",email:n.email||"",phone:n.phone||"",company_name:n.company_name||"",company_website:n.company_website||""})},[n]);const A=async R=>{var M,L;R.preventDefault(),p(!0),x(null),v(!1);try{const U=await Xe.put("/auth/profile",{first_name:k.first_name,last_name:k.last_name,phone:k.phone,company_name:k.company_name,company_website:k.company_website});U.data.success&&(a(U.data.user),v(!0),setTimeout(()=>v(!1),3e3))}catch(U){x(((L=(M=U.response)==null?void 0:M.data)==null?void 0:L.error)||"Failed to update profile")}finally{p(!1)}},P=async R=>{var M,L;if(R.preventDefault(),T.newPassword!==T.confirmPassword){x("New passwords do not match");return}if(T.newPassword.length<8){x("Password must be at least 8 characters");return}p(!0),x(null),v(!1);try{(await Xe.put("/auth/password",{currentPassword:T.currentPassword,newPassword:T.newPassword})).data.success&&(v(!0),O({currentPassword:"",newPassword:"",confirmPassword:""}),setTimeout(()=>v(!1),3e3))}catch(U){x(((L=(M=U.response)==null?void 0:M.data)==null?void 0:L.error)||"Failed to update password")}finally{p(!1)}},I=R=>{l(R),t(),setTimeout(()=>c(R,{force:!0}),400)};return e?o.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:o.jsxs("div",{className:"bg-gray-900/95 backdrop-blur-xl rounded-xl w-full max-w-2xl max-h-[90vh] overflow-hidden shadow-2xl border border-gray-800",children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-800",children:[o.jsx("h2",{className:"text-xl font-semibold text-white",children:"Account Settings"}),o.jsx("button",{onClick:t,className:"p-2 hover:bg-white/10 rounded-lg transition-colors",children:o.jsx(Ir,{className:"h-5 w-5 text-gray-400"})})]}),o.jsxs("div",{className:"flex border-b border-gray-800",children:[o.jsxs("button",{onClick:()=>j("profile"),className:`flex-1 px-4 py-3 text-sm font-medium transition-colors ${S==="profile"?"text-accent border-b-2 border-accent":"text-gray-400 hover:text-white"}`,children:[o.jsx(pC,{className:"h-4 w-4 inline mr-2"}),"Profile"]}),o.jsxs("button",{onClick:()=>j("password"),className:`flex-1 px-4 py-3 text-sm font-medium transition-colors ${S==="password"?"text-accent border-b-2 border-accent":"text-gray-400 hover:text-white"}`,children:[o.jsx(hC,{className:"h-4 w-4 inline mr-2"}),"Password"]}),o.jsxs("button",{onClick:()=>j("tours"),className:`flex-1 px-4 py-3 text-sm font-medium transition-colors ${S==="tours"?"text-accent border-b-2 border-accent":"text-gray-400 hover:text-white"}`,children:[o.jsx(Qce,{className:"h-4 w-4 inline mr-2"}),"Tours"]}),o.jsxs("button",{onClick:()=>j("account"),className:`flex-1 px-4 py-3 text-sm font-medium transition-colors ${S==="account"?"text-red-400 border-b-2 border-red-400":"text-gray-400 hover:text-white"}`,children:[o.jsx(Bi,{className:"h-4 w-4 inline mr-2"}),"Account"]})]}),o.jsxs("div",{className:"p-6 overflow-y-auto max-h-[calc(90vh-8rem)]",children:[m&&o.jsx("div",{className:"mb-4 p-3 bg-red-500/10 border border-red-500/50 rounded-lg text-red-400 text-sm",children:m}),y&&o.jsx("div",{className:"mb-4 p-3 bg-green-500/10 border border-green-500/50 rounded-lg text-green-400 text-sm",children:b||"Successfully updated!"}),S==="profile"&&o.jsxs("form",{onSubmit:A,className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:[o.jsx(pC,{className:"h-4 w-4 inline mr-2"}),"First Name"]}),o.jsx("input",{type:"text",value:k.first_name,onChange:R=>E({...k,first_name:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",placeholder:"John"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Last Name"}),o.jsx("input",{type:"text",value:k.last_name,onChange:R=>E({...k,last_name:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",placeholder:"Doe"})]})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:[o.jsx(wV,{className:"h-4 w-4 inline mr-2"}),"Email"]}),o.jsx("input",{type:"email",value:k.email,disabled:!0,className:"w-full px-4 py-2 bg-gray-800/30 border border-gray-700 rounded-lg text-gray-400 cursor-not-allowed"}),o.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Email cannot be changed"})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:[o.jsx(Oue,{className:"h-4 w-4 inline mr-2"}),"Phone Number"]}),o.jsx("input",{type:"tel",value:k.phone,onChange:R=>
1333E({...k,phone:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",placeholder:"+1 (555) 123-4567"})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:[o.jsx(_i,{className:"h-4 w-4 inline mr-2"}),"Company Name"]}),o.jsx("input",{type:"text",value:k.company_name,onChange:R=>E({...k,company_name:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",placeholder:"Acme Real Estate"})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:[o.jsx(mue,{className:"h-4 w-4 inline mr-2"}),"Company Website"]}),o.jsx("input",{type:"url",value:k.company_website,onChange:R=>E({...k,company_website:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",placeholder:"https://example.com"})]}),o.jsx("div",{className:"flex justify-end",children:o.jsxs("button",{type:"submit",disabled:f,className:"px-6 py-2 bg-accent hover:bg-accent-light text-primary font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[o.jsx(Po,{className:"h-4 w-4"}),f?"Saving...":"Save Changes"]})})]}),S==="password"&&o.jsxs("form",{onSubmit:P,className:"space-y-6",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Current Password"}),o.jsx("input",{type:"password",value:T.currentPassword,onChange:R=>O({...T,currentPassword:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",required:!0})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"New Password"}),o.jsx("input",{type:"password",value:T.newPassword,onChange:R=>O({...T,newPassword:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",required:!0}),o.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Must be at least 8 characters with at least one letter and one number"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Confirm New Password"}),o.jsx("input",{type:"password",value:T.confirmPassword,onChange:R=>O({...T,confirmPassword:R.target.value}),className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",required:!0})]}),o.jsx("div",{className:"flex justify-end",children:o.jsxs("button",{type:"submit",disabled:f,className:"px-6 py-2 bg-accent hover:bg-accent-light text-primary font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[o.jsx(hC,{className:"h-4 w-4"}),f?"Updating...":"Update Password"]})})]}),S==="tours"&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"Onboarding Tours"}),o.jsx("p",{className:"text-sm text-gray-400 mb-6",children:"Replay tours to learn about SAMI's features"})]}),o.jsx("div",{className:"space-y-3",children:VY.map(R=>{const M=s(R.id),L=pGe[R.id]||R.id,U=R.steps.length;return o.jsxs("div",{className:"flex items-center justify-between p-4 bg-card/50 backdrop-blur-sm border border-white/20 rounded-lg hover:border-white/30 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[o.jsx("div",{className:"flex-1",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("h4",{className:"text-sm font-medium text-white",children:L}),o.jsxs("span",{className:"text-xs text-gray-400",children:[U," ",U===1?"step":"steps"]})]})}),o.jsx("div",{className:"flex items-center gap-3",children:M?o.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-green-400",children:[o.jsx("span",{className:"w-2 h-2 rounded-full bg-green-400"}),"Completed"]}):o.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-gray-400",children:[o.jsx("span",{className:"w-2 h-2 rounded-full bg-gray-600"}),"Not started"]})})]}),o.jsx(rt,{variant:"ghost",size:"sm",onClick:()=>I(R.id),className:"ml-4",children:"Replay"})]},R.id)})})]}),S==="account"&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"Account Management"}),o.jsx("p",{className:"text-sm text-gray-400 mb-6",children:"Manage your account settings and deletion preferences."})]}),o.jsx(hGe,{})]})]})]})}):null};
1333class rre extends Error{constructor(t,r=[]){super(t),this.name="BenchmarkSaveError",this.fieldErrors=r}}const gGe=(e,t)=>t.reduce((r,n)=>r==null?void 0:r[n],e),xGe=(e,t,r)=>{let n=e;for(let a=0;a<t.length-1;a++)(n[t[a]]===null||typeof n[t[a]]!="object")&&(n[t[a]]={}),n=n[t[a]];n[t[t.length-1]]=r};class yGe{async getSchema(){try{return(await Xe.get("/benchmarks/schema")).data.data.fields}catch(t){throw console.error("Error fetching benchmark schema:",t),t}}async getDefaultBenchmarks(){try{return(await Xe.get("/benchmarks/defaults")).data.data}catch(t){throw console.error("Error fetching default benchmarks:",t),t}}async getUserBenchmarks(){try{return(await Xe.get("/benchmarks")).data.data}catch(t){throw console.error("Error fetching benchmarks:",t),t}}async updatePropertyClassBenchmarks(t,r){const n=await Xe.put(`/benchmarks/${t}`,r,{validateStatus:a=>a===200||a===400});if(!n.data||n.data.success!==!0){const a=n.data||{};throw new rre(a.error||"Failed to save benchmarks",Array.isArray(a.errors)?a.errors:[])}return{data:n.data.data,warnings:Array.isArray(n.data.warnings)?n.data.warnings:[]}}async resetPropertyClassBenchmarks(t){try{return(await Xe.delete(`/benchmarks/${t}`)).data}catch(r){throw console.error(`Error resetting benchmarks for class ${t}:`,r),r}}async getPresets(){try{return(await Xe.get("/benchmarks/presets")).data.data}catch(t){throw console.error("Error fetching benchmark presets:",t),t}}async getPreset(t){try{return(await Xe.get(`/benchmarks/presets/${t}`)).data.data}catch(r){throw console.error(`Error fetching preset ${t}:`,r),r}}async createPreset(t){try{return(await Xe.post("/benchmarks/presets",t)).data.data}catch(r){throw console.error("Error creating benchmark preset:",r),r}}async updatePreset(t,r){try{return(await Xe.put(`/benchmarks/presets/${t}`,r)).data.data}catch(n){throw console.error(`Error updating preset ${t}:`,n),n}}async activatePreset(t){try{return(await Xe.post(`/benchmarks/presets/${t}/activate`)).data.data}catch(r){throw console.error(`Error activating preset ${t}:`,r),r}}async deletePreset(t){try{return(await Xe.delete(`/benchmarks/presets/${t}`)).data}catch(r){throw console.error(`Error deleting preset ${t}:`,r),r}}async getAuditTrail(t={}){try{const r=new URLSearchParams;return t.limit&&r.append("limit",t.limit),t.offset&&r.append("offset",t.offset),(await Xe.get(`/benchmarks/audit?${r.toString()}`)).data}catch(r){throw console.error("Error fetching benchmark audit trail:",r),r}}async saveCurrentAsPreset(t,r,n,a,i=!1){const s=this.transformUIToDatabase(t,a),l={preset_name:r,description:n,benchmark_data:JSON.stringify(s),make_active:i};return await this.createPreset(l)}async updatePresetFromCurrent(t,r,n){const a=this.transformUIToDatabase(r,n);return await this.updatePreset(t,{benchmark_data:JSON.stringify(a)})}async applyPreset(t){try{return await this.activatePreset(t),await this.getUserBenchmarks()}catch(r){throw console.error(`Error applying preset ${t}:`,r),r}}formatBenchmarksForUI(t,r=[]){const n={A:{},B:{},C:{}};return t&&t.propertyClasses&&Object.keys(t.propertyClasses).forEach(a=>{const i=t.propertyClasses[a],s={};r.forEach(l=>{const c=gGe(i,l.path),u=typeof c=="string"?parseFloat(c):c;s[l.column]=Number.isFinite(u)?u:null}),s.description=i.description||"",s.characteristics=i.characteristics||[],n[a]=s}),n}transformUIToDatabase(t,r=[]){const n={propertyClasses:{}};return Object.keys(t||{}).forEach(a=>{const i=t[a]||{},s={description:i.description||"",characteristics:i.characteristics||[]};r.forEach(l=>{const c=i[l.column];if(c===void 0)return;const u=c===null||c===""?null:Number(c);xGe(s,l.path,Number.isFinite(u)?u:null)}),n.propertyClasses[a]=s}),n}}const li=new yGe,Rw=e=>{if(e==null||e==="")return null;const t=typeof e=="number"?e:parseFloat(e);return Number.isFinite(t)?t:null},hq=(e,t,r)=>{const n={};return Object.keys(e||{}).forEach(a=>{const i=new Set;r.forEach(s=>{var c,u;const l=Rw((c=e[a])==null?void 0:c[s.column]);l!==null&&l!==Rw((u=t==null?void 0:t[a])==null?void 0:u[s.column])&&i.add(s.column)}),n[a]=i}),n},pq=(e,t,r)=>{const n={};return r.forEach(a=>
1333{n[a.column]=t!=null&&t.has(a.column)?Rw(e==null?void 0:e[a.column]):null}),n},vGe=e=>{const[t,r]=N.useState([]),[n,a]=N.useState(null),[i,s]=N.useState(null),[l,c]=N.useState(null),[u,d]=N.useState({}),[f,p]=N.useState({}),[m,x]=N.useState([]),[y,v]=N.useState(null),[b,w]=N.useState(!1),[S,j]=N.useState(!0),[k,E]=N.useState(!1),[T,O]=N.useState(null),[A,P]=N.useState([]),[I,R]=N.useState([]),[M,L]=N.useState(null),[U,W]=eX(`benchmark-drafts-${e}`,{}),V=N.useMemo(()=>{if(!n||!i||t.length===0)return{};const xe={};return Object.keys(n).forEach(pe=>{const Se=pq(n[pe],u[pe],t),he=pq(i[pe],f[pe],t),ie={};t.forEach(we=>{Se[we.column]!==he[we.column]&&(ie[we.column]=Se[we.column])}),Object.keys(ie).length>0&&(xe[pe]=ie)}),xe},[n,i,u,f,t]),G=Object.keys(V).length>0,K=N.useMemo(()=>Object.keys(V),[V]);N.useEffect(()=>{(async()=>{if(e)try{j(!0),O(null);const[pe,Se,he,ie]=await Promise.all([li.getSchema(),li.getUserBenchmarks(),li.getPresets(),li.getDefaultBenchmarks()]),we=li.formatBenchmarksForUI(Se,pe),ke=li.formatBenchmarksForUI(ie,pe),Oe=hq(we,ke,pe);w(Se.hasCustomizations||!1);let Ue=we,Je=Oe;if(Object.keys(U||{}).length>0){const te=bGe(we,Oe,U,ke);Ue=te.values,Je=te.overrides,vr("Restored unsaved changes")}r(pe),a(Ue),d(Je),s(we),p(Oe),c(ke),x(he);const Ze=he.find(te=>te.is_active);v(Ze||null)}catch(pe){console.error("Failed to load benchmark data:",pe),O(pe.message||"Failed to load benchmarks"),vr.error("Failed to load benchmarks")}finally{j(!1)}})()},[e]);const F=N.useMemo(()=>JSON.stringify(V),[V]);N.useEffect(()=>{S||W(JSON.parse(F))},[F,S]);const ne=N.useCallback((xe,pe)=>{a(Se=>{var he;return{...Se,[xe]:{...Se[xe],[pe]:((he=l==null?void 0:l[xe])==null?void 0:he[pe])??null}}}),d(Se=>{const he=new Set(Se[xe]||[]);return he.delete(pe),{...Se,[xe]:he}})},[l]),H=N.useCallback((xe,pe,Se)=>{if(Rw(Se)===null){ne(xe,pe);return}a(he=>({...he,[xe]:{...he[xe],[pe]:Se}})),d(he=>{const ie=new Set(he[xe]||[]);return ie.add(pe),{...he,[xe]:ie}})},[ne]),B=N.useCallback((xe,pe)=>{var Se;return!!((Se=u[xe])!=null&&Se.has(pe))},[u]),X=N.useCallback((xe,pe)=>{var Se;return((Se=l==null?void 0:l[xe])==null?void 0:Se[pe])??null},[l]),Y=N.useCallback(async()=>{if(!G)return{saved:[],errors:[],warnings:[],ok:!0};E(!0),O(null),P([]),R([]),L(null);const xe=[],pe=[],Se=[];let he=null;try{for(const[ie,we]of Object.entries(V))try{const ke=await li.updatePropertyClassBenchmarks(ie,we);
1333xe.push(ie),ke.warnings.forEach(Oe=>pe.push({...Oe,propertyClass:ie}))}catch(ke){if(ke instanceof rre){he=ke.message,ke.fieldErrors.forEach(Oe=>Se.push({...Oe,propertyClass:ie}));break}throw ke}xe.length>0&&(s(ie=>{const we={...ie};return xe.forEach(ke=>{we[ke]=n[ke]}),we}),p(ie=>{const we={...ie};return xe.forEach(ke=>{we[ke]=new Set(u[ke]||[])}),we}),w(!0)),R(pe),P(Se),L(he),Se.length>0?vr.error(he||"Those thresholds were refused, so nothing was saved"):pe.length>0?vr.success("Benchmarks saved with warnings"):vr.success("Benchmarks saved successfully")}catch(ie){console.error("Failed to save benchmarks:",ie),O(ie.userMessage||ie.message||"Failed to save benchmarks"),vr.error("Failed to save benchmarks")}finally{E(!1)}return{saved:xe,errors:Se,warnings:pe,ok:Se.length===0&&xe.length===Object.keys(V).length}},[G,V,n,u]),ae=N.useCallback(async xe=>{try{E(!0),P([]),R([]),L(null),await li.resetPropertyClassBenchmarks(xe);const pe=l==null?void 0:l[xe];a(he=>({...he,[xe]:pe})),s(he=>({...he,[xe]:pe})),d(he=>({...he,[xe]:new Set})),p(he=>({...he,[xe]:new Set}));const Se=await li.getUserBenchmarks();w(Se.hasCustomizations||!1),v(null),vr.success(`Class ${xe} benchmarks reset to defaults`)}catch(pe){console.error(`Failed to reset class ${xe}:`,pe),vr.error(`Failed to reset class ${xe}`)}finally{E(!1)}},[l]),fe=N.useCallback(()=>{i&&(a(i),d(Object.fromEntries(Object.entries(f).map(([xe,pe])=>[xe,new Set(pe)]))),P([]),R([]),L(null),vr("All changes reverted"))},[i,f]),ue=N.useCallback(async(xe,pe,Se=!1)=>{try{E(!0);const he=await li.saveCurrentAsPreset(n,xe,pe,t,Se);return x(ie=>[...ie,he]),Se&&v(he),vr.success(`Preset "${xe}" saved successfully`),he}catch(he){throw console.error("Failed to save preset:",he),vr.error("Failed to save preset"),he}finally{E(!1)}},[n,t]),oe=N.useCallback(async()=>{const xe=await Y();if(!xe.ok||!y)return xe;try{E(!0);const pe=await li.updatePresetFromCurrent(y.id,n,t);x(Se=>Se.map(he=>he.id===y.id?{...he,...pe}:he)),v(Se=>Se&&Se.id===y.id?{...Se,...pe}:Se),vr.success(`Preset "${y.preset_name}" updated`)}catch(pe){console.error("Failed to update the active preset:",pe),vr.error(`Benchmarks saved, but the preset "${y.preset_name}" was not updated`)}finally{E(!1)}return xe},[Y,y,n,t]),Z=N.useCallback(async(xe,pe)=>{const Se=await Y();if(!Se.ok)return Se;try{await ue(xe,pe,!0)}catch(he){console.error("Failed to create the new preset:",he)}return Se},[Y,ue]),ce=N.useCallback(async xe=>{try{if(E(!0),P([]),R([]),L(null),xe==="default"){if(!l)throw new Error("Default benchmarks not loaded");const pe=Object.fromEntries(Object.keys(l).map(Se=>[Se,new Set]));a(l),s(l),d(pe),p(pe),v(null),w(!1),await Promise.all(Object.keys(l).map(Se=>li.resetPropertyClassBenchmarks(Se))),vr.success("Applied Industry Standard benchmarks")}else{const pe=await li.applyPreset(xe),Se=li.formatBenchmarksForUI(pe,t),he=hq(Se,l,t);a(Se),s(Se),d(he),p(he);const ie=m.find(we=>we.id===xe);v(ie||null),w(!0),vr.success("Preset applied successfully")}}catch(pe){throw console.error("Failed to apply preset:",pe),vr.error("Failed to apply preset"),pe}finally{E(!1)}},[m,l,t]),q=N.useCallback(async xe=>{try{E(!0),await li.deletePreset(xe),x(pe=>pe.filter(Se=>Se.id!==xe)),(y==null?void 0:y.id)===xe&&v(null),vr.success("Preset deleted successfully")}catch(pe){throw console.error("Failed to delete preset:",pe),vr.error("Failed to delete preset"),pe}finally{E(!1)}},[y]);return{schemaFields:t,benchmarks:n,originalBenchmarks:i,presets:m,activePreset:y,hasChanges:G,hasCustomValues:b,modifiedClasses:K,pendingUpdates:V,draftChanges:Object.keys(U||{}).length>0?U:null,saveErrors:A,saveWarnings:I,saveRefusal:M,isLoading:S,isSaving:k,error:T,updateBenchmark:H,releaseBenchmark:ne,isOverridden:B,defaultValueFor:X,saveAllChanges:Y,saveAndUpdateActivePreset:oe,saveAndCreatePreset:Z,resetPropertyClass:ae,resetAllChanges:fe,saveAsPreset:ue,applyPreset:ce,deletePreset:q,reload:()=>window.location.reload()}};function bGe(e,t,r,n){const a={...e},i=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,new Set(l)]));return Object.keys(r||{}).forEach(s=>{if(!a[s])return;const l={...a[s]},c=new Set(i[s]||[]);Object.entries(r[s]||{}
1333).forEach(([u,d])=>{var f;d==null?(l[u]=((f=n==null?void 0:n[s])==null?void 0:f[u])??null,c.delete(u)):(l[u]=d,c.add(u))}),a[s]=l,i[s]=c}),{values:a,overrides:i}}const nre=N.memo(({presets:e=[],activePreset:t,currentBenchmarks:r,hasCustomValues:n=!1,onApplyPreset:a,onSavePreset:i,onDeletePreset:s})=>{const[l,c]=N.useState(!1),[u,d]=N.useState(!1),[f,p]=N.useState(null),[m,x]=N.useState(!1),[y,v]=N.useState({presetName:"",presetDescription:"",makeActive:!1}),b=async()=>{if(y.presetName.trim()){x(!0);try{await i(y.presetName,y.presetDescription,y.makeActive),c(!1),v({presetName:"",presetDescription:"",makeActive:!1})}catch(k){console.error("Failed to save preset:",k)}finally{x(!1)}}},w=async()=>{if(f)try{await s(f.id),d(!1),p(null)}catch(k){console.error("Failed to delete preset:",k)}},j=[{id:"default",preset_name:"Industry Standard",description:"Default benchmark values based on industry standards",is_active:!t&&!n,created_at:null,updated_at:null},...e];return o.jsxs("div",{className:"bg-card/30 backdrop-blur-sm border border-white/10 rounded-lg p-6 space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h4",{className:"text-md font-medium text-white",children:"Benchmark Presets"}),o.jsxs(rt,{variant:"primary",size:"sm",onClick:()=>c(!0),className:"flex items-center gap-2",children:[o.jsx(Po,{className:"h-4 w-4"}),"Save Current as Preset"]})]}),o.jsx("div",{className:"space-y-2",children:j.length===1?o.jsx("p",{className:"text-sm text-gray-400 text-center py-4",children:"No custom presets saved yet. Save your current configuration as a preset to quickly switch between different benchmark sets."}):j.map(k=>{const E=k.id==="default"?!t&&!n:t&&t.id===k.id,T=k.id==="default";return o.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border transition-colors ${E?"bg-accent/10 border-accent/30":"bg-white/5 border-white/10 hover:bg-white/10"}`,children:[o.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[o.jsx("div",{className:`p-2 rounded-lg ${E?"bg-accent/20":"bg-white/10"}`,children:T?o.jsx(Que,{className:"h-4 w-4 text-accent"}):o.jsx(Sn,{className:"h-4 w-4 text-gray-400"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:`font-medium ${E?"text-accent":"text-white"}`,children:k.preset_name}),E&&o.jsx("span",{className:"px-2 py-0.5 bg-accent/20 text-accent text-xs rounded-full",children:"Active"})]}),k.description&&o.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:k.description}),k.updated_at&&o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Updated ",Ct(k.updated_at)]})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[!E&&o.jsxs(rt,{variant:"secondary",size:"sm",onClick:()=>a(T?"default":k.id),className:"text-xs",children:[o.jsx(t1,{className:"h-3 w-3 mr-1"}),"Apply"]}),!T&&o.jsx("button",{onClick:()=>{p(k),d(!0)},className:"p-2 hover:bg-red-500/20 rounded-lg transition-colors",title:"Delete preset",children:o.jsx(wl,{className:"h-3 w-3 text-red-400"})})]})]},k.id)})}),o.jsx(bf,{isOpen:l,onClose:()=>c(!1),title:"Save Benchmark Preset",size:"medium",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Preset Name"}),o.jsx("input",{type:"text",value:y.presetName,onChange:k=>v(E=>({...E,presetName:k.target.value})),placeholder:"e.g., Conservative Underwriting",className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",autoFocus:!0})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Description (Optional)"}),o.jsx("textarea",{value:y.presetDescription,onChange:k=>v(E=>({...E,presetDescription:k.target.value})),placeholder:"Describe when to use this preset...",rows:3,className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent resize-none"})]}),o.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:y.makeActive,onChange:k=>v(E=>({...E,makeActive:k.target.checked})),className:"w-4 h-4 bg-gray-800 border-gray-600 rounded text-accent focus:ring-accent"}),o.jsx("span",{className:"text-sm text-gray-300",children:"Make this preset active immediately"})]}),o.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-gray-800",children:[o.jsx(rt,{variant:"secondary",onClick:()=>c(!1),disabled:m,children:"Cancel"}),o.jsxs(rt,{variant:"primary",onClick:b,disabled:!y.presetName.trim()||m,children:[o.jsx(Po,{className:"h-4 w-4 mr-2"}),m?"Saving...":"Save Preset"]})]})]})}),o.jsx(ki,{isOpen:u,onConfirm:w,onCancel:()=>{d(!1),p(null)},title:"Delete Preset",message:`Are you sure you want to delete the preset "${f==null?void 0:f.preset_name}"? This action cannot be undone.`,confirmText:"Delete",confirmVariant:"danger"})]})});nre.displayName="BenchmarkPresetManager";const wGe=e=>{const t=[];for(const r of e){const n=t[t.length-1];n&&n.metric===r.metric?n.fields.push(r):t.push({metric:r.metric,title:r.section,fields:[r]})}return t},_Ge=e=>{const t=[];return e.unitLabel&&t.push(e.unitLabel),e.worse&&t.push(e.worse==="higher"?"higher is worse":"lower is worse"),t.join(" · ")},SGe=({userId:e})=>{const{schemaFields:t,benchmarks:r,hasChanges:n,hasCustomValues:a,modifiedClasse
1333s:i,isLoading:s,isSaving:l,error:c,saveErrors:u,saveWarnings:d,saveRefusal:f,updateBenchmark:p,releaseBenchmark:m,isOverridden:x,defaultValueFor:y,saveAllChanges:v,saveAndUpdateActivePreset:b,saveAndCreatePreset:w,resetPropertyClass:S,resetAllChanges:j,presets:k,activePreset:E,saveAsPreset:T,applyPreset:O,deletePreset:A}=vGe(e),[P,I]=N.useState(new Set(["A"])),[R,M]=N.useState(!1),[L,U]=N.useState(null),[W,V]=N.useState({name:"",description:""}),G=N.useMemo(()=>wGe(t),[t]),K=ae=>{I(fe=>{const ue=new Set(fe);return ue.has(ae)?ue.delete(ae):ue.add(ae),ue})},F=()=>{U(null),V({name:"",description:""})},ne=async()=>{if(E&&n){U("ask");return}await v()},H=async ae=>{if(ae==="update"){F(),await b();return}ae==="new"&&U("name")},B=async()=>{const ae=W.name.trim();if(!ae)return;const fe=W.description;F(),await w(ae,fe)};if(s)return o.jsx(E_,{message:"Loading benchmark configurations..."});if(c)return o.jsx(k_,{error:c,onRetry:()=>window.location.reload()});if(!r)return null;const X=[{code:"A",name:"Class A - Premium Properties",color:"text-green-400"},{code:"B",name:"Class B - Mid-Market Properties",color:"text-blue-400"},{code:"C",name:"Class C - Workforce Housing",color:"text-orange-400"}],Y=(ae,fe)=>u.find(ue=>ue.propertyClass===ae&&(ue.path===fe||(ue.fields||[]).includes(fe)));return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-white/20 rounded-lg p-6",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:"Customize AI Analysis Benchmarks"}),o.jsx("p",{className:"text-gray-300 text-sm",children:"Personalize the benchmark thresholds used in AI property analysis. These values will be used when generating insights and recommendations."}),o.jsx("p",{className:"text-accent text-sm mt-2",children:E?o.jsxs(o.Fragment,{children:["Active Preset: ",o.jsx("span",{className:"font-medium",children:E.preset_name}),n&&" (Modified)"]}):a?o.jsxs(o.Fragment,{children:["Status: ",o.jsx("span",{className:"font-medium",children:"Custom Configuration"})]}):n?o.jsxs(o.Fragment,{children:["Status: ",o.jsx("span",{className:"font-medium",children:"Industry Standard (Modified)"})]}):o.jsxs(o.Fragment,{children:["Status: ",o.jsx("span",{className:"font-medium",children:"Industry Standard"})]})})]}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs(rt,{variant:"secondary",size:"sm",onClick:()=>M(!R),className:"flex items-center gap-2",children:[R?o.jsx(kr,{className:"h-4 w-4"}):o.jsx(yl,{className:"h-4 w-4"}),"Presets (",k.length,")"]})})]}),n&&o.jsxs("div",{className:"flex items-center gap-2 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg text-yellow-400 text-sm",children:[o.jsx(Jr,{className:"h-4 w-4"}),o.jsx("span",{children:"You have unsaved changes"}),i.length>0&&o.jsxs("span",{className:"text-xs opacity-75",children:["(Modified: ",i.join(", "),")"]})]})]}),u.length>0&&o.jsxs("div",{"data-testid":"benchmark-save-errors",className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-red-400 text-sm font-medium",children:[o.jsx($d,{className:"h-4 w-4"}),o.jsx("span",{children:f||"These thresholds were refused, so nothing was saved"})]}),o.jsx("ul",{className:"space-y-1 pl-6 list-disc",children:u.map((ae,fe)=>o.jsxs("li",{className:"text-xs text-red-300",children:[o.jsxs("span",{className:"font-medium",children:["Class ",ae.propertyClass,": "]}),ae.msg]},`${ae.propertyClass}-${ae.path}-${fe}`))})]}),d.length>0&&o.jsxs("div",{"data-testid":"benchmark-save-warnings",className:"bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-4 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm font-medium",children:[o.jsx(Bi,{className:"h-4 w-4"}),o.jsx("span",{children:"Saved, with something worth knowing"})]}),o.jsx("ul",{className:"space-y-1 pl-6 list-disc",children:d.map((ae,fe)=>o.jsxs("li",{className:"text-xs text-yellow-200",children:[o.jsxs("span",{className:"font-medium",children:["Class ",ae.propertyClass,": "]}),ae.msg]},`${ae.propertyClass}-${ae.path}-${fe}`))})]}),R&&o.jsx(nre,{presets:k,activePreset:E,currentBenchmarks:r,hasCustomValues:a,onApplyPreset:O,onSavePreset:T,onDeletePreset:A}),o.jsx("div",{className:"space-y-4",children:X.map(({code:ae,name:fe,color:ue})=>{const oe=P.has(ae),Z=i.includes(ae),ce=r[ae]||{};return o.jsxs("div",{className:"bg-card/30 backdrop-blur-sm border border-white/10 rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"w-full flex items-center justify-between p-4",children:[o.jsxs("button",{onClick:()=>K(ae),className:"flex-1 flex items-center gap-3 hover:bg-white/5 transition-colors rounded-lg p-2 -m-2",children:[oe?o.jsx(kr,{className:"h-5 w-5 text-gray-400"}):o.jsx(yl,{className:"h-5 w-5 text-gray-400"}),o.jsx("span",{className:`font-medium ${ue}`,children:fe}),Z&&o.jsx("span",{className:"px-2 py-1 bg-yellow-500/20 text-yellow-400 text-xs rounded-full",children:"Modified"})]}),o.jsx(rt,{variant:"secondary",size:"sm",onClick:()=>S(ae),className:"text-xs ml-2",children:"Reset Class"})]}),oe&&o.jsx("div",{"data-testid":`benchmark-class-${ae}`,className:"border-t border-white/10 p-6 space-y-6",children:G.map(q=>o.jsxs("div",{"data-testid":`benchmark-section-${q.metric}`,children:[o.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:q.title}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:q.fields.map(xe=>{const pe=x(ae,xe.column),Se=y(ae,xe.column),he=Y(ae,xe.column),ie=_Ge(xe);return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("label",{"data-testid":`benchmark-label-${xe.column}`,className:"block text-xs font-medium text-gray-400",children:xe.label}),o.jsx("span",{"data-testid":`benchmark-origin-${xe.column}`,title:pe?`You set this. The Class ${ae} default is ${Se}.`:`Inherited from the Class ${ae} default (${Se}).`,className:pe?"px-2 py-0.5 rounded-full text-[10px] uppercase tracking-wider bg-accent/20 text-accent":"px-2 py-0.5 rounded-full text-[10px] uppercase tracking-wider bg-white/5 text-gray-500",children:pe?"Custom"
1333:"Default"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Qt,{type:xe.inputKind,value:ce[xe.column]===null||ce[xe.column]===void 0?"":String(ce[xe.column]),isEditing:!0,onChange:we=>p(ae,xe.column,we),min:xe.min,max:xe.max,step:xe.step,suffix:xe.inputKind==="percentage"?xe.unitLabel:"",className:"flex-1","data-testid":`benchmark-input-${xe.column}`}),o.jsx("button",{"data-testid":`benchmark-reset-${xe.column}`,onClick:()=>m(ae,xe.column),disabled:!pe,className:"p-2 hover:bg-white/10 rounded-lg transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:pe?`Reset to the Class ${ae} default (${Se})`:"Already using the class default",children:o.jsx(Gh,{className:"h-3 w-3 text-gray-500"})})]}),he?o.jsx("p",{"data-testid":`benchmark-error-${xe.column}`,className:"text-xs text-red-400",children:he.msg}):ie&&o.jsx("p",{className:"text-xs text-gray-500",children:ie})]},xe.column)})})]},q.metric))})]},ae)})}),o.jsxs("div",{className:"flex justify-between items-center pt-6 border-t border-white/10",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[o.jsx(Jr,{className:"h-4 w-4"}),o.jsx("span",{children:"Changes affect AI analysis for your account only"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs(rt,{variant:"secondary",onClick:j,disabled:!n||l,children:[o.jsx(Gh,{className:"h-4 w-4 mr-2"}),"Reset All"]}),o.jsxs(rt,{variant:"primary",onClick:ne,disabled:!n||l,children:[o.jsx(Po,{className:"h-4 w-4 mr-2"}),l?"Saving...":"Save Changes"]})]})]}),L&&o.jsx("div",{"data-testid":"benchmark-save-choice-dialog",className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:o.jsx("div",{className:"bg-gray-900/95 backdrop-blur-xl rounded-xl w-full max-w-md
1333shadow-2xl border border-gray-800",children:o.jsx("div",{className:"p-6",children:L==="ask"?o.jsxs(o.Fragment,{children:[o.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Save Changes"}),o.jsxs("p",{className:"text-gray-300 mb-6",children:['You have unsaved changes to the preset "',E==null?void 0:E.preset_name,'". Would you like to update this configuration or save as a new preset?']}),o.jsxs("div",{className:"flex justify-end gap-3",children:[o.jsx(rt,{variant:"secondary",onClick:F,disabled:l,children:"Cancel"}),o.jsx(rt,{variant:"secondary",onClick:()=>H("new"),disabled:l,children:"Save as New"}),o.jsx(rt,{variant:"primary",onClick:()=>H("update"),disabled:l,children:"Update Current"})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Save as New Preset"}),o.jsxs("p",{className:"text-gray-300 mb-6",children:['"',E==null?void 0:E.preset_name,'" is left exactly as it is. Name this configuration to save it alongside it.']}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"benchmark-new-preset-name",className:"block text-sm font-medium text-gray-300 mb-2",children:"Preset Name"}),o.jsx("input",{id:"benchmark-new-preset-name","data-testid":"benchmark-new-preset-name",type:"text",value:W.name,onChange:ae=>V(fe=>({...fe,name:ae.target.value})),placeholder:"e.g., Conservative Underwriting",className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",autoFocus:!0})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"benchmark-new-preset-description",className:"block text-sm font-medium text-gray-300 mb-2",children:"Description (Optional)"}),o.jsx("textarea",{id:"benchmark-new-preset-description","data-testid":"benchmark-new-preset-description",value:W.description,onChange:ae=>V(fe=>({...fe,description:ae.target.value})),placeholder:"Describe when to use this preset...",rows:3,className:"w-full px-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent resize-none"})]})]}),o.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[o.jsx(rt,{variant:"secondary",onClick:F,disabled:l,children:"Cancel"}),o.jsxs(rt,{variant:"primary",onClick:B,disabled:!W.name.trim()||l,children:[o.jsx(Po,{className:"h-4 w-4 mr-2"}),"Create Preset"]})]})]})})})})]})},EGe=({isOpen:e,onClose:t})=>{const{user:r}=Wi();return e?o.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:o.jsxs("div",{className:"bg-gray-900/95 backdrop-blur-xl rounded-xl w-full max-w-6xl max-h-[90vh] overflow-hidden shadow-2xl border border-gray-800",children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-800",children:[o.jsx("h2",{className:"text-xl font-semibold text-white",children:"Benchmark Settings"}),o.jsx("button",{onClick:t,className:"p-2 hover:bg-white/10 rounded-lg transition-colors",children:o.jsx(Ir,{className:"h-5 w-5 text-gray-400"})})]}),o.jsx("div",{className:"p-6 overflow-y-auto max-h-[calc(90vh-4rem)]",children:o.jsx(SGe,{userId:r==null?void 0:r.id})})]})}):null},v3=({isCollapsed:e,onClick:t})=>o.jsxs("button",{onClick:t,className:`w-full py-5 border-b border-white/5 text-left cursor-pointer hover:bg-white/5 transition-colors ${e?"lg:px-2 lg:flex lg:justify-center":"px-4"}`,title:"Go to Properties","aria-label":"SAMI - Go to Properties",children:[e&&o.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-accent-light items-center justify-center flex-shrink-0 hidden lg:flex",children:o.jsx("span",{className:"text-primary font-bold text-lg",children:"S"})}),!e&&o.jsx("span",{className:"text-xl font-semibold text-white tracking-tight hidden lg:inline",children:"SAMI"}),o.jsx("span",{className:"text-xl font-semibold text-white tracking-tight lg:hidden",children:"SAMI"})]});v3.propTypes={isCollapsed:Q.bool,onClick:Q.func};v3.defaultProps={isCollapsed:!1,onClick:()=>{}};const b3=({onClick:e,label:t="Upload Data",isCollapsed:r})=>r?o.jsx("div",{className:"py-2 hidden lg:block",children:o.jsx("button",{onClick:e,className:"sidebar-item w-full text-accent hover:text-accent-light hover:bg-white/5 lg:justify-center lg:px-2",title:t,children:o.jsx(t1,{className:"w-5 h-5"})})}):o.jsx("div",{className:"py-2 px-3",children:o.jsxs("button",{onClick:e,className:`w-full flex items-center justify-center gap-2 px-4 py-2.5 1334 font-semibold rounded-lg transition-all 1335 bg-gradient-to-r from-accent to-accent-light text-primary 1336 hover:shadow-glow-sm`,children:[o.jsx(t1,{className:"w-4 h-4 flex-shrink-0"}),o.jsx("span",{className:"hidden lg:inline",children:t}),o.jsx("span",{className:"lg:hidden",children:t})]})});b3.propTypes={onClick:Q.func,label:Q.string,isCollapsed:Q.bool};b3.defaultProps={onClick:()=>{},label:"Upload Data",isCollapsed:!1};const kh=({label:e,children:t,isCollapsed:r})=>o.jsxs("div",{className:"sidebar-section",children:[e&&!r&&o.jsx("div",{className:"sidebar-section-label hidden lg:block",children:e}),e&&o.jsx("div",{className:"sidebar-section-label lg:hidden",children:e}),o.jsx("nav",{className:"space-y-1",children:t})]});kh.propTypes={label:Q.string,children:Q.node.isRequired,isCollapsed:Q.bool};kh.defaultProps={label:null,isCollapsed:!1};const Ms=({icon:e,label:t,onClick:r,isActive:n,badge:a,isCollapsed:i,isFocused:s=!1,tabIndex:l=0})=>{const c=a?`${t}${a.type==="count"?`, ${a.value} items`:a.type==="alert"?`, ${a.value} alerts`:""}`:t;return o.jsxs("button",{onClick:r,className:` 1337 sidebar-item w-full text-left 1338 ${n?"active":""} 1339 ${i?"lg:justify-center lg:px-2":""} 1340 ${s?"ring-2 ring-accent ring-inset":""} 1341 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-inset 1342 `,title:i?t:void 0,"aria-label":c,"aria-current":n?"page":void 0,tabIndex:l,children:[e&&o.jsx(e,{className:"sidebar-item-icon flex-shrink-0"}),!i&&o.jsx("span",{className:"flex-1 text-sm font-medium hidden lg:inline",children:t}),o.jsx("span",{className:"flex-1 text-sm font-medium lg:hidden",children:t}),a&&!i&&o.jsx(Mg,{variant:a.type,className:"sidebar-item-badge hidden lg:inline-flex",children:a.value}),a&&o.jsx(Mg,{variant:a.type,className:"sidebar-item-badge lg:hidden",children:a.value})]})};Ms.propTypes={icon:Q.elementType,label:Q.string.isRequired,onClick:Q.func,isActive:Q.bool,badge:Q.shape({type:Q.oneOf(["count","alert","beta","new","hot","instant"]),value:Q.oneOfType([Q.string,Q.number])}),isCollapsed:Q.bool,isFocused:Q.bool,tabIndex:Q.number};Ms.defaultProps={icon:null,onClick:()=>{},isActive:!1,badge:null,isCollapsed:!1,isFocused:!1,tabIndex:0};const w3=({currentView:e,onNavigate:t,propertyCount:r,loanAlertCount:n,rateAlertCount:a,isCollapsed:i,subscriptionStatus:s})=>{const l=N.useRef(null),c=N.useMemo(()=>[{id:"properties",icon:uC,label:"Properties",view:"properties",badge:r>0?{type:"count",value:r}:null,isActive:e==="properties"||e==="portfolio"},{id:"loans",icon:e1,label:"Loans",view:"loans",badge:null,isActive:e==="loans"},{id:"loan-alerts",icon:Bi,label:"Loan Maturity",view:"loan-alerts",badge:n>0?{type:"alert",value:n}:null,isActive:e==="loan-alerts"},{id:"rate-alerts",icon:_u,label:"Rate Resets",view:"rate-alerts",badge:a>0?{type:"alert",value:a}:null,isActive:e==="rate-alerts"},{id:"uploaded-reports",icon:Sn,label:"Uploaded Reports",view:"uploaded-reports",badge:null,isActive:e==="uploaded-reports"},{id:"generated-reports",icon:b5,label:"Generated Reports",view:"generated-reports",badge:{type:"beta",value:"BETA"},isActive:e==="generated-reports"},{id:"presets",icon:fC,label:"Presets",view:"presets",badge:null,isActive:e==="presets"},{id:"benchmarks",icon:y5,label:"Benchmarks",view:"benchmarks",badge:null,isActive:e==="benchmarks"},{id:"billing",icon:dC,label:"Billing",view:"billing",badge:s==="trial"?{type:"alert",value:"TRIAL"}:null,isActive:e==="billing"},{id:"help",icon:v5,label:"Help",view:"help",badge:null,isActive:e==="help"}],[e,r,n,a,s]),u=N.useCallback(m=>{m>=0&&m<c.length&&t(c[m].view)},[c,t]),{focusedIndex:d,handleKeyDown:f}=Hke({itemCount:c.length,onSelect:u}),p=m=>c.findIndex(y=>y.id===m)===d;return o.jsxs("div",{ref:l,className:"flex-1 overflow-y-auto py-2",onKeyDown:f,tabIndex:0,role:"menu","aria-label":"Navigation menu",children:[o.jsxs(kh,{label:"Portfolio",isCollapsed:i,children:[o.jsx(Ms,{icon:uC,label:"Properties",onClick:()=>t("properties"),isActive:e==="properties"||e==="portfolio",badge:r>0?{type:"count",value:r}:null,isCollapsed:i,isFocused:p("properties"),tabIndex:-1}),o.jsx(Ms,{icon:e1,label:"Loans",onClick:()=>t("loans"),isActive:e==="loans",isCollapsed:i,isFocused:p("loans"),tabIndex:-1})]}),o.jsxs(kh,{label:"Alerts",isCollapsed:i,children:[o.jsx(Ms,{icon:Bi,label:"Loan Maturity",onClick:()=>t("loan-alerts"),isActive:e==="loan-alerts",badge:n>0?{type:"alert",value:n}:null,isCollapsed:i,isFocused:p("loan-alerts"),tabIndex:-1}),o.jsx(Ms,{icon:_u,label:"Rate Resets",onClick:()=>t("rate-alerts"),isActive:e==="rate-alerts",badge:a>0?{type:"alert",value:a}:null,isCollapsed:i,isFocused:p("rate-alerts"),tabIndex:-1})]}),o.jsxs(kh,{label:"Reports",isCollapsed:i,children:[o.jsx(Ms,{icon:Sn,label:"Uploaded Reports",onClick:()=>t("uploaded-reports"),isActive:e==="uploaded-reports",isCollapsed:i,isFocused:p("uploaded-reports"),tabIndex:-1}),o.jsx(Ms,{icon:b5,label:"Generated Reports",onClick:()=>t("generated-reports"),isActive:e==="generated-reports",badge:{type:"beta",value:"BETA"},isCollapsed:i,isFocused:p("generated-reports"),tabIndex:-1})]}),o.jsx("div",{className:"sidebar-divider my-4",role:"separator","aria-hidden":"true"}),o.jsxs(kh,{label:"Manage",isCollapsed:i,children:[o.jsx(Ms,{icon:fC,label:"Presets",onClick:()=>t("presets"),isActive:e==="presets",isCollapsed:i,isFocused:p("presets"),tabIndex:-1}),o.jsx(Ms,{icon:y5,label:"Benchmarks",onClick:()=>t("benchmarks"),isActive:e==="benchmarks",isCollapsed:i,isFocused:p("benchmarks"),tabIndex:-1}),o.jsx(Ms,{icon:dC,label:"Billing",onClick:()=>t("billing"),isActive:e==="billing",badge:s==="trial"?{type:"alert",value:"TRIAL"}:null,isCollapsed:i,isFocused:p("billing"),tabIndex:-1}),o.jsx(Ms,{icon:v5,label:"Help",onClick:()=>t("help"),isActive:e==="help",isCollapsed:i,isFocused:p("help"),tabIndex:-1})]})]})};
1342w3.propTypes={currentView:Q.string,onNavigate:Q.func,propertyCount:Q.number,loanAlertCount:Q.number,rateAlertCount:Q.number,isCollapsed:Q.bool,subscriptionStatus:Q.string};w3.defaultProps={currentView:"dashboard",onNavigate:()=>{},propertyCount:0,loanAlertCount:0,rateAlertCount:0,isCollapsed:!1,subscriptionStatus:"trial"};const _3=({currentView:e,onNavigate:t,propertyCount:r,loanAlertCount:n,rateAlertCount:a,onUploadClick:i,isMobileCollapsed:s,isDesktopCollapsed:l,onMobileToggle:c,onDesktopToggle:u,user:d,onAccountSettings:f,onSignOut:p})=>{var b,w;const[m,x]=N.useState(!1),y=N.useRef(null);N.useEffect(()=>{const S=j=>{y.current&&!y.current.contains(j.target)&&x(!1)};if(m)return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[m]);const v=l?"lg:w-16":"lg:w-64";return o.jsxs(o.Fragment,{children:[!s&&o.jsx("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden",onClick:c}),o.jsx("button",{onClick:c,className:"fixed top-4 left-4 z-50 p-2 rounded-lg bg-sidebar text-gray-400 hover:text-white lg:hidden focus:outline-none focus-visible:ring-2 focus-visible:ring-accent","aria-label":s?"Open navigation menu":"Close navigation menu","aria-expanded":!s,"aria-controls":"sidebar-navigation",children:s?o.jsx(SV,{className:"w-5 h-5"}):o.jsx(Ir,{className:"w-5 h-5"})}),o.jsxs("aside",{id:"sidebar-navigation",role:"navigation","aria-label":"Main navigation",className:` 1343 fixed left-0 top-0 h-screen flex flex-col 1344 bg-sidebar z-40 1345 w-64 ${v} 1346 transition-all duration-300 1347 ${s?"-translate-x-full":"translate-x-0"} 1348 lg:translate-x-0 1349 `,children:[o.jsx(v3,{isCollapsed:l,onClick:()=>t("properties")}),o.jsx(b3,{onClick:i,isCollapsed:l}),o.jsx(w3,{currentView:e,onNavigate:t,propertyCount:r,loanAlertCount:n,rateAlertCount:a,isCollapsed:l,subscriptionStatus:d==null?void 0:d.subscription_status}),d&&o.jsx("div",{className:`border-t border-white/5 ${l?"lg:px-2 lg:py-2":"px-3 py-2"}`,children:l?o.jsx("button",{onClick:()=>t("billing"),className:"w-full flex items-center justify-center p-1.5 rounded-lg hover:bg-white/5 transition-colors",title:`${d.ai_credits} credits`,children:o.jsx(mC,{className:`w-4 h-4 ${d.subscription_status==="trial"?"text-amber-400":"text-accent"}`})}):o.jsxs("button",{onClick:()=>t("billing"),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-lg transition-colors hover:bg-white/5 ${d.subscription_status==="trial"?"bg-amber-500/10 border border-amber-500/20":"bg-white/5 border border-white/5"}`,children:[o.jsx(mC,{className:`w-4 h-4 flex-shrink-0 ${d.subscription_status==="trial"?"text-amber-400":"text-accent"}`}),o.jsxs("div",{className:"flex-1 min-w-0 text-left hidden lg:block",children:[o.jsx("p",{className:`text-xs font-medium capitalize ${d.subscription_status==="trial"?"text-amber-400":"text-gray-300"}`,children:d.subscription_status}),o.jsx("p",{className:"text-xs text-gray-500",children:d.subscription_status==="enterprise"?"Unlimited credits":`${d.ai_credits??0} credits`})]})]})}),d&&o.jsxs("div",{ref:y,className:`relative py-3 border-t border-white/5 ${l?"lg:flex lg:justify-center lg:px-0":"px-4"}`,children:[o.jsxs("button",{onClick:()=>x(!m),className:`w-full flex items-center gap-3 p-2 -m-2 rounded-lg hover:bg-white/5 transition-colors ${l?"lg:justify-center lg:p-1 lg:-m-1":""}`,"aria-expanded":m,"aria-haspopup":"true","aria-label":"User menu",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-white/10 flex items-center justify-center flex-shrink-0",children:o.jsx("span",{className:"text-sm font-medium text-gray-300",children:((b=d.name)==null?void 0:b.charAt(0))||((w=d.email)==null?void 0:w.charAt(0))||"U"})}),!l&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex-1 min-w-0 text-left hidden lg:block",children:[o.jsx("p",{className:"text-sm font-medium text-gray-200 truncate",children:d.name||"User"}),o.jsx("p",{className:"text-xs text-gray-500 truncate",children:d.email||""})]}),o.jsx(kr,{className:`w-4 h-4 text-gray-400 transition-transform hidden lg:block ${m?"rotate-180":""}`})]})]}),m&&o.jsxs("div",{className:`absolute bottom-full mb-2 bg-gray-900 border border-white/10 rounded-lg shadow-xl overflow-hidden z-50 ${l?"left-full ml-2 bottom-0 mb-0":"left-0 right-0 mx-2"}`,role:"menu","aria-label":"User options",children:[o.jsxs("button",{onClick:()=>{x(!1),f==null||f()},className:"w-full flex items-center gap-3 px-4 py-3 text-sm text-gray-200 hover:bg-white/5 transition-colors",role:"menuitem",children:[o.jsx(pC,{className:"w-4 h-4 text-gray-400"}),o.jsx("span",{children:"Account Settings"})]}),o.jsx("div",{className:"border-t border-white/5"}),o.jsxs("button",{onClick:()=>{x(!1),p==null||p()},className:"w-full flex items-center gap-3 px-4 py-3 text-sm text-red-400 hover:bg-white/5 transition-colors",role:"menuitem",children:[o.jsx(Sue,{className:"w-4 h-4"}),o.jsx("span",{children:"Sign Out"})]})]})]}),o.jsx("button",{onClick:u,className:`hidden lg:flex items-center justify-center p-2 mb-3 rounded-lg 1350 text-accent hover:text-accent-light hover:bg-white/5 1351 transition-colors 1352 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent 1353 ${l?"mx-auto":"mx-3"}`,title:l?"Expand sidebar":"Collapse sidebar","aria-label":l?"Expand sidebar":"Collapse sidebar","aria-expanded":!l,children:l?o.jsx(yl,{className:"w-5 h-5"}):o.jsx(vR,{className:"w-5 h-5"})})]})]})};
1353_3.propTypes={currentView:Q.string,onNavigate:Q.func,propertyCount:Q.number,loanAlertCount:Q.number,rateAlertCount:Q.number,onUploadClick:Q.func,isMobileCollapsed:Q.bool,isDesktopCollapsed:Q.bool,onMobileToggle:Q.func,onDesktopToggle:Q.func,user:Q.shape({name:Q.string,email:Q.string}),onAccountSettings:Q.func,onSignOut:Q.func};_3.defaultProps={currentView:"dashboard",onNavigate:()=>{},propertyCount:0,loanAlertCount:0,rateAlertCount:0,onUploadClick:()=>{},isMobileCollapsed:!0,isDesktopCollapsed:!1,onMobileToggle:()=>{},onDesktopToggle:()=>{},user:null,onAccountSettings:()=>{},onSignOut:()=>{}};const S3=({children:e,isDesktopCollapsed:t})=>{const r=t?"ml-0 lg:ml-16":"ml-0 lg:ml-64";return o.jsx("main",{className:`flex-1 min-h-screen transition-all duration-300 ${r}`,children:o.jsx("div",{className:"p-6",children:e})})};S3.propTypes={children:Q.node.isRequired,isDesktopCollapsed:Q.bool};S3.defaultProps={isDesktopCollapsed:!1};const kGe=N.createContext({isMobileCollapsed:!0,isDesktopCollapsed:!1,toggleMobileSidebar:()=>{},toggleDesktopSidebar:()=>{}}),E3=({children:e,currentView:t,onNavigate:r,propertyCount:n=0,loanAlertCount:a=0,rateAlertCount:i=0,onUploadClick:s,user:l,onAccountSettings:c,onSignOut:u})=>{const[d,f]=N.useState(!0),[p,m]=N.useState(!1),x=()=>{f(v=>!v)},y=()=>{m(v=>!v)};return o.jsx(kGe.Provider,{value:{isMobileCollapsed:d,isDesktopCollapsed:p,toggleMobileSidebar:x,toggleDesktopSidebar:y},children:o.jsxs("div",{className:"flex min-h-screen bg-primary",children:[o.jsx(_3,{currentView:t,onNavigate:r,propertyCount:n,loanAlertCount:a,rateAlertCount:i,onUploadClick:s,isMobileCollapsed:d,isDesktopCollapsed:p,onMobileToggle:x,onDesktopToggle:y,user:l,onAccountSettings:c,onSignOut:u}),o.jsx(S3,{isDesktopCollapsed:p,children:e})]})})};E3.propTypes={children:Q.node.isRequired,currentView:Q.string,onNavigate:Q.func,propertyCount:Q.number,loanAlertCount:Q.number,rateAlertCount:Q.number,onUploadClick:Q.func,user:Q.object,onAccountSettings:Q.func,onSignOut:Q.func};E3.defaultProps={currentView:"dashboard",onNavigate:()=>{},propertyCount:0,loanAlertCount:0,rateAlertCount:0,onUploadClick:()=>{},user:null,onAccountSettings:()=>{},onSignOut:()=>{}};const NGe=({property:e,onClose:t,onUpdate:r,onUploadClick:n,initialTab:a="property",selectedReport:i=null,onClearSelectedReport:s})=>{const[l,c]=N.useState(a),[u,d]=N.useState(!1),[f,p]=N.useState(!1),[m,x]=N.useState(null),[y,v]=N.useState(null),[b,w]=N.useState(0),[S,j]=N.useState(null),{dateRange:k,setDateRange:E,rawData:T,analysisResult:O,setAnalysisResult:A,fetchPropertyData:P,isLoading:I}=nX(e);N.useEffect(()=>{a&&c(a)},[a]),N.useEffect(()=>{(async()=>{if(i){if(i.item_type==="generated")try{const K=await Xe.get(`/saved-analyses/detail/${i.id}`);v(K.data),c("ai-analysis")}catch(K){console.error("Failed to load analysis detail:",K)}else j(i),c("reports");s&&s()}})()},[i,s]);const R=[{id:"property",label:"Property Info",icon:_i},{id:"reports",label:"Reports",icon:Sn},{id:"ai-analysis",label:"AI Analysis",icon:yc},{id:"financial",label:"Financial",icon:yR},{id:"occupancy",label:"Occupancy",icon:Gp}],M=G=>{u&&G!==l?(x(G),p(!0)):c(G)},L=()=>{d(!1),c(m),p(!1),x(null)},U=(G,K)=>{G!=="custom"&&K&&P(K)},W=G=>{v(G),c("ai-analysis")},V=()=>{u&&d(!1),t()};return e?o.jsxs("div",{className:"h-full flex flex-col bg-primary",children:[o.jsxs("div",{className:"bg-gradient-to-r from-primary/90 to-primary/70 backdrop-blur-xl border-b border-white/10",children:[o.jsx("div",{className:"px-6 pt-4 pb-2",children:o.jsxs("button",{onClick:V,className:"p-2 -ml-2 hover:bg-white/10 rounded-lg transition-colors flex items-center gap-1 text-gray-400 hover:text-white",children:[o.jsx(vR,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Back to Properties"})]})}),o.jsx("div",{className:"flex items-center px-6 pb-4",children:o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsx("div",{className:"p-3 bg-gradient-to-br from-accent/30 to-accent/20 rounded-xl shadow-lg shadow-accent/20",children:o.jsx(_i,{className:"h-8 w-8 text-accent-light"})}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-2xl font-bold tracking-wide",children:o.jsx("span",{className:"bg-gradient-to-r from-white to-gray-200 bg-clip-text text-transparent",children:(e==null?void 0:e.name)||"Property Analysis"})}),o.jsx("button",{onClick:()=>w(G=>G+1),className:"p-1.5 hover:bg-red-500/20 rounded-lg transition-colors",title:"Delete property",children:o.jsx(wl,{className:"h-4 w-4 text-gray-500 hover:text-red-400"})})]}),o.jsxs("p",{className:"text-gray-400 flex items-center mt-1 font-medium text-sm",children:[(e==null?void 0:e.address)||"No address"," â¢",o.jsxs("span",{className:"text-accent-light ml-1",children:[(e==null?void 0:e.unit_count)||0," units"]})]})]})]})}),o.jsx("div",{className:"flex space-x-1 overflow-x-auto px-6",children:R.map(G=>{const K=G.icon;return o.jsxs("button",{onClick:()=>M(G.id),className:`flex items-center space-x-2 px-4 py-3 text-sm font-medium transition-all duration-200 border-b-2 ${l===G.id?"text-accent border-accent":"text-gray-400 border-transparent hover:text-white hover:border-white/20"}`,children:[o.jsx(K,{className:"h-4 w-4"}),o.jsx("span",{children:G.label})]},G.id)})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[l==="property"&&o.jsx(kX,{property:e,onUpdate:r,onDeleteRequest:b}),l==="reports"&&o.jsx(HX,{property:e,onViewAnalysis:W,onUploadClick:n,reportToAutoLoad:S,onClearReportToAutoLoad:()=>j(null)}),l==="ai-analysis"&&o.jsx(rp,{children:o.jsx(SQ,{property:e,rawData:T,analysisResult:O,onAnalysisUpdate:A,onUnsavedChangesUpdate:d,dateRange:k,onDateRangeChange:E,onPresetSelect:U,isLoading:I,savedAnalysis:y,onClearSavedAnalysis:()=>v(null)})}),l==="financial"&&o.jsx(ere,{property:e,rawData:T,dateRange:k,onDateRangeChange:E,onFetchData:P,isLoading:I}),l==="occupancy"&&o.jsx(tre,{property:e})]}),o.jsx(ki,{isOpen:f,onClose:()=>{p(!1),x(null)},onConfirm:L,title:"Unsaved Changes",message:"You have unsaved changes. Are you sure you want to switch tabs? Your changes will be lost.",confirmText:"Switch Tab",cancelText:"Stay",variant:"warning"})]}):null},sc={READY:"ready",PARTIAL:"partial",EMPTY:"empty",UNKNOWN:"unknown"},are={state:sc.UNKNOWN,missingMonths:[],hasRentRoll:null,reason:"Couldnât check P&L data"},TGe=(e,t)=>
1353{if(e===sc.UNKNOWN)return"Couldnât check P&L data";if(e===sc.READY)return"";const r=t.join(", ");return e===sc.EMPTY?`No P&L for ${r} â nothing to report on`:`No P&L for ${r}`},DA="no rent roll for the period, so occupancy will be blank",jGe=(e,t,r)=>{const n=TGe(e,t);return r!==!1?n:n?`${n} · ${DA}`:DA.charAt(0).toUpperCase()+DA.slice(1)},AGe=async(e,t,r)=>{const n=await na.checkReportOverlap(e.name,"pl",t.start,t.end,r);if(!Array.isArray(n==null?void 0:n.newMonths))throw new Error("check-overlap answered without newMonths");const a=r.filter(i=>n.newMonths.includes(i));return a.length===0?{state:sc.READY,missingMonths:a}:a.length===r.length?{state:sc.EMPTY,missingMonths:a}:{state:sc.PARTIAL,missingMonths:a}},CGe=async(e,t)=>{const r=await na.checkReportOverlap(e.name,"rent-roll",t.start,t.end);if(!Array.isArray(r==null?void 0:r.overlappingReports))throw new Error("check-overlap answered without overlappingReports");return r.overlappingReports.length>0},OGe=async(e,t)=>{const r=pX(t.start,t.end),[n,a]=await Promise.allSettled([AGe(e,t,r),CGe(e,t)]);if(n.status!=="fulfilled")return are;const i=a.status==="fulfilled"?a.value:null;return{state:n.value.state,missingMonths:n.value.missingMonths,hasRentRoll:i,reason:jGe(n.value.state,n.value.missingMonths,i)}},PGe=async(e,t)=>{const r=await Promise.allSettled(e.map(n=>OGe(n,t)));return Object.fromEntries(e.map((n,a)=>[n.id,r[a].status==="fulfilled"?r[a].value:are]))},RGe=e=>(e==null?void 0:e.state)!==sc.EMPTY,IGe=oje.map(({value:e,label:t})=>({value:e,label:t})),FGe=({propertyId:e,entry:t,isChecking:r})=>{if(r||!t)return o.jsxs("span",{"data-testid":`readiness-${e}`,className:"inline-flex items-center gap-1 text-xs text-gray-500",children:[o.jsx(ar,{className:"w-3 h-3 animate-spin","aria-hidden":"true"}),"Checking P&Lâ¦"]});if(!t.reason)return o.jsx("span",{"data-testid":`readiness-${e}`});const n=t.state===sc.UNKNOWN,a=n?bR:Bi;return o.jsxs("span",{"data-testid":`readiness-${e}`,className:`inline-flex items-center gap-1 text-xs ${n?"text-gray-400":"text-warning"}`,children:[o.jsx(a,{className:"w-3 h-3","aria-hidden":"true"}),t.reason]})},MGe=({reportType:e,onReportTypeChange:t,period:r,onPeriodChange:n,name:a,onNameChange:i,properties:s,selectedIds:l,onToggleProperty:c,onToggleAll:u,readiness:d,collidingIds:f,onCancel:p,onContinue:m})=>{const x=l.length,y=!!r&&d===null,v=s.length>0&&x===s.length,b=x>uk,w=!!e&&!!r&&a.trim()!==""&&x>0&&!b&&!y;return o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"glass-card p-4 space-y-4",children:o.jsxs("div",{className:"flex flex-wrap items-start gap-4",children:[o.jsx(al,{label:"Report type","aria-label":"Report type",value:e,onChange:t,options:IGe,className:"w-64"}),e&&o.jsxs("div",{children:[o.jsx("span",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Period"}),o.jsx(H4,{reportType:e,value:r,onChange:n},e)]}),r&&o.jsx(v_,{label:"Report name","aria-label":"Report name",value:a,onChange:i,helperText:"Every propertyâs report is saved under this name.",className:"w-64"})]})}),r&&o.jsxs("div",{className:"glass-card p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Properties · ",x," selected (up to ",uk,")"]}),o.jsx(rt,{variant:"ghost",size:"sm",onClick:u,disabled:y,children:v?"Deselect All":"Select All"})]}),o.jsx("ul",{className:"divide-y divide-white/5",children:s.map(S=>o.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-2 py-2",children:[o.jsx(Oke,{isEditing:!0,label:S.name,value:l.includes(S.id),onChange:j=>c(S.id,j),disabled:y}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.has(String(S.id))&&o.jsxs("span",{className:"text-xs text-gray-400",children:["A report named â",a,"â already exists"]}),o.jsx(FGe,{propertyId:S.id,entry:d==null?void 0:d[S.id],isChecking:y})]})]},S.id))})]}),b&&o.jsxs("p",{className:"text-sm text-warning",children:["Choose at most ",uk," properties per run â ",x," are selected."]}),o.jsxs("div",{className:"flex items-center justify-end gap-3",children:[o.jsx(rt,{variant:"secondary",onClick:p,children:"Cancel"}),o.jsx(rt,{variant:"primary",onClick:m,disabled:!w,children:"Continue"})]})]})},LA=(e,t)=>`${e} ${t}${e===1?"":"s"}`,DGe=({count:e,credits:t,creditsError:r,isAwaitingDecision:n,onStart:a,onBack:i,onRetryCredits:s})=>{const l=LA(e,"report"),c=t===null&&!r,u=t!==null&&t<e;return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"glass-card p-4 space-y-3",children:[c&&o.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-300",children:[o.jsx(ar,{className:"w-4 h-4 text-accent animate-spin","aria-hidden":"true"}),"Checking your creditsâ¦"]}),r&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("p",{className:"flex items-center gap-2 text-sm text-error",children:[o.jsx(Bi,{className:"w-4 h-4","aria-hidden":"true"}),r]}),o.jsx("p",{className:"text-xs text-gray-500",children:"Nothing runs until your credits can be checked."})]}),t!==null&&o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-base font-semibold text-gray-100",children:[l," · ",e," of your ",LA(t,"credit")]}),u?o.jsxs("p",{className:"flex items-center gap-2 text-sm text-error",children:[o.jsx(Bi,{className:"w-4 h-4","aria-hidden":"true"}),"You have ",LA(t,"credit")," and this run needs ",e,". Choose fewer properties, or add credits, then try again."]}):o.jsx("p",{className:"text-sm text-gray-400",children:"Each report uses one credit. A report whose AI step fails is not saved and not charged."})]})]}),o.jsxs("div",{className:"flex items-center justify-end gap-3",children:[o.jsx(rt,{variant:"secondary",onClick:i,children:"Back"}),r&&o.jsx(rt,{variant:"secondary",onClick:s,children:"Check again"}),t!==null&&!u&&o.jsxs(rt,{variant:"primary",onClick:a,disabled:n||e===0,children:["Generate ",l]})]})]})},LGe=async({property:e,existingId:t},{period:r,reportType:n,answers:a,name:i})=>{var c;const s=await k1.generateAnalysis(e.id,r,"comprehensive",WX(n,a),{batch:!0});if(((c=s.metadata)==null?void 0:c.aiNarrativeFailed)===!0)throw new Error(KX);return(await k1.saveAnalysis(GX({id:t??null,propertyId:e.id,name:i,analysisText:s.analysis,dateRange:r,rawData:VX(s.data,n,a)}))).id},$Ge=e=>({propertyName:e.property.name,analysisId:null}),BGe=e=>({analysisId:e}),UGe=({items:e,run:t,onDone:r})=>{const{refreshCredits:n}=Wi(),a=N.useCallback(d=>LGe(d,t),[t]),{results:i,isFinished:s,summary:l,start:c,retryFailed:u}=rX({items:e,runItem:a,describeError:T4,initialResult:$Ge,toResult:BGe});return N.useEffect(()=>{c()},[]),N.useEffect(()=>{s&&n()},[s,n]),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"p-4 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20",children:[o.jsx("h3",{className:"text-base font-semibold text-gray-100",children:s?"Run complete":"Generating reportsâ¦"}),o.jsx("p",{className:"text-sm text-gray-400 mt-1",children:s?`${l.succeeded} saved, ${l.failed} failed`:`${l.succeeded+l.failed} of ${l.total} done â one report at a time, so a failure cannot affect the rest.`}),o.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Reports are generated here, in this tab. Keep this tab open until the run finishes â each report is saved as soon as it is done, and closing the tab stops the ones not yet started."})]}),o.jsx("div",{className:"data-table",children:o.jsxs("table",{className:"w-full text-sm","aria-label":"Report progress",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",className:"text-left",children:"Property"}),o.jsx("th",{scope:"col",className:"text-left",children:"Status"}),o.jsx("th",{scope:"col",className:"text-left",children:"Detail"})]})}),o.jsx("tbody",{children:i.map(d=>o.jsxs("tr",{className:d.status===C4.FAILED?"bg-error/5":void 0,children:[o.jsx("td",{className:"text-gray-300",children:d.propertyName}),o.jsx("td",{children:o.jsx(xX,{status:d.status,labels:lje,testId:"report-status"})}),o.jsx("td",{className:"font-sans text-sm",children:d.error?o.jsx("span",{className:"text-error",children:d.error}):o.jsx("span",{className:"text-gray-600",children:"â"})})]},d.id))})]})}),s&&o.jsx("div",{className:"p-4 rounded-lg bg-card/50 backdrop-blur-sm border border-white/20",children:o.jsxs("div",{className:"flex items-center justify-end gap-3",children:[l.failed>0&&o.jsxs(rt,{variant:"secondary",onClick:u,children:["Retry ",l.failed," failed"]}),o.jsx(rt,{variant:"primary",onClick:r,children:"Done"})]})})]})},mq=(e,t,r)=>t.flatMap(n=>{const a=e.find(i=>String(i.property_id)===String(n)&&i.name===r);return a?[{propertyId:n,analysisId:a.id}]:[]}),Ko={CONFIGURE:"configure",CONTEXT:"context",PREFLIGHT:"preflight",RUN:"run"},bb={REPLACE:"replace",SKIP:"skip"},zGe=e=>`${e} ${e===1?"property":"properties"}`,HGe=({properties:e=[],analyses:t=[],onExit:r})=>{const[n,a]=N.useState(Ko.CONFIGURE),[i,s]=N.useState(""),[l,c]=N.useState(null),[u,d]=N.useState(""),[f,p]=N.useState(!1),[m,x]=N.useState([]),[y,v]=N.useState(null),[b,w]=N.useState(null),[S,j]=N.useState(null),[k,E]=N.useState(null),[T,O]=N.useState(null),[A,P]=N.useState(null),I=N.useRef(0);N.useEffect(()=>{if(v(null),!l)return;const fe=++I.current;PGe(e,l).then(ue=>{fe===I.current&&(v(ue),x(e.filter(oe=>RGe(ue[oe.id])).map(oe=>oe.id)))})},[e,l==null?void 0:l.start,l==null?void 0:l.end]);const R=fe=>{s(fe),c(null)},M=fe=>{c(fe),f||d(fe.label)},L=fe=>{d(fe),p(!0)},U=(fe,ue)=>{x(oe=>ue?e.filter(Z=>Z.id===fe||oe.includes(Z.id)).map(Z=>Z.id):oe.filter(Z=>Z!==fe))},W=()=>{x(fe=>fe.length===e.length?[]:e.map(ue=>ue.id))},V=N.useMemo(()=>new Set(mq(t,e.map(fe=>fe.id),u).map(({propertyId:fe})=>String(fe))),[t,e,u]),G=N.useMemo(()=>mq(t,m,u),[t,m,u]),K=N.useMemo(()=>{const fe=new Map(G.map(ue=>[String(ue.propertyId),ue.analysisId]));return e.filter(ue=>m.includes(ue.id)).filter(ue=>!(T===bb.SKIP&&fe.has(String(ue.id)))).map(ue=>({id:ue.id,property:ue,existingId:T===bb.REPLACE?fe.get(String(ue.id))??null:null}))},[e,m,G,T]),F=N.useCallback(async()=>{var fe,ue;j(null),E(null);try{const Z=(ue=(fe=(await Xe.get("/billing/subscription")).data)==null?void 0:fe.subscription)==null?void 0:ue.credits;if(typeof Z!="number")throw new Error("Your credit balance could not be read.");j(Z)}catch(oe){E(T4(oe,"Your credit balance could not be read."))}},[]),ne=()=>{O(null),a(Ko.CONFIGURE)},H=fe=>{w(fe),O(null),a(Ko.PREFLIGHT),F()},B=()=>{P({items:K,run:{period:l,reportType:i,answers:b,name:u}}),a(Ko.RUN)},X=G.length>0&&T===null,Y=m.length-G.length,ae=e.filter(fe=>G.some(ue=>String(ue.propertyId)===String(fe.id))).map(fe=>fe.name);return o.jsxs("div",{className:"p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:"Run Reports"}),o.jsx("p",{className:"text-gray-400",children:"Generate and save one report for each property you choose, one property at a time."})]}
1353),o.jsx("div",{hidden:n!==Ko.CONFIGURE,children:o.jsx(MGe,{reportType:i,onReportTypeChange:R,period:l,onPeriodChange:M,name:u,onNameChange:L,properties:e,selectedIds:m,onToggleProperty:U,onToggleAll:W,readiness:y,collidingIds:V,onCancel:r,onContinue:()=>a(Ko.CONTEXT)})}),n===Ko.CONTEXT&&o.jsxs("div",{className:"space-y-4",children:[o.jsx(rt,{variant:"ghost",size:"sm",icon:wu,onClick:ne,children:"Back"}),o.jsx("div",{className:"glass-card h-[32rem] overflow-hidden",children:o.jsx(X0,{reportType:i,subjectLabel:zGe(m.length),submitLabel:"Continue",onGenerateRequest:H},i)})]}),n===Ko.PREFLIGHT&&o.jsx(DGe,{count:K.length,credits:S,creditsError:k,isAwaitingDecision:X,onStart:B,onBack:ne,onRetryCredits:F}),n===Ko.RUN&&A&&o.jsx(UGe,{items:A.items,run:A.run,onDone:r}),o.jsx(ki,{isOpen:n===Ko.PREFLIGHT&&X,onClose:()=>{},onCancel:ne,onConfirm:()=>O(bb.REPLACE),title:"Some reports already exist",message:`${ae.join(", ")} already ${ae.length===1?"has":"have"} a report named â${u}â. Replace ${ae.length===1?"it":"them"}, or generate reports only for the properties without one?`,confirmText:"Replace those reports",cancelText:"Cancel",variant:"warning",extraButton:Y>0?{text:"Only the new ones",onClick:()=>O(bb.SKIP),variant:"secondary"}:null})]})},wb=10,qGe=({initialFilter:e="all",onPropertyClick:t,onViewReport:r,onViewAnalysis:n})=>{const[a,i]=N.useState([]),[s,l]=N.useState([]),[c,u]=N.useState([]),[d,f]=N.useState(!0),[p,m]=N.useState(""),[x,y]=N.useState(e),[v,b]=N.useState("all"),[w,S]=N.useState("all"),[j,k]=N.useState(1),[E,T]=N.useState(!1),[O,A]=N.useState(!1),{handleError:P}=Qx();N.useEffect(()=>{y(e)},[e]),N.useEffect(()=>{I()},[]),N.useEffect(()=>{k(1)},[x,v,w,p]);const I=async()=>{f(!0);try{const ae=(await Xe.get("/properties")).data||[];i(ae);const[fe,ue]=await Promise.all([Promise.all(ae.map(async oe=>{try{return((await Xe.get(`/properties/${oe.id}/reports`)).data||[]).map(ce=>({...ce,property_id:oe.id,property_name:oe.name,property_address:oe.address,item_type:"uploaded"}))}catch(Z){return console.warn(`Failed to fetch reports for property ${oe.id}:`,Z),[]}})),Promise.all(ae.map(async oe=>{try{return((await Xe.get(`/saved-analyses/${oe.id}`)).data||[]).map(ce=>({...ce,property_id:oe.id,property_name:oe.name,property_address:oe.address,item_type:"generated"}))}catch(Z){return console.warn(`Failed to fetch analyses for property ${oe.id}:`,Z),[]}}))]);l(fe.flat()),u(ue.flat())}catch(Y){P(Y,"Failed to load reports")}finally{f(!1)}},R=N.useMemo(()=>{let Y=[];if((x==="all"||x==="uploaded")&&(Y=[...Y,...s]),(x==="all"||x==="generated")&&(Y=[...Y,...c]),v!=="all"&&(Y=Y.filter(ae=>ae.property_id===v)),w!=="all"&&(Y=Y.filter(ae=>ae.item_type==="generated"||ae.report_type===w)),p.trim()){const ae=p.toLowerCase();Y=Y.filter(fe=>{var ue,oe,Z,ce;return((ue=fe.property_name)==null?void 0:ue.toLowerCase().includes(ae))||((oe=fe.name)==null?void 0:oe.toLowerCase().includes(ae))||((Z=fe.report_type)==null?void 0:Z.toLowerCase().includes(ae))||((ce=fe.report_type_display)==null?void 0:ce.toLowerCase().includes(ae))})}return Y.sort((ae,fe)=>{const ue=new Date(ae.created_at||ae.processed_date);return new Date(fe.created_at||fe.processed_date)-ue}),Y},[s,c,x,v,w,p]),M=R.length,L=Math.ceil(M/wb),U=E?R:R.slice((j-1)*wb,j*wb),W=N.useMemo(()=>{const Y=[{value:"all",label:"All Properties"}];return a.forEach(ae=>{Y.push({value:ae.id,label:ae.name})}),Y},[a]),V=Y=>{Y.item_type==="uploaded"?r?r(Y):t&&t(Y.property_id,Y):n?n(Y):t&&t(Y.property_id,Y)},G=Y=>Y.item_type==="generated"?o.jsx(yc,{className:"h-4 w-4 text-purple-400"}):o.jsx(Sn,{className:"h-4 w-4 text-accent-light"}),K=Y=>Y.item_type==="generated"?o.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-purple-900/20 text-purple-400",children:"AI Analysis"}):o.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-accent/20 text-accent-light",children:Y.report_type_display||Y.report_type}),F=Y=>Y.item_type==="generated"?Y.name||"Untitled Analysis":Y.report_type_display||Y.report_type||"Report",ne=Y=>Y.item_type==="generated"?Y.date_range?`${Ct(Y.date_range.start)} - ${Ct(Y.date_range.end)}`:Ct(Y.created_at):Y.start_date&&Y.end_date?`${Ct(Y.start_date)} - ${Ct(Y.end_date)}`:Ct(Y.start_date||Y.processed_date);if(O)return o.jsx(HGe,{properties:a,analyses:c,onExit:()=>{A(!1),I()}});if(d)return o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"flex items-center justify-center py-24",children:o.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-accent border-t-transparent roun
1353ded-full"})})});const H=()=>{switch(x){case"uploaded":return{title:"Uploaded Reports",description:"Data uploads (Rent Rolls, P&L Statements) across all properties"};case"generated":return{title:"AI Generated Reports",description:"AI-powered analysis reports across all properties"};default:return{title:"All Reports",description:"View and manage all reports across properties"}}},{title:B,description:X}=H();return o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"mb-6 flex flex-wrap items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:B}),o.jsx("p",{className:"text-gray-400",children:X})]}),x!=="uploaded"&&o.jsx(rt,{variant:"primary",icon:Rue,onClick:()=>A(!0),children:"Run Reports"})]}),o.jsx("div",{className:"glass-card p-4 mb-6",children:o.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(bV,{className:"h-4 w-4 text-gray-400"}),o.jsx(al,{value:x,onChange:y,options:[{value:"all",label:"All Types"},{value:"uploaded",label:"Data Uploads"},{value:"generated",label:"AI Generated"}],className:"w-40","aria-label":"Filter by type"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(_i,{className:"h-4 w-4 text-gray-400"}),o.jsx(al,{value:v,onChange:b,options:W,className:"w-48","aria-label":"Filter by property"})]}),(x==="all"||x==="uploaded")&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Sn,{className:"h-4 w-4 text-gray-400"}),o.jsx(al,{value:w,onChange:S,options:[{value:"all",label:"All Report Types"},...w_.map(({value:Y,label:ae})=>({value:Y,label:ae}))],className:"w-44","aria-label":"Filter by report type"})]}),o.jsx("div",{className:"flex-1 min-w-[200px]",children:o.jsx(j4,{value:p,onChange:m,placeholder:"Search reports...","aria-label":"Search reports"})}),(x!=="all"||v!=="all"||w!=="all"||p)&&o.jsx(rt,{variant:"ghost",size:"sm",onClick:()=>{y("all"),b("all"),S("all"),m("")},icon:Ir,children:"Clear"})]})}),o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("p",{className:"text-sm text-gray-400",children:["Showing ",U.length," of ",M," reports"]}),M>wb&&o.jsx("button",{onClick:()=>T(!E),className:"text-sm text-accent-light hover:text-accent transition-colors",children:E?"Show Less":`Show All (${M})`})]}),M===0?o.jsxs("div",{className:"glass-card p-12 text-center",children:[o.jsx(Sn,{className:"h-16 w-16 text-gray-600 mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-400 mb-2",children:"No Reports Found"}),o.jsx("p",{className:"text-gray-500",children:p||x!=="all"||v!=="all"?"Try adjusting your filters":"Upload reports or generate AI analyses to see them here"})]}):o.jsx("div",{className:"glass-card overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Type"}),o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Property"}),o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Name"}),o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Period"}),o.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-400",children:"Created"}),o.jsx("th",{className:"text-right py-3 px-4 text-sm font-medium text-gray-400",children:"Actions"})]})}),o.jsx("tbody",{children:U.map(Y=>o.jsxs("tr",{className:"border-b border-white/5 hover:bg-white/5 transition-colors cursor-pointer",onClick:()=>V(Y),children:[o.jsx("td",{className:"py-3 px-4",children:K(Y)}),o.jsx("td",{className:"py-3 px-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(_i,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-white font-medium",children:Y.property_name})]})}),o.jsx("td",{className:"py-3 px-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[G(Y),o.jsx("span",{className:"text-white",children:F(Y)})]})}),o.jsx("td",{className:"py-3 px-4 text-sm text-gray-400",children:ne(Y)}),o.jsx("td",{className:"py-3 px-4 text-sm text-gray-400",children:Ct(Y.created_at||Y.processed_date)}),o.jsx("td",{className:"py-3 px-4 text-right",children:o.jsx(rt,{variant:"ghost",size:"sm",icon:cc,onClick:ae=>{ae.stopPropagation(),V(Y)},title:"View"})})]},`${Y.item_type}-${Y.id}`))})]})}),!E&&L>1&&o.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6",children:[o.jsx(rt,{variant:"ghost",size:"sm",onClick:()=>k(Y=>Math.max(1,Y-1)),disabled:j===1,children:"Previous"}),o.jsxs("span",{className:"text-sm text-gray-400",children:["Page ",j," of ",L]}),o.jsx(rt,{variant:"ghost",size:"sm",onClick:()=>k(Y=>Math.min(L,Y+1)),disabled:j===L,children:"Next"})]})]})},WGe="â",VGe="N/A (Fixed)",GGe=["loanAmount","loanRate","ioPeriodMonths","amortizationYears","currentBalance","monthlyPayment","paymentAfterIO","principalPaid","currentLTV","monthsToMaturity","balanceAtMaturity","ioMonthsRemaining"],KGe=e=>{const t={...e};for(const r of GGe){const n=t[r];
1353if(n==null||typeof n=="number")continue;const a=Number(n);Number.isFinite(a)&&(t[r]=a)}return t},Iw=(e,t)=>e==null?WGe:t(e),T0=e=>Iw(e,Be),gq=e=>Iw(e,t=>Ct(t,"short")),xq=e=>mo(e)?"text-error font-semibold":go(e)?"text-warning font-semibold":"text-white",yq=[{id:"property-name",sortKey:"propertyName",label:kt.name,width:"14%",align:"left",render:e=>({text:e.propertyName,className:"text-white font-medium"})},{id:"loan-amount",sortKey:"loanAmount",label:kt.loan_amount,width:"9%",render:e=>({text:T0(e.loanAmount),className:"text-white"})},{id:"loan-rate",sortKey:"loanRate",label:kt.loan_rate,width:"7%",render:e=>({text:Iw(e.loanRate,t=>pr(t,2)),className:"text-white"})},{id:"rate-lock",sortKey:"rateLockDate",label:kt.rate_lock_date,width:"10%",render:e=>e.rateLockDate===null||e.rateLockDate===void 0?{text:VGe,className:"text-muted"}:{text:Ct(e.rateLockDate,"short"),className:xq(e.rateLockDate)}},{id:"current-balance",sortKey:"currentBalance",label:kt.current_loan_balance,width:"10%",render:e=>({text:T0(e.currentBalance),className:"text-white"})},{id:"monthly-payment",sortKey:"monthlyPayment",label:kt.monthly_payment,width:"9%",render:e=>({text:T0(e.monthlyPayment),className:"text-white"})},{id:"payment-after-io",sortKey:"paymentAfterIO",label:kt.payment_after_io,width:"9%",render:e=>({text:T0(e.paymentAfterIO),className:"text-white"})},{id:"io-expires",sortKey:"ioEndDate",label:kt.io_end_date,width:"9%",render:e=>({text:gq(e.ioEndDate),className:"text-white"})},{id:"maturity",sortKey:"loanMaturity",label:kt.loan_maturity,width:"9%",render:e=>({text:gq(e.loanMaturity),className:xq(e.loanMaturity)})},{id:"balloon",sortKey:"balanceAtMaturity",label:kt.balance_at_maturity,width:"9%",render:e=>({text:T0(e.balanceAtMaturity),className:"text-white"})},{id:"ltv",sortKey:"currentLTV",label:kt.current_ltv,width:"7%",render:e=>({text:Iw(e.currentLTV,t=>pr(t,1)),className:"text-white"})}],YGe={key:"propertyName",direction:"asc"},XGe=()=>{const[e,t]=N.useState(null),[r,n]=N.useState(!0),[a,i]=N.useState(null),s=N.useCallback(async()=>{n(!0),i(null);try{t(await na.getLoanSummary())}catch(f){i(f)}finally{n(!1)}},[]);N.useEffect(()=>{s()},[s]);const l=N.useMemo(()=>((e==null?void 0:e.loans)??[]).map(KGe),[e]),{sortedData:c,toggleSort:u,getSortInfo:d}=tX(l,YGe);return r?o.jsx(E_,{message:"Loading loans..."}):a?o.jsx(k_,{error:a,onRetry:s,title:"Unable to Load Loans"}):l.length===0?o.jsx(qX,{icon:e1,message:"No financed properties",description:"Properties show up here once their loan terms are on file."}):o.jsx("div",{className:"space-y-6",children:o.jsxs("div",{className:"glass-card",children:[o.jsxs("div",{className:"px-6 py-4 border-b border-white/10 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(e1,{className:"h-5 w-5 text-accent"}),o.jsx("h2",{className:"text-lg font-semibold text-white",children:"Loans"}),o.jsxs("span",{className:"text-sm text-muted",children:[l.length," ",l.length===1?"property":"properties"]})]}),(e==null?void 0:e.asOfDate)&&o.jsxs("span",{className:"text-xs text-muted",children:["Position as of ",Ct(e.asOfDate,"short")]})]}),o.jsx("div",{className:"overflow-y-auto max-h-[600px] custom-scrollbar",style:{overflowX:"auto"},children:o.jsxs("table",{className:"w-full",style:{tableLayout:"fixed",background:"transparent"},children:[o.jsx("thead",{style:{background:"rgba(15, 23, 42, 0.8)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",position:"sticky",top:0,zIndex:10},children:o.jsx("tr",{className:"text-left",children:yq.map(f=>{const{isSorted:p,direction:m}=d(f.sortKey),x=f.align==="left"?"justify-start":"justify-center";return o.jsx("th",{onClick:()=>u(f.sortKey),style:{width:f.width},className:`cursor-pointer hover:bg-white/5 transition-colors py-4 ${f.align==="left"?"px-6":"px-3 text-center"}`,children:o.jsxs("div",{className:`flex items-center gap-1.5 ${x}`,children:[o.jsx("span",{className:"text-xs uppercase tracking-widest text-gray-400 font-medium",children:f.label}),p&&o.jsx("span",{className:"text-accent","aria-hidden":"true",children:m==="asc"?"â
1353":"â"})]})},f.id)})})}),o.jsx("tbody",{children:c.map(f=>o.jsx("tr",{"data-testid":`loan-row-${f.propertyId}`,className:"border-b border-white/5 hover:bg-white/5 transition-colors",children:yq.map(p=>{const{text:m,className:x}=p.render(f);return o.jsx("td",{"data-testid":`${p.id}-${f.propertyId}`,className:`py-4 text-sm tabular-nums ${p.align==="left"?"px-6":"px-3 text-center"} ${x}`,children:m},p.id)})},f.propertyId))})]})})]})})};function JGe(){var Ke,jt;const e=new URLSearchParams(window.location.search),t=e.get("pdfMode")==="true";e.get("reportSessionId");const{user:r,logout:n}=Wi(),a=ei(),[i,s]=N.useState(null),[l,c]=N.useState(null),[u,d]=N.useState(null),[f,p]=N.useState(null),[m,x]=N.useState(null),[y,v]=N.useState(!1),[b,w]=N.useState(t?"report":"portfolio"),[S,j]=N.useState(null),[k,E]=N.useState(!1),[T,O]=N.useState(!1),[A,P]=N.useState(!1),[I,R]=N.useState("profile"),[M,L]=N.useState(!1),[U,W]=N.useState({propertyCount:0,loanAlertCount:0,rateAlertCount:0}),[V,G]=N.useState(null),[K,F]=N.useState("property"),[ne,H]=N.useState(null),[B,X]=N.useState("all"),[Y,ae]=N.useState("all"),fe=N.useRef(null),[ue,oe]=N.useState({});se.useEffect(()=>{if(t){window.__pdfReportData&&(setReportData(window.__pdfReportData),w("report"),window.pdfReady=!0);const Ce=xt=>{setReportData(xt.detail),w("report"),window.pdfReady=!0};return window.addEventListener("pdfDataReady",Ce),()=>{window.removeEventListener("pdfDataReady",Ce)}}},[t]),N.useEffect(()=>{const Ce=xt=>{fe.current&&!fe.current.contains(xt.target)&&O(!1)};return T&&document.addEventListener("mousedown",Ce),()=>{document.removeEventListener("mousedown",Ce)}},[T]),N.useEffect(()=>{t||(async()=>{try{const bt=(await Xe.get(`${Rg.ENDPOINTS.PROPERTIES}`)).data||[];W({propertyCount:bt.length,loanAlertCount:vTe(bt),rateAlertCount:bTe(bt)})}catch(xt){console.error("Failed to fetch sidebar data:",xt)}})()},[t]);const Z=Ce=>{switch(v(!1),s(null),c(null),x(null),d(null),p(null),G(null),Ce){case"dashboard":case"properties":w("portfolio"),he("idle"),ae("all");break;case"loans":w("loans"),he("idle");break;case"loan-alerts":w("portfolio"),he("idle"),ae("loansAlert");break;case"rate-alerts":w("portfolio"),he("idle"),ae("ratesAlert");break;case"uploaded-reports":w("reports"),X("uploaded"),he("idle");break;case"generated-reports":w("reports"),X("generated"),he("idle");break;case"presets":E(!0);break;case"benchmarks":L(!0);break;case"billing":a("/billing");break;case"help":R("tours"),P(!0);break;default:w("portfolio"),he("idle")}},ce=()=>{G(null),w(null),he("unified-upload"),s(null),c(null),x(null),d(null),p(null)},q=(Ce,xt="property",bt=null)=>{G(Ce),F(xt),H(bt)},xe=()=>{G(null),F("property"),H(null)},pe=Ce=>{Ce!=null&&Ce.deleted?G(null):Ce&&G(Ce)},[Se,he]=N.useState("unified-upload"),[ie,we]=N.useState(null),ke=Ce=>{s(Ce),he("preset-selection"),p(null)},Oe=Ce=>{j(Ce);const xt=i.rawData,bt=xt[Ce.header_row],Pt=xt.slice(Ce.data_start_row);c({headers:bt,data:Pt,headerRow:Ce.header_row,dataStartRow:Ce.data_start_row}),he("mapping")},Ue=()=>{j(null),he("headers")},Je=Ce=>{c(Ce),he("dataStart")},Ze=Ce=>{(m==null?void 0:m.reportTypes[0])==="rent-roll"?c({headers:(l==null?void 0:l.headers)||[],data:Ce.data,headerRow:(l==null?void 0:l.headerRow)||0,dataStartRow:Ce.dataStartRow}):c(xt=>({...xt,data:Ce.data,dataStartRow:Ce.dataStartRow})),he("mapping")},te=async Ce=>{var xt,bt,Pt;try{p(null);const _r=Ce.reportType||(m==null?void 0:m.reportTypes[0]);if(!_r)throw new Error("Report type not specified");const Ht={propertyName:Ce.propertyName||(m==null?void 0:m.propertyName),startDate:Ce.startDate||(m==null?void 0:m.startDate),endDate:Ce.endDate||(m==null?void 0:m.endDate),replaceExisting:Ce.replaceExisting??(m==null?void 0:m.replaceExisting)??!1,importMode:Ce.importMode};switch(_r){case"pl":const{rows:Zr,invalidMonths:ai}=F4(Ce.processedData);if(ai.length>0){qa.error(`Non-month columns mapped as "Monthly Data": ${ai.join(", ")}. Please re-map these columns before processing.`,{duration:8e3});return}if(!Zr||Zr.length===0){p("No valid data rows found. Please check your file and mapping."),he("error");return}try{const Hn=localStorage.getItem("accessToken"),gn=await fetch(`${Rg.API_URL}/pl/process`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:Hn?`Bearer ${Hn}`:""},body:JSON.stringify({rows:Zr,propertyName:Ht.propertyName,startDate:Ht.startDate,endD
1353ate:Ht.endDate,...Ht.importMode?{importMode:Ht.importMode}:{}})});if(!gn.ok){const ys=await gn.json();throw new Error(ys.message||"Failed to process P&L data")}const Rn=await gn.json();if(Rn.success){const ys=Rn.propertyId,{newItems:Lo=[],baselineSet:Fa=!1}=Rn.categorization||{};try{if(!Fa||Lo.length>0){const no=await Xe.get(`/categorization/property/${ys}`),vs=[];Object.entries(no.data.categorizations||{}).forEach(([Ac,jl])=>{jl.items.forEach(bs=>{vs.push({description:bs.description,glCode:bs.glCode,currentCategory:Ac,categorySource:bs.isManualOverride?"manual":"auto",amount:bs.amount,isManualOverride:bs.isManualOverride})})}),we({propertyId:ys,propertyName:Ht.propertyName,mode:Fa?"review-new":"initial",items:vs,newItems:Lo.map(Ac=>({...Ac,currentCategory:Ac.currentCategory||"other",categorySource:"auto"})),mappingConfig:Ce,successData:{totalUnits:Zr.length,processedAt:Rn.processedAt,reportId:Rn.reportId}}),he("categorization-review")}else d({metadata:{totalUnits:Zr.length,processedAt:Rn.processedAt,reportId:Rn.reportId}}),he("processing"),nh(Ce)}catch(no){console.error("Error fetching categorization data:",no),d({metadata:{totalUnits:Zr.length,processedAt:Rn.processedAt,reportId:Rn.reportId}}),he("processing"),nh(Ce)}}else throw new Error(Rn.message||"Processing failed")}catch(Hn){console.error("Processing Error:",Hn),p(`Processing failed: ${Hn.message}`),he("error")}break;case"rent-roll":const Ia=Ce.data||l.data;if(!Ia||Ia.length===0)throw new Error("No data rows available for processing");const fa=await new sX().transformData(Ia,{...Ce.mapping,propertyName:Ht.propertyName,startDate:Ht.startDate,endDate:Ht.endDate,replaceExisting:Ht.replaceExisting},"rent-roll"),xs=await ZY.processRentRoll({...fa,propertyName:Ht.propertyName,startDate:Ht.startDate,endDate:Ht.endDate,replaceExisting:Ht.replaceExisting});if(!xs.success)throw new Error(((xt=xs.error)==null?void 0:xt.message)||"Failed to process data");d(xs),he("processing"),nh(Ce);break;case"leasing":try{const gn=(await Xe.post("/leasing/process",{propertyName:Ht.propertyName,data:Ce.data,startDate:Ht.startDate,endDate:Ht.endDate,replaceExisting:Ht.replaceExisting})).data;if(gn.success)d({metadata:{totalRows:Ce.data.length,processedAt:gn.metadata.processedAt,reportId:gn.reportId}}),he("processing"),nh(Ce);else throw new Error(gn.message||"Processing failed")}catch(Hn){console.error("Processing Error:",Hn);const gn=((Pt=(bt=Hn.response)==null?void 0:bt.data)==null?void 0:Pt.error)||Hn.message||"Processing failed";p(`Processing failed: ${gn}`),he("error")}break;default:throw new Error(`Unsupported report type: ${_r}`)}}catch(_r){console.error("Error in mapping completion:",_r),p(_r.message||"Error processing mapped data"),he("error")}},ve=Ce=>{p(Ce)},J=()=>{s(null),c(null),d(null),x(null),p(null),he("unified-upload")},me=()=>{v(!0),he("property-management"),w("report-selection")};({labels:["Upload & Configure","Review Categorizations","Processing"],current:{"unified-upload":0,"categorization-review":1,processing:2}}).current[Se];const Ae=()=>V?"properties":b==="portfolio"?"dashboard":b==="loans"?"loans":b==="reports"?B==="generated"?"generated-reports":"uploaded-reports":Se==="unified-upload"?"upload":"dashboard";return t?o.jsxs("div",{className:"app-bg text-gray-100",style:{fontFamily:"Inter, system-ui, -apple-system, sans-serif"},children:[o.jsx(A$,{}),o.jsx("main",{className:"max-w-7xl mx-auto py-6 sm:px-6 lg:px-8",children:o.jsx(rp,{onReset:J})})]}):o.jsxs("div",{className:"text-gray-100",style:{fontFamily:"Inter, system-ui, -apple-system, sans-serif"},children:[o.jsx(A$,{}),o.jsx(E3,{currentView:Ae(),onNavigate:Z,propertyCount:U.propertyCount,loanAlertCount:U.loanAlertCount,rateAlertCount:U.rateAlertCount,onUploadClick:ce,user:r,onAccountSettings:()=>{R("profile"),P(!0)},onSignOut:n,children:o.jsx(rp,{onReset:J,children:o.jsxs("div",{className:"space-y-6",children:[f&&o.jsx("div",{className:"p-4 bg-red-50 text-red-700 rounded-md",children:o.jsxs("div",{className:"flex",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),o.jsx("div",{className:"ml-3",children:o.jsx("p",{className:"text-sm",children:f})})]})}),V?o.jsx(NGe,{property:V,onClose:xe,onUpdate:pe,initialTab:K,selectedReport:ne,onClearSelectedReport:()=>H(null),onUploadClick:Ce=>{G(null),w(null),he("unified-upload"),s(null),c(null),x(null),d(null),p(null)}}):b==="portfolio"?o.jsx(fGe,{onAddProperty:me,onPropertySelect:q,usePanel:!0,initialFilter:Y,onUploadClick:Ce=>{w(null),he("unified-upload"),s(null),c(null),x(null),d(null),p(null)},analysisCache:ue,onUpdateCache:(Ce,xt)=>{oe(bt=>({...bt,[Ce]:xt}))}}):b==="loans"?o.jsx(XGe,{}):b==="reports"?o.jsx(qGe,{initialFilter:B,onPropertyClick:(Ce,xt)=>{Xe.get(`/properties/${Ce}`).then(bt=>{if(bt.data){const Pt=(xt==null?void 0:xt.item_type)==="generated"?"ai-analysis":"reports";q(bt.data,Pt,xt)}}).catch(bt=>{console.error("Failed to load property:",bt)})}}):y?o.jsx(Yke,{onCancel:()=>{v(!1),w("portfolio")}}):o.jsxs("div",{className:"space-y-6",children:[Se==="unified-upload"&&o.jsx(UNe,{onComplete:async Ce=>{if(!Ce.data||Ce.data.length===0){ve("No data rows found in the uploaded file");return}x({propertyName:Ce.propertyName,reportTypes:[Ce.reportType],startDate:Ce.startDate,endD
1353ate:Ce.endDate||null,replaceExisting:Ce.replaceExisting||!1}),c({headers:Ce.headers||[],data:Ce.data,headerRow:Ce.headerRow||0,dataStartRow:Ce.dataStartRow||1});const xt={reportType:Ce.reportType,propertyName:Ce.propertyName,startDate:Ce.startDate,endDate:Ce.endDate,importMode:Ce.importMode,headerRow:Ce.headerRow,dataStartRow:Ce.dataStartRow,headers:Ce.headers,selectedPreset:Ce.selectedPreset};if(Ce.reportType==="pl"){const bt=I4({data:Ce.data,headers:Ce.headers,mapping:Ce.mapping});await te({processedData:bt,mapping:Ce.mapping,...xt})}else await te({mapping:Ce.mapping,data:Ce.data,...xt})},onCancel:()=>{J(),w("portfolio")},onAddProperty:me,onError:ve}),Se==="upload"&&m&&o.jsx(YY,{onFileProcessed:ke,onError:ve,onBack:()=>w("portfolio"),reportType:m.reportTypes[0],propertyName:m.propertyName}),Se==="preset-selection"&&i&&m&&o.jsx(Vke,{reportType:m.reportTypes[0],propertyName:m.propertyName,onPresetSelected:Oe,onSkipPreset:Ue,onBack:()=>he("upload")}),Se==="headers"&&i&&o.jsx(Pke,{rawData:i.rawData,onHeaderSelection:Je,onCancel:J}),Se==="dataStart"&&i&&o.jsx(Ike,{rawData:i.rawData,headers:(l==null?void 0:l.headers)||[],onDataRowSelection:Ze,onBack:()=>he((m==null?void 0:m.reportTypes[0])==="rent-roll"?"upload":"headers")}),Se==="mapping"&&l&&((m==null?void 0:m.reportTypes[0])==="pl"?o.jsx($ke,{headers:l.headers,data:l.data,reportType:"pl",propertyName:m==null?void 0:m.propertyName,headerRow:(l==null?void 0:l.headerRow)||0,dataStartRow:(l==null?void 0:l.dataStartRow)||1,preset:S,onMappingComplete:te,onError:ve,onBack:()=>he(S?"preset-selection":"dataStart"),onManagePresets:()=>E(!0)}):(m==null?void 0:m.reportTypes[0])==="leasing"?o.jsx(o.Fragment,{children:o.jsx(Jke,{headers:l.headers,data:l.data,propertyName:m==null?void 0:m.propertyName,startDate:m.startDate,endDate:m.endDate,onMappingComplete:te,onError:ve,onBack:()=>he("dataStart")})}):o.jsx(Lke,{headers:l.headers,data:l.data,reportType:"rent-roll",propertyName:m==null?void 0:m.propertyName,headerRow:(l==null?void 0:l.headerRow)||0,dataStartRow:(l==null?void 0:l.dataStartRow)||1,preset:S,onConfigurationComplete:te,onError:ve,onBack:()=>he(S?"preset-selection":"dataStart"),onManagePresets:()=>E(!0)})),Se==="categorization-review"&&ie&&o.jsx(U4,{propertyId:ie.propertyId,propertyName:ie.propertyName,mode:ie.mode,items:ie.items,newItems:ie.newItems,onSave:()=>{d({metadata:ie.successData}),he("processing"),ie.mappingConfig&&nh(ie.mappingConfig)},onCancel:()=>{d({metadata:ie.successData}),he("processing"),ie.mappingConfig&&nh(ie.mappingConfig)}}),Se==="processing"&&u&&o.jsx("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-xl border border-white/10 shadow-[0_0_30px_rgba(245,158,11,0.15)] p-8",children:o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"text-2xl font-bold text-white",children:[o.jsx("span",{className:"text-accent-gold",children:"â"})," Processing Complete"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"h-2 w-2 rounded-full bg-green-400 animate-pulse"}),o.jsx("span",{className:"text-sm text-green-400 font-medium",children:"Success"})]})]}),o.jsxs("div",{className:"bg-gray-800/30 border border-white/20 rounded-xl p-6 hover:border-white/30 transition-all duration-200",children:[o.jsxs("h4",{className:"text-sm font-medium text-accent-gold mb-4 flex items-center gap-2",children:[o.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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 01.293.707V19a2 2 0 01-2 2z"})}),"Processing Summary"]}),o.jsxs("dl",{className:"grid grid-cols-2 gap-6",children:[o.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-4 border border-white/10",children:[o.jsx("dt",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Total Records"}),o.jsx("dd",{className:"mt-2 text-2xl font-bold text-white",children:((Ke=u.metadata)==null?void 0:Ke.totalUnits)||0})]}),o.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-4 border border-white/10",children:[o.jsx("dt",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Processed Date"}),o.jsx("dd",{className:"mt-2 text-lg font-semibold text-white",children:new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),o.jsx("dd",{className:"text-xs text-gray-500",children:new Date().toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})})]})]}),((jt=u.metadata)==null?void 0:jt.reportType)&&o.jsx("div",{className:"mt-4 pt-4 border-t border-white/10",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm text-gray-400",children:"Report Type"}),o.jsx("span",{className:"text-sm font-medium text-white capitalize",children:u.metadata.reportType.replace("-"," ")})]})})]}),o.jsxs("div",{className:"flex justify-between items-center pt-2",children:[o.jsxs("button",{type:"button",onClick:()=>{w("portfolio"),he("idle"),s(null),c(null),x(null),d(null),p(null)},className:"px-6 py-3 text-sm font-semibold text-primary bg-gradient-to-r from-accent to-accent-light rounded-lg hover:from-accent-light hover:to-accent hover:shadow-glow transition-all duration-200 flex items-center gap-2",children:[o.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"View Portfolio"]}),o.jsxs("button",{type:"button",onClick:J,className:"px-6 py-3 text-sm font-semibold text-primary bg-gradient-to-r from-accent to-accent-light rounded-lg hover:from-accent-light hover:to-accent hover:shadow-glow transition-all duration-200 flex items-center gap-2",children:[o.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Process Another File"]})]})]})})]})]})})}),o.jsx(mGe,{isOpen:A,onClose:()=>{P(!1),R("profile")},initialTab:I}),o.jsx(EGe,{isOpen:M,onClose:()=>L(!1)}),k&&o.jsx(M4,{isOpen:k,onClose:()=>E(!1)})]})}function ire({mode:e="login",onSuccess:t,onError:r}){const{loginWithGoogle:n}=Wi(),a=ei(),[i,s]=N.useState(!1),l=async u=>{s(!0);try{const d=await n(u.credential);d.success?(t&&t(d),a(d.isNewUser?"/billing":"/")):r&&r(d.error)}finally{s(!1)}},c=()=>{r&&r("Google sign-in was cancelled")};return i?o.jsx("div",{className:"w-full flex justify-center py-2.5",children:o.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-amber-500"})}):o.jsx("div",{className:"w-full flex justify-center",children:o.jsx(Fse,{onSuccess:l,onError:c,text:e==="login"?"signin_with":"signup_with",theme:"filled_black",size:"large",width:"100%"})})}function QGe(){const[e,t]=N.useState(""),[r,n]=N.useState(""),[a,i]=N.useState(!1),[s,l]=N.useState(!1),[c,u]=N.useState(""),{login:d}=Wi(),f=ei(),p=async m=>{m.preventDefault(),u(""),l(!0);try{const x=await d(e,r);x.success?f("/"):u(x.error)}catch{u("An unexpected error occurred")}finally{l(!1)}};return o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"max-w-md w-full space-y-8",children:o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("h2",{className:"text-3xl font-bold text-white",children:"Welcome Back"}),o.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Sign in to access your real estate analytics"})]}),o.jsxs("form",{className:"space-y-6",onSubmit:p,children:[c&&o.jsx("div",{className:"bg-red-900/50 border border-red-700 rounded-lg p-3",children:o.jsx("p",{className:"text-sm text-red-200",children:c})}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-300 mb-2",children:"Email Address"}),o.jsx("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent",placeholder:"[email protected]",value:e,onCh
1353ange:m=>t(m.target.value),disabled:s})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-300 mb-2",children:"Password"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{id:"password",name:"password",type:a?"text":"password",autoComplete:"current-password",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent pr-12",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:m=>n(m.target.value),disabled:s}),o.jsx("button",{type:"button",onClick:()=>i(!a),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-300",children:a?o.jsx(gg,{size:20}):o.jsx(cc,{size:20})})]})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("input",{id:"remember-me",name:"remember-me",type:"checkbox",className:"h-4 w-4 bg-gray-800 border-gray-700 rounded text-amber-500 focus:ring-amber-500"}),o.jsx("label",{htmlFor:"remember-me",className:"ml-2 block text-sm text-gray-400",children:"Remember me"})]}),o.jsx("div",{className:"text-sm",children:o.jsx(Ra,{to:"/forgot-password",className:"text-amber-500 hover:text-amber-400",children:"Forgot password?"})})]}),o.jsxs("div",{className:"relative my-6",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("div",{className:"w-full border-t border-gray-700"})}),o.jsx("div",{className:"relative flex justify-center text-sm",children:o.jsx("span",{className:"px-2 bg-gray-900/50 text-gray-400",children:"Or continue with"})})]}),o.jsx(ire,{mode:"login",onError:m=>u(m)}),o.jsx("button",{type:"submit",disabled:s,className:"w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-gray-900 bg-gradient-to-r from-amber-400 to-amber-500 hover:from-amber-500 hover:to-amber-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-amber-500 disabled:opacity-50 disabled:cursor-not-allowed",children:s?o.jsxs(o.Fragment,{children:[o.jsx(ar,{className:"animate-spin h-5 w-5 mr-2"}),"Signing in..."]}):"Sign in"}),o.jsx("div",{className:"text-center",children:o.jsxs("span",{className:"text-sm text-gray-400",children:["Don't have an account?"," ",o.jsx(Ra,{to:"/register",className:"text-amber-500 hover:text-amber-400",children:"Sign up"})]})})]})]})})})}function ZGe(){const[e,t]=N.useState(""),[r,n]=N.useState(""),[a,i]=N.useState(""),[s,l]=N.useState(""),[c,u]=N.useState(!1),[d,f]=N.useState(!1),[p,m]=N.useState(""),[x,y]=N.useState(null),[v,b]=N.useState(!1),{register:w,checkEmailAvailability:S}=Wi(),j=ei(),k={minLength:r.length>=8,hasLetter:/[A-Za-z]/.test(r),hasNumber:/\d/.test(r)},E=Object.values(k).every(Boolean),T=r===a&&r.length>0;N.useEffect(()=>{const P=setTimeout(async()=>{if(!e||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)){y(null);return}b(!0);try{const I=await S(e);y(I)}catch(I){console.error("Email check error:",I)}finally{b(!1)}},500);return()=>clearTimeout(P)},[e,S]);const O=async A=>{if(A.preventDefault(),!E||!T){m("Please meet all password requirements");return}if(x===!1){m("Email is already registered");return}m(""),f(!0);try{const P=await w(e,r,s);P.success?j("/"):m(P.error)}catch{m("An unexpected error occurred")}finally{f(!1)}};return o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"max-w-md w-full space-y-8",children:o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("h2",{className:"text-3xl font-bold text-white",children:"Create Account"}),o.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Start analyzing your real estate portfolio with AI"})]}),o.jsxs("form",{className:"space-y-6",onSubmit:O,children:[p&&o.jsx("div",{className:"bg-red-900/50 border border-red-700 rounded-lg p-3",children:o.jsx("p",{className:"text-sm text-red-200",children:p})}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"company",className:"block text-sm font-medium text-gray-300 mb-2",children:"Company Name (Optional)"}),o.jsx("input",{id:"company",name:"company",type:"text",autoComplete:"organization",className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent",placeholder:"Your Company LLC",value:s,onChange:A=>l(A.target.value),disabled:d})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-300 mb-2",children:"Email Address"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent pr-10",placeholder:"[email protected]",value:e,onCh
1353ange:A=>t(A.target.value),disabled:d}),o.jsxs("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:[v&&o.jsx(ar,{className:"h-5 w-5 text-gray-400 animate-spin"}),x===!0&&o.jsx($n,{className:"h-5 w-5 text-green-500"}),x===!1&&o.jsx(Ir,{className:"h-5 w-5 text-red-500"})]})]}),x===!1&&o.jsx("p",{className:"mt-1 text-sm text-red-400",children:"Email is already registered"})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-300 mb-2",children:"Password"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{id:"password",name:"password",type:c?"text":"password",autoComplete:"new-password",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent pr-12",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:A=>n(A.target.value),disabled:d}),o.jsx("button",{type:"button",onClick:()=>u(!c),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-300",children:c?o.jsx(gg,{size:20}):o.jsx(cc,{size:20})})]}),o.jsxs("div",{className:"mt-2 space-y-1",children:[o.jsxs("div",{className:"flex items-center text-sm",children:[k.minLength?o.jsx($n,{className:"h-4 w-4 text-green-500 mr-2"}):o.jsx(Ir,{className:"h-4 w-4 text-gray-500 mr-2"}),o.jsx("span",{className:k.minLength?"text-green-400":"text-gray-500",children:"At least 8 characters"})]}),o.jsxs("div",{className:"flex items-center text-sm",children:[k.hasLetter?o.jsx($n,{className:"h-4 w-4 text-green-500 mr-2"}):o.jsx(Ir,{className:"h-4 w-4 text-gray-500 mr-2"}),o.jsx("span",{className:k.hasLetter?"text-green-400":"text-gray-500",children:"Contains a letter"})]}),o.jsxs("div",{className:"flex items-center text-sm",children:[k.hasNumber?o.jsx($n,{className:"h-4 w-4 text-green-500 mr-2"}):o.jsx(Ir,{className:"h-4 w-4 text-gray-500 mr-2"}),o.jsx("span",{className:k.hasNumber?"text-green-400":"text-gray-500",children:"Contains a number"})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-gray-300 mb-2",children:"Confirm Password"}),o.jsx("input",{id:"confirmPassword",name:"confirmPassword",type:c?"text":"password",autoComplete:"new-password",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:a,onChange:A=>i(A.target.value),disabled:d}),a&&!T&&o.jsx("p",{className:"mt-1 text-sm text-red-400",children:"Passwords do not match"})]}),o.jsxs("div",{className:"relative my-6",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("div",{className:"w-full border-t border-gray-700"})}),o.jsx("div",{className:"relative flex justify-center text-sm",children:o.jsx("span",{className:"px-2 bg-gray-900/50 text-gray-400",children:"Or continue with"})})]}),o.jsx(ire,{mode:"signup",onError:A=>m(A)}),o.jsx("button",{type:"submit",disabled:d||!E||!T||x===!1,className:"w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-gray-900 bg-gradient-to-r from-amber-400 to-amber-500 hover:from-amber-500 hover:to-amber-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-amber-500 disabled:opacity-50 disabled:cursor-not-allowed",children:d?o.jsxs(o.Fragment,{children:[o.jsx(ar,{className:"animate-spin h-5 w-5 mr-2"}),"Creating account..."]}):"Create Account"}),o.jsx("div",{className:"text-center",children:o.jsxs("span",{className:"text-sm text-gray-400",children:["Already have an account?"," ",o.jsx(Ra,{to:"/login",className:"text-amber-500 hover:text-amber-400",children:"Sign in"})]})})]})]})})})}function PP({children:e}){const{user:t,loading:r}=Wi(),n=Zs();return r?o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950",children:o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx(ar,{className:"h-12 w-12 text-amber-500 animate-spin"}),o.jsx("p",{className:"mt-4 text-gray-400",children:"Loading..."})]})}):t?e:o.jsx(Poe,{to:"/login",state:{from:n},replace:!0})}function eKe(){const e=ei(),{user:t}=Wi(),[r,n]=N.useState(!0),[a,i]=N.useState(null),[s,l]=N.useState([]),[c,u]=N.useState(null),[d,f]=N.useState(!1),[p,m]=N.useState(null);N.useEffect(()=>{x()},[]);const x=async()=>{try{n(!0);const[P,I]=await Promise.all([Xe.get("/billing/subscription"),Xe.get("/billing/tiers")]);i(P.data.subscription),l(I.data.tiers)}catch(P){console.error("Error fetching subscription data:",P),m("Failed to load subscription information")}finally{n(!1)}},y=async P=>{var I,R;f(!0),m(null);try{const M=await Xe.post("/billing/create-subscription",{tier:P});window.location.href=M.data.url}catch(M){m(((R=(I=M.response)==null?void 0:I.data)==null?void 0:R.error)||"Failed to create subscription"),f(!1)}},v=async()=>{f(!0);try{const P=await Xe.post("/billing/portal-session");window.location.href=P.data.url}catch{m("Failed to open billing portal"),f(!1)}},b=zC(),w=async()=>{var P,I;f(!0);try{const R=await Xe.post("/billing/cancel-subscription");ft.success(`Subscription will be canceled on ${new Date(R.data.cancelAt).toLocaleDateString()}`),b.close(),x()}catch(R){ft.error(((I=(P=R.response)==null?void 0:P.data)==null?void 0:I.error)||"Failed to cancel subscription")}finally{f(!1)}},S=zC(),[j,k]=N.useState(null),E=async()=>{var P,I;if(j){f(!0);try{const R=await Xe.post("/billing/update-subscription",{tier:j});ft.success(`Successfully changed to ${R.data.newTier} plan`),S.close(),k(null),x()}catch(R){ft.error(((I=(P=R.response)==null?void 0:P.data)==null?void 0:I.error)||"Failed to change subscription")}finally{f(!1)}}},T=P=>{k(P),S.open()},O=P=>
1353{if(P===A)return"current";if(A==="trial")return"upgrade";const I=["trial","starter","professional","enterprise"],R=I.indexOf(A),M=I.indexOf(P);return M>R?"upgrade":M<R&&P!=="trial"&&(a!=null&&a.hasSubscription)?"downgrade":M<R&&P!=="trial"&&!(a!=null&&a.hasSubscription)?"upgrade":null};if(r)return o.jsx("div",{className:"min-h-screen bg-gray-950 flex items-center justify-center",children:o.jsx(ar,{className:"h-8 w-8 text-amber-500 animate-spin"})});const A=(a==null?void 0:a.status)||"trial";return o.jsxs("div",{className:"min-h-screen bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:[o.jsxs("div",{className:"max-w-5xl mx-auto",children:[o.jsx("div",{className:"mb-6",children:o.jsx(rt,{variant:"ghost",size:"sm",icon:wu,onClick:()=>e("/"),children:"Back to Dashboard"})}),o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("h1",{className:"text-4xl font-bold text-white mb-4",children:"Subscription Plans"}),o.jsx("p",{className:"text-lg text-gray-400",children:"Choose the plan that's right for your portfolio"})]}),p&&o.jsx("div",{className:"mb-8 bg-red-900/50 border border-red-700 rounded-lg p-4 text-center",children:o.jsx("p",{className:"text-red-200",children:p})}),A!=="trial"&&o.jsxs("div",{className:"mb-8 bg-gray-900/50 backdrop-blur-xl rounded-xl border border-gray-800 p-6",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-white",children:"Current Plan"}),o.jsxs("p",{className:"text-gray-400",children:["You're on the"," ",o.jsx("span",{className:"text-amber-500 font-medium capitalize",children:A})," plan"]})]}),o.jsx("div",{className:"flex items-center gap-3",children:a!=null&&a.hasPaymentMethod?o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:v,disabled:d,className:"flex items-center px-4 py-2 bg-gray-800 hover:bg-gray-700 text-white rounded-lg transition-colors disabled:opacity-50",children:[o.jsx(nue,{className:"h-4 w-4 mr-2"}),"Manage Billing"]}),(a==null?void 0:a.hasSubscription)&&(a==null?void 0:a.status)&&!["trial","canceling"].includes(a.status)&&o.jsxs("button",{onClick:()=>b.open(),disabled:d,className:"flex items-center gap-2 px-4 py-2 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-lg transition-colors disabled:opacity-50",children:[o.jsx($d,{size:18}),"Cancel Subscription"]})]}):o.jsx("p",{className:"text-sm text-gray-500 italic",children:"No payment method on file"})})]}),(a==null?void 0:a.status)==="canceling"&&o.jsx("p",{className:"text-yellow-400 text-sm mt-4",children:"Your subscription is set to cancel at the end of the billing period."})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:s.map(P=>{const I=O(P.id);return o.jsxs("div",{className:`relative bg-gray-900/50 backdrop-blur-xl rounded-xl border ${I==="current"?"border-amber-500":"border-gray-800"} p-6 hover:border-gray-700 transition-all`,children:[I==="current"&&o.jsx("div",{className:"absolute -top-3 left-1/2 transform -translate-x-1/2",children:o.jsx("span",{className:"bg-amber-500 text-gray-900 px-3 py-1 rounded-full text-sm font-medium",children:"Current Plan"})}),o.jsxs("div",{className:"text-center mb-6",children:[o.jsx("h3",{className:"text-2xl font-bold text-white mb-2",children:P.name}),o.jsxs("div",{className:"flex items-baseline justify-center",children:[o.jsxs("span",{className:"text-4xl font-bold text-white",children:["$",P.price]}),o.jsx("span",{className:"text-gray-400 ml-2",children:"/month"})]})]}),o.jsxs("div",{className:"space-y-4 mb-6",children:[o.jsxs("div",{className:"flex items-center text-gray-300",children:[o.jsx($n,{className:"h-5 w-5 text-green-500 mr-3 flex-shrink-0"}),o.jsxs("span",{children:[P.features.properties==="Unlimited"?"Unlimited":P.features.properties," ","properties"]})]}),o.jsxs("div",{className:"flex items-center text-gray-300",children:[o.jsx($n,{className:"h-5 w-5 text-green-500 mr-3 flex-shrink-0"}),o.jsxs("span",{children:[P.features.aiCredits," AI credits/month"]})]}),P.features.features.map((R,M)=>o.jsxs("div",{className:"flex items-center text-gray-300",children:[o.jsx($n,{className:"h-5 w-5 text-green-500 mr-3 flex-shrink-0"}),o.jsx("span",{children:R})]},M))]}),I==="current"?o.jsx("button",{disabled:!0,className:"w-full px-4 py-3 bg-gray-700/50 text-gray-400 rounded-lg cursor-not-allowed font-medium",children:"Your Current Plan"}):I==="upgrade"?o.jsxs("button",{onClick:()=>y(P.id),disabled:d,className:"w-full px-4 py-3 bg-gradient-to-r from-amber-400 to-amber-500 hover:from-amber-500 hover:to-amber-600 text-gray-900 font-semibold rounded-lg transition-all flex items-center justify-center gap-2 disabled:opacity-50",children:[d?o.jsx(ar,{className:"animate-spin",size:18}):null,"Upgrade Now"]}):I==="downgrade"?o.jsxs("button",{onClick:()=>T(P.id),disabled:d,className:"w-full px-4 py-3 bg-gray-700 hover:bg-gray-600 text-white font-medium rounded-lg transition-all flex items-center justify-center gap-2 disabled:opacity-50",children:[d?o.jsx(ar,{className:"animate-spin",size:18}):null,"Switch to ",P.name]}):null]},P.id)})}),A==="trial"&&o.jsx("div",{className:"mt-12 text-center bg-amber-900/20 border border-amber-700 rounded-lg p-6",children:o.jsxs("p",{className:"text-amber-400",children:["You're currently on a trial with ",a.credits," AI credits remaining. Upgrade to unlock more properties and AI credits!"]})})]}),o.jsx(ki,{...b.modalProps,title:"Cancel Subscription?",message:"Your subscription will remain active until the end of your current billing period. After that, you'll be downgraded to the free trial with 10 AI credits and access to 2 properties. Are you sure you want to cancel?",confirmText:"Cancel Subscription",cancelText:"Keep Subscription",variant:"danger",onConfirm:w,loading:d}),o.jsx(ki,{...S.modalProps,title:"Change Subscription?",message:j?`Are you sure you want to switch to the ${j} plan? Your credits will be capped at the new plan's limit, and your property limit will change. You'll receive a prorated credit for the remainder of your current billing period.`:"",confirmText:"Confirm Change",cancelText:"Keep Current Plan",variant:"warning",onConfirm:E,loading:d})]})}function tKe(){const[e]=gR(),t=ei(),[r,n]=N.useState("processing"),[a,i]=N.useState(null),s=e.get("session_id");return N.useEffect(()=>{if(!s){i({message:"No session ID found. Please return to the billing page.",userMe
1353ssage:"Invalid session. Please try subscribing again."}),n("error");return}(async()=>{var c,u;try{await Xe.post("/billing/complete-checkout",{sessionId:s}),(await Xe.get("/billing/subscription")).data.subscription.status!=="trial"?(n("success"),setTimeout(()=>t("/"),3e3)):(i({message:"Payment completed but subscription not activated",userMessage:"Please contact support if this issue persists."}),n("error"))}catch(d){console.error("Error completing checkout:",d),i({message:((u=(c=d.response)==null?void 0:c.data)==null?void 0:u.error)||"Failed to complete checkout",userMessage:"Please try again or contact support."}),n("error")}})()},[s,t]),r==="error"?o.jsx("div",{className:"min-h-screen bg-gray-950 flex items-center justify-center",children:o.jsx(k_,{error:a,title:"Payment Processing Error",onRetry:()=>t("/billing")})}):r==="processing"?o.jsx("div",{className:"min-h-screen bg-gray-950 flex items-center justify-center",children:o.jsx(E_,{message:"Processing your payment...",size:"large"})}):o.jsx("div",{className:"min-h-screen bg-gray-950 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-white/20 rounded-xl p-8 shadow-glow max-w-md w-full text-center",children:[o.jsx(vl,{className:"h-16 w-16 text-green-500 mx-auto mb-6"}),o.jsx("h2",{className:"text-3xl font-bold text-white mb-3",children:"Payment Successful!"}),o.jsx("p",{className:"text-gray-300 mb-4 text-lg",children:"Your subscription is now active."}),o.jsx("p",{className:"text-sm text-gray-400",children:"Redirecting to dashboard in 3 seconds..."}),o.jsx("button",{onClick:()=>t("/"),className:"mt-6 w-full px-6 py-3 bg-gradient-to-r from-amber-400 to-amber-500 hover:from-amber-500 hover:to-amber-600 text-gray-900 font-medium rounded-lg transition-all shadow-glow-sm",children:"Go to Dashboard Now"})]})})}function rKe(){const[e,t]=N.useState(""),[r,n]=N.useState(!1),[a,i]=N.useState(""),[s,l]=N.useState(!1),[c,u]=N.useState(""),d=async f=>{var p,m;f.preventDefault(),i(""),n(!0);try{const x=await Xe.post("/auth/forgot-password",{email:e});x.data.success&&(l(!0),x.data.resetUrl&&u(x.data.resetUrl))}catch(x){i(((m=(p=x.response)==null?void 0:p.data)==null?void 0:m.error)||"Failed to process request. Please try again.")}finally{n(!1)}};return s?o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsx("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx(vl,{className:"h-16 w-16 text-green-500 mx-auto mb-6"}),o.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Check Your Email"}),o.jsxs("p",{className:"text-gray-400 mb-6",children:["If an account exists for ",e,", you will receive a password reset link shortly."]}),c&&o.jsxs("div",{className:"mb-6 p-4 bg-amber-900/20 border border-amber-700 rounded-lg",children:[o.jsxs("p",{className:"text-sm text-amber-400 mb-2",children:[o.jsx("strong",{children:"Development Mode:"})," Use this link to reset your password"]}),o.jsx("a",{href:c,className:"text-sm text-amber-500 hover:text-amber-400 break-all",children:c})]}),o.jsx(Ra,{to:"/login",children:o.jsx(rt,{variant:"ghost",icon:wu,children:"Back to Login"})})]})})})}):o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx(wV,{className:"h-12 w-12 text-amber-500 mx-auto mb-4"}),o.jsx("h2",{className:"text-3xl font-bold text-white",children:"Forgot Password?"}),o.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Enter your email and we'll send you a link to reset your password"})]}),o.jsxs("form",{className:"space-y-6",onSubmit:d,children:[a&&o.jsx("div",{className:"bg-red-900/50 border border-red-700 rounded-lg p-3",children:o.jsx("p",{className:"text-sm text-red-200",children:a})}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-300 mb-2",children:"Email Address"}),o.jsx("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent",placeholder:"[email protected]",value:e,onCh
1353ange:f=>t(f.target.value),disabled:r})]}),o.jsx(rt,{type:"submit",variant:"primary",fullWidth:!0,loading:r,children:"Send Reset Link"}),o.jsx("div",{className:"text-center",children:o.jsx(Ra,{to:"/login",children:o.jsx(rt,{variant:"ghost",size:"sm",icon:wu,children:"Back to Login"})})})]})]})})})}function nKe(){const[e]=gR(),t=ei(),[r,n]=N.useState(""),[a,i]=N.useState(""),[s,l]=N.useState(!1),[c,u]=N.useState(!1),[d,f]=N.useState(!1),[p,m]=N.useState(""),[x,y]=N.useState(!1),v=e.get("token");N.useEffect(()=>{v||m("Invalid reset link. Please request a new password reset.")},[v]);const b=async w=>{var S,j;if(w.preventDefault(),m(""),r!==a){m("Passwords do not match");return}if(r.length<8){m("Password must be at least 8 characters");return}if(!/(?=.*[A-Za-z])(?=.*\d)/.test(r)){m("Password must contain at least one letter and one number");return}f(!0);try{(await Xe.post("/auth/reset-password",{token:v,newPassword:r})).data.success&&(y(!0),setTimeout(()=>t("/login"),3e3))}catch(k){m(((j=(S=k.response)==null?void 0:S.data)==null?void 0:j.error)||"Failed to reset password. Please try again.")}finally{f(!1)}};return v?x?o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsx("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx(vl,{className:"h-16 w-16 text-green-500 mx-auto mb-6"}),o.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Password Reset!"}),o.jsx("p",{className:"text-gray-400 mb-6",children:"Your password has been successfully reset. Redirecting to login..."}),o.jsx(Ra,{to:"/login",children:o.jsx(rt,{variant:"primary",children:"Go to Login"})})]})})})}):o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx(hC,{className:"h-12 w-12 text-amber-500 mx-auto mb-4"}),o.jsx("h2",{className:"text-3xl font-bold text-white",children:"Reset Password"}),o.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Enter your new password below"})]}),o.jsxs("form",{className:"space-y-6",onSubmit:b,children:[p&&o.jsx("div",{className:"bg-red-900/50 border border-red-700 rounded-lg p-3",children:o.jsx("p",{className:"text-sm text-red-200",children:p})}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-300 mb-2",children:"New Password"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{id:"password",name:"password",type:s?"text":"password",autoComplete:"new-password",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent pr-12",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:w=>n(w.target.value),disabled:d}),o.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-300",children:s?o.jsx(gg,{size:20}):o.jsx(cc,{size:20})})]}),o.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"At least 8 characters with one letter and one number"})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-gray-300 mb-2",children:"Confirm New Password"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{id:"confirmPassword",name:"confirmPassword",type:c?"text":"password",autoComplete:"new-password",required:!0,className:"w-full px-4 py-3 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent pr-12",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:a,onChange:w=>i(w.target.value),disabled:d}),o.jsx("button",{type:"button",onClick:()=>u(!c),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-300",children:c?o.jsx(gg,{size:20}):o.jsx(cc,{size:20})})]})]}),o.jsx(rt,{type:"submit",variant:"primary",fullWidth:!0,loading:d,children:"Reset Password"}),o.jsx("div",{className:"text-center",children:o.jsx(Ra,{to:"/login",className:"text-sm text-gray-400 hover:text-gray-300",children:"Back to Login"})})]})]})})}):o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsx("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Jr,{className:"h-16 w-16 text-red-500 mx-auto mb-6"}),o.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Invalid Reset Link"}),o.jsx("p",{className:"text-gray-400 mb-6",children:p}),o.jsx(Ra,{to:"/forgot-password",children:o.jsx(rt,{variant:"primary",children:"Request New Reset Link"})})]})})})})}const vq="SAMI",sre="https://asksami.ai",aKe=`${sre}/og-image.png`;function k3({title:e,description:t,path:r="/",image:n,noIndex:a=!1}){const i=e?`${e} | ${vq}`:vq,s=`${sre}${r}`,l=n||aKe;return o.jsxs(Ase,{children:[o.jsx("title",{children:i}),t&&o.jsx("meta",{name:"description",content:t}),o.jsx("link",{rel:"canonical",href:s}),o.jsx("meta",{property:"og:title",content:i}),t&&o.jsx("meta",{property:"og:description",content:t}),o.jsx("meta",{property:"og:url",content:s}),o.jsx("meta",{property:"og:image",content:l}),o.jsx("meta",{name:"twitter:title",content:i}),t&&o.jsx("meta",{name:"twitter:description",content:t}),o.jsx("meta",{name:"twitter:image",content:l}),a&&o.jsx("meta",{name:"robots",content:"noindex, nofollow"})]})}function iKe(){return o.jsxs("div",{className:"min-h-screen bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:[o.jsx(k3,{title:"Privacy Policy",description:"Learn how SAMI collects, uses, and protects your property data, financial reports, and personal information.",path:"/privacy"}),o.jsxs("div",{className:"max-w-4xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs(Ra,{to:"/",className:"inline-flex items-center gap-2 text-gray-400 hover:text-white transition-colors mb-6",children:[o.jsx(wu,{className:"h-4 w-4"}),"Back to Home"]}),o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx(que,{className:"h-8 w-8 text-amber-500"}),o.jsx("h1",{className:"text-3xl font-bold text-white",children:"Privacy Policy"})]}),o.jsxs("p",{className:"text-gray-400",children:["Last updated: ","January 24, 2026"," | Effe
1353ctive: ","January 24, 2026"]})]}),o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8 space-y-8",children:[o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"1. Introduction"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:'SAMI ("we," "our," or "us") provides a portfolio intelligence platform for multifamily real estate investors. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our service at asksami.ai (the "Service").'}),o.jsx("p",{children:"By using the Service, you agree to the collection and use of information in accordance with this policy. If you do not agree with this policy, please do not use our Service."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"2. Information We Collect"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"2.1 Account Information"}),o.jsx("p",{children:"When you create an account, we collect:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Email address"}),o.jsx("li",{children:"Password (stored using industry-standard hashing)"}),o.jsx("li",{children:"First and last name (optional)"}),o.jsx("li",{children:"Phone number (optional)"}),o.jsx("li",{children:"Company name and website (optional)"}),o.jsx("li",{children:"Profile picture URL (if signing in with Google)"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"2.2 Property and Financial Data"}),o.jsx("p",{children:"To provide our analytics services, you may upload:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Property information (addresses, unit counts, purchase details)"}),o.jsx("li",{children:"Profit & Loss (P&L) statements"}),o.jsx("li",{children:"Rent roll reports (unit details, tenant names, rent amounts, lease dates)"}),o.jsx("li",{children:"Loan information (amounts, rates, maturity dates, terms)"}),o.jsx("li",{children:"Leasing activity reports"})]}),o.jsxs("p",{className:"mt-4 p-4 bg-amber-900/20 border border-amber-700/50 rounded-lg",children:[o.jsx("strong",{className:"text-amber-400",children:"Important:"})," You are responsible for ensuring you have the right to upload any data containing personally identifiable information (such as tenant names). We recommend anonymizing sensitive data where possible."]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"2.3 Payment Information"}),o.jsx("p",{children:"Payment processing is handled by Stripe, Inc. We do not store your full credit card number on our servers. We receive and store only:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Last four digits of your card"}),o.jsx("li",{children:"Card brand (Visa, Mastercard, etc.)"}),o.jsx("li",{children:"Billing address"}),o.jsx("li",{children:"Stripe customer ID"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"2.4 Automatically Collected Information"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"IP address"}),o.jsx("li",{children:"Browser type and version"}),o.jsx("li",{children:"Pages visited and features used"}),o.jsx("li",{children:"Time and date of visits"}),o.jsx("li",{children:"Error logs (via Sentry)"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"3. How We Use Your Information"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"We use your information to:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Provide, maintain, and improve the Service"}),o.jsx("li",{children:"Process your uploaded data and generate analytics"}),o.jsx("li",{children:"Generate AI-powered reports and insights using your property data"}),o.jsx("li",{children:"Process payments and manage subscriptions"}),o.jsx("li",{children:"Send transactional emails (password resets, billing receipts)"}),o.jsx("li",{children:"Respond to support requests"}),o.jsx("li",{children:"Monitor and analyze usage patterns to improve the Service"}),o.jsx("li",{children:"Detect and prevent fraud or abuse"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"4. AI Processing and Third-Party Services"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"4.1 Anthropic (Claude AI)"}),o.jsx("p",{children:"We use Anthropic's Claude AI to generate analysis reports. When you request an AI analysis, your property and financial data is sent to Anthropic's API for processing. Anthropic's use of this data is governed by their privacy policy and data processing terms. According to Anthropic's policies:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Data sent via API is not used to train their models"}),o.jsx("li",{children:"Data is processed and returned, not retained long-term"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"4.2 Other Third-Party Services"}),o.jsxs("table",{className:"w-full mt-4 text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-gray-700",children:[o.jsx("th",{className:"text-left py-2 text-gray-400",children:"Service"}),o.jsx("th",{className:"text-left py-2 text-gray-400",children:"Purpose"}),o.jsx("th",{className:"text-left py-2 text-gray-400",children:"Data Shared"})]})}),o.jsxs("tbody",{className:"divide-y divide-gray-800",children:[o.jsxs("tr",{children:[o.jsx("td",{className:"py-3",children:"Stripe"}),o.jsx("td",{className:"py-3",children:"Payment processing"}),o.jsx("td",{className:"py-3",children:"Billing info, email"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"py-3",children:"DigitalOcean"}),o.jsx("td",{className:"py-3",children:"Hosting & database"}),o.jsx("td",{className:"py-3",children:"All application data"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"py-3",children:"Resend"}),o.jsx("td",{className:"py-3",children:"Email delivery"}),o.jsx("td",{className:"py-3",children:"Email address, name"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"py-3",children:"Sentry"}),o.jsx("td",{className:"py-3",children:"Error tracking"}),o.jsx("td",{className:"py-3",children:"Error logs, user ID"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"py-3",children:"Google OAuth"}),o.jsx("td",{className:"py-3",children:"Authentication"}),o.jsx("td",{className:"py-3",children:"Email, name (if used)"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"py-3",children:"Redis (DigitalOcean)"}),o.jsx("td",{className:"py-3",children:"Caching & rate limiting"}),o.jsx("td",{className:"py-3",children:"Session tokens, usage counts"})]})]})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"5. Data Security"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"We implement security measures including:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"HTTPS/TLS encryption for all data in transit"}),o.jsx("li",{children:"Managed PostgreSQL database with SSL connections"}),o.jsx("li",{children:"Passwords hashed using bcrypt"}),o.jsx("li",{children:"JWT tokens for session management"}),o.jsx("li",{children:"Rate limiting to prevent abuse"})]}),o.jsx("p",{className:"mt-4",children:"While we strive to protect your data, no method of transmission over the Internet or electronic storage is 100% secure. We cannot guarantee absolute security."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"6. Data Retention"}),o.jsx("div",{className:"text-gray-300 space-y-4",children:o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsxs("li",{children:[o.jsx("strong",{children:"Account data:"})," Retained while your account is active and for 30 days after deletion request"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Property and financial data:"})," Retained while your account is active;
1353 deleted upon account deletion"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"AI-generated reports:"})," Retained while your account is active"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Billing records:"})," Retained for 7 years for tax and legal compliance"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Server logs:"})," Automatically deleted after 90 days"]})]})})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"7. Your Rights"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"You have the right to:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsxs("li",{children:[o.jsx("strong",{children:"Access:"})," Request a copy of the personal data we hold about you"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Correction:"})," Request correction of inaccurate data"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Deletion:"})," Request deletion of your account and associated data"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Export:"})," Download your uploaded data in standard formats"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Withdraw consent:"})," Stop using the Service at any time"]})]}),o.jsxs("p",{className:"mt-4",children:["To exercise these rights, contact us at"," ",o.jsx("a",{href:"mailto:[email protected]",className:"text-amber-500 hover:text-amber-400",children:"[email protected]"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"8. California Privacy Rights (CCPA)"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"If you are a California resident, you have additional rights under the California Consumer Privacy Act (CCPA):"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Right to know what personal information is collected"}),o.jsx("li",{children:"Right to know if personal information is sold or disclosed"}),o.jsx("li",{children:"Right to opt-out of the sale of personal information"}),o.jsx("li",{children:"Right to non-discrimination for exercising your rights"})]}),o.jsx("p",{className:"mt-4",children:o.jsx("strong",{children:"We do not sell your personal information."})})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"9. Children's Privacy"}),o.jsx("div",{className:"text-gray-300",children:o.jsx("p",{children:"The Service is not intended for individuals under 18 years of age. We do not knowingly collect personal information from children. If you become aware that a child has provided us with personal information, please contact us."})})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"10. Changes to This Policy"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"We may update this Privacy Policy from time to time. We will notify you of material changes by:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Posting the new policy on this page"}),o.jsx("li",{children:'Updating the "Last updated" date'}),o.jsx("li",{children:"Sending an email notification for significant changes"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"11. Contact Us"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"If you have questions about this Privacy Policy, contact us at:"}),o.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-4",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Email:"})," ",o.jsx("a",{href:"mailto:[email protected]",className:"text-amber-500 hover:text-amber-400",children:"[email protected]"})]}),o.jsxs("p",{className:"mt-2",children:[o.jsx("strong",{children:"General Support:"})," ",o.jsx("a",{href:"mailto:[email protected]",className:"text-amber-500 hover:text-amber-400",children:"[email protected]"})]})]})]})]})]}),o.jsx("div",{className:"mt-8 text-center text-gray-500 text-sm",children:o.jsx("p",{children:"© 2026 SAMI. All rights reserved."})})]})]})}function sKe(){return o.jsxs("div",{className:"min-h-screen bg-gray-950 py-12 px-4 sm:px-6 lg:px-8",children:[o.jsx(k3,{title:"Terms of Service",description:"Review SAMI's terms of service covering account usage, data ownership, AI-generated content disclaimers, and subscription billing.",path:"/terms"}),o.jsxs("div",{className:"max-w-4xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs(Ra,{to:"/",className:"inline-flex items-center gap-2 text-gray-400 hover:text-white transition-colors mb-6",children:[o.jsx(wu,{className:"h-4 w-4"}),"Back to Home"]}),o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx(Sn,{className:"h-8 w-8 text-amber-500"}),o.jsx("h1",{className:"text-3xl font-bold text-white",children:"Terms of Service"})]}),o.jsxs("p",{className:"text-gray-400",children:["Last updated: ","January 24, 2026"," | Effe
1353ctive: ","January 24, 2026"]})]}),o.jsxs("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8 space-y-8",children:[o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"1. Agreement to Terms"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:'These Terms of Service ("Terms") constitute a legally binding agreement between you and SAMI ("we," "our," or "us") governing your access to and use of the SAMI platform at asksami.ai (the "Service").'}),o.jsx("p",{children:"By creating an account or using the Service, you agree to be bound by these Terms. If you do not agree to these Terms, you may not access or use the Service."}),o.jsx("p",{children:"If you are using the Service on behalf of a company or organization, you represent that you have authority to bind that entity to these Terms."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"2. Service Description"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"SAMI is a portfolio intelligence platform for multifamily real estate investors. The Service allows you to:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Upload and organize property financial data (P&L statements, rent rolls)"}),o.jsx("li",{children:"Track loan maturities, rates, and key dates"}),o.jsx("li",{children:"View calculated financial metrics (NOI, DSCR, occupancy rates)"}),o.jsx("li",{children:"Generate AI-powered analysis reports"}),o.jsx("li",{children:"Monitor portfolio-wide performance and alerts"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"3. Account Terms"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"3.1 Account Creation"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"You must be at least 18 years old to use the Service"}),o.jsx("li",{children:"You must provide accurate and complete registration information"}),o.jsx("li",{children:"You are responsible for maintaining the security of your account credentials"}),o.jsx("li",{children:"You must notify us immediately of any unauthorized access"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"3.2 Account Responsibilities"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"You are responsible for all activity that occurs under your account"}),o.jsx("li",{children:"You may not share your account with others or allow multiple people to use the same account"}),o.jsx("li",{children:"You may not use the Service for any illegal purpose"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"4. Your Data"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"4.1 Ownership"}),o.jsxs("p",{children:[o.jsx("strong",{className:"text-white",children:"You retain all ownership rights to the data you upload to the Service."})," ","This includes property information, financial reports, rent rolls, and any other data you provide."]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"4.2 License to Us"}),o.jsx("p",{children:"By uploading data to the Service, you grant us a limited license to:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Store and process your data to provide the Service"}),o.jsx("li",{children:"Transmit your data to third-party AI services (Anthropic) for analysis"}),o.jsx("li",{children:"Create backups for data protection"}),o.jsx("li",{children:"Generate aggregated, anonymized statistics (not tied to your identity)"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"4.3 Your Responsibilities"}),o.jsxs("div",{className:"p-4 bg-amber-900/20 border border-amber-700/50 rounded-lg",children:[o.jsx("p",{children:o.jsx("strong",{className:"text-amber-400",children:"You represent and warrant that:"})}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4 mt-2",children:[o.jsx("li",{children:"You have the right to upload all data you provide"}),o.jsx("li",{children:"Your data does not violate any third party's rights"}),o.jsx("li",{children:"If you upload data containing personal information (e.g., tenant names), you have appropriate consent or legal basis to do so"}),o.jsx("li",{children:"Your data is accurate to the best of your knowledge"})]})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"4.4 Data Export and Deletion"}),o.jsx("p",{children:"You may export your data or request account deleti
1353on at any time by contacting [email protected]. Upon account deletion, we will delete your data within 30 days, except as required for legal compliance."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"5. AI-Generated Content"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"5.1 Nature of AI Analysis"}),o.jsx("p",{children:"The Service uses artificial intelligence (powered by Anthropic's Claude) to generate analysis reports and insights. You understand and agree that:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"AI-generated content is provided for informational purposes only"}),o.jsx("li",{children:"AI analysis may contain errors, inaccuracies, or omissions"}),o.jsx("li",{children:"AI recommendations are not financial, legal, or investment advice"}),o.jsx("li",{children:"You should independently verify any information before making decisions"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"5.2 No Professional Advice"}),o.jsxs("div",{className:"p-4 bg-red-900/20 border border-red-700/50 rounded-lg",children:[o.jsx("p",{className:"text-red-300",children:o.jsx("strong",{children:"THE SERVICE DOES NOT PROVIDE FINANCIAL, INVESTMENT, TAX, OR LEGAL ADVICE."})}),o.jsx("p",{className:"mt-2",children:"All analysis, projections, and recommendations are generated by AI based on the data you provide. You should consult with qualified professionals before making investment, refinancing, or other financial decisions."})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"6. Subscriptions and Payment"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"6.1 Subscription Plans"}),o.jsx("p",{children:"The Service offers subscription plans with different features and limits. Current plans and pricing are displayed on our pricing page."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"6.2 Billing"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Subscriptions are billed monthly in advance"}),o.jsx("li",{children:"Payment is processed through Stripe"}),o.jsx("li",{children:"You authorize us to charge your payment method on file"}),o.jsx("li",{children:"Prices are in US dollars unless otherwise stated"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"6.3 Free Trial"}),o.jsx("p",{children:"We may offer a free trial period. At the end of the trial, your access to paid features will expire. To continue using the Service, you will need to subscribe to a paid plan. You will not be charged during the trial period."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"6.4 Cancellation and Refunds"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"You may cancel your subscription at any time from your account settings"}),o.jsx("li",{children:"Cancellation takes effect at the end of your current billing period"}),o.jsx("li",{children:"We do not provide prorated refunds for partial months"}),o.jsx("li",{children:"We may offer refunds at our discretion for exceptional circumstances"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"6.5 Price Changes"}),o.jsx("p",{children:"We may change our prices with 30 days' notice. Continued use of the Service after a price change constitutes acceptance of the new price."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"7. Acceptable Use"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"You agree not to:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Use the Service for any illegal purpose"}),o.jsx("li",{children:"Upload malicious code, viruses, or harmful content"}),o.jsx("li",{children:"Attempt to gain unauthorized access to the Service or other users' accounts"}),o.jsx("li",{children:"Interfere with or disrupt the Service's operation"}),o.jsx("li",{children:"Scrape, crawl, or use automated tools to access the Service without permission"}
1353),o.jsx("li",{children:"Reverse engineer or attempt to extract the source code"}),o.jsx("li",{children:"Resell, sublicense, or redistribute the Service"}),o.jsx("li",{children:"Use the Service to compete with us"}),o.jsx("li",{children:"Upload false or misleading data to manipulate analytics"}),o.jsx("li",{children:"Violate any applicable laws or regulations"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"8. Service Availability"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"8.1 No Guaranteed Uptime"}),o.jsx("p",{children:"We strive to maintain high availability but do not guarantee any specific uptime percentage. The Service may be unavailable due to:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Scheduled or emergency maintenance"}),o.jsx("li",{children:"Third-party service outages (hosting, AI providers, payment processors)"}),o.jsx("li",{children:"Factors beyond our reasonable control"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"8.2 Modifications"}),o.jsx("p",{children:"We may modify, suspend, or discontinue any part of the Service at any time. We will provide reasonable notice for significant changes when possible."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"9. Intellectual Property"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"The Service, including its design, features, code, and content (excluding your data), is owned by us and protected by intellectual property laws."}),o.jsx("p",{children:"We grant you a limited, non-exclusive, non-transferable license to use the Service for its intended purpose during your subscription."}),o.jsx("p",{children:'"SAMI" and our logo are trademarks. You may not use them without our written permission.'})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"10. Disclaimers"}),o.jsx("div",{className:"text-gray-300 space-y-4",children:o.jsxs("div",{className:"p-4 bg-gray-800/50 rounded-lg border border-gray-700",children:[o.jsx("p",{className:"font-semibold text-white mb-2",children:'THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED.'}),o.jsx("p",{children:"We disclaim all warranties including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, and non-infringement."}),o.jsx("p",{className:"mt-4",children:"We do not warrant that:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4 mt-2",children:[o.jsx("li",{children:"The Service will be uninterrupted or error-free"}),o.jsx("li",{children:"Results obtained will be accurate or reliable"}),o.jsx("li",{children:"The Service will meet your specific requirements"}),o.jsx("li",{children:"Any errors will be corrected"})]})]})})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"11. Limitation of Liability"}),o.jsx("div",{className:"text-gray-300 space-y-4",children:o.jsxs("div",{className:"p-4 bg-gray-800/50 rounded-lg border border-gray-700",children:[o.jsx("p",{className:"mb-4",children:"TO THE MAXIMUM EXTENT PERMITTED BY LAW, WE SHALL NOT BE LIABLE FOR:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Any indirect, incidental, special, consequential, or punitive damages"}),o.jsx("li",{children:"Loss of profits, revenue, data, or business opportunities"}),o.jsx("li",{children:"Damages arising from your reliance on AI-generated content"}),o.jsx("li",{children:"Investment losses or financial decisions made using the Service"}),o.jsx("li",{children:"Costs of substitute services"})]}),o.jsx("p",{className:"mt-4",children:o.jsx("strong",{children:"Our total liability shall not exceed the amount you paid us in the 12 months preceding the claim."})})]})})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"12. Indemnification"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"You agree to indemnify and hold us harmless from any claims, damages, losses, and expenses (including legal fees) arising from:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Your use of the Service"}),o.jsx("li",{children:"Your violation of these Terms"}),o.jsx("li",{children:"Your violation of any third party's rights"}),o.jsx("li",{children:"Data you upload to the Service"})]})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"13. Termination"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"13.1 By You"}),o.jsx("p",{children:"You may terminate your account at any time by canceling your subscription and deleting your account from the settings page, or by contacting support."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"13.2 By Us"}),o.jsx("p",{children:"We may suspend or terminate your access to the Service at any time, with or without cause, including for:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Violation of these Terms"}
1353),o.jsx("li",{children:"Non-payment of fees"}),o.jsx("li",{children:"Suspected fraud or abuse"}),o.jsx("li",{children:"Extended periods of inactivity"})]}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"13.3 Effect of Termination"}),o.jsx("p",{children:"Upon termination, your right to use the Service ceases immediately. We may delete your data after termination, subject to our data retention policies."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"14. General Terms"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("h3",{className:"text-lg font-medium text-white",children:"14.1 Governing Law"}),o.jsx("p",{children:"These Terms are governed by the laws of the State of Tennessee, United States, without regard to conflict of law principles."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"14.2 Dispute Resolution"}),o.jsx("p",{children:"Any disputes arising from these Terms shall first be attempted to be resolved through good-faith negotiation. If unresolved within 30 days, disputes shall be submitted to binding arbitration in accordance with the rules of the American Arbitration Association."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"14.3 Entire Agreement"}),o.jsx("p",{children:"These Terms, together with our Privacy Policy, constitute the entire agreement between you and us regarding the Service."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"14.4 Severability"}),o.jsx("p",{children:"If any provision of these Terms is found invalid or unenforceable, that provision will be limited or eliminated to the minimum extent necessary, and the remaining provisions will remain in effect."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"14.5 No Waiver"}),o.jsx("p",{children:"Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights."}),o.jsx("h3",{className:"text-lg font-medium text-white mt-6",children:"14.6 Assignment"}),o.jsx("p",{children:"You may not assign or transfer these Terms without our prior written consent. We may assign our rights and obligations without restriction."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"15. Changes to Terms"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"We may modify these Terms at any time. We will provide notice of material changes by:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-4",children:[o.jsx("li",{children:"Posting the updated Terms on this page"}),o.jsx("li",{children:'Updating the "Last updated" date'}),o.jsx("li",{children:"Sending email notification for significant changes"})]}),o.jsx("p",{className:"mt-4",children:"Continued use of the Service after changes become effective constitutes acceptance of the revised Terms."})]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"16. Contact Us"}),o.jsxs("div",{className:"text-gray-300 space-y-4",children:[o.jsx("p",{children:"If you have questions about these Terms, contact us at:"}),o.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-4",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Email:"})," ",o.jsx("a",{href:"mailto:[email protected]",className:"text-amber-500 hover:text-amber-400",children:"[email protected]"})]}),o.jsxs("p",{className:"mt-2",children:[o.jsx("strong",{children:"General Support:"})," ",o.jsx("a",{href:"mailto:[email protected]",className:"text-amber-500 hover:text-amber-400",children:"[email protected]"})]})]})]})]})]}),o.jsxs("div",{className:"mt-8 text-center text-gray-500 text-sm",children:[o.jsx("p",{children:"© 2026 SAMI. All rights reserved."}),o.jsx("p",{className:"mt-2",children:o.jsx(Ra,{to:"/privacy",className:"text-amber-500 hover:text-amber-400",children:"Privacy Policy"})})]})]})]})}const oKe=()=>{const e=ei(),[t,r]=N.useState(!1),n=i=>{r(!1);const s=document.getElementById(i);s&&s.scrollIntoView({behavior:"smooth"})},a=[{label:"Features",id:"features"},{label:"Pricing",id:"pricing"}];return o.jsxs("nav",{className:"fixed top-0 left-0 right-0 z-50 py-4 bg-primary/80 backdrop-blur-xl border-b border-white/5",children:[o.jsxs("div",{className:"max-w-[1200px] mx-auto px-6 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-8",children:[o.jsx("a",{href:"/",className:"text-2xl font-bold text-gray-100 tracking-tight hover:text-accent-light transition-colors",children:"SAMI"}),o.jsx("div",{className:"hidden md:flex items-center gap-6",children:a.map(i=>o.jsx("button",{onClick:()=>n(i.id),className:"text-sm font-medium text-gray-400 hover:text-gray-100 transition-colors",children:i.label},i.id))})]}),o.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[o.jsx("button",{onClick:()=>
1353e("/login"),className:"px-4 py-2 text-sm font-medium text-gray-100 border border-white/10 rounded-lg hover:bg-white/5 transition-all",children:"Sign In"}),o.jsx("button",{onClick:()=>e("/register"),className:"px-4 py-2 text-sm font-medium text-primary bg-accent hover:bg-accent-light rounded-lg transition-all hover:shadow-[0_0_30px_rgba(251,191,36,0.2)]",children:"Start Free Trial"})]}),o.jsx("button",{onClick:()=>r(!t),className:"md:hidden p-2 text-gray-100 hover:text-accent transition-colors","aria-label":"Toggle menu",children:t?o.jsx(Ir,{className:"w-6 h-6"}):o.jsx(SV,{className:"w-6 h-6"})})]}),t&&o.jsx("div",{className:"md:hidden absolute top-full left-0 right-0 bg-primary/95 backdrop-blur-xl border-b border-white/10",children:o.jsxs("div",{className:"px-6 py-4 space-y-4",children:[a.map(i=>o.jsx("button",{onClick:()=>n(i.id),className:"block w-full text-left text-base font-medium text-gray-300 hover:text-gray-100 transition-colors py-2",children:i.label},i.id)),o.jsxs("div",{className:"pt-4 border-t border-white/10 space-y-3",children:[o.jsx("button",{onClick:()=>{r(!1),e("/login")},className:"block w-full text-center px-4 py-3 text-sm font-medium text-gray-100 border border-white/10 rounded-lg hover:bg-white/5 transition-all",children:"Sign In"}),o.jsx("button",{onClick:()=>{r(!1),e("/register")},className:"block w-full text-center px-4 py-3 text-sm font-medium text-primary bg-accent hover:bg-accent-light rounded-lg transition-all",children:"Start Free Trial"})]})]})})]})},lKe=()=>{const e=ei();return o.jsxs("section",{className:"relative w-full min-h-screen flex flex-col justify-center px-6 pt-20 pb-12 overflow-hidden",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-radial from-accent/10 via-trans
1353parent to-transparent opacity-40"}),o.jsxs("div",{className:"relative max-w-[1200px] mx-auto",children:[o.jsx("div",{className:"flex justify-center mb-6",children:o.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-accent/10 border border-accent/20 rounded-full",children:[o.jsx("span",{className:"px-2 py-0.5 text-xs font-semibold text-primary bg-accent rounded-full",children:"New"}),o.jsx("span",{className:"text-sm text-gray-300",children:"AI Report Types Now Available"})]})}),o.jsxs("h1",{className:"text-center mb-6 font-semibold text-gray-100",style:{fontSize:"clamp(2.5rem, 5vw, 4rem)",letterSpacing:"-0.02em",lineHeight:1.2},children:[o.jsx("span",{className:"gradient-text",children:"Portfolio intelligence"}),o.jsx("br",{}),"that works with your systems"]}),o.jsx("p",{className:"text-center text-gray-400 mb-8 max-w-[700px] mx-auto",style:{fontSize:"clamp(1rem, 2vw, 1.25rem)"},children:"SAMI is a platform-agnostic intelligence layer that sits on top of whatever property management systems your portfolio already uses. Enterprise analytics. Predictable pricing."}),o.jsx("div",{className:"flex justify-center mb-16",children:o.jsx("button",{onClick:()=>e("/register"),className:"px-8 py-4 text-base font-semibold text-primary bg-accent hover:bg-accent-light rounded-lg transition-all hover:shadow-[0_0_30px_rgba(251,191,36,0.2)] hover:scale-105",children:"Start Free Trial"})}),o.jsxs("div",{className:"relative max-w-[900px] mx-auto",children:[o.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-white/10 rounded-2xl p-6 shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-6 pb-4 border-b border-white/10",children:[o.jsx("div",{className:"w-3 h-3 rounded-full bg-error"}),o.jsx("div",{className:"w-3 h-3 rounded-full bg-warning"}),o.jsx("div",{className:"w-3 h-3 rounded-full bg-success"}),o.jsx("span",{className:"ml-4 text-sm text-gray-400 font-medium",children:"Portfolio Dashboard"})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[o.jsxs("div",{className:"bg-primary/50 border border-white/5 rounded-lg p-4",children:[o.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Properties"}),o.jsx("div",{className:"text-2xl font-bold text-gray-100 mb-1",children:"25"}),o.jsx("div",{className:"text-xs text-gray-400",children:"Showing all"})]}),o.jsxs("div",{className:"bg-primary/50 border border-white/5 rounded-lg p-4",children:[o.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Total Units"}),o.jsx("div",{className:"text-2xl font-bold text-gray-100 mb-1",children:"633"}),o.jsx("div",{className:"text-xs text-gray-400",children:"Across portfolio"})]}),o.jsxs("div",{className:"bg-primary/50 border border-white/5 rounded-lg p-4",children:[o.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Loans Maturing"}),o.jsx("div",{className:"text-2xl font-bold text-accent mb-1",children:"1 + 1"}),o.jsx("div",{className:"text-xs text-gray-400",children:"Past due / Within 6 mo"})]}),o.jsxs("div",{className:"bg-primary/50 border border-white/5 rounded-lg p-4",children:[o.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Rate Resets"}),o.jsx("div",{className:"text-2xl font-bold text-red-500 mb-1",children:"3 + 1"}),o.jsx("div",{className:"text-xs text-gray-400",children:"Past due / Within 6 mo"})]})]})]}),o.jsx("div",{className:"absolute inset-0 bg-gradient-radial from-accent/20 via-transparent to-transparent opacity-30 blur-3xl -z-10"})]})]})]})},cKe=()=>{const e=[{value:"1,500+",label:"Units"},{value:"5",label:"States"},{value:"4",label:"PM Systems"}];return o.jsx("section",{className:"w-full py-16 px-6 bg-primary-dark border-t border-b border-white/5",children:o.jsx("div",{className:"max-w-[900px] mx-auto",children:o.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-center gap-6 md:gap-12",children:[o.jsx("h2",{className:"text-xl md:text-2xl font-semibold text-gray-100 whitespace-nowrap",style:{letterSpacing:"-0.01em"},children:"Built by asset managers, for asset managers"}),o.jsx("div",{className:"hidden md:block w-px h-12 bg-white/10"}),o.jsx("div",{className:"flex items-center gap-8",children:e.map((t,r)=>o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-2xl md:text-3xl font-bold gradient-text",children:t.value}),o.jsx("div",{className:"text-xs text-gray-500 uppercase tracking-wider",children:t.label})]},r))})]})})})},uKe=[{name:"Starter",price:129,description:"For individual investors getting started",features:["Up to 5 properties","40 AI credits/month","Basic reports","Email support"],cta:"Start Free Trial",featured:!1},{name:"Professional",price:249,description:"For growing portfolios and syndicators",features:["Up to 25 properties","200 AI credits/month","All report types","AI insights & projections","Priority support","Beta access to new features"],cta:"Start Free Trial",featured:!0}
1353,{name:"Enterprise",price:349,description:"For large portfolios and PM companies",features:["Unlimited properties","Unlimited AI credits","All features","Custom training","Dedicated support","Priority beta access"],cta:"Contact Sales",featured:!1}],dKe=[{icon:"ð",title:"Spreadsheet Hell",description:"Hours spent manually compiling data from different property managers, different systems, different formats. Every. Single. Quarter."},{icon:"â°",title:"Missed Deadlines",description:"Late quarterly reports erode investor confidence. A missed refinancing window costs $10K-$100K+. Spreadsheets don't send alerts."},{icon:"ð°",title:"Per-Unit Pricing",description:"Most analytics platforms charge $5-$12 per unit. At 700 units, that's $3,500-$8,400/month. Growth becomes expensive."}],fKe=[{units:"100 units",perUnit:"$500/mo",sami:"$349/mo"},{units:"500 units",perUnit:"$2,500/mo",sami:"$349/mo"},{units:"1,000 units",perUnit:"$5,000/mo",sami:"$349/mo"},{units:"2,000 units",perUnit:"$10,000/mo",sami:"$349/mo"}],hKe=["Yardi","AppFolio","RentManager","Buildium","Entrata","CSV / Excel"],pKe=()=>o.jsx("section",{className:"w-full py-20 px-6",children:o.jsxs("div",{className:"max-w-[1200px] mx-auto",children:[o.jsxs("div",{className:"text-center mb-16",children:[o.jsx("div",{className:"text-accent text-sm uppercase mb-6",style:{letterSpacing:"0.1em"},children:"The Challenge"}),o.jsxs("h2",{className:"font-semibold text-gray-100 mb-8 max-w-4xl mx-auto",style:{fontSize:"clamp(2.25rem, 5vw, 3.5rem)",letterSpacing:"-0.03em",lineHeight:1.1},children:["Multifamily analytics shouldn't require",o.jsx("br",{className:"hidden md:block"}),"an ",o.jsx("span",{className:"gradient-text",children:"enterprise budget"})]}),o.jsxs("p",{className:"text-lg text-gray-300 max-w-2xl mx-auto mb-3",children:["Managing"," ",o.jsx("span",{className:"text-accent-light font-medium",children:"1,500+ units across five states"})," ","with four different property management systems, we know the pain firsthand."]}),o.jsx("p",{className:"text-base text-gray-500 max-w-xl mx-auto",children:"Juggling multiple portals, manual reporting, and hoping you don't miss a critical deadline."})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:dKe.map((e,t)=>o.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-white/10 rounded-xl p-6 hover:bg-card/70 hover:border-white/20 transition-all duration-300 hover:shadow-glow-sm group",children:[o.jsx("div",{className:"text-4xl mb-4 group-hover:scale-110 transition-transform duration-300",children:e.icon}),o.jsx("h3",{className:"text-xl font-bold text-gray-100 mb-3",children:e.title}),o.jsx("p",{className:"text-gray-400 leading-relaxed",children:e.description})]},t))})]})}),mKe=()=>o.jsx("section",{className:"w-full py-20 px-6 bg-primary-dark",children:o.jsxs("div",{className:"max-w-[800px] mx-auto text-center",children:[o.jsx("div",{className:"text-accent text-sm uppercase mb-4",style:{letterSpacing:"0.1em"},children:"The Solution"}),o.jsxs("h2",{className:"font-semibold text-gray-100 mb-6",style:{fontSize:"clamp(2rem, 4vw, 3rem)",letterSpacing:"-0.02em",lineHeight:1.2},children:["Enterprise intelligence.",o.jsx("br",{}),o.jsx("span",{className:"gradient-text",children:"Startup pricing."})]}),o.jsxs("p",{className:"text-xl text-gray-400 leading-relaxed",children:["SAMI accepts data exports from"," ",o.jsx("span",{className:"text-accent-light",children:"Yardi, AppFolio, RentManager, Buildium, or any system"}),"âand transforms raw data into actionable intelligence with financial analysis and AI-generated reports."]})]})}),gKe=()=>{const e=[{number:"1",title:"Works with whatever you use",description:"Unlike competitors that lock you into their ecosystem, SAMI accepts data exports from any property management system. Upload CSV or Excel from Yardi, AppFolio, RentManager, Buildiumâor all of them at once.",bullets:["Upload CSV/Excel exports from any PMS","One-time column mapping, saved as reusable presets","Unified portfolio view across all systems","Switch property managers without losing analytics"],visual:"pms-systems",reversed:!1},{number:"2",title:"Never miss a refinancing deadline",description:"SAMI's debt intelligence dashboard proactively surfaces loan maturities and IO expirations before they become problems. Visual alerts show exactly when action is neededâcolor-coded by urgency.",bullets:["Loan maturity countdown with days-to-deadline alerts","IO period tracking with payment impact calculations","DSCR health indicators (green/yellow/red)","Portfolio-wide debt alerts at a glance"],visual:"alerts",reversed:!0},{number:"3",title:"AI that tells you what to do",description:"Most platforms show you data. SAMI generates investor-ready reports with specific, prioritized action items. Our AI doesn't just analyzeâit recommends.",bullets:["Quarterly Investor Reports in minutes","Monthly Operations Reports with 30-day outlook","Action items with dollar amounts at risk","Lease expiration alerts with renew
1353al revenue"],visual:"action-items",reversed:!1}],t=r=>{if(r==="pms-systems")return o.jsx("div",{className:"grid grid-cols-2 gap-4",children:hKe.map((n,a)=>o.jsx("div",{className:"bg-card/50 backdrop-blur-sm border border-white/10 rounded-lg p-6 text-center hover:border-accent/50 transition-all duration-300",children:o.jsx("p",{className:"text-gray-100 font-medium",children:n})},a))});if(r==="alerts"){const n=[{title:"Loan Maturity â 1630 Penn",subtitle:"Refinance or payoff required",badge:"87 days",badgeColor:"text-red-500 bg-red-500/10 border-red-500/30"},{title:"Rate Reset â 1812 W 5th St",subtitle:"Mar 1, 2025 ⢠Review terms",badge:"10mo ago",badgeColor:"text-amber-500 bg-amber-500/10 border-amber-500/30"},{title:"DSCR â 1030 Washington",subtitle:"Healthy coverage ratio",badge:"2.14x",badgeColor:"text-emerald-500 bg-emerald-500/10 border-emerald-500/30"}];return o.jsx("div",{className:"space-y-4",children:n.map((a,i)=>o.jsx("div",{className:"bg-card/50 backdrop-blur-sm border border-white/10 rounded-lg p-5 hover:border-accent/50 transition-all duration-300",children:o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"text-gray-100 font-medium mb-1",children:a.title}),o.jsx("p",{className:"text-gray-400 text-sm",children:a.subtitle})]}),o.jsx("span",{className:`px-3 py-1 rounded-full text-sm font-medium border ${a.badgeColor}`,children:a.badge})]})},i))})}if(r==="action-items"){const n=[{title:"Lease 2 expiring units",subtitle:"$2,570/mo at risk ⢠Renewals due soon"},{title:"Fill 1 vacant unit",subtitle:"$1,225/mo lost ⢠Unit 02 vacant 24 days"},{title:"Collect 2 delinquent residents",subtitle:"$812 owed ⢠Units 01, 09"}];return o.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-white/10 rounded-lg p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h4",{className:"text-gray-100 font-medium",children:"Priority Actions"}),o.jsx("span",{className:"text-accent text-sm font-medium",children:"3 items"})]}),o.jsx("div",{className:"space-y-3",children:n.map((a,i)=>o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"w-5 h-5 rounded border border-accent/50 flex items-center justify-center mt-0.5",children:o.jsx("span",{className:"text-accent text-xs",children:i+1})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-gray-100 text-sm font-medium mb-0.5",children:a.title}),o.jsx("p",{className:"text-gray-400 text-xs",children:a.subtitle})]})]},i))}),o.jsx("button",{className:"w-full mt-6 px-4 py-2 bg-accent/10 hover:bg-accent/20 border border-accent/30 text-accent rounded-lg text-sm font-medium transition-all duration-300",children:"See Sample Report"})]})}};return o.jsx("section",{id:"features",className:"w-full py-20 px-6 bg-primary",children:o.jsx("div",{className:"max-w-7xl mx-auto",children:o.jsx("div",{className:"space-y-24",children:e.map((r,n)=>o.jsxs("div",{className:`grid md:grid-cols-2 gap-12 items-center ${r.reversed?"md:grid-flow-dense":""}`,children:[o.jsxs("div",{className:r.reversed?"md:col-start-2":"",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-accent/10 border border-accent/30 mb-6",children:o.jsx("span",{className:"text-accent text-xl font-bold",children:r.number})}),o.jsx("h3",{className:"text-3xl font-bold text-gray-100 mb-4",children:r.title}),o.jsx("p",{className:"text-gray-400 text-lg mb-6",children:r.description}),o.jsx("ul",{className:"space-y-3",children:r.bullets.map((a,i)=>o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx("svg",{className:"w-5 h-5 text-emerald-500 mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),o.jsx("span",{className:"text-gray-300",children:a})]},i))})]}),o.jsx("div",{className:r.reversed?"md:col-start-1 md:row-start-1":"",children:t(r.visual)})]},n))})})})},xKe=()=>{const e=ei(),t=r=>{r.name==="Enterprise"?window.location.href="mailto:[email protected]?subject=Enterprise Inquiry":e("/register")};return o.jsx("section",{id:"pricing",className:"w-full py-20 px-6 bg-primary-dark",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"text-center mb-16",children:[o.jsx("p",{className:"text-accent text-sm font-medium mb-3 uppercase tracking-wider",children:"Pricing"}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-100 mb-4",children:"Flat-rate pricing that rewards growth"}),o.jsx("p",{className:"text-gray-400 text-lg max-w-2xl mx-auto",children:"No per-unit fees. No surprise costs. Just predictable pricing that stays the same whether you have 100 units or 10,000."})]}),o.jsx("div",{className:"grid md:grid-cols-3 gap-8 mb-20",children:uKe.map((r,n)=>o.jsxs("div",{className:`relative rounded-2xl p-8 transition-all duration-300 ${r.featured?"bg-card/80 backdrop-blur-sm border-2 border-accent shadow-glow transform md:-translate-y-4":"bg-card/50 backdrop-blur-sm border border-white/10 hover:border-accent/50"}`,children:[r.featured&&o.jsx("div",{className:"absolute -top-4 left-1/2 -translate-x-1/2",children:o.jsx("span",{className:"inline-flex px-4 py-1 bg-accent text-primary text-sm font-medium rounded-full",children:"Most Popular"})}),o.jsx("h3",{className:"text-2xl font-bold text-gray-100 mb-2",children:r.name}),o.jsx("p",{className:"text-gray-400 text-sm mb-6",children:r.description}),o.jsx("div",{className:"mb-6",children:o.jsxs("div",{className:"flex items-baseline gap-1",children:[o.jsxs("span",{className:"text-5xl font-bold text-gray-100",children:["$",r.price]}),o.jsx("span",{className:"text-gray-400",children:"/month"})]})}),o.jsx("ul",{className:"space-y-3 mb-8",children:r.features.map((a,i)=>o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx("svg",{className:"w-5 h-5 text-emerald-500 mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),o.jsx("span",{className:"text-gray-300 text-sm",children:a})]},i))}),o.jsx("button",{onClick:()=>t(r),className:`w-full py-3 px-6 rounded-lg font-medium transition-all duration-300 ${r.featured?"bg-accent hover:bg-accent-light text-primary shadow-lg hover:shadow-glow":"bg-card/50 hover:bg-card border border-white/20 hover:border-accent/50 text-gray-100"}`,children:r.cta})]},n))}),o.jsxs("div",{className:"bg-card/30 backdrop-blur-sm border border-white/10 rounded-2xl p-8",children:[o.jsx("h3",{className:"text-2xl font-bold text-gray-100 mb-6 text-center",children:"The math is simple"}),o.jsx("p",{className:"text-gray-400 text-center mb-8 max-w-3xl mx-auto",children:"At 700 units, per-unit pricing costs $3,500-$8,400/month. SAMI Enterprise is $349. Same intelligence. 90% less cost."}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-white/10",children:[o.jsx("th",{className:"text-left py-4 px-4 text-gray-100 font-medium",children:"Portfolio Size"}),o.jsx("th",{className:"text-right py-4 px-4 text-gray-100 font-medium",children:"Per-Unit Pricing ($5/unit)"}),o.jsx("th",{className:"text-right py-4 px-4 text-accent font-medium",children:"SAMI Enterprise"}),o.jsx("th",{className:"text-right py-4 px-4 text-emerald-500 font-medium",children:"Savings"})]})}),o.jsx("tbody",{children:fKe.map((r,n)=>{const a=parseInt(r.perUnit.replace(/[^\d]/g,"")),s=a-349,l=Math.round(s/a*100);return o.jsxs("tr",{className:"border-b border-white/5 hover:bg-white/5 transition-colors duration-200",children:[o.jsx("td",{className:"py-4 px-4 text-gray-300",children:r.units}),o.jsx("td",{className:"py-4 px-4 text-right text-gray-400",children:r.perUnit}),o.jsx("td",{className:"py-4 px-4 text-right text-accent font-medium",children:r.sami}),o.jsxs("td",{className:"py-4 px-4 text-right",children:[o.jsxs("div",{className:"text-emerald-500 font-medium",children:["$",s.toLocaleStr
1353ing(),"/mo"]}),o.jsxs("div",{className:"text-emerald-500/70 text-sm",children:["(",l,"% less)"]})]})]},n)})})]})}),o.jsx("p",{className:"text-gray-400 text-sm text-center mt-6",children:"Based on industry average of $5/unit/month. Many platforms charge $8-$12/unit."})]})]})})},yKe=()=>{const e=ei(),t=()=>{e("/register")};return o.jsxs("section",{className:"w-full py-24 px-6 bg-gradient-to-b from-primary-dark to-primary relative overflow-hidden",children:[o.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[o.jsx("div",{className:"absolute top-1/2 left-1/4 w-96 h-96 bg-accent/10 rounded-full blur-3xl"}),o.jsx("div",{className:"absolute top-1/2 right-1/4 w-96 h-96 bg-blue-500/10 rounded-full blur-3xl"})]}),o.jsxs("div",{className:"max-w-4xl mx-auto text-center relative z-10",children:[o.jsxs("h2",{className:"text-4xl md:text-6xl font-bold text-gray-100 mb-6 leading-tight",children:["Ready to see your portfolio"," ",o.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-accent to-accent-light",children:"in a new light?"})]}),o.jsx("p",{className:"text-gray-400 text-xl mb-10 max-w-2xl mx-auto leading-relaxed",children:"Start your 14-day free trial. No credit card required. Connect your first property in under 5 minutes."}),o.jsx("div",{className:"flex justify-center",children:o.jsx("button",{onClick:t,className:"px-8 py-4 bg-accent hover:bg-accent-light text-primary font-medium rounded-lg shadow-lg hover:shadow-glow transition-all duration-300 transform hover:scale-105",children:"Start Free Trial"})})]})]})},vKe=()=>{const e=new Date().getFullYear(),t=[{title:"Product",links:[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"}]},{title:"Support",links:[{label:"Contact Us",href:"mailto:[email protected]"}]},{title:"Legal",links:[{label:"Privacy Policy",href:"/privacy",internal:!0},{label:"Terms of Service",href:"/terms",internal:!0}]}],r=(n,a)=>{if(a.startsWith("#")){n.preventDefault();const i=document.querySelector(a);i&&i.scrollIntoView({behavior:"smooth"})}};return o.jsx("footer",{className:"w-full bg-card/50 border-t border-white/10",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8 mb-12",children:[o.jsxs("div",{className:"md:col-span-1",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"w-8 h-8 bg-accent rounded-lg flex items-center justify-center",children:o.jsx("span",{className:"text-primary font-bold text-lg",children:"S"})}),o.jsx("span",{className:"text-gray-100 font-bold text-xl",children:"SAMI"})]}),o.jsx("p",{className:"text-gray-400 text-sm leading-relaxed",children:"Portfolio intelligence for multifamily investors. Works with your existing systems."})]}),t.map((n,a)=>o.jsxs("div",{children:[o.jsx("h3",{className:"text-gray-100 font-medium mb-4",children:n.title}),o.jsx("ul",{className:"space-y-2",children:n.links.map((i,s)=>o.jsx("li",{children:i.internal?o.jsx(Ra,{to:i.href,className:"text-gray-400 hover:text-accent text-sm transition-colors duration-200",children:i.label}):o.jsx("a",{href:i.href,onClick:l=>r(l,i.href),className:"text-gray-400 hover:text-accent text-sm transition-colors duration-200",children:i.label})},s))})]},a))]}),o.jsx("div",{className:"border-t border-white/10 pt-8",children:o.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[o.jsxs("p",{className:"text-gray-400 text-sm",children:["© ",e," SAMI. All rights reserved."]}),o.jsxs("div",{className:"flex items-center gap-6",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-lg",children:"ð"}),o.jsx("span",{className:"text-gray-400 text-sm",children:"Secure HTTPS"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-lg",children:"âï¸"}),o.jsx("span",{className:"text-gray-400 text-sm",children:"Hosted on DigitalOcean"})]})]})]})})]})})},bKe=()=>o.jsxs("div",{className:"min-h-screen bg-primary",children:[o.jsx(k3,{title:"Portfolio Intelligence for Multifamily Real Estate",description:"SAMI turns your rent rolls, P&Ls, and leasing reports into AI-powered portfolio intelligence. Track NOI, occupancy, and loan maturities across every property. Plans from $129/month.",path:"/"}),o.jsx(oKe,{}),o.jsx(lKe,{}),o.jsx(cKe,{}),o.jsx(pKe,{}),o.jsx(mKe,{}),o.jsx(gKe,{}),o.jsx(xKe,{}),o.jsx(yKe,{}),o.jsx(vKe,{})]});function wKe(){return o.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-6xl font-bold text-accent mb-4",children:"404"}),o.jsx("p",{className:"text-xl text-white/70 mb-8",children:"Page not found"}),o.jsx(Ra,{to:"/",className:"px-6 py-3 bg-accent text-primary font-medium rounded-lg hover:bg-accent/90 transition-colors",children:"Go Home"})]})})}function _Ke(){const[e]=gR(),[t,r]=N.useState(!0),[n,a]=N.useState(""),[i,s]=N.useState(!1),l=e.get("token");return N.useEffect(()=>{if(!l){a("Invalid verification link."),r(!1);return}(async()=>{var u,d;try{(await Xe.post("/auth/verify-email",{token:l})).data.success&&s(!0)}catch(f){a(((d=(u=f.response)==null?void 0:u.data)==null?void 0:d.error)||"Failed to verify email. The link may have expired.")}finally{r(!1)}})()},[l]),t?o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsx("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx(ar,{className:"h-16 w-16 text-amber-500 mx-auto mb-6 animate-spin"}),o.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Verifying your email..."})]})})})}):i?o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsx("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx(vl,{className:"h-16 w-16 text-green-500 mx-auto mb-6"}),o.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Email Verified!"}),o.jsx("p",{className:"text-gray-400 mb-6",children:"Your email has been successfully verified. You can now use all features."}),o.jsx(Ra,{to:"/",children:o.jsx(rt,{variant:"primary",children:"Go to Dashboard"})})]})})})}):o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 py-12 px-4",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsx("div",{className:"bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 p-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Jr,{className:"h-16 w-16 text-red-500 mx-auto mb-6"}),o.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Verification Failed"}),o.jsx("p",{className:"text-gray-400 mb-6",children:n}),o.jsx(Ra,{to:"/login",children:o.jsx(rt,{variant:"primary",children:"Go to Login"})})]})})})})}const SKe="75450905932-qti66aqr3rjvgr8k7ok0n00cqvt7l034.apps.googleusercontent.com";function EKe(){const{user:e,loading:t}=Wi();return t?o.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center",children:o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-accent"})}):e?o.jsx(JGe,{}):o.jsx(bKe,{})}function kKe({children:e}
1353){const t=Zs(),r=new URLSearchParams(t.search);return r.get("pdfMode")==="true"&&r.get("session")?e:o.jsx(PP,{children:e})}function NKe(){const{propertyId:e}=yoe(),t=ei(),[r,n]=N.useState(!0),[a,i]=N.useState(null),[s,l]=N.useState(null);N.useEffect(()=>{e&&(async()=>{var f;try{n(!0);const m=new URLSearchParams(window.location.search).get("session");if(m){console.log("[StandaloneReport] Looking for session:",m);const j=sessionStorage.getItem(m);if(console.log("[StandaloneReport] Session data found:",!!j),j){const k=JSON.parse(j);console.log("[StandaloneReport] Loaded data with date range:",k.dateRange),l(k),n(!1);return}else console.log("[StandaloneReport] No data in sessionStorage for:",m)}console.log("No session data found, falling back to API fetch");const x=await fetch(`/api/properties/${e}`);if(!x.ok)throw new Error("Failed to fetch property");const y=await x.json(),v=await fetch(`/api/metrics/comprehensive/${e}?includeTrends=true`),w={metrics:((f=(v.ok?await v.json():{monthlyTrends:{metrics:[]}}).monthlyTrends)==null?void 0:f.metrics)||[]};let S={start:new Date().toISOString(),end:new Date().toISOString()};if(w.metrics&&w.metrics.length>0){const j=w.metrics.map(k=>k.month_year).sort();S={start:j[0],end:j[j.length-1]}}l({property:y,dateRange:S,financialMetrics:w,rawData:{rentRoll:null,pl:null,leasing:null},analysisResult:null}),n(!1)}catch(p){console.error("Error loading report data:",p),i(p.message),n(!1)}})()},[e]);const u=new URLSearchParams(window.location.search).get("pdfMode")==="true";return r?o.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center",children:o.jsxs("div",{className:"text-white",children:[o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-accent mx-auto mb-4"}),o.jsx("p",{children:"Loading report data..."})]})}):a?o.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("p",{className:"text-red-400 mb-4",children:["Error: ",a]}),!u&&o.jsx("button",{onClick:()=>t("/"),className:"px-4 py-2 bg-accent text-primary rounded hover:bg-accent-light",children:"Go back"})]})}):s?o.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-white mb-4",children:"Report generation system is being upgraded"}),o.jsx("button",{onClick:()=>t("/"),className:"px-4 py-2 bg-accent text-primary rounded hover:bg-accent-light",children:"Go back"})]})}):null}function TKe(){return o.jsx(ile,{children:o.jsx(Ose,{clientId:SKe,children:o.jsx(b2e,{children:o.jsx(_ke,{children:o.jsxs(Ioe,{children:[o.jsx(Zi,{path:"/login",element:o.jsx(QGe,{})}),o.jsx(Zi,{path:"/register",element:o.jsx(ZGe,{})}),o.jsx(Zi,{path:"/forgot-password",element:o.jsx(rKe,{})}),o.jsx(Zi,{path:"/reset-password",element:o.jsx(nKe,{})}),o.jsx(Zi,{path:"/verify-email",element:o.jsx(_Ke,{})}),o.jsx(Zi,{path:"/privacy",element:o.jsx(iKe,{})}),o.jsx(Zi,{path:"/terms",element:o.jsx(sKe,{})}),o.jsx(Zi,{path:"/",element:o.jsx(EKe,{})}),o.jsx(Zi,{path:"/billing",element:o.jsx(PP,{children:o.jsx(eKe,{})})}),o.jsx(Zi,{path:"/billing/success",element:o.jsx(PP,{children:o.jsx(tKe,{})})}),o.jsx(Zi,{path:"/properties/:propertyId/report",element:o.jsx(kKe,{children:o.jsx(NKe,{})})}),o.jsx(Zi,{path:"*",element:o.jsx(wKe,{})})]})})})})})}const ore=Object.prototype.toString;function lre(e){switch(ore.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return gc(e,Error)}}function hm(e,t){return ore.call(e)===`[object ${t}]`}function N3(e){return hm(e,"ErrorEvent")}function bq(e){return hm(e,"DOMError")}function jKe(e){return hm(e,"DOMException")}function xl(e){return hm(e,"String")}function T3(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function j3(e){return e===null||T3(e)||typeof e!="object"&&typeof e!="function"}function Ip(e){return hm(e,"Object")}function xS(e){return typeof Event<"u"&&gc(e,Event)}function AKe(e){return typeof Element<"u"&&gc(e,Element)}function CKe(e){return hm(e,"RegExp")}function yS(e){return!!(e&&e.then&&typeof e.then=="function")}function OKe(e){return Ip(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function cre(e){return typeof e=="number"&&e!==e}function gc(e,t){try{return e instanceof t}catch{return!1}}function ure(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Hh(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function wq(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const a=e[n];try{ure(a)?r.push("[VueViewModel]"):r.push(String(a))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function PKe(e,t,r=!1){return xl(e)?CKe(t)?t.test(e):xl(t)?r?e===t:e.includes(t):!1:!1}function pm(e,t=[],r=!1){return t.some(n=>PKe(e,n,r))}function RKe(e,t,r=250,n,a,i,s){if(!i.exception||!i.exception.values||!s||!gc(s.originalException,Error))return;const l=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;l&&(i.exception.values=IKe(RP(e,t,a,s.originalException,n,i.exception.values,l,0),r))}function RP(e,t,r,n,a,i,s,l){if(i.length>=r+1)return i;let c=[...i];if(gc(n[a],Error)){_q(s,l);const u=e(t,n[a]),d=c.length;Sq(u,a,d,l),c=RP(e,t,r,n[a],a,[u,...c],u,d)}
1353return Array.isArray(n.errors)&&n.errors.forEach((u,d)=>{if(gc(u,Error)){_q(s,l);const f=e(t,u),p=c.length;Sq(f,`errors[${d}]`,p,l),c=RP(e,t,r,u,a,[f,...c],f,p)}}),c}function _q(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Sq(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function IKe(e,t){return e.map(r=>(r.value&&(r.value=Hh(r.value,t)),r))}function _b(e){return e&&e.Math==Math?e:void 0}const xr=typeof globalThis=="object"&&_b(globalThis)||typeof window=="object"&&_b(window)||typeof self=="object"&&_b(self)||typeof global=="object"&&_b(global)||(function(){return this})()||{};function A3(){return xr}function dre(e,t,r){const n=r||xr,a=n.__SENTRY__=n.__SENTRY__||{};return a[e]||(a[e]=t())}const qh=A3(),FKe=80;function Ou(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,a=[];let i=0,s=0;const l=" > ",c=l.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||FKe;for(;r&&i++<n&&(u=MKe(r,d),!(u==="html"||i>1&&s+a.length*c+u.length>=f));)a.push(u),s+=u.length,r=r.parentNode;return a.reverse().join(l)}catch{return"<unknown>"}}function MKe(e,t){const r=e,n=[];let a,i,s,l,c;if(!r||!r.tagName)return"";if(qh.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const u=t&&t.length?t.filter(f=>r.getAttribute(f)).map(f=>[f,r.getAttribute(f)]):null;if(u&&u.length)u.forEach(f=>{n.push(`[${f[0]}="${f[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),a=r.className,a&&xl(a))for(i=a.split(/\s+/),c=0;c<i.length;c++)n.push(`.${i[c]}`);const d=["aria-label","type","name","title","alt"];for(c=0;c<d.length;c++)s=d[c],l=r.getAttribute(s),l&&n.push(`[${s}="${l}"]`);return n.join("")}function DKe(){try{return qh.document.location.href}catch{return""}}function LKe(e){return qh.document&&qh.document.querySelector?qh.document.querySelector(e):null}function fre(e){if(!qh.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const mm=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$Ke="Sentry Logger ",IP=["debug","info","warn","error","log","assert","trace"],Fw={};function lf(e){if(!("console"in xr))return e();const t=xr.console,r={},n=Object.keys(Fw);n.forEach(a=>{const i=Fw[a];r[a]=t[a],t[a]=i});try{return e()}finally{n.forEach(a=>{t[a]=r[a]})}}function BKe(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return mm?IP.forEach(r=>{t[r]=(...n)=>{e&&lf(()=>{xr.console[r](`${$Ke}[${r}]:`,...n)})}}):IP.forEach(r=>{t[r]=()=>{}}),t}const Ve=BKe(),UKe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function zKe(e){return e==="http"||e==="https"}function gm(e,t=!1){const{host:r,path:n,pass:a,port:i,projectId:s,protocol:l,publicKey:c}=e;return`${l}://${c}${t&&a?`:${a}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function HKe(e){const t=UKe.exec(e);if(!t){lf(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,a="",i,s="",l]=t.slice(1);let c="",u=l;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return hre({host:i,pass:a,path:c,projectId:u,port:s,protocol:r,publicKey:n})}function hre(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function qKe(e){if(!mm)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Ve.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?zKe(n)?t&&isNaN(parseInt(t,10))?(Ve.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Ve.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(Ve.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function WKe(e){const t=typeof e=="string"?HKe(e):hre(e);if(!(!t||!qKe(t)))return t}
1353class il extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function Ea(e,t,r){if(!(t in e))return;const n=e[t],a=r(n);typeof a=="function"&&pre(a,n),e[t]=a}function cf(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{mm&&Ve.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pre(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,cf(e,"__sentry_original__",t)}catch{}}function C3(e){return e.__sentry_original__}function VKe(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function mre(e){if(lre(e))return{message:e.message,name:e.name,stack:e.stack,...kq(e)};if(xS(e)){const t={type:e.type,target:Eq(e.target),currentTarget:Eq(e.currentTarget),...kq(e)};return typeof CustomEvent<"u"&&gc(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Eq(e){try{return AKe(e)?Ou(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function kq(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function GKe(e,t=40){const r=Object.keys(mre(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return Hh(r[0],t);for(let n=r.length;n>0;n--){const a=r.slice(0,n).join(", ");if(!(a.length>t))return n===r.length?a:Hh(a,t)}return""}function wi(e){return FP(e,new Map)}function FP(e,t){if(KKe(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const a of Object.keys(e))typeof e[a]<"u"&&(n[a]=FP(e[a],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(a=>{n.push(FP(a,t))}),n}return e}function KKe(e){if(!Ip(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const gre=50,Nq=/\(error: (.*)\)/,Tq=/captureMessage|captureException/;function xre(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const a=[],i=r.split(` 1354`);for(let s=n;s<i.length;s++){const l=i[s];if(l.length>1024)continue;const c=Nq.test(l)?l.replace(Nq,"$1"):l;if(!c.match(/\S*Error: /)){for(const u of t){const d=u(c);if(d){a.push(d);break}}if(a.length>=gre)break}}return XKe(a)}}function YKe(e){return Array.isArray(e)?xre(...e):e}function XKe(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),Tq.test(t[t.length-1].function||"")&&(t.pop(),Tq.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,gre).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const $A="<anonymous>";function xc(e){try{return!e||typeof e!="function"?$A:e.name||$A}catch{return $A}}const Kb={},jq={};function Nf(e,t){Kb[e]=Kb[e]||[],Kb[e].push(t)}function Tf(e,t){jq[e]||(t(),jq[e]=!0)}function Oo(e,t){const r=e&&Kb[e];if(r)for(const n of r)try{n(t)}catch(a){mm&&Ve.error(`Error while triggering instrumentation handler. 1355Type: ${e} 1356Name: ${xc(n)} 1357Error:`,a)}}function JKe(e){const t="console";Nf(t,e),Tf(t,QKe)}function QKe(){"console"in xr&&IP.forEach(function(e){e in xr.console&&Ea(xr.console,e,function(t){return Fw[e]=t,function(...r){Oo("console",{args:r,level:e});const a=Fw[e];a&&a.apply(xr.console,r)}})})}function An(){const e=xr,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function yre(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ou(e){const{message:t,event_id:r}=e;if(t)return t;const n=yre(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function MP(e,t,r){const n=e.exception=e.exception||{},a=n.values=n.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function Sx(e,t){const r=yre(e);if(!r)return;const n={type:"generic",handled:!0},a=r.mechanism;if(r.mechanism={...n,...a,...t},t&&"data"in t){const i={...a&&a.data,...t.data};r.mechanism.data=i}}function Aq(e){if(e&&e.__sentry_captured__)return!0;try{cf(e,"__sentry_captured__",!0)}catch{}return!1}function vre(e){return Array.isArray(e)?e:[e]}const gh=xr,ZKe=1e3;let Cq,DP,LP;function bre(e){Nf("dom",e),Tf("dom",eYe)}function eYe(){if(!gh.document)return;const e=Oo.bind(null,"dom"),t=Oq(e,!0);gh.document.addEventListener("click",t,!1),gh.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const n=gh[r]&&gh[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ea(n,"addEventListener",function(a){return function(i,s,l){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const f=Oq(e);d.handler=f,a.call(this,i,f,l)}d.refCount++}catch{}return a.call(this,i,s,l)}}),Ea(n,"removeEventListener",function(a){return function(i,s,l){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(a.call(this,i,d.handler,l),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return a.call(this,i,s,l)}}
1357))})}function tYe(e){if(e.type!==DP)return!1;try{if(!e.target||e.target._sentryId!==LP)return!1}catch{}return!0}function rYe(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Oq(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=nYe(r);if(rYe(r.type,n))return;cf(r,"_sentryCaptured",!0),n&&!n._sentryId&&cf(n,"_sentryId",An());const a=r.type==="keypress"?"input":r.type;tYe(r)||(e({event:r,name:a,global:t}),DP=r.type,LP=n?n._sentryId:void 0),clearTimeout(Cq),Cq=gh.setTimeout(()=>{LP=void 0,DP=void 0},ZKe)}}function nYe(e){try{return e.target}catch{return null}}const $P=A3();function wre(){if(!("fetch"in $P))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function BP(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function aYe(){if(typeof EdgeRuntime=="string")return!0;if(!wre())return!1;if(BP($P.fetch))return!0;let e=!1;const t=$P.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=BP(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){mm&&Ve.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function O3(e){const t="fetch";Nf(t,e),Tf(t,iYe)}function iYe(){aYe()&&Ea(xr,"fetch",function(e){return function(...t){const{method:r,url:n}=sYe(t),a={args:t,fetchData:{method:r,url:n},startTimestamp:Date.now()};return Oo("fetch",{...a}),e.apply(xr,t).then(i=>{const s={...a,endTimestamp:Date.now(),response:i};return Oo("fetch",s),i},i=>{const s={...a,endTimestamp:Date.now(),error:i};throw Oo("fetch",s),i})}})}function UP(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Pq(e){return typeof e=="string"?e:e?UP(e,"url")?e.url:e.toString?e.toString():"":""}function sYe(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:Pq(r),method:UP(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Pq(t),method:UP(t,"method")?String(t.method).toUpperCase():"GET"}}let Sb=null;function _re(e){const t="error";Nf(t,e),Tf(t,oYe)}function oYe(){Sb=xr.onerror,xr.onerror=function(e,t,r,n,a){return Oo("error",{column:n,error:a,line:r,msg:e,url:t}),Sb&&!Sb.__SENTRY_LOADER__?Sb.apply(this,arguments):!1},xr.onerror.__SENTRY_INSTRUMENTED__=!0}let Eb=null;function Sre(e){const t="unhandledrejection";Nf(t,e),Tf(t,lYe)}function lYe(){Eb=xr.onunhandledrejection,xr.onunhandledrejection=function(e){return Oo("unhandledrejection",e),Eb&&!Eb.__SENTRY_LOADER__?Eb.apply(this,arguments):!0},xr.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const kb=A3();function cYe(){const e=kb.chrome,t=e&&e.app&&e.app.runtime,r="history"in kb&&!!kb.history.pushState&&!!kb.history.replaceState;return!t&&r}const j0=xr;let Nb;function vS(e){const t="history";Nf(t,e),Tf(t,uYe)}function uYe(){if(!cYe())return;const e=j0.onpopstate;j0.onpopstate=function(...r){const n=j0.location.href,a=Nb;if(Nb=n,Oo("history",{from:a,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const a=n.length>2?n[2]:void 0;if(a){const i=Nb,s=String(a);Nb=s,Oo("history",{from:i,to:s})}return r.apply(this,n)}}Ea(j0.history,"pushState",t),Ea(j0.history,"replaceState",t)}const dYe=xr,pu="__sentry_xhr_v3__";function P3(e){Nf("xhr",e),Tf("xhr",fYe)}function fYe(){if(!dYe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;Ea(e,"open",function(t){return function(...r){const n=Date.now(),a=xl(r[0])?r[0].toUpperCase():void 0,i=hYe(r[1]);if(!a||!i)return t.apply(this,r);this[pu]={method:a,url:i,request_headers:{}},a==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const l=this[pu];if(l&&this.readyState===4){try{l.status_code=this.status}catch{}const c={args:[a,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this};Oo("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ea(this,"onreadystatechange",function(l){return function(...c){return s(),l.apply(this,c)}}):this.addEventListener("readystatechange",s),Ea(this,"setRequestHeader",function(l){return function(...c){const[u,d]=c,f=this[pu];return f&&xl(u)&&xl(d)&&(f.request_headers[u.toLowerCase()]=d),l.apply(this,c)}}),t.apply(this,r)}}),Ea(e,"send",function(t){return function(...r){const n=this[pu];if(!n)return t.apply(this,r);r[0]!==void 0&&(n.body=r[0]);const a={args:[n.method,n.url],startTimestamp:Date.now(),xhr:this};return Oo("xhr",a),t.apply(this,r)}})}function hYe(e){if(xl(e))return e;try{return e.toString()}catch{}}function pYe(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function mYe(){return"npm"}function gYe(){return!pYe()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Rq(){return typeof window<"u"&&(!gYe()||xYe())}function xYe(){return xr.process!==void 0&&xr.process.type==="renderer"}function yYe(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let i=0;i<t.length;i++)if(t[i]===a)return!0;return t.push(a),!1}function n(a){if(e)t.delete(a);else for(let i=0;i<t.length;i++)if(t[i]===a){t.splice(i,1);break}}return[r,n]}function rl(e,t=100,r=1/0){try{return zP("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Ere(e,t=3,r=100*1024){const n=rl(e,t);return _Ye(n)>r?Ere(e,t-1,r):n}function zP(e,t,r=1/0,n=1/0,a=yYe()){const[i,s]=a;if(t==null||["number","boolean","string"].includes(typeof t)&&!cre(t))return t;const l=vYe(e,t);if(!l.startsWith("[object "))return l;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(c===0)return l.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const m=u.toJSON();return zP("",m,c-1,n,a)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const p=mre(t);for(const m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(f>=n){d[m]="[MaxProperties ~]";break}const x=p[m];d[m]=zP(m,x,c-1,n,a),f++}return s(t),d}function vYe(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(ure(t))return"[VueViewModel]";if(OKe(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${xc(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=bYe(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function bYe(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function wYe(e){return~-encodeURI(e).split(/%..|./).length}function _Ye(e){return wYe(JSON.stringify(e))}var Wl;
1357(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(Wl||(Wl={}));function Fp(e){return new os(t=>{t(e)})}function R3(e){return new os((t,r)=>{r(e)})}class os{constructor(t){os.prototype.__init.call(this),os.prototype.__init2.call(this),os.prototype.__init3.call(this),os.prototype.__init4.call(this),this._state=Wl.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new os((n,a)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){a(s)}},i=>{if(!r)a(i);else try{n(r(i))}catch(s){a(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new os((r,n)=>{let a,i;return this.then(s=>{i=!1,a=s,t&&t()},s=>{i=!0,a=s,t&&t()}).then(()=>{if(i){n(a);return}r(a)})})}__init(){this._resolve=t=>{this._setResult(Wl.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Wl.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===Wl.PENDING){if(yS(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Wl.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Wl.RESOLVED&&r[1](this._value),this._state===Wl.REJECTED&&r[2](this._value),r[0]=!0)})}}}function SYe(e){const t=[];function r(){return e===void 0||t.length<e}function n(s){return t.splice(t.indexOf(s),1)[0]}function a(s){if(!r())return R3(new il("Not adding Promise because buffer limit was reached."));const l=s();return t.indexOf(l)===-1&&t.push(l),l.then(()=>n(l)).then(null,()=>n(l).then(null,()=>{})),l}function i(s){return new os((l,c)=>{let u=t.length;if(!u)return l(!0);const d=setTimeout(()=>{s&&s>0&&l(!1)},s);t.forEach(f=>{Fp(f).then(()=>{--u||(clearTimeout(d),l(!0))},c)})})}return{$:t,add:a,drain:i}}function Gd(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}const EYe=["fatal","error","warning","log","info","debug"];
1357function kYe(e){return e==="warn"?"warning":EYe.includes(e)?e:"log"}const kre=1e3;function hy(){return Date.now()/kre}function NYe(){const{performance:e}=xr;if(!e||!e.now)return hy;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/kre}const py=NYe(),ps=(()=>{const{performance:e}=xr;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,i=a<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+r-n):t,u=c<t;return i||u?a<=c?e.timeOrigin:s:n})(),HP="baggage",Nre="sentry-",TYe=/^sentry-/,jYe=8192;function AYe(e){if(!xl(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((n,a)=>{const i=Iq(a);for(const s of Object.keys(i))n[s]=i[s];return n},{});else{if(!e)return;t=Iq(e)}const r=Object.entries(t).reduce((n,[a,i])=>{if(a.match(TYe)){const s=a.slice(Nre.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function Tre(e){if(!e)return;const t=Object.entries(e).reduce((r,[n,a])=>(a&&(r[`${Nre}${n}`]=a),r),{});return CYe(t)}function Iq(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(t[r]=n,t),{})}function CYe(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],a)=>{const i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,s=a===0?i:`${t},${i}`;return s.length>jYe?(mm&&Ve.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}const OYe=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function PYe(e){if(!e)return;const t=e.match(OYe);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function RYe(e,t){const r=PYe(e),n=AYe(t),{traceId:a,parentSpanId:i,parentSampled:s}=r||{};return r?{traceId:a||An(),parentSpanId:i||An().substring(16),spanId:An().substring(16),sampled:s,dsc:n||{}}:{traceId:a||An(),spanId:An().substring(16)}}function I3(e=An(),t=An().substring(16),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function Vu(e,t=[]){return[e,t]}function IYe(e,t){const[r,n]=e;return[r,[...n,t]]}function Fq(e,t){const r=e[1];for(const n of r){const a=n[0].type;if(t(n,a))return!0}return!1}function qP(e,t){return(t||new TextEncoder).encode(e)}function FYe(e,t){const[r,n]=e;let a=JSON.stringify(r);function i(s){typeof a=="string"?a=typeof s=="string"?a+s:[qP(a,t),s]:a.push(typeof s=="string"?qP(s,t):s)}for(const s of n){const[l,c]=s;if(i(` 1358${JSON.stringify(l)} 1359`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(rl(c))}i(u)}}return typeof a=="string"?a:MYe(a)}function MYe(e){const t=e.reduce((a,i)=>a+i.length,0),r=new Uint8Array(t);let n=0;for(const a of e)r.set(a,n),n+=a.length;return r}function DYe(e,t){const r=typeof e.data=="string"?qP(e.data,t):e.data;return[wi({type:"attachment",length:r.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),r]}const LYe={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Mq(e){return LYe[e]}function F3(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function jre(e,t,r,n){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:gm(n)},...a&&{trace:wi({...a})}}}function $Ye(e,t,r){const n=[{type:"client_report"},{timestamp:hy(),discarded_events:e}];return Vu(t?{dsn:t}:{},[n])}const BYe=60*1e3;function UYe(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?BYe:n-t}function zYe(e,t){return e[t]||e.all||0}function Are(e,t,r=Date.now()){return zYe(e,t)>r}function Cre(e,{statusCode:t,headers:r},n=Date.now()){const a={...e},i=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(i)for(const l of i.trim().split(",")){const[c,u,,,d]=l.split(":",5),f=parseInt(c,10),p=(isNaN(f)?60:f)*1e3;if(!u)a.all=n+p;else for(const m of u.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(a[m]=n+p):a[m]=n+p}else s?a.all=n+UYe(s,n):t===429&&(a.all=n+60*1e3);return a}function HYe(e,t){return e??t()}function BA(e){let t,r=e[0],n=1;for(;n<e.length;){const a=e[n],i=e[n+1];if(n+=2,(a==="optionalAccess"||a==="optionalCall")&&r==null)return;a==="access"||a==="optionalAccess"?(t=r,r=i(r)):(a==="call"||a==="optionalCall")&&(r=i((...s)=>r.call(t,...s)),t=void 0)}return r}const Ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,bS="production";function M3(){return dre("globalEventProcessors",()=>[])}function qYe(e){M3().push(e)}function Mw(e,t,r,n=0){return new os((a,i)=>{const s=e[n];if(t===null||typeof s!="function")a(t);else{const l=s({...t},r);Ot&&s.id&&l===null&&Ve.log(`Event processor "${s.id}" dropped event`),yS(l)?l.then(c=>Mw(e,c,r,n+1).then(a)).then(null,i):Mw(e,l,r,n+1).then(a).then(null,i)}})}function Ore(e){const t=py(),r={sid:An(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>WYe(r)};return e&&uf(r,e),r}function uf(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||py(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:An()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),t
1359ypeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Pre(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),uf(e,r)}function WYe(e){return wi({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const VYe=0,Rre=1;function D3(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:a,parent_span_id:i,status:s,tags:l,origin:c}=Un(e);return wi({data:n,op:a,parent_span_id:i,span_id:t,status:s,tags:l,trace_id:r,origin:c})}function wS(e){const{traceId:t,spanId:r}=e.spanContext(),n=L3(e);return I3(t,r,n)}function _S(e){return typeof e=="number"?Dq(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Dq(e.getTime()):py()}function Dq(e){return e>9999999999?e/1e3:e}function Un(e){return GYe(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function GYe(e){return typeof e.getSpanJSON=="function"}function L3(e){const{traceFlags:t}=e.spanContext();return!!(t&Rre)}function Ire(e,t,r,n,a,i){const{normalizeDepth:s=3,normalizeMaxBreadth:l=1e3}=e,c={...t,event_id:t.event_id||r.event_id||An(),timestamp:t.timestamp||hy()},u=r.integrations||e.integrations.map(v=>v.name);KYe(c,e),JYe(c,u),t.type===void 0&&YYe(c,e.stackParser);const d=ZYe(n,r.captureContext);r.mechanism&&Sx(c,r.mechanism);const f=a&&a.getEventProcessors?a.getEventProcessors():[],p=lXe().getScopeData();if(i){const v=i.getScopeData();Uq(p,v)}if(d){const v=d.getScopeData();Uq(p,v)}const m=[...r.attachments||[],...p.attachments];m.length&&(r.attachments=m),Lre(c,p);const x=[...f,...M3(),...p.eventProcessors];return Mw(x,c,r).then(v=>(v&&XYe(v),typeof s=="number"&&s>0?QYe(v,s,l):v))}function KYe(e,t){const{environment:r,release:n,dist:a,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?r:bS),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&a!==void 0&&(e.dist=a),e.message&&(e.message=Hh(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Hh(s.value,i));const l=e.request;l&&l.url&&(l.url=Hh(l.url,i))}const Lq=new WeakMap;function YYe(e,t){const r=xr._sentryDebugIds;if(!r)return;let n;const a=Lq.get(t);a?n=a:(n=new Map,Lq.set(t,n));const i=Object.keys(r).reduce((s,l)=>{let c;const u=n.get(l);u?c=u:(c=t(l),n.set(l,c));for(let d=c.length-1;d>=0;d--){const f=c[d];if(f.filename){s[f.filename]=r[l];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(l=>{l.filename&&(l.debug_id=i[l.filename])})})}catch{}}function XYe(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(a=>{a.debug_id&&(a.abs_path?t[a.abs_path]=a.debug_id:a.filename&&(t[a.filename]=a.debug_id),delete a.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.keys(t).forEach(n=>{r.push({type:"sourcemap",code_file:n,debug_id:t[n]})})}function JYe(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function QYe(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(a=>({...a,...a.data&&{data:rl(a.data,t,r)}}))},...e.user&&{user:rl(e.user,t,r)},...e.contexts&&{contexts:rl(e.contexts,t,r)},...e.extra&&{extra:rl(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=rl(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(a=>{const i=Un(a).data;return i&&(a.data=rl(i,t,r)),a})),n}function ZYe(e,t){if(!t)return e;const r=e?e.clone():new yu;return r.update(t),r}function $3(e,t){return Ni().captureException(e,void 0)}function Fre(e,t){return Ni().captureEvent(e,t)}function Pu(e,t){Ni().addBreadcrumb(e,t)}function eXe(e,t){Ni().setContext(e,t)}function tXe(...e){const t=Ni();if(e.length===2){const[r,n]=e;return r?t.withScope(()=>(t.getStackTop().scope=r,n(r))):t.withScope(n)}return t.withScope(e[0])}function Mr(){return Ni().getClient()}function gs(){return Ni().getScope()}function $q(e){const t=Mr(),r=Gu(),n=gs(),{release:a,environment:i=bS}=t&&t.getOptions()||{},{userAgent:s}=xr.navigator||{},l=Ore({release:a,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),c=r.getSession();return c&&c.status==="ok"&&uf(c,{status:"exited"}),Mre(),r.setSession(l),n.setSession(l),l}function Mre(){const e=Gu(),t=gs(),r=t.getSession()||e.getSession();r&&Pre(r),Dre(),e.setSession(),t.setSession()}function Dre(){const e=Gu(),t=gs(),r=Mr(),n=t.getSession()||e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}function Bq(e=!1){if(e){Mre();return}Dre()}function Dw(e){return e.transaction}function SS(e,t,r){const n=t.getOptions(),{publicKey:a}=t.getDsn()||{},{segment:i}=r&&r.getUser()||{},s=wi({environment:n.environment||bS,release:n.release,user_segment:i,public_key:a,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function Mp(e){const t=Mr();if(!t)return{};const r=SS(Un(e).trace_id||"",t,gs()),n=Dw(e);if(!n)return r;const a=n&&n._frozenDynamicSamplingContext;if(a)return a;const{sampleRate:i,source:s}=n.metadata;i!=null&&(r.sample_rate=`${i}`);const l=Un(n);return s&&s!=="url"&&(r.transaction=l.description),r.sampled=String(L3(n)),t.emit&&t.emit("createDsc",r),r}function Lre(e,t){const{fingerprint:r,span:n,breadcrumbs:a,sdkProcessingMetadata:i}=t;
vendor: 5,758 bytes, line 1359
1359rXe(e,t),n&&iXe(e,n),sXe(e,r),nXe(e,a),aXe(e,i)}function Uq(e,t){const{extra:r,tags:n,user:a,contexts:i,level:s,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:x}=t;A0(e,"extra",r),A0(e,"tags",n),A0(e,"user",a),A0(e,"contexts",i),A0(e,"sdkProcessingMetadata",l),s&&(e.level=s),m&&(e.transactionName=m),x&&(e.span=x),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function A0(e,t,r){if(r&&Object.keys(r).length){e[t]={...e[t]};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[t][n]=r[n])}}function rXe(e,t){const{extra:r,tags:n,user:a,contexts:i,level:s,transactionName:l}=t,c=wi(r);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=wi(n);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const d=wi(a);d&&Object.keys(d).length&&(e.user={...d,...e.user});const f=wi(i);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),s&&(e.level=s),l&&(e.transaction=l)}function nXe(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function aXe(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function iXe(e,t){e.contexts={trace:D3(t),...e.contexts};const r=Dw(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:Mp(t),...e.sdkProcessingMetadata};const n=Un(r).description;n&&(e.tags={transaction:n,...e.tags})}}function sXe(e,t){e.fingerprint=e.fingerprint?vre(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const oXe=100;let UA;class yu{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=zq()}static clone(t){return t?t.clone():new yu}clone(){const t=new yu;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&uf(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t;if(r instanceof yu){const n=r.getScopeData();this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&Object.keys(n.user).length&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint.length&&(this._fingerprint=n.fingerprint),r.getRequestSession()&&(this._requestSession=r.getRequestSession()),n.propagationContext&&(this._propagationContext=n.propagationContext)}else if(Ip(r)){const n=t;this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession),n.propagationContext&&(this._propagationContext=n.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=zq(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:oXe;if(n<=0)return this;const a={timestamp:hy(),...t},i=this._breadcrumbs;return i.push(a),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}
1359getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:r,_contexts:n,_tags:a,_extra:i,_user:s,_level:l,_fingerprint:c,_eventProcessors:u,_propagationContext:d,_sdkProcessingMetadata:f,_transactionName:p,_span:m}=this;return{breadcrumbs:t,attachments:r,contexts:n,tags:a,extra:i,user:s,level:l,fingerprint:c||[],eventProcessors:u,propagationContext:d,sdkProcessingMetadata:f,transactionName:p,span:m}}applyToEvent(t,r={},n=[]){Lre(t,this.getScopeData());const a=[...n,...M3(),...this._eventProcessors];return Mw(a,t,r)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:An();if(!this._client)return Ve.warn("No client configured on scope - will not capture exception!"),n;const a=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:a,...r,event_id:n},this),n}captureMessage(t,r,n){const a=n&&n.event_id?n.event_id:An();if(!this._client)return Ve.warn("No client configured on scope - will not capture message!"),a;const i=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:a},this),a}captureEvent(t,r){const n=r&&r.event_id?r.event_id:An();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(Ve.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function lXe(){return UA||(UA=new yu),UA}function zq(){return{traceId:An(),spanId:An().substring(16)}}const WP="7.120.4",$re=parseFloat(WP),cXe=100;class Bre{constructor(t,r,n,a=$re){this._version=a;let i;r?i=r:(i=new yu,i.setClient(t));let s;n?s=n:(s=new yu,s.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){const r=this.getStackTop();r.client=t,r.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const r=this.pushScope();let n;try{n=t(r)}catch(a){throw this.popScope(),a}return yS(n)?n.then(a=>(this.popScope(),a),a=>{throw this.popScope(),a}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,r){const n=this._lastEventId=r&&r.event_id?r.event_id:An(),a=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:a,...r,event_id:n}),n}captureMessage(t,r,n){const a=this._lastEventId=n&&n.event_id?n.event_id:An(),i=new Error(t);return this.getScope().captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:a}),a}captureEvent(t,r){const n=r&&r.event_id?r.event_id:An();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...r,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,r){const{scope:n,client:a}=this.getStackTop();if(!a)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=cXe}=a.getOptions&&a.getOptions()||{};if(s<=0)return;const c={timestamp:hy(),...t},u=i?lf(()=>i(c,r)):c;u!==null&&(a.emit&&a.emit("beforeAddBreadcrumb",u,r),n.addBreadcrumb(u,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,r){this.getScope().setTag(t,r),this.getIsolationScope().setTag(t,r)}
1359setExtra(t,r){this.getScope().setExtra(t,r),this.getIsolationScope().setExtra(t,r)}setContext(t,r){this.getScope().setContext(t,r),this.getIsolationScope().setContext(t,r)}configureScope(t){const{scope:r,client:n}=this.getStackTop();n&&t(r)}run(t){const r=Hq(this);try{t(this)}finally{Hq(r)}}getIntegration(t){const r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch{return Ot&&Ve.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,r){const n=this._callExtensionMethod("startTransaction",t,r);return Ot&&!n&&(this.getClient()?Ve.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': 1360Sentry.addTracingExtensions(); 1361Sentry.init({...}); 1362`):Ve.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const r=this.getStackTop().scope,n=r.getSession();n&&Pre(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:a,environment:i=bS}=n&&n.getOptions()||{},{userAgent:s}=xr.navigator||{},l=Ore({release:a,environment:i,user:r.getUser(),...s&&{userAgent:s},...t}),c=r.getSession&&r.getSession();return c&&c.status==="ok"&&uf(c,{status:"exited"}),this.endSession(),r.setSession(l),l}shouldSendDefaultPii(){const t=this.getClient(),r=t&&t.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:r}=this.getStackTop(),n=t.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_callExtensionMethod(t,...r){const a=my().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,r);Ot&&Ve.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function my(){return xr.__SENTRY__=xr.__SENTRY__||{extensions:{},hub:void 0},xr}function Hq(e){const t=my(),r=VP(t);return Ure(t,e),r}function Ni(){const e=my();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return uXe(e)}function Gu(){return Ni().getIsolationScope()}function uXe(e=my()){return(!dXe(e)||VP(e).isOlderThan($re))&&Ure(e,new Bre),VP(e)}function dXe(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function VP(e){return dre("hub",()=>new Bre,e)}function Ure(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function jf(e){return Ni().getScope().getTransaction()}let qq=!1;function fXe(){qq||(qq=!0,_re(GP),Sre(GP))}function GP(){const e=jf();if(e){const t="internal_error";Ot&&Ve.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}GP.tag="sentry_tracingErrorCallback";var Wq;(function(e){e.Ok="ok";const r="deadline_exceeded";e.DeadlineExceeded=r;const n="unauthenticated";e.Unauthenticated=n;const a="permission_denied";e.PermissionDenied=a;const i="not_found";e.NotFound=i;const s="resource_exhausted";e.ResourceExhausted=s;const l="invalid_argument";e.InvalidArgument=l;const c="unimplemented";e.Unimplemented=c;const u="unavailable";e.Unavailable=u;const d="internal_error";e.InternalError=d;const f="unknown_error";e.UnknownError=f;const p="cancelled";e.Cancelled=p;const m="already_exists";e.AlreadyExists=m;const x="failed_precondition";e.FailedPrecondition=x;const y="aborted";e.Aborted=y;const v="out_of_range";e.OutOfRange=v;const b="data_loss";e.DataLoss=b})(Wq||(Wq={}));function hXe(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function B3(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const r=hXe(t);r!=="unknown_error"&&e.setStatus(r)}function xm(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Mr(),r=e||t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function zre(e){if(!xm())return;const t=mXe(e),r=Ni(),n=e.scope?e.scope.getSpan():U3();if(e.onlyIfParent&&!n)return;const s=(e.scope||gs()).clone();return pXe(r,{parentSpan:n,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function U3(){return gs().getSpan()}function pXe(e,{parentSpan:t,spanContext:r,forceTransaction:n,scope:a}){if(!xm())return;const i=Gu();let s;if(t&&!n)s=t.startChild(r);else if(t){const l=Mp(t),{traceId:c,spanId:u}=t.spanContext(),d=L3(t);s=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:d,...r,metadata:{dynamicSamplingContext:l,...r.metadata}})}else{const{traceId:l,dsc:c,parentSpanId:u,sampled:d}={...i.getPropagationContext(),...a.getPropagationContext()};s=e.startTransaction({traceId:l,parentSpanId:u,parentSampled:d,...r,metadata:{dynamicSamplingContext:c,...r.metadata}})}return a.setSpan(s),gXe(s,a,i),s}function mXe(e){if(e.startTime){const t={...e};return t.startTimestamp=_S(e.startTime),delete t.startTime,t}return e}const Hre="_sentryScope",qre="_sentryIsolationScope";function gXe(e,t,r){e&&(cf(e,qre,r),cf(e,Hre,t))}function xXe(e){return{scope:e[Hre],isolationScope:e[qre]}}const oc="sentry.source",Nh="sentry.sample_rate",Tb="sentry.op",Th="sentry.origin",yXe="profile_id";class Wre{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class ES{constructor(t={}){this._traceId=t.traceId||An(),this._spanId=t.spanId||An().substring(16),this._startTime=t.startTimestamp||py(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[Th]:t.origin||"manual",[Tb]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Tb]}set op(t){this.setAttribute(Tb,t)}get origin(){return this._attributes[Th]}set origin(t){this.setAttribute(Th,t)}spanContext(){const{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?Rre:VYe}}startChild(t){const r=new ES({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r);const n=Dw(this);if(r.transaction=n,Ot&&n){const a=t&&t.op||"< unknown op >",i=Un(r).description||"< unknown name >",s=n.spanContext().spanId,l=`[Tracing] Starting '${a}' span on transaction '${i}' (${s}).`;Ve.log(l),this._logMessage=l}return r}setTag(t,r){return this.tags={...this.tags,[t]:r},this}setData(t,r){return this.data={...this.data,[t]:r},this}setAttribute(t,r){r===void 0?delete this._attributes[t]:this._attributes[t]=r}setAttributes(t){Object.keys(t).forEach(r=>this.setAttribute(r,t[r]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return B3(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const r=Dw(this);if(Ot&&r&&r.spanContext().spanId!==this._spanId){const n=this._logMessage;n&&Ve.log(n.replace("Starting","Finishing"))}this._endTime=_S(t)}toTraceparent(){return wS(this)}toContext(){return wi({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return D3(this)}getSpanJSON(){return wi({data:this._getData(),description:this._name,op:this._attributes[Tb],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Th],_metrics_summary:void 0,profile_id:this._attributes[yXe],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}
1362toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:r}=this,n=Object.keys(t).length>0,a=Object.keys(r).length>0;if(!(!n&&!a))return n&&a?{...t,...r}:n?t:r}}class Vre extends ES{constructor(t,r){super(t),this._contexts={},this._hub=r||Ni(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[oc]&&{source:this._attributes[oc]},...this._attributes[Nh]&&{sampleRate:this._attributes[Nh]}}}set metadata(t){this._metadata=t}setName(t,r="custom"){this._name=t,this.setAttribute(oc,r)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Wre(t)),this.spanRecorder.add(this)}setContext(t,r){r===null?delete this._contexts[t]:this._contexts[t]=r}setMeasurement(t,r,n=""){this._measurements[t]={value:r,unit:n}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const r=_S(t),n=this._finishTransaction(r);if(n)return this._hub.captureEvent(n)}toContext(){const t=super.toContext();return wi({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Mp(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(Ot&&Ve.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const r=this._hub.getClient();if(r&&r.emit&&r.emit("finishTransaction",this),this._sampled!==!0){Ot&&Ve.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}const n=this.spanRecorder?this.spanRecorder.spans.filter(d=>d!==this&&Un(d).timestamp):[];if(this._trimEnd&&n.length>0){const d=n.map(f=>Un(f).timestamp).filter(Boolean);this._endTime=d.reduce((f,p)=>f>p?f:p)}const{scope:a,isolationScope:i}=xXe(this),{metadata:s}=this,{source:l}=s,c={contexts:{...this._contexts,trace:D3(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...s,capturedSpanScope:a,capturedSpanIsolationScope:i,...wi({dynamicSamplingContext:Mp(this)})},_metrics_summary:void 0,...l&&{transaction_info:{source:l}}};return Object.keys(this._measurements).length>0&&(Ot&&Ve.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),Ot&&Ve.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const Yb={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},vXe="finishReason",fh=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class bXe extends Wre{constructor(t,r,n,a){super(a),this._pushActivity=t,this._popActivity=r,this.transactionSpanId=n}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const r=t.end;t.end=(...n)=>(this._popActivity(t.spanContext().spanId),r.apply(t,n)),Un(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class wXe extends Vre{constructor(t,r,n=Yb.idleTimeout,a=Yb.finalTimeout,i=Yb.heartbeatInterval,s=!1,l=!1){super(t,r),this._idleHub=r,this._idleTimeout=n,this._finalTimeout=a,this._heartbeatInterval=i,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=fh[4],this._autoFinishAllowed=!l,s&&(Ot&&Ve.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),r.getScope().setSpan(this)),l||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=fh[3],this.end())},this._finalTimeout)}end(t){const r=_S(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(vXe,this._finishReason),this.spanRecorder){Ot&&Ve.log("[Tracing] finishing IdleTransaction",new Date(r*1e3).toISOString(),this.op);for(const n of this._beforeFinishCallbacks)n(this,r);this.spanRecorder.spans=this.spanRecorder.spans.filter(n=>{if(n.spanContext().spanId===this.spanContext().spanId)return!0;Un(n).timestamp||(n.setStatus("cancelled"),n.end(r),Ot&&Ve.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(n,void 0,2)));const{start_timestamp:a,timestamp:i}=Un(n),s=a&&a<r,l=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&a&&i-a<l;if(Ot){const u=JSON.stringify(n,void 0,2);s?c||Ve.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):Ve.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return s&&c}),Ot&&Ve.log("[Tracing] flushing IdleTransaction")}else Ot&&Ve.log("[Tracing] No active IdleTransaction");if(this._onScope){const n=this._idleHub.getScope();n.getTransaction()===this&&n.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const r=a=>{this._finished||this._pushActivity(a)},n=a=>{this._finished||this._popActivity(a)};this.spanRecorder=new bXe(r,n,this.spanContext().spanId,t),Ot&&Ve.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:r}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=r===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=fh[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(Ot&&Ve.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=fh[1],this.end(t))},this._idleTimeout)}
1362_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),Ot&&Ve.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,Ot&&Ve.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(Ot&&Ve.log(`[Tracing] popActivity ${t}`),delete this.activities[t],Ot&&Ve.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const r=py();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=fh[5],this.end(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(Ot&&Ve.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=fh[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){Ot&&Ve.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Gre(e,t,r){if(!xm(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(Nh,Number(e.sampled)),e;let n;return typeof t.tracesSampler=="function"?(n=t.tracesSampler(r),e.setAttribute(Nh,Number(n))):r.parentSampled!==void 0?n=r.parentSampled:typeof t.tracesSampleRate<"u"?(n=t.tracesSampleRate,e.setAttribute(Nh,Number(n))):(n=1,e.setAttribute(Nh,n)),Kre(n)?n?(e.sampled=Math.random()<n,e.sampled?(Ot&&Ve.log(`[Tracing] starting ${e.op} transaction - ${Un(e).description}`),e):(Ot&&Ve.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),e)):(Ot&&Ve.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(Ot&&Ve.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Kre(e){return cre(e)||!(typeof e=="number"||typeof e=="boolean")?(Ot&&Ve.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(Ot&&Ve.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function _Xe(){const t=this.getScope().getSpan();return t?{"sentry-trace":wS(t)}:{}}function SXe(e,t){const r=this.getClient(),n=r&&r.getOptions()||{},a=n.instrumenter||"sentry",i=e.instrumenter||"sentry";a!==i&&(Ot&&Ve.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${a}\` instrumenter. 1363The transaction will not be sampled. Please use the ${a} instrumentation to start transactions.`),e.sampled=!1);let s=new Vre(e,this);return s=Gre(s,n,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),s.isRecording()&&s.initSpanRecorder(n._experiments&&n._experiments.maxSpans),r&&r.emit&&r.emit("startTransaction",s),s}function Yre(e,t,r,n,a,i,s,l=!1){const c=e.getClient(),u=c&&c.getOptions()||{};let d=new wXe(t,e,r,n,s,a,l);return d=Gre(d,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),d.isRecording()&&d.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",d),d}function EXe(){const e=my();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=SXe),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=_Xe),fXe())}function kXe(e,t,r){const n=jf();n&&n.setMeasurement(e,t,r)}function NXe(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function TXe(e,t,r,n){const a=F3(r),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!n&&t&&{dsn:gm(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Vu(i,[s])}function jXe(e,t,r,n){const a=F3(r),i=e.type&&e.type!=="replay_event"?e.type:"event";NXe(e,r&&r.sdk);const s=jre(e,a,n,t);return delete e.sdkProcessingMetadata,Vu(s,[[{type:i},e]])}const AXe="7";function CXe(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function OXe(e){return`${CXe(e)}${e.projectId}/envelope/`}function PXe(e,t){return VKe({sentry_key:e.publicKey,sentry_version:AXe,...t&&{sentry_client:`${t.name}/${t.version}`}})}function RXe(e,t={}){const r=typeof t=="string"?t:t.tunnel,n=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return r||`${OXe(e)}?${PXe(e,n)}`}const Vq=[];function IXe(e){const t={};return e.forEach(r=>{const{name:n}=r,a=t[n];a&&!a.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.keys(t).map(r=>t[r])}function FXe(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let n;Array.isArray(r)?n=[...t,...r]:typeof r=="function"?n=vre(r(t)):n=t;const a=IXe(n),i=DXe(a,s=>s.name==="Debug");if(i!==-1){const[s]=a.splice(i,1);a.push(s)}return a}function MXe(e,t){const r={};return t.forEach(n=>
1363{n&&Xre(e,n,r)}),r}function Gq(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function Xre(e,t,r){if(r[t.name]){Ot&&Ve.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,Vq.indexOf(t.name)===-1&&(t.setupOnce(qYe,Ni),Vq.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,i)=>n(a,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const n=t.processEvent.bind(t),a=(i,s)=>n(i,s,e);a.id=t.name,e.addEventProcessor(a)}Ot&&Ve.log(`Integration installed: ${t.name}`)}function DXe(e,t){for(let r=0;r<e.length;r++)if(t(e[r])===!0)return r;return-1}function LXe(e){let t="";for(const r of e){const n=Object.entries(r.tags),a=n.length>0?`|#${n.map(([i,s])=>`${i}:${s}`).join(",")}`:"";t+=`${r.name}@${r.unit}:${r.metric}|${r.metricType}${a}|T${r.timestamp} 1364`}return t}function $Xe(e,t,r,n){const a={sent_at:new Date().toISOString()};r&&r.sdk&&(a.sdk={name:r.sdk.name,version:r.sdk.version}),n&&t&&(a.dsn=gm(t));const i=BXe(e);return Vu(a,[i])}function BXe(e){const t=LXe(e);return[{type:"statsd",length:t.length},t]}const Kq="Not capturing exception because it's already been captured.";class UXe{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=WKe(t.dsn):Ot&&Ve.warn("No DSN provided, client will not send events."),this._dsn){const r=RXe(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}}captureException(t,r,n){if(Aq(t)){Ot&&Ve.log(Kq);return}let a=r&&r.event_id;return this._process(this.eventFromException(t,r).then(i=>this._captureEvent(i,r,n)).then(i=>{a=i})),a}captureMessage(t,r,n,a){let i=n&&n.event_id;const s=T3(t)?t:String(t),l=j3(t)?this.eventFromMessage(s,r,n):this.eventFromException(t,n);return this._process(l.then(c=>this._captureEvent(c,n,a)).then(c=>{i=c})),i}captureEvent(t,r,n){if(r&&r.originalException&&Aq(r.originalException)){Ot&&Ve.log(Kq);return}let a=r&&r.event_id;const s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,r,s||n).then(l=>{a=l})),a}captureSession(t){typeof t.release!="string"?Ot&&Ve.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),uf(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(a=>n&&a))):Fp(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return Ot&&Ve.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const r=this._integrations[t.name];Xre(this,t,this._integrations),r||Gq(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=jXe(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of r.attachments||[])n=IYe(n,DYe(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const a=this._sendEnvelope(n);a&&a.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const r=TXe(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const a=typeof n=="number"?n:1,i=`${t}:${r}`;Ot&&Ve.log(`Recording outcome: "${i}"${a>1?` (${a} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+a}}captureAggregateMetrics(t){Ot&&Ve.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const r=$Xe(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}on(t,r){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(r)}emit(t,...r){this._hooks[t]&&this._hooks[t].forEach(n=>n(...r))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=MXe(this,t),Gq(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,r){let n=!1,a=!1;const i=r.exception&&r.exception.values;if(i){a=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(uf(t,{...n&&{status:"crashed"},errors:t.errors||Number(a||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new os(r=>{let n=0;const a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=a,t&&n>=t&&(clearInterval(i),r(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,a=Gu()){const i=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>
13640&&(r.integrations=s),this.emit("preprocessEvent",t,r),Ire(i,t,r,n,this,a).then(l=>{if(l===null)return l;const c={...a.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(l.contexts&&l.contexts.trace)&&c){const{traceId:d,spanId:f,parentSpanId:p,dsc:m}=c;l.contexts={trace:{trace_id:d,span_id:f,parent_span_id:p},...l.contexts};const x=m||SS(d,this,n);l.sdkProcessingMetadata={dynamicSamplingContext:x,...l.sdkProcessingMetadata}}return l})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(a=>a.event_id,a=>{if(Ot){const i=a;i.logLevel==="log"?Ve.log(i.message):Ve.warn(i)}})}_processEvent(t,r,n){const a=this.getOptions(),{sampleRate:i}=a,s=Qre(t),l=Jre(t),c=t.type||"error",u=`before send for type \`${c}\``;if(l&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),R3(new il(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,p).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",d,t),new il("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return m;const y=HXe(a,m,r);return zXe(y,u)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",d,t),s){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new il(`${u} returned \`null\`, will not send event.`,"log")}const x=n&&n.getSession();if(!s&&x&&this._updateSessionFromEvent(x,m),s){const v=m.sdkProcessingMetadata&&m.sdkProcessingMetadata.spanCountBeforeProcessing||0,b=m.spans?m.spans.length:0,w=v-b;w>0&&this.recordDroppedEvent("before_send","span",w)}const y=m.transaction_info;if(s&&y&&m.transaction!==t.transaction){const v="custom";m.transaction_info={...y,source:v}}return this.sendEvent(m,r),m}).then(null,m=>{throw m instanceof il?m:(this.captureException(m,{data:{__sentry__:!0},originalException:m}),new il(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 1365Reason: ${m}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,r=>{Ot&&Ve.error("Error while sending event:",r)});Ot&&Ve.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(r=>{const[n,a]=r.split(":");return{reason:n,category:a,quantity:t[r]}})}}function zXe(e,t){const r=`${t} must return \`null\` or a valid event.`;if(yS(e))return e.then(n=>{if(!Ip(n)&&n!==null)throw new il(r);return n},n=>{throw new il(`${t} rejected with ${n}`)});if(!Ip(e)&&e!==null)throw new il(r);return e}function HXe(e,t,r){const{beforeSend:n,beforeSendTransaction:a}=e;if(Jre(t)&&n)return n(t,r);if(Qre(t)&&a){if(t.spans){const i=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:i}}return a(t,r)}return t}function Jre(e){return e.type===void 0}function Qre(e){return e.type==="transaction"}function qXe(e){const t=Mr();!t||!t.addEventProcessor||t.addEventProcessor(e)}function WXe(e,t){t.debug===!0&&(Ot?Ve.enable():lf(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),gs().update(t.initialScope);const n=new e(t);VXe(n),GXe(n)}function VXe(e){const r=Ni().getStackTop();r.client=e,r.scope.setClient(e)}function GXe(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const KXe=30;function Zre(e,t,r=SYe(e.bufferSize||KXe)){let n={};const a=s=>r.drain(s);function i(s){const l=[];if(Fq(s,(f,p)=>{const m=Mq(p);if(Are(n,m)){const x=Yq(f,p);e.recordDroppedEvent("ratelimit_backoff",m,x)}else l.push(f)}),l.length===0)return Fp();const c=Vu(s[0],l),u=f=>{Fq(c,(p,m)=>{const x=Yq(p,m);e.recordDroppedEvent(f,Mq(m),x)})},d=()=>t({body:FYe(c,e.textEncoder)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&Ot&&Ve.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),n=Cre(n,f),f),f=>{throw u("network_error"),f});return r.add(d).then(f=>f,f=>{if(f instanceof il)return Ot&&Ve.error("Skipped sending event because buffer is full."),u("queue_overflow"),Fp();throw f})}return i.__sentry__baseTransport__=!0,{send:i,flush:a}}function Yq(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function YXe(e,t){const r={sent_at:new Date().toISOString()};t&&(r.dsn=gm(t));const n=e.map(XXe);return Vu(r,n)}function XXe(e){return[{type:"span"},e]}function JXe(e,t){const r=t&&eJe(t)?t.getClient():t,n=r&&r.getDsn(),a=r&&r.getOptions().tunnel;return ZXe(e,n)||QXe(e,a)}function QXe(e,t){return t?Xq(e)===Xq(t):!1}function ZXe(e,t){return t?e.includes(t.host):!1}function Xq(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function eJe(e){return e.getClient!==void 0}function ene(e,t,r=[t],n="npm"){const a=e._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${t}`,packages:r.map(i=>({name:`${n}:@sentry/${i}`,version:WP})),version:WP}),e._metadata=a}const tJe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],rJe=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],nJe="InboundFilters",aJe=((e={})=>({name:nJe,setupOnce(){},processEvent(t,r,n){const a=n.getOptions(),i=sJe(e,a);return oJe(t,i)?null:t}})),iJe=aJe;function sJe(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:tJe],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:rJe],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function oJe(e,t){return t.ignoreInternal&&hJe(e)?(Ot&&Ve.warn(`Event dropped due to being internal Sentry Error. 1366Event: ${ou(e)}`),!0):lJe(e,t.ignoreErrors)?(Ot&&Ve.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 1367Event: ${ou(e)}`),!0):cJe(e,t.ignoreTransactions)?(Ot&&Ve.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 1368Event: ${ou(e)}`),!0):uJe(e,t.denyUrls)?(Ot&&Ve.warn(`Event dropped due to being matched by \`denyUrls\` option. 1369Event: ${ou(e)}. 1370Url: ${Lw(e)}`),!0):dJe(e,t.allowUrls)?!1:(Ot&&Ve.warn(`Event dropped due to not being matched by \`allowUrls\` option. 1371Event: ${ou(e)}. 1372Url: ${Lw(e)}`),!0)}function lJe(e,t){return e.type||!t||!t.length?!1:fJe(e).some(r=>pm(r,t))}function cJe(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?pm(r,t):!1}function uJe(e,t){if(!t||!t.length)return!1;const r=Lw(e);return r?pm(r,t):!1}function dJe(e,t){if(!t||!t.length)return!0;const r=Lw(e);return r?pm(r,t):!0}function fJe(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),Ot&&t.length===0&&Ve.error(`Could not extract message for event ${ou(e)}`),t}function hJe(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function pJe(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Lw(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?pJe(t):null}catch{return Ot&&Ve.error(`Cannot extract url for event ${ou(e)}`),null}}let Jq;const mJe="FunctionToString",Qq=new WeakMap,gJe=(()=>
1372({name:mJe,setupOnce(){Jq=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=C3(this),r=Qq.has(Mr())&&t!==void 0?t:this;return Jq.apply(r,e)}}catch{}},setup(e){Qq.set(e,!0)}})),xJe=gJe,hn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xt=xr;function yJe(){Xt.document?Xt.document.addEventListener("visibilitychange",()=>{const e=jf();if(Xt.document.hidden&&e){const t="cancelled",{op:r,status:n}=Un(e);hn&&Ve.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${r}`),n||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):hn&&Ve.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const gy=(e,t,r)=>{let n,a;return i=>{t.value>=0&&(i||r)&&(a=t.value-(n||0),(a||n===void 0)&&(n=t.value,t.delta=a,e(t)))}},vJe=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,bJe=()=>{const e=Xt.performance.timing,t=Xt.performance.navigation.type,r={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const n in e)n!=="navigationStart"&&n!=="toJSON"&&(r[n]=Math.max(e[n]-e.navigationStart,0));return r},kS=()=>Xt.__WEB_VITALS_POLYFILL__?Xt.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||bJe()):Xt.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],z3=()=>{const e=kS();return e&&e.activationStart||0},xy=(e,t)=>{const r=kS();let n="navigate";return r&&(Xt.document&&Xt.document.prerendering||z3()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:vJe(),navigationType:n}},ym=(e,t,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver(a=>{t(a.getEntries())});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},yy=(e,t)=>{const r=n=>{(n.type==="pagehide"||Xt.document.visibilityState==="hidden")&&(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};Xt.document&&(addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0))},wJe=(e,t={})=>{const r=xy("CLS",0);let n,a=0,i=[];const s=c=>{c.forEach(u=>{if(!u.hadRecentInput){const d=i[0],f=i[i.length-1];a&&i.length!==0&&u.startTime-f.startTime<1e3&&u.startTime-d.startTime<5e3?(a+=u.value,i.push(u)):(a=u.value,i=[u]),a>r.value&&(r.value=a,r.entries=i,n&&n())}})},l=ym("layout-shift",s);if(l){n=gy(e,r,t.reportAllChanges);const c=()=>{s(l.takeRecords()),n(!0)};return yy(c),c}};let $w=-1;const _Je=()=>{Xt.document&&Xt.document.visibilityState&&($w=Xt.document.visibilityState==="hidden"&&!Xt.document.prerendering?0:1/0)},SJe=()=>{yy(({timeStamp:e})=>{$w=e},!0)},H3=()=>($w<0&&(_Je(),SJe()),{get firstHiddenTime(){return $w}}),EJe=e=>{const t=H3(),r=xy("FID");let n;const a=l=>{l.startTime<t.firstHiddenTime&&(r.value=l.processingStart-l.startTime,r.entries.push(l),n(!0))},i=l=>{l.forEach(a)},s=ym("first-input",i);n=gy(e,r),s&&yy(()=>{i(s.takeRecords()),s.disconnect()},!0)};let tne=0,zA=1/0,jb=0;const kJe=e=>{e.forEach(t=>{t.interactionId&&(zA=Math.min(zA,t.interactionId),jb=Math.max(jb,t.interactionId),tne=jb?(jb-zA)/7+1:0)})};let KP;const NJe=()=>KP?tne:performance.interactionCount||0,TJe=()=>{"interactionCount"in performance||KP||(KP=ym("event",kJe,{type:"event",buffered:!0,durationThreshold:0}))},rne=()=>NJe(),Zq=10,Gl=[],HA={},eW=e=>{const t=Gl[Gl.length-1],r=HA[e.interactionId];if(r||Gl.length<Zq||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{const n={id:e.interactionId,latency:e.duration,entries:[e]};HA[n.id]=n,Gl.push(n)}Gl.sort((n,a)=>a.latency-n.latency),Gl.splice(Zq).forEach(n=>{delete HA[n.id]})}},jJe=()=>{const e=Math.min(Gl.length-1,Math.floor(rne()/50));return Gl[e]},AJe=(e,t)=>
1372{t=t||{},TJe();const r=xy("INP");let n;const a=s=>{s.forEach(c=>{c.interactionId&&eW(c),c.entryType==="first-input"&&!Gl.some(d=>d.entries.some(f=>c.duration===f.duration&&c.startTime===f.startTime))&&eW(c)});const l=jJe();l&&l.latency!==r.value&&(r.value=l.latency,r.entries=l.entries,n())},i=ym("event",a,{durationThreshold:t.durationThreshold||40});n=gy(e,r,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),yy(()=>{a(i.takeRecords()),r.value<0&&rne()>0&&(r.value=0,r.entries=[]),n(!0)}))},tW={},CJe=e=>{const t=H3(),r=xy("LCP");let n;const a=s=>{const l=s[s.length-1];if(l){const c=Math.max(l.startTime-z3(),0);c<t.firstHiddenTime&&(r.value=c,r.entries=[l],n())}},i=ym("largest-contentful-paint",a);if(i){n=gy(e,r);const s=()=>{tW[r.id]||(a(i.takeRecords()),i.disconnect(),tW[r.id]=!0,n(!0))};return["keydown","click"].forEach(l=>{Xt.document&&addEventListener(l,s,{once:!0,capture:!0})}),yy(s,!0),s}},YP=e=>{Xt.document&&(Xt.document.prerendering?addEventListener("prerenderingchange",()=>YP(e),!0):Xt.document.readyState!=="complete"?addEventListener("load",()=>YP(e),!0):setTimeout(e,0))},OJe=(e,t)=>{t=t||{};const r=xy("TTFB"),n=gy(e,r,t.reportAllChanges);YP(()=>{const a=kS();if(a){if(r.value=Math.max(a.responseStart-z3(),0),r.value<0||r.value>performance.now())return;r.entries=[a],n(!0)}})},cg={},Bw={};let nne,ane,ine,sne,one;function PJe(e,t=!1){return vy("cls",e,MJe,nne,t)}function lne(e,t=!1){return vy("lcp",e,LJe,ine,t)}function RJe(e){return vy("ttfb",e,$Je,sne)}function IJe(e){return vy("fid",e,DJe,ane)}function FJe(e){return vy("inp",e,BJe,one)}function Dp(e,t){return cne(e,t),Bw[e]||(UJe(e),Bw[e]=!0),une(e,t)}function vm(e,t){const r=cg[e];if(!(!r||!r.length))for(const n of r)try{n(t)}catch(a){hn&&Ve.error(`Error while triggering instrumentation handler. 1373Type: ${e} 1374Name: ${xc(n)} 1375Error:`,a)}}function MJe(){return wJe(e=>{vm("cls",{metric:e}),nne=e},{reportAllChanges:!0})}function DJe(){return EJe(e=>{vm("fid",{metric:e}),ane=e})}function LJe(){return CJe(e=>{vm("lcp",{metric:e}),ine=e})}function $Je(){return OJe(e=>{vm("ttfb",{metric:e}),sne=e})}function BJe(){return AJe(e=>{vm("inp",{metric:e}),one=e})}function vy(e,t,r,n,a=!1){cne(e,t);let i;return Bw[e]||(i=r(),Bw[e]=!0),n&&t({metric:n}),une(e,t,a?i:void 0)}function UJe(e){const t={};e==="event"&&(t.durationThreshold=0),ym(e,r=>{vm(e,{entries:r})},t)}function cne(e,t){cg[e]=cg[e]||[],cg[e].push(t)}function une(e,t,r){return()=>{r&&r();const n=cg[e];if(!n)return;const a=n.indexOf(t);a!==-1&&n.splice(a,1)}}function qA(e){return typeof e=="number"&&isFinite(e)}function Lp(e,{startTimestamp:t,...r}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...r})}const zJe=2147483647;function la(e){return e/1e3}function q3(){return Xt&&Xt.addEventListener&&Xt.performance}let rW=0,Nn={},Zo,ug;function HJe(){const e=q3();if(e&&ps){e.mark&&Xt.performance.mark("sentry-tracing-init");const t=YJe(),r=GJe(),n=KJe(),a=XJe();return()=>{t(),r(),n(),a()}}return()=>{}}function qJe(){Dp("longtask",({entries:e})=>{for(const t of e){const r=jf();if(!r)return;const n=la(ps+t.startTime),a=la(t.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+a})}})}function WJe(){Dp("event",({entries:e})=>{for(const t of e){const r=jf();if(!r)return;if(t.name==="click"){const n=la(ps+t.startTime),a=la(t.duration),i={description:Ou(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+a},s=fre(t.target);s&&(i.attributes={"ui.component_name":s}),r.startChild(i)}}})}function VJe(e,t){if(q3()&&ps){const n=JJe(e,t);return()=>{n()}}return()=>{}}function GJe(){return PJe(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(hn&&Ve.log("[Measurements] Adding CLS"),Nn.cls={value:e.value,unit:""},ug=t)},!0)}function KJe(){return lne(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(hn&&Ve.log("[Measurements] Adding LCP"),Nn.lcp={value:e.value,unit:"millisecond"},Zo=t)},!0)}function YJe(){return IJe(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const r=la(ps),n=la(t.startTime);hn&&Ve.log("[Measurements] Adding FID"),Nn.fid={value:e.value,unit:"millisecond"},Nn["mark.fid"]={value:r+n,unit:"second"}})}function XJe(){return RJe(({metric:e})=>{e.entries[e.entries.length-1]&&(hn&&Ve.log("[Measurements] Adding TTFB"),Nn.ttfb={value:e.value,unit:"millisecond"})})}const nW={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};
1375function JJe(e,t){return FJe(({metric:r})=>{if(r.value===void 0)return;const n=r.entries.find(S=>S.duration===r.value&&nW[S.name]!==void 0),a=Mr();if(!n||!a)return;const i=nW[n.name],s=a.getOptions(),l=la(ps+n.startTime),c=la(r.value),u=n.interactionId!==void 0?e[n.interactionId]:void 0;if(u===void 0)return;const{routeName:d,parentContext:f,activeTransaction:p,user:m,replayId:x}=u,y=m!==void 0?m.email||m.id||m.ip_address:void 0,v=p!==void 0?p.getProfileId():void 0,b=new ES({startTimestamp:l,endTimestamp:l+c,op:`ui.interaction.${i}`,name:Ou(n.target),attributes:{release:s.release,environment:s.environment,transaction:d,...y!==void 0&&y!==""?{user:y}:{},...v!==void 0?{profile_id:v}:{},...x!==void 0?{replay_id:x}:{}},exclusiveTime:r.value,measurements:{inp:{value:r.value,unit:"millisecond"}}}),w=sQe(f,s,t);if(w&&Math.random()<w){const S=b?YXe([b],a.getDsn()):void 0,j=a&&a.getTransport();j&&S&&j.send(S).then(null,k=>{hn&&Ve.error("Error while sending interaction:",k)});return}})}function QJe(e){const t=q3();if(!t||!Xt.performance.getEntries||!ps)return;hn&&Ve.log("[Tracing] Adding & adjusting spans using Performance API");const r=la(ps),n=t.getEntries(),{op:a,start_timestamp:i}=Un(e);if(n.slice(rW).forEach(s=>{const l=la(s.startTime),c=la(s.duration);if(!(e.op==="navigation"&&i&&r+l<i))switch(s.entryType){case"navigation":{eQe(e,s,r);break}case"mark":case"paint":case"measure":{ZJe(e,s,l,c,r);const u=H3(),d=s.startTime<u.firstHiddenTime;s.name==="first-paint"&&d&&(hn&&Ve.log("[Measurements] Adding FP"),Nn.fp={value:s.startTime,unit:"millisecond"}),s.name==="first-contentful-paint"&&d&&(hn&&Ve.log("[Measurements] Adding FCP"),Nn.fcp={value:s.startTime,unit:"millisecond"});break}case"resource":{rQe(e,s,s.name,l,c,r);break}}}),rW=Math.max(n.length-1,0),nQe(e),a==="pageload"){iQe(Nn),["fcp","fp","lcp"].forEach(l=>{if(!Nn[l]||!i||r>=i)return;const c=Nn[l].value,u=r+la(c),d=Math.abs((u-i)*1e3),f=d-c;hn&&Ve.log(`[Measurements] Normalized ${l} from ${c} to ${d} (${f})`),Nn[l].value=d});const s=Nn["mark.fid"];s&&Nn.fid&&(Lp(e,{description:"first input delay",endTimestamp:s.value+la(Nn.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:s.value}),delete Nn["mark.fid"]),"fcp"in Nn||delete Nn.cls,Object.keys(Nn).forEach(l=>{kXe(l,Nn[l].value,Nn[l].unit)}),aQe(e)}Zo=void 0,ug=void 0,Nn={}}function ZJe(e,t,r,n,a){const i=a+r,s=i+n;return Lp(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function eQe(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{Ab(e,t,n,r)}),Ab(e,t,"secureConnection",r,"TLS/SSL","connectEnd"),Ab(e,t,"fetch",r,"cache","domainLookupStart"),Ab(e,t,"domainLookup",r,"DNS"),tQe(e,t,r)}function Ab(e,t,r,n,a,i){const s=i?t[i]:t[`${r}End`],l=t[`${r}Start`];!l||!s||Lp(e,{op:"browser",origin:"auto.browser.browser.metrics",description:a||r,startTimestamp:n+la(l),endTimestamp:n+la(s)})}function tQe(e,t,r){t.responseEnd&&(Lp(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+la(t.requestStart),endTimestamp:r+la(t.responseEnd)}),Lp(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+la(t.responseStart),endTimestamp:r+la(t.responseEnd)}))}function rQe(e,t,r,n,a,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=Gd(r),l={};WA(l,t,"transferSize","http.response_transfer_size"),WA(l,t,"encodedBodySize","http.response_content_length"),WA(l,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(l["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(l["url.scheme"]=s.protocol.split(":").pop()),s.host&&(l["server.address"]=s.host),l["url.same_origin"]=r.includes(Xt.location.origin);const c=i+n,u=c+a;Lp(e,{description:r.replace(Xt.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:l})}function nQe(e){const t=Xt.navigator;if(!t)return;const r=t.connection;r&&(r.effectiveType&&e.setTag("effectiveConnectionType",r.effectiveType),r.type&&e.setTag("connectionType",r.type),qA(r.rtt)&&(Nn["connection.rtt"]={value:r.rtt,unit:"millisecond"})),qA(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),qA(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function aQe(e){Zo&&(hn&&Ve.log("[Measurements] Adding LCP Data"),Zo.element&&e.setTag("lcp.element",Ou(Zo.element)),Zo.id&&e.setTag("lcp.id",Zo.id),Zo.url&&e.setTag("lcp.url",Zo.url.trim().slice(0,200)),e.setTag("lcp.size",Zo.size)),ug&&ug.sources&&(hn&&Ve.log("[Measurements] Adding CLS Data"),ug.sources.forEac
1375h((t,r)=>e.setTag(`cls.source.${r+1}`,Ou(t.node))))}function WA(e,t,r,n){const a=t[r];a!=null&&a<zJe&&(e[n]=a)}function iQe(e){const t=kS();if(!t)return;const{responseStart:r,requestStart:n}=t;n<=r&&(hn&&Ve.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}function sQe(e,t,r){if(!xm(t))return!1;let n;return e!==void 0&&typeof t.tracesSampler=="function"?n=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:Xt.location}):e!==void 0&&e.sampled!==void 0?n=e.sampled:typeof t.tracesSampleRate<"u"?n=t.tracesSampleRate:n=1,Kre(n)?n===!0?r:n===!1?0:n*r:(hn&&Ve.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function oQe(e,t,r,n,a="auto.http.browser"){if(!xm()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const m=e.fetchData.__span;if(!m)return;const x=n[m];x&&(uQe(x,e),delete n[m]);return}const s=gs(),l=Mr(),{method:c,url:u}=e.fetchData,d=cQe(u),f=d?Gd(d).host:void 0,p=i?zre({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":d,"server.address":f,[Th
1375]:a},op:"http.client"}):void 0;if(p&&(e.fetchData.__span=p.spanContext().spanId,n[p.spanContext().spanId]=p),r(e.fetchData.url)&&l){const m=e.args[0];e.args[1]=e.args[1]||{};const x=e.args[1];x.headers=lQe(m,l,s,x,p)}return p}function lQe(e,t,r,n,a){const i=a||r.getSpan(),s=Gu(),{traceId:l,spanId:c,sampled:u,dsc:d}={...s.getPropagationContext(),...r.getPropagationContext()},f=i?wS(i):I3(l,c,u),p=Tre(d||(i?Mp(i):SS(l,t,r))),m=n.headers||(typeof Request<"u"&&gc(e,Request)?e.headers:void 0);if(m)if(typeof Headers<"u"&&gc(m,Headers)){const x=new Headers(m);return x.append("sentry-trace",f),p&&x.append(HP,p),x}else if(Array.isArray(m)){const x=[...m,["sentry-trace",f]];return p&&x.push([HP,p]),x}else{const x="baggage"in m?m.baggage:void 0,y=[];return Array.isArray(x)?y.push(...x):x&&y.push(x),p&&y.push(p),{...m,"sentry-trace":f,baggage:y.length>0?y.join(","):void 0}}else return{"sentry-trace":f,baggage:p}}function cQe(e){try{return new URL(e).href}catch{return}}function uQe(e,t){if(t.response){B3(e,t.response.status);const r=t.response&&t.response.headers&&t.response.headers.get("content-length");if(r){const n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus("internal_error");e.end()}const XP=["localhost",/^\/(?!\/)/],JP={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:XP,tracePropagationTargets:XP};function dQe(e){const{traceFetch:t,traceXHR:r,tracePropagationTargets:n,tracingOrigins:a,shouldCreateSpanForRequest:i,enableHTTPTimings:s}={traceFetch:JP.traceFetch,traceXHR:JP.traceXHR,...e},l=typeof i=="function"?i:d=>!0,c=d=>mQe(d,n||a),u={};t&&O3(d=>{const f=oQe(d,l,c,u);if(f){const p=dne(d.fetchData.url),m=p?Gd(p).host:void 0;f.setAttributes({"http.url":p,"server.address":m})}s&&f&&aW(f)}),r&&P3(d=>{const f=gQe(d,l,c,u);s&&f&&aW(f)})}function fQe(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function aW(e){const{url:t}=Un(e).data||{};if(!t||typeof t!="string")return;const r=Dp("resource",({entries:n})=>{n.forEach(a=>{fQe(a)&&a.name.endsWith(t)&&(pQe(a).forEach(s=>e.setAttribute(...s)),setTimeout(r))})})}function hQe(e){let t="unknown",r="unknown",n="";for(const a of e){if(a==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(a))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=a}return n===e&&(t=n),{name:t,version:r}}function Yo(e=0){return((ps||performance.timeOrigin)+e)/1e3}function pQe(e){const{name:t,version:r}=hQe(e.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",t]),ps?[...n,["http.request.redirect_start",Yo(e.redirectStart)],["http.request.fetch_start",Yo(e.fetchStart)],["http.request.domain_lookup_start",Yo(e.domainLookupStart)],["http.request.domain_lookup_end",Yo(e.domainLookupEnd)],["http.request.connect_start",Yo(e.connectStart)],["http.request.secure_connection_start",Yo(e.secureConnectionStart)],["http.request.connection_end",Yo(e.connectEnd)],["http.request.request_start",Yo(e.requestStart)],["http.request.response_start",Yo(e.responseStart)],["http.request.response_end",Yo(e.responseEnd)]]:n}function mQe(e,t){return pm(e,t||XP)}function gQe(e,t,r,n){const a=e.xhr,i=a&&a[pu];if(!xm()||!a||a.__sentry_own_request__||!i)return;const s=t(i.url);if(e.endTimestamp&&s){const m=a.__sentry_xhr_span_id__;if(!m)return;const x=n[m];x&&i.status_code!==void 0&&(B3(x,i.status_code),x.end(),delete n[m]);return}const l=gs(),c=Gu(),u=dne(i.url),d=u?Gd(u).host:void 0,f=s?zre({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":d,[Th]:"auto.http.browser"},op:"http.client"}):void 0;f&&(a.__sentry_xhr_span_id__=f.spanContext().spanId,n[a.__sentry_xhr_span_id__]=f);const p=Mr();if(a.setRequestHeader&&r(i.url)&&p){const{traceId:m,spanId:x,sampled:y,dsc:v}={...c.getPropagationContext(),...l.getPropagationContext()},b=f?wS(f):I3(m,x,y),w=Tre(v||(f?Mp(f):SS(m,p,l)));xQe(a,b,w)}return f}function xQe(e,t,r){try{e.setRequestHeader("sentry-trace",t),r&&e.setRequestHeader(HP,r)}catch{}}function dne(e){try{return new URL(e,Xt.location.origin).href}catch{return}}const yQe="BrowserTracing",vQe={...Yb,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
1375dSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...JP},bQe=((e={})=>{const t=hn?!!(e.tracePropagationTargets||e.tracingOrigins):!1;EXe(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const r={...vQe,...e},n=HJe(),a={};r.enableInp&&VJe(a,r.interactionsSampleRate),r.enableLongTask&&qJe(),r._experiments.enableInteractions&&WJe();const i={name:void 0,context:void 0};function s(l){const c=Ni(),{beforeStartSpan:u,idleTimeout:d,finalTimeout:f,heartbeatInterval:p}=r,m=l.op==="pageload";let x;if(m){const w=m?iW("sentry-trace"):"",S=m?iW("baggage"):void 0,{traceId:j,dsc:k,parentSpanId:E,sampled:T}=RYe(w,S);x={traceId:j,parentSpanId:E,parentSampled:T,...l,metadata:{...l.metadata,dynamicSamplingContext:k},trimEnd:!0}}else x={trimEnd:!0,...l};const y=u?u(x):x;y.metadata=y.name!==x.name?{...y.metadata,source:"custom"}:y.metadata,i.name=y.name,i.context=y,y.sampled===!1&&hn&&Ve.log(`[Tracing] Will not send ${y.op} transaction because of beforeNavigate.`),hn&&Ve.log(`[Tracing] Starting ${y.op} transaction on scope`);const{location:v}=Xt,b=Yre(c,y,d,f,!0,{location:v},p,m);return m&&Xt.document&&(Xt.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(Xt.document.readyState)&&b.sendAutoFinishSignal()}),["interactive","complete"].includes(Xt.document.readyState)&&b.sendAutoFinishSignal()),b.registerBeforeFinishCallback(w=>{n(),QJe(w)}),b}return{name:yQe,setupOnce:()=>{},afterAllSetup(l){const c=l.getOptions(),{markBackgroundSpan:u,traceFetch:d,traceXHR:f,shouldCreateSpanForRequest:p,enableHTTPTimings:m,_experiments:x}=r,y=c&&c.tracePropagationTargets,v=y||r.tracePropagationTargets;hn&&t&&y&&Ve.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let b,w=Xt.location&&Xt.location.href;if(l.on&&(l.on("startNavigationSpan",S=>{b&&(hn&&Ve.log(`[Tracing] Finishing current transaction with op: ${Un(b).op}`),b.end()),b=s({op:"navigation",...S})}),l.on("startPageLoadSpan",S=>{b&&(hn&&Ve.log(`[Tracing] Finishing current transaction with op: ${Un(b).op}`),b.end()),b=s({op:"pageload",...S})})),r.instrumentPageLoad&&l.emit&&Xt.location){const S={name:Xt.location.pathname,startTimestamp:ps?ps/1e3:void 0,origin:"auto.pageload.browser",attributes:{[oc]:"url"}};wQe(l,S)}r.instrumentNavigation&&l.emit&&Xt.location&&vS(({to:S,from:j})=>{if(j===void 0&&w&&w.indexOf(S)!==-1){w=void 0;return}if(j!==S){w=void 0;const k={name:Xt.location.pathname,origin:"auto.navigation.browser",attributes:{[oc]:"url"}};_Qe(l,k)}}),u&&yJe(),x.enableInteractions&&SQe(r,i),r.enableInp&&kQe(a,i),dQe({traceFetch:d,traceXHR:f,tracePropagationTargets:v,shouldCreateSpanForRequest:p,enableHTTPTimings:m})},options:r}});function wQe(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const r=U3();return(r&&Un(r).op)==="pageload"?r:void 0}function _Qe(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const r=U3();return(r&&Un(r).op)==="navigation"?r:void 0}function iW(e){const t=LKe(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function SQe(e,t){let r;const n=()=>{const{idleTimeout:a,finalTimeout:i,heartbeatInterval:s}=e,l="ui.action.click",c=jf();if(c&&c.op&&["navigation","pageload"].includes(c.op)){hn&&Ve.warn(`[Tracing] Did not create ${l} transaction because a pageload or navigation transaction is in progress.`);return}if(r&&(r.setFinishReason("interactionInterrupted"),r.end(),r=void 0),!t.name){hn&&Ve.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}const{location:u}=Xt,d={name:t.name,op:l,trimEnd:!0,data:{[oc]:t.context?NQe(t.context):"url"}};r=Yre(Ni(),d,a,i,!0,{location:u},s)};["click"].forEach(a=>{Xt.document&&addEventListener(a,n,{once:!1,capture:!0})})}function EQe(e){return"duration"in e}const sW=10;function kQe(e,t){const r=({entries:n})=>{const a=Mr(),i=a!==void 0&&a.getIntegrationByName!==void 0?a.getIntegrationByName("Replay"):void 0,s=i!==void 0?i.getReplayId():void 0,l=jf(),c=gs(),u=c!==void 0?c.getUser():void 0;
1375n.forEach(d=>{if(EQe(d)){const f=d.interactionId;if(f===void 0)return;const p=e[f],m=d.duration,x=d.startTime,y=Object.keys(e),v=y.length>0?y.reduce((b,w)=>e[b].duration<e[w].duration?b:w):void 0;if(d.entryType==="first-input"&&y.map(w=>e[w]).some(w=>w.duration===m&&w.startTime===x)||!f)return;if(p)p.duration=Math.max(p.duration,m);else if(y.length<sW||v===void 0||m>e[v].duration){const b=t.name,w=t.context;b&&w&&(v&&Object.keys(e).length>=sW&&delete e[v],e[f]={routeName:b,duration:m,parentContext:w,user:u,activeTransaction:l,replayId:s,startTime:x})}}})};Dp("event",r),Dp("first-input",r)}function NQe(e){const t=e.attributes&&e.attributes[oc],r=e.data&&e.data[oc],n=e.metadata&&e.metadata.source;return t||r||n}const Br=xr;let QP=0;function fne(){return QP>0}function TQe(){QP++,setTimeout(()=>{QP--})}function $p(e,t={},r){if(typeof e!="function")return e;try{const a=e.__sentry_wrapped__;if(a)return typeof a=="function"?a:e;if(C3(e))return e}catch{return e}const n=function(){const a=Array.prototype.slice.call(arguments);try{const i=a.map(s=>$p(s,t));return e.apply(this,i)}catch(i){throw TQe(),tXe(s=>{s.addEventProcessor(l=>(t.mechanism&&(MP(l,void 0),Sx(l,t.mechanism)),l.extra={...l.extra,arguments:a},l)),$3(i)}),i}};try{for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}catch{}pre(n,e),cf(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const ec=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function hne(e,t){const r=W3(e,t),n={type:t&&t.name,value:OQe(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function jQe(e,t,r,n){const a=Mr(),i=a&&a.getOptions().normalizeDepth,s={exception:{values:[{type:xS(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:IQe(t,{isUnhandledRejection:n})}]},extra:{__serialized__:Ere(t,i)}};if(r){const l=W3(e,r);l.length&&(s.exception.values[0].stacktrace={frames:l})}return s}function VA(e,t){return{exception:{values:[hne(e,t)]}}}function W3(e,t){const r=t.stacktrace||t.stack||"",n=CQe(t);try{return e(r,n)}catch{}return[]}const AQe=/Minified React error #\d+;/i;function CQe(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(AQe.test(e.message))return 1}return 0}function OQe(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function PQe(e,t,r,n){const a=r&&r.syntheticException||void 0,i=V3(e,t,a,n);return Sx(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),Fp(i)}function RQe(e,t,r="info",n,a){const i=n&&n.syntheticException||void 0,s=ZP(e,t,i,a);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),Fp(s)}function V3(e,t,r,n,a){let i;if(N3(t)&&t.error)return VA(e,t.error);if(bq(t)||jKe(t)){const s=t;if("stack"in t)i=VA(e,t);else{const l=s.name||(bq(s)?"DOMError":"DOMException"),c=s.message?`${l}: ${s.message}`:l;i=ZP(e,c,r,n),MP(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return lre(t)?VA(e,t):Ip(t)||xS(t)?(i=jQe(e,t,r,a),Sx(i,{synthetic:!0}),i):(i=ZP(e,t,r,n),MP(i,`${t}`),Sx(i,{synthetic:!0}),i)}function ZP(e,t,r,n){const a={};if(n&&r){const i=W3(e,r);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(T3(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return a.logentry={message:i,params:s},a}return a.message=t,a}function IQe(e,{isUnhandledRejection:t}){const r=GKe(e),n=t?"promise rejection":"exception";return N3(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:xS(e)?`Event \`${FQe(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function FQe(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function MQe(e,{metadata:t,tunnel:r,dsn:n}){const a={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:gm(n)}},i=DQe(e);return Vu(a,[i])}function DQe(e){return[{type:"user_report"},e]}class LQe extends UXe{constructor(t){const r=Br.SENTRY_SDK_SOURCE||mYe();ene(t,"browser",["browser"],r),super(t),t.sendClientReports&&Br.document&&Br.document.addEventListener("visibilitychange",()=>{Br.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return PQe(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return RQe(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ec&&Ve.warn("SDK not enabled, will not capture user feedback.");return}const r=MQe(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){ec&&Ve.log("No outcomes to send");return}if(!this._dsn){ec&&Ve.log("No dsn provided, will not send outcomes");return}ec&&Ve.log("Sending outcomes:",t);const r=$Ye(t,this._options.tunnel&&gm(this._dsn));this._sendEnvelope(r)}}let D0;function $Qe(){if(D0)return D0;if(BP(Br.fetch))return D0=Br.fetch.bind(Br);const e=Br.document;let t=Br.fetch;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r);const n=r.contentWindow;n&&n.fetch&&(t=n.fetch),e.head.removeChild(r)}catch(r){ec&&Ve.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return D0=t.bind(Br)}function BQe(){D0=void 0}function UQe(e,t=$Qe()){let r=0,n=0;function a(i){const s=i.body.length;r+=s,n++;const l={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{return t(e.url,l).then(c=>(r-=s,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return BQe(),r-=s,n--,R3(c)}}return Zre(e,a)}const zQe=4;function HQe(e){function t(r){return new os((n,a)=>{const i=new XMLHttpRequest;i.onerror=a,i.onreadystatechange=()=>{i.readyState===zQe&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const s in e.headers)Object.prototype.hasOwnProperty.call(e.headers,s)&&i.setRequestHeader(s,e.headers[s]);i.send(r.body)})}return Zre(e,t)}const NS="?",qQe=30,WQe=40,VQe=50;
1375function G3(e,t,r,n){const a={filename:e,function:t,in_app:!0};return r!==void 0&&(a.lineno=r),n!==void 0&&(a.colno=n),a}const GQe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,KQe=/\((\S*)(?::(\d+))(?::(\d+))\)/,YQe=e=>{const t=GQe.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=KQe.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[n,a]=pne(t[1]||NS,t[2]);return G3(a,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},XQe=[qQe,YQe],JQe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,QQe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ZQe=e=>{const t=JQe.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=QQe.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],a=t[1]||NS;return[a,n]=pne(a,n),G3(n,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},eZe=[VQe,ZQe],tZe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,rZe=e=>{const t=tZe.exec(e);return t?G3(t[2],t[1]||NS,+t[3],t[4]?+t[4]:void 0):void 0},nZe=[WQe,rZe],aZe=[XQe,eZe,nZe],iZe=xre(...aZe),pne=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:NS,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Cb=1024,sZe="Breadcrumbs",oZe=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:sZe,setupOnce(){},setup(r){t.console&&JKe(dZe(r)),t.dom&&bre(uZe(r,t.dom)),t.xhr&&P3(fZe(r)),t.fetch&&O3(hZe(r)),t.history&&vS(pZe(r)),t.sentry&&r.on&&r.on("beforeSendEvent",cZe(r))}}}),lZe=oZe;function cZe(e){return function(r){Mr()===e&&Pu({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:ou(r)},{event:r})}}function uZe(e,t){return function(n){if(Mr()!==e)return;let a,i,s=typeof t=="object"?t.serializeAttribute:void 0,l=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;l&&l>Cb&&(ec&&Ve.warn(`\`dom.maxStringLength\` cannot exceed ${Cb}, but a value of ${l} was configured. Sentry will use ${Cb} instead.`),l=Cb),typeof s=="string"&&(s=[s]);try{const u=n.event,d=mZe(u)?u.target:u;a=Ou(d,{keyAttrs:s,maxStringLength:l}),i=fre(d)}catch{a="<unknown>"}if(a.length===0)return;const c={category:`ui.${n.name}`,message:a};i&&(c.data={"ui.component_name":i}),Pu(c,{event:n.event,name:n.name,global:n.global})}}function dZe(e){return function(r){if(Mr()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:kYe(r.level),message:wq(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${wq(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Pu(n,{input:r.args,level:r.level})}}function fZe(e){return function(r){if(Mr()!==e)return;const{startTimestamp:n,endTimestamp:a}=r,i=r.xhr[pu];if(!n||!a||!i)return;const{method:s,url:l,status_code:c,body:u}=i,d={method:s,url:l,status_code:c},f={xhr:r.xhr,input:u,startTimestamp:n,endTimestamp:a};Pu({category:"xhr",data:d,type:"http"},f)}}function hZe(e){return function(r){if(Mr()!==e)return;const{startTimestamp:n,endTimestamp:a}=r;if(a&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const i=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:a};Pu({category:"fetch",data:i,level:"error",type:"http"},s)}else{const i=r.response,s={...r.fetchData,status_code:i&&i.status},l={input:r.args,response:i,startTimestamp:n,endTimestamp:a};Pu({category:"fetch",data:s,type:"http"},l)}}}function pZe(e){return function(r){if(Mr()!==e)return;let n=r.from,a=r.to;const i=Gd(Br.location.href);let s=n?Gd(n):void 0;const l=Gd(a);(!s||!s.path)&&(s=i),i.protocol===l.protocol&&i.host===l.host&&(a=l.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Pu({category:"navigation",data:{from:n,to:a}})}}function mZe(e){return!!e&&!!e.target}const gZe="Dedupe",xZe=(()=>{let e;return{name:gZe,setupOnce(){},processEvent(t){if(t.type)return t;try{if(vZe(t,e))return ec&&Ve.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),yZe=xZe;function vZe(e,t){return t?!!(bZe(e,t)||wZe(e,t)):!1}function bZe(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!gne(e,t)||!mne(e,t))}function wZe(e,t){const r=oW(t),n=oW(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!gne(e,t)||!mne(e,t))}function mne(e,t){let r=lW(e),n=lW(t);if(!r&&!n)return!0;
1375if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let a=0;a<n.length;a++){const i=n[a],s=r[a];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function gne(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function oW(e){return e.exception&&e.exception.values&&e.exception.values[0]}function lW(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const _Ze="GlobalHandlers",SZe=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:_Ze,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(kZe(r),cW("onerror")),t.onunhandledrejection&&(NZe(r),cW("onunhandledrejection"))}}}),EZe=SZe;function kZe(e){_re(t=>{const{stackParser:r,attachStacktrace:n}=yne();if(Mr()!==e||fne())return;const{msg:a,url:i,line:s,column:l,error:c}=t,u=c===void 0&&xl(a)?AZe(a,i,s,l):xne(V3(r,c||a,void 0,n,!1),i,s,l);u.level="error",Fre(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function NZe(e){Sre(t=>{const{stackParser:r,attachStacktrace:n}=yne();if(Mr()!==e||fne())return;const a=TZe(t),i=j3(a)?jZe(a):V3(r,a,void 0,n,!0);i.level="error",Fre(i,{originalException:a,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function TZe(e){if(j3(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function jZe(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function AZe(e,t,r,n){const a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=N3(e)?e.message:e,s="Error";const l=i.match(a);return l&&(s=l[1],i=l[2]),xne({exception:{values:[{type:s,value:i}]}},t,r,n)}function xne(e,t,r,n){const a=e.exception=e.exception||{},i=a.values=a.values||[],s=i[0]=i[0]||{},l=s.stacktrace=s.stacktrace||{},c=l.frames=l.frames||[],u=isNaN(parseInt(n,10))?void 0:n,d=isNaN(parseInt(r,10))?void 0:r,f=xl(t)&&t.length>0?t:DKe();return c.length===0&&c.push({colno:u,filename:f,function:"?",in_app:!0,lineno:d}),e}function cW(e){ec&&Ve.log(`Global Handler attached: ${e}`)}function yne(){const e=Mr();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const CZe="HttpContext",OZe=(()=>({name:CZe,setupOnce(){},preprocessEvent(e){if(!Br.navigator&&!Br.location&&!Br.document)return;const t=e.request&&e.request.url||Br.location&&Br.location.href,{referrer:r}=Br.document||{},{userAgent:n}=Br.navigator||{},a={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},i={...e.request,...t&&{url:t},headers:a};e.request=i}})),PZe=OZe,RZe="cause",IZe=5,FZe="LinkedErrors",MZe=((e={})=>{const t=e.limit||IZe,r=e.key||RZe;return{name:FZe,setupOnce(){},preprocessEvent(n,a,i){const s=i.getOptions();RKe(hne,s.stackParser,s.maxValueLength,r,t,n,a)}}}),DZe=MZe,LZe=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],$Ze="TryCatch",BZe=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:$Ze,setupOnce(){t.setTimeout&&Ea(Br,"setTimeout",uW),t.setInterval&&Ea(Br,"setInterval",uW),t.requestAnimationFrame&&Ea(Br,"requestAnimationFrame",zZe),t.XMLHttpRequest&&"XMLHttpRequest"in Br&&Ea(XMLHttpRequest.prototype,"send",HZe);const r=t.eventTarget;r&&(Array.isArray(r)?r:LZe).forEach(qZe)}}}),UZe=BZe;function uW(e){return function(...t){const r=t[0];return t[0]=$p(r,{mechanism:{data:{function:xc(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function zZe(e){return function(t){return e.apply(this,[$p(t,{mechanism:{data:{function:"requestAnimationFrame",handler:xc(e)},handled:!1,type:"instrument"}})])}}function HZe(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in r&&typeof r[a]=="function"&&Ea(r,a,function(i){const s={mechanism:{data:{function:a,handler:xc(i)},handled:!1,type:"instrument"}},l=C3(i);return l&&(s.mechanism.data.handler=xc(l)),$p(i,s)})}),e.apply(this,t)}}function qZe(e){const t=Br,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ea(r,"addEventListener",function(n){return function(a,i,s){try{typeof i.handleEvent=="function"&&(i.handleEvent=$p(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:xc(i),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[a,$p(i,{mechanism:{data:{function:"addEventListener",handler:xc(i),target:e},handled:!1,type:"instrument"}}),s])}}),Ea(r,"removeEventListener",function(n){return function(a,i,s){const l=i;try{const c=l&&l.__sentry_wrapped__;c&&n.call(this,a,c,s)}catch{}return n.call(this,a,l,s)}}))}const WZe=[iJe(),xJe(),UZe(),lZe(),EZe(),DZe(),yZe(),PZe()];function VZe(e){return[...WZe]}function GZe(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=VZe()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),Br.SENTRY_RELEASE&&Br.SENTRY_RELEASE.id&&(e.release=Br.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:YKe(e.stackParser||iZe),integrations:FXe(e),transport:e.transport||(wre()?UQe:HQe)};WXe(LQe,t),e.autoSessionTracking&&KZe()}
1375function KZe(){if(typeof Br.document>"u"){ec&&Ve.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}$q({ignoreDuration:!0}),Bq(),vS(({from:e,to:t})=>{e!==void 0&&e!==t&&($q({ignoreDuration:!0}),Bq())})}const Yr=xr,K3="sentryReplaySession",YZe="replay_event",Y3="Unable to send Replay",XZe=3e5,JZe=9e5,QZe=5e3,ZZe=5500,eet=6e4,tet=5e3,ret=3,dW=15e4,Ob=5e3,net=3e3,aet=300,X3=2e7,iet=4999,set=15e3,fW=36e5;function oet(e,t){return e??t()}function Uw(e){let t,r=e[0],n=1;for(;n<e.length;){const a=e[n],i=e[n+1];if(n+=2,(a==="optionalAccess"||a==="optionalCall")&&r==null)return;a==="access"||a==="optionalAccess"?(t=r,r=i(r)):(a==="call"||a==="optionalCall")&&(r=i((...s)=>r.call(t,...s)),t=void 0)}return r}var aa;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(aa||(aa={}));function cet(e){return e.nodeType===e.ELEMENT_NODE}function dg(e){const t=Uw([e,"optionalAccess",r=>r.host]);return Uw([t,"optionalAccess",r=>r.shadowRoot])===e}function fg(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function uet(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function det(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function zw(e){try{const t=e.rules||e.cssRules;return t?uet(Array.from(t,vne).join("")):null}catch{return null}}function vne(e){let t;if(het(e))try{t=zw(e.styleSheet)||det(e)}catch{}else if(pet(e)&&e.selectorText.includes(":"))return fet(e.cssText);return t||e.cssText}function fet(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function het(e){return"styleSheet"in e}function pet(e){return"selectorText"in e}class bne{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const r=Uw([this,"access",n=>n.getMeta,"call",n=>n(t),"optionalAccess",n=>n.id]);return oet(r,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const a=this.nodeMetaMap.get(n);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function met(){return new bne}function TS({maskInputOptions:e,tagName:t,type:r}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||r==="password"||t==="INPUT"&&!r&&e.text)}function Ex({isMasked:e,element:t,value:r,maskInputFn:n}){let a=r||"";return e?(n&&(a=n(a,t)),"*".repeat(a.length)):a}function Bp(e){return e.toLowerCase()}function eR(e){return e.toUpperCase()}const hW="__rrweb_original__";function get(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let a=0;a<e.height;a+=r){const i=t.getImageData,s=hW in i?i[hW]:i;if(new Uint32Array(s.call(t,n,a,Math.min(r,e.width-n),Math.min(r,e.height-a)).data.buffer).some(c=>c!==0))return!1}return!0}function J3(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Bp(t):null}function Hw(e,t,r){return t==="INPUT"&&(r==="radio"||r==="checkbox")?e.getAttribute("value")||"":e.value}let xet=1;const yet=new RegExp("[^a-z0-9-_:]"),kx=-2;function Q3(){return xet++}function vet(e){if(e instanceof HTMLFormElement)return"form";const t=Bp(e.tagName);return yet.test(t)?"div":t}function bet(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let hh,pW;const wet=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_et=/^(?:[a-z+]+:)?\/\//i,Eet=/^www\..*/i,ket=/^(data:)([^,]*),(.*)/i;function qw(e,t){return(e||"").replace(wet,(r,n,a,i,s,l)=>{const c=a||s||l,u=n||i||"";if(!c)return r;if(_et.test(c)||Eet.test(c))return`url(${u}${c}${u})`;if(ket.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${bet(t)+c}${u})`;const d=t.split("/"),f=c.split("/");d.pop();for(const p of f)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const Net=/^[^ \t\n\r\u000c]+/,Tet=/^[, \t\n\r\u000c]+/;function jet(e,t){if(t.trim()==="")return t;let r=0;function n(i){let s;const l=i.exec(t.substring(r));return l?(s=l[0],r+=s.length,s):""}const a=[];for(;n(Tet),!(r>=t.length);){let i=n(Net);if(i.slice(-1)===",")i=jh(e,i.substring(0,i.length-1)),a.push(i);else{let s="";i=jh(e,i);let l=!1;for(;;){const c=t.charAt(r);if(c===""){a.push((i+s).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){r+=1,a.push((i+s).trim());break}else c==="("&&(l=!0);s+=c,r+=1}}}return a.join(", ")}function jh(e,t){if(!t||t.trim()==="")return t;const r=e.createElement("a");return r.href=t,r.href}function Aet(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Z3(){const e=document.createElement("a");return e.href="",e.href}
1375function wne(e,t,r,n,a,i){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?jh(e,n):r==="srcset"?jet(e,n):r==="style"?qw(n,Z3()):t==="object"&&r==="data"?jh(e,n):typeof i=="function"?i(r,n,a):n)}function _ne(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Cet(e,t,r,n){try{if(n&&e.matches(n))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let a=e.classList.length;a--;){const i=e.classList[a];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function Oet(e,t){for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}return!1}function Md(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:Md(e.parentNode,t,r,n+1)}function Ah(e,t){return r=>{const n=r;if(n===null)return!1;try{if(e){if(typeof e=="string"){if(n.matches(`.${e}`))return!0}else if(Oet(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}function Up(e,t,r,n,a,i){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let l=-1,c=-1;if(i){if(c=Md(s,Ah(n,a)),c<0)return!0;l=Md(s,Ah(t,r),c>=0?c:1/0)}else{if(l=Md(s,Ah(t,r)),l<0)return!1;c=Md(s,Ah(n,a),l>=0?l:1/0)}return l>=0?c>=0?l<=c:!0:c>=0?!1:!!i}catch{}return!!i}function Pet(e,t,r){const n=e.contentWindow;if(!n)return;let a=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){const l=setTimeout(()=>{a||(t(),a=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),a=!0,t()});return}const s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Ret(e,t,r){let n=!1,a;try{a=e.sheet}catch{return}if(a)return;const i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}function Iet(e,t){const{doc:r,mirror:n,blockClass:a,blockSelector:i,unblockSelector:s,maskAllText:l,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:x={},maskTextFn:y,maskInputFn:v,dataURLOptions:b={},inlineImages:w,recordCanvas:S,keepIframeSrcFn:j,newlyAddedElement:k=!1}=t,E=Fet(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:aa.Document,childNodes:[],compatMode:e.compatMode}:{type:aa.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:aa.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return Det(e,{doc:r,blockClass:a,blockSelector:i,unblockSelector:s,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:x,maskInputFn:v,dataURLOptions:b,inlineImages:w,recordCanvas:S,keepIframeSrcFn:j,newlyAddedElement:k,rootId:E,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p});case e.TEXT_NODE:return Met(e,{maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskTextFn:y,maskInputOptions:x,maskInputFn:v,rootId:E});case e.CDATA_SECTION_NODE:return{type:aa.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:aa.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function Fet(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Met(e,t){const{maskAllText:r,maskTextClass:n,unmaskTextClass:a,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:l,maskInputOptions:c,maskInputFn:u,rootId:d}=t,f=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const m=f==="STYLE"?!0:void 0,x=f==="SCRIPT"?!0:void 0,y=f==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||Uw([e,"access",b=>b.parentNode,"access",b=>b.sheet,"optionalAccess",b=>b.cssRules])&&(p=zw(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}p=qw(p,Z3())}x&&(p="SCRIPT_PLACEHOLDER");const v=Up(e,n,i,a,s,r);if(!m&&!x&&!y&&p&&v&&(p=l?l(p,e.parentElement):p.replace(/[\S]/g,"*")),y&&p&&(c.textarea||v)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),f==="OPTION"&&p){const b=TS({type:null,tagName:f,maskInputOptions:c});p=Ex({isMasked:Up(e,n,i,a,s,b),element:e,value:p,maskInputFn:u})}return{type:aa.Text,textContent:p||"",isStyle:m,rootId:d}}function Det(e,t){const{doc:r,blockClass:n,blockSelector:a,unblockSelector:i,inlineStylesheet:s,maskInputOptions:l={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:x=!1,rootId:y,maskTextClass:v,unmaskTextClass:b,maskTextSelector:w,unmaskTextSelector:S}=t,j=Cet(e,n,a,i),k=vet(e);let E={};const T=e.attributes.length;for(let A=0;A<T;A++){const P=e.attributes[A];P.name&&!_ne(k,P.name,P.value)&&(E[P.name]=wne(r,k,Bp(P.name),P.value,e,c))}if(k==="link"&&s){const A=Array.from(r.styleSheets).find(I=>I.href===e.href);let P=null;A&&(P=zw(A)),P&&(delete E.rel,delete E.href,E._cssText=qw(P,A.href))}if(k==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const A=zw(e.sheet);A&&(E._cssText=qw(A,Z3()))}if(k==="input"||k==="textarea"||k==="select"||k==="option"){const A=e,P=J3(A),I=Hw(A,eR(k),P),R=A.checked;if(P!=="submit"&&P!=="button"&&I){const M=Up(A,v,w,b,S,TS({type:P,tagName:eR(k),maskInputOptions:l}));E.value=Ex({isMasked:M,element:A,value:I,maskInputFn:u})}R&&(E.checked=R)}if(k==="option"&&(e.selected&&!l.select?E.selected=!0:delete E.selected),k==="canvas"&&p){if(e.__context==="2d")get(e)||(E.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const A=e.toDataURL(d.type,d.quality),P=document.createElement("canvas");P.width=e.width,P.height=e.height;const I=P.toDataURL(d.type,d.quality);A!==I&&(E.rr_dataURL=A)}}if(k==="img"&&f){hh||(hh=r.createElement("canvas"),pW=hh.getContext("2d"));const A=e,P=A.crossOrigin;A.crossOrigin="anonymous";const I=()=>{A.removeEventListener("load",I);
1375try{hh.width=A.naturalWidth,hh.height=A.naturalHeight,pW.drawImage(A,0,0),E.rr_dataURL=hh.toDataURL(d.type,d.quality)}catch(R){console.warn(`Cannot inline img src=${A.currentSrc}! Error: ${R}`)}P?E.crossOrigin=P:A.removeAttribute("crossorigin")};A.complete&&A.naturalWidth!==0?I():A.addEventListener("load",I)}if((k==="audio"||k==="video")&&(E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime),x||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),j){const{width:A,height:P}=e.getBoundingClientRect();E={class:E.class,rr_width:`${A}px`,rr_height:`${P}px`}}k==="iframe"&&!m(E.src)&&(e.contentDocument||(E.rr_src=E.src),delete E.src);let O;try{customElements.get(k)&&(O=!0)}catch{}return{type:aa.Element,tagName:k,attributes:E,childNodes:[],isSVG:Aet(e)||void 0,needBlock:j,rootId:y,isCustom:O}}function Vr(e){return e==null?"":e.toLowerCase()}function Let(e,t){if(t.comment&&e.type===aa.Comment)return!0;if(e.type===aa.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Vr(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Vr(e.attributes.name)==="application-name"||Vr(e.attributes.rel)==="icon"||Vr(e.attributes.rel)==="apple-touch-icon"||Vr(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Vr(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Vr(e.attributes.property).match(/^(og|twitter|fb):/)||Vr(e.attributes.name).match(/^(og|twitter):/)||Vr(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Vr(e.attributes.name)==="robots"||Vr(e.attributes.name)==="googlebot"||Vr(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Vr(e.attributes.name)==="author"||Vr(e.attributes.name)==="generator"||Vr(e.attributes.name)==="framework"||Vr(e.attributes.name)==="publisher"||Vr(e.attributes.name)==="progid"||Vr(e.attributes.property).match(/^article:/)||Vr(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Vr(e.attributes.name)==="google-site-verification"||Vr(e.attributes.name)==="yandex-verification"||Vr(e.attributes.name)==="csrf-token"||Vr(e.attributes.name)==="p:domain_verify"||Vr(e.attributes.name)==="verify-v1"||Vr(e.attributes.name)==="verification"||Vr(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ch(e,t){const{doc:r,mirror:n,blockClass:a,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:x={},maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S={},inlineImages:j=!1,recordCanvas:k=!1,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:O=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:R=!1}=t;let{preserveWhiteSpace:M=!0}=t;const L=Iet(e,{doc:r,mirror:n,blockClass:a,blockSelector:i,maskAllText:l,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:m,maskInputOptions:x,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,dataURLOptions:S,inlineImages:j,recordCanvas:k,keepIframeSrcFn:I,newlyAddedElement:R});if(!L)return console.warn(e,"not serialized"),null;let U;n.hasNode(e)?U=n.getId(e):Let(L,w)||!M&&L.type===aa.Text&&!L.isStyle&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?U=kx:U=Q3();const W=Object.assign(L,{id:U});if(n.add(e,W),U===kx)return null;E&&E(e);let V=!p;if(W.type===aa.Element){V=V&&!W.needBlock,delete W.needBlock;const G=e.shadowRoot;G&&fg(G)&&(W.isShadowHost=!0)}if((W.type===aa.Document||W.type===aa.Element)&&V){w.headWhitespace&&W.type===aa.Element&&W.tagName==="head"&&(M=!1);const G={doc:r,mirror:n,blockClass:a,blockSelector:i,maskAllText:l,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,skipChild:p,inlineStylesheet:m,maskInputOptions:x,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:j,recordCanvas:k,preserveWhiteSpace:M,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:A,stylesheetLoadTimeout:P,keepIframeSrcFn:I};for(const K of Array.from(e.childNodes)){const F=Ch(K,G);F&&W.childNodes.push(F)}if(cet(e)&&e.shadowRoot)for(const K of Array.from(e.shadowRoot.childNodes)){const F=Ch(K,G);F&&(fg(e.shadowRoot)&&(F.isShadow=!0),W.childNodes.push(F))}}return e.parentNode&&dg(e.parentNode)&&fg(e.parentNode)&&(W.isShadow=!0),W.type===aa.Element&&W.tagName==="iframe"&&Pet(e,()=>{const G=e.contentDocument;if(G&&T){const K=Ch(G,{doc:G,mirror:n,blockClass:a,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:x,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:j,recordCanvas:k,preserveWhiteSpace:M,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:A,stylesheetLoadTimeout:P,keepIframeSrcFn:I});K&&T(e,K)}},O),W.type===aa.Element&&W.tagName==="link"&&W.attributes.rel==="stylesheet"&&Ret(e,()=>{if(A){const G=Ch(e,{doc:r,mirror:n,blockClass:a,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:x,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:j,recordCanvas:k,preserveWhiteSpace:M,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:A,stylesheetLoadTimeout:P,keepIframeSrcFn:I});G&&A(e,G)}},P),W}
1375function $et(e,t){const{mirror:r=new bne,blockClass:n="rr-block",blockSelector:a=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:l="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:f=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:x=!1,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOM:w=!1,dataURLOptions:S,preserveWhiteSpace:j,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:A,keepIframeSrcFn:P=()=>!1}=t||{};return Ch(e,{doc:e,mirror:r,blockClass:n,blockSelector:a,unblockSelector:i,maskAllText:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:x===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:x===!1?{}:x,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:S,inlineImages:p,recordCanvas:m,preserveWhiteSpace:j,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:A,keepIframeSrcFn:P,newlyAddedElement:!1})}function eu(e){let t,r=e[0],n=1;for(;n<e.length;){const a=e[n],i=e[n+1];if(n+=2,(a==="optionalAccess"||a==="optionalCall")&&r==null)return;a==="access"||a==="optionalAccess"?(t=r,r=i(r)):(a==="call"||a==="optionalCall")&&(r=i((...s)=>r.call(t,...s)),t=void 0)}return r}function gi(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const xh=`Please stop import mirror directly. Instead of that,\r 1376now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 1377or you can use record.mirror to access the mirror instance during recording.`;let mW={map:{},getId(){return console.error(xh),-1},getNode(){return console.error(xh),null},removeNodeFromMap(){console.error(xh)},has(){return console.error(xh),!1},reset(){console.error(xh)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(mW=new Proxy(mW,{get(e,t,r){return t==="map"&&console.error(xh),Reflect.get(e,t,r)}}));function Nx(e,t,r={}){let n=null,a=0;return function(...i){const s=Date.now();!a&&r.leading===!1&&(a=s);const l=t-(s-a),c=this;l<=0||l>t?(n&&(Vet(n),n=null),a=s,e.apply(c,i)):!n&&r.trailing!==!1&&(n=jS(()=>{a=r.leading===!1?0:Date.now(),n=null,e.apply(c,i)},l))}}function Sne(e,t,r,n,a=window){const i=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,n?r:{set(s){jS(()=>{r.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Sne(e,t,i||{},!0)}function eF(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],a=r(n);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=a,()=>{e[t]=n}}catch{return()=>{}}}let Ww=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ww=()=>new Date().getTime());function Ene(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:eu([t,"optionalAccess",r=>r.documentElement,"access",r=>r.scrollLeft])||eu([t,"optionalAccess",r=>r.body,"optionalAccess",r=>r.parentElement,"optionalAccess",r=>r.scrollLeft])||eu([t,"optionalAccess",r=>r.body,"optionalAccess",r=>r.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:eu([t,"optionalAccess",r=>r.documentElement,"access",r=>r.scrollTop])||eu([t,"optionalAccess",r=>r.body,"optionalAccess",r=>r.parentElement,"optionalAccess",r=>r.scrollTop])||eu([t,"optionalAccess",r=>r.body,"optionalAccess",r=>r.scrollTop])||0}}function kne(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Nne(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Tne(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function bo(e,t,r,n,a){if(!e)return!1;const i=Tne(e);if(!i)return!1;const s=Ah(t,r);if(!a){const u=n&&i.matches(n);return s(i)&&!u}const l=Md(i,s);let c=-1;return l<0?!1:(n&&(c=Md(i,Ah(null,n))),l>-1&&c<0?!0:l<c)}function Bet(e,t){return t.getId(e)!==-1}function GA(e,t){return t.getId(e)===kx}function jne(e,t){if(dg(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?jne(e.parentNode,t):!0:!0}function tR(e){return!!e.changedTouches}function Uet(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function Ane(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Cne(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function rR(e){return!!eu([e,"optionalAccess",t=>t.shadowRoot])}class zet{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return HYe(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function One(e){let t=null;return eu([e,"access",r=>r.getRootNode,"optionalCall",r=>r(),"optionalAccess",r=>r.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Het(e){let t=e,r;for(;r=One(t);)t=r;return t}function qet(e){const t=e.ownerDocument;if(!t)return!1;const r=Het(e);return t.contains(r)}function Pne(e){const t=e.ownerDocument;return t?t.contains(e)||qet(e):!1}const gW={};function tF(e){const t=gW[e];if(t)return t;const r=window.document;let n=window[e];if(r&&typeof r.createElement=="function")try{const a=r.createElement("iframe");a.hidden=!0,r.head.appendChild(a);const i=a.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(a)}catch{}return gW[e]=n.bind(window)}function Wet(...e){return tF("requestAnimationFrame")(...e)}
1377function jS(...e){return tF("setTimeout")(...e)}function Vet(...e){return tF("clearTimeout")(...e)}var ir=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(ir||{}),sr=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(sr||{}),ci=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ci||{}),zl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(zl||{});function Get(e){let t,r=e[0],n=1;for(;n<e.length;){const a=e[n],i=e[n+1];if(n+=2,(a==="optionalAccess"||a==="optionalCall")&&r==null)return;a==="access"||a==="optionalAccess"?(t=r,r=i(r)):(a==="call"||a==="optionalCall")&&(r=i((...s)=>r.call(t,...s)),t=void 0)}return r}function xW(e){return"__ln"in e}class Ket{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=Get([r,"optionalAccess",a=>a.next])||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&xW(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&xW(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const yW=(e,t)=>`${e}@${t}`;class Yet{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new Ket,a=c=>{let u=c,d=kx;for(;d===kx;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=c=>{if(!c.parentNode||!Pne(c))return;const u=dg(c.parentNode)?this.mirror.getId(One(c)):this.mirror.getId(c.parentNode),d=a(c);if(u===-1||d===-1)return n.addNode(c);const f=Ch(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Ane(p,this.mirror)&&this.iframeManager.addIframe(p),Cne(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),rR(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)}});f&&(t.push({parentId:u,nextId:d,node:f}),r.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)vW(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!bW(this.droppedSet,c)&&!vW(this.removes,c,this.mirror)||bW(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;n.length;){let c=null;if(s){const u=this.mirror.getId(s.value.parentNode),d=a(s.value);u!==-1&&d!==-1&&(c=s)}if(!c){let u=n.tail;for(;u;){const d=u;if(u=u.previous,d){const f=this.mirror.getId(d.value.parentNode);
vendor: 4,269 bytes, line 1377
1377if(a(d.value)===-1)continue;if(f!==-1){c=d;break}else{const m=d.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const x=m.parentNode.host;if(this.mirror.getId(x)!==-1){c=d;break}}}}}}if(!c){for(;n.head;)n.removeNode(n.head.value);break}s=c.previous,n.removeNode(c.value),i(c.value)}const l={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),f=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+f).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=t=>{if(!GA(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!bo(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Up(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r,Tne(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,a=t.target.getAttribute(n);if(n==="value"){const s=J3(r),l=r.tagName;a=Hw(r,l,s);const c=TS({maskInputOptions:this.maskInputOptions,tagName:l,type:s}),u=Up(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);a=Ex({isMasked:u,element:r,value:a,maskInputFn:this.maskInputFn})}if(bo(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||a===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(a))if(!r.contentDocument)n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!_ne(r.tagName,n)&&(i.attributes[n]=wne(this.doc,Bp(r.tagName),Bp(n),a,r,this.maskAttributeFn),n==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const c=r.style.getPropertyValue(l),u=r.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||u!==s.style.getPropertyPriority(l)?u===""?i.styleDiff[l]=c:i.styleDiff[l]=[c,u]:i._unchangedStyles[l]=[c,u]}for(const l of Array.from(s.style))r.style.getPropertyValue(l)===""&&(i.styleDiff[l]=!1)}break}case"childList":{if(bo(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),a=dg(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);bo(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||GA(r,this.mirror)||!Bet(r,this.mirror)||(this.addedSet.has(r)?(nR(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||jne(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[yW(n,a)]?nR(this.movedSet,r):this.removes.push({parentId:a,id:n,isShadow:dg(t.target)&&fg(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(GA(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[yW(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);bo(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEac
1377h(n=>this.genAdds(n)),rR(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function nR(e,t){e.delete(t),t.childNodes.forEach(r=>nR(e,r))}function vW(e,t,r){return e.length===0?!1:Rne(e,t,r)}function Rne(e,t,r){const{parentNode:n}=t;if(!n)return!1;const a=r.getId(n);return e.some(i=>i.id===a)?!0:Rne(e,n,r)}function bW(e,t){return e.size===0?!1:Ine(e,t)}function Ine(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:Ine(e,r):!1}let hg;function Xet(e){hg=e}function Jet(){hg=void 0}const mr=e=>hg?((...r)=>{try{return e(...r)}catch(n){if(hg&&hg(n)===!0)return()=>{};throw n}}):e;function nl(e){let t,r=e[0],n=1;for(;n<e.length;){const a=e[n],i=e[n+1];if(n+=2,(a==="optionalAccess"||a==="optionalCall")&&r==null)return;a==="access"||a==="optionalAccess"?(t=r,r=i(r)):(a==="call"||a==="optionalCall")&&(r=i((...s)=>r.call(t,...s)),t=void 0)}return r}const Oh=[];function by(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Fne(e,t){const r=new Yet;Oh.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver;const a=nl([window,"optionalAccess",s=>s.Zone,"optionalAccess",s=>s.__symbol__,"optionalCall",s=>s("MutationObserver")]);a&&window[a]&&(n=window[a]);const i=new n(mr(s=>{e.onMutation&&e.onMutation(s)===!1||r.processMutations.bind(r)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Qet({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const a=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],l;const c=Nx(mr(f=>{const p=Date.now()-l;e(s.map(m=>(m.timeOffset-=p,m)),f),s=[],l=null}),i),u=mr(Nx(mr(f=>{const p=by(f),{clientX:m,clientY:x}=tR(f)?f.changedTouches[0]:f;l||(l=Ww()),s.push({x:m,y:x,id:n.getId(p),timeOffset:Ww()-l}),c(typeof DragEvent<"u"&&f instanceof DragEvent?sr.Drag:f instanceof MouseEvent?sr.MouseMove:sr.TouchMove)}),a,{trailing:!1})),d=[gi("mousemove",u,r),gi("touchmove",u,r),gi("drag",u,r)];return mr(()=>{d.forEach(f=>f())})}function Zet({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const l=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let u=null;const d=f=>p=>{const m=by(p);if(bo(m,n,a,i,!0))return;let x=null,y=f;if("pointerType"in p){switch(p.pointerType){case"mouse":x=zl.Mouse;break;case"touch":x=zl.Touch;break;case"pen":x=zl.Pen;break}x===zl.Touch?ci[f]===ci.MouseDown?y="TouchStart":ci[f]===ci.MouseUp&&(y="TouchEnd"):zl.Pen}else tR(p)&&(x=zl.Touch);x!==null?(u=x,(y.startsWith("Touch")&&x===zl.Touch||y.startsWith("Mouse")&&x===zl.Mouse)&&(x=null)):ci[f]===ci.Click&&(x=u,u=null);const v=tR(p)?p.changedTouches[0]:p;if(!v)return;const b=r.getId(m),{clientX:w,clientY:S}=v;mr(e)({type:ci[y],id:b,x:w,y:S,...x!==null&&{pointerType:x}})};return Object.keys(ci).filter(f=>Number.isNaN(Number(f))&&!f.endsWith("_Departed")&&l[f]!==!1).forEach(f=>{let p=Bp(f);const m=d(f);if(window.PointerEvent)switch(ci[f]){case ci.MouseDown:case ci.MouseUp:p=p.replace("mouse","pointer");break;case ci.TouchStart:case ci.TouchEnd:return}c.push(gi(p,m,t))}),mr(()=>
vendor: 4,388 bytes, line 1377
1377{c.forEach(f=>f())})}function Mne({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,unblockSelector:i,sampling:s}){const l=mr(Nx(mr(c=>{const u=by(c);if(!u||bo(u,n,a,i,!0))return;const d=r.getId(u);if(u===t&&t.defaultView){const f=Ene(t.defaultView);e({id:d,x:f.left,y:f.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return gi("scroll",l,t)}function ett({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const a=mr(Nx(mr(()=>{const i=kne(),s=Nne();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return gi("resize",a,t)}const ttt=["INPUT","TEXTAREA","SELECT"],wW=new WeakMap;function rtt({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,unblockSelector:i,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:f,maskTextClass:p,unmaskTextClass:m,maskTextSelector:x,unmaskTextSelector:y}){function v(T){let O=by(T);const A=T.isTrusted,P=O&&eR(O.tagName);if(P==="OPTION"&&(O=O.parentElement),!O||!P||ttt.indexOf(P)<0||bo(O,n,a,i,!0))return;const I=O;if(I.classList.contains(s)||l&&I.matches(l))return;const R=J3(O);let M=Hw(I,P,R),L=!1;const U=TS({maskInputOptions:c,tagName:P,type:R}),W=Up(O,p,x,m,y,U);(R==="radio"||R==="checkbox")&&(L=O.checked),M=Ex({isMasked:W,element:O,value:M,maskInputFn:u}),b(O,f?{text:M,isChecked:L,userTriggered:A}:{text:M,isChecked:L});const V=O.name;R==="radio"&&V&&L&&t.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(G=>{if(G!==O){const K=Ex({isMasked:W,element:G,value:Hw(G,P,R),maskInputFn:u});b(G,f?{text:K,isChecked:!L,userTriggered:!1}:{text:K,isChecked:!L})}})}function b(T,O){const A=wW.get(T);if(!A||A.text!==O.text||A.isChecked!==O.isChecked){wW.set(T,O);const P=r.getId(T);mr(e)({...O,id:P})}}const S=(d.input==="last"?["change"]:["input","change"]).map(T=>gi(T,mr(v),t)),j=t.defaultView;if(!j)return()=>{S.forEach(T=>T())};const k=j.Object.getOwnPropertyDescriptor(j.HTMLInputElement.prototype,"value"),E=[[j.HTMLInputElement.prototype,"value"],[j.HTMLInputElement.prototype,"checked"],[j.HTMLSelectElement.prototype,"value"],[j.HTMLTextAreaElement.prototype,"value"],[j.HTMLSelectElement.prototype,"selectedIndex"],[j.HTMLOptionElement.prototype,"selected"]];return k&&k.set&&S.push(...E.map(T=>Sne(T[0],T[1],{set(){mr(v)({target:this,isTrusted:!1})}},!1,j))),mr(()=>{S.forEach(T=>T())})}function Vw(e){const t=[];function r(n,a){if(Pb("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Pb("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Pb("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Pb("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const s=Array.from(n.parentRule.cssRules).indexOf(n);a.unshift(s)}else if(n.parentStyleSheet){const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);a.unshift(s)}return a}return r(e,t)}function tu(e,t,r){let n,a;return e?(e.ownerNode?n=t.getId(e.ownerNode):a=r.getId(e),{styleId:a,id:n}):{}}function ntt({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const a=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:mr((d,f,p)=>{const[m,x]=p,{id:y,styleId:v}=tu(f,t,r.styleMirror);return(y&&y!==-1||v&&v!==-1)&&e({id:y,styleId:v,adds:[{rule:m,index:x}]}),d.apply(f,p)})});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:mr((d,f,p)=>{const[m]=p,{id:x,styleId:y}=tu(f,t,r.styleMirror);return(x&&x!==-1||y&&y!==-1)&&e({id:x,styleId:y,removes:[{index:m}]}),d.apply(f,p)})});let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:mr((d,f,p)=>{const[m]=p,{id:x,styleId:y}=tu(f,t,r.styleMirror);return(x&&x!==-1||y&&y!==-1)&&e({id:x,styleId:y,replace:m}),d.apply(f,p)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:mr((d,f,p)=>{const[m]=p,{id:x,styleId:y}=tu(f,t,r.styleMirror);return(x&&x!==-1||y&&y!==-1)&&e({id:x,styleId:y,replaceSync:m}),d.apply(f,p)})}));const c={};Rb("CSSGroupingRule")?c.CSSGroupingRule=n.CSSGroupingRule:(Rb("CSSMediaRule")&&(c.CSSMediaRule=n.CSSMediaRule),Rb("CSSConditionRule")&&(c.CSSConditionRule=n.CSSConditionRule),Rb("CSSSupportsRule")&&(c.CSSSupportsRule=n.CSSSupportsRule));const u={};
1377return Object.entries(c).forEach(([d,f])=>{u[d]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[d].insertRule,{apply:mr((p,m,x)=>{const[y,v]=x,{id:b,styleId:w}=tu(m.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||w&&w!==-1)&&e({id:b,styleId:w,adds:[{rule:y,index:[...Vw(m),v||0]}]}),p.apply(m,x)})}),f.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:mr((p,m,x)=>{const[y]=x,{id:v,styleId:b}=tu(m.parentStyleSheet,t,r.styleMirror);return(v&&v!==-1||b&&b!==-1)&&e({id:v,styleId:b,removes:[{index:[...Vw(m),y]}]}),p.apply(m,x)})})}),mr(()=>{n.CSSStyleSheet.prototype.insertRule=a,n.CSSStyleSheet.prototype.deleteRule=i,s&&(n.CSSStyleSheet.prototype.replace=s),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach(([d,f])=>{f.prototype.insertRule=u[d].insertRule,f.prototype.deleteRule=u[d].deleteRule})})}function Dne({mirror:e,stylesheetManager:t},r){let n=null;r.nodeName==="#document"?n=e.getId(r):n=e.getId(r.host);const a=r.nodeName==="#document"?nl([r,"access",s=>s.defaultView,"optionalAccess",s=>s.Document]):nl([r,"access",s=>s.ownerDocument,"optionalAccess",s=>s.defaultView,"optionalAccess",s=>s.ShadowRoot]),i=nl([a,"optionalAccess",s=>s.prototype])?Object.getOwnPropertyDescriptor(nl([a,"optionalAccess",s=>s.prototype]),"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return nl([i,"access",s=>s.get,"optionalAccess",s=>s.call,"call",s=>s(this)])},set(s){const l=nl([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,s)]);if(n!==null&&n!==-1)try{t.adoptStyleSheets(s,n)}catch{}return l}}),mr(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function att({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:a}){const i=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:mr((l,c,u)=>{const[d,f,p]=u;if(r.has(d))return i.apply(c,[d,f,p]);const{id:m,styleId:x}=tu(nl([c,"access",y=>y.parentRule,"optionalAccess",y=>y.parentStyleSheet]),t,n.styleMirror);return(m&&m!==-1||x&&x!==-1)&&e({id:m,styleId:x,set:{property:d,value:f,priority:p},index:Vw(c.parentRule)}),l.apply(c,u)})});const s=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:mr((l,c,u)=>{const[d]=u;if(r.has(d))return s.apply(c,[d]);const{id:f,styleId:p}=tu(nl([c,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),t,n.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,remove:{property:d},index:Vw(c.parentRule)}),l.apply(c,u)})}),mr(()=>{a.CSSStyleDeclaration.prototype.setProperty=i,a.CSSStyleDeclaration.prototype.removeProperty=s})}function itt({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:a,sampling:i,doc:s}){const l=mr(u=>Nx(mr(d=>{const f=by(d);if(!f||bo(f,t,r,n,!0))return;const{currentTime:p,volume:m,muted:x,playbackRate:y}=f;e({type:u,id:a.getId(f),currentTime:p,volume:m,muted:x,playbackRate:y})}),i.media||500)),c=[gi("play",l(0),s),gi("pause",l(1),s),gi("seeked",l(2),s),gi("volumechange",l(3),s),gi("ratechange",l(4),s)];return mr(()=>{c.forEach(u=>u())})}function stt({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],a=new WeakMap,i=r.FontFace;r.FontFace=function(c,u,d){const f=new i(c,u,d);return a.set(f,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const s=eF(t.fonts,"add",function(l){return function(c){return jS(mr(()=>{const u=a.get(c);u&&(e(u),a.delete(c))}),0),l.apply(this,[c])}});return n.push(()=>{r.FontFace=i}),n.push(s),mr(()=>{n.forEach(l=>l())})}function ott(e){const{doc:t,mirror:r,blockClass:n,blockSelector:a,unblockSelector:i,selectionCb:s}=e;let l=!0;const c=mr(()=>{const u=t.getSelection();if(!u||l&&nl([u,"optionalAccess",p=>p.isCollapsed]))return;l=u.isCollapsed||!1;const d=[],f=u.rangeCount||0;for(let p=0;p<f;p++){const m=u.getRangeAt(p),{startContainer:x,startOffset:y,endContainer:v,endOffset:b}=m;bo(x,n,a,i,!0)||bo(v,n,a,i,!0)||d.push({start:r.getId(x),startOffset:y,end:r.getId(v),endOffset:b})}s({ranges:d})});return c(),gi("selectionchange",c)}function ltt({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:eF(r.customElements,"define",function(a){return function(i,s,l){try{t({define:{name:i}})}catch{}return a.apply(this,[i,s,l])}})}function ctt(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};const n=Fne(e,e.doc),a=Qet(e),i=Zet(e),s=Mne(e),l=ett(e,{win:r}),c=rtt(e),u=itt(e),d=ntt(e,{win:r}),f=Dne(e,e.doc),p=att(e,{win:r}),m=e.collectFonts?stt(e):()=>{},x=ott(e),y=ltt(e),v=[];for(const b of e.plugins)v.push(b.observer(b.callback,r,b.options));return mr(()=>{Oh.forEach(b=>b.reset()),n.disconnect(),a(),i(),s(),l(),c(),u(),d(),f(),p(),m(),x(),y(),v.forEach(b=>b())})}function Pb(e){return typeof window[e]<"u"}function Rb(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class aR{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,a){const i=n||this.getIdToRemoteIdMap(t),s=a||this.getRemoteIdToIdMap(t);let l=i.get(r);return l||(l=this.generateIdFn(),i.set(r,l),s.set(l,r)),l}getIds(t,r){const n=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,a))}getRemoteId(t,r,n){const a=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const i=a.get(r);return i||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(a=>this.getRemoteId(t,a,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}function _W(e){let t,r=e[0],n=1;for(;n<e.length;){const a=e[n],i=e[n+1];if(n+=2,(a==="optionalAccess"||a==="optionalCall")&&r==null)return;a==="access"||a==="optionalAccess"?(t=r,r=i(r)):(a==="call"||a==="optionalCall")&&(r=i((...s)=>r.call(t,...s)),t=void 0)}return r}
vendor: 5,364 bytes, line 1377
1377class utt{constructor(){this.crossOriginIframeMirror=new aR(Q3),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class dtt{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new aR(Q3),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new aR(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),_W([this,"access",n=>n.loadListener,"optionalCall",n=>n(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const a=this.crossOriginIframeMap.get(t.source);if(!a)return;const i=this.transformCrossOriginEvent(a,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){switch(r.type){case ir.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:ir.IncrementalSnapshot,data:{source:sr.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ir.Meta:case ir.Load:case ir.DomContentLoaded:return!1;case ir.Plugin:return r;case ir.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case ir.IncrementalSnapshot:switch(r.data.source){case sr.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(n.node,a)}),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case sr.Drag:case sr.TouchMove:case sr.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case sr.ViewportResize:return!1;case sr.MediaInteraction:case sr.MouseInteraction:case sr.Scroll:case sr.CanvasMutation:case sr.Input:return this.replaceIds(r.data,t,["id"]),r;case sr.StyleSheetRule:case sr.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case sr.Font:return r;case sr.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),r;case sr.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),_W([r,"access",n=>n.data,"access",n=>n.styles,"optionalAccess",n=>n.forEach,"call",n=>n(a=>{this.replaceStyleIds(a,t,["styleId"])})]),r}}return!1}replace(t,r,n,a){for(const i of a)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==aa.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class ftt{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class htt{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!fg(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=Fne({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Mne({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),jS(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Dne({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(eF(t.prototype,"attachShadow",function(a){return function(i){const s=a.call(this,i);return this.shadowRoot&&Pne(this)&&n.addShadowRoot(this.shadowRoot,r),s}}))}
1377reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class SW{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class ptt{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new zet,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},a=[];for(const i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),a.push({styleId:s,rules:Array.from(i.rules||CSSRule,(l,c)=>({rule:vne(l),index:c}))})),n.styleIds.push(s)}a.length>0&&(n.styles=a),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class mtt{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Wet(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(a=>a!==r)}add(t,r){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let kn,Gw;const po=met();function vu(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:a="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:f=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:x=!0,maskAllInputs:y,maskInputOptions:v,slimDOMOptions:b,maskAttributeFn:w,maskInputFn:S,maskTextFn:j,maxCanvasSize:k=null,packFn:E,sampling:T={},dataURLOptions:O={},mousemoveWait:A,recordCanvas:P=!1,recordCrossOriginIframes:I=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:M=!1,collectFonts:L=!1,inlineImages:U=!1,plugins:W,keepIframeSrcFn:V=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:K,onMutation:F,getCanvasManager:ne}=e;Xet(K);const H=I?window.parent===window:!0;let B=!1;if(!H)try{window.parent.document&&(B=!1)}catch{B=!0}if(H&&!t)throw new Error("emit function is required");A!==void 0&&T.mousemove===void 0&&(T.mousemove=A),po.reset();const X=y===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:v!==void 0?v:{},Y=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};Uet();let ae,fe=0;const ue=ke=>{for(const Oe of W||[])Oe.eventProcessor&&(ke=Oe.eventProcessor(ke));return E&&!B&&(ke=E(ke)),ke};kn=(ke,Oe)=>{const Ue=ke;if(Ue.timestamp=Ww(),BA([Oh,"access",Je=>Je[0],"optionalAccess",Je=>Je.isFrozen,"call",Je=>Je()])&&Ue.type!==ir.FullSnapshot&&!(Ue.type===ir.IncrementalSnapshot&&Ue.data.source===sr.Mutation)&&Oh.forEach(Je=>Je.unfreeze()),H)BA([t,"optionalCall",Je=>Je(ue(Ue),Oe)]);else if(B){const Je={type:"rrweb",event:ue(Ue),origin:window.location.origin,isCheckout:Oe};window.parent.postMessage(Je,"*")}if(Ue.type===ir.FullSnapshot)ae=Ue,fe=0;else if(Ue.type===ir.IncrementalSnapshot){if(Ue.data.source===sr.Mutation&&Ue.data.isAttachIframe)return;fe++;const Je=n&&fe>=n,Ze=r&&ae&&Ue.timestamp-ae.timestamp>r;(Je||Ze)&&we(!0)}};const oe=ke=>{kn({type:ir.IncrementalSnapshot,data:{source:sr.Mutation,...ke}})},Z=ke=>kn({type:ir.IncrementalSnapshot,data:{source:sr.Scroll,...ke}}),ce=ke=>kn({type:ir.IncrementalSnapshot,data:{source:sr.CanvasMutation,...ke}}),q=ke=>kn({type:ir.IncrementalSnapshot,data:{source:sr.AdoptedStyleSheet,...ke}}),xe=new ptt({mutationCb:oe,adoptedStyleSheetCb:q}),pe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new utt:new dtt({mirror:po,mutationCb:oe,stylesheetManager:xe,recordCrossOriginIframes:I,wrappedEmit:kn});for(const ke of W||[])ke.getMirror&&ke.getMirror({nodeMirror:po,crossOriginIframeMirror:pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:pe.crossOriginIframeStyleMirror});const Se=new mtt,he=xtt(ne,{mirror:po,win:window,mutationCb:ke=>kn({type:ir.IncrementalSnapshot,data:{source:sr.CanvasMutation,...ke}}),recordCanvas:P,blockClass:a,blockSelector:i,unblockSelector:s,maxCanvasSize:k,sampling:T.canvas,dataURLOptions:O,errorHandler:K}),ie=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ftt:new htt({mutationCb:oe,scrollCb:Z,b
1377ypassOptions:{onMutation:F,blockClass:a,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:x,maskInputOptions:X,dataURLOptions:O,maskAttributeFn:w,maskTextFn:j,maskInputFn:S,recordCanvas:P,inlineImages:U,sampling:T,slimDOMOptions:Y,iframeManager:pe,stylesheetManager:xe,canvasManager:he,keepIframeSrcFn:V,processedNodeManager:Se},mirror:po}),we=(ke=!1)=>{kn({type:ir.Meta,data:{href:window.location.href,width:Nne(),height:kne()}},ke),xe.reset(),ie.init(),Oh.forEach(Ue=>Ue.lock());const Oe=$et(document,{mirror:po,blockClass:a,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:x,maskAllInputs:X,maskAttributeFn:w,maskInputFn:S,maskTextFn:j,slimDOM:Y,dataURLOptions:O,recordCanvas:P,inlineImages:U,onSerialize:Ue=>{Ane(Ue,po)&&pe.addIframe(Ue),Cne(Ue,po)&&xe.trackLinkElement(Ue),rR(Ue)&&ie.addShadowRoot(Ue.shadowRoot,document)},onIframeLoad:(Ue,Je)=>{pe.attachIframe(Ue,Je),ie.observeAttachShadow(Ue)},onStylesheetLoad:(Ue,Je)=>{xe.attachLinkElement(Ue,Je)},keepIframeSrcFn:V});if(!Oe)return console.warn("Failed to snapshot the document");kn({type:ir.FullSnapshot,data:{node:Oe,initialOffset:Ene(window)}}),Oh.forEach(Ue=>Ue.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&xe.adoptStyleSheets(document.adoptedStyleSheets,po.getId(document))};Gw=we;try{const ke=[],Oe=Je=>mr(ctt)({onMutation:F,mutationCb:oe,mousemoveCb:(Ze,te)=>kn({type:ir.IncrementalSnapshot,data:{source:te,positions:Ze}}),mouseInteractionCb:Ze=>kn({type:ir.IncrementalSnapshot,data:{source:sr.MouseInteraction,...Ze}}),scrollCb:Z,viewportResizeCb:Ze=>kn({type:ir.IncrementalSnapshot,data:{source:sr.ViewportResize,...Ze}}),inputCb:Ze=>kn({type:ir.IncrementalSnapshot,data:{source:sr.Input,...Ze}}),mediaInteractionCb:Ze=>kn({type:ir.IncrementalSnapshot,data:{source:sr.MediaInteraction,...Ze}}),styleSheetRuleCb:Ze=>kn({type:ir.IncrementalSnapshot,data:{source:sr.StyleSheetRule,...Ze}}),styleDeclarationCb:Ze=>kn({type:ir.IncrementalSnapshot,data:{source:sr.StyleDeclaration,...Ze}}),canvasMutationCb:ce,fontCb:Ze=>kn({type:ir.IncrementalSnapshot,data:{source:sr.Font,...Ze}}),selectionCb:Ze=>{kn({type:ir.IncrementalSnapshot,data:{source:sr.Selection,...Ze}})},customElementCb:Ze=>{kn({type:ir.IncrementalSnapshot,data:{source:sr.CustomElement,...Ze}})},blockClass:a,ignoreClass:l,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:X,inlineStylesheet:x,sampling:T,recordCanvas:P,inlineImages:U,userTriggeredOnInput:M,collectFonts:L,doc:Je,maskAttributeFn:w,maskInputFn:S,maskTextFn:j,keepIframeSrcFn:V,blockSelector:i,unblockSelector:s,slimDOMOptions:Y,dataURLOptions:O,mirror:po,iframeManager:pe,stylesheetManager:xe,shadowDomManager:ie,processedNodeManager:Se,canvasManager:he,ignoreCSSAttributes:G,plugins:BA([W,"optionalAccess",Ze=>Ze.filter,"call",Ze=>Ze(te=>te.observer),"optionalAccess",Ze=>Ze.map,"call",Ze=>Ze(te=>({observer:te.observer,options:te.options,callback:ve=>kn({type:ir.Plugin,data:{plugin:te.name,payload:ve}})}))])||[]},{});pe.addLoadListener(Je=>{try{ke.push(Oe(Je.contentDocument))}catch(Ze){console.warn(Ze)}});const Ue=()=>{we(),ke.push(Oe(document))};return document.readyState==="interactive"||document.readyState==="complete"?Ue():(ke.push(gi("DOMContentLoaded",()=>{kn({type:ir.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&Ue()})),ke.push(gi("load",()=>{kn({type:ir.Load,data:{}}),R==="load"&&Ue()},window))),()=>{ke.forEach(Je=>Je()),Se.destroy(),Gw=void 0,Jet()}}catch(ke){console.warn(ke)}}function gtt(e){if(!Gw)throw new Error("please take full snapshot after start recording");Gw(e)}vu.mirror=po;vu.takeFullSnapshot=gtt;function xtt(e,t){try{return e?e(t):new SW}catch{return console.warn("Unable to initialize CanvasManager"),new SW}}const ytt=3,vtt=5;function rF(e){return e>9999999999?e:e*1e3}function KA(e){return e>9999999999?e/1e3:e}function wy(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>
1377(e.throttledAddEvent({type:ir.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:rl(t,10,1e3)}}),t.category==="console")))}const btt="button,a";function Lne(e){return e.closest(btt)||e}function $ne(e){const t=Bne(e);return!t||!(t instanceof Element)?t:Lne(t)}function Bne(e){return wtt(e)?e.target:e}function wtt(e){return typeof e=="object"&&!!e&&"target"in e}let ru;function _tt(e){return ru||(ru=[],Stt()),ru.push(e),()=>{const t=ru?ru.indexOf(e):-1;t>-1&&ru.splice(t,1)}}function Stt(){Ea(Yr,"open",function(e){return function(...t){if(ru)try{ru.forEach(r=>r())}catch{}return e.apply(Yr,t)}})}function Ett(e,t,r){e.handleClick(t,r)}class ktt{constructor(t,r,n=wy){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=r.timeout/1e3,this._threshold=r.threshold/1e3,this._scollTimeout=r.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=r.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=_tt(()=>{this._lastMutation=EW()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,r){if(Ttt(r,this._ignoreSelector)||!jtt(t))return;const n={timestamp:KA(t.timestamp),clickBreadcrumb:t,clickCount:0,node:r};this._clicks.some(a=>a.node===n.node&&Math.abs(a.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=KA(t)}registerScroll(t=Date.now()){this._lastScroll=KA(t)}registerClick(t){const r=Lne(t);this._handleMultiClick(r)}_handleMultiClick(t){this._getClicks(t).forEach(r=>{r.clickCount++})}_getClicks(t){return this._clicks.filter(r=>r.node===t)}_checkClicks(){const t=[],r=EW();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=r&&t.push(n)});for(const n of t){const a=this._clicks.indexOf(n);a>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(a,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const r=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,a=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!n&&!a,{clickCount:s,clickBreadcrumb:l}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.slowClickDetected",data:{...l.data,url:Yr.location.href,route:r.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1}};this._addBreadcrumbEvent(r,d);return}if(s>1){const c={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.multiClick",data:{...l.data,url:Yr.location.href,route:r.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(r,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const Ntt=["A","BUTTON","INPUT"];function Ttt(e,t){return!!(!Ntt.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function jtt(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function EW(){return Date.now()/1e3}function Att(e,t){try{if(!Ctt(t))return;const{source:r}=t.data;if(r===sr.Mutation&&e.registerMutation(t.timestamp),r===sr.Scroll&&e.registerScroll(t.timestamp),Ott(t)){const{type:n,id:a}=t.data,i=vu.mirror.getNode(a);i instanceof HTMLElement&&n===ci.Click&&e.registerClick(i)}}catch{}}function Ctt(e){return e.type===ytt}function Ott(e){return e.data.source===sr.MouseInteraction}function dl(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Kw;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Kw||(Kw={}));const Ptt=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Rtt(e){const t={};for(const r in e)if(Ptt.has(r)){let n=r;
1377(r==="data-testid"||r==="data-test-id")&&(n="testId"),t[n]=e[r]}return t}const Itt=e=>t=>{if(!e.isEnabled())return;const r=Ftt(t);if(!r)return;const n=t.name==="click",a=n?t.event:void 0;n&&e.clickDetector&&a&&a.target&&!a.altKey&&!a.metaKey&&!a.ctrlKey&&!a.shiftKey&&Ett(e.clickDetector,r,$ne(t.event)),wy(e,r)};function Une(e,t){const r=vu.mirror.getId(e),n=r&&vu.mirror.getNode(r),a=n&&vu.mirror.getMeta(n),i=a&&Dtt(a)?a:null;return{message:t,data:i?{nodeId:r,node:{id:r,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===Kw.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:Rtt(i.attributes)}}:{}}}function Ftt(e){const{target:t,message:r}=Mtt(e);return dl({category:`ui.${e.name}`,...Une(t,r)})}function Mtt(e){const t=e.name==="click";let r,n=null;try{n=t?$ne(e.event):Bne(e.event),r=Ou(n,{maxStringLength:200})||"<unknown>"}catch{r="<unknown>"}return{target:n,message:r}}function Dtt(e){return e.type===Kw.Element}function Ltt(e,t){if(!e.isEnabled())return;e.updateUserActivity();const r=$tt(t);r&&wy(e,r)}function $tt(e){const{metaKey:t,shiftKey:r,ctrlKey:n,altKey:a,key:i,target:s}=e;if(!s||Btt(s)||!i)return null;const l=t||n||a,c=i.length===1;if(!l&&c)return null;const u=Ou(s,{maxStringLength:200})||"<unknown>",d=Une(s,u);return dl({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:r,ctrlKey:n,altKey:a,key:i}})}function Btt(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const kW={resource:Wtt,paint:Htt,navigation:qtt};function Utt(e){return e.map(ztt).filter(Boolean)}function ztt(e){return kW[e.entryType]?kW[e.entryType](e):null}function zp(e){return((ps||Yr.performance.timeOrigin)+e)/1e3}function Htt(e){const{duration:t,entryType:r,name:n,startTime:a}=e,i=zp(a);return{type:r,name:n,start:i,end:i+t,data:void 0}}function qtt(e){const{entryType:t,name:r,decodedBodySize:n,duration:a,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:l,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:f,redirectCount:p,startTime:m,transferSize:x,type:y}=e;return a===0?null:{type:`${t}.${y}`,start:zp(m),end:zp(i),name:r,data:{size:x,decodedBodySize:n,encodedBodySize:s,duration:a,domInteractive:u,domContentLoadedEventStart:l,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:f,domComplete:i,redirectCount:p}}}function Wtt(e){const{entryType:t,initiatorType:r,name:n,responseEnd:a,startTime:i,decodedBodySize:s,encodedBodySize:l,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:zp(i),end:zp(a),name:n,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:l}}}function Vtt(e){const t=e.entries,r=t[t.length-1],n=r?r.element:void 0,a=e.value,i=zp(a);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:a,size:a,nodeId:n?vu.mirror.getId(n):void 0}}}function Gtt(e){function t(a){e.performanceEntries.includes(a)||e.performanceEntries.push(a)}function r({entries:a}){a.forEach(t)}const n=[];return["navigation","paint","resource"].forEach(a=>{n.push(Dp(a,r))}),n.push(lne(({metric:a})=>{e.replayPerformanceEntries.push(Vtt(a))})),()=>{n.forEach(a=>a())}}const Ur=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ktt='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))}
vendor: 4,465 bytes, line 1377
1377,M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;
1377++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Ytt(){const e=new Blob([Ktt]);return URL.createObjectURL(e)}function fi(e,t){Ur&&(Ve.info(e),t&&zne(e))}function Wh(e,t){Ur&&(Ve.info(e),t&&setTimeout(()=>{zne(e)},0))}function zne(e){Pu({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}
1377class nF extends Error{constructor(){super(`Event buffer exceeded maximum size of ${X3}.`)}}class Hne{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const r=JSON.stringify(t).length;if(this._totalSize+=r,this._totalSize>X3)throw new nF;this.events.push(t)}finish(){return new Promise(t=>{const r=this.events;this.clear(),t(JSON.stringify(r))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(r=>r.timestamp).sort()[0];return t?rF(t):null}}class Xtt{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,r)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():r()},{once:!0}),this._worker.addEventListener("error",n=>{r(n)},{once:!0})}),this._ensureReadyPromise)}destroy(){fi("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,r){const n=this._getAndIncrementId();return new Promise((a,i)=>{const s=({data:l})=>{const c=l;if(c.method===t&&c.id===n){if(this._worker.removeEventListener("message",s),!c.success){Ur&&Ve.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}a(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:t,arg:r})})}_getAndIncrementId(){return this._id++}}class Jtt{constructor(t){this._worker=new Xtt(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const r=rF(t.timestamp);(!this._earliestTimestamp||r<this._earliestTimestamp)&&(this._earliestTimestamp=r);const n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>X3?Promise.reject(new nF):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ur&&Ve.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Qtt{constructor(t){this._fallback=new Hne,this._compression=new Jtt(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{fi("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:r}=this._fallback,n=[];for(const a of t)n.push(this._compression.addEvent(a));this._compression.hasCheckout=r,this._used=this._compression;try{await Promise.all(n)}catch(a){Ur&&Ve.warn("[Replay] Failed to add events when switching buffers.",a)}}}function Ztt({useCompression:e,workerUrl:t}){if(e&&window.Worker){const r=ert(t);if(r)return r}return fi("[Replay] Using simple buffer"),new Hne}function ert(e){try{const t=e||trt();if(!t)return;fi(`[Replay] Using compression worker${e?` from ${e}`:""}`);const r=new Worker(t);return new Qtt(r)}catch{fi("[Replay] Failed to create compression worker")}}function trt(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ytt():""}function aF(){try{return"sessionStorage"in Yr&&!!Yr.sessionStorage}catch{return!1}}function rrt(e){nrt(),e.session=void 0}function nrt(){if(aF())try{Yr.sessionStorage.removeItem(K3)}catch{}}function qne(e){return e===void 0?!1:Math.random()<e}function Wne(e){const t=Date.now(),r=e.id||An(),n=e.started||t,a=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,l=e.previousSessionId;return{id:r,started:n,lastActivity:a,segmentId:i,sampled:s,previousSessionId:l}}function iF(e){if(aF())try{Yr.sessionStorage.setItem(K3,JSON.stringify(e))}catch{}}function art(e,t){return qne(e)?"session":t?"buffer":!1}function NW({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){const a=art(e,t),i=Wne({sampled:a,previousSessionId:n});return r&&iF(i),i}function irt(e){if(!aF())return null;try{const t=Yr.sessionStorage.getItem(K3);if(!t)return null;const r=JSON.parse(t);return Wh("[Replay] Loading existing session",e),Wne(r)}catch{return null}}function iR(e,t,r=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=r}function Vne(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return iR(e.started,t,n)||iR(e.lastActivity,r,n)}function Gne(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!(!Vne(e,{sessionIdleExpire:t,maxReplayDuration:r})||e.sampled==="buffer"&&e.segmentId===0)}function YA({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:r,previousSessionId:n},a){const i=a.stickySession&&irt(e);return i?Gne(i,{sessionIdleExpire:t,maxReplayDuration:r})?(Wh("[Replay] Session in sessionStorage is expired, creating new one..."),NW(a,{previousSessionId:i.id})):i:(Wh("[Replay] Creating new session",e),NW(a,{previousSessionId:n}))}function srt(e){return e.type===ir.Custom}function sF(e,t,r){return Yne(e,t)?(Kne(e,t,r),!0):!1}function ort(e,t,r){return Yne(e,t)?Kne(e,t,r):Promise.resolve(null)}async function Kne(e,t,r){if(!e.eventBuffer)return null;try{r&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),r&&(e.eventBuffer.hasCheckout=!0);const n=e.getOptions(),a=lrt(t,n.beforeAddRecordingEvent);return a?await e.eventBuffer.addEvent(a):void 0}catch(n){const a=n&&n instanceof nF?"addEventSizeExceeded":"addEvent";Ur&&Ve.error(n),await e.stop({reason:a});const i=Mr();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}
1377function Yne(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const r=rF(t.timestamp);return r+e.timeouts.sessionIdlePause<Date.now()?!1:r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(fi(`[Replay] Skipping event with timestamp ${r} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function lrt(e,t){try{if(typeof t=="function"&&srt(e))return t(e)}catch(r){return Ur&&Ve.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",r),null}return e}function oF(e){return!e.type}function sR(e){return e.type==="transaction"}function crt(e){return e.type==="replay_event"}function TW(e){return e.type==="feedback"}function Xne(e){const t=frt();return(r,n)=>{if(!e.isEnabled()||!oF(r)&&!sR(r))return;const a=n&&n.statusCode;if(!(t&&(!a||a<200||a>=300))){if(sR(r)){urt(e,r);return}drt(e,r)}}}function urt(e,t){const r=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}function drt(e,t){const r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:n}=e.getOptions();typeof n=="function"&&!n(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function frt(){const e=Mr();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function hrt(e){return t=>{!e.isEnabled()||!oF(t)||prt(e,t)}}function prt(e,t){const r=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof r=="string"&&(r.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const n=dl({category:"replay.hydrate-error"});wy(e,n)}}function mrt(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function grt(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:ir.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function xrt(e,t){return e.recordingMode!=="buffer"||t.message===Y3||!t.exception||t.type?!1:qne(e.getOptions().errorSampleRate)}function yrt(e,t=!1){const r=t?Xne(e):void 0;return Object.assign((n,a)=>e.isEnabled()?crt(n)?(delete n.breadcrumbs,n):!oF(n)&&!sR(n)&&!TW(n)||!e.checkAndHandleExpiredSession()?n:TW(n)?(e.flush(),n.contexts.feedback.replay_id=e.getSessionId(),grt(e,n),n):mrt(n,a)&&!e.getOptions()._experiments.captureExceptions?(Ur&&Ve.log("[Replay] Ignoring error from rrweb internals",n),null):((xrt(e,n)||e.recordingMode==="session")&&(n.tags={...n.tags,replayId:e.getSessionId()}),r&&r(n,{statusCode:200}),n):n,{id:"Replay"})}function AS(e,t){return t.map(({type:r,start:n,end:a,name:i,data:s})=>{const l=e.throttledAddEvent({type:ir.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:r,description:i,startTimestamp:n,endTimestamp:a,data:s}}});return typeof l=="string"?Promise.resolve(null):l})}function vrt(e){const{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}function brt(e){return t=>{if(!e.isEnabled())return;const r=vrt(t);r!==null&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(AS(e,[r]),!1)))}}function wrt(e,t){return Ur&&e.getOptions()._experiments.traceInternals?!1:JXe(t,Mr())}function CS(e,t){e.isEnabled()&&t!==null&&(wrt(e,t.name)||e.addUpdate(()=>(AS(e,[t]),!0)))}function _rt(e){const{startTimestamp:t,endTimestamp:r,fetchData:n,response:a}=e;if(!r)return null;const{method:i,url:s}=n;return{type:"resource.fetch",start:t/1e3,end:r/1e3,name:s,data:{method:i,statusCode:a?a.status:void 0}}}function Srt(e){return t=>{if(!e.isEnabled())return;const r=_rt(t);CS(e,r)}}function Ert(e){const{startTimestamp:t,endTimestamp:r,xhr:n}=e,a=n[pu];if(!t||!r||!a)return null;const{method:i,url:s,status_code:l}=a;return s===void 0?null:{type:"resource.xhr",name:s,start:t/1e3,end:r/1e3,data:{method:i,statusCode:l}}
1377}function krt(e){return t=>{if(!e.isEnabled())return;const r=Ert(t);CS(e,r)}}function OS(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const r=eae(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Jne(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Qne(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[eae(e)];if(!e)return[void 0]}catch{return Ur&&Ve.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ur&&Ve.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Yw(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const r={...e._meta},n=r.warnings||[];return r.warnings=[...n,t],e._meta=r,e}function Zne(e,t){if(!t)return null;const{startTimestamp:r,endTimestamp:n,url:a,method:i,statusCode:s,request:l,response:c}=t;return{type:e,start:r/1e3,end:n/1e3,name:a,data:wi({method:i,statusCode:s,request:l,response:c})}}function Tx(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function bu(e,t,r){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};const n={headers:e,size:t},{body:a,warnings:i}=Nrt(r);return n.body=a,i&&i.length>0&&(n._meta={warnings:i}),n}function oR(e,t){return Object.keys(e).reduce((r,n)=>{const a=n.toLowerCase();return t.includes(a)&&e[n]&&(r[a]=e[n]),r},{})}function eae(e){return new URLSearchParams(e).toString()}function Nrt(e){if(!e||typeof e!="string")return{body:e};const t=e.length>dW,r=Trt(e);if(t){const n=e.slice(0,dW);return r?{body:n,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${n}â¦`,warnings:["TEXT_TRUNCATED"]}}if(r)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Trt(e){const t=e[0],r=e[e.length-1];return t==="["&&r==="]"||t==="{"&&r==="}"}function Xw(e,t){const r=jrt(e);return pm(r,t)}function jrt(e,t=Yr.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Yr.location.origin))return e;const r=new URL(e,t);if(r.origin!==new URL(t).origin)return e;const n=r.href;return!e.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}async function Art(e,t,r){try{const n=await Ort(e,t,r),a=Zne("resource.fetch",n);CS(r.replay,a)}catch(n){Ur&&Ve.error("[Replay] Failed to capture fetch breadcrumb",n)}}function Crt(e,t,r){const{input:n,response:a}=t,i=n?tae(n):void 0,s=OS(i,r.textEncoder),l=a?Jne(a.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),l!==void 0&&(e.data.response_body_size=l)}async function Ort(e,t,r){const n=Date.now(),{startTimestamp:a=n,endTimestamp:i=n}=t,{url:s,method:l,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,f=Xw(s,r.networkDetailAllowUrls)&&!Xw(s,r.networkDetailDenyUrls),p=f?Prt(r,t.input,u):Tx(u),m=await Rrt(f,r,t.response,d);return{startTimestamp:a,endTimestamp:i,url:s,method:l,statusCode:c,request:p,response:m}}function Prt({networkCaptureBodies:e,networkRequestHeaders:t},r,n){const a=r?Mrt(r,t):{};if(!e)return bu(a,n,void 0);const i=tae(r),[s,l]=Qne(i),c=bu(a,n,s);return l?Yw(c,l):c}async function Rrt(e,{networkCaptureBodies:t,textEncoder:r,networkResponseHeaders:n},a,i){if(!e&&i!==void 0)return Tx(i);const s=a?rae(a.headers,n):{};if(!a||!t&&i!==void 0)return bu(s,i,void 0);const[l,c]=await Frt(a),u=Irt(l,{networkCaptureBodies:t,textEncoder:r,responseBodySize:i,captureDetails:e,headers:s});return c?Yw(u,c):u}function Irt(e,{networkCaptureBodies:t,textEncoder:r,responseBodySize:n,captureDetails:a,headers:i}){try{const s=e&&e.length&&n===void 0?OS(e,r):n;return a?t?bu(i,s,e):bu(i,s,void 0):Tx(s)}catch(s){return Ur&&Ve.warn("[Replay] Failed to serialize response body",s),bu(i,n,void 0)}}async function Frt(e){const t=Drt(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Lrt(t)]}catch(r){return Ur&&Ve.warn("[Replay] Failed to get text body from response",r),[void 0,"BODY_PARSE_ERROR"]}}function tae(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function rae(e,t){const r={};return t.forEach(n=>{e.get(n)&&(r[n]=e.get(n))}),r}
1377function Mrt(e,t){return e.length===1&&typeof e[0]!="string"?jW(e[0],t):e.length===2?jW(e[1],t):{}}function jW(e,t){if(!e)return{};const r=e.headers;return r?r instanceof Headers?rae(r,t):Array.isArray(r)?{}:oR(r,t):{}}function Drt(e){try{return e.clone()}catch(t){Ur&&Ve.warn("[Replay] Failed to clone response body",t)}}function Lrt(e){return new Promise((t,r)=>{const n=setTimeout(()=>r(new Error("Timeout while trying to read response body")),500);$rt(e).then(a=>t(a),a=>r(a)).finally(()=>clearTimeout(n))})}async function $rt(e){return await e.text()}async function Brt(e,t,r){try{const n=zrt(e,t,r),a=Zne("resource.xhr",n);CS(r.replay,a)}catch(n){Ur&&Ve.error("[Replay] Failed to capture xhr breadcrumb",n)}}function Urt(e,t,r){const{xhr:n,input:a}=t;if(!n)return;const i=OS(a,r.textEncoder),s=n.getResponseHeader("content-length")?Jne(n.getResponseHeader("content-length")):Vrt(n.response,n.responseType,r.textEncoder);i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}function zrt(e,t,r){const n=Date.now(),{startTimestamp:a=n,endTimestamp:i=n,input:s,xhr:l}=t,{url:c,method:u,status_code:d=0,request_body_size:f,response_body_size:p}=e.data;if(!c)return null;if(!l||!Xw(c,r.networkDetailAllowUrls)||Xw(c,r.networkDetailDenyUrls)){const E=Tx(f),T=Tx(p);return{startTimestamp:a,endTimestamp:i,url:c,method:u,statusCode:d,request:E,response:T}}const m=l[pu],x=m?oR(m.request_headers,r.networkRequestHeaders):{},y=oR(Hrt(l),r.networkResponseHeaders),[v,b]=r.networkCaptureBodies?Qne(s):[void 0],[w,S]=r.networkCaptureBodies?qrt(l):[void 0],j=bu(x,f,v),k=bu(y,p,w);return{startTimestamp:a,endTimestamp:i,url:c,method:u,statusCode:d,request:b?Yw(j,b):j,response:S?Yw(k,S):k}}function Hrt(e){const t=e.getAllResponseHeaders();return t?t.split(`\r 1378`).reduce((r,n)=>{const[a,i]=n.split(": ");return r[a.toLowerCase()]=i,r},{}):{}}function qrt(e){const t=[];try{return[e.responseText]}catch(r){t.push(r)}try{return Wrt(e.response,e.responseType)}catch(r){t.push(r)}return Ur&&Ve.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function Wrt(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return Ur&&Ve.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ur&&Ve.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Vrt(e,t,r){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return OS(n,r)}catch{return}}function Grt(e){const t=Mr();try{const r=new TextEncoder,{networkDetailAllowUrls:n,networkDetailDenyUrls:a,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:l}=e.getOptions(),c={replay:e,textEncoder:r,networkDetailAllowUrls:n,networkDetailDenyUrls:a,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:l};t&&t.on?t.on("beforeAddBreadcrumb",(u,d)=>Krt(c,u,d)):(O3(Srt(e)),P3(krt(e)))}catch{}}function Krt(e,t,r){if(t.data)try{Yrt(t)&&Jrt(r)&&(Urt(t,r,e),Brt(t,r,e)),Xrt(t)&&Qrt(r)&&(Crt(t,r,e),Art(t,r,e))}catch{Ur&&Ve.warn("Error when enriching network breadcrumb")}}function Yrt(e){return e.category==="xhr"}function Xrt(e){return e.category==="fetch"}function Jrt(e){return e&&e.xhr}function Qrt(e){return e&&e.response}let AW=null;function Zrt(e){return!!e.category}const ent=e=>t=>{if(!e.isEnabled())return;const r=tnt(t);r&&wy(e,r)};function tnt(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return AW===t||!t||(AW=t,!Zrt(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?rnt(t):dl(t)}function rnt(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return dl(e);let r=!1;const n=t.map(a=>{if(!a)return a;if(typeof a=="string")return a.length>Ob?(r=!0,`${a.slice(0,Ob)}â¦`):a;if(typeof a=="object")try{const i=rl(a,7);return JSON.stringify(i).length>Ob?(r=!0,`${JSON.stringify(i,null,2).slice(0,Ob)}â¦`):i}catch{}return a});return dl({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function nnt(e){const t=gs(),r=Mr();t.addScopeListener(ent(e)),bre(Itt(e)),vS(brt(e)),Grt(e);const n=yrt(e,!CW(r));r&&r.addEventProcessor?r.addEventProcessor(n):qXe(n),CW(r)&&(r.on("beforeSendEvent",hrt(e)),r.on("afterSendEvent",Xne(e)),r.on("createDsc",a=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(a.replay_id=i)}),r.on("startTransaction",a=>{e.lastTransaction=a}),r.on("finishTransaction",a=>{e.lastTransaction=a}),r.on("beforeSendFeedback",(a,i)=>{const s=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&s&&a.contexts&&a.contexts.feedback&&(a.contexts.feedback.replay_id=s)}))}function CW(e){return!!(e&&e.on)}async function ant(e){try{return Promise.all(AS(e,[int(Yr.performance.memory)]))}catch{return[]}}function int(e){const{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,a=Date.now()/1e3;return{type:"memory",name:"memory",start:a,end:a,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}function snt(e,t,r){let n,a,i;const s=r&&r.maxWait?Math.max(r.maxWait,t):0;function l(){return c(),n=e(),n}function c(){a!==void 0&&clearTimeout(a),i!==void 0&&clearTimeout(i),a=i=void 0}function u(){return a!==void 0||i!==void 0?l():n}function d(){return a&&clearTimeout(a),a=setTimeout(l,t),s&&i===void 0&&(i=setTimeout(l,s)),n}return d.cancel=c,d.flush=u,d}function ont(e){let t=!1;return(r,n)=>{if(!e.checkAndHandleExpiredSession()){Ur&&Ve.warn("[Replay] Received replay event after session expired.");return}const a=n||!t;t=!0,e.clickDetector&&Att(e.clickDetector,r),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&a&&e.setInitialState(),!sF(e,r,a))return!0;
1378if(!a)return!1;if(cnt(e,a),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(fi(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&iF(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function lnt(e){const t=e.getOptions();return{type:ir.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function cnt(e,t){!t||!e.session||e.session.segmentId!==0||sF(e,lnt(e),!1)}function unt(e,t,r,n){return Vu(jre(e,F3(e),n,r),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function dnt({recordingData:e,headers:t}){let r;const n=`${JSON.stringify(t)} 1379`;if(typeof e=="string")r=`${n}${e}`;else{const i=new TextEncoder().encode(n);r=new Uint8Array(i.length+e.length),r.set(i),r.set(e,i.length)}return r}async function fnt({client:e,scope:t,replayId:r,event:n}){const a=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:r,integrations:a};e.emit&&e.emit("preprocessEvent",n,i);const s=await Ire(e.getOptions(),n,i,t,e,Gu());if(!s)return null;s.platform=s.platform||"javascript";const l=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:u}=l&&l.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}async function hnt({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:a,session:i}
1379){const s=dnt({recordingData:e,headers:{segment_id:r}}),{urls:l,errorIds:c,traceIds:u,initialTimestamp:d}=n,f=Mr(),p=gs(),m=f&&f.getTransport(),x=f&&f.getDsn();if(!f||!m||!x||!i.sampled)return;const y={type:YZe,replay_start_timestamp:d/1e3,timestamp:a/1e3,error_ids:c,trace_ids:u,urls:l,replay_id:t,segment_id:r,replay_type:i.sampled},v=await fnt({scope:p,client:f,replayId:t,event:y});if(!v){f.recordDroppedEvent("event_processor","replay",y),fi("An event processor returned `null`, will not send event.");return}delete v.sdkProcessingMetadata;const b=unt(v,s,x,f.getOptions().tunnel);let w;try{w=await m.send(b)}catch(j){const k=new Error(Y3);try{k.cause=j}catch{}throw k}if(!w)return w;if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new nae(w.statusCode);const S=Cre({},w);if(Are(S,"replay"))throw new aae(S);return w}class nae extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class aae extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function iae(e,t={count:0,interval:tet}){const{recordingData:r,options:n}=e;if(r.length)try{return await hnt(e),!0}catch(a){if(a instanceof nae||a instanceof aae)throw a;if(eXe("Replays",{_retryCount:t.count}),Ur&&n._experiments&&n._experiments.captureExceptions&&$3(a),t.count>=ret){const i=new Error(`${Y3} - max retries exceeded`);try{i.cause=a}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{setTimeout(async()=>{try{await iae(e,t),i(!0)}catch(l){s(l)}},t.interval)})}}const sae="__THROTTLED",pnt="__SKIPPED";function mnt(e,t,r){const n=new Map,a=l=>{const c=l-r;
1379n.forEach((u,d)=>{d<c&&n.delete(d)})},i=()=>[...n.values()].reduce((l,c)=>l+c,0);let s=!1;return(...l)=>{const c=Math.floor(Date.now()/1e3);if(a(c),i()>=t){const d=s;return s=!0,d?pnt:sae}s=!1;const u=n.get(c)||0;return n.set(c,u+1),e(...l)}}class nu{constructor({options:t,recordingOptions:r}){nu.prototype.__init.call(this),nu.prototype.__init2.call(this),nu.prototype.__init3.call(this),nu.prototype.__init4.call(this),nu.prototype.__init5.call(this),nu.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:XZe,sessionIdleExpire:JZe},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=r,this._options=t,this._debouncedFlush=snt(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=mnt((s,l)=>ort(this,s,l),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:a}=this.getOptions(),i=n?{threshold:Math.min(net,n),timeout:n,scrollTimeout:aet,ignoreSelector:a?a.join(","):""}:void 0;i&&(this.clickDetector=new ktt(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:r,sessionSampleRate:n}=this._options;if(!(r<=0&&n<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Wh(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Wh("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const t=YA({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Wh("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=YA({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=vu({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:eet},emit:ont(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:r}={}){if(this._isEnabled){this._isEnabled=!1;try{fi(`[Replay] Stopping Replay${r?` triggered by ${r}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,rrt(this)}catch(n){this._handleException(n)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),fi("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),fi("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const r=Date.now();
1379fi("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();!t||!n||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(r),this._updateSessionActivity(r),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const r=t();this.recordingMode!=="buffer"&&r!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&iR(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Yr.location.pathname}${Yr.location.hash}${Yr.location.search}`,r=`${Yr.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=r,this._context.initialTimestamp=Date.now(),this._context.urls.push(r)}throttledAddEvent(t,r){const n=this._throttledAddEvent(t,r);if(n===sae){const a=dl({category:"replay.throttled"});this.addUpdate(()=>!sF(this,{type:vtt,timestamp:a.timestamp||0,data:{tag:"breadcrumb",payload:a,metric:!0}}))}return n}getCurrentRoute(){const t=this.lastTransaction||gs().getTransaction(),n=(t&&Un(t).data||{})[oc];if(!(!t||!n||!["route","custom"].includes(n)))return Un(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ztt({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){Ur&&Ve.error("[Replay]",t),Ur&&this._options._experiments&&this._options._experiments.captureExceptions&&$3(t)}_initializeSessionForSampling(t){const r=this._options.errorSampleRate>0,n=YA({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:r});this.session=n}_checkSession(){if(!this.session)return!1;const t=this.session;return Gne(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Yr.document.addEventListener("visibilitychange",this._handleVisibilityChange),Yr.addEventListener("blur",this._handleWindowBlur),Yr.addEventListener("focus",this._handleWindowFocus),Yr.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(nnt(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=Gtt(this)}_removeListeners(){try{Yr.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Yr.removeEventListener("blur",this._handleWindowBlur),Yr.removeEventListener("focus",this._handleWindowFocus),Yr.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{Yr.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=dl({category:"ui.blur"});
1379this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=dl({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{Ltt(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Vne(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){fi("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:ir.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=Utt(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(AS(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:r}=this;if(!t||!r||t.segmentId)return;const n=r.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ur&&Ve.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await ant(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),a=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await iae({replayId:t,recordingData:i,segmentId:a,eventContext:n,session:this.session,options:this.getOptions(),timestamp:r})}catch(r){this._handleException(r),this.stop({reason:"sendReplay"});const n=Mr();n&&n.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ur&&Ve.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const r=this.session.started,a=Date.now()-r;this._debouncedFlush.cancel();const i=a<this._options.minReplayDuration,s=a>this._options.maxReplayDuration+5e3;if(i||s){fi(`[Replay] Session duration (${Math.floor(a/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const l=this.eventBuffer;if(l&&this.session.segmentId===0&&!l.hasCheckout&&fi("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){Ur&&Ve.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&iF(this.session)}__init6(){this._onMutationHandler=t=>{const r=t.length,n=this._options.mutationLimit,a=this._options.mutationBreadcrumbLimit,i=n&&r>n;if(r>a||i){const s=dl({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(s)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function C0(e,t,r,n){const a=typeof n=="string"?n.split(","):[],i=[...e,...a,...t];return typeof r<"u"&&(typeof r=="string"&&i.push(`.${r}`),lf(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function gnt({mask:e,unmask:t,block:r,unblock:n,ignore:a,blockClass:i,blockSelector:s,maskTextClass:l,maskTextSelector:c,ignoreClass:u}){const d=['base[href="/"]'],f=C0(e,[".sentry-mask","[data-sentry-mask]"],l,c),p=C0(t,[".sentry-unmask","[data-sentry-unmask]"]),m={maskTextSelector:f,unmaskTextSelector:p,blockSelector:C0(r,[".sentry-block","[data-sentry-block]",...d],i,s),unblockSelector:C0(n,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:C0(a,[".sentry-ignore","[data-sentry-ignore]",'
1379input[type="file"]'],u)};return i instanceof RegExp&&(m.blockClass=i),l instanceof RegExp&&(m.maskTextClass=l),m}function xnt({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:a,value:i}){return!n||a.unmaskTextSelector&&e.matches(a.unmaskTextSelector)?i:r.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const OW='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',ynt=["content-length","content-type","accept"];let PW=!1;const vnt=(e=>new PS(e));class PS{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=QZe,flushMaxDelay:r=ZZe,minReplayDuration:n=iet,maxReplayDuration:a=fW,stickySession:i=!0,useCompression:s=!0,workerUrl:l,_experiments:c={},sessionSampleRate:u,errorSampleRate:d,maskAllText:f=!0,maskAllInputs:p=!0,blockAllMedia:m=!0,mutationBreadcrumbLimit:x=750,mutationLimit:y=1e4,slowClickTimeout:v=7e3,slowClickIgnoreSelectors:b=[],networkDetailAllowUrls:w=[],networkDetailDenyUrls:S=[],networkCaptureBodies:j=!0,networkRequestHeaders:k=[],networkResponseHeaders:E=[],mask:T=[],maskAttributes:O=["title","placeholder"],unmask:A=[],block:P=[],unblock:I=[],ignore:R=[],maskFn:M,beforeAddRecordingEvent:L,beforeErrorSampling:U,blockClass:W,blockSelector:V,maskInputOptions:G,maskTextClass:K,maskTextSelector:F,ignoreClass:ne}={}){this.name=PS.id;const H=gnt({mask:T,unmask:A,block:P,unblock:I,ignore:R,blockClass:W,blockSelector:V,maskTextClass:K,maskTextSelector:F,ignoreClass:ne});if(this._recordingOptions={maskAllInputs:p,maskAllText:f,maskInputOptions:{...G||{},password:!0},maskTextFn:M,maskInputFn:M,maskAttributeFn:(B,X,Y)=>xnt({maskAttributes:O,maskAllText:f,privacyOptions:H,key:B,value:X,el:Y}),...H,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:B=>{try{B.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:r,minReplayDuration:Math.min(n,set),maxReplayDuration:Math.min(a,fW),stickySession:i,sessionSampleRate:u,errorSampleRate:d,useCompression:s,workerUrl:l,blockAllMedia:m,maskAllInputs:p,maskAllText:f,mutationBreadcrumbLimit:x,mutationLimit:y,slowClickTimeout:v,slowClickIgnoreSelectors:b,networkDetailAllowUrls:w,networkDetailDenyUrls:S,networkCaptureBodies:j,networkRequestHeaders:RW(k),networkResponseHeaders:RW(E),beforeAddRecordingEvent:L,beforeErrorSampling:U,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration. 1380This option is deprecated and will be removed soon. 1381Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.: 1382Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof d=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration. 1383This option is deprecated and will be removed soon. 1384Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.: 1385Sentry.init({ replaysOnErrorSampleRate: ${d} })`),this._initialOptions.errorSampleRate=d),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${OW}`:OW),this._isInitialized&&Rq())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return PW}set _isInitialized(t){PW=t}setupOnce(){Rq()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=bnt(this._initialOptions);this._replay=new nu({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const r=Mr().getIntegrationByName("ReplayCanvas");if(!r)return;this._replay._canvas=r.getOptions()}catch{}}}PS.__initStatic();function bnt(e){const t=Mr(),r=t&&t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...wi(e)};return r?(e.sessionSampleRate==null&&e.errorSampleRate==null&&r.replaysSessionSampleRate==null&&r.replaysOnErrorSampleRate==null&&lf(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof r.replaysSessionSampleRate=="number"&&(n.sessionSampleRate=r.replaysSessionSampleRate),typeof r.replaysOnErrorSampleRate=="number"&&(n.errorSampleRate=r.replaysOnErrorSampleRate),n):(lf(()=>{console.warn("SDK client is not available.")}),n)}function RW(e){return[...ynt,...e.map(t=>t.toLowerCase())]}function wnt(e){const t={...e};ene(t,"react"),GZe(t)}function _nt(){wnt({dsn:"https://0318fe93b7cc78f0001332cc3f4b0058@o4510043217330176.ingest.us.sentry.io/4510043219689472",environment:"production",integrations:[bQe(),vnt
1385({sessionSampleRate:.1,errorSampleRate:1})],tracesSampleRate:.1,release:"1.0.0",ignoreErrors:["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications","NetworkError","Network request failed"],beforeSend(e,t){var r;return(r=e.request)!=null&&r.cookies&&delete e.request.cookies,e}})}_nt();rse.createRoot(document.getElementById("root")).render(o.jsx(se.StrictMode,{children:o.jsx(UW,{children:o.jsx(TKe,{})})}))});export default Snt();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.