var Dee=Object.defineProperty;var UM=e=>{throw TypeError(e)};var Fee=(e,t,n)=>t in e?Dee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var or=(e,t,n)=>Fee(e,typeof t!="symbol"?t+"":t,n),TS=(e,t,n)=>t.has(e)||UM("Cannot "+n);var ge=(e,t,n)=>(TS(e,t,"read from private field"),n?n.call(e):t.get(e)),Dt=(e,t,n)=>t.has(e)?UM("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ft=(e,t,n,r)=>(TS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),yn=(e,t,n)=>(TS(e,t,"access private method"),n);var dx=(e,t,n,r)=>({set _(i){ft(e,t,i,n)},get _(){return ge(e,t,r)}});function Bee(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var hx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var MS={exports:{}},Vy={},LS={exports:{}},Sn={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var zM;function $ee(){if(zM)return Sn;zM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function g(te){return te===null||typeof te!="object"?null:(te=h&&te[h]||te["@@iterator"],typeof te=="function"?te:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function x(te,$,q){this.props=te,this.context=$,this.refs=y,this.updater=q||m}x.prototype.isReactComponent={},x.prototype.setState=function(te,$){if(typeof te!="object"&&typeof te!="function"&&te!=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,te,$,"setState")},x.prototype.forceUpdate=function(te){this.updater.enqueueForceUpdate(this,te,"forceUpdate")};function w(){}w.prototype=x.prototype;function _(te,$,q){this.props=te,this.context=$,this.refs=y,this.updater=q||m}var k=_.prototype=new w;k.constructor=_,b(k,x.prototype),k.isPureReactComponent=!0;var P=Array.isArray,C=Object.prototype.hasOwnProperty,j={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function R(te,$,q){var re,le={},de=null,pe=null;if($!=null)for(re in $.ref!==void 0&&(pe=$.ref),$.key!==void 0&&(de=""+$.key),$)C.call($,re)&&!L.hasOwnProperty(re)&&(le[re]=$[re]);var ve=arguments.length-2;if(ve===1)le.children=q;else if(1<ve){for(var he=Array(ve),xe=0;xe<ve;xe++)he[xe]=arguments[xe+2];le.children=he}if(te&&te.defaultProps)for(re in ve=te.defaultProps,ve)le[re]===void 0&&(le[re]=ve[re]);return{$$typeof:e,type:te,key:de,ref:pe,props:le,_owner:j.current}}function D(te,$){return{$$typeof:e,type:te.type,key:$,ref:te.ref,props:te.props,_owner:te._owner}}function H(te){return typeof te=="object"&&te!==null&&te.$$typeof===e}function M(te){var $={"=":"=0",":":"=2"};return"$"+te.replace(/[=:]/g,function(q){return $[q]})}var F=/\/+/g;function W(te,$){return typeof te=="object"&&te!==null&&te.key!=null?M(""+te.key):$.toString(36)}function V(te,$,q,re,le){var de=typeof te;(de==="undefined"||de==="boolean")&&(te=null);var pe=!1;if(te===null)pe=!0;else switch(de){case"string":case"number":pe=!0;break;case"object":switch(te.$$typeof){case e:case t:pe=!0}}if(pe)return pe=te,le=le(pe),te=re===""?"."+W(pe,0):re,P(le)?(q="",te!=null&&(q=te.replace(F,"$&/")+"/"),V(le,$,q,"",function(xe){return xe})):le!=null&&(H(le)&&(le=D(le,q+(!le.key||pe&&pe.key===le.key?"":(""+le.key).replace(F,"$&/")+"/")+te)),$.push(le)),1;if(pe=0,re=re===""?".":re+":",P(te))for(var ve=0;ve<te.length;ve++){de=te[ve];var he=re+W(de,ve);pe+=V(de,$,q,he,le)}else if(he=g(te),typeof he=="function")for(te=he.call(te),ve=0;!(de=te.next()).done;)de=de.value,he=re+W(de,ve++),pe+=V(de,$,q,he,le);else if(de==="object")throw $=String(te),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(te).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.");return pe}function X(te,$,q){if(te==null)return te;var re=[],le=0;return V(te,re,"","",function(de){return $.call(q,de,le++)}),re}function Y(te){if(te._status===-1){var $=te._result;$=$(),$.then(function(q){(te._status===0||te._status===-1)&&(te._status=1,te._result=q)},function(q){(te._status===0||te._status===-1)&&(te._status=2,te._result=q)}),te._status===-1&&(te._status=0,te._result=$)}if(te._status===1)return te._result.default;throw te._result}var Z={current:null},K={transition:null},se={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:K,ReactCurrentOwner:j};function z(){throw Error("act(...) is not supported in production builds of React.")}return Sn.Children={map:X,forEach:function(te,$,q){X(te,function(){$.apply(this,arguments)},q)},count:function(te){var $=0;return X(te,function(){$++}),$},toArray:function(te){return X(te,function($){return $})||[]},only:function(te){if(!H(te))throw Error("React.Children.only expected to receive a single React element child.");return te}},Sn.Component=x,Sn.Fragment=n,Sn.Profiler=i,Sn.PureComponent=_,Sn.StrictMode=r,Sn.Suspense=l,Sn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Sn.act=z,Sn.cloneElement=function(te,$,q){if(te==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+te+".");var re=b({},te.props),le=te.key,de=te.ref,pe=te._owner;if($!=null){if($.ref!==void 0&&(de=$.ref,pe=j.current),$.key!==void 0&&(le=""+$.key),te.type&&te.type.defaultProps)var ve=te.type.defaultProps;for(he in $)C.call($,he)&&!L.hasOwnProperty(he)&&(re[he]=$[he]===void 0&&ve!==void 0?ve[he]:$[he])}var he=arguments.length-2;if(he===1)re.children=q;else if(1<he){ve=Array(he);for(var xe=0;xe<he;xe++)ve[xe]=arguments[xe+2];re.children=ve}return{$$typeof:e,type:te.type,key:le,ref:de,props:re,_owner:pe}},Sn.createContext=function(te){return te={$$typeof:o,_currentValue:te,_currentValue2:te,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},te.Provider={$$typeof:a,_context:te},te.Consumer=te},Sn.createElement=R,Sn.createFactory=function(te){var $=R.bind(null,te);return $.type=te,$},Sn.createRef=function(){return{current:null}},Sn.forwardRef=function(te){return{$$typeof:s,render:te}},Sn.isValidElement=H,Sn.lazy=function(te){return{$$typeof:f,_payload:{_status:-1,_result:te},_init:Y}},Sn.memo=function(te,$){return{$$typeof:c,type:te,compare:$===void 0?null:$}},Sn.startTransition=function(te){var $=K.transition;K.transition={};try{te()}finally{K.transition=$}},Sn.unstable_act=z,Sn.useCallback=function(te,$){return Z.current.useCallback(te,$)},Sn.useContext=function(te){return Z.current.useContext(te)},Sn.useDebugValue=function(){},Sn.useDeferredValue=function(te){return Z.current.useDeferredValue(te)},Sn.useEffect=function(te,$){return Z.current.useEffect(te,$)},Sn.useId=function(){return Z.current.useId()},Sn.useImperativeHandle=function(te,$,q){return Z.current.useImperativeHandle(te,$,q)},Sn.useInsertionEffect=function(te,$){return Z.current.useInsertionEffect(te,$)},Sn.useLayoutEffect=function(te,$){return Z.current.useLayoutEffect(te,$)},Sn.useMemo=function(te,$){return Z.current.useMemo(te,$)},Sn.useReducer=function(te,$,q){return Z.current.useReducer(te,$,q)},Sn.useRef=function(te){return Z.current.useRef(te)},Sn.useState=function(te){return Z.current.useState(te)},Sn.useSyncExternalStore=function(te,$,q){return Z.current.useSyncExternalStore(te,$,q)},Sn.useTransition=function(){return Z.current.useTransition()},Sn.version="18.3.1",Sn}var VM;function pE(){return VM||(VM=1,LS.exports=$ee()),LS.exports}/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var WM;function qee(){if(WM)return Vy;WM=1;var e=pE(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,c){var f,h={},g=null,m=null;c!==void 0&&(g=""+c),l.key!==void 0&&(g=""+l.key),l.ref!==void 0&&(m=l.ref);for(f in l)r.call(l,f)&&!a.hasOwnProperty(f)&&(h[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)h[f]===void 0&&(h[f]=l[f]);return{$$typeof:t,type:s,key:g,ref:m,props:h,_owner:i.current}}return Vy.Fragment=n,Vy.jsx=o,Vy.jsxs=o,Vy}var HM;function Uee(){return HM||(HM=1,MS.exports=qee()),MS.exports}var d=Uee(),E=pE();const _e=Kn(E),y2=Bee({__proto__:null,default:_e},[E]);var px={},RS={exports:{}},ko={},IS={exports:{}},DS={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var YM;function zee(){return YM||(YM=1,(function(e){function t(K,se){var z=K.length;K.push(se);e:for(;0<z;){var te=z-1>>>1,$=K[te];if(0<i($,se))K[te]=se,K[z]=$,z=te;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var se=K[0],z=K.pop();if(z!==se){K[0]=z;e:for(var te=0,$=K.length,q=$>>>1;te<q;){var re=2*(te+1)-1,le=K[re],de=re+1,pe=K[de];if(0>i(le,z))de<$&&0>i(pe,le)?(K[te]=pe,K[de]=z,te=de):(K[te]=le,K[re]=z,te=re);else if(de<$&&0>i(pe,z))K[te]=pe,K[de]=z,te=de;else break e}}return se}function i(K,se){var z=K.sortIndex-se.sortIndex;return z!==0?z:K.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],c=[],f=1,h=null,g=3,m=!1,b=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(K){for(var se=n(c);se!==null;){if(se.callback===null)r(c);else if(se.startTime<=K)r(c),se.sortIndex=se.expirationTime,t(l,se);else break;se=n(c)}}function P(K){if(y=!1,k(K),!b)if(n(l)!==null)b=!0,Y(C);else{var se=n(c);se!==null&&Z(P,se.startTime-K)}}function C(K,se){b=!1,y&&(y=!1,w(R),R=-1),m=!0;var z=g;try{for(k(se),h=n(l);h!==null&&(!(h.expirationTime>se)||K&&!M());){var te=h.callback;if(typeof te=="function"){h.callback=null,g=h.priorityLevel;var $=te(h.expirationTime<=se);se=e.unstable_now(),typeof $=="function"?h.callback=$:h===n(l)&&r(l),k(se)}else r(l);h=n(l)}if(h!==null)var q=!0;else{var re=n(c);re!==null&&Z(P,re.startTime-se),q=!1}return q}finally{h=null,g=z,m=!1}}var j=!1,L=null,R=-1,D=5,H=-1;function M(){return!(e.unstable_now()-H<D)}function F(){if(L!==null){var K=e.unstable_now();H=K;var se=!0;try{se=L(!0,K)}finally{se?W():(j=!1,L=null)}}else j=!1}var W;if(typeof _=="function")W=function(){_(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,X=V.port2;V.port1.onmessage=F,W=function(){X.postMessage(null)}}else W=function(){x(F,0)};function Y(K){L=K,j||(j=!0,W())}function Z(K,se){R=x(function(){K(e.unstable_now())},se)}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(K){K.callback=null},e.unstable_continueExecution=function(){b||m||(b=!0,Y(C))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(K){switch(g){case 1:case 2:case 3:var se=3;break;default:se=g}var z=g;g=se;try{return K()}finally{g=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,se){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var z=g;g=K;try{return se()}finally{g=z}},e.unstable_scheduleCallback=function(K,se,z){var te=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?te+z:te):z=te,K){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=z+$,K={id:f++,callback:se,priorityLevel:K,startTime:z,expirationTime:$,sortIndex:-1},z>te?(K.sortIndex=z,t(c,K),n(l)===null&&K===n(c)&&(y?(w(R),R=-1):y=!0,Z(P,z-te))):(K.sortIndex=$,t(l,K),b||m||(b=!0,Y(C))),K},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(K){var se=g;return function(){var z=g;g=se;try{return K.apply(this,arguments)}finally{g=z}}}})(DS)),DS}var GM;function Vee(){return GM||(GM=1,IS.exports=zee()),IS.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var KM;function Wee(){if(KM)return ko;KM=1;var e=pE(),t=Vee();function n(u){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+u,v=1;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v]);return"Minified React error #"+u+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function a(u,p){o(u,p),o(u+"Capture",p)}function o(u,p){for(i[u]=p,u=0;u<p.length;u++)r.add(p[u])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,c=/^[: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]*$/,f={},h={};function g(u){return l.call(h,u)?!0:l.call(f,u)?!1:c.test(u)?h[u]=!0:(f[u]=!0,!1)}function m(u,p,v,N){if(v!==null&&v.type===0)return!1;switch(typeof p){case"function":case"symbol":return!0;case"boolean":return N?!1:v!==null?!v.acceptsBooleans:(u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-");default:return!1}}function b(u,p,v,N){if(p===null||typeof p>"u"||m(u,p,v,N))return!0;if(N)return!1;if(v!==null)switch(v.type){case 3:return!p;case 4:return p===!1;case 5:return isNaN(p);case 6:return isNaN(p)||1>p}return!1}function y(u,p,v,N,T,B,J){this.acceptsBooleans=p===2||p===3||p===4,this.attributeName=N,this.attributeNamespace=T,this.mustUseProperty=v,this.propertyName=u,this.type=p,this.sanitizeURL=B,this.removeEmptyString=J}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){x[u]=new y(u,0,!1,u,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var p=u[0];x[p]=new y(p,1,!1,u[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(u){x[u]=new y(u,2,!1,u.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){x[u]=new y(u,2,!1,u,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(u){x[u]=new y(u,3,!1,u.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(u){x[u]=new y(u,3,!0,u,null,!1,!1)}),["capture","download"].forEach(function(u){x[u]=new y(u,4,!1,u,null,!1,!1)}),["cols","rows","size","span"].forEach(function(u){x[u]=new y(u,6,!1,u,null,!1,!1)}),["rowSpan","start"].forEach(function(u){x[u]=new y(u,5,!1,u.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function _(u){return u[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(u){var p=u.replace(w,_);x[p]=new y(p,1,!1,u,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var p=u.replace(w,_);x[p]=new y(p,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(u){var p=u.replace(w,_);x[p]=new y(p,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(u){x[u]=new y(u,1,!1,u.toLowerCase(),null,!1,!1)}),x.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(u){x[u]=new y(u,1,!1,u.toLowerCase(),null,!0,!0)});function k(u,p,v,N){var T=x.hasOwnProperty(p)?x[p]:null;(T!==null?T.type!==0:N||!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(b(p,v,T,N)&&(v=null),N||T===null?g(p)&&(v===null?u.removeAttribute(p):u.setAttribute(p,""+v)):T.mustUseProperty?u[T.propertyName]=v===null?T.type===3?!1:"":v:(p=T.attributeName,N=T.attributeNamespace,v===null?u.removeAttribute(p):(T=T.type,v=T===3||T===4&&v===!0?"":""+v,N?u.setAttributeNS(N,p,v):u.setAttribute(p,v))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for("react.element"),j=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),M=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),K=Symbol.iterator;function se(u){return u===null||typeof u!="object"?null:(u=K&&u[K]||u["@@iterator"],typeof u=="function"?u:null)}var z=Object.assign,te;function $(u){if(te===void 0)try{throw Error()}catch(v){var p=v.stack.trim().match(/\n( *(at )?)/);te=p&&p[1]||""}return`
`+te+u}var q=!1;function re(u,p){if(!u||q)return"";q=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(Le){var N=Le}Reflect.construct(u,[],p)}else{try{p.call()}catch(Le){N=Le}u.call(p.prototype)}else{try{throw Error()}catch(Le){N=Le}u()}}catch(Le){if(Le&&N&&typeof Le.stack=="string"){for(var T=Le.stack.split(`
`),B=N.stack.split(`
`),J=T.length-1,me=B.length-1;1<=J&&0<=me&&T[J]!==B[me];)me--;for(;1<=J&&0<=me;J--,me--)if(T[J]!==B[me]){if(J!==1||me!==1)do if(J--,me--,0>me||T[J]!==B[me]){var we=`
`+T[J].replace(" at new "," at ");return u.displayName&&we.includes("<anonymous>")&&(we=we.replace("<anonymous>",u.displayName)),we}while(1<=J&&0<=me);break}}}finally{q=!1,Error.prepareStackTrace=v}return(u=u?u.displayName||u.name:"")?$(u):""}function le(u){switch(u.tag){case 5:return $(u.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return u=re(u.type,!1),u;case 11:return u=re(u.type.render,!1),u;case 1:return u=re(u.type,!0),u;default:return""}}function de(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case L:return"Fragment";case j:return"Portal";case D:return"Profiler";case R:return"StrictMode";case W:return"Suspense";case V:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case M:return(u.displayName||"Context")+".Consumer";case H:return(u._context.displayName||"Context")+".Provider";case F:var p=u.render;return u=u.displayName,u||(u=p.displayName||p.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case X:return p=u.displayName||null,p!==null?p:de(u.type)||"Memo";case Y:p=u._payload,u=u._init;try{return de(u(p))}catch{}}return null}function pe(u){var p=u.type;switch(u.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=p.render,u=u.displayName||u.name||"",p.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(p);case 8:return p===R?"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 p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function ve(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function he(u){var p=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function xe(u){var p=he(u)?"checked":"value",v=Object.getOwnPropertyDescriptor(u.constructor.prototype,p),N=""+u[p];if(!u.hasOwnProperty(p)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var T=v.get,B=v.set;return Object.defineProperty(u,p,{configurable:!0,get:function(){return T.call(this)},set:function(J){N=""+J,B.call(this,J)}}),Object.defineProperty(u,p,{enumerable:v.enumerable}),{getValue:function(){return N},setValue:function(J){N=""+J},stopTracking:function(){u._valueTracker=null,delete u[p]}}}}function Pe(u){u._valueTracker||(u._valueTracker=xe(u))}function Se(u){if(!u)return!1;var p=u._valueTracker;if(!p)return!0;var v=p.getValue(),N="";return u&&(N=he(u)?u.checked?"true":"false":u.value),u=N,u!==v?(p.setValue(u),!0):!1}function Ue(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function Ye(u,p){var v=p.checked;return z({},p,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??u._wrapperState.initialChecked})}function oe(u,p){var v=p.defaultValue==null?"":p.defaultValue,N=p.checked!=null?p.checked:p.defaultChecked;v=ve(p.value!=null?p.value:v),u._wrapperState={initialChecked:N,initialValue:v,controlled:p.type==="checkbox"||p.type==="radio"?p.checked!=null:p.value!=null}}function Ke(u,p){p=p.checked,p!=null&&k(u,"checked",p,!1)}function ht(u,p){Ke(u,p);var v=ve(p.value),N=p.type;if(v!=null)N==="number"?(v===0&&u.value===""||u.value!=v)&&(u.value=""+v):u.value!==""+v&&(u.value=""+v);else if(N==="submit"||N==="reset"){u.removeAttribute("value");return}p.hasOwnProperty("value")?ze(u,p.type,v):p.hasOwnProperty("defaultValue")&&ze(u,p.type,ve(p.defaultValue)),p.checked==null&&p.defaultChecked!=null&&(u.defaultChecked=!!p.defaultChecked)}function gt(u,p,v){if(p.hasOwnProperty("value")||p.hasOwnProperty("defaultValue")){var N=p.type;if(!(N!=="submit"&&N!=="reset"||p.value!==void 0&&p.value!==null))return;p=""+u._wrapperState.initialValue,v||p===u.value||(u.value=p),u.defaultValue=p}v=u.name,v!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,v!==""&&(u.name=v)}function ze(u,p,v){(p!=="number"||Ue(u.ownerDocument)!==u)&&(v==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+v&&(u.defaultValue=""+v))}var St=Array.isArray;function st(u,p,v,N){if(u=u.options,p){p={};for(var T=0;T<v.length;T++)p["$"+v[T]]=!0;for(v=0;v<u.length;v++)T=p.hasOwnProperty("$"+u[v].value),u[v].selected!==T&&(u[v].selected=T),T&&N&&(u[v].defaultSelected=!0)}else{for(v=""+ve(v),p=null,T=0;T<u.length;T++){if(u[T].value===v){u[T].selected=!0,N&&(u[T].defaultSelected=!0);return}p!==null||u[T].disabled||(p=u[T])}p!==null&&(p.selected=!0)}}function xt(u,p){if(p.dangerouslySetInnerHTML!=null)throw Error(n(91));return z({},p,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function Ct(u,p){var v=p.value;if(v==null){if(v=p.children,p=p.defaultValue,v!=null){if(p!=null)throw Error(n(92));if(St(v)){if(1<v.length)throw Error(n(93));v=v[0]}p=v}p==null&&(p=""),v=p}u._wrapperState={initialValue:ve(v)}}function bn(u,p){var v=ve(p.value),N=ve(p.defaultValue);v!=null&&(v=""+v,v!==u.value&&(u.value=v),p.defaultValue==null&&u.defaultValue!==v&&(u.defaultValue=v)),N!=null&&(u.defaultValue=""+N)}function sn(u){var p=u.textContent;p===u._wrapperState.initialValue&&p!==""&&p!==null&&(u.value=p)}function Ee(u){switch(u){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 Ve(u,p){return u==null||u==="http://www.w3.org/1999/xhtml"?Ee(p):u==="http://www.w3.org/2000/svg"&&p==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var at,Ze=(function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(p,v,N,T){MSApp.execUnsafeLocalFunction(function(){return u(p,v,N,T)})}:u})(function(u,p){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=p;else{for(at=at||document.createElement("div"),at.innerHTML="<svg>"+p.valueOf().toString()+"</svg>",p=at.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;p.firstChild;)u.appendChild(p.firstChild)}});function lt(u,p){if(p){var v=u.firstChild;if(v&&v===u.lastChild&&v.nodeType===3){v.nodeValue=p;return}}u.textContent=p}var ct={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},Wn=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(u){Wn.forEach(function(p){p=p+u.charAt(0).toUpperCase()+u.substring(1),ct[p]=ct[u]})});function nn(u,p,v){return p==null||typeof p=="boolean"||p===""?"":v||typeof p!="number"||p===0||ct.hasOwnProperty(u)&&ct[u]?(""+p).trim():p+"px"}function Gt(u,p){u=u.style;for(var v in p)if(p.hasOwnProperty(v)){var N=v.indexOf("--")===0,T=nn(v,p[v],N);v==="float"&&(v="cssFloat"),N?u.setProperty(v,T):u[v]=T}}var Qt=z({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 un(u,p){if(p){if(Qt[u]&&(p.children!=null||p.dangerouslySetInnerHTML!=null))throw Error(n(137,u));if(p.dangerouslySetInnerHTML!=null){if(p.children!=null)throw Error(n(60));if(typeof p.dangerouslySetInnerHTML!="object"||!("__html"in p.dangerouslySetInnerHTML))throw Error(n(61))}if(p.style!=null&&typeof p.style!="object")throw Error(n(62))}}function kt(u,p){if(u.indexOf("-")===-1)return typeof p.is=="string";switch(u){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 gn=null;function Bt(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var Jt=null,Hn=null,an=null;function $t(u){if(u=Ef(u)){if(typeof Jt!="function")throw Error(n(280));var p=u.stateNode;p&&(p=lh(p),Jt(u.stateNode,u.type,p))}}function Rn(u){Hn?an?an.push(u):an=[u]:Hn=u}function ql(){if(Hn){var u=Hn,p=an;if(an=Hn=null,$t(u),p)for(u=0;u<p.length;u++)$t(p[u])}}function Ri(u,p){return u(p)}function ps(){}var lo=!1;function qt(u,p,v){if(lo)return u(p,v);lo=!0;try{return Ri(u,p,v)}finally{lo=!1,(Hn!==null||an!==null)&&(ps(),ql())}}function Wa(u,p){var v=u.stateNode;if(v===null)return null;var N=lh(v);if(N===null)return null;v=N[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(N=!N.disabled)||(u=u.type,N=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!N;break e;default:u=!1}if(u)return null;if(v&&typeof v!="function")throw Error(n(231,p,typeof v));return v}var Fo=!1;if(s)try{var Qi={};Object.defineProperty(Qi,"passive",{get:function(){Fo=!0}}),window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{Fo=!1}function co(u,p,v,N,T,B,J,me,we){var Le=Array.prototype.slice.call(arguments,3);try{p.apply(v,Le)}catch(Je){this.onError(Je)}}var cr=!1,Vr=null,Zr=!1,Js=null,Ul={onError:function(u){cr=!0,Vr=u}};function Bo(u,p,v,N,T,B,J,me,we){cr=!1,Vr=null,co.apply(Ul,arguments)}function ms(u,p,v,N,T,B,J,me,we){if(Bo.apply(this,arguments),cr){if(cr){var Le=Vr;cr=!1,Vr=null}else throw Error(n(198));Zr||(Zr=!0,Js=Le)}}function Ii(u){var p=u,v=u;if(u.alternate)for(;p.return;)p=p.return;else{u=p;do p=u,(p.flags&4098)!==0&&(v=p.return),u=p.return;while(u)}return p.tag===3?v:null}function uo(u){if(u.tag===13){var p=u.memoizedState;if(p===null&&(u=u.alternate,u!==null&&(p=u.memoizedState)),p!==null)return p.dehydrated}return null}function Ha(u){if(Ii(u)!==u)throw Error(n(188))}function qc(u){var p=u.alternate;if(!p){if(p=Ii(u),p===null)throw Error(n(188));return p!==u?null:u}for(var v=u,N=p;;){var T=v.return;if(T===null)break;var B=T.alternate;if(B===null){if(N=T.return,N!==null){v=N;continue}break}if(T.child===B.child){for(B=T.child;B;){if(B===v)return Ha(T),u;if(B===N)return Ha(T),p;B=B.sibling}throw Error(n(188))}if(v.return!==N.return)v=T,N=B;else{for(var J=!1,me=T.child;me;){if(me===v){J=!0,v=T,N=B;break}if(me===N){J=!0,N=T,v=B;break}me=me.sibling}if(!J){for(me=B.child;me;){if(me===v){J=!0,v=B,N=T;break}if(me===N){J=!0,N=B,v=T;break}me=me.sibling}if(!J)throw Error(n(189))}}if(v.alternate!==N)throw Error(n(190))}if(v.tag!==3)throw Error(n(188));return v.stateNode.current===v?u:p}function $o(u){return u=qc(u),u!==null?zl(u):null}function zl(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var p=zl(u);if(p!==null)return p;u=u.sibling}return null}var Uc=t.unstable_scheduleCallback,zc=t.unstable_cancelCallback,lf=t.unstable_shouldYield,yy=t.unstable_requestPaint,pr=t.unstable_now,Rp=t.unstable_getCurrentPriorityLevel,cf=t.unstable_ImmediatePriority,Ya=t.unstable_UserBlockingPriority,Vl=t.unstable_NormalPriority,Ip=t.unstable_LowPriority,uf=t.unstable_IdlePriority,Vc=null,Ga=null;function Dp(u){if(Ga&&typeof Ga.onCommitFiberRoot=="function")try{Ga.onCommitFiberRoot(Vc,u,void 0,(u.current.flags&128)===128)}catch{}}var ei=Math.clz32?Math.clz32:ti,ff=Math.log,vy=Math.LN2;function ti(u){return u>>>=0,u===0?32:31-(ff(u)/vy|0)|0}var Wc=64,Ka=4194304;function gs(u){switch(u&-u){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 u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function Hc(u,p){var v=u.pendingLanes;if(v===0)return 0;var N=0,T=u.suspendedLanes,B=u.pingedLanes,J=v&268435455;if(J!==0){var me=J&~T;me!==0?N=gs(me):(B&=J,B!==0&&(N=gs(B)))}else J=v&~T,J!==0?N=gs(J):B!==0&&(N=gs(B));if(N===0)return 0;if(p!==0&&p!==N&&(p&T)===0&&(T=N&-N,B=p&-p,T>=B||T===16&&(B&4194240)!==0))return p;if((N&4)!==0&&(N|=v&16),p=u.entangledLanes,p!==0)for(u=u.entanglements,p&=N;0<p;)v=31-ei(p),T=1<<v,N|=u[v],p&=~T;return N}function fo(u,p){switch(u){case 1:case 2:case 4:return p+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 p+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 di(u,p){for(var v=u.suspendedLanes,N=u.pingedLanes,T=u.expirationTimes,B=u.pendingLanes;0<B;){var J=31-ei(B),me=1<<J,we=T[J];we===-1?((me&v)===0||(me&N)!==0)&&(T[J]=fo(me,p)):we<=p&&(u.expiredLanes|=me),B&=~me}}function qo(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function Vd(){var u=Wc;return Wc<<=1,(Wc&4194240)===0&&(Wc=64),u}function Wd(u){for(var p=[],v=0;31>v;v++)p.push(u);return p}function Yc(u,p,v){u.pendingLanes|=p,p!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,p=31-ei(p),u[p]=v}function ys(u,p){var v=u.pendingLanes&~p;u.pendingLanes=p,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=p,u.mutableReadLanes&=p,u.entangledLanes&=p,p=u.entanglements;var N=u.eventTimes;for(u=u.expirationTimes;0<v;){var T=31-ei(v),B=1<<T;p[T]=0,N[T]=-1,u[T]=-1,v&=~B}}function df(u,p){var v=u.entangledLanes|=p;for(u=u.entanglements;v;){var N=31-ei(v),T=1<<N;T&p|u[N]&p&&(u[N]|=p),v&=~T}}var Mn=0;function Gc(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var Wl,Hd,Fp,Bp,hf,pf=!1,xa=[],vs=null,ba=null,ho=null,Kc=new Map,Vt=new Map,xs=[],xy="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 $p(u,p){switch(u){case"focusin":case"focusout":vs=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":ho=null;break;case"pointerover":case"pointerout":Kc.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vt.delete(p.pointerId)}}function Xa(u,p,v,N,T,B){return u===null||u.nativeEvent!==B?(u={blockedOn:p,domEventName:v,eventSystemFlags:N,nativeEvent:B,targetContainers:[T]},p!==null&&(p=Ef(p),p!==null&&Hd(p)),u):(u.eventSystemFlags|=N,p=u.targetContainers,T!==null&&p.indexOf(T)===-1&&p.push(T),u)}function Zs(u,p,v,N,T){switch(p){case"focusin":return vs=Xa(vs,u,p,v,N,T),!0;case"dragenter":return ba=Xa(ba,u,p,v,N,T),!0;case"mouseover":return ho=Xa(ho,u,p,v,N,T),!0;case"pointerover":var B=T.pointerId;return Kc.set(B,Xa(Kc.get(B)||null,u,p,v,N,T)),!0;case"gotpointercapture":return B=T.pointerId,Vt.set(B,Xa(Vt.get(B)||null,u,p,v,N,T)),!0}return!1}function qp(u){var p=nc(u.target);if(p!==null){var v=Ii(p);if(v!==null){if(p=v.tag,p===13){if(p=uo(v),p!==null){u.blockedOn=p,hf(u.priority,function(){Fp(v)});return}}else if(p===3&&v.stateNode.current.memoizedState.isDehydrated){u.blockedOn=v.tag===3?v.stateNode.containerInfo:null;return}}}u.blockedOn=null}function mf(u){if(u.blockedOn!==null)return!1;for(var p=u.targetContainers;0<p.length;){var v=Jc(u.domEventName,u.eventSystemFlags,p[0],u.nativeEvent);if(v===null){v=u.nativeEvent;var N=new v.constructor(v.type,v);gn=N,v.target.dispatchEvent(N),gn=null}else return p=Ef(v),p!==null&&Hd(p),u.blockedOn=v,!1;p.shift()}return!0}function Xc(u,p,v){mf(u)&&v.delete(p)}function Yd(){pf=!1,vs!==null&&mf(vs)&&(vs=null),ba!==null&&mf(ba)&&(ba=null),ho!==null&&mf(ho)&&(ho=null),Kc.forEach(Xc),Vt.forEach(Xc)}function Uo(u,p){u.blockedOn===p&&(u.blockedOn=null,pf||(pf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Yd)))}function Qc(u){function p(T){return Uo(T,u)}if(0<xa.length){Uo(xa[0],u);for(var v=1;v<xa.length;v++){var N=xa[v];N.blockedOn===u&&(N.blockedOn=null)}}for(vs!==null&&Uo(vs,u),ba!==null&&Uo(ba,u),ho!==null&&Uo(ho,u),Kc.forEach(p),Vt.forEach(p),v=0;v<xs.length;v++)N=xs[v],N.blockedOn===u&&(N.blockedOn=null);for(;0<xs.length&&(v=xs[0],v.blockedOn===null);)qp(v),v.blockedOn===null&&xs.shift()}var wa=P.ReactCurrentBatchConfig,gf=!0;function Gd(u,p,v,N){var T=Mn,B=wa.transition;wa.transition=null;try{Mn=1,yf(u,p,v,N)}finally{Mn=T,wa.transition=B}}function Kd(u,p,v,N){var T=Mn,B=wa.transition;wa.transition=null;try{Mn=4,yf(u,p,v,N)}finally{Mn=T,wa.transition=B}}function yf(u,p,v,N){if(gf){var T=Jc(u,p,v,N);if(T===null)ah(u,p,N,po,v),$p(u,N);else if(Zs(T,u,p,v,N))N.stopPropagation();else if($p(u,N),p&4&&-1<xy.indexOf(u)){for(;T!==null;){var B=Ef(T);if(B!==null&&Wl(B),B=Jc(u,p,v,N),B===null&&ah(u,p,N,po,v),B===T)break;T=B}T!==null&&N.stopPropagation()}else ah(u,p,N,null,v)}}var po=null;function Jc(u,p,v,N){if(po=null,u=Bt(N),u=nc(u),u!==null)if(p=Ii(u),p===null)u=null;else if(v=p.tag,v===13){if(u=uo(p),u!==null)return u;u=null}else if(v===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;u=null}else p!==u&&(u=null);return po=u,null}function Zc(u){switch(u){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(Rp()){case cf:return 1;case Ya:return 4;case Vl:case Ip:return 16;case uf:return 536870912;default:return 16}default:return 16}}var mo=null,el=null,Hl=null;function Xd(){if(Hl)return Hl;var u,p=el,v=p.length,N,T="value"in mo?mo.value:mo.textContent,B=T.length;for(u=0;u<v&&p[u]===T[u];u++);var J=v-u;for(N=1;N<=J&&p[v-N]===T[B-N];N++);return Hl=T.slice(u,1<N?1-N:void 0)}function eu(u){var p=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&p===13&&(u=13)):u=p,u===10&&(u=13),32<=u||u===13?u:0}function go(){return!0}function bs(){return!1}function Ji(u){function p(v,N,T,B,J){this._reactName=v,this._targetInst=T,this.type=N,this.nativeEvent=B,this.target=J,this.currentTarget=null;for(var me in u)u.hasOwnProperty(me)&&(v=u[me],this[me]=v?v(B):B[me]);return this.isDefaultPrevented=(B.defaultPrevented!=null?B.defaultPrevented:B.returnValue===!1)?go:bs,this.isPropagationStopped=bs,this}return z(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var v=this.nativeEvent;v&&(v.preventDefault?v.preventDefault():typeof v.returnValue!="unknown"&&(v.returnValue=!1),this.isDefaultPrevented=go)},stopPropagation:function(){var v=this.nativeEvent;v&&(v.stopPropagation?v.stopPropagation():typeof v.cancelBubble!="unknown"&&(v.cancelBubble=!0),this.isPropagationStopped=go)},persist:function(){},isPersistent:go}),p}var yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vf=Ji(yo),O=z({},yo,{view:0,detail:0}),Q=Ji(O),fe,ye,Ae,Be=z({},O,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==Ae&&(Ae&&u.type==="mousemove"?(fe=u.screenX-Ae.screenX,ye=u.screenY-Ae.screenY):ye=fe=0,Ae=u),fe)},movementY:function(u){return"movementY"in u?u.movementY:ye}}),Ge=Ji(Be),_t=z({},Be,{dataTransfer:0}),Mt=Ji(_t),Kt=z({},O,{relatedTarget:0}),rn=Ji(Kt),Cn=z({},yo,{animationName:0,elapsedTime:0,pseudoElement:0}),Pr=Ji(Cn),ni=z({},yo,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),ur=Ji(ni),hi=z({},yo,{data:0}),Wr=Ji(hi),Di={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tl={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"},zo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nl(u){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(u):(u=zo[u])?!!p[u]:!1}function tu(){return nl}var xf=z({},O,{key:function(u){if(u.key){var p=Di[u.key]||u.key;if(p!=="Unidentified")return p}return u.type==="keypress"?(u=eu(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?tl[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(u){return u.type==="keypress"?eu(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?eu(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),Yl=Ji(xf),nu=z({},Be,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gl=Ji(nu),Kl=z({},O,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),Fi=Ji(Kl),ru=z({},yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),iu=Ji(ru),Qd=z({},Be,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),Jd=Ji(Qd),ca=[9,13,27,32],Vo=s&&"CompositionEvent"in window,ws=null;s&&"documentMode"in document&&(ws=document.documentMode);var Up=s&&"TextEvent"in window&&!ws,Qa=s&&(!Vo||ws&&8<ws&&11>=ws),Xl=" ",bf=!1;function wf(u,p){switch(u){case"keyup":return ca.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rl(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var vo=!1;function Ja(u,p){switch(u){case"compositionend":return rl(p);case"keypress":return p.which!==32?null:(bf=!0,Xl);case"textInput":return u=p.data,u===Xl&&bf?null:u;default:return null}}function Za(u,p){if(vo)return u==="compositionend"||!Vo&&wf(u,p)?(u=Xd(),Hl=el=mo=null,vo=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return Qa&&p.locale!=="ko"?null:p.data;default:return null}}var Ql={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 Ss(u){var p=u&&u.nodeName&&u.nodeName.toLowerCase();return p==="input"?!!Ql[u.type]:p==="textarea"}function il(u,p,v,N){Rn(N),p=Yp(p,"onChange"),0<p.length&&(v=new vf("onChange","change",null,v,N),u.push({event:v,listeners:p}))}var al=null,_s=null;function Hr(u){rh(u,0)}function au(u){var p=mu(u);if(Se(p))return u}function Ns(u,p){if(u==="change")return p}var Wo=!1;if(s){var ou;if(s){var su="oninput"in document;if(!su){var Sf=document.createElement("div");Sf.setAttribute("oninput","return;"),su=typeof Sf.oninput=="function"}ou=su}else ou=!1;Wo=ou&&(!document.documentMode||9<document.documentMode)}function _f(){al&&(al.detachEvent("onpropertychange",ol),_s=al=null)}function ol(u){if(u.propertyName==="value"&&au(_s)){var p=[];il(p,_s,u,Bt(u)),qt(Hr,p)}}function Jl(u,p,v){u==="focusin"?(_f(),al=p,_s=v,al.attachEvent("onpropertychange",ol)):u==="focusout"&&_f()}function Zl(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return au(_s)}function lu(u,p){if(u==="click")return au(p)}function ec(u,p){if(u==="input"||u==="change")return au(p)}function cu(u,p){return u===p&&(u!==0||1/u===1/p)||u!==u&&p!==p}var Lr=typeof Object.is=="function"?Object.is:cu;function Sa(u,p){if(Lr(u,p))return!0;if(typeof u!="object"||u===null||typeof p!="object"||p===null)return!1;var v=Object.keys(u),N=Object.keys(p);if(v.length!==N.length)return!1;for(N=0;N<v.length;N++){var T=v[N];if(!l.call(p,T)||!Lr(u[T],p[T]))return!1}return!0}function In(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function Xn(u,p){var v=In(u);u=0;for(var N;v;){if(v.nodeType===3){if(N=u+v.textContent.length,u<=p&&N>=p)return{node:v,offset:p-u};u=N}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=In(v)}}function Rr(u,p){return u&&p?u===p?!0:u&&u.nodeType===3?!1:p&&p.nodeType===3?Rr(u,p.parentNode):"contains"in u?u.contains(p):u.compareDocumentPosition?!!(u.compareDocumentPosition(p)&16):!1:!1}function ri(){for(var u=window,p=Ue();p instanceof u.HTMLIFrameElement;){try{var v=typeof p.contentWindow.location.href=="string"}catch{v=!1}if(v)u=p.contentWindow;else break;p=Ue(u.document)}return p}function Ho(u){var p=u&&u.nodeName&&u.nodeName.toLowerCase();return p&&(p==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||p==="textarea"||u.contentEditable==="true")}function Zd(u){var p=ri(),v=u.focusedElem,N=u.selectionRange;if(p!==v&&v&&v.ownerDocument&&Rr(v.ownerDocument.documentElement,v)){if(N!==null&&Ho(v)){if(p=N.start,u=N.end,u===void 0&&(u=p),"selectionStart"in v)v.selectionStart=p,v.selectionEnd=Math.min(u,v.value.length);else if(u=(p=v.ownerDocument||document)&&p.defaultView||window,u.getSelection){u=u.getSelection();var T=v.textContent.length,B=Math.min(N.start,T);N=N.end===void 0?B:Math.min(N.end,T),!u.extend&&B>N&&(T=N,N=B,B=T),T=Xn(v,B);var J=Xn(v,N);T&&J&&(u.rangeCount!==1||u.anchorNode!==T.node||u.anchorOffset!==T.offset||u.focusNode!==J.node||u.focusOffset!==J.offset)&&(p=p.createRange(),p.setStart(T.node,T.offset),u.removeAllRanges(),B>N?(u.addRange(p),u.extend(J.node,J.offset)):(p.setEnd(J.node,J.offset),u.addRange(p)))}}for(p=[],u=v;u=u.parentNode;)u.nodeType===1&&p.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<p.length;v++)u=p[v],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var Nf=s&&"documentMode"in document&&11>=document.documentMode,sl=null,zp=null,kf=null,Vp=!1;function by(u,p,v){var N=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;Vp||sl==null||sl!==Ue(N)||(N=sl,"selectionStart"in N&&Ho(N)?N={start:N.selectionStart,end:N.selectionEnd}:(N=(N.ownerDocument&&N.ownerDocument.defaultView||window).getSelection(),N={anchorNode:N.anchorNode,anchorOffset:N.anchorOffset,focusNode:N.focusNode,focusOffset:N.focusOffset}),kf&&Sa(kf,N)||(kf=N,N=Yp(zp,"onSelect"),0<N.length&&(p=new vf("onSelect","select",null,p,v),u.push({event:p,listeners:N}),p.target=sl)))}function eh(u,p){var v={};return v[u.toLowerCase()]=p.toLowerCase(),v["Webkit"+u]="webkit"+p,v["Moz"+u]="moz"+p,v}var uu={animationend:eh("Animation","AnimationEnd"),animationiteration:eh("Animation","AnimationIteration"),animationstart:eh("Animation","AnimationStart"),transitionend:eh("Transition","TransitionEnd")},fu={},wy={};s&&(wy=document.createElement("div").style,"AnimationEvent"in window||(delete uu.animationend.animation,delete uu.animationiteration.animation,delete uu.animationstart.animation),"TransitionEvent"in window||delete uu.transitionend.transition);function th(u){if(fu[u])return fu[u];if(!uu[u])return u;var p=uu[u],v;for(v in p)if(p.hasOwnProperty(v)&&v in wy)return fu[u]=p[v];return u}var Sy=th("animationend"),_y=th("animationiteration"),Ny=th("animationstart"),ky=th("transitionend"),Ay=new Map,Py="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 ks(u,p){Ay.set(u,p),a(p,[u])}for(var Af=0;Af<Py.length;Af++){var ua=Py[Af],xo=ua.toLowerCase(),Wp=ua[0].toUpperCase()+ua.slice(1);ks(xo,"on"+Wp)}ks(Sy,"onAnimationEnd"),ks(_y,"onAnimationIteration"),ks(Ny,"onAnimationStart"),ks("dblclick","onDoubleClick"),ks("focusin","onFocus"),ks("focusout","onBlur"),ks(ky,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tc="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(" "),T1=new Set("cancel close invalid load scroll toggle".split(" ").concat(tc));function nh(u,p,v){var N=u.type||"unknown-event";u.currentTarget=v,ms(N,p,void 0,u),u.currentTarget=null}function rh(u,p){p=(p&4)!==0;for(var v=0;v<u.length;v++){var N=u[v],T=N.event;N=N.listeners;e:{var B=void 0;if(p)for(var J=N.length-1;0<=J;J--){var me=N[J],we=me.instance,Le=me.currentTarget;if(me=me.listener,we!==B&&T.isPropagationStopped())break e;nh(T,me,Le),B=we}else for(J=0;J<N.length;J++){if(me=N[J],we=me.instance,Le=me.currentTarget,me=me.listener,we!==B&&T.isPropagationStopped())break e;nh(T,me,Le),B=we}}}if(Zr)throw u=Js,Zr=!1,Js=null,u}function nr(u,p){var v=p[Na];v===void 0&&(v=p[Na]=new Set);var N=u+"__bubble";v.has(N)||(ih(p,u,2,!1),v.add(N))}function Hp(u,p,v){var N=0;p&&(N|=4),ih(v,u,N,p)}var Pf="_reactListening"+Math.random().toString(36).slice(2);function du(u){if(!u[Pf]){u[Pf]=!0,r.forEach(function(v){v!=="selectionchange"&&(T1.has(v)||Hp(v,!1,u),Hp(v,!0,u))});var p=u.nodeType===9?u:u.ownerDocument;p===null||p[Pf]||(p[Pf]=!0,Hp("selectionchange",!1,p))}}function ih(u,p,v,N){switch(Zc(p)){case 1:var T=Gd;break;case 4:T=Kd;break;default:T=yf}v=T.bind(null,p,v,u),T=void 0,!Fo||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(T=!0),N?T!==void 0?u.addEventListener(p,v,{capture:!0,passive:T}):u.addEventListener(p,v,!0):T!==void 0?u.addEventListener(p,v,{passive:T}):u.addEventListener(p,v,!1)}function ah(u,p,v,N,T){var B=N;if((p&1)===0&&(p&2)===0&&N!==null)e:for(;;){if(N===null)return;var J=N.tag;if(J===3||J===4){var me=N.stateNode.containerInfo;if(me===T||me.nodeType===8&&me.parentNode===T)break;if(J===4)for(J=N.return;J!==null;){var we=J.tag;if((we===3||we===4)&&(we=J.stateNode.containerInfo,we===T||we.nodeType===8&&we.parentNode===T))return;J=J.return}for(;me!==null;){if(J=nc(me),J===null)return;if(we=J.tag,we===5||we===6){N=B=J;continue e}me=me.parentNode}}N=N.return}qt(function(){var Le=B,Je=Bt(v),et=[];e:{var Qe=Ay.get(u);if(Qe!==void 0){var dt=vf,At=u;switch(u){case"keypress":if(eu(v)===0)break e;case"keydown":case"keyup":dt=Yl;break;case"focusin":At="focus",dt=rn;break;case"focusout":At="blur",dt=rn;break;case"beforeblur":case"afterblur":dt=rn;break;case"click":if(v.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":dt=Ge;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":dt=Mt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":dt=Fi;break;case Sy:case _y:case Ny:dt=Pr;break;case ky:dt=iu;break;case"scroll":dt=Q;break;case"wheel":dt=Jd;break;case"copy":case"cut":case"paste":dt=ur;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":dt=Gl}var Tt=(p&4)!==0,gi=!Tt&&u==="scroll",Oe=Tt?Qe!==null?Qe+"Capture":null:Qe;Tt=[];for(var ke=Le,Me;ke!==null;){Me=ke;var rt=Me.stateNode;if(Me.tag===5&&rt!==null&&(Me=rt,Oe!==null&&(rt=Wa(ke,Oe),rt!=null&&Tt.push(oh(ke,rt,Me)))),gi)break;ke=ke.return}0<Tt.length&&(Qe=new dt(Qe,At,null,v,Je),et.push({event:Qe,listeners:Tt}))}}if((p&7)===0){e:{if(Qe=u==="mouseover"||u==="pointerover",dt=u==="mouseout"||u==="pointerout",Qe&&v!==gn&&(At=v.relatedTarget||v.fromElement)&&(nc(At)||At[Zi]))break e;if((dt||Qe)&&(Qe=Je.window===Je?Je:(Qe=Je.ownerDocument)?Qe.defaultView||Qe.parentWindow:window,dt?(At=v.relatedTarget||v.toElement,dt=Le,At=At?nc(At):null,At!==null&&(gi=Ii(At),At!==gi||At.tag!==5&&At.tag!==6)&&(At=null)):(dt=null,At=Le),dt!==At)){if(Tt=Ge,rt="onMouseLeave",Oe="onMouseEnter",ke="mouse",(u==="pointerout"||u==="pointerover")&&(Tt=Gl,rt="onPointerLeave",Oe="onPointerEnter",ke="pointer"),gi=dt==null?Qe:mu(dt),Me=At==null?Qe:mu(At),Qe=new Tt(rt,ke+"leave",dt,v,Je),Qe.target=gi,Qe.relatedTarget=Me,rt=null,nc(Je)===Le&&(Tt=new Tt(Oe,ke+"enter",At,v,Je),Tt.target=Me,Tt.relatedTarget=gi,rt=Tt),gi=rt,dt&&At)t:{for(Tt=dt,Oe=At,ke=0,Me=Tt;Me;Me=hu(Me))ke++;for(Me=0,rt=Oe;rt;rt=hu(rt))Me++;for(;0<ke-Me;)Tt=hu(Tt),ke--;for(;0<Me-ke;)Oe=hu(Oe),Me--;for(;ke--;){if(Tt===Oe||Oe!==null&&Tt===Oe.alternate)break t;Tt=hu(Tt),Oe=hu(Oe)}Tt=null}else Tt=null;dt!==null&&M1(et,Qe,dt,Tt,!1),At!==null&&gi!==null&&M1(et,gi,At,Tt,!0)}}e:{if(Qe=Le?mu(Le):window,dt=Qe.nodeName&&Qe.nodeName.toLowerCase(),dt==="select"||dt==="input"&&Qe.type==="file")var Rt=Ns;else if(Ss(Qe))if(Wo)Rt=ec;else{Rt=Zl;var Ut=Jl}else(dt=Qe.nodeName)&&dt.toLowerCase()==="input"&&(Qe.type==="checkbox"||Qe.type==="radio")&&(Rt=lu);if(Rt&&(Rt=Rt(u,Le))){il(et,Rt,v,Je);break e}Ut&&Ut(u,Qe,Le),u==="focusout"&&(Ut=Qe._wrapperState)&&Ut.controlled&&Qe.type==="number"&&ze(Qe,"number",Qe.value)}switch(Ut=Le?mu(Le):window,u){case"focusin":(Ss(Ut)||Ut.contentEditable==="true")&&(sl=Ut,zp=Le,kf=null);break;case"focusout":kf=zp=sl=null;break;case"mousedown":Vp=!0;break;case"contextmenu":case"mouseup":case"dragend":Vp=!1,by(et,v,Je);break;case"selectionchange":if(Nf)break;case"keydown":case"keyup":by(et,v,Je)}var zt;if(Vo)e:{switch(u){case"compositionstart":var Zt="onCompositionStart";break e;case"compositionend":Zt="onCompositionEnd";break e;case"compositionupdate":Zt="onCompositionUpdate";break e}Zt=void 0}else vo?wf(u,v)&&(Zt="onCompositionEnd"):u==="keydown"&&v.keyCode===229&&(Zt="onCompositionStart");Zt&&(Qa&&v.locale!=="ko"&&(vo||Zt!=="onCompositionStart"?Zt==="onCompositionEnd"&&vo&&(zt=Xd()):(mo=Je,el="value"in mo?mo.value:mo.textContent,vo=!0)),Ut=Yp(Le,Zt),0<Ut.length&&(Zt=new Wr(Zt,u,null,v,Je),et.push({event:Zt,listeners:Ut}),zt?Zt.data=zt:(zt=rl(v),zt!==null&&(Zt.data=zt)))),(zt=Up?Ja(u,v):Za(u,v))&&(Le=Yp(Le,"onBeforeInput"),0<Le.length&&(Je=new Wr("onBeforeInput","beforeinput",null,v,Je),et.push({event:Je,listeners:Le}),Je.data=zt))}rh(et,p)})}function oh(u,p,v){return{instance:u,listener:p,currentTarget:v}}function Yp(u,p){for(var v=p+"Capture",N=[];u!==null;){var T=u,B=T.stateNode;T.tag===5&&B!==null&&(T=B,B=Wa(u,v),B!=null&&N.unshift(oh(u,B,T)),B=Wa(u,p),B!=null&&N.push(oh(u,B,T))),u=u.return}return N}function hu(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u||null}function M1(u,p,v,N,T){for(var B=p._reactName,J=[];v!==null&&v!==N;){var me=v,we=me.alternate,Le=me.stateNode;if(we!==null&&we===N)break;me.tag===5&&Le!==null&&(me=Le,T?(we=Wa(v,B),we!=null&&J.unshift(oh(v,we,me))):T||(we=Wa(v,B),we!=null&&J.push(oh(v,we,me)))),v=v.return}J.length!==0&&u.push({event:p,listeners:J})}var H5=/\r\n?/g,Y5=/\u0000|\uFFFD/g;function L1(u){return(typeof u=="string"?u:""+u).replace(H5,`
`).replace(Y5,"")}function Gp(u,p,v){if(p=L1(p),L1(u)!==p&&v)throw Error(n(425))}function jf(){}var sh=null,pu=null;function jy(u,p){return u==="textarea"||u==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var Cy=typeof setTimeout=="function"?setTimeout:void 0,R1=typeof clearTimeout=="function"?clearTimeout:void 0,I1=typeof Promise=="function"?Promise:void 0,G5=typeof queueMicrotask=="function"?queueMicrotask:typeof I1<"u"?function(u){return I1.resolve(null).then(u).catch(K5)}:Cy;function K5(u){setTimeout(function(){throw u})}function Ey(u,p){var v=p,N=0;do{var T=v.nextSibling;if(u.removeChild(v),T&&T.nodeType===8)if(v=T.data,v==="/$"){if(N===0){u.removeChild(T),Qc(p);return}N--}else v!=="$"&&v!=="$?"&&v!=="$!"||N++;v=T}while(v);Qc(p)}function fa(u){for(;u!=null;u=u.nextSibling){var p=u.nodeType;if(p===1||p===3)break;if(p===8){if(p=u.data,p==="$"||p==="$!"||p==="$?")break;if(p==="/$")return null}}return u}function bo(u){u=u.previousSibling;for(var p=0;u;){if(u.nodeType===8){var v=u.data;if(v==="$"||v==="$!"||v==="$?"){if(p===0)return u;p--}else v==="/$"&&p++}u=u.previousSibling}return null}var _a=Math.random().toString(36).slice(2),As="__reactFiber$"+_a,Cf="__reactProps$"+_a,Zi="__reactContainer$"+_a,Na="__reactEvents$"+_a,X5="__reactListeners$"+_a,Q5="__reactHandles$"+_a;function nc(u){var p=u[As];if(p)return p;for(var v=u.parentNode;v;){if(p=v[Zi]||v[As]){if(v=p.alternate,p.child!==null||v!==null&&v.child!==null)for(u=bo(u);u!==null;){if(v=u[As])return v;u=bo(u)}return p}u=v,v=u.parentNode}return null}function Ef(u){return u=u[As]||u[Zi],!u||u.tag!==5&&u.tag!==6&&u.tag!==13&&u.tag!==3?null:u}function mu(u){if(u.tag===5||u.tag===6)return u.stateNode;throw Error(n(33))}function lh(u){return u[Cf]||null}var Oy=[],ll=-1;function Yo(u){return{current:u}}function Yn(u){0>ll||(u.current=Oy[ll],Oy[ll]=null,ll--)}function Qn(u,p){ll++,Oy[ll]=u.current,u.current=p}var rc={},Bi=Yo(rc),ka=Yo(!1),gu=rc;function Of(u,p){var v=u.type.contextTypes;if(!v)return rc;var N=u.stateNode;if(N&&N.__reactInternalMemoizedUnmaskedChildContext===p)return N.__reactInternalMemoizedMaskedChildContext;var T={},B;for(B in v)T[B]=p[B];return N&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=p,u.__reactInternalMemoizedMaskedChildContext=T),T}function Aa(u){return u=u.childContextTypes,u!=null}function Kp(){Yn(ka),Yn(Bi)}function D1(u,p,v){if(Bi.current!==rc)throw Error(n(168));Qn(Bi,p),Qn(ka,v)}function Ty(u,p,v){var N=u.stateNode;if(p=p.childContextTypes,typeof N.getChildContext!="function")return v;N=N.getChildContext();for(var T in N)if(!(T in p))throw Error(n(108,pe(u)||"Unknown",T));return z({},v,N)}function yu(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||rc,gu=Bi.current,Qn(Bi,u),Qn(ka,ka.current),!0}function F1(u,p,v){var N=u.stateNode;if(!N)throw Error(n(169));v?(u=Ty(u,p,gu),N.__reactInternalMemoizedMergedChildContext=u,Yn(ka),Yn(Bi),Qn(Bi,u)):Yn(ka),Qn(ka,v)}var cl=null,ch=!1,S=!1;function A(u){cl===null?cl=[u]:cl.push(u)}function I(u){ch=!0,A(u)}function U(){if(!S&&cl!==null){S=!0;var u=0,p=Mn;try{var v=cl;for(Mn=1;u<v.length;u++){var N=v[u];do N=N(!0);while(N!==null)}cl=null,ch=!1}catch(T){throw cl!==null&&(cl=cl.slice(u+1)),Uc(cf,U),T}finally{Mn=p,S=!1}}return null}var G=[],ee=0,ne=null,ie=0,ae=[],ce=0,be=null,Ce=1,ue="";function Ne(u,p){G[ee++]=ie,G[ee++]=ne,ne=u,ie=p}function je(u,p,v){ae[ce++]=Ce,ae[ce++]=ue,ae[ce++]=be,be=u;var N=Ce;u=ue;var T=32-ei(N)-1;N&=~(1<<T),v+=1;var B=32-ei(p)+T;if(30<B){var J=T-T%5;B=(N&(1<<J)-1).toString(32),N>>=J,T-=J,Ce=1<<32-ei(p)+T|v<<T|N,ue=B+u}else Ce=1<<B|v<<T|N,ue=u}function Fe(u){u.return!==null&&(Ne(u,1),je(u,1,0))}function Te(u){for(;u===ne;)ne=G[--ee],G[ee]=null,ie=G[--ee],G[ee]=null;for(;u===be;)be=ae[--ce],ae[ce]=null,ue=ae[--ce],ae[ce]=null,Ce=ae[--ce],ae[ce]=null}var Ie=null,De=null,qe=!1,We=null;function Lt(u,p){var v=Os(5,null,null,0);v.elementType="DELETED",v.stateNode=p,v.return=u,p=u.deletions,p===null?(u.deletions=[v],u.flags|=16):p.push(v)}function pt(u,p){switch(u.tag){case 5:var v=u.type;return p=p.nodeType!==1||v.toLowerCase()!==p.nodeName.toLowerCase()?null:p,p!==null?(u.stateNode=p,Ie=u,De=fa(p.firstChild),!0):!1;case 6:return p=u.pendingProps===""||p.nodeType!==3?null:p,p!==null?(u.stateNode=p,Ie=u,De=null,!0):!1;case 13:return p=p.nodeType!==8?null:p,p!==null?(v=be!==null?{id:Ce,overflow:ue}:null,u.memoizedState={dehydrated:p,treeContext:v,retryLane:1073741824},v=Os(18,null,null,0),v.stateNode=p,v.return=u,u.child=v,Ie=u,De=null,!0):!1;default:return!1}}function on(u){return(u.mode&1)!==0&&(u.flags&128)===0}function Nt(u){if(qe){var p=De;if(p){var v=p;if(!pt(u,p)){if(on(u))throw Error(n(418));p=fa(v.nextSibling);var N=Ie;p&&pt(u,p)?Lt(N,v):(u.flags=u.flags&-4097|2,qe=!1,Ie=u)}}else{if(on(u))throw Error(n(418));u.flags=u.flags&-4097|2,qe=!1,Ie=u}}}function wn(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;Ie=u}function Ir(u){if(u!==Ie)return!1;if(!qe)return wn(u),qe=!0,!1;var p;if((p=u.tag!==3)&&!(p=u.tag!==5)&&(p=u.type,p=p!=="head"&&p!=="body"&&!jy(u.type,u.memoizedProps)),p&&(p=De)){if(on(u))throw ln(),Error(n(418));for(;p;)Lt(u,p),p=fa(p.nextSibling)}if(wn(u),u.tag===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(317));e:{for(u=u.nextSibling,p=0;u;){if(u.nodeType===8){var v=u.data;if(v==="/$"){if(p===0){De=fa(u.nextSibling);break e}p--}else v!=="$"&&v!=="$!"&&v!=="$?"||p++}u=u.nextSibling}De=null}}else De=Ie?fa(u.stateNode.nextSibling):null;return!0}function ln(){for(var u=De;u;)u=fa(u.nextSibling)}function mt(){De=Ie=null,qe=!1}function ot(u){We===null?We=[u]:We.push(u)}var Yr=P.ReactCurrentBatchConfig;function Yt(u,p,v){if(u=v.ref,u!==null&&typeof u!="function"&&typeof u!="object"){if(v._owner){if(v=v._owner,v){if(v.tag!==1)throw Error(n(309));var N=v.stateNode}if(!N)throw Error(n(147,u));var T=N,B=""+u;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===B?p.ref:(p=function(J){var me=T.refs;J===null?delete me[B]:me[B]=J},p._stringRef=B,p)}if(typeof u!="string")throw Error(n(284));if(!v._owner)throw Error(n(290,u))}return u}function vn(u,p){throw u=Object.prototype.toString.call(p),Error(n(31,u==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":u))}function fr(u){var p=u._init;return p(u._payload)}function _i(u){function p(Oe,ke){if(u){var Me=Oe.deletions;Me===null?(Oe.deletions=[ke],Oe.flags|=16):Me.push(ke)}}function v(Oe,ke){if(!u)return null;for(;ke!==null;)p(Oe,ke),ke=ke.sibling;return null}function N(Oe,ke){for(Oe=new Map;ke!==null;)ke.key!==null?Oe.set(ke.key,ke):Oe.set(ke.index,ke),ke=ke.sibling;return Oe}function T(Oe,ke){return Oe=qf(Oe,ke),Oe.index=0,Oe.sibling=null,Oe}function B(Oe,ke,Me){return Oe.index=Me,u?(Me=Oe.alternate,Me!==null?(Me=Me.index,Me<ke?(Oe.flags|=2,ke):Me):(Oe.flags|=2,ke)):(Oe.flags|=1048576,ke)}function J(Oe){return u&&Oe.alternate===null&&(Oe.flags|=2),Oe}function me(Oe,ke,Me,rt){return ke===null||ke.tag!==6?(ke=AS(Me,Oe.mode,rt),ke.return=Oe,ke):(ke=T(ke,Me),ke.return=Oe,ke)}function we(Oe,ke,Me,rt){var Rt=Me.type;return Rt===L?Je(Oe,ke,Me.props.children,rt,Me.key):ke!==null&&(ke.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===Y&&fr(Rt)===ke.type)?(rt=T(ke,Me.props),rt.ref=Yt(Oe,ke,Me),rt.return=Oe,rt):(rt=ix(Me.type,Me.key,Me.props,null,Oe.mode,rt),rt.ref=Yt(Oe,ke,Me),rt.return=Oe,rt)}function Le(Oe,ke,Me,rt){return ke===null||ke.tag!==4||ke.stateNode.containerInfo!==Me.containerInfo||ke.stateNode.implementation!==Me.implementation?(ke=PS(Me,Oe.mode,rt),ke.return=Oe,ke):(ke=T(ke,Me.children||[]),ke.return=Oe,ke)}function Je(Oe,ke,Me,rt,Rt){return ke===null||ke.tag!==7?(ke=yh(Me,Oe.mode,rt,Rt),ke.return=Oe,ke):(ke=T(ke,Me),ke.return=Oe,ke)}function et(Oe,ke,Me){if(typeof ke=="string"&&ke!==""||typeof ke=="number")return ke=AS(""+ke,Oe.mode,Me),ke.return=Oe,ke;if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case C:return Me=ix(ke.type,ke.key,ke.props,null,Oe.mode,Me),Me.ref=Yt(Oe,null,ke),Me.return=Oe,Me;case j:return ke=PS(ke,Oe.mode,Me),ke.return=Oe,ke;case Y:var rt=ke._init;return et(Oe,rt(ke._payload),Me)}if(St(ke)||se(ke))return ke=yh(ke,Oe.mode,Me,null),ke.return=Oe,ke;vn(Oe,ke)}return null}function Qe(Oe,ke,Me,rt){var Rt=ke!==null?ke.key:null;if(typeof Me=="string"&&Me!==""||typeof Me=="number")return Rt!==null?null:me(Oe,ke,""+Me,rt);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case C:return Me.key===Rt?we(Oe,ke,Me,rt):null;case j:return Me.key===Rt?Le(Oe,ke,Me,rt):null;case Y:return Rt=Me._init,Qe(Oe,ke,Rt(Me._payload),rt)}if(St(Me)||se(Me))return Rt!==null?null:Je(Oe,ke,Me,rt,null);vn(Oe,Me)}return null}function dt(Oe,ke,Me,rt,Rt){if(typeof rt=="string"&&rt!==""||typeof rt=="number")return Oe=Oe.get(Me)||null,me(ke,Oe,""+rt,Rt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case C:return Oe=Oe.get(rt.key===null?Me:rt.key)||null,we(ke,Oe,rt,Rt);case j:return Oe=Oe.get(rt.key===null?Me:rt.key)||null,Le(ke,Oe,rt,Rt);case Y:var Ut=rt._init;return dt(Oe,ke,Me,Ut(rt._payload),Rt)}if(St(rt)||se(rt))return Oe=Oe.get(Me)||null,Je(ke,Oe,rt,Rt,null);vn(ke,rt)}return null}function At(Oe,ke,Me,rt){for(var Rt=null,Ut=null,zt=ke,Zt=ke=0,ia=null;zt!==null&&Zt<Me.length;Zt++){zt.index>Zt?(ia=zt,zt=null):ia=zt.sibling;var $n=Qe(Oe,zt,Me[Zt],rt);if($n===null){zt===null&&(zt=ia);break}u&&zt&&$n.alternate===null&&p(Oe,zt),ke=B($n,ke,Zt),Ut===null?Rt=$n:Ut.sibling=$n,Ut=$n,zt=ia}if(Zt===Me.length)return v(Oe,zt),qe&&Ne(Oe,Zt),Rt;if(zt===null){for(;Zt<Me.length;Zt++)zt=et(Oe,Me[Zt],rt),zt!==null&&(ke=B(zt,ke,Zt),Ut===null?Rt=zt:Ut.sibling=zt,Ut=zt);return qe&&Ne(Oe,Zt),Rt}for(zt=N(Oe,zt);Zt<Me.length;Zt++)ia=dt(zt,Oe,Zt,Me[Zt],rt),ia!==null&&(u&&ia.alternate!==null&&zt.delete(ia.key===null?Zt:ia.key),ke=B(ia,ke,Zt),Ut===null?Rt=ia:Ut.sibling=ia,Ut=ia);return u&&zt.forEach(function(Uf){return p(Oe,Uf)}),qe&&Ne(Oe,Zt),Rt}function Tt(Oe,ke,Me,rt){var Rt=se(Me);if(typeof Rt!="function")throw Error(n(150));if(Me=Rt.call(Me),Me==null)throw Error(n(151));for(var Ut=Rt=null,zt=ke,Zt=ke=0,ia=null,$n=Me.next();zt!==null&&!$n.done;Zt++,$n=Me.next()){zt.index>Zt?(ia=zt,zt=null):ia=zt.sibling;var Uf=Qe(Oe,zt,$n.value,rt);if(Uf===null){zt===null&&(zt=ia);break}u&&zt&&Uf.alternate===null&&p(Oe,zt),ke=B(Uf,ke,Zt),Ut===null?Rt=Uf:Ut.sibling=Uf,Ut=Uf,zt=ia}if($n.done)return v(Oe,zt),qe&&Ne(Oe,Zt),Rt;if(zt===null){for(;!$n.done;Zt++,$n=Me.next())$n=et(Oe,$n.value,rt),$n!==null&&(ke=B($n,ke,Zt),Ut===null?Rt=$n:Ut.sibling=$n,Ut=$n);return qe&&Ne(Oe,Zt),Rt}for(zt=N(Oe,zt);!$n.done;Zt++,$n=Me.next())$n=dt(zt,Oe,Zt,$n.value,rt),$n!==null&&(u&&$n.alternate!==null&&zt.delete($n.key===null?Zt:$n.key),ke=B($n,ke,Zt),Ut===null?Rt=$n:Ut.sibling=$n,Ut=$n);return u&&zt.forEach(function(Iee){return p(Oe,Iee)}),qe&&Ne(Oe,Zt),Rt}function gi(Oe,ke,Me,rt){if(typeof Me=="object"&&Me!==null&&Me.type===L&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case C:e:{for(var Rt=Me.key,Ut=ke;Ut!==null;){if(Ut.key===Rt){if(Rt=Me.type,Rt===L){if(Ut.tag===7){v(Oe,Ut.sibling),ke=T(Ut,Me.props.children),ke.return=Oe,Oe=ke;break e}}else if(Ut.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===Y&&fr(Rt)===Ut.type){v(Oe,Ut.sibling),ke=T(Ut,Me.props),ke.ref=Yt(Oe,Ut,Me),ke.return=Oe,Oe=ke;break e}v(Oe,Ut);break}else p(Oe,Ut);Ut=Ut.sibling}Me.type===L?(ke=yh(Me.props.children,Oe.mode,rt,Me.key),ke.return=Oe,Oe=ke):(rt=ix(Me.type,Me.key,Me.props,null,Oe.mode,rt),rt.ref=Yt(Oe,ke,Me),rt.return=Oe,Oe=rt)}return J(Oe);case j:e:{for(Ut=Me.key;ke!==null;){if(ke.key===Ut)if(ke.tag===4&&ke.stateNode.containerInfo===Me.containerInfo&&ke.stateNode.implementation===Me.implementation){v(Oe,ke.sibling),ke=T(ke,Me.children||[]),ke.return=Oe,Oe=ke;break e}else{v(Oe,ke);break}else p(Oe,ke);ke=ke.sibling}ke=PS(Me,Oe.mode,rt),ke.return=Oe,Oe=ke}return J(Oe);case Y:return Ut=Me._init,gi(Oe,ke,Ut(Me._payload),rt)}if(St(Me))return At(Oe,ke,Me,rt);if(se(Me))return Tt(Oe,ke,Me,rt);vn(Oe,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"?(Me=""+Me,ke!==null&&ke.tag===6?(v(Oe,ke.sibling),ke=T(ke,Me),ke.return=Oe,Oe=ke):(v(Oe,ke),ke=AS(Me,Oe.mode,rt),ke.return=Oe,Oe=ke),J(Oe)):v(Oe,ke)}return gi}var ii=_i(!0),jr=_i(!1),pi=Yo(null),Ni=null,br=null,_n=null;function Dn(){_n=br=Ni=null}function wr(u){var p=pi.current;Yn(pi),u._currentValue=p}function Fn(u,p,v){for(;u!==null;){var N=u.alternate;if((u.childLanes&p)!==p?(u.childLanes|=p,N!==null&&(N.childLanes|=p)):N!==null&&(N.childLanes&p)!==p&&(N.childLanes|=p),u===v)break;u=u.return}}function Dr(u,p){Ni=u,_n=br=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&p)!==0&&(So=!0),u.firstContext=null)}function Fr(u){var p=u._currentValue;if(_n!==u)if(u={context:u,memoizedValue:p,next:null},br===null){if(Ni===null)throw Error(n(308));br=u,Ni.dependencies={lanes:0,firstContext:u}}else br=br.next=u;return p}var rr=null;function ea(u){rr===null?rr=[u]:rr.push(u)}function Jn(u,p,v,N){var T=p.interleaved;return T===null?(v.next=v,ea(p)):(v.next=T.next,T.next=v),p.interleaved=v,ir(u,N)}function ir(u,p){u.lanes|=p;var v=u.alternate;for(v!==null&&(v.lanes|=p),v=u,u=u.return;u!==null;)u.childLanes|=p,v=u.alternate,v!==null&&(v.childLanes|=p),v=u,u=u.return;return v.tag===3?v.stateNode:null}var ai=!1;function $i(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pa(u,p){u=u.updateQueue,p.updateQueue===u&&(p.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function Gr(u,p){return{eventTime:u,lane:p,tag:0,payload:null,callback:null,next:null}}function Kr(u,p,v){var N=u.updateQueue;if(N===null)return null;if(N=N.shared,(Bn&2)!==0){var T=N.pending;return T===null?p.next=p:(p.next=T.next,T.next=p),N.pending=p,ir(u,v)}return T=N.interleaved,T===null?(p.next=p,ea(N)):(p.next=T.next,T.next=p),N.interleaved=p,ir(u,v)}function ta(u,p,v){if(p=p.updateQueue,p!==null&&(p=p.shared,(v&4194240)!==0)){var N=p.lanes;N&=u.pendingLanes,v|=N,p.lanes=v,df(u,v)}}function ar(u,p){var v=u.updateQueue,N=u.alternate;if(N!==null&&(N=N.updateQueue,v===N)){var T=null,B=null;if(v=v.firstBaseUpdate,v!==null){do{var J={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};B===null?T=B=J:B=B.next=J,v=v.next}while(v!==null);B===null?T=B=p:B=B.next=p}else T=B=p;v={baseState:N.baseState,firstBaseUpdate:T,lastBaseUpdate:B,shared:N.shared,effects:N.effects},u.updateQueue=v;return}u=v.lastBaseUpdate,u===null?v.firstBaseUpdate=p:u.next=p,v.lastBaseUpdate=p}function na(u,p,v,N){var T=u.updateQueue;ai=!1;var B=T.firstBaseUpdate,J=T.lastBaseUpdate,me=T.shared.pending;if(me!==null){T.shared.pending=null;var we=me,Le=we.next;we.next=null,J===null?B=Le:J.next=Le,J=we;var Je=u.alternate;Je!==null&&(Je=Je.updateQueue,me=Je.lastBaseUpdate,me!==J&&(me===null?Je.firstBaseUpdate=Le:me.next=Le,Je.lastBaseUpdate=we))}if(B!==null){var et=T.baseState;J=0,Je=Le=we=null,me=B;do{var Qe=me.lane,dt=me.eventTime;if((N&Qe)===Qe){Je!==null&&(Je=Je.next={eventTime:dt,lane:0,tag:me.tag,payload:me.payload,callback:me.callback,next:null});e:{var At=u,Tt=me;switch(Qe=p,dt=v,Tt.tag){case 1:if(At=Tt.payload,typeof At=="function"){et=At.call(dt,et,Qe);break e}et=At;break e;case 3:At.flags=At.flags&-65537|128;case 0:if(At=Tt.payload,Qe=typeof At=="function"?At.call(dt,et,Qe):At,Qe==null)break e;et=z({},et,Qe);break e;case 2:ai=!0}}me.callback!==null&&me.lane!==0&&(u.flags|=64,Qe=T.effects,Qe===null?T.effects=[me]:Qe.push(me))}else dt={eventTime:dt,lane:Qe,tag:me.tag,payload:me.payload,callback:me.callback,next:null},Je===null?(Le=Je=dt,we=et):Je=Je.next=dt,J|=Qe;if(me=me.next,me===null){if(me=T.shared.pending,me===null)break;Qe=me,me=Qe.next,Qe.next=null,T.lastBaseUpdate=Qe,T.shared.pending=null}}while(!0);if(Je===null&&(we=et),T.baseState=we,T.firstBaseUpdate=Le,T.lastBaseUpdate=Je,p=T.shared.interleaved,p!==null){T=p;do J|=T.lane,T=T.next;while(T!==p)}else B===null&&(T.shared.lanes=0);hh|=J,u.lanes=J,u.memoizedState=et}}function wo(u,p,v){if(u=p.effects,p.effects=null,u!==null)for(p=0;p<u.length;p++){var N=u[p],T=N.callback;if(T!==null){if(N.callback=null,N=v,typeof T!="function")throw Error(n(191,T));T.call(N)}}}var Go={},ki=Yo(Go),Xr=Yo(Go),ic=Yo(Go);function ul(u){if(u===Go)throw Error(n(174));return u}function Tf(u,p){switch(Qn(ic,p),Qn(Xr,u),Qn(ki,Go),u=p.nodeType,u){case 9:case 11:p=(p=p.documentElement)?p.namespaceURI:Ve(null,"");break;default:u=u===8?p.parentNode:p,p=u.namespaceURI||null,u=u.tagName,p=Ve(p,u)}Yn(ki),Qn(ki,p)}function Ps(){Yn(ki),Yn(Xr),Yn(ic)}function B1(u){ul(ic.current);var p=ul(ki.current),v=Ve(p,u.type);p!==v&&(Qn(Xr,u),Qn(ki,v))}function My(u){Xr.current===u&&(Yn(ki),Yn(Xr))}var mr=Yo(0);function Ko(u){for(var p=u;p!==null;){if(p.tag===13){var v=p.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||v.data==="$?"||v.data==="$!"))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===u)break;for(;p.sibling===null;){if(p.return===null||p.return===u)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Ly=[];function Ry(){for(var u=0;u<Ly.length;u++)Ly[u]._workInProgressVersionPrimary=null;Ly.length=0}var Xp=P.ReactCurrentDispatcher,Qp=P.ReactCurrentBatchConfig,js=0,Sr=null,oi=null,Qr=null,Mf=!1,fl=!1,Lf=0,J5=0;function mi(){throw Error(n(321))}function Jp(u,p){if(p===null)return!1;for(var v=0;v<p.length&&v<u.length;v++)if(!Lr(u[v],p[v]))return!1;return!0}function uh(u,p,v,N,T,B){if(js=B,Sr=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,Xp.current=u===null||u.memoizedState===null?lee:cee,u=v(N,T),fl){B=0;do{if(fl=!1,Lf=0,25<=B)throw Error(n(301));B+=1,Qr=oi=null,p.updateQueue=null,Xp.current=uee,u=v(N,T)}while(fl)}if(Xp.current=V1,p=oi!==null&&oi.next!==null,js=0,Qr=oi=Sr=null,Mf=!1,p)throw Error(n(300));return u}function Cs(){var u=Lf!==0;return Lf=0,u}function Xo(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qr===null?Sr.memoizedState=Qr=u:Qr=Qr.next=u,Qr}function eo(){if(oi===null){var u=Sr.alternate;u=u!==null?u.memoizedState:null}else u=oi.next;var p=Qr===null?Sr.memoizedState:Qr.next;if(p!==null)Qr=p,oi=u;else{if(u===null)throw Error(n(310));oi=u,u={memoizedState:oi.memoizedState,baseState:oi.baseState,baseQueue:oi.baseQueue,queue:oi.queue,next:null},Qr===null?Sr.memoizedState=Qr=u:Qr=Qr.next=u}return Qr}function fh(u,p){return typeof p=="function"?p(u):p}function Zp(u){var p=eo(),v=p.queue;if(v===null)throw Error(n(311));v.lastRenderedReducer=u;var N=oi,T=N.baseQueue,B=v.pending;if(B!==null){if(T!==null){var J=T.next;T.next=B.next,B.next=J}N.baseQueue=T=B,v.pending=null}if(T!==null){B=T.next,N=N.baseState;var me=J=null,we=null,Le=B;do{var Je=Le.lane;if((js&Je)===Je)we!==null&&(we=we.next={lane:0,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null}),N=Le.hasEagerState?Le.eagerState:u(N,Le.action);else{var et={lane:Je,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null};we===null?(me=we=et,J=N):we=we.next=et,Sr.lanes|=Je,hh|=Je}Le=Le.next}while(Le!==null&&Le!==B);we===null?J=N:we.next=me,Lr(N,p.memoizedState)||(So=!0),p.memoizedState=N,p.baseState=J,p.baseQueue=we,v.lastRenderedState=N}if(u=v.interleaved,u!==null){T=u;do B=T.lane,Sr.lanes|=B,hh|=B,T=T.next;while(T!==u)}else T===null&&(v.lanes=0);return[p.memoizedState,v.dispatch]}function ac(u){var p=eo(),v=p.queue;if(v===null)throw Error(n(311));v.lastRenderedReducer=u;var N=v.dispatch,T=v.pending,B=p.memoizedState;if(T!==null){v.pending=null;var J=T=T.next;do B=u(B,J.action),J=J.next;while(J!==T);Lr(B,p.memoizedState)||(So=!0),p.memoizedState=B,p.baseQueue===null&&(p.baseState=B),v.lastRenderedState=B}return[B,N]}function $1(){}function Iy(u,p){var v=Sr,N=eo(),T=p(),B=!Lr(N.memoizedState,T);if(B&&(N.memoizedState=T,So=!0),N=N.queue,nm(U1.bind(null,v,N,u),[u]),N.getSnapshot!==p||B||Qr!==null&&Qr.memoizedState.tag&1){if(v.flags|=2048,to(9,Dy.bind(null,v,N,T,p),void 0,null),ra===null)throw Error(n(349));(js&30)!==0||q1(v,p,T)}return T}function q1(u,p,v){u.flags|=16384,u={getSnapshot:p,value:v},p=Sr.updateQueue,p===null?(p={lastEffect:null,stores:null},Sr.updateQueue=p,p.stores=[u]):(v=p.stores,v===null?p.stores=[u]:v.push(u))}function Dy(u,p,v,N){p.value=v,p.getSnapshot=N,Rf(p)&&em(u)}function U1(u,p,v){return v(function(){Rf(p)&&em(u)})}function Rf(u){var p=u.getSnapshot;u=u.value;try{var v=p();return!Lr(u,v)}catch{return!0}}function em(u){var p=ir(u,1);p!==null&&gl(p,u,1,-1)}function dh(u){var p=Xo();return typeof u=="function"&&(u=u()),p.memoizedState=p.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fh,lastRenderedState:u},p.queue=u,u=u.dispatch=see.bind(null,Sr,u),[p.memoizedState,u]}function to(u,p,v,N){return u={tag:u,create:p,destroy:v,deps:N,next:null},p=Sr.updateQueue,p===null?(p={lastEffect:null,stores:null},Sr.updateQueue=p,p.lastEffect=u.next=u):(v=p.lastEffect,v===null?p.lastEffect=u.next=u:(N=v.next,v.next=u,u.next=N,p.lastEffect=u)),u}function dl(){return eo().memoizedState}function Qo(u,p,v,N){var T=Xo();Sr.flags|=u,T.memoizedState=to(1|p,v,void 0,N===void 0?null:N)}function vu(u,p,v,N){var T=eo();N=N===void 0?null:N;var B=void 0;if(oi!==null){var J=oi.memoizedState;if(B=J.destroy,N!==null&&Jp(N,J.deps)){T.memoizedState=to(p,v,B,N);return}}Sr.flags|=u,T.memoizedState=to(1|p,v,B,N)}function tm(u,p){return Qo(8390656,8,u,p)}function nm(u,p){return vu(2048,8,u,p)}function z1(u,p){return vu(4,2,u,p)}function rm(u,p){return vu(4,4,u,p)}function im(u,p){if(typeof p=="function")return u=u(),p(u),function(){p(null)};if(p!=null)return u=u(),p.current=u,function(){p.current=null}}function $T(u,p,v){return v=v!=null?v.concat([u]):null,vu(4,4,im.bind(null,p,u),v)}function Z5(){}function qT(u,p){var v=eo();p=p===void 0?null:p;var N=v.memoizedState;return N!==null&&p!==null&&Jp(p,N[1])?N[0]:(v.memoizedState=[u,p],u)}function UT(u,p){var v=eo();p=p===void 0?null:p;var N=v.memoizedState;return N!==null&&p!==null&&Jp(p,N[1])?N[0]:(u=u(),v.memoizedState=[u,p],u)}function zT(u,p,v){return(js&21)===0?(u.baseState&&(u.baseState=!1,So=!0),u.memoizedState=v):(Lr(v,p)||(v=Vd(),Sr.lanes|=v,hh|=v,u.baseState=!0),p)}function aee(u,p){var v=Mn;Mn=v!==0&&4>v?v:4,u(!0);var N=Qp.transition;Qp.transition={};try{u(!1),p()}finally{Mn=v,Qp.transition=N}}function VT(){return eo().memoizedState}function oee(u,p,v){var N=Bf(u);if(v={lane:N,action:v,hasEagerState:!1,eagerState:null,next:null},WT(u))HT(p,v);else if(v=Jn(u,p,v,N),v!==null){var T=ro();gl(v,u,N,T),YT(v,p,N)}}function see(u,p,v){var N=Bf(u),T={lane:N,action:v,hasEagerState:!1,eagerState:null,next:null};if(WT(u))HT(p,T);else{var B=u.alternate;if(u.lanes===0&&(B===null||B.lanes===0)&&(B=p.lastRenderedReducer,B!==null))try{var J=p.lastRenderedState,me=B(J,v);if(T.hasEagerState=!0,T.eagerState=me,Lr(me,J)){var we=p.interleaved;we===null?(T.next=T,ea(p)):(T.next=we.next,we.next=T),p.interleaved=T;return}}catch{}finally{}v=Jn(u,p,T,N),v!==null&&(T=ro(),gl(v,u,N,T),YT(v,p,N))}}function WT(u){var p=u.alternate;return u===Sr||p!==null&&p===Sr}function HT(u,p){fl=Mf=!0;var v=u.pending;v===null?p.next=p:(p.next=v.next,v.next=p),u.pending=p}function YT(u,p,v){if((v&4194240)!==0){var N=p.lanes;N&=u.pendingLanes,v|=N,p.lanes=v,df(u,v)}}var V1={readContext:Fr,useCallback:mi,useContext:mi,useEffect:mi,useImperativeHandle:mi,useInsertionEffect:mi,useLayoutEffect:mi,useMemo:mi,useReducer:mi,useRef:mi,useState:mi,useDebugValue:mi,useDeferredValue:mi,useTransition:mi,useMutableSource:mi,useSyncExternalStore:mi,useId:mi,unstable_isNewReconciler:!1},lee={readContext:Fr,useCallback:function(u,p){return Xo().memoizedState=[u,p===void 0?null:p],u},useContext:Fr,useEffect:tm,useImperativeHandle:function(u,p,v){return v=v!=null?v.concat([u]):null,Qo(4194308,4,im.bind(null,p,u),v)},useLayoutEffect:function(u,p){return Qo(4194308,4,u,p)},useInsertionEffect:function(u,p){return Qo(4,2,u,p)},useMemo:function(u,p){var v=Xo();return p=p===void 0?null:p,u=u(),v.memoizedState=[u,p],u},useReducer:function(u,p,v){var N=Xo();return p=v!==void 0?v(p):p,N.memoizedState=N.baseState=p,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:p},N.queue=u,u=u.dispatch=oee.bind(null,Sr,u),[N.memoizedState,u]},useRef:function(u){var p=Xo();return u={current:u},p.memoizedState=u},useState:dh,useDebugValue:Z5,useDeferredValue:function(u){return Xo().memoizedState=u},useTransition:function(){var u=dh(!1),p=u[0];return u=aee.bind(null,u[1]),Xo().memoizedState=u,[p,u]},useMutableSource:function(){},useSyncExternalStore:function(u,p,v){var N=Sr,T=Xo();if(qe){if(v===void 0)throw Error(n(407));v=v()}else{if(v=p(),ra===null)throw Error(n(349));(js&30)!==0||q1(N,p,v)}T.memoizedState=v;var B={value:v,getSnapshot:p};return T.queue=B,tm(U1.bind(null,N,B,u),[u]),N.flags|=2048,to(9,Dy.bind(null,N,B,v,p),void 0,null),v},useId:function(){var u=Xo(),p=ra.identifierPrefix;if(qe){var v=ue,N=Ce;v=(N&~(1<<32-ei(N)-1)).toString(32)+v,p=":"+p+"R"+v,v=Lf++,0<v&&(p+="H"+v.toString(32)),p+=":"}else v=J5++,p=":"+p+"r"+v.toString(32)+":";return u.memoizedState=p},unstable_isNewReconciler:!1},cee={readContext:Fr,useCallback:qT,useContext:Fr,useEffect:nm,useImperativeHandle:$T,useInsertionEffect:z1,useLayoutEffect:rm,useMemo:UT,useReducer:Zp,useRef:dl,useState:function(){return Zp(fh)},useDebugValue:Z5,useDeferredValue:function(u){var p=eo();return zT(p,oi.memoizedState,u)},useTransition:function(){var u=Zp(fh)[0],p=eo().memoizedState;return[u,p]},useMutableSource:$1,useSyncExternalStore:Iy,useId:VT,unstable_isNewReconciler:!1},uee={readContext:Fr,useCallback:qT,useContext:Fr,useEffect:nm,useImperativeHandle:$T,useInsertionEffect:z1,useLayoutEffect:rm,useMemo:UT,useReducer:ac,useRef:dl,useState:function(){return ac(fh)},useDebugValue:Z5,useDeferredValue:function(u){var p=eo();return oi===null?p.memoizedState=u:zT(p,oi.memoizedState,u)},useTransition:function(){var u=ac(fh)[0],p=eo().memoizedState;return[u,p]},useMutableSource:$1,useSyncExternalStore:Iy,useId:VT,unstable_isNewReconciler:!1};function hl(u,p){if(u&&u.defaultProps){p=z({},p),u=u.defaultProps;for(var v in u)p[v]===void 0&&(p[v]=u[v]);return p}return p}function eS(u,p,v,N){p=u.memoizedState,v=v(N,p),v=v==null?p:z({},p,v),u.memoizedState=v,u.lanes===0&&(u.updateQueue.baseState=v)}var W1={isMounted:function(u){return(u=u._reactInternals)?Ii(u)===u:!1},enqueueSetState:function(u,p,v){u=u._reactInternals;var N=ro(),T=Bf(u),B=Gr(N,T);B.payload=p,v!=null&&(B.callback=v),p=Kr(u,B,T),p!==null&&(gl(p,u,T,N),ta(p,u,T))},enqueueReplaceState:function(u,p,v){u=u._reactInternals;var N=ro(),T=Bf(u),B=Gr(N,T);B.tag=1,B.payload=p,v!=null&&(B.callback=v),p=Kr(u,B,T),p!==null&&(gl(p,u,T,N),ta(p,u,T))},enqueueForceUpdate:function(u,p){u=u._reactInternals;var v=ro(),N=Bf(u),T=Gr(v,N);T.tag=2,p!=null&&(T.callback=p),p=Kr(u,T,N),p!==null&&(gl(p,u,N,v),ta(p,u,N))}};function GT(u,p,v,N,T,B,J){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(N,B,J):p.prototype&&p.prototype.isPureReactComponent?!Sa(v,N)||!Sa(T,B):!0}function KT(u,p,v){var N=!1,T=rc,B=p.contextType;return typeof B=="object"&&B!==null?B=Fr(B):(T=Aa(p)?gu:Bi.current,N=p.contextTypes,B=(N=N!=null)?Of(u,T):rc),p=new p(v,B),u.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=W1,u.stateNode=p,p._reactInternals=u,N&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=T,u.__reactInternalMemoizedMaskedChildContext=B),p}function XT(u,p,v,N){u=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(v,N),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(v,N),p.state!==u&&W1.enqueueReplaceState(p,p.state,null)}function tS(u,p,v,N){var T=u.stateNode;T.props=v,T.state=u.memoizedState,T.refs={},$i(u);var B=p.contextType;typeof B=="object"&&B!==null?T.context=Fr(B):(B=Aa(p)?gu:Bi.current,T.context=Of(u,B)),T.state=u.memoizedState,B=p.getDerivedStateFromProps,typeof B=="function"&&(eS(u,p,B,v),T.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(p=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),p!==T.state&&W1.enqueueReplaceState(T,T.state,null),na(u,v,T,N),T.state=u.memoizedState),typeof T.componentDidMount=="function"&&(u.flags|=4194308)}function am(u,p){try{var v="",N=p;do v+=le(N),N=N.return;while(N);var T=v}catch(B){T=`
Error generating stack: `+B.message+`
`+B.stack}return{value:u,source:p,stack:T,digest:null}}function nS(u,p,v){return{value:u,source:null,stack:v??null,digest:p??null}}function rS(u,p){try{console.error(p.value)}catch(v){setTimeout(function(){throw v})}}var fee=typeof WeakMap=="function"?WeakMap:Map;function QT(u,p,v){v=Gr(-1,v),v.tag=3,v.payload={element:null};var N=p.value;return v.callback=function(){J1||(J1=!0,vS=N),rS(u,p)},v}function JT(u,p,v){v=Gr(-1,v),v.tag=3;var N=u.type.getDerivedStateFromError;if(typeof N=="function"){var T=p.value;v.payload=function(){return N(T)},v.callback=function(){rS(u,p)}}var B=u.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(v.callback=function(){rS(u,p),typeof N!="function"&&(Df===null?Df=new Set([this]):Df.add(this));var J=p.stack;this.componentDidCatch(p.value,{componentStack:J!==null?J:""})}),v}function ZT(u,p,v){var N=u.pingCache;if(N===null){N=u.pingCache=new fee;var T=new Set;N.set(p,T)}else T=N.get(p),T===void 0&&(T=new Set,N.set(p,T));T.has(v)||(T.add(v),u=kee.bind(null,u,p,v),p.then(u,u))}function eM(u){do{var p;if((p=u.tag===13)&&(p=u.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return u;u=u.return}while(u!==null);return null}function tM(u,p,v,N,T){return(u.mode&1)===0?(u===p?u.flags|=65536:(u.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(p=Gr(-1,1),p.tag=2,Kr(v,p,1))),v.lanes|=1),u):(u.flags|=65536,u.lanes=T,u)}var dee=P.ReactCurrentOwner,So=!1;function no(u,p,v,N){p.child=u===null?jr(p,null,v,N):ii(p,u.child,v,N)}function nM(u,p,v,N,T){v=v.render;var B=p.ref;return Dr(p,T),N=uh(u,p,v,N,B,T),v=Cs(),u!==null&&!So?(p.updateQueue=u.updateQueue,p.flags&=-2053,u.lanes&=~T,xu(u,p,T)):(qe&&v&&Fe(p),p.flags|=1,no(u,p,N,T),p.child)}function rM(u,p,v,N,T){if(u===null){var B=v.type;return typeof B=="function"&&!kS(B)&&B.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(p.tag=15,p.type=B,iM(u,p,B,N,T)):(u=ix(v.type,null,N,p,p.mode,T),u.ref=p.ref,u.return=p,p.child=u)}if(B=u.child,(u.lanes&T)===0){var J=B.memoizedProps;if(v=v.compare,v=v!==null?v:Sa,v(J,N)&&u.ref===p.ref)return xu(u,p,T)}return p.flags|=1,u=qf(B,N),u.ref=p.ref,u.return=p,p.child=u}function iM(u,p,v,N,T){if(u!==null){var B=u.memoizedProps;if(Sa(B,N)&&u.ref===p.ref)if(So=!1,p.pendingProps=N=B,(u.lanes&T)!==0)(u.flags&131072)!==0&&(So=!0);else return p.lanes=u.lanes,xu(u,p,T)}return iS(u,p,v,N,T)}function aM(u,p,v){var N=p.pendingProps,T=N.children,B=u!==null?u.memoizedState:null;if(N.mode==="hidden")if((p.mode&1)===0)p.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qn(sm,Jo),Jo|=v;else{if((v&1073741824)===0)return u=B!==null?B.baseLanes|v:v,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:u,cachePool:null,transitions:null},p.updateQueue=null,Qn(sm,Jo),Jo|=u,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},N=B!==null?B.baseLanes:v,Qn(sm,Jo),Jo|=N}else B!==null?(N=B.baseLanes|v,p.memoizedState=null):N=v,Qn(sm,Jo),Jo|=N;return no(u,p,T,v),p.child}function oM(u,p){var v=p.ref;(u===null&&v!==null||u!==null&&u.ref!==v)&&(p.flags|=512,p.flags|=2097152)}function iS(u,p,v,N,T){var B=Aa(v)?gu:Bi.current;return B=Of(p,B),Dr(p,T),v=uh(u,p,v,N,B,T),N=Cs(),u!==null&&!So?(p.updateQueue=u.updateQueue,p.flags&=-2053,u.lanes&=~T,xu(u,p,T)):(qe&&N&&Fe(p),p.flags|=1,no(u,p,v,T),p.child)}function sM(u,p,v,N,T){if(Aa(v)){var B=!0;yu(p)}else B=!1;if(Dr(p,T),p.stateNode===null)Y1(u,p),KT(p,v,N),tS(p,v,N,T),N=!0;else if(u===null){var J=p.stateNode,me=p.memoizedProps;J.props=me;var we=J.context,Le=v.contextType;typeof Le=="object"&&Le!==null?Le=Fr(Le):(Le=Aa(v)?gu:Bi.current,Le=Of(p,Le));var Je=v.getDerivedStateFromProps,et=typeof Je=="function"||typeof J.getSnapshotBeforeUpdate=="function";et||typeof J.UNSAFE_componentWillReceiveProps!="function"&&typeof J.componentWillReceiveProps!="function"||(me!==N||we!==Le)&&XT(p,J,N,Le),ai=!1;var Qe=p.memoizedState;J.state=Qe,na(p,N,J,T),we=p.memoizedState,me!==N||Qe!==we||ka.current||ai?(typeof Je=="function"&&(eS(p,v,Je,N),we=p.memoizedState),(me=ai||GT(p,v,me,N,Qe,we,Le))?(et||typeof J.UNSAFE_componentWillMount!="function"&&typeof J.componentWillMount!="function"||(typeof J.componentWillMount=="function"&&J.componentWillMount(),typeof J.UNSAFE_componentWillMount=="function"&&J.UNSAFE_componentWillMount()),typeof J.componentDidMount=="function"&&(p.flags|=4194308)):(typeof J.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=N,p.memoizedState=we),J.props=N,J.state=we,J.context=Le,N=me):(typeof J.componentDidMount=="function"&&(p.flags|=4194308),N=!1)}else{J=p.stateNode,Pa(u,p),me=p.memoizedProps,Le=p.type===p.elementType?me:hl(p.type,me),J.props=Le,et=p.pendingProps,Qe=J.context,we=v.contextType,typeof we=="object"&&we!==null?we=Fr(we):(we=Aa(v)?gu:Bi.current,we=Of(p,we));var dt=v.getDerivedStateFromProps;(Je=typeof dt=="function"||typeof J.getSnapshotBeforeUpdate=="function")||typeof J.UNSAFE_componentWillReceiveProps!="function"&&typeof J.componentWillReceiveProps!="function"||(me!==et||Qe!==we)&&XT(p,J,N,we),ai=!1,Qe=p.memoizedState,J.state=Qe,na(p,N,J,T);var At=p.memoizedState;me!==et||Qe!==At||ka.current||ai?(typeof dt=="function"&&(eS(p,v,dt,N),At=p.memoizedState),(Le=ai||GT(p,v,Le,N,Qe,At,we)||!1)?(Je||typeof J.UNSAFE_componentWillUpdate!="function"&&typeof J.componentWillUpdate!="function"||(typeof J.componentWillUpdate=="function"&&J.componentWillUpdate(N,At,we),typeof J.UNSAFE_componentWillUpdate=="function"&&J.UNSAFE_componentWillUpdate(N,At,we)),typeof J.componentDidUpdate=="function"&&(p.flags|=4),typeof J.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof J.componentDidUpdate!="function"||me===u.memoizedProps&&Qe===u.memoizedState||(p.flags|=4),typeof J.getSnapshotBeforeUpdate!="function"||me===u.memoizedProps&&Qe===u.memoizedState||(p.flags|=1024),p.memoizedProps=N,p.memoizedState=At),J.props=N,J.state=At,J.context=we,N=Le):(typeof J.componentDidUpdate!="function"||me===u.memoizedProps&&Qe===u.memoizedState||(p.flags|=4),typeof J.getSnapshotBeforeUpdate!="function"||me===u.memoizedProps&&Qe===u.memoizedState||(p.flags|=1024),N=!1)}return aS(u,p,v,N,B,T)}function aS(u,p,v,N,T,B){oM(u,p);var J=(p.flags&128)!==0;if(!N&&!J)return T&&F1(p,v,!1),xu(u,p,B);N=p.stateNode,dee.current=p;var me=J&&typeof v.getDerivedStateFromError!="function"?null:N.render();return p.flags|=1,u!==null&&J?(p.child=ii(p,u.child,null,B),p.child=ii(p,null,me,B)):no(u,p,me,B),p.memoizedState=N.state,T&&F1(p,v,!0),p.child}function lM(u){var p=u.stateNode;p.pendingContext?D1(u,p.pendingContext,p.pendingContext!==p.context):p.context&&D1(u,p.context,!1),Tf(u,p.containerInfo)}function cM(u,p,v,N,T){return mt(),ot(T),p.flags|=256,no(u,p,v,N),p.child}var oS={dehydrated:null,treeContext:null,retryLane:0};function sS(u){return{baseLanes:u,cachePool:null,transitions:null}}function uM(u,p,v){var N=p.pendingProps,T=mr.current,B=!1,J=(p.flags&128)!==0,me;if((me=J)||(me=u!==null&&u.memoizedState===null?!1:(T&2)!==0),me?(B=!0,p.flags&=-129):(u===null||u.memoizedState!==null)&&(T|=1),Qn(mr,T&1),u===null)return Nt(p),u=p.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?((p.mode&1)===0?p.lanes=1:u.data==="$!"?p.lanes=8:p.lanes=1073741824,null):(J=N.children,u=N.fallback,B?(N=p.mode,B=p.child,J={mode:"hidden",children:J},(N&1)===0&&B!==null?(B.childLanes=0,B.pendingProps=J):B=ax(J,N,0,null),u=yh(u,N,v,null),B.return=p,u.return=p,B.sibling=u,p.child=B,p.child.memoizedState=sS(v),p.memoizedState=oS,u):lS(p,J));if(T=u.memoizedState,T!==null&&(me=T.dehydrated,me!==null))return hee(u,p,J,N,me,T,v);if(B){B=N.fallback,J=p.mode,T=u.child,me=T.sibling;var we={mode:"hidden",children:N.children};return(J&1)===0&&p.child!==T?(N=p.child,N.childLanes=0,N.pendingProps=we,p.deletions=null):(N=qf(T,we),N.subtreeFlags=T.subtreeFlags&14680064),me!==null?B=qf(me,B):(B=yh(B,J,v,null),B.flags|=2),B.return=p,N.return=p,N.sibling=B,p.child=N,N=B,B=p.child,J=u.child.memoizedState,J=J===null?sS(v):{baseLanes:J.baseLanes|v,cachePool:null,transitions:J.transitions},B.memoizedState=J,B.childLanes=u.childLanes&~v,p.memoizedState=oS,N}return B=u.child,u=B.sibling,N=qf(B,{mode:"visible",children:N.children}),(p.mode&1)===0&&(N.lanes=v),N.return=p,N.sibling=null,u!==null&&(v=p.deletions,v===null?(p.deletions=[u],p.flags|=16):v.push(u)),p.child=N,p.memoizedState=null,N}function lS(u,p){return p=ax({mode:"visible",children:p},u.mode,0,null),p.return=u,u.child=p}function H1(u,p,v,N){return N!==null&&ot(N),ii(p,u.child,null,v),u=lS(p,p.pendingProps.children),u.flags|=2,p.memoizedState=null,u}function hee(u,p,v,N,T,B,J){if(v)return p.flags&256?(p.flags&=-257,N=nS(Error(n(422))),H1(u,p,J,N)):p.memoizedState!==null?(p.child=u.child,p.flags|=128,null):(B=N.fallback,T=p.mode,N=ax({mode:"visible",children:N.children},T,0,null),B=yh(B,T,J,null),B.flags|=2,N.return=p,B.return=p,N.sibling=B,p.child=N,(p.mode&1)!==0&&ii(p,u.child,null,J),p.child.memoizedState=sS(J),p.memoizedState=oS,B);if((p.mode&1)===0)return H1(u,p,J,null);if(T.data==="$!"){if(N=T.nextSibling&&T.nextSibling.dataset,N)var me=N.dgst;return N=me,B=Error(n(419)),N=nS(B,N,void 0),H1(u,p,J,N)}if(me=(J&u.childLanes)!==0,So||me){if(N=ra,N!==null){switch(J&-J){case 4:T=2;break;case 16:T=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:T=32;break;case 536870912:T=268435456;break;default:T=0}T=(T&(N.suspendedLanes|J))!==0?0:T,T!==0&&T!==B.retryLane&&(B.retryLane=T,ir(u,T),gl(N,u,T,-1))}return NS(),N=nS(Error(n(421))),H1(u,p,J,N)}return T.data==="$?"?(p.flags|=128,p.child=u.child,p=Aee.bind(null,u),T._reactRetry=p,null):(u=B.treeContext,De=fa(T.nextSibling),Ie=p,qe=!0,We=null,u!==null&&(ae[ce++]=Ce,ae[ce++]=ue,ae[ce++]=be,Ce=u.id,ue=u.overflow,be=p),p=lS(p,N.children),p.flags|=4096,p)}function fM(u,p,v){u.lanes|=p;var N=u.alternate;N!==null&&(N.lanes|=p),Fn(u.return,p,v)}function cS(u,p,v,N,T){var B=u.memoizedState;B===null?u.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:N,tail:v,tailMode:T}:(B.isBackwards=p,B.rendering=null,B.renderingStartTime=0,B.last=N,B.tail=v,B.tailMode=T)}function dM(u,p,v){var N=p.pendingProps,T=N.revealOrder,B=N.tail;if(no(u,p,N.children,v),N=mr.current,(N&2)!==0)N=N&1|2,p.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=p.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&fM(u,v,p);else if(u.tag===19)fM(u,v,p);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===p)break e;for(;u.sibling===null;){if(u.return===null||u.return===p)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}N&=1}if(Qn(mr,N),(p.mode&1)===0)p.memoizedState=null;else switch(T){case"forwards":for(v=p.child,T=null;v!==null;)u=v.alternate,u!==null&&Ko(u)===null&&(T=v),v=v.sibling;v=T,v===null?(T=p.child,p.child=null):(T=v.sibling,v.sibling=null),cS(p,!1,T,v,B);break;case"backwards":for(v=null,T=p.child,p.child=null;T!==null;){if(u=T.alternate,u!==null&&Ko(u)===null){p.child=T;break}u=T.sibling,T.sibling=v,v=T,T=u}cS(p,!0,v,null,B);break;case"together":cS(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function Y1(u,p){(p.mode&1)===0&&u!==null&&(u.alternate=null,p.alternate=null,p.flags|=2)}function xu(u,p,v){if(u!==null&&(p.dependencies=u.dependencies),hh|=p.lanes,(v&p.childLanes)===0)return null;if(u!==null&&p.child!==u.child)throw Error(n(153));if(p.child!==null){for(u=p.child,v=qf(u,u.pendingProps),p.child=v,v.return=p;u.sibling!==null;)u=u.sibling,v=v.sibling=qf(u,u.pendingProps),v.return=p;v.sibling=null}return p.child}function pee(u,p,v){switch(p.tag){case 3:lM(p),mt();break;case 5:B1(p);break;case 1:Aa(p.type)&&yu(p);break;case 4:Tf(p,p.stateNode.containerInfo);break;case 10:var N=p.type._context,T=p.memoizedProps.value;Qn(pi,N._currentValue),N._currentValue=T;break;case 13:if(N=p.memoizedState,N!==null)return N.dehydrated!==null?(Qn(mr,mr.current&1),p.flags|=128,null):(v&p.child.childLanes)!==0?uM(u,p,v):(Qn(mr,mr.current&1),u=xu(u,p,v),u!==null?u.sibling:null);Qn(mr,mr.current&1);break;case 19:if(N=(v&p.childLanes)!==0,(u.flags&128)!==0){if(N)return dM(u,p,v);p.flags|=128}if(T=p.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),Qn(mr,mr.current),N)break;return null;case 22:case 23:return p.lanes=0,aM(u,p,v)}return xu(u,p,v)}var hM,uS,pM,mM;hM=function(u,p){for(var v=p.child;v!==null;){if(v.tag===5||v.tag===6)u.appendChild(v.stateNode);else if(v.tag!==4&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===p)break;for(;v.sibling===null;){if(v.return===null||v.return===p)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},uS=function(){},pM=function(u,p,v,N){var T=u.memoizedProps;if(T!==N){u=p.stateNode,ul(ki.current);var B=null;switch(v){case"input":T=Ye(u,T),N=Ye(u,N),B=[];break;case"select":T=z({},T,{value:void 0}),N=z({},N,{value:void 0}),B=[];break;case"textarea":T=xt(u,T),N=xt(u,N),B=[];break;default:typeof T.onClick!="function"&&typeof N.onClick=="function"&&(u.onclick=jf)}un(v,N);var J;v=null;for(Le in T)if(!N.hasOwnProperty(Le)&&T.hasOwnProperty(Le)&&T[Le]!=null)if(Le==="style"){var me=T[Le];for(J in me)me.hasOwnProperty(J)&&(v||(v={}),v[J]="")}else Le!=="dangerouslySetInnerHTML"&&Le!=="children"&&Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&Le!=="autoFocus"&&(i.hasOwnProperty(Le)?B||(B=[]):(B=B||[]).push(Le,null));for(Le in N){var we=N[Le];if(me=T!=null?T[Le]:void 0,N.hasOwnProperty(Le)&&we!==me&&(we!=null||me!=null))if(Le==="style")if(me){for(J in me)!me.hasOwnProperty(J)||we&&we.hasOwnProperty(J)||(v||(v={}),v[J]="");for(J in we)we.hasOwnProperty(J)&&me[J]!==we[J]&&(v||(v={}),v[J]=we[J])}else v||(B||(B=[]),B.push(Le,v)),v=we;else Le==="dangerouslySetInnerHTML"?(we=we?we.__html:void 0,me=me?me.__html:void 0,we!=null&&me!==we&&(B=B||[]).push(Le,we)):Le==="children"?typeof we!="string"&&typeof we!="number"||(B=B||[]).push(Le,""+we):Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&(i.hasOwnProperty(Le)?(we!=null&&Le==="onScroll"&&nr("scroll",u),B||me===we||(B=[])):(B=B||[]).push(Le,we))}v&&(B=B||[]).push("style",v);var Le=B;(p.updateQueue=Le)&&(p.flags|=4)}},mM=function(u,p,v,N){v!==N&&(p.flags|=4)};function Fy(u,p){if(!qe)switch(u.tailMode){case"hidden":p=u.tail;for(var v=null;p!==null;)p.alternate!==null&&(v=p),p=p.sibling;v===null?u.tail=null:v.sibling=null;break;case"collapsed":v=u.tail;for(var N=null;v!==null;)v.alternate!==null&&(N=v),v=v.sibling;N===null?p||u.tail===null?u.tail=null:u.tail.sibling=null:N.sibling=null}}function ja(u){var p=u.alternate!==null&&u.alternate.child===u.child,v=0,N=0;if(p)for(var T=u.child;T!==null;)v|=T.lanes|T.childLanes,N|=T.subtreeFlags&14680064,N|=T.flags&14680064,T.return=u,T=T.sibling;else for(T=u.child;T!==null;)v|=T.lanes|T.childLanes,N|=T.subtreeFlags,N|=T.flags,T.return=u,T=T.sibling;return u.subtreeFlags|=N,u.childLanes=v,p}function mee(u,p,v){var N=p.pendingProps;switch(Te(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ja(p),null;case 1:return Aa(p.type)&&Kp(),ja(p),null;case 3:return N=p.stateNode,Ps(),Yn(ka),Yn(Bi),Ry(),N.pendingContext&&(N.context=N.pendingContext,N.pendingContext=null),(u===null||u.child===null)&&(Ir(p)?p.flags|=4:u===null||u.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,We!==null&&(wS(We),We=null))),uS(u,p),ja(p),null;case 5:My(p);var T=ul(ic.current);if(v=p.type,u!==null&&p.stateNode!=null)pM(u,p,v,N,T),u.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!N){if(p.stateNode===null)throw Error(n(166));return ja(p),null}if(u=ul(ki.current),Ir(p)){N=p.stateNode,v=p.type;var B=p.memoizedProps;switch(N[As]=p,N[Cf]=B,u=(p.mode&1)!==0,v){case"dialog":nr("cancel",N),nr("close",N);break;case"iframe":case"object":case"embed":nr("load",N);break;case"video":case"audio":for(T=0;T<tc.length;T++)nr(tc[T],N);break;case"source":nr("error",N);break;case"img":case"image":case"link":nr("error",N),nr("load",N);break;case"details":nr("toggle",N);break;case"input":oe(N,B),nr("invalid",N);break;case"select":N._wrapperState={wasMultiple:!!B.multiple},nr("invalid",N);break;case"textarea":Ct(N,B),nr("invalid",N)}un(v,B),T=null;for(var J in B)if(B.hasOwnProperty(J)){var me=B[J];J==="children"?typeof me=="string"?N.textContent!==me&&(B.suppressHydrationWarning!==!0&&Gp(N.textContent,me,u),T=["children",me]):typeof me=="number"&&N.textContent!==""+me&&(B.suppressHydrationWarning!==!0&&Gp(N.textContent,me,u),T=["children",""+me]):i.hasOwnProperty(J)&&me!=null&&J==="onScroll"&&nr("scroll",N)}switch(v){case"input":Pe(N),gt(N,B,!0);break;case"textarea":Pe(N),sn(N);break;case"select":case"option":break;default:typeof B.onClick=="function"&&(N.onclick=jf)}N=T,p.updateQueue=N,N!==null&&(p.flags|=4)}else{J=T.nodeType===9?T:T.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=Ee(v)),u==="http://www.w3.org/1999/xhtml"?v==="script"?(u=J.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):typeof N.is=="string"?u=J.createElement(v,{is:N.is}):(u=J.createElement(v),v==="select"&&(J=u,N.multiple?J.multiple=!0:N.size&&(J.size=N.size))):u=J.createElementNS(u,v),u[As]=p,u[Cf]=N,hM(u,p,!1,!1),p.stateNode=u;e:{switch(J=kt(v,N),v){case"dialog":nr("cancel",u),nr("close",u),T=N;break;case"iframe":case"object":case"embed":nr("load",u),T=N;break;case"video":case"audio":for(T=0;T<tc.length;T++)nr(tc[T],u);T=N;break;case"source":nr("error",u),T=N;break;case"img":case"image":case"link":nr("error",u),nr("load",u),T=N;break;case"details":nr("toggle",u),T=N;break;case"input":oe(u,N),T=Ye(u,N),nr("invalid",u);break;case"option":T=N;break;case"select":u._wrapperState={wasMultiple:!!N.multiple},T=z({},N,{value:void 0}),nr("invalid",u);break;case"textarea":Ct(u,N),T=xt(u,N),nr("invalid",u);break;default:T=N}un(v,T),me=T;for(B in me)if(me.hasOwnProperty(B)){var we=me[B];B==="style"?Gt(u,we):B==="dangerouslySetInnerHTML"?(we=we?we.__html:void 0,we!=null&&Ze(u,we)):B==="children"?typeof we=="string"?(v!=="textarea"||we!=="")&<(u,we):typeof we=="number"&<(u,""+we):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(i.hasOwnProperty(B)?we!=null&&B==="onScroll"&&nr("scroll",u):we!=null&&k(u,B,we,J))}switch(v){case"input":Pe(u),gt(u,N,!1);break;case"textarea":Pe(u),sn(u);break;case"option":N.value!=null&&u.setAttribute("value",""+ve(N.value));break;case"select":u.multiple=!!N.multiple,B=N.value,B!=null?st(u,!!N.multiple,B,!1):N.defaultValue!=null&&st(u,!!N.multiple,N.defaultValue,!0);break;default:typeof T.onClick=="function"&&(u.onclick=jf)}switch(v){case"button":case"input":case"select":case"textarea":N=!!N.autoFocus;break e;case"img":N=!0;break e;default:N=!1}}N&&(p.flags|=4)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return ja(p),null;case 6:if(u&&p.stateNode!=null)mM(u,p,u.memoizedProps,N);else{if(typeof N!="string"&&p.stateNode===null)throw Error(n(166));if(v=ul(ic.current),ul(ki.current),Ir(p)){if(N=p.stateNode,v=p.memoizedProps,N[As]=p,(B=N.nodeValue!==v)&&(u=Ie,u!==null))switch(u.tag){case 3:Gp(N.nodeValue,v,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&Gp(N.nodeValue,v,(u.mode&1)!==0)}B&&(p.flags|=4)}else N=(v.nodeType===9?v:v.ownerDocument).createTextNode(N),N[As]=p,p.stateNode=N}return ja(p),null;case 13:if(Yn(mr),N=p.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(qe&&De!==null&&(p.mode&1)!==0&&(p.flags&128)===0)ln(),mt(),p.flags|=98560,B=!1;else if(B=Ir(p),N!==null&&N.dehydrated!==null){if(u===null){if(!B)throw Error(n(318));if(B=p.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(n(317));B[As]=p}else mt(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;ja(p),B=!1}else We!==null&&(wS(We),We=null),B=!0;if(!B)return p.flags&65536?p:null}return(p.flags&128)!==0?(p.lanes=v,p):(N=N!==null,N!==(u!==null&&u.memoizedState!==null)&&N&&(p.child.flags|=8192,(p.mode&1)!==0&&(u===null||(mr.current&1)!==0?qi===0&&(qi=3):NS())),p.updateQueue!==null&&(p.flags|=4),ja(p),null);case 4:return Ps(),uS(u,p),u===null&&du(p.stateNode.containerInfo),ja(p),null;case 10:return wr(p.type._context),ja(p),null;case 17:return Aa(p.type)&&Kp(),ja(p),null;case 19:if(Yn(mr),B=p.memoizedState,B===null)return ja(p),null;if(N=(p.flags&128)!==0,J=B.rendering,J===null)if(N)Fy(B,!1);else{if(qi!==0||u!==null&&(u.flags&128)!==0)for(u=p.child;u!==null;){if(J=Ko(u),J!==null){for(p.flags|=128,Fy(B,!1),N=J.updateQueue,N!==null&&(p.updateQueue=N,p.flags|=4),p.subtreeFlags=0,N=v,v=p.child;v!==null;)B=v,u=N,B.flags&=14680066,J=B.alternate,J===null?(B.childLanes=0,B.lanes=u,B.child=null,B.subtreeFlags=0,B.memoizedProps=null,B.memoizedState=null,B.updateQueue=null,B.dependencies=null,B.stateNode=null):(B.childLanes=J.childLanes,B.lanes=J.lanes,B.child=J.child,B.subtreeFlags=0,B.deletions=null,B.memoizedProps=J.memoizedProps,B.memoizedState=J.memoizedState,B.updateQueue=J.updateQueue,B.type=J.type,u=J.dependencies,B.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),v=v.sibling;return Qn(mr,mr.current&1|2),p.child}u=u.sibling}B.tail!==null&&pr()>lm&&(p.flags|=128,N=!0,Fy(B,!1),p.lanes=4194304)}else{if(!N)if(u=Ko(J),u!==null){if(p.flags|=128,N=!0,v=u.updateQueue,v!==null&&(p.updateQueue=v,p.flags|=4),Fy(B,!0),B.tail===null&&B.tailMode==="hidden"&&!J.alternate&&!qe)return ja(p),null}else 2*pr()-B.renderingStartTime>lm&&v!==1073741824&&(p.flags|=128,N=!0,Fy(B,!1),p.lanes=4194304);B.isBackwards?(J.sibling=p.child,p.child=J):(v=B.last,v!==null?v.sibling=J:p.child=J,B.last=J)}return B.tail!==null?(p=B.tail,B.rendering=p,B.tail=p.sibling,B.renderingStartTime=pr(),p.sibling=null,v=mr.current,Qn(mr,N?v&1|2:v&1),p):(ja(p),null);case 22:case 23:return _S(),N=p.memoizedState!==null,u!==null&&u.memoizedState!==null!==N&&(p.flags|=8192),N&&(p.mode&1)!==0?(Jo&1073741824)!==0&&(ja(p),p.subtreeFlags&6&&(p.flags|=8192)):ja(p),null;case 24:return null;case 25:return null}throw Error(n(156,p.tag))}function gee(u,p){switch(Te(p),p.tag){case 1:return Aa(p.type)&&Kp(),u=p.flags,u&65536?(p.flags=u&-65537|128,p):null;case 3:return Ps(),Yn(ka),Yn(Bi),Ry(),u=p.flags,(u&65536)!==0&&(u&128)===0?(p.flags=u&-65537|128,p):null;case 5:return My(p),null;case 13:if(Yn(mr),u=p.memoizedState,u!==null&&u.dehydrated!==null){if(p.alternate===null)throw Error(n(340));mt()}return u=p.flags,u&65536?(p.flags=u&-65537|128,p):null;case 19:return Yn(mr),null;case 4:return Ps(),null;case 10:return wr(p.type._context),null;case 22:case 23:return _S(),null;case 24:return null;default:return null}}var G1=!1,Ca=!1,yee=typeof WeakSet=="function"?WeakSet:Set,bt=null;function om(u,p){var v=u.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(N){si(u,p,N)}else v.current=null}function fS(u,p,v){try{v()}catch(N){si(u,p,N)}}var gM=!1;function vee(u,p){if(sh=gf,u=ri(),Ho(u)){if("selectionStart"in u)var v={start:u.selectionStart,end:u.selectionEnd};else e:{v=(v=u.ownerDocument)&&v.defaultView||window;var N=v.getSelection&&v.getSelection();if(N&&N.rangeCount!==0){v=N.anchorNode;var T=N.anchorOffset,B=N.focusNode;N=N.focusOffset;try{v.nodeType,B.nodeType}catch{v=null;break e}var J=0,me=-1,we=-1,Le=0,Je=0,et=u,Qe=null;t:for(;;){for(var dt;et!==v||T!==0&&et.nodeType!==3||(me=J+T),et!==B||N!==0&&et.nodeType!==3||(we=J+N),et.nodeType===3&&(J+=et.nodeValue.length),(dt=et.firstChild)!==null;)Qe=et,et=dt;for(;;){if(et===u)break t;if(Qe===v&&++Le===T&&(me=J),Qe===B&&++Je===N&&(we=J),(dt=et.nextSibling)!==null)break;et=Qe,Qe=et.parentNode}et=dt}v=me===-1||we===-1?null:{start:me,end:we}}else v=null}v=v||{start:0,end:0}}else v=null;for(pu={focusedElem:u,selectionRange:v},gf=!1,bt=p;bt!==null;)if(p=bt,u=p.child,(p.subtreeFlags&1028)!==0&&u!==null)u.return=p,bt=u;else for(;bt!==null;){p=bt;try{var At=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(At!==null){var Tt=At.memoizedProps,gi=At.memoizedState,Oe=p.stateNode,ke=Oe.getSnapshotBeforeUpdate(p.elementType===p.type?Tt:hl(p.type,Tt),gi);Oe.__reactInternalSnapshotBeforeUpdate=ke}break;case 3:var Me=p.stateNode.containerInfo;Me.nodeType===1?Me.textContent="":Me.nodeType===9&&Me.documentElement&&Me.removeChild(Me.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(rt){si(p,p.return,rt)}if(u=p.sibling,u!==null){u.return=p.return,bt=u;break}bt=p.return}return At=gM,gM=!1,At}function By(u,p,v){var N=p.updateQueue;if(N=N!==null?N.lastEffect:null,N!==null){var T=N=N.next;do{if((T.tag&u)===u){var B=T.destroy;T.destroy=void 0,B!==void 0&&fS(p,v,B)}T=T.next}while(T!==N)}}function K1(u,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var v=p=p.next;do{if((v.tag&u)===u){var N=v.create;v.destroy=N()}v=v.next}while(v!==p)}}function dS(u){var p=u.ref;if(p!==null){var v=u.stateNode;switch(u.tag){case 5:u=v;break;default:u=v}typeof p=="function"?p(u):p.current=u}}function yM(u){var p=u.alternate;p!==null&&(u.alternate=null,yM(p)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(p=u.stateNode,p!==null&&(delete p[As],delete p[Cf],delete p[Na],delete p[X5],delete p[Q5])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function vM(u){return u.tag===5||u.tag===3||u.tag===4}function xM(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||vM(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function hS(u,p,v){var N=u.tag;if(N===5||N===6)u=u.stateNode,p?v.nodeType===8?v.parentNode.insertBefore(u,p):v.insertBefore(u,p):(v.nodeType===8?(p=v.parentNode,p.insertBefore(u,v)):(p=v,p.appendChild(u)),v=v._reactRootContainer,v!=null||p.onclick!==null||(p.onclick=jf));else if(N!==4&&(u=u.child,u!==null))for(hS(u,p,v),u=u.sibling;u!==null;)hS(u,p,v),u=u.sibling}function pS(u,p,v){var N=u.tag;if(N===5||N===6)u=u.stateNode,p?v.insertBefore(u,p):v.appendChild(u);else if(N!==4&&(u=u.child,u!==null))for(pS(u,p,v),u=u.sibling;u!==null;)pS(u,p,v),u=u.sibling}var da=null,pl=!1;function If(u,p,v){for(v=v.child;v!==null;)bM(u,p,v),v=v.sibling}function bM(u,p,v){if(Ga&&typeof Ga.onCommitFiberUnmount=="function")try{Ga.onCommitFiberUnmount(Vc,v)}catch{}switch(v.tag){case 5:Ca||om(v,p);case 6:var N=da,T=pl;da=null,If(u,p,v),da=N,pl=T,da!==null&&(pl?(u=da,v=v.stateNode,u.nodeType===8?u.parentNode.removeChild(v):u.removeChild(v)):da.removeChild(v.stateNode));break;case 18:da!==null&&(pl?(u=da,v=v.stateNode,u.nodeType===8?Ey(u.parentNode,v):u.nodeType===1&&Ey(u,v),Qc(u)):Ey(da,v.stateNode));break;case 4:N=da,T=pl,da=v.stateNode.containerInfo,pl=!0,If(u,p,v),da=N,pl=T;break;case 0:case 11:case 14:case 15:if(!Ca&&(N=v.updateQueue,N!==null&&(N=N.lastEffect,N!==null))){T=N=N.next;do{var B=T,J=B.destroy;B=B.tag,J!==void 0&&((B&2)!==0||(B&4)!==0)&&fS(v,p,J),T=T.next}while(T!==N)}If(u,p,v);break;case 1:if(!Ca&&(om(v,p),N=v.stateNode,typeof N.componentWillUnmount=="function"))try{N.props=v.memoizedProps,N.state=v.memoizedState,N.componentWillUnmount()}catch(me){si(v,p,me)}If(u,p,v);break;case 21:If(u,p,v);break;case 22:v.mode&1?(Ca=(N=Ca)||v.memoizedState!==null,If(u,p,v),Ca=N):If(u,p,v);break;default:If(u,p,v)}}function wM(u){var p=u.updateQueue;if(p!==null){u.updateQueue=null;var v=u.stateNode;v===null&&(v=u.stateNode=new yee),p.forEach(function(N){var T=Pee.bind(null,u,N);v.has(N)||(v.add(N),N.then(T,T))})}}function ml(u,p){var v=p.deletions;if(v!==null)for(var N=0;N<v.length;N++){var T=v[N];try{var B=u,J=p,me=J;e:for(;me!==null;){switch(me.tag){case 5:da=me.stateNode,pl=!1;break e;case 3:da=me.stateNode.containerInfo,pl=!0;break e;case 4:da=me.stateNode.containerInfo,pl=!0;break e}me=me.return}if(da===null)throw Error(n(160));bM(B,J,T),da=null,pl=!1;var we=T.alternate;we!==null&&(we.return=null),T.return=null}catch(Le){si(T,p,Le)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)SM(p,u),p=p.sibling}function SM(u,p){var v=u.alternate,N=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(ml(p,u),oc(u),N&4){try{By(3,u,u.return),K1(3,u)}catch(Tt){si(u,u.return,Tt)}try{By(5,u,u.return)}catch(Tt){si(u,u.return,Tt)}}break;case 1:ml(p,u),oc(u),N&512&&v!==null&&om(v,v.return);break;case 5:if(ml(p,u),oc(u),N&512&&v!==null&&om(v,v.return),u.flags&32){var T=u.stateNode;try{lt(T,"")}catch(Tt){si(u,u.return,Tt)}}if(N&4&&(T=u.stateNode,T!=null)){var B=u.memoizedProps,J=v!==null?v.memoizedProps:B,me=u.type,we=u.updateQueue;if(u.updateQueue=null,we!==null)try{me==="input"&&B.type==="radio"&&B.name!=null&&Ke(T,B),kt(me,J);var Le=kt(me,B);for(J=0;J<we.length;J+=2){var Je=we[J],et=we[J+1];Je==="style"?Gt(T,et):Je==="dangerouslySetInnerHTML"?Ze(T,et):Je==="children"?lt(T,et):k(T,Je,et,Le)}switch(me){case"input":ht(T,B);break;case"textarea":bn(T,B);break;case"select":var Qe=T._wrapperState.wasMultiple;T._wrapperState.wasMultiple=!!B.multiple;var dt=B.value;dt!=null?st(T,!!B.multiple,dt,!1):Qe!==!!B.multiple&&(B.defaultValue!=null?st(T,!!B.multiple,B.defaultValue,!0):st(T,!!B.multiple,B.multiple?[]:"",!1))}T[Cf]=B}catch(Tt){si(u,u.return,Tt)}}break;case 6:if(ml(p,u),oc(u),N&4){if(u.stateNode===null)throw Error(n(162));T=u.stateNode,B=u.memoizedProps;try{T.nodeValue=B}catch(Tt){si(u,u.return,Tt)}}break;case 3:if(ml(p,u),oc(u),N&4&&v!==null&&v.memoizedState.isDehydrated)try{Qc(p.containerInfo)}catch(Tt){si(u,u.return,Tt)}break;case 4:ml(p,u),oc(u);break;case 13:ml(p,u),oc(u),T=u.child,T.flags&8192&&(B=T.memoizedState!==null,T.stateNode.isHidden=B,!B||T.alternate!==null&&T.alternate.memoizedState!==null||(yS=pr())),N&4&&wM(u);break;case 22:if(Je=v!==null&&v.memoizedState!==null,u.mode&1?(Ca=(Le=Ca)||Je,ml(p,u),Ca=Le):ml(p,u),oc(u),N&8192){if(Le=u.memoizedState!==null,(u.stateNode.isHidden=Le)&&!Je&&(u.mode&1)!==0)for(bt=u,Je=u.child;Je!==null;){for(et=bt=Je;bt!==null;){switch(Qe=bt,dt=Qe.child,Qe.tag){case 0:case 11:case 14:case 15:By(4,Qe,Qe.return);break;case 1:om(Qe,Qe.return);var At=Qe.stateNode;if(typeof At.componentWillUnmount=="function"){N=Qe,v=Qe.return;try{p=N,At.props=p.memoizedProps,At.state=p.memoizedState,At.componentWillUnmount()}catch(Tt){si(N,v,Tt)}}break;case 5:om(Qe,Qe.return);break;case 22:if(Qe.memoizedState!==null){kM(et);continue}}dt!==null?(dt.return=Qe,bt=dt):kM(et)}Je=Je.sibling}e:for(Je=null,et=u;;){if(et.tag===5){if(Je===null){Je=et;try{T=et.stateNode,Le?(B=T.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none"):(me=et.stateNode,we=et.memoizedProps.style,J=we!=null&&we.hasOwnProperty("display")?we.display:null,me.style.display=nn("display",J))}catch(Tt){si(u,u.return,Tt)}}}else if(et.tag===6){if(Je===null)try{et.stateNode.nodeValue=Le?"":et.memoizedProps}catch(Tt){si(u,u.return,Tt)}}else if((et.tag!==22&&et.tag!==23||et.memoizedState===null||et===u)&&et.child!==null){et.child.return=et,et=et.child;continue}if(et===u)break e;for(;et.sibling===null;){if(et.return===null||et.return===u)break e;Je===et&&(Je=null),et=et.return}Je===et&&(Je=null),et.sibling.return=et.return,et=et.sibling}}break;case 19:ml(p,u),oc(u),N&4&&wM(u);break;case 21:break;default:ml(p,u),oc(u)}}function oc(u){var p=u.flags;if(p&2){try{e:{for(var v=u.return;v!==null;){if(vM(v)){var N=v;break e}v=v.return}throw Error(n(160))}switch(N.tag){case 5:var T=N.stateNode;N.flags&32&&(lt(T,""),N.flags&=-33);var B=xM(u);pS(u,B,T);break;case 3:case 4:var J=N.stateNode.containerInfo,me=xM(u);hS(u,me,J);break;default:throw Error(n(161))}}catch(we){si(u,u.return,we)}u.flags&=-3}p&4096&&(u.flags&=-4097)}function xee(u,p,v){bt=u,_M(u)}function _M(u,p,v){for(var N=(u.mode&1)!==0;bt!==null;){var T=bt,B=T.child;if(T.tag===22&&N){var J=T.memoizedState!==null||G1;if(!J){var me=T.alternate,we=me!==null&&me.memoizedState!==null||Ca;me=G1;var Le=Ca;if(G1=J,(Ca=we)&&!Le)for(bt=T;bt!==null;)J=bt,we=J.child,J.tag===22&&J.memoizedState!==null?AM(T):we!==null?(we.return=J,bt=we):AM(T);for(;B!==null;)bt=B,_M(B),B=B.sibling;bt=T,G1=me,Ca=Le}NM(u)}else(T.subtreeFlags&8772)!==0&&B!==null?(B.return=T,bt=B):NM(u)}}function NM(u){for(;bt!==null;){var p=bt;if((p.flags&8772)!==0){var v=p.alternate;try{if((p.flags&8772)!==0)switch(p.tag){case 0:case 11:case 15:Ca||K1(5,p);break;case 1:var N=p.stateNode;if(p.flags&4&&!Ca)if(v===null)N.componentDidMount();else{var T=p.elementType===p.type?v.memoizedProps:hl(p.type,v.memoizedProps);N.componentDidUpdate(T,v.memoizedState,N.__reactInternalSnapshotBeforeUpdate)}var B=p.updateQueue;B!==null&&wo(p,B,N);break;case 3:var J=p.updateQueue;if(J!==null){if(v=null,p.child!==null)switch(p.child.tag){case 5:v=p.child.stateNode;break;case 1:v=p.child.stateNode}wo(p,J,v)}break;case 5:var me=p.stateNode;if(v===null&&p.flags&4){v=me;var we=p.memoizedProps;switch(p.type){case"button":case"input":case"select":case"textarea":we.autoFocus&&v.focus();break;case"img":we.src&&(v.src=we.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(p.memoizedState===null){var Le=p.alternate;if(Le!==null){var Je=Le.memoizedState;if(Je!==null){var et=Je.dehydrated;et!==null&&Qc(et)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Ca||p.flags&512&&dS(p)}catch(Qe){si(p,p.return,Qe)}}if(p===u){bt=null;break}if(v=p.sibling,v!==null){v.return=p.return,bt=v;break}bt=p.return}}function kM(u){for(;bt!==null;){var p=bt;if(p===u){bt=null;break}var v=p.sibling;if(v!==null){v.return=p.return,bt=v;break}bt=p.return}}function AM(u){for(;bt!==null;){var p=bt;try{switch(p.tag){case 0:case 11:case 15:var v=p.return;try{K1(4,p)}catch(we){si(p,v,we)}break;case 1:var N=p.stateNode;if(typeof N.componentDidMount=="function"){var T=p.return;try{N.componentDidMount()}catch(we){si(p,T,we)}}var B=p.return;try{dS(p)}catch(we){si(p,B,we)}break;case 5:var J=p.return;try{dS(p)}catch(we){si(p,J,we)}}}catch(we){si(p,p.return,we)}if(p===u){bt=null;break}var me=p.sibling;if(me!==null){me.return=p.return,bt=me;break}bt=p.return}}var bee=Math.ceil,X1=P.ReactCurrentDispatcher,mS=P.ReactCurrentOwner,Es=P.ReactCurrentBatchConfig,Bn=0,ra=null,Ai=null,ha=0,Jo=0,sm=Yo(0),qi=0,$y=null,hh=0,Q1=0,gS=0,qy=null,_o=null,yS=0,lm=1/0,bu=null,J1=!1,vS=null,Df=null,Z1=!1,Ff=null,ex=0,Uy=0,xS=null,tx=-1,nx=0;function ro(){return(Bn&6)!==0?pr():tx!==-1?tx:tx=pr()}function Bf(u){return(u.mode&1)===0?1:(Bn&2)!==0&&ha!==0?ha&-ha:Yr.transition!==null?(nx===0&&(nx=Vd()),nx):(u=Mn,u!==0||(u=window.event,u=u===void 0?16:Zc(u.type)),u)}function gl(u,p,v,N){if(50<Uy)throw Uy=0,xS=null,Error(n(185));Yc(u,v,N),((Bn&2)===0||u!==ra)&&(u===ra&&((Bn&2)===0&&(Q1|=v),qi===4&&$f(u,ha)),No(u,N),v===1&&Bn===0&&(p.mode&1)===0&&(lm=pr()+500,ch&&U()))}function No(u,p){var v=u.callbackNode;di(u,p);var N=Hc(u,u===ra?ha:0);if(N===0)v!==null&&zc(v),u.callbackNode=null,u.callbackPriority=0;else if(p=N&-N,u.callbackPriority!==p){if(v!=null&&zc(v),p===1)u.tag===0?I(jM.bind(null,u)):A(jM.bind(null,u)),G5(function(){(Bn&6)===0&&U()}),v=null;else{switch(Gc(N)){case 1:v=cf;break;case 4:v=Ya;break;case 16:v=Vl;break;case 536870912:v=uf;break;default:v=Vl}v=IM(v,PM.bind(null,u))}u.callbackPriority=p,u.callbackNode=v}}function PM(u,p){if(tx=-1,nx=0,(Bn&6)!==0)throw Error(n(327));var v=u.callbackNode;if(cm()&&u.callbackNode!==v)return null;var N=Hc(u,u===ra?ha:0);if(N===0)return null;if((N&30)!==0||(N&u.expiredLanes)!==0||p)p=rx(u,N);else{p=N;var T=Bn;Bn|=2;var B=EM();(ra!==u||ha!==p)&&(bu=null,lm=pr()+500,mh(u,p));do try{_ee();break}catch(me){CM(u,me)}while(!0);Dn(),X1.current=B,Bn=T,Ai!==null?p=0:(ra=null,ha=0,p=qi)}if(p!==0){if(p===2&&(T=qo(u),T!==0&&(N=T,p=bS(u,T))),p===1)throw v=$y,mh(u,0),$f(u,N),No(u,pr()),v;if(p===6)$f(u,N);else{if(T=u.current.alternate,(N&30)===0&&!wee(T)&&(p=rx(u,N),p===2&&(B=qo(u),B!==0&&(N=B,p=bS(u,B))),p===1))throw v=$y,mh(u,0),$f(u,N),No(u,pr()),v;switch(u.finishedWork=T,u.finishedLanes=N,p){case 0:case 1:throw Error(n(345));case 2:gh(u,_o,bu);break;case 3:if($f(u,N),(N&130023424)===N&&(p=yS+500-pr(),10<p)){if(Hc(u,0)!==0)break;if(T=u.suspendedLanes,(T&N)!==N){ro(),u.pingedLanes|=u.suspendedLanes&T;break}u.timeoutHandle=Cy(gh.bind(null,u,_o,bu),p);break}gh(u,_o,bu);break;case 4:if($f(u,N),(N&4194240)===N)break;for(p=u.eventTimes,T=-1;0<N;){var J=31-ei(N);B=1<<J,J=p[J],J>T&&(T=J),N&=~B}if(N=T,N=pr()-N,N=(120>N?120:480>N?480:1080>N?1080:1920>N?1920:3e3>N?3e3:4320>N?4320:1960*bee(N/1960))-N,10<N){u.timeoutHandle=Cy(gh.bind(null,u,_o,bu),N);break}gh(u,_o,bu);break;case 5:gh(u,_o,bu);break;default:throw Error(n(329))}}}return No(u,pr()),u.callbackNode===v?PM.bind(null,u):null}function bS(u,p){var v=qy;return u.current.memoizedState.isDehydrated&&(mh(u,p).flags|=256),u=rx(u,p),u!==2&&(p=_o,_o=v,p!==null&&wS(p)),u}function wS(u){_o===null?_o=u:_o.push.apply(_o,u)}function wee(u){for(var p=u;;){if(p.flags&16384){var v=p.updateQueue;if(v!==null&&(v=v.stores,v!==null))for(var N=0;N<v.length;N++){var T=v[N],B=T.getSnapshot;T=T.value;try{if(!Lr(B(),T))return!1}catch{return!1}}}if(v=p.child,p.subtreeFlags&16384&&v!==null)v.return=p,p=v;else{if(p===u)break;for(;p.sibling===null;){if(p.return===null||p.return===u)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function $f(u,p){for(p&=~gS,p&=~Q1,u.suspendedLanes|=p,u.pingedLanes&=~p,u=u.expirationTimes;0<p;){var v=31-ei(p),N=1<<v;u[v]=-1,p&=~N}}function jM(u){if((Bn&6)!==0)throw Error(n(327));cm();var p=Hc(u,0);if((p&1)===0)return No(u,pr()),null;var v=rx(u,p);if(u.tag!==0&&v===2){var N=qo(u);N!==0&&(p=N,v=bS(u,N))}if(v===1)throw v=$y,mh(u,0),$f(u,p),No(u,pr()),v;if(v===6)throw Error(n(345));return u.finishedWork=u.current.alternate,u.finishedLanes=p,gh(u,_o,bu),No(u,pr()),null}function SS(u,p){var v=Bn;Bn|=1;try{return u(p)}finally{Bn=v,Bn===0&&(lm=pr()+500,ch&&U())}}function ph(u){Ff!==null&&Ff.tag===0&&(Bn&6)===0&&cm();var p=Bn;Bn|=1;var v=Es.transition,N=Mn;try{if(Es.transition=null,Mn=1,u)return u()}finally{Mn=N,Es.transition=v,Bn=p,(Bn&6)===0&&U()}}function _S(){Jo=sm.current,Yn(sm)}function mh(u,p){u.finishedWork=null,u.finishedLanes=0;var v=u.timeoutHandle;if(v!==-1&&(u.timeoutHandle=-1,R1(v)),Ai!==null)for(v=Ai.return;v!==null;){var N=v;switch(Te(N),N.tag){case 1:N=N.type.childContextTypes,N!=null&&Kp();break;case 3:Ps(),Yn(ka),Yn(Bi),Ry();break;case 5:My(N);break;case 4:Ps();break;case 13:Yn(mr);break;case 19:Yn(mr);break;case 10:wr(N.type._context);break;case 22:case 23:_S()}v=v.return}if(ra=u,Ai=u=qf(u.current,null),ha=Jo=p,qi=0,$y=null,gS=Q1=hh=0,_o=qy=null,rr!==null){for(p=0;p<rr.length;p++)if(v=rr[p],N=v.interleaved,N!==null){v.interleaved=null;var T=N.next,B=v.pending;if(B!==null){var J=B.next;B.next=T,N.next=J}v.pending=N}rr=null}return u}function CM(u,p){do{var v=Ai;try{if(Dn(),Xp.current=V1,Mf){for(var N=Sr.memoizedState;N!==null;){var T=N.queue;T!==null&&(T.pending=null),N=N.next}Mf=!1}if(js=0,Qr=oi=Sr=null,fl=!1,Lf=0,mS.current=null,v===null||v.return===null){qi=1,$y=p,Ai=null;break}e:{var B=u,J=v.return,me=v,we=p;if(p=ha,me.flags|=32768,we!==null&&typeof we=="object"&&typeof we.then=="function"){var Le=we,Je=me,et=Je.tag;if((Je.mode&1)===0&&(et===0||et===11||et===15)){var Qe=Je.alternate;Qe?(Je.updateQueue=Qe.updateQueue,Je.memoizedState=Qe.memoizedState,Je.lanes=Qe.lanes):(Je.updateQueue=null,Je.memoizedState=null)}var dt=eM(J);if(dt!==null){dt.flags&=-257,tM(dt,J,me,B,p),dt.mode&1&&ZT(B,Le,p),p=dt,we=Le;var At=p.updateQueue;if(At===null){var Tt=new Set;Tt.add(we),p.updateQueue=Tt}else At.add(we);break e}else{if((p&1)===0){ZT(B,Le,p),NS();break e}we=Error(n(426))}}else if(qe&&me.mode&1){var gi=eM(J);if(gi!==null){(gi.flags&65536)===0&&(gi.flags|=256),tM(gi,J,me,B,p),ot(am(we,me));break e}}B=we=am(we,me),qi!==4&&(qi=2),qy===null?qy=[B]:qy.push(B),B=J;do{switch(B.tag){case 3:B.flags|=65536,p&=-p,B.lanes|=p;var Oe=QT(B,we,p);ar(B,Oe);break e;case 1:me=we;var ke=B.type,Me=B.stateNode;if((B.flags&128)===0&&(typeof ke.getDerivedStateFromError=="function"||Me!==null&&typeof Me.componentDidCatch=="function"&&(Df===null||!Df.has(Me)))){B.flags|=65536,p&=-p,B.lanes|=p;var rt=JT(B,me,p);ar(B,rt);break e}}B=B.return}while(B!==null)}TM(v)}catch(Rt){p=Rt,Ai===v&&v!==null&&(Ai=v=v.return);continue}break}while(!0)}function EM(){var u=X1.current;return X1.current=V1,u===null?V1:u}function NS(){(qi===0||qi===3||qi===2)&&(qi=4),ra===null||(hh&268435455)===0&&(Q1&268435455)===0||$f(ra,ha)}function rx(u,p){var v=Bn;Bn|=2;var N=EM();(ra!==u||ha!==p)&&(bu=null,mh(u,p));do try{See();break}catch(T){CM(u,T)}while(!0);if(Dn(),Bn=v,X1.current=N,Ai!==null)throw Error(n(261));return ra=null,ha=0,qi}function See(){for(;Ai!==null;)OM(Ai)}function _ee(){for(;Ai!==null&&!lf();)OM(Ai)}function OM(u){var p=RM(u.alternate,u,Jo);u.memoizedProps=u.pendingProps,p===null?TM(u):Ai=p,mS.current=null}function TM(u){var p=u;do{var v=p.alternate;if(u=p.return,(p.flags&32768)===0){if(v=mee(v,p,Jo),v!==null){Ai=v;return}}else{if(v=gee(v,p),v!==null){v.flags&=32767,Ai=v;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{qi=6,Ai=null;return}}if(p=p.sibling,p!==null){Ai=p;return}Ai=p=u}while(p!==null);qi===0&&(qi=5)}function gh(u,p,v){var N=Mn,T=Es.transition;try{Es.transition=null,Mn=1,Nee(u,p,v,N)}finally{Es.transition=T,Mn=N}return null}function Nee(u,p,v,N){do cm();while(Ff!==null);if((Bn&6)!==0)throw Error(n(327));v=u.finishedWork;var T=u.finishedLanes;if(v===null)return null;if(u.finishedWork=null,u.finishedLanes=0,v===u.current)throw Error(n(177));u.callbackNode=null,u.callbackPriority=0;var B=v.lanes|v.childLanes;if(ys(u,B),u===ra&&(Ai=ra=null,ha=0),(v.subtreeFlags&2064)===0&&(v.flags&2064)===0||Z1||(Z1=!0,IM(Vl,function(){return cm(),null})),B=(v.flags&15990)!==0,(v.subtreeFlags&15990)!==0||B){B=Es.transition,Es.transition=null;var J=Mn;Mn=1;var me=Bn;Bn|=4,mS.current=null,vee(u,v),SM(v,u),Zd(pu),gf=!!sh,pu=sh=null,u.current=v,xee(v),yy(),Bn=me,Mn=J,Es.transition=B}else u.current=v;if(Z1&&(Z1=!1,Ff=u,ex=T),B=u.pendingLanes,B===0&&(Df=null),Dp(v.stateNode),No(u,pr()),p!==null)for(N=u.onRecoverableError,v=0;v<p.length;v++)T=p[v],N(T.value,{componentStack:T.stack,digest:T.digest});if(J1)throw J1=!1,u=vS,vS=null,u;return(ex&1)!==0&&u.tag!==0&&cm(),B=u.pendingLanes,(B&1)!==0?u===xS?Uy++:(Uy=0,xS=u):Uy=0,U(),null}function cm(){if(Ff!==null){var u=Gc(ex),p=Es.transition,v=Mn;try{if(Es.transition=null,Mn=16>u?16:u,Ff===null)var N=!1;else{if(u=Ff,Ff=null,ex=0,(Bn&6)!==0)throw Error(n(331));var T=Bn;for(Bn|=4,bt=u.current;bt!==null;){var B=bt,J=B.child;if((bt.flags&16)!==0){var me=B.deletions;if(me!==null){for(var we=0;we<me.length;we++){var Le=me[we];for(bt=Le;bt!==null;){var Je=bt;switch(Je.tag){case 0:case 11:case 15:By(8,Je,B)}var et=Je.child;if(et!==null)et.return=Je,bt=et;else for(;bt!==null;){Je=bt;var Qe=Je.sibling,dt=Je.return;if(yM(Je),Je===Le){bt=null;break}if(Qe!==null){Qe.return=dt,bt=Qe;break}bt=dt}}}var At=B.alternate;if(At!==null){var Tt=At.child;if(Tt!==null){At.child=null;do{var gi=Tt.sibling;Tt.sibling=null,Tt=gi}while(Tt!==null)}}bt=B}}if((B.subtreeFlags&2064)!==0&&J!==null)J.return=B,bt=J;else e:for(;bt!==null;){if(B=bt,(B.flags&2048)!==0)switch(B.tag){case 0:case 11:case 15:By(9,B,B.return)}var Oe=B.sibling;if(Oe!==null){Oe.return=B.return,bt=Oe;break e}bt=B.return}}var ke=u.current;for(bt=ke;bt!==null;){J=bt;var Me=J.child;if((J.subtreeFlags&2064)!==0&&Me!==null)Me.return=J,bt=Me;else e:for(J=ke;bt!==null;){if(me=bt,(me.flags&2048)!==0)try{switch(me.tag){case 0:case 11:case 15:K1(9,me)}}catch(Rt){si(me,me.return,Rt)}if(me===J){bt=null;break e}var rt=me.sibling;if(rt!==null){rt.return=me.return,bt=rt;break e}bt=me.return}}if(Bn=T,U(),Ga&&typeof Ga.onPostCommitFiberRoot=="function")try{Ga.onPostCommitFiberRoot(Vc,u)}catch{}N=!0}return N}finally{Mn=v,Es.transition=p}}return!1}function MM(u,p,v){p=am(v,p),p=QT(u,p,1),u=Kr(u,p,1),p=ro(),u!==null&&(Yc(u,1,p),No(u,p))}function si(u,p,v){if(u.tag===3)MM(u,u,v);else for(;p!==null;){if(p.tag===3){MM(p,u,v);break}else if(p.tag===1){var N=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof N.componentDidCatch=="function"&&(Df===null||!Df.has(N))){u=am(v,u),u=JT(p,u,1),p=Kr(p,u,1),u=ro(),p!==null&&(Yc(p,1,u),No(p,u));break}}p=p.return}}function kee(u,p,v){var N=u.pingCache;N!==null&&N.delete(p),p=ro(),u.pingedLanes|=u.suspendedLanes&v,ra===u&&(ha&v)===v&&(qi===4||qi===3&&(ha&130023424)===ha&&500>pr()-yS?mh(u,0):gS|=v),No(u,p)}function LM(u,p){p===0&&((u.mode&1)===0?p=1:(p=Ka,Ka<<=1,(Ka&130023424)===0&&(Ka=4194304)));var v=ro();u=ir(u,p),u!==null&&(Yc(u,p,v),No(u,v))}function Aee(u){var p=u.memoizedState,v=0;p!==null&&(v=p.retryLane),LM(u,v)}function Pee(u,p){var v=0;switch(u.tag){case 13:var N=u.stateNode,T=u.memoizedState;T!==null&&(v=T.retryLane);break;case 19:N=u.stateNode;break;default:throw Error(n(314))}N!==null&&N.delete(p),LM(u,v)}var RM;RM=function(u,p,v){if(u!==null)if(u.memoizedProps!==p.pendingProps||ka.current)So=!0;else{if((u.lanes&v)===0&&(p.flags&128)===0)return So=!1,pee(u,p,v);So=(u.flags&131072)!==0}else So=!1,qe&&(p.flags&1048576)!==0&&je(p,ie,p.index);switch(p.lanes=0,p.tag){case 2:var N=p.type;Y1(u,p),u=p.pendingProps;var T=Of(p,Bi.current);Dr(p,v),T=uh(null,p,N,u,T,v);var B=Cs();return p.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,Aa(N)?(B=!0,yu(p)):B=!1,p.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,$i(p),T.updater=W1,p.stateNode=T,T._reactInternals=p,tS(p,N,u,v),p=aS(null,p,N,!0,B,v)):(p.tag=0,qe&&B&&Fe(p),no(null,p,T,v),p=p.child),p;case 16:N=p.elementType;e:{switch(Y1(u,p),u=p.pendingProps,T=N._init,N=T(N._payload),p.type=N,T=p.tag=Cee(N),u=hl(N,u),T){case 0:p=iS(null,p,N,u,v);break e;case 1:p=sM(null,p,N,u,v);break e;case 11:p=nM(null,p,N,u,v);break e;case 14:p=rM(null,p,N,hl(N.type,u),v);break e}throw Error(n(306,N,""))}return p;case 0:return N=p.type,T=p.pendingProps,T=p.elementType===N?T:hl(N,T),iS(u,p,N,T,v);case 1:return N=p.type,T=p.pendingProps,T=p.elementType===N?T:hl(N,T),sM(u,p,N,T,v);case 3:e:{if(lM(p),u===null)throw Error(n(387));N=p.pendingProps,B=p.memoizedState,T=B.element,Pa(u,p),na(p,N,null,v);var J=p.memoizedState;if(N=J.element,B.isDehydrated)if(B={element:N,isDehydrated:!1,cache:J.cache,pendingSuspenseBoundaries:J.pendingSuspenseBoundaries,transitions:J.transitions},p.updateQueue.baseState=B,p.memoizedState=B,p.flags&256){T=am(Error(n(423)),p),p=cM(u,p,N,v,T);break e}else if(N!==T){T=am(Error(n(424)),p),p=cM(u,p,N,v,T);break e}else for(De=fa(p.stateNode.containerInfo.firstChild),Ie=p,qe=!0,We=null,v=jr(p,null,N,v),p.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(mt(),N===T){p=xu(u,p,v);break e}no(u,p,N,v)}p=p.child}return p;case 5:return B1(p),u===null&&Nt(p),N=p.type,T=p.pendingProps,B=u!==null?u.memoizedProps:null,J=T.children,jy(N,T)?J=null:B!==null&&jy(N,B)&&(p.flags|=32),oM(u,p),no(u,p,J,v),p.child;case 6:return u===null&&Nt(p),null;case 13:return uM(u,p,v);case 4:return Tf(p,p.stateNode.containerInfo),N=p.pendingProps,u===null?p.child=ii(p,null,N,v):no(u,p,N,v),p.child;case 11:return N=p.type,T=p.pendingProps,T=p.elementType===N?T:hl(N,T),nM(u,p,N,T,v);case 7:return no(u,p,p.pendingProps,v),p.child;case 8:return no(u,p,p.pendingProps.children,v),p.child;case 12:return no(u,p,p.pendingProps.children,v),p.child;case 10:e:{if(N=p.type._context,T=p.pendingProps,B=p.memoizedProps,J=T.value,Qn(pi,N._currentValue),N._currentValue=J,B!==null)if(Lr(B.value,J)){if(B.children===T.children&&!ka.current){p=xu(u,p,v);break e}}else for(B=p.child,B!==null&&(B.return=p);B!==null;){var me=B.dependencies;if(me!==null){J=B.child;for(var we=me.firstContext;we!==null;){if(we.context===N){if(B.tag===1){we=Gr(-1,v&-v),we.tag=2;var Le=B.updateQueue;if(Le!==null){Le=Le.shared;var Je=Le.pending;Je===null?we.next=we:(we.next=Je.next,Je.next=we),Le.pending=we}}B.lanes|=v,we=B.alternate,we!==null&&(we.lanes|=v),Fn(B.return,v,p),me.lanes|=v;break}we=we.next}}else if(B.tag===10)J=B.type===p.type?null:B.child;else if(B.tag===18){if(J=B.return,J===null)throw Error(n(341));J.lanes|=v,me=J.alternate,me!==null&&(me.lanes|=v),Fn(J,v,p),J=B.sibling}else J=B.child;if(J!==null)J.return=B;else for(J=B;J!==null;){if(J===p){J=null;break}if(B=J.sibling,B!==null){B.return=J.return,J=B;break}J=J.return}B=J}no(u,p,T.children,v),p=p.child}return p;case 9:return T=p.type,N=p.pendingProps.children,Dr(p,v),T=Fr(T),N=N(T),p.flags|=1,no(u,p,N,v),p.child;case 14:return N=p.type,T=hl(N,p.pendingProps),T=hl(N.type,T),rM(u,p,N,T,v);case 15:return iM(u,p,p.type,p.pendingProps,v);case 17:return N=p.type,T=p.pendingProps,T=p.elementType===N?T:hl(N,T),Y1(u,p),p.tag=1,Aa(N)?(u=!0,yu(p)):u=!1,Dr(p,v),KT(p,N,T),tS(p,N,T,v),aS(null,p,N,!0,u,v);case 19:return dM(u,p,v);case 22:return aM(u,p,v)}throw Error(n(156,p.tag))};function IM(u,p){return Uc(u,p)}function jee(u,p,v,N){this.tag=u,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=N,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Os(u,p,v,N){return new jee(u,p,v,N)}function kS(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Cee(u){if(typeof u=="function")return kS(u)?1:0;if(u!=null){if(u=u.$$typeof,u===F)return 11;if(u===X)return 14}return 2}function qf(u,p){var v=u.alternate;return v===null?(v=Os(u.tag,p,u.key,u.mode),v.elementType=u.elementType,v.type=u.type,v.stateNode=u.stateNode,v.alternate=u,u.alternate=v):(v.pendingProps=p,v.type=u.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=u.flags&14680064,v.childLanes=u.childLanes,v.lanes=u.lanes,v.child=u.child,v.memoizedProps=u.memoizedProps,v.memoizedState=u.memoizedState,v.updateQueue=u.updateQueue,p=u.dependencies,v.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},v.sibling=u.sibling,v.index=u.index,v.ref=u.ref,v}function ix(u,p,v,N,T,B){var J=2;if(N=u,typeof u=="function")kS(u)&&(J=1);else if(typeof u=="string")J=5;else e:switch(u){case L:return yh(v.children,T,B,p);case R:J=8,T|=8;break;case D:return u=Os(12,v,p,T|2),u.elementType=D,u.lanes=B,u;case W:return u=Os(13,v,p,T),u.elementType=W,u.lanes=B,u;case V:return u=Os(19,v,p,T),u.elementType=V,u.lanes=B,u;case Z:return ax(v,T,B,p);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case H:J=10;break e;case M:J=9;break e;case F:J=11;break e;case X:J=14;break e;case Y:J=16,N=null;break e}throw Error(n(130,u==null?u:typeof u,""))}return p=Os(J,v,p,T),p.elementType=u,p.type=N,p.lanes=B,p}function yh(u,p,v,N){return u=Os(7,u,N,p),u.lanes=v,u}function ax(u,p,v,N){return u=Os(22,u,N,p),u.elementType=Z,u.lanes=v,u.stateNode={isHidden:!1},u}function AS(u,p,v){return u=Os(6,u,null,p),u.lanes=v,u}function PS(u,p,v){return p=Os(4,u.children!==null?u.children:[],u.key,p),p.lanes=v,p.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},p}function Eee(u,p,v,N,T){this.tag=p,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wd(0),this.expirationTimes=Wd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wd(0),this.identifierPrefix=N,this.onRecoverableError=T,this.mutableSourceEagerHydrationData=null}function jS(u,p,v,N,T,B,J,me,we){return u=new Eee(u,p,v,me,we),p===1?(p=1,B===!0&&(p|=8)):p=0,B=Os(3,null,null,p),u.current=B,B.stateNode=u,B.memoizedState={element:N,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},$i(B),u}function Oee(u,p,v){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:N==null?null:""+N,children:u,containerInfo:p,implementation:v}}function DM(u){if(!u)return rc;u=u._reactInternals;e:{if(Ii(u)!==u||u.tag!==1)throw Error(n(170));var p=u;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(Aa(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(n(171))}if(u.tag===1){var v=u.type;if(Aa(v))return Ty(u,v,p)}return p}function FM(u,p,v,N,T,B,J,me,we){return u=jS(v,N,!0,u,T,B,J,me,we),u.context=DM(null),v=u.current,N=ro(),T=Bf(v),B=Gr(N,T),B.callback=p??null,Kr(v,B,T),u.current.lanes=T,Yc(u,T,N),No(u,N),u}function ox(u,p,v,N){var T=p.current,B=ro(),J=Bf(T);return v=DM(v),p.context===null?p.context=v:p.pendingContext=v,p=Gr(B,J),p.payload={element:u},N=N===void 0?null:N,N!==null&&(p.callback=N),u=Kr(T,p,J),u!==null&&(gl(u,T,J,B),ta(u,T,J)),J}function sx(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return u.child.stateNode;default:return u.child.stateNode}}function BM(u,p){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var v=u.retryLane;u.retryLane=v!==0&&v<p?v:p}}function CS(u,p){BM(u,p),(u=u.alternate)&&BM(u,p)}function Tee(){return null}var $M=typeof reportError=="function"?reportError:function(u){console.error(u)};function ES(u){this._internalRoot=u}lx.prototype.render=ES.prototype.render=function(u){var p=this._internalRoot;if(p===null)throw Error(n(409));ox(u,p,null,null)},lx.prototype.unmount=ES.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var p=u.containerInfo;ph(function(){ox(null,u,null,null)}),p[Zi]=null}};function lx(u){this._internalRoot=u}lx.prototype.unstable_scheduleHydration=function(u){if(u){var p=Bp();u={blockedOn:null,target:u,priority:p};for(var v=0;v<xs.length&&p!==0&&p<xs[v].priority;v++);xs.splice(v,0,u),v===0&&qp(u)}};function OS(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function cx(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function qM(){}function Mee(u,p,v,N,T){if(T){if(typeof N=="function"){var B=N;N=function(){var Le=sx(J);B.call(Le)}}var J=FM(p,N,u,0,null,!1,!1,"",qM);return u._reactRootContainer=J,u[Zi]=J.current,du(u.nodeType===8?u.parentNode:u),ph(),J}for(;T=u.lastChild;)u.removeChild(T);if(typeof N=="function"){var me=N;N=function(){var Le=sx(we);me.call(Le)}}var we=jS(u,0,!1,null,null,!1,!1,"",qM);return u._reactRootContainer=we,u[Zi]=we.current,du(u.nodeType===8?u.parentNode:u),ph(function(){ox(p,we,v,N)}),we}function ux(u,p,v,N,T){var B=v._reactRootContainer;if(B){var J=B;if(typeof T=="function"){var me=T;T=function(){var we=sx(J);me.call(we)}}ox(p,J,u,T)}else J=Mee(v,p,u,T,N);return sx(J)}Wl=function(u){switch(u.tag){case 3:var p=u.stateNode;if(p.current.memoizedState.isDehydrated){var v=gs(p.pendingLanes);v!==0&&(df(p,v|1),No(p,pr()),(Bn&6)===0&&(lm=pr()+500,U()))}break;case 13:ph(function(){var N=ir(u,1);if(N!==null){var T=ro();gl(N,u,1,T)}}),CS(u,1)}},Hd=function(u){if(u.tag===13){var p=ir(u,134217728);if(p!==null){var v=ro();gl(p,u,134217728,v)}CS(u,134217728)}},Fp=function(u){if(u.tag===13){var p=Bf(u),v=ir(u,p);if(v!==null){var N=ro();gl(v,u,p,N)}CS(u,p)}},Bp=function(){return Mn},hf=function(u,p){var v=Mn;try{return Mn=u,p()}finally{Mn=v}},Jt=function(u,p,v){switch(p){case"input":if(ht(u,v),p=v.name,v.type==="radio"&&p!=null){for(v=u;v.parentNode;)v=v.parentNode;for(v=v.querySelectorAll("input[name="+JSON.stringify(""+p)+'][type="radio"]'),p=0;p<v.length;p++){var N=v[p];if(N!==u&&N.form===u.form){var T=lh(N);if(!T)throw Error(n(90));Se(N),ht(N,T)}}}break;case"textarea":bn(u,v);break;case"select":p=v.value,p!=null&&st(u,!!v.multiple,p,!1)}},Ri=SS,ps=ph;var Lee={usingClientEntryPoint:!1,Events:[Ef,mu,lh,Rn,ql,SS]},zy={findFiberByHostInstance:nc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ree={bundleType:zy.bundleType,version:zy.version,rendererPackageName:zy.rendererPackageName,rendererConfig:zy.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=$o(u),u===null?null:u.stateNode},findFiberByHostInstance:zy.findFiberByHostInstance||Tee,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fx=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fx.isDisabled&&fx.supportsFiber)try{Vc=fx.inject(Ree),Ga=fx}catch{}}return ko.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lee,ko.createPortal=function(u,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!OS(p))throw Error(n(200));return Oee(u,p,null,v)},ko.createRoot=function(u,p){if(!OS(u))throw Error(n(299));var v=!1,N="",T=$M;return p!=null&&(p.unstable_strictMode===!0&&(v=!0),p.identifierPrefix!==void 0&&(N=p.identifierPrefix),p.onRecoverableError!==void 0&&(T=p.onRecoverableError)),p=jS(u,1,!1,null,null,v,!1,N,T),u[Zi]=p.current,du(u.nodeType===8?u.parentNode:u),new ES(p)},ko.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var p=u._reactInternals;if(p===void 0)throw typeof u.render=="function"?Error(n(188)):(u=Object.keys(u).join(","),Error(n(268,u)));return u=$o(p),u=u===null?null:u.stateNode,u},ko.flushSync=function(u){return ph(u)},ko.hydrate=function(u,p,v){if(!cx(p))throw Error(n(200));return ux(null,u,p,!0,v)},ko.hydrateRoot=function(u,p,v){if(!OS(u))throw Error(n(405));var N=v!=null&&v.hydratedSources||null,T=!1,B="",J=$M;if(v!=null&&(v.unstable_strictMode===!0&&(T=!0),v.identifierPrefix!==void 0&&(B=v.identifierPrefix),v.onRecoverableError!==void 0&&(J=v.onRecoverableError)),p=FM(p,null,u,1,v??null,T,!1,B,J),u[Zi]=p.current,du(u),N)for(u=0;u<N.length;u++)v=N[u],T=v._getVersion,T=T(v._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[v,T]:p.mutableSourceEagerHydrationData.push(v,T);return new lx(p)},ko.render=function(u,p,v){if(!cx(p))throw Error(n(200));return ux(null,u,p,!1,v)},ko.unmountComponentAtNode=function(u){if(!cx(u))throw Error(n(40));return u._reactRootContainer?(ph(function(){ux(null,null,u,!1,function(){u._reactRootContainer=null,u[Zi]=null})}),!0):!1},ko.unstable_batchedUpdates=SS,ko.unstable_renderSubtreeIntoContainer=function(u,p,v,N){if(!cx(v))throw Error(n(200));if(u==null||u._reactInternals===void 0)throw Error(n(38));return ux(u,p,v,!1,N)},ko.version="18.3.1-next-f1338f8080-20240426",ko}var XM;function SU(){if(XM)return RS.exports;XM=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(),RS.exports=Wee(),RS.exports}var QM;function Hee(){if(QM)return px;QM=1;var e=SU();return px.createRoot=e.createRoot,px.hydrateRoot=e.hydrateRoot,px}var Yee=Hee();const Gee=Kn(Yee),Kee=20,Xee=5e3,Mu={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let FS=0;function Qee(){return FS=(FS+1)%Number.MAX_VALUE,FS.toString()}const BS=new Map,JM=e=>{if(BS.has(e))return;const t=setTimeout(()=>{BS.delete(e),Cv({type:Mu.REMOVE_TOAST,toastId:e})},Xee);BS.set(e,t)},Jee=(e,t)=>{switch(t.type){case Mu.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,Kee)};case Mu.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Mu.DISMISS_TOAST:{const{toastId:n}=t;return n?JM(n):e.toasts.forEach(r=>{JM(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Mu.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},cb=[];let ub={toasts:[]};function Cv(e){ub=Jee(ub,e),cb.forEach(t=>{t(ub)})}function Zee({...e}){const t=Qee(),n=i=>Cv({type:Mu.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>Cv({type:Mu.DISMISS_TOAST,toastId:t});return Cv({type:Mu.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function Gs(){const[e,t]=E.useState(ub);return E.useEffect(()=>(cb.push(t),()=>{const n=cb.indexOf(t);n>-1&&cb.splice(n,1)}),[e]),{...e,toast:Zee,dismiss:n=>Cv({type:Mu.DISMISS_TOAST,toastId:n})}}function _U(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_U(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Tn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_U(e))&&(r&&(r+=" "),r+=t);return r}const ZM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,e6=Tn,v2=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return e6(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],h=a==null?void 0:a[c];if(f===null)return null;const g=ZM(f)||ZM(h);return i[c][g]}),s=n&&Object.entries(n).reduce((c,f)=>{let[h,g]=f;return g===void 0||(c[h]=g),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:h,className:g,...m}=f;return Object.entries(m).every(b=>{let[y,x]=b;return Array.isArray(x)?x.includes({...a,...s}[y]):{...a,...s}[y]===x})?[...c,h,g]:c},[]);return e6(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ete=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),NU=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var tte={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"};/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nte=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},l)=>E.createElement("svg",{ref:l,...tte,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:NU("lucide",i),...s},[...o.map(([c,f])=>E.createElement(c,f)),...Array.isArray(a)?a:[a]]));/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yt=(e,t)=>{const n=E.forwardRef(({className:r,...i},a)=>E.createElement(nte,{ref:a,iconNode:t,className:NU(`lucide-${ete(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rte=[["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"}]],ite=yt("Activity",rte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ate=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Db=yt("ArrowLeft",ate);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ote=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],zg=yt("ArrowRight",ote);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ste=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],Lu=yt("Ban",ste);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lte=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],pg=yt("Bell",lte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cte=[["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"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],mE=yt("Building2",cte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ute=[["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"}]],kU=yt("Calendar",ute);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fte=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],AU=yt("CheckCheck",fte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Od=yt("Check",dte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],x2=yt("ChevronDown",hte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pte=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],gE=yt("ChevronLeft",pte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mte=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],b2=yt("ChevronRight",mte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gte=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],yE=yt("ChevronUp",gte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yte=[["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"}]],vte=yt("CircleAlert",yte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xte=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ss=yt("CircleCheckBig",xte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],vE=yt("CircleCheck",bte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wte=[["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"}]],xE=yt("CircleX",wte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ste=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],w2=yt("Clock",Ste);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _te=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],Nte=yt("Code",_te);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kte=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Yv=yt("Copy",kte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ate=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],t1=yt("CreditCard",Ate);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pte=[["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"}]],jte=yt("DollarSign",Pte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cte=[["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"}]],Ete=yt("Download",Cte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ote=[["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"}]],PU=yt("ExternalLink",Ote);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tte=[["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"}]],n1=yt("Eye",Tte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mte=[["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:"m9 15 2 2 4-4",key:"1grp1n"}]],Lte=yt("FileCheck",Mte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rte=[["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"}]],mg=yt("FileText",Rte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ite=[["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:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Dte=yt("FileWarning",Ite);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fte=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],Bte=yt("Gift",Fte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $te=[["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"}]],jc=yt("Globe",$te);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],t6=yt("Info",qte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ute=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],zte=yt("LayoutDashboard",Ute);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vte=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Wte=yt("Link",Vte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hte=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],Yte=yt("List",Hte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],hn=yt("LoaderCircle",Gte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kte=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Xte=yt("Loader",Kte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qte=[["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"}]],Vg=yt("Lock",Qte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jte=[["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"}]],jU=yt("LogOut",Jte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zte=[["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"}]],ene=yt("Mail",Zte);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tne=[["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"}]],bE=yt("MapPin",tne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nne=[["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"}]],rne=yt("Menu",nne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ine=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],n6=yt("MessageSquare",ine);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ane=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],one=yt("OctagonAlert",ane);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sne=[["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"}]],lne=yt("Pencil",sne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cne=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],une=yt("Percent",cne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fne=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],S2=yt("Plus",fne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dne=[["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"}]],ip=yt("RefreshCw",dne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hne=[["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"}]],pne=yt("RotateCcw",hne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mne=[["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"}]],gne=yt("Save",mne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yne=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]],CU=yt("ScanSearch",yne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vne=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],EU=yt("Search",vne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xne=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],bne=yt("Server",xne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wne=[["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"}]],Sne=yt("Settings",wne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _ne=[["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",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Nne=yt("ShieldAlert",_ne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kne=[["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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Oh=yt("ShieldCheck",kne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ane=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],Fb=yt("ShieldOff",Ane);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pne=[["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",key:"oel41y"}]],Ki=yt("Shield",Pne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jne=[["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"}]],Bb=yt("Sparkles",jne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cne=[["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"}]],Gv=yt("Trash2",Cne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ene=[["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"}]],One=yt("TrendingUp",Ene);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tne=[["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"}]],so=yt("TriangleAlert",Tne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mne=[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]],Lne=yt("UserCog",Mne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rne=[["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"}]],Ine=yt("User",Rne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dne=[["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"}]],$b=yt("Users",Dne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fne=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],$S=yt("Wifi",Fne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bne=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lc=yt("X",Bne);/**
* @license lucide-react v0.475.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $ne=[["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"}]],_2=yt("Zap",$ne),qne=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Une=(e,t)=>({classGroupId:e,validator:t}),OU=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qb="-",r6=[],zne="arbitrary..",Vne=e=>{const t=Hne(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Wne(o);const s=o.split(qb),l=s[0]===""&&s.length>1?1:0;return TU(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=r[o],c=n[o];return l?c?qne(c,l):l:c||r6}return n[o]||r6}}},TU=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const c=TU(e,t+1,a);if(c)return c}const o=n.validators;if(o===null)return;const s=t===0?e.join(qb):e.slice(t).join(qb),l=o.length;for(let c=0;c<l;c++){const f=o[c];if(f.validator(s))return f.classGroupId}},Wne=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?zne+r:void 0})(),Hne=e=>{const{theme:t,classGroups:n}=e;return Yne(n,t)},Yne=(e,t)=>{const n=OU();for(const r in e){const i=e[r];wE(i,n,r,t)}return n},wE=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];Gne(o,t,n,r)}},Gne=(e,t,n,r)=>{if(typeof e=="string"){Kne(e,t,n);return}if(typeof e=="function"){Xne(e,t,n,r);return}Qne(e,t,n,r)},Kne=(e,t,n)=>{const r=e===""?t:MU(t,e);r.classGroupId=n},Xne=(e,t,n,r)=>{if(Jne(e)){wE(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Une(n,e))},Qne=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[s,l]=i[o];wE(l,MU(t,s),n,r)}},MU=(e,t)=>{let n=e;const r=t.split(qb),i=r.length;for(let a=0;a<i;a++){const o=r[a];let s=n.nextPart.get(o);s||(s=OU(),n.nextPart.set(o,s)),n=s}return n},Jne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Zne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,o)=>{n[a]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let o=n[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return i(a,o),o},set(a,o){a in n?n[a]=o:i(a,o)}}},vj="!",i6=":",ere=[],a6=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),tre=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let o=0,s=0,l=0,c;const f=i.length;for(let y=0;y<f;y++){const x=i[y];if(o===0&&s===0){if(x===i6){a.push(i.slice(l,y)),l=y+1;continue}if(x==="/"){c=y;continue}}x==="["?o++:x==="]"?o--:x==="("?s++:x===")"&&s--}const h=a.length===0?i:i.slice(l);let g=h,m=!1;h.endsWith(vj)?(g=h.slice(0,-1),m=!0):h.startsWith(vj)&&(g=h.slice(1),m=!0);const b=c&&c>l?c-l:void 0;return a6(a,m,g,b)};if(t){const i=t+i6,a=r;r=o=>o.startsWith(i)?a(o.slice(i.length)):a6(ere,!1,o,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},nre=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const o=n[a],s=o[0]==="[",l=t.has(o);s||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(o)):i.push(o)}return i.length>0&&(i.sort(),r.push(...i)),r}},rre=e=>({cache:Zne(e.cacheSize),parseClassName:tre(e),sortModifiers:nre(e),...Vne(e)}),ire=/\s+/,are=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(ire);let l="";for(let c=s.length-1;c>=0;c-=1){const f=s[c],{isExternal:h,modifiers:g,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:y}=n(f);if(h){l=f+(l.length>0?" "+l:l);continue}let x=!!y,w=r(x?b.substring(0,y):b);if(!w){if(!x){l=f+(l.length>0?" "+l:l);continue}if(w=r(b),!w){l=f+(l.length>0?" "+l:l);continue}x=!1}const _=g.length===0?"":g.length===1?g[0]:a(g).join(":"),k=m?_+vj:_,P=k+w;if(o.indexOf(P)>-1)continue;o.push(P);const C=i(w,x);for(let j=0;j<C.length;++j){const L=C[j];o.push(k+L)}l=f+(l.length>0?" "+l:l)}return l},ore=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=LU(n))&&(i&&(i+=" "),i+=r);return i},LU=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=LU(e[r]))&&(n&&(n+=" "),n+=t);return n},sre=(e,...t)=>{let n,r,i,a;const o=l=>{const c=t.reduce((f,h)=>h(f),e());return n=rre(c),r=n.cache.get,i=n.cache.set,a=s,s(l)},s=l=>{const c=r(l);if(c)return c;const f=are(l,n);return i(l,f),f};return a=o,(...l)=>a(ore(...l))},lre=[],Ui=e=>{const t=n=>n[e]||lre;return t.isThemeGetter=!0,t},RU=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IU=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cre=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ure=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fre=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dre=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hre=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pre=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zf=e=>cre.test(e),xn=e=>!!e&&!Number.isNaN(Number(e)),Vf=e=>!!e&&Number.isInteger(Number(e)),qS=e=>e.endsWith("%")&&xn(e.slice(0,-1)),wu=e=>ure.test(e),DU=()=>!0,mre=e=>fre.test(e)&&!dre.test(e),SE=()=>!1,gre=e=>hre.test(e),yre=e=>pre.test(e),vre=e=>!Pt(e)&&!Et(e),xre=e=>Td(e,$U,SE),Pt=e=>RU.test(e),vh=e=>Td(e,qU,mre),o6=e=>Td(e,Pre,xn),bre=e=>Td(e,zU,DU),wre=e=>Td(e,UU,SE),s6=e=>Td(e,FU,SE),Sre=e=>Td(e,BU,yre),mx=e=>Td(e,VU,gre),Et=e=>IU.test(e),Wy=e=>Sp(e,qU),_re=e=>Sp(e,UU),l6=e=>Sp(e,FU),Nre=e=>Sp(e,$U),kre=e=>Sp(e,BU),gx=e=>Sp(e,VU,!0),Are=e=>Sp(e,zU,!0),Td=(e,t,n)=>{const r=RU.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Sp=(e,t,n=!1)=>{const r=IU.exec(e);return r?r[1]?t(r[1]):n:!1},FU=e=>e==="position"||e==="percentage",BU=e=>e==="image"||e==="url",$U=e=>e==="length"||e==="size"||e==="bg-size",qU=e=>e==="length",Pre=e=>e==="number",UU=e=>e==="family-name",zU=e=>e==="number"||e==="weight",VU=e=>e==="shadow",jre=()=>{const e=Ui("color"),t=Ui("font"),n=Ui("text"),r=Ui("font-weight"),i=Ui("tracking"),a=Ui("leading"),o=Ui("breakpoint"),s=Ui("container"),l=Ui("spacing"),c=Ui("radius"),f=Ui("shadow"),h=Ui("inset-shadow"),g=Ui("text-shadow"),m=Ui("drop-shadow"),b=Ui("blur"),y=Ui("perspective"),x=Ui("aspect"),w=Ui("ease"),_=Ui("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...P(),Et,Pt],j=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],R=()=>[Et,Pt,l],D=()=>[zf,"full","auto",...R()],H=()=>[Vf,"none","subgrid",Et,Pt],M=()=>["auto",{span:["full",Vf,Et,Pt]},Vf,Et,Pt],F=()=>[Vf,"auto",Et,Pt],W=()=>["auto","min","max","fr",Et,Pt],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...R()],Z=()=>[zf,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],K=()=>[zf,"screen","full","dvw","lvw","svw","min","max","fit",...R()],se=()=>[zf,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],z=()=>[e,Et,Pt],te=()=>[...P(),l6,s6,{position:[Et,Pt]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",Nre,xre,{size:[Et,Pt]}],re=()=>[qS,Wy,vh],le=()=>["","none","full",c,Et,Pt],de=()=>["",xn,Wy,vh],pe=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[xn,qS,l6,s6],xe=()=>["","none",b,Et,Pt],Pe=()=>["none",xn,Et,Pt],Se=()=>["none",xn,Et,Pt],Ue=()=>[xn,Et,Pt],Ye=()=>[zf,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wu],breakpoint:[wu],color:[DU],container:[wu],"drop-shadow":[wu],ease:["in","out","in-out"],font:[vre],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wu],shadow:[wu],spacing:["px",xn],text:[wu],"text-shadow":[wu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zf,Pt,Et,x]}],container:["container"],columns:[{columns:[xn,Pt,Et,s]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Vf,"auto",Et,Pt]}],basis:[{basis:[zf,"full","auto",s,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xn,zf,"auto","initial","none",Pt]}],grow:[{grow:["",xn,Et,Pt]}],shrink:[{shrink:["",xn,Et,Pt]}],order:[{order:[Vf,"first","last","none",Et,Pt]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[s,"screen",...Z()]}],"min-w":[{"min-w":[s,"screen","none",...Z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",n,Wy,vh]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Are,bre]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qS,Pt]}],"font-family":[{font:[_re,wre,t]}],"font-features":[{"font-features":[Pt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Et,Pt]}],"line-clamp":[{"line-clamp":[xn,"none",Et,o6]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",Et,Pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Et,Pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[xn,"from-font","auto",Et,vh]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[xn,"auto",Et,Pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Et,Pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Et,Pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vf,Et,Pt],radial:["",Et,Pt],conic:[Vf,Et,Pt]},kre,Sre]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xn,Et,Pt]}],"outline-w":[{outline:["",xn,Wy,vh]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",f,gx,mx]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",h,gx,mx]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[xn,vh]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",g,gx,mx]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[xn,Et,Pt]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[xn]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Et,Pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[xn]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Et,Pt]}],filter:[{filter:["","none",Et,Pt]}],blur:[{blur:xe()}],brightness:[{brightness:[xn,Et,Pt]}],contrast:[{contrast:[xn,Et,Pt]}],"drop-shadow":[{"drop-shadow":["","none",m,gx,mx]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",xn,Et,Pt]}],"hue-rotate":[{"hue-rotate":[xn,Et,Pt]}],invert:[{invert:["",xn,Et,Pt]}],saturate:[{saturate:[xn,Et,Pt]}],sepia:[{sepia:["",xn,Et,Pt]}],"backdrop-filter":[{"backdrop-filter":["","none",Et,Pt]}],"backdrop-blur":[{"backdrop-blur":xe()}],"backdrop-brightness":[{"backdrop-brightness":[xn,Et,Pt]}],"backdrop-contrast":[{"backdrop-contrast":[xn,Et,Pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xn,Et,Pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xn,Et,Pt]}],"backdrop-invert":[{"backdrop-invert":["",xn,Et,Pt]}],"backdrop-opacity":[{"backdrop-opacity":[xn,Et,Pt]}],"backdrop-saturate":[{"backdrop-saturate":[xn,Et,Pt]}],"backdrop-sepia":[{"backdrop-sepia":["",xn,Et,Pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Et,Pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xn,"initial",Et,Pt]}],ease:[{ease:["linear","initial",w,Et,Pt]}],delay:[{delay:[xn,Et,Pt]}],animate:[{animate:["none",_,Et,Pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Et,Pt]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[Et,Pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Et,Pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Et,Pt]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[xn,Wy,vh,o6]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Cre=sre(jre);function Un(...e){return Cre(Tn(e))}const WU=E.forwardRef(({...e},t)=>d.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));WU.displayName="ToastProvider";const HU=E.forwardRef(({...e},t)=>d.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));HU.displayName="ToastViewport";const Ere=v2("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),YU=E.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,className:Un("group",Ere({variant:t}),e),...n}));YU.displayName="Toast";const Ore=E.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Un("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Ore.displayName="ToastAction";const GU=E.forwardRef(({className:e,...t},n)=>d.jsx("button",{ref:n,className:Un("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-100 transition-opacity hover:text-foreground focus:outline-none group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50",e),...t,children:d.jsx(Lc,{className:"h-4 w-4"})}));GU.displayName="ToastClose";const KU=E.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Un("text-sm font-semibold",e),...t}));KU.displayName="ToastTitle";const XU=E.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Un("text-sm opacity-90",e),...t}));XU.displayName="ToastDescription";function Tre(){const{toasts:e}=Gs();return d.jsxs(WU,{children:[e.map(function({id:t,title:n,description:r,action:i,onOpenChange:a,...o}){return d.jsxs(YU,{...o,children:[d.jsxs("div",{className:"grid gap-1",children:[n&&d.jsx(KU,{children:n}),r&&d.jsx(XU,{children:r})]}),i,d.jsx(GU,{onClick:()=>a==null?void 0:a(!1)})]},t)}),d.jsx(HU,{})]})}var Wg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mre={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},td,hE,fU,Lre=(fU=class{constructor(){Dt(this,td,Mre);Dt(this,hE,!1)}setTimeoutProvider(e){ft(this,td,e)}setTimeout(e,t){return ge(this,td).setTimeout(e,t)}clearTimeout(e){ge(this,td).clearTimeout(e)}setInterval(e,t){return ge(this,td).setInterval(e,t)}clearInterval(e){ge(this,td).clearInterval(e)}},td=new WeakMap,hE=new WeakMap,fU),Th=new Lre;function Rre(e){setTimeout(e,0)}var ap=typeof window>"u"||"Deno"in globalThis;function ao(){}function Ire(e,t){return typeof e=="function"?e(t):e}function xj(e){return typeof e=="number"&&e>=0&&e!==1/0}function QU(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gd(e,t){return typeof e=="function"?e(t):e}function Bs(e,t){return typeof e=="function"?e(t):e}function c6(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==_E(o,t.options))return!1}else if(!Kv(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function u6(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(op(t.options.mutationKey)!==op(a))return!1}else if(!Kv(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function _E(e,t){return((t==null?void 0:t.queryKeyHashFn)||op)(e)}function op(e){return JSON.stringify(e,(t,n)=>bj(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Kv(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Kv(e[n],t[n])):!1}var Dre=Object.prototype.hasOwnProperty;function JU(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=f6(e)&&f6(t);if(!r&&!(bj(e)&&bj(t)))return t;const a=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),s=o.length,l=r?new Array(s):{};let c=0;for(let f=0;f<s;f++){const h=r?f:o[f],g=e[h],m=t[h];if(g===m){l[h]=g,(r?f<a:Dre.call(e,h))&&c++;continue}if(g===null||m===null||typeof g!="object"||typeof m!="object"){l[h]=m;continue}const b=JU(g,m,n+1);l[h]=b,b===g&&c++}return a===s&&c===a?e:l}function Ub(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function f6(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bj(e){if(!d6(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!d6(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function d6(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fre(e){return new Promise(t=>{Th.setTimeout(t,e)})}function wj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?JU(e,t):t}function Bre(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $re(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var NE=Symbol();function ZU(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===NE?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function kE(e,t){return typeof e=="function"?e(...t):!!e}function qre(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var qh,nd,ng,dU,Ure=(dU=class extends Wg{constructor(){super();Dt(this,qh);Dt(this,nd);Dt(this,ng);ft(this,ng,t=>{if(!ap&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ge(this,nd)||this.setEventListener(ge(this,ng))}onUnsubscribe(){var t;this.hasListeners()||((t=ge(this,nd))==null||t.call(this),ft(this,nd,void 0))}setEventListener(t){var n;ft(this,ng,t),(n=ge(this,nd))==null||n.call(this),ft(this,nd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ge(this,qh)!==t&&(ft(this,qh,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ge(this,qh)=="boolean"?ge(this,qh):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qh=new WeakMap,nd=new WeakMap,ng=new WeakMap,dU),AE=new Ure;function Sj(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var zre=Rre;function Vre(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=zre;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Wi=Vre(),rg,rd,ig,hU,Wre=(hU=class extends Wg{constructor(){super();Dt(this,rg,!0);Dt(this,rd);Dt(this,ig);ft(this,ig,t=>{if(!ap&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){ge(this,rd)||this.setEventListener(ge(this,ig))}onUnsubscribe(){var t;this.hasListeners()||((t=ge(this,rd))==null||t.call(this),ft(this,rd,void 0))}setEventListener(t){var n;ft(this,ig,t),(n=ge(this,rd))==null||n.call(this),ft(this,rd,t(this.setOnline.bind(this)))}setOnline(t){ge(this,rg)!==t&&(ft(this,rg,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ge(this,rg)}},rg=new WeakMap,rd=new WeakMap,ig=new WeakMap,hU),zb=new Wre;function Hre(e){return Math.min(1e3*2**e,3e4)}function ez(e){return(e??"online")==="online"?zb.isOnline():!0}var _j=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function tz(e){let t=!1,n=0,r;const i=Sj(),a=()=>i.status!=="pending",o=y=>{var x;if(!a()){const w=new _j(y);g(w),(x=e.onCancel)==null||x.call(e,w)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>AE.isFocused()&&(e.networkMode==="always"||zb.isOnline())&&e.canRun(),f=()=>ez(e.networkMode)&&e.canRun(),h=y=>{a()||(r==null||r(),i.resolve(y))},g=y=>{a()||(r==null||r(),i.reject(y))},m=()=>new Promise(y=>{var x;r=w=>{(a()||c())&&y(w)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,a()||(y=e.onContinue)==null||y.call(e)}),b=()=>{if(a())return;let y;const x=n===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(w){y=Promise.reject(w)}Promise.resolve(y).then(h).catch(w=>{var j;if(a())return;const _=e.retry??(ap?0:3),k=e.retryDelay??Hre,P=typeof k=="function"?k(n,w):k,C=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(t||!C){g(w);return}n++,(j=e.onFail)==null||j.call(e,n,w),Fre(P).then(()=>c()?void 0:m()).then(()=>{t?g(w):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:s,continueRetry:l,canStart:f,start:()=>(f()?b():m().then(b),i)}}var Uh,pU,nz=(pU=class{constructor(){Dt(this,Uh)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xj(this.gcTime)&&ft(this,Uh,Th.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ap?1/0:300*1e3))}clearGcTimeout(){ge(this,Uh)&&(Th.clearTimeout(ge(this,Uh)),ft(this,Uh,void 0))}},Uh=new WeakMap,pU),zh,ag,Fs,Vh,aa,X0,Wh,wl,Au,mU,Yre=(mU=class extends nz{constructor(t){super();Dt(this,wl);Dt(this,zh);Dt(this,ag);Dt(this,Fs);Dt(this,Vh);Dt(this,aa);Dt(this,X0);Dt(this,Wh);ft(this,Wh,!1),ft(this,X0,t.defaultOptions),this.setOptions(t.options),this.observers=[],ft(this,Vh,t.client),ft(this,Fs,ge(this,Vh).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ft(this,zh,p6(this.options)),this.state=t.state??ge(this,zh),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ge(this,aa))==null?void 0:t.promise}setOptions(t){if(this.options={...ge(this,X0),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=p6(this.options);n.data!==void 0&&(this.setState(h6(n.data,n.dataUpdatedAt)),ft(this,zh,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ge(this,Fs).remove(this)}setData(t,n){const r=wj(this.state.data,t,this.options);return yn(this,wl,Au).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){yn(this,wl,Au).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=ge(this,aa))==null?void 0:r.promise;return(i=ge(this,aa))==null||i.cancel(t),n?n.then(ao).catch(ao):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ge(this,zh))}isActive(){return this.observers.some(t=>Bs(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===NE||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gd(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!QU(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ge(this,aa))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ge(this,aa))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ge(this,Fs).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ge(this,aa)&&(ge(this,Wh)?ge(this,aa).cancel({revert:!0}):ge(this,aa).cancelRetry()),this.scheduleGc()),ge(this,Fs).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||yn(this,wl,Au).call(this,{type:"invalidate"})}async fetch(t,n){var l,c,f,h,g,m,b,y,x,w,_,k;if(this.state.fetchStatus!=="idle"&&((l=ge(this,aa))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ge(this,aa))return ge(this,aa).continueRetry(),ge(this,aa).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(C=>C.options.queryFn);P&&this.setOptions(P.options)}const r=new AbortController,i=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ft(this,Wh,!0),r.signal)})},a=()=>{const P=ZU(this.options,n),j=(()=>{const L={client:ge(this,Vh),queryKey:this.queryKey,meta:this.meta};return i(L),L})();return ft(this,Wh,!1),this.options.persister?this.options.persister(P,j,this):P(j)},s=(()=>{const P={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:ge(this,Vh),state:this.state,fetchFn:a};return i(P),P})();(c=this.options.behavior)==null||c.onFetch(s,this),ft(this,ag,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&yn(this,wl,Au).call(this,{type:"fetch",meta:(h=s.fetchOptions)==null?void 0:h.meta}),ft(this,aa,tz({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:P=>{P instanceof _j&&P.revert&&this.setState({...ge(this,ag),fetchStatus:"idle"}),r.abort()},onFail:(P,C)=>{yn(this,wl,Au).call(this,{type:"failed",failureCount:P,error:C})},onPause:()=>{yn(this,wl,Au).call(this,{type:"pause"})},onContinue:()=>{yn(this,wl,Au).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const P=await ge(this,aa).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(m=(g=ge(this,Fs).config).onSuccess)==null||m.call(g,P,this),(y=(b=ge(this,Fs).config).onSettled)==null||y.call(b,P,this.state.error,this),P}catch(P){if(P instanceof _j){if(P.silent)return ge(this,aa).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw yn(this,wl,Au).call(this,{type:"error",error:P}),(w=(x=ge(this,Fs).config).onError)==null||w.call(x,P,this),(k=(_=ge(this,Fs).config).onSettled)==null||k.call(_,this.state.data,P,this),P}finally{this.scheduleGc()}}},zh=new WeakMap,ag=new WeakMap,Fs=new WeakMap,Vh=new WeakMap,aa=new WeakMap,X0=new WeakMap,Wh=new WeakMap,wl=new WeakSet,Au=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rz(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...h6(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ft(this,ag,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Wi.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ge(this,Fs).notify({query:this,type:"updated",action:t})})},mU);function rz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ez(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function h6(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function p6(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Co,En,Q0,io,Hh,og,Cu,id,J0,sg,lg,Yh,Gh,ad,cg,tr,vv,Nj,kj,Aj,Pj,jj,Cj,Ej,iz,gU,Gre=(gU=class extends Wg{constructor(t,n){super();Dt(this,tr);Dt(this,Co);Dt(this,En);Dt(this,Q0);Dt(this,io);Dt(this,Hh);Dt(this,og);Dt(this,Cu);Dt(this,id);Dt(this,J0);Dt(this,sg);Dt(this,lg);Dt(this,Yh);Dt(this,Gh);Dt(this,ad);Dt(this,cg,new Set);this.options=n,ft(this,Co,t),ft(this,id,null),ft(this,Cu,Sj()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ge(this,En).addObserver(this),m6(ge(this,En),this.options)?yn(this,tr,vv).call(this):this.updateResult(),yn(this,tr,Pj).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Oj(ge(this,En),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Oj(ge(this,En),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,yn(this,tr,jj).call(this),yn(this,tr,Cj).call(this),ge(this,En).removeObserver(this)}setOptions(t){const n=this.options,r=ge(this,En);if(this.options=ge(this,Co).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Bs(this.options.enabled,ge(this,En))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");yn(this,tr,Ej).call(this),ge(this,En).setOptions(this.options),n._defaulted&&!Ub(this.options,n)&&ge(this,Co).getQueryCache().notify({type:"observerOptionsUpdated",query:ge(this,En),observer:this});const i=this.hasListeners();i&&g6(ge(this,En),r,this.options,n)&&yn(this,tr,vv).call(this),this.updateResult(),i&&(ge(this,En)!==r||Bs(this.options.enabled,ge(this,En))!==Bs(n.enabled,ge(this,En))||gd(this.options.staleTime,ge(this,En))!==gd(n.staleTime,ge(this,En)))&&yn(this,tr,Nj).call(this);const a=yn(this,tr,kj).call(this);i&&(ge(this,En)!==r||Bs(this.options.enabled,ge(this,En))!==Bs(n.enabled,ge(this,En))||a!==ge(this,ad))&&yn(this,tr,Aj).call(this,a)}getOptimisticResult(t){const n=ge(this,Co).getQueryCache().build(ge(this,Co),t),r=this.createResult(n,t);return Xre(this,r)&&(ft(this,io,r),ft(this,og,this.options),ft(this,Hh,ge(this,En).state)),r}getCurrentResult(){return ge(this,io)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&ge(this,Cu).status==="pending"&&ge(this,Cu).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){ge(this,cg).add(t)}getCurrentQuery(){return ge(this,En)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=ge(this,Co).defaultQueryOptions(t),r=ge(this,Co).getQueryCache().build(ge(this,Co),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return yn(this,tr,vv).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ge(this,io)))}createResult(t,n){var D;const r=ge(this,En),i=this.options,a=ge(this,io),o=ge(this,Hh),s=ge(this,og),c=t!==r?t.state:ge(this,Q0),{state:f}=t;let h={...f},g=!1,m;if(n._optimisticResults){const H=this.hasListeners(),M=!H&&m6(t,n),F=H&&g6(t,r,n,i);(M||F)&&(h={...h,...rz(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:y,status:x}=h;m=h.data;let w=!1;if(n.placeholderData!==void 0&&m===void 0&&x==="pending"){let H;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(H=a.data,w=!0):H=typeof n.placeholderData=="function"?n.placeholderData((D=ge(this,lg))==null?void 0:D.state.data,ge(this,lg)):n.placeholderData,H!==void 0&&(x="success",m=wj(a==null?void 0:a.data,H,n),g=!0)}if(n.select&&m!==void 0&&!w)if(a&&m===(o==null?void 0:o.data)&&n.select===ge(this,J0))m=ge(this,sg);else try{ft(this,J0,n.select),m=n.select(m),m=wj(a==null?void 0:a.data,m,n),ft(this,sg,m),ft(this,id,null)}catch(H){ft(this,id,H)}ge(this,id)&&(b=ge(this,id),m=ge(this,sg),y=Date.now(),x="error");const _=h.fetchStatus==="fetching",k=x==="pending",P=x==="error",C=k&&_,j=m!==void 0,R={status:x,fetchStatus:h.fetchStatus,isPending:k,isSuccess:x==="success",isError:P,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:_,isRefetching:_&&!k,isLoadingError:P&&!j,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:P&&j,isStale:PE(t,n),refetch:this.refetch,promise:ge(this,Cu),isEnabled:Bs(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const H=R.data!==void 0,M=R.status==="error"&&!H,F=X=>{M?X.reject(R.error):H&&X.resolve(R.data)},W=()=>{const X=ft(this,Cu,R.promise=Sj());F(X)},V=ge(this,Cu);switch(V.status){case"pending":t.queryHash===r.queryHash&&F(V);break;case"fulfilled":(M||R.data!==V.value)&&W();break;case"rejected":(!M||R.error!==V.reason)&&W();break}}return R}updateResult(){const t=ge(this,io),n=this.createResult(ge(this,En),this.options);if(ft(this,Hh,ge(this,En).state),ft(this,og,this.options),ge(this,Hh).data!==void 0&&ft(this,lg,ge(this,En)),Ub(n,t))return;ft(this,io,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ge(this,cg).size)return!0;const o=new Set(a??ge(this,cg));return this.options.throwOnError&&o.add("error"),Object.keys(ge(this,io)).some(s=>{const l=s;return ge(this,io)[l]!==t[l]&&o.has(l)})};yn(this,tr,iz).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&yn(this,tr,Pj).call(this)}},Co=new WeakMap,En=new WeakMap,Q0=new WeakMap,io=new WeakMap,Hh=new WeakMap,og=new WeakMap,Cu=new WeakMap,id=new WeakMap,J0=new WeakMap,sg=new WeakMap,lg=new WeakMap,Yh=new WeakMap,Gh=new WeakMap,ad=new WeakMap,cg=new WeakMap,tr=new WeakSet,vv=function(t){yn(this,tr,Ej).call(this);let n=ge(this,En).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ao)),n},Nj=function(){yn(this,tr,jj).call(this);const t=gd(this.options.staleTime,ge(this,En));if(ap||ge(this,io).isStale||!xj(t))return;const r=QU(ge(this,io).dataUpdatedAt,t)+1;ft(this,Yh,Th.setTimeout(()=>{ge(this,io).isStale||this.updateResult()},r))},kj=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ge(this,En)):this.options.refetchInterval)??!1},Aj=function(t){yn(this,tr,Cj).call(this),ft(this,ad,t),!(ap||Bs(this.options.enabled,ge(this,En))===!1||!xj(ge(this,ad))||ge(this,ad)===0)&&ft(this,Gh,Th.setInterval(()=>{(this.options.refetchIntervalInBackground||AE.isFocused())&&yn(this,tr,vv).call(this)},ge(this,ad)))},Pj=function(){yn(this,tr,Nj).call(this),yn(this,tr,Aj).call(this,yn(this,tr,kj).call(this))},jj=function(){ge(this,Yh)&&(Th.clearTimeout(ge(this,Yh)),ft(this,Yh,void 0))},Cj=function(){ge(this,Gh)&&(Th.clearInterval(ge(this,Gh)),ft(this,Gh,void 0))},Ej=function(){const t=ge(this,Co).getQueryCache().build(ge(this,Co),this.options);if(t===ge(this,En))return;const n=ge(this,En);ft(this,En,t),ft(this,Q0,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},iz=function(t){Wi.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(ge(this,io))}),ge(this,Co).getQueryCache().notify({query:ge(this,En),type:"observerResultsUpdated"})})},gU);function Kre(e,t){return Bs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function m6(e,t){return Kre(e,t)||e.state.data!==void 0&&Oj(e,t,t.refetchOnMount)}function Oj(e,t,n){if(Bs(t.enabled,e)!==!1&&gd(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&PE(e,t)}return!1}function g6(e,t,n,r){return(e!==t||Bs(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&PE(e,n)}function PE(e,t){return Bs(t.enabled,e)!==!1&&e.isStaleByTime(gd(t.staleTime,e))}function Xre(e,t){return!Ub(e.getCurrentResult(),t)}function y6(e){return{onFetch:(t,n)=>{var f,h,g,m,b;const r=t.options,i=(g=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const x=k=>{qre(k,()=>t.signal,()=>y=!0)},w=ZU(t.options,t.fetchOptions),_=async(k,P,C)=>{if(y)return Promise.reject();if(P==null&&k.pages.length)return Promise.resolve(k);const L=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:P,direction:C?"backward":"forward",meta:t.options.meta};return x(M),M})(),R=await w(L),{maxPages:D}=t.options,H=C?$re:Bre;return{pages:H(k.pages,R,D),pageParams:H(k.pageParams,P,D)}};if(i&&a.length){const k=i==="backward",P=k?Qre:v6,C={pages:a,pageParams:o},j=P(r,C);s=await _(C,j,k)}else{const k=e??a.length;do{const P=l===0?o[0]??r.initialPageParam:v6(r,s);if(l>0&&P==null)break;s=await _(s,P),l++}while(l<k)}return s};t.options.persister?t.fetchFn=()=>{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function v6(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qre(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Z0,fc,Ra,Kh,dc,Kf,yU,Jre=(yU=class extends nz{constructor(t){super();Dt(this,dc);Dt(this,Z0);Dt(this,fc);Dt(this,Ra);Dt(this,Kh);ft(this,Z0,t.client),this.mutationId=t.mutationId,ft(this,Ra,t.mutationCache),ft(this,fc,[]),this.state=t.state||az(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ge(this,fc).includes(t)||(ge(this,fc).push(t),this.clearGcTimeout(),ge(this,Ra).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ft(this,fc,ge(this,fc).filter(n=>n!==t)),this.scheduleGc(),ge(this,Ra).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ge(this,fc).length||(this.state.status==="pending"?this.scheduleGc():ge(this,Ra).remove(this))}continue(){var t;return((t=ge(this,Kh))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,c,f,h,g,m,b,y,x,w,_,k,P,C,j,L;const n=()=>{yn(this,dc,Kf).call(this,{type:"continue"})},r={client:ge(this,Z0),meta:this.options.meta,mutationKey:this.options.mutationKey};ft(this,Kh,tz({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,D)=>{yn(this,dc,Kf).call(this,{type:"failed",failureCount:R,error:D})},onPause:()=>{yn(this,dc,Kf).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ge(this,Ra).canRun(this)}));const i=this.state.status==="pending",a=!ge(this,Kh).canStart();try{if(i)n();else{yn(this,dc,Kf).call(this,{type:"pending",variables:t,isPaused:a}),ge(this,Ra).config.onMutate&&await ge(this,Ra).config.onMutate(t,this,r);const D=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t,r));D!==this.state.context&&yn(this,dc,Kf).call(this,{type:"pending",context:D,variables:t,isPaused:a})}const R=await ge(this,Kh).start();return await((c=(l=ge(this,Ra).config).onSuccess)==null?void 0:c.call(l,R,t,this.state.context,this,r)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,R,t,this.state.context,r)),await((m=(g=ge(this,Ra).config).onSettled)==null?void 0:m.call(g,R,null,this.state.variables,this.state.context,this,r)),await((y=(b=this.options).onSettled)==null?void 0:y.call(b,R,null,t,this.state.context,r)),yn(this,dc,Kf).call(this,{type:"success",data:R}),R}catch(R){try{await((w=(x=ge(this,Ra).config).onError)==null?void 0:w.call(x,R,t,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((k=(_=this.options).onError)==null?void 0:k.call(_,R,t,this.state.context,r))}catch(D){Promise.reject(D)}try{await((C=(P=ge(this,Ra).config).onSettled)==null?void 0:C.call(P,void 0,R,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((L=(j=this.options).onSettled)==null?void 0:L.call(j,void 0,R,t,this.state.context,r))}catch(D){Promise.reject(D)}throw yn(this,dc,Kf).call(this,{type:"error",error:R}),R}finally{ge(this,Ra).runNext(this)}}},Z0=new WeakMap,fc=new WeakMap,Ra=new WeakMap,Kh=new WeakMap,dc=new WeakSet,Kf=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wi.batch(()=>{ge(this,fc).forEach(r=>{r.onMutationUpdate(t)}),ge(this,Ra).notify({mutation:this,type:"updated",action:t})})},yU);function az(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Eu,Sl,e1,vU,Zre=(vU=class extends Wg{constructor(t={}){super();Dt(this,Eu);Dt(this,Sl);Dt(this,e1);this.config=t,ft(this,Eu,new Set),ft(this,Sl,new Map),ft(this,e1,0)}build(t,n,r){const i=new Jre({client:t,mutationCache:this,mutationId:++dx(this,e1)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){ge(this,Eu).add(t);const n=yx(t);if(typeof n=="string"){const r=ge(this,Sl).get(n);r?r.push(t):ge(this,Sl).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ge(this,Eu).delete(t)){const n=yx(t);if(typeof n=="string"){const r=ge(this,Sl).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&ge(this,Sl).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=yx(t);if(typeof n=="string"){const r=ge(this,Sl).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=yx(t);if(typeof n=="string"){const i=(r=ge(this,Sl).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wi.batch(()=>{ge(this,Eu).forEach(t=>{this.notify({type:"removed",mutation:t})}),ge(this,Eu).clear(),ge(this,Sl).clear()})}getAll(){return Array.from(ge(this,Eu))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>u6(n,r))}findAll(t={}){return this.getAll().filter(n=>u6(t,n))}notify(t){Wi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Wi.batch(()=>Promise.all(t.map(n=>n.continue().catch(ao))))}},Eu=new WeakMap,Sl=new WeakMap,e1=new WeakMap,vU);function yx(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ou,od,Eo,Tu,Hu,fb,Tj,xU,eie=(xU=class extends Wg{constructor(n,r){super();Dt(this,Hu);Dt(this,Ou);Dt(this,od);Dt(this,Eo);Dt(this,Tu);ft(this,Ou,n),this.setOptions(r),this.bindMethods(),yn(this,Hu,fb).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=ge(this,Ou).defaultMutationOptions(n),Ub(this.options,r)||ge(this,Ou).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ge(this,Eo),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&op(r.mutationKey)!==op(this.options.mutationKey)?this.reset():((i=ge(this,Eo))==null?void 0:i.state.status)==="pending"&&ge(this,Eo).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ge(this,Eo))==null||n.removeObserver(this)}onMutationUpdate(n){yn(this,Hu,fb).call(this),yn(this,Hu,Tj).call(this,n)}getCurrentResult(){return ge(this,od)}reset(){var n;(n=ge(this,Eo))==null||n.removeObserver(this),ft(this,Eo,void 0),yn(this,Hu,fb).call(this),yn(this,Hu,Tj).call(this)}mutate(n,r){var i;return ft(this,Tu,r),(i=ge(this,Eo))==null||i.removeObserver(this),ft(this,Eo,ge(this,Ou).getMutationCache().build(ge(this,Ou),this.options)),ge(this,Eo).addObserver(this),ge(this,Eo).execute(n)}},Ou=new WeakMap,od=new WeakMap,Eo=new WeakMap,Tu=new WeakMap,Hu=new WeakSet,fb=function(){var r;const n=((r=ge(this,Eo))==null?void 0:r.state)??az();ft(this,od,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Tj=function(n){Wi.batch(()=>{var r,i,a,o,s,l,c,f;if(ge(this,Tu)&&this.hasListeners()){const h=ge(this,od).variables,g=ge(this,od).context,m={client:ge(this,Ou),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=ge(this,Tu)).onSuccess)==null||i.call(r,n.data,h,g,m)}catch(b){Promise.reject(b)}try{(o=(a=ge(this,Tu)).onSettled)==null||o.call(a,n.data,null,h,g,m)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(l=(s=ge(this,Tu)).onError)==null||l.call(s,n.error,h,g,m)}catch(b){Promise.reject(b)}try{(f=(c=ge(this,Tu)).onSettled)==null||f.call(c,void 0,n.error,h,g,m)}catch(b){Promise.reject(b)}}}this.listeners.forEach(h=>{h(ge(this,od))})})},xU),hc,bU,tie=(bU=class extends Wg{constructor(t={}){super();Dt(this,hc);this.config=t,ft(this,hc,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??_E(i,n);let o=this.get(a);return o||(o=new Yre({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){ge(this,hc).has(t.queryHash)||(ge(this,hc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ge(this,hc).get(t.queryHash);n&&(t.destroy(),n===t&&ge(this,hc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wi.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ge(this,hc).get(t)}getAll(){return[...ge(this,hc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>c6(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>c6(t,r)):n}notify(t){Wi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Wi.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wi.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},hc=new WeakMap,bU),li,sd,ld,ug,fg,cd,dg,hg,wU,nie=(wU=class{constructor(e={}){Dt(this,li);Dt(this,sd);Dt(this,ld);Dt(this,ug);Dt(this,fg);Dt(this,cd);Dt(this,dg);Dt(this,hg);ft(this,li,e.queryCache||new tie),ft(this,sd,e.mutationCache||new Zre),ft(this,ld,e.defaultOptions||{}),ft(this,ug,new Map),ft(this,fg,new Map),ft(this,cd,0)}mount(){dx(this,cd)._++,ge(this,cd)===1&&(ft(this,dg,AE.subscribe(async e=>{e&&(await this.resumePausedMutations(),ge(this,li).onFocus())})),ft(this,hg,zb.subscribe(async e=>{e&&(await this.resumePausedMutations(),ge(this,li).onOnline())})))}unmount(){var e,t;dx(this,cd)._--,ge(this,cd)===0&&((e=ge(this,dg))==null||e.call(this),ft(this,dg,void 0),(t=ge(this,hg))==null||t.call(this),ft(this,hg,void 0))}isFetching(e){return ge(this,li).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ge(this,sd).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ge(this,li).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=ge(this,li).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(gd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return ge(this,li).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=ge(this,li).get(r.queryHash),a=i==null?void 0:i.state.data,o=Ire(t,a);if(o!==void 0)return ge(this,li).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Wi.batch(()=>ge(this,li).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ge(this,li).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ge(this,li);Wi.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ge(this,li);return Wi.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wi.batch(()=>ge(this,li).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ao).catch(ao)}invalidateQueries(e,t={}){return Wi.batch(()=>(ge(this,li).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Wi.batch(()=>ge(this,li).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(ao)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(ao)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ge(this,li).build(this,t);return n.isStaleByTime(gd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ao).catch(ao)}fetchInfiniteQuery(e){return e.behavior=y6(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ao).catch(ao)}ensureInfiniteQueryData(e){return e.behavior=y6(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zb.isOnline()?ge(this,sd).resumePausedMutations():Promise.resolve()}getQueryCache(){return ge(this,li)}getMutationCache(){return ge(this,sd)}getDefaultOptions(){return ge(this,ld)}setDefaultOptions(e){ft(this,ld,e)}setQueryDefaults(e,t){ge(this,ug).set(op(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ge(this,ug).values()],n={};return t.forEach(r=>{Kv(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){ge(this,fg).set(op(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ge(this,fg).values()],n={};return t.forEach(r=>{Kv(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ge(this,ld).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_E(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===NE&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ge(this,ld).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ge(this,li).clear(),ge(this,sd).clear()}},li=new WeakMap,sd=new WeakMap,ld=new WeakMap,ug=new WeakMap,fg=new WeakMap,cd=new WeakMap,dg=new WeakMap,hg=new WeakMap,wU),oz=E.createContext(void 0),Li=e=>{const t=E.useContext(oz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rie=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(oz.Provider,{value:e,children:t})),sz=E.createContext(!1),iie=()=>E.useContext(sz);sz.Provider;function aie(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oie=E.createContext(aie()),sie=()=>E.useContext(oie),lie=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?kE(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},cie=e=>{E.useEffect(()=>{e.clearReset()},[e])},uie=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||kE(n,[e.error,r])),fie=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},die=(e,t)=>e.isLoading&&e.isFetching&&!t,hie=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,x6=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function pie(e,t,n){var g,m,b,y;const r=iie(),i=sie(),a=Li(),o=a.defaultQueryOptions(e);(m=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||m.call(g,o);const s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",fie(o),lie(o,i,s),cie(i);const l=!a.getQueryCache().get(o.queryHash),[c]=E.useState(()=>new t(a,o)),f=c.getOptimisticResult(o),h=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(x=>{const w=h?c.subscribe(Wi.batchCalls(x)):ao;return c.updateResult(),w},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),E.useEffect(()=>{c.setOptions(o)},[o,c]),hie(o,f))throw x6(o,c,i);if(uie({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;if((y=(b=a.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||y.call(b,o,f),o.experimental_prefetchInRender&&!ap&&die(f,r)){const x=l?x6(o,c,i):s==null?void 0:s.promise;x==null||x.catch(ao).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?f:c.trackResult(f)}function dn(e,t){return pie(e,Gre)}function Hi(e,t){const n=Li(),[r]=E.useState(()=>new eie(n,e));E.useEffect(()=>{r.setOptions(e)},[r,e]);const i=E.useSyncExternalStore(E.useCallback(o=>r.subscribe(Wi.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=E.useCallback((o,s)=>{r.mutate(o,s).catch(ao)},[r]);if(i.error&&kE(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const mie=new nie({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var r1=SU();const gie=Kn(r1);/**
* @remix-run/router v1.23.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Xv(){return Xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xv.apply(this,arguments)}var ud;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ud||(ud={}));const b6="popstate";function yie(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:o,hash:s}=r.location;return Mj("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Vb(i)}return xie(t,n,null,e)}function Ti(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jE(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vie(){return Math.random().toString(36).substr(2,8)}function w6(e,t){return{usr:e.state,key:e.key,idx:t}}function Mj(e,t,n,r){return n===void 0&&(n=null),Xv({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Hg(t):t,{state:n,key:t&&t.key||r||vie()})}function Vb(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Hg(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function xie(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=ud.Pop,l=null,c=f();c==null&&(c=0,o.replaceState(Xv({},o.state,{idx:c}),""));function f(){return(o.state||{idx:null}).idx}function h(){s=ud.Pop;let x=f(),w=x==null?null:x-c;c=x,l&&l({action:s,location:y.location,delta:w})}function g(x,w){s=ud.Push;let _=Mj(y.location,x,w);c=f()+1;let k=w6(_,c),P=y.createHref(_);try{o.pushState(k,"",P)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(P)}a&&l&&l({action:s,location:y.location,delta:1})}function m(x,w){s=ud.Replace;let _=Mj(y.location,x,w);c=f();let k=w6(_,c),P=y.createHref(_);o.replaceState(k,"",P),a&&l&&l({action:s,location:y.location,delta:0})}function b(x){let w=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof x=="string"?x:Vb(x);return _=_.replace(/ $/,"%20"),Ti(w,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,w)}let y={get action(){return s},get location(){return e(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(b6,h),l=x,()=>{i.removeEventListener(b6,h),l=null}},createHref(x){return t(i,x)},createURL:b,encodeLocation(x){let w=b(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:m,go(x){return o.go(x)}};return y}var S6;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(S6||(S6={}));function bie(e,t,n){return n===void 0&&(n="/"),wie(e,t,n)}function wie(e,t,n,r){let i=typeof t=="string"?Hg(t):t,a=CE(i.pathname||"/",n);if(a==null)return null;let o=lz(e);Sie(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let c=Lie(a);s=Oie(o[l],c)}return s}function lz(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Ti(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=yd([r,l.relativePath]),f=n.concat(l);a.children&&a.children.length>0&&(Ti(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),lz(a.children,t,f,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:Cie(c,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of cz(a.path))i(a,o,l)}),t}function cz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=cz(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Sie(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Eie(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _ie=/^:[\w-]+$/,Nie=3,kie=2,Aie=1,Pie=10,jie=-2,_6=e=>e==="*";function Cie(e,t){let n=e.split("/"),r=n.length;return n.some(_6)&&(r+=jie),t&&(r+=kie),n.filter(i=>!_6(i)).reduce((i,a)=>i+(_ie.test(a)?Nie:a===""?Aie:Pie),r)}function Eie(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Oie(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",h=Tie({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},f),g=l.route;if(!h)return null;Object.assign(i,h.params),o.push({params:i,pathname:yd([a,h.pathname]),pathnameBase:Bie(yd([a,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(a=yd([a,h.pathnameBase]))}return o}function Tie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Mie(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((c,f,h)=>{let{paramName:g,isOptional:m}=f;if(g==="*"){let y=s[h]||"";o=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const b=s[h];return m&&!b?c[g]=void 0:c[g]=(b||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:o,pattern:e}}function Mie(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jE(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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Lie(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jE(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function CE(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Rie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Iie=e=>Rie.test(e);function Die(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hg(e):e,a;if(n)if(Iie(n))a=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),jE(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?a=N6(n.substring(1),"/"):a=N6(n,t)}else a=t;return{pathname:a,search:$ie(r),hash:qie(i)}}function N6(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function US(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Fie(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function uz(e,t){let n=Fie(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function fz(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Hg(e):(i=Xv({},e),Ti(!i.pathname||!i.pathname.includes("?"),US("?","pathname","search",i)),Ti(!i.pathname||!i.pathname.includes("#"),US("#","pathname","hash",i)),Ti(!i.search||!i.search.includes("#"),US("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),h-=1;i.pathname=g.join("/")}s=h>=0?t[h]:"/"}let l=Die(i,s),c=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const yd=e=>e.join("/").replace(/\/\/+/g,"/"),Bie=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$ie=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qie=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Uie(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dz=["post","put","patch","delete"];new Set(dz);const zie=["get",...dz];new Set(zie);/**
* React Router v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qv.apply(this,arguments)}const EE=E.createContext(null),Vie=E.createContext(null),_p=E.createContext(null),N2=E.createContext(null),Md=E.createContext({outlet:null,matches:[],isDataRoute:!1}),hz=E.createContext(null);function Wie(e,t){let{relative:n}=t===void 0?{}:t;i1()||Ti(!1);let{basename:r,navigator:i}=E.useContext(_p),{hash:a,pathname:o,search:s}=gz(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:yd([r,o])),i.createHref({pathname:l,search:s,hash:a})}function i1(){return E.useContext(N2)!=null}function Np(){return i1()||Ti(!1),E.useContext(N2).location}function pz(e){E.useContext(_p).static||E.useLayoutEffect(e)}function OE(){let{isDataRoute:e}=E.useContext(Md);return e?aae():Hie()}function Hie(){i1()||Ti(!1);let e=E.useContext(EE),{basename:t,future:n,navigator:r}=E.useContext(_p),{matches:i}=E.useContext(Md),{pathname:a}=Np(),o=JSON.stringify(uz(i,n.v7_relativeSplatPath)),s=E.useRef(!1);return pz(()=>{s.current=!0}),E.useCallback(function(c,f){if(f===void 0&&(f={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let h=fz(c,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:yd([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,o,a,e])}const mz=E.createContext(null);function kp(){return E.useContext(mz)}function Yie(e){let t=E.useContext(Md).outlet;return t&&E.createElement(mz.Provider,{value:e},t)}function gz(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(_p),{matches:i}=E.useContext(Md),{pathname:a}=Np(),o=JSON.stringify(uz(i,r.v7_relativeSplatPath));return E.useMemo(()=>fz(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function Gie(e,t){return Kie(e,t)}function Kie(e,t,n,r){i1()||Ti(!1);let{navigator:i}=E.useContext(_p),{matches:a}=E.useContext(Md),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Np(),f;if(t){var h;let x=typeof t=="string"?Hg(t):t;l==="/"||(h=x.pathname)!=null&&h.startsWith(l)||Ti(!1),f=x}else f=c;let g=f.pathname||"/",m=g;if(l!=="/"){let x=l.replace(/^\//,"").split("/");m="/"+g.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=bie(e,{pathname:m}),y=eae(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},s,x.params),pathname:yd([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:yd([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),a,n,r);return t&&y?E.createElement(N2.Provider,{value:{location:Qv({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:ud.Pop}},y):y}function Xie(){let e=iae(),t=Uie(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:i},n):null,null)}const Qie=E.createElement(Xie,null);class Jie extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement(Md.Provider,{value:this.props.routeContext},E.createElement(hz.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zie(e){let{routeContext:t,match:n,children:r}=e,i=E.useContext(EE);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(Md.Provider,{value:t},r)}function eae(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);f>=0||Ti(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let h=o[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=f),h.route.id){let{loaderData:g,errors:m}=n,b=h.route.loader&&g[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||b){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((f,h,g)=>{let m,b=!1,y=null,x=null;n&&(m=s&&h.route.id?s[h.route.id]:void 0,y=h.route.errorElement||Qie,l&&(c<0&&g===0?(oae("route-fallback"),b=!0,x=null):c===g&&(b=!0,x=h.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,g+1)),_=()=>{let k;return m?k=y:b?k=x:h.route.Component?k=E.createElement(h.route.Component,null):h.route.element?k=h.route.element:k=f,E.createElement(Zie,{match:h,routeContext:{outlet:f,matches:w,isDataRoute:n!=null},children:k})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?E.createElement(Jie,{location:n.location,revalidation:n.revalidation,component:y,error:m,children:_(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):_()},null)}var yz=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(yz||{}),vz=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(vz||{});function tae(e){let t=E.useContext(EE);return t||Ti(!1),t}function nae(e){let t=E.useContext(Vie);return t||Ti(!1),t}function rae(e){let t=E.useContext(Md);return t||Ti(!1),t}function xz(e){let t=rae(),n=t.matches[t.matches.length-1];return n.route.id||Ti(!1),n.route.id}function iae(){var e;let t=E.useContext(hz),n=nae(),r=xz();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function aae(){let{router:e}=tae(yz.UseNavigateStable),t=xz(vz.UseNavigateStable),n=E.useRef(!1);return pz(()=>{n.current=!0}),E.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Qv({fromRouteId:t},a)))},[e,t])}const k6={};function oae(e,t,n){k6[e]||(k6[e]=!0)}function sae(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function lae(e){return Yie(e.context)}function La(e){Ti(!1)}function cae(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ud.Pop,navigator:a,static:o=!1,future:s}=e;i1()&&Ti(!1);let l=t.replace(/^\/*/,"/"),c=E.useMemo(()=>({basename:l,navigator:a,static:o,future:Qv({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof r=="string"&&(r=Hg(r));let{pathname:f="/",search:h="",hash:g="",state:m=null,key:b="default"}=r,y=E.useMemo(()=>{let x=CE(f,l);return x==null?null:{location:{pathname:x,search:h,hash:g,state:m,key:b},navigationType:i}},[l,f,h,g,m,b,i]);return y==null?null:E.createElement(_p.Provider,{value:c},E.createElement(N2.Provider,{children:n,value:y}))}function uae(e){let{children:t,location:n}=e;return Gie(Lj(t),n)}new Promise(()=>{});function Lj(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,i)=>{if(!E.isValidElement(r))return;let a=[...t,i];if(r.type===E.Fragment){n.push.apply(n,Lj(r.props.children,a));return}r.type!==La&&Ti(!1),!r.props.index||!r.props.children||Ti(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Lj(r.props.children,a)),n.push(o)}),n}/**
* React Router DOM v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Rj(){return Rj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rj.apply(this,arguments)}function fae(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function dae(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hae(e,t){return e.button===0&&(!t||t==="_self")&&!dae(e)}function Ij(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function pae(e,t){let n=Ij(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const mae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gae="6";try{window.__reactRouterVersion=gae}catch{}const yae="startTransition",A6=y2[yae];function vae(e){let{basename:t,children:n,future:r,window:i}=e,a=E.useRef();a.current==null&&(a.current=yie({window:i,v5Compat:!0}));let o=a.current,[s,l]=E.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},f=E.useCallback(h=>{c&&A6?A6(()=>l(h)):l(h)},[l,c]);return E.useLayoutEffect(()=>o.listen(f),[o,f]),E.useEffect(()=>sae(r),[r]),E.createElement(cae,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const xae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,va=E.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:c,preventScrollReset:f,viewTransition:h}=t,g=fae(t,mae),{basename:m}=E.useContext(_p),b,y=!1;if(typeof c=="string"&&bae.test(c)&&(b=c,xae))try{let k=new URL(window.location.href),P=c.startsWith("//")?new URL(k.protocol+c):new URL(c),C=CE(P.pathname,m);P.origin===k.origin&&C!=null?c=C+P.search+P.hash:y=!0}catch{}let x=Wie(c,{relative:i}),w=wae(c,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:h});function _(k){r&&r(k),k.defaultPrevented||w(k)}return E.createElement("a",Rj({},g,{href:b||x,onClick:y||a?r:_,ref:n,target:l}))});var P6;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(P6||(P6={}));var j6;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(j6||(j6={}));function wae(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=OE(),c=Np(),f=gz(e,{relative:o});return E.useCallback(h=>{if(hae(h,n)){h.preventDefault();let g=r!==void 0?r:Vb(c)===Vb(f);l(e,{replace:g,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[c,l,f,r,i,n,e,a,o,s])}function bz(e){let t=E.useRef(Ij(e)),n=E.useRef(!1),r=Np(),i=E.useMemo(()=>pae(r.search,n.current?null:t.current),[r.search]),a=OE(),o=E.useCallback((s,l)=>{const c=Ij(typeof s=="function"?s(i):s);n.current=!0,a("?"+c,l)},[a,i]);return[i,o]}function wz(e,t){return function(){return e.apply(t,arguments)}}const{toString:Sae}=Object.prototype,{getPrototypeOf:TE}=Object,{iterator:k2,toStringTag:Sz}=Symbol,A2=(e=>t=>{const n=Sae.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ll=e=>(e=e.toLowerCase(),t=>A2(t)===e),P2=e=>t=>typeof t===e,{isArray:Yg}=Array,gg=P2("undefined");function a1(e){return e!==null&&!gg(e)&&e.constructor!==null&&!gg(e.constructor)&&To(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _z=Ll("ArrayBuffer");function _ae(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_z(e.buffer),t}const Nae=P2("string"),To=P2("function"),Nz=P2("number"),o1=e=>e!==null&&typeof e=="object",kae=e=>e===!0||e===!1,db=e=>{if(A2(e)!=="object")return!1;const t=TE(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Sz in e)&&!(k2 in e)},Aae=e=>{if(!o1(e)||a1(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Pae=Ll("Date"),jae=Ll("File"),Cae=Ll("Blob"),Eae=Ll("FileList"),Oae=e=>o1(e)&&To(e.pipe),Tae=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||To(e.append)&&((t=A2(e))==="formdata"||t==="object"&&To(e.toString)&&e.toString()==="[object FormData]"))},Mae=Ll("URLSearchParams"),[Lae,Rae,Iae,Dae]=["ReadableStream","Request","Response","Headers"].map(Ll),Fae=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function s1(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Yg(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(a1(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function kz(e,t){if(a1(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Mh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Az=e=>!gg(e)&&e!==Mh;function Dj(){const{caseless:e,skipUndefined:t}=Az(this)&&this||{},n={},r=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const o=e&&kz(n,a)||a;db(n[o])&&db(i)?n[o]=Dj(n[o],i):db(i)?n[o]=Dj({},i):Yg(i)?n[o]=i.slice():(!t||!gg(i))&&(n[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&s1(arguments[i],r);return n}const Bae=(e,t,n,{allOwnKeys:r}={})=>(s1(t,(i,a)=>{n&&To(i)?Object.defineProperty(e,a,{value:wz(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),$ae=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qae=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Uae=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&TE(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zae=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Vae=e=>{if(!e)return null;if(Yg(e))return e;let t=e.length;if(!Nz(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Wae=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&TE(Uint8Array)),Hae=(e,t)=>{const r=(e&&e[k2]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Yae=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gae=Ll("HTMLFormElement"),Kae=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),C6=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Xae=Ll("RegExp"),Pz=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};s1(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},Qae=e=>{Pz(e,(t,n)=>{if(To(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(To(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Jae=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Yg(e)?r(e):r(String(e).split(t)),n},Zae=()=>{},eoe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function toe(e){return!!(e&&To(e.append)&&e[Sz]==="FormData"&&e[k2])}const noe=e=>{const t=new Array(10),n=(r,i)=>{if(o1(r)){if(t.indexOf(r)>=0)return;if(a1(r))return r;if(!("toJSON"in r)){t[i]=r;const a=Yg(r)?[]:{};return s1(r,(o,s)=>{const l=n(o,i+1);!gg(l)&&(a[s]=l)}),t[i]=void 0,a}}return r};return n(e,0)},roe=Ll("AsyncFunction"),ioe=e=>e&&(o1(e)||To(e))&&To(e.then)&&To(e.catch),jz=((e,t)=>e?setImmediate:t?((n,r)=>(Mh.addEventListener("message",({source:i,data:a})=>{i===Mh&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Mh.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",To(Mh.postMessage)),aoe=typeof queueMicrotask<"u"?queueMicrotask.bind(Mh):typeof process<"u"&&process.nextTick||jz,ooe=e=>e!=null&&To(e[k2]),Re={isArray:Yg,isArrayBuffer:_z,isBuffer:a1,isFormData:Tae,isArrayBufferView:_ae,isString:Nae,isNumber:Nz,isBoolean:kae,isObject:o1,isPlainObject:db,isEmptyObject:Aae,isReadableStream:Lae,isRequest:Rae,isResponse:Iae,isHeaders:Dae,isUndefined:gg,isDate:Pae,isFile:jae,isBlob:Cae,isRegExp:Xae,isFunction:To,isStream:Oae,isURLSearchParams:Mae,isTypedArray:Wae,isFileList:Eae,forEach:s1,merge:Dj,extend:Bae,trim:Fae,stripBOM:$ae,inherits:qae,toFlatObject:Uae,kindOf:A2,kindOfTest:Ll,endsWith:zae,toArray:Vae,forEachEntry:Hae,matchAll:Yae,isHTMLForm:Gae,hasOwnProperty:C6,hasOwnProp:C6,reduceDescriptors:Pz,freezeMethods:Qae,toObjectSet:Jae,toCamelCase:Kae,noop:Zae,toFiniteNumber:eoe,findKey:kz,global:Mh,isContextDefined:Az,isSpecCompliantForm:toe,toJSONObject:noe,isAsyncFn:roe,isThenable:ioe,setImmediate:jz,asap:aoe,isIterable:ooe};let Xt=class Cz extends Error{static from(t,n,r,i,a,o){const s=new Cz(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,o&&Object.assign(s,o),s}constructor(t,n,r,i,a){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),a&&(this.response=a,this.status=a.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:Re.toJSONObject(this.config),code:this.code,status:this.status}}};Xt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Xt.ERR_BAD_OPTION="ERR_BAD_OPTION";Xt.ECONNABORTED="ECONNABORTED";Xt.ETIMEDOUT="ETIMEDOUT";Xt.ERR_NETWORK="ERR_NETWORK";Xt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Xt.ERR_DEPRECATED="ERR_DEPRECATED";Xt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Xt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Xt.ERR_CANCELED="ERR_CANCELED";Xt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Xt.ERR_INVALID_URL="ERR_INVALID_URL";const soe=null;function Fj(e){return Re.isPlainObject(e)||Re.isArray(e)}function Ez(e){return Re.endsWith(e,"[]")?e.slice(0,-2):e}function E6(e,t,n){return e?e.concat(t).map(function(i,a){return i=Ez(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function loe(e){return Re.isArray(e)&&!e.some(Fj)}const coe=Re.toFlatObject(Re,{},null,function(t){return/^is[A-Z]/.test(t)});function j2(e,t,n){if(!Re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!Re.isUndefined(x[y])});const r=n.metaTokens,i=n.visitor||f,a=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Re.isSpecCompliantForm(t);if(!Re.isFunction(i))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(Re.isDate(b))return b.toISOString();if(Re.isBoolean(b))return b.toString();if(!l&&Re.isBlob(b))throw new Xt("Blob is not supported. Use a Buffer instead.");return Re.isArrayBuffer(b)||Re.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,y,x){let w=b;if(b&&!x&&typeof b=="object"){if(Re.endsWith(y,"{}"))y=r?y:y.slice(0,-2),b=JSON.stringify(b);else if(Re.isArray(b)&&loe(b)||(Re.isFileList(b)||Re.endsWith(y,"[]"))&&(w=Re.toArray(b)))return y=Ez(y),w.forEach(function(k,P){!(Re.isUndefined(k)||k===null)&&t.append(o===!0?E6([y],P,a):o===null?y:y+"[]",c(k))}),!1}return Fj(b)?!0:(t.append(E6(x,y,a),c(b)),!1)}const h=[],g=Object.assign(coe,{defaultVisitor:f,convertValue:c,isVisitable:Fj});function m(b,y){if(!Re.isUndefined(b)){if(h.indexOf(b)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(b),Re.forEach(b,function(w,_){(!(Re.isUndefined(w)||w===null)&&i.call(t,w,Re.isString(_)?_.trim():_,y,g))===!0&&m(w,y?y.concat(_):[_])}),h.pop()}}if(!Re.isObject(e))throw new TypeError("data must be an object");return m(e),t}function O6(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ME(e,t){this._pairs=[],e&&j2(e,this,t)}const Oz=ME.prototype;Oz.append=function(t,n){this._pairs.push([t,n])};Oz.toString=function(t){const n=t?function(r){return t.call(this,r,O6)}:O6;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function uoe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tz(e,t,n){if(!t)return e;const r=n&&n.encode||uoe,i=Re.isFunction(n)?{serialize:n}:n,a=i&&i.serialize;let o;if(a?o=a(t,i):o=Re.isURLSearchParams(t)?t.toString():new ME(t,i).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class T6{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Re.forEach(this.handlers,function(r){r!==null&&t(r)})}}const LE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},foe=typeof URLSearchParams<"u"?URLSearchParams:ME,doe=typeof FormData<"u"?FormData:null,hoe=typeof Blob<"u"?Blob:null,poe={isBrowser:!0,classes:{URLSearchParams:foe,FormData:doe,Blob:hoe},protocols:["http","https","file","blob","url","data"]},RE=typeof window<"u"&&typeof document<"u",Bj=typeof navigator=="object"&&navigator||void 0,moe=RE&&(!Bj||["ReactNative","NativeScript","NS"].indexOf(Bj.product)<0),goe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yoe=RE&&window.location.href||"http://localhost",voe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:RE,hasStandardBrowserEnv:moe,hasStandardBrowserWebWorkerEnv:goe,navigator:Bj,origin:yoe},Symbol.toStringTag,{value:"Module"})),$a={...voe,...poe};function xoe(e,t){return j2(e,new $a.classes.URLSearchParams,{visitor:function(n,r,i,a){return $a.isNode&&Re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function boe(e){return Re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function woe(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Mz(e){function t(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=a>=n.length;return o=!o&&Re.isArray(i)?i.length:o,l?(Re.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!Re.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&Re.isArray(i[o])&&(i[o]=woe(i[o])),!s)}if(Re.isFormData(e)&&Re.isFunction(e.entries)){const n={};return Re.forEachEntry(e,(r,i)=>{t(boe(r),i,n,0)}),n}return null}function Soe(e,t,n){if(Re.isString(e))try{return(t||JSON.parse)(e),Re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const l1={transitional:LE,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=Re.isObject(t);if(a&&Re.isHTMLForm(t)&&(t=new FormData(t)),Re.isFormData(t))return i?JSON.stringify(Mz(t)):t;if(Re.isArrayBuffer(t)||Re.isBuffer(t)||Re.isStream(t)||Re.isFile(t)||Re.isBlob(t)||Re.isReadableStream(t))return t;if(Re.isArrayBufferView(t))return t.buffer;if(Re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return xoe(t,this.formSerializer).toString();if((s=Re.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return j2(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),Soe(t)):t}],transformResponse:[function(t){const n=this.transitional||l1.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Re.isResponse(t)||Re.isReadableStream(t))return t;if(t&&Re.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?Xt.from(s,Xt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$a.classes.FormData,Blob:$a.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Re.forEach(["delete","get","head","post","put","patch"],e=>{l1.headers[e]={}});const _oe=Re.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"]),Noe=e=>{const t={};let n,r,i;return e&&e.split(`
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&_oe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},M6=Symbol("internals");function Hy(e){return e&&String(e).trim().toLowerCase()}function hb(e){return e===!1||e==null?e:Re.isArray(e)?e.map(hb):String(e)}function koe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Aoe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zS(e,t,n,r,i){if(Re.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Re.isString(t)){if(Re.isString(r))return t.indexOf(r)!==-1;if(Re.isRegExp(r))return r.test(t)}}function Poe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function joe(e,t){const n=Re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}let Mo=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,l,c){const f=Hy(l);if(!f)throw new Error("header name must be a non-empty string");const h=Re.findKey(i,f);(!h||i[h]===void 0||c===!0||c===void 0&&i[h]!==!1)&&(i[h||l]=hb(s))}const o=(s,l)=>Re.forEach(s,(c,f)=>a(c,f,l));if(Re.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Re.isString(t)&&(t=t.trim())&&!Aoe(t))o(Noe(t),n);else if(Re.isObject(t)&&Re.isIterable(t)){let s={},l,c;for(const f of t){if(!Re.isArray(f))throw TypeError("Object iterator must return a key-value pair");s[c=f[0]]=(l=s[c])?Re.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}o(s,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Hy(t),t){const r=Re.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return koe(i);if(Re.isFunction(n))return n.call(this,i,r);if(Re.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Hy(t),t){const r=Re.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||zS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Hy(o),o){const s=Re.findKey(r,o);s&&(!n||zS(r,r[s],s,n))&&(delete r[s],i=!0)}}return Re.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||zS(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return Re.forEach(this,(i,a)=>{const o=Re.findKey(r,a);if(o){n[o]=hb(i),delete n[a];return}const s=t?Poe(a):String(a).trim();s!==a&&delete n[a],n[s]=hb(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Re.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Re.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}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,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[M6]=this[M6]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Hy(o);r[s]||(joe(i,o),r[s]=!0)}return Re.isArray(t)?t.forEach(a):a(t),this}};Mo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Re.reduceDescriptors(Mo.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Re.freezeMethods(Mo);function VS(e,t){const n=this||l1,r=t||n,i=Mo.from(r.headers);let a=r.data;return Re.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Lz(e){return!!(e&&e.__CANCEL__)}let c1=class extends Xt{constructor(t,n,r){super(t??"canceled",Xt.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Rz(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Xt("Request failed with status code "+n.status,[Xt.ERR_BAD_REQUEST,Xt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Coe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Eoe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),f=r[a];o||(o=c),n[i]=l,r[i]=c;let h=a,g=0;for(;h!==i;)g+=n[h++],h=h%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const m=f&&c-f;return m?Math.round(g*1e3/m):void 0}}function Ooe(e,t){let n=0,r=1e3/t,i,a;const o=(c,f=Date.now())=>{n=f,i=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const f=Date.now(),h=f-n;h>=r?o(c,f):(i=c,a||(a=setTimeout(()=>{a=null,o(i)},r-h)))},()=>i&&o(i)]}const Wb=(e,t,n=3)=>{let r=0;const i=Eoe(50,250);return Ooe(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-r,c=i(l),f=o<=s;r=o;const h={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&f?(s-o)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(h)},n)},L6=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},R6=e=>(...t)=>Re.asap(()=>e(...t)),Toe=$a.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,$a.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL($a.origin),$a.navigator&&/(msie|trident)/i.test($a.navigator.userAgent)):()=>!0,Moe=$a.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];Re.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Re.isString(r)&&s.push(`path=${r}`),Re.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push("secure"),Re.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.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 Loe(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Roe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Iz(e,t,n){let r=!Loe(t);return e&&(r||n==!1)?Roe(e,t):t}const I6=e=>e instanceof Mo?{...e}:e;function sp(e,t){t=t||{};const n={};function r(c,f,h,g){return Re.isPlainObject(c)&&Re.isPlainObject(f)?Re.merge.call({caseless:g},c,f):Re.isPlainObject(f)?Re.merge({},f):Re.isArray(f)?f.slice():f}function i(c,f,h,g){if(Re.isUndefined(f)){if(!Re.isUndefined(c))return r(void 0,c,h,g)}else return r(c,f,h,g)}function a(c,f){if(!Re.isUndefined(f))return r(void 0,f)}function o(c,f){if(Re.isUndefined(f)){if(!Re.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function s(c,f,h){if(h in t)return r(c,f);if(h in e)return r(void 0,c)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(c,f,h)=>i(I6(c),I6(f),h,!0)};return Re.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const h=Re.hasOwnProp(l,f)?l[f]:i,g=h(e[f],t[f],f);Re.isUndefined(g)&&h!==s||(n[f]=g)}),n}const Dz=e=>{const t=sp({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=Mo.from(o),t.url=Tz(Iz(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Re.isFormData(n)){if($a.hasStandardBrowserEnv||$a.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Re.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([f,h])=>{c.includes(f.toLowerCase())&&o.set(f,h)})}}if($a.hasStandardBrowserEnv&&(r&&Re.isFunction(r)&&(r=r(t)),r||r!==!1&&Toe(t.url))){const l=i&&a&&Moe.read(a);l&&o.set(i,l)}return t},Ioe=typeof XMLHttpRequest<"u",Doe=Ioe&&function(e){return new Promise(function(n,r){const i=Dz(e);let a=i.data;const o=Mo.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=i,f,h,g,m,b;function y(){m&&m(),b&&b(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function w(){if(!x)return;const k=Mo.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:k,config:e,request:x};Rz(function(L){n(L),y()},function(L){r(L),y()},C),x=null}"onloadend"in x?x.onloadend=w:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(w)},x.onabort=function(){x&&(r(new Xt("Request aborted",Xt.ECONNABORTED,e,x)),x=null)},x.onerror=function(P){const C=P&&P.message?P.message:"Network Error",j=new Xt(C,Xt.ERR_NETWORK,e,x);j.event=P||null,r(j),x=null},x.ontimeout=function(){let P=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||LE;i.timeoutErrorMessage&&(P=i.timeoutErrorMessage),r(new Xt(P,C.clarifyTimeoutError?Xt.ETIMEDOUT:Xt.ECONNABORTED,e,x)),x=null},a===void 0&&o.setContentType(null),"setRequestHeader"in x&&Re.forEach(o.toJSON(),function(P,C){x.setRequestHeader(C,P)}),Re.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),s&&s!=="json"&&(x.responseType=i.responseType),c&&([g,b]=Wb(c,!0),x.addEventListener("progress",g)),l&&x.upload&&([h,m]=Wb(l),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(f=k=>{x&&(r(!k||k.type?new c1(null,e,x):k),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const _=Coe(i.url);if(_&&$a.protocols.indexOf(_)===-1){r(new Xt("Unsupported protocol "+_+":",Xt.ERR_BAD_REQUEST,e));return}x.send(a||null)})},Foe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(c){if(!i){i=!0,s();const f=c instanceof Error?c:this.reason;r.abort(f instanceof Xt?f:new c1(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,a(new Xt(`timeout of ${t}ms exceeded`,Xt.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:l}=r;return l.unsubscribe=()=>Re.asap(s),l}},Boe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},$oe=async function*(e,t){for await(const n of qoe(e))yield*Boe(n,t)},qoe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},D6=(e,t,n,r)=>{const i=$oe(e,t);let a=0,o,s=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:f}=await i.next();if(c){s(),l.close();return}let h=f.byteLength;if(n){let g=a+=h;n(g)}l.enqueue(new Uint8Array(f))}catch(c){throw s(c),c}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},F6=64*1024,{isFunction:vx}=Re,Uoe=(({Request:e,Response:t})=>({Request:e,Response:t}))(Re.global),{ReadableStream:B6,TextEncoder:$6}=Re.global,q6=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zoe=e=>{e=Re.merge.call({skipUndefined:!0},Uoe,e);const{fetch:t,Request:n,Response:r}=e,i=t?vx(t):typeof fetch=="function",a=vx(n),o=vx(r);if(!i)return!1;const s=i&&vx(B6),l=i&&(typeof $6=="function"?(b=>y=>b.encode(y))(new $6):async b=>new Uint8Array(await new n(b).arrayBuffer())),c=a&&s&&q6(()=>{let b=!1;const y=new n($a.origin,{body:new B6,method:"POST",get duplex(){return b=!0,"half"}}).headers.has("Content-Type");return b&&!y}),f=o&&s&&q6(()=>Re.isReadableStream(new r("").body)),h={stream:f&&(b=>b.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!h[b]&&(h[b]=(y,x)=>{let w=y&&y[b];if(w)return w.call(y);throw new Xt(`Response type '${b}' is not supported`,Xt.ERR_NOT_SUPPORT,x)})});const g=async b=>{if(b==null)return 0;if(Re.isBlob(b))return b.size;if(Re.isSpecCompliantForm(b))return(await new n($a.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(Re.isArrayBufferView(b)||Re.isArrayBuffer(b))return b.byteLength;if(Re.isURLSearchParams(b)&&(b=b+""),Re.isString(b))return(await l(b)).byteLength},m=async(b,y)=>{const x=Re.toFiniteNumber(b.getContentLength());return x??g(y)};return async b=>{let{url:y,method:x,data:w,signal:_,cancelToken:k,timeout:P,onDownloadProgress:C,onUploadProgress:j,responseType:L,headers:R,withCredentials:D="same-origin",fetchOptions:H}=Dz(b),M=t||fetch;L=L?(L+"").toLowerCase():"text";let F=Foe([_,k&&k.toAbortSignal()],P),W=null;const V=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let X;try{if(j&&c&&x!=="get"&&x!=="head"&&(X=await m(R,w))!==0){let te=new n(y,{method:"POST",body:w,duplex:"half"}),$;if(Re.isFormData(w)&&($=te.headers.get("content-type"))&&R.setContentType($),te.body){const[q,re]=L6(X,Wb(R6(j)));w=D6(te.body,F6,q,re)}}Re.isString(D)||(D=D?"include":"omit");const Y=a&&"credentials"in n.prototype,Z={...H,signal:F,method:x.toUpperCase(),headers:R.normalize().toJSON(),body:w,duplex:"half",credentials:Y?D:void 0};W=a&&new n(y,Z);let K=await(a?M(W,H):M(y,Z));const se=f&&(L==="stream"||L==="response");if(f&&(C||se&&V)){const te={};["status","statusText","headers"].forEach(le=>{te[le]=K[le]});const $=Re.toFiniteNumber(K.headers.get("content-length")),[q,re]=C&&L6($,Wb(R6(C),!0))||[];K=new r(D6(K.body,F6,q,()=>{re&&re(),V&&V()}),te)}L=L||"text";let z=await h[Re.findKey(h,L)||"text"](K,b);return!se&&V&&V(),await new Promise((te,$)=>{Rz(te,$,{data:z,headers:Mo.from(K.headers),status:K.status,statusText:K.statusText,config:b,request:W})})}catch(Y){throw V&&V(),Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)?Object.assign(new Xt("Network Error",Xt.ERR_NETWORK,b,W,Y&&Y.response),{cause:Y.cause||Y}):Xt.from(Y,Y&&Y.code,b,W,Y&&Y.response)}}},Voe=new Map,Fz=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let o=a.length,s=o,l,c,f=Voe;for(;s--;)l=a[s],c=f.get(l),c===void 0&&f.set(l,c=s?new Map:zoe(t)),f=c;return c};Fz();const IE={http:soe,xhr:Doe,fetch:{get:Fz}};Re.forEach(IE,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const U6=e=>`- ${e}`,Woe=e=>Re.isFunction(e)||e===null||e===!1;function Hoe(e,t){e=Re.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let o=0;o<n;o++){r=e[o];let s;if(i=r,!Woe(r)&&(i=IE[(s=String(r)).toLowerCase()],i===void 0))throw new Xt(`Unknown adapter '${s}'`);if(i&&(Re.isFunction(i)||(i=i.get(t))))break;a[s||"#"+o]=i}if(!i){const o=Object.entries(a).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=n?o.length>1?`since :
`+o.map(U6).join(`
`):" "+U6(o[0]):"as no adapter specified";throw new Xt("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}const Bz={getAdapter:Hoe,adapters:IE};function WS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new c1(null,e)}function z6(e){return WS(e),e.headers=Mo.from(e.headers),e.data=VS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bz.getAdapter(e.adapter||l1.adapter,e)(e).then(function(r){return WS(e),r.data=VS.call(e,e.transformResponse,r),r.headers=Mo.from(r.headers),r},function(r){return Lz(r)||(WS(e),r&&r.response&&(r.response.data=VS.call(e,e.transformResponse,r.response),r.response.headers=Mo.from(r.response.headers))),Promise.reject(r)})}const $z="1.13.5",C2={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{C2[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const V6={};C2.transitional=function(t,n,r){function i(a,o){return"[Axios v"+$z+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new Xt(i(o," has been removed"+(n?" in "+n:"")),Xt.ERR_DEPRECATED);return n&&!V6[o]&&(V6[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};C2.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Yoe(e,t,n){if(typeof e!="object")throw new Xt("options must be an object",Xt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new Xt("option "+a+" must be "+l,Xt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Xt("Unknown option "+a,Xt.ERR_BAD_OPTION)}}const pb={assertOptions:Yoe,validators:C2},Ts=pb.validators;let Xh=class{constructor(t){this.defaults=t||{},this.interceptors={request:new T6,response:new T6}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=sp(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&pb.assertOptions(r,{silentJSONParsing:Ts.transitional(Ts.boolean),forcedJSONParsing:Ts.transitional(Ts.boolean),clarifyTimeoutError:Ts.transitional(Ts.boolean),legacyInterceptorReqResOrdering:Ts.transitional(Ts.boolean)},!1),i!=null&&(Re.isFunction(i)?n.paramsSerializer={serialize:i}:pb.assertOptions(i,{encode:Ts.function,serialize:Ts.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),pb.assertOptions(n,{baseUrl:Ts.spelling("baseURL"),withXsrfToken:Ts.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&Re.merge(a.common,a[n.method]);a&&Re.forEach(["delete","get","head","post","put","patch","common"],b=>{delete a[b]}),n.headers=Mo.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;l=l&&y.synchronous;const x=n.transitional||LE;x&&x.legacyInterceptorReqResOrdering?s.unshift(y.fulfilled,y.rejected):s.push(y.fulfilled,y.rejected)});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let f,h=0,g;if(!l){const b=[z6.bind(this),void 0];for(b.unshift(...s),b.push(...c),g=b.length,f=Promise.resolve(n);h<g;)f=f.then(b[h++],b[h++]);return f}g=s.length;let m=n;for(;h<g;){const b=s[h++],y=s[h++];try{m=b(m)}catch(x){y.call(this,x);break}}try{f=z6.call(this,m)}catch(b){return Promise.reject(b)}for(h=0,g=c.length;h<g;)f=f.then(c[h++],c[h++]);return f}getUri(t){t=sp(this.defaults,t);const n=Iz(t.baseURL,t.url,t.allowAbsoluteUrls);return Tz(n,t.params,t.paramsSerializer)}};Re.forEach(["delete","get","head","options"],function(t){Xh.prototype[t]=function(n,r){return this.request(sp(r||{},{method:t,url:n,data:(r||{}).data}))}});Re.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(sp(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Xh.prototype[t]=n(),Xh.prototype[t+"Form"]=n(!0)});let Goe=class qz{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new c1(a,o,s),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new qz(function(i){t=i}),cancel:t}}};function Koe(e){return function(n){return e.apply(null,n)}}function Xoe(e){return Re.isObject(e)&&e.isAxiosError===!0}const $j={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent: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($j).forEach(([e,t])=>{$j[t]=e});function Uz(e){const t=new Xh(e),n=wz(Xh.prototype.request,t);return Re.extend(n,Xh.prototype,t,{allOwnKeys:!0}),Re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Uz(sp(e,i))},n}const Si=Uz(l1);Si.Axios=Xh;Si.CanceledError=c1;Si.CancelToken=Goe;Si.isCancel=Lz;Si.VERSION=$z;Si.toFormData=j2;Si.AxiosError=Xt;Si.Cancel=Si.CanceledError;Si.all=function(t){return Promise.all(t)};Si.spread=Koe;Si.isAxiosError=Xoe;Si.mergeConfig=sp;Si.AxiosHeaders=Mo;Si.formToJSON=e=>Mz(Re.isHTMLForm(e)?new FormData(e):e);Si.getAdapter=Bz.getAdapter;Si.HttpStatusCode=$j;Si.default=Si;const{Axios:l$e,AxiosError:c$e,CanceledError:u$e,isCancel:f$e,CancelToken:d$e,VERSION:h$e,all:p$e,Cancel:m$e,isAxiosError:g$e,spread:y$e,toFormData:v$e,AxiosHeaders:x$e,HttpStatusCode:b$e,formToJSON:w$e,getAdapter:S$e,mergeConfig:_$e}=Si,Qoe=typeof window>"u",W6=!Qoe&&window.self!==window.top,HS=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),pa=[];for(let e=0;e<256;++e)pa.push((e+256).toString(16).slice(1));function Joe(e,t=0){return(pa[e[t+0]]+pa[e[t+1]]+pa[e[t+2]]+pa[e[t+3]]+"-"+pa[e[t+4]]+pa[e[t+5]]+"-"+pa[e[t+6]]+pa[e[t+7]]+"-"+pa[e[t+8]]+pa[e[t+9]]+"-"+pa[e[t+10]]+pa[e[t+11]]+pa[e[t+12]]+pa[e[t+13]]+pa[e[t+14]]+pa[e[t+15]]).toLowerCase()}let YS;const Zoe=new Uint8Array(16);function ese(){if(!YS){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");YS=crypto.getRandomValues.bind(crypto)}return YS(Zoe)}const tse=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),H6={randomUUID:tse};function nse(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??ese();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Joe(r)}function rse(e,t,n){return H6.randomUUID&&!e?H6.randomUUID():nse(e)}class ise extends Error{constructor(t,n,r,i,a){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function xv({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const a=Si.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(o=>{typeof window<"u"&&o.headers.set("X-Origin-URL",window.location.href);const s=rse();if(o.requestId=s,W6)try{window.parent.postMessage({type:"api-request-start",requestId:s,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),r&&a.interceptors.response.use(o=>{var s;const l=(s=o.config)===null||s===void 0?void 0:s.requestId;try{W6&&l&&window.parent.postMessage({type:"api-request-end",requestId:l,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var s,l,c,f,h,g,m,b;const y=((l=(s=o.response)===null||s===void 0?void 0:s.data)===null||l===void 0?void 0:l.message)||((f=(c=o.response)===null||c===void 0?void 0:c.data)===null||f===void 0?void 0:f.detail)||o.message,x=new ise(y,(h=o.response)===null||h===void 0?void 0:h.status,(m=(g=o.response)===null||g===void 0?void 0:g.data)===null||m===void 0?void 0:m.code,(b=o.response)===null||b===void 0?void 0:b.data,o);return i==null||i(x),Promise.reject(x)}),a}function Y6(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return ose(t,n,a,r)}})}function ase(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function ose(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(a,o,s,l){const c={};return a&&(c.sort=a),o&&(c.limit=o),s&&(c.skip=s),l&&(c.fields=Array.isArray(l)?l.join(","):l),e.get(i,{params:c})},async filter(a,o,s,l,c){const f={q:JSON.stringify(a)};return o&&(f.sort=o),s&&(f.limit=s),l&&(f.skip=l),c&&(f.fields=Array.isArray(c)?c.join(","):c),e.get(i,{params:f})},async get(a){return e.get(`${i}/${a}`)},async create(a){return e.post(i,a)},async update(a,o){return e.put(`${i}/${a}`,o)},async delete(a){return e.delete(`${i}/${a}`)},async deleteMany(a){return e.delete(i,{data:a})},async bulkCreate(a){return e.post(`${i}/bulk`,a)},async updateMany(a,o){return e.patch(`${i}/update-many`,{query:a,data:o})},async bulkUpdate(a){return e.put(`${i}/bulk`,a)},async importEntities(a){const o=new FormData;return o.append("file",a,a.name),e.post(`${i}/import`,o,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(a){const o=`entities:${t}:${n}`;return r().subscribeToRoom(o,{update_model:c=>{const f=ase(c.data);if(f)try{a(f)}catch(h){console.error("[Base44 SDK] Subscription callback error:",h)}}})}}}function sse(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:a,queryParams:o,...s}=i??{},l={...s,...a&&{path_params:a},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,l)}}}function G6(e,t){const n=sse(e,t);return new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(a,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async s=>{if(typeof s=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${s}`);let l,c;return s instanceof FormData||s&&Object.values(s).some(f=>f instanceof File)?(l=new FormData,Object.keys(s).forEach(f=>{s[f]instanceof File?l.append(f,s[f],s[f].name):typeof s[f]=="object"&&s[f]!==null?l.append(f,JSON.stringify(s[f])):l.append(f,s[f])}),c="multipart/form-data"):(l=s,c="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,l||s,{headers:{"Content-Type":c}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${o}`,l||s,{headers:{"Content-Type":c}})}}})}})}function lse(){return typeof window>"u"?!1:window!==window.parent}function cse(e,t,n){const a=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),s=window.open(e,"base44_auth",`width=500,height=600,left=${a},top=${o},resizable=yes,scrollbars=yes`);if(!s)return;const l=()=>{window.removeEventListener("message",c),clearInterval(f),s.closed||s.close()},c=h=>{var g;if(h.origin!==n||h.source!==s||!(!((g=h.data)===null||g===void 0)&&g.access_token))return;l();const m=new URL(t),{access_token:b,is_new_user:y}=h.data;m.searchParams.set("access_token",b),y!=null&&m.searchParams.set("is_new_user",String(y)),window.location.href=m.toString()},f=setInterval(()=>{s.closed&&l()},500);window.addEventListener("message",c)}function use(e,t,n,r){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(i){return e.put(`/apps/${n}/entities/User/me`,i)},redirectToLogin(i){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const a=i?new URL(i,window.location.origin).toString():window.location.href,o=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(a)}`;window.location.href=o},loginWithProvider(i,a="/"){const o=new URL(a,window.location.origin).toString(),s=`app_id=${n}&from_url=${encodeURIComponent(o)}`;let l;i==="sso"?l=`/apps/${n}/auth/sso/login`:l=`/apps/auth${i==="google"?"":`/${i}`}/login`;const c=`${r.appBaseUrl}/api${l}?${s}`;if(lse()){const f=`${c}&popup_origin=${encodeURIComponent(window.location.origin)}`;return cse(f,o,window.location.origin)}window.location.href=c},logout(i){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(s){console.error("Failed to remove token from localStorage:",s)}const a=i||window.location.href,o=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(a)}`;window.location.href=o}},setToken(i,a=!0){if(i&&(e.defaults.headers.common.Authorization=`Bearer ${i}`,t.defaults.headers.common.Authorization=`Bearer ${i}`,a&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",i),window.localStorage.setItem("token",i)}catch(o){console.error("Failed to save token to localStorage:",o)}},async loginViaEmailPassword(i,a,o){var s;try{const l=await e.post(`/apps/${n}/auth/login`,{email:i,password:a,...o&&{turnstile_token:o}}),{access_token:c,user:f}=l;return c&&this.setToken(c),{access_token:c,user:f}}catch(l){throw((s=l.response)===null||s===void 0?void 0:s.status)===401&&await this.logout(),l}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(i,a){return e.post(`/apps/${n}/users/invite-user`,{user_email:i,role:a})},register(i){return e.post(`/apps/${n}/auth/register`,i)},verifyOtp({email:i,otpCode:a}){return e.post(`/apps/${n}/auth/verify-otp`,{email:i,otp_code:a})},resendOtp(i){return e.post(`/apps/${n}/auth/resend-otp`,{email:i})},resetPasswordRequest(i){return e.post(`/apps/${n}/auth/reset-password-request`,{email:i})},resetPassword({resetToken:i,newPassword:a}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:i,new_password:a})},changePassword({userId:i,currentPassword:a,newPassword:o}){return e.post(`/apps/${n}/auth/change-password`,{user_id:i,current_password:a,new_password:o})}}}function fse(e,t){return{async getAccessToken(n){const r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)}}}function dse(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}}}}function hse(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function Jv(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let a=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(a=o.get(n),a){if(r&&pse(a,{storageKey:t}),i){o.delete(n);const s=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,s)}return a}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function pse(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function K6(e,t,n){const r=(a,o)=>a?`${String(a).replace(/\/$/,"")}${o}`:o,i=a=>{const o=new Headers;if(n!=null&&n.getAuthHeaders){const s=n.getAuthHeaders();Object.entries(s).forEach(([l,c])=>{c!=null&&o.set(l,String(c))})}return a&&new Headers(a).forEach((s,l)=>{o.set(l,s)}),o};return{async invoke(a,o){if(typeof o=="string")throw new Error(`Function ${a} must receive an object with named parameters, received: ${o}`);let s,l;return o instanceof FormData||o&&Object.values(o).some(c=>c instanceof File)?(s=new FormData,Object.keys(o).forEach(c=>{o[c]instanceof File?s.append(c,o[c],o[c].name):typeof o[c]=="object"&&o[c]!==null?s.append(c,JSON.stringify(o[c])):s.append(c,o[c])}),l="multipart/form-data"):(s=o,l="application/json"),e.post(`/apps/${t}/functions/${a}`,s||o,{headers:{"Content-Type":l}})},async fetch(a,o={}){const l=`/functions${a.startsWith("/")?a:`/${a}`}`,c=i(o.headers),f={...o,headers:c};return await fetch(r(n==null?void 0:n.baseURL,l),f)}}}function X6({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const a=`/apps/${n}/agents`,o={},s=()=>e.get(`${a}/conversations`),l=y=>e.get(`${a}/conversations/${y}`);return{getConversations:s,getConversation:l,listConversations:y=>e.get(`${a}/conversations`,{params:y}),createConversation:y=>e.post(`${a}/conversations`,y),addMessage:async(y,x)=>e.post(`${a}/conversations/v2/${y.id}/messages`,x),subscribeToConversation:(y,x)=>{const w=`/agent-conversations/${y}`,_=t(),k=l(y).then(P=>(o[y]=P,P));return _.subscribeToRoom(w,{connect:()=>{},update_model:async({data:P})=>{const C=JSON.parse(P);if(C._message){await k;const j=C._message,L=o[y];if(L){const R=L.messages||[],D=R.findIndex(M=>M.id===j.id),H=D!==-1?R.map((M,F)=>F===D?j:M):[...R,j];o[y]={...L,messages:H},x==null||x(o[y])}}}})},getWhatsAppConnectURL:y=>{const x=`${r}/api/apps/${n}/agents/${encodeURIComponent(y)}/whatsapp`,w=i??Jv();return w?`${x}?token=${w}`:x},getTelegramConnectURL:y=>{const x=`${r}/api/apps/${n}/agents/${encodeURIComponent(y)}/telegram`,w=i??Jv();return w?`${x}?token=${w}`:x}}}function Q6(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function mse(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const Cc=Object.create(null);Cc.open="0";Cc.close="1";Cc.ping="2";Cc.pong="3";Cc.message="4";Cc.upgrade="5";Cc.noop="6";const mb=Object.create(null);Object.keys(Cc).forEach(e=>{mb[Cc[e]]=e});const qj={type:"error",data:"parser error"},zz=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Vz=typeof ArrayBuffer=="function",Wz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,DE=({type:e,data:t},n,r)=>zz&&t instanceof Blob?n?r(t):J6(t,r):Vz&&(t instanceof ArrayBuffer||Wz(t))?n?r(t):J6(new Blob([t]),r):r(Cc[e]+(t||"")),J6=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Z6(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let GS;function gse(e,t){if(zz&&e.data instanceof Blob)return e.data.arrayBuffer().then(Z6).then(t);if(Vz&&(e.data instanceof ArrayBuffer||Wz(e.data)))return t(Z6(e.data));DE(e,!1,n=>{GS||(GS=new TextEncoder),t(GS.encode(n))})}const eL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<eL.length;e++)bv[eL.charCodeAt(e)]=e;const yse=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)a=bv[e.charCodeAt(r)],o=bv[e.charCodeAt(r+1)],s=bv[e.charCodeAt(r+2)],l=bv[e.charCodeAt(r+3)],f[i++]=a<<2|o>>4,f[i++]=(o&15)<<4|s>>2,f[i++]=(s&3)<<6|l&63;return c},vse=typeof ArrayBuffer=="function",FE=(e,t)=>{if(typeof e!="string")return{type:"message",data:Hz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:xse(e.substring(1),t)}:mb[n]?e.length>1?{type:mb[n],data:e.substring(1)}:{type:mb[n]}:qj},xse=(e,t)=>{if(vse){const n=yse(e);return Hz(n,t)}else return{base64:!0,data:e}},Hz=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Yz="",bse=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((a,o)=>{DE(a,!1,s=>{r[o]=s,++i===n&&t(r.join(Yz))})})},wse=(e,t)=>{const n=e.split(Yz),r=[];for(let i=0;i<n.length;i++){const a=FE(n[i],t);if(r.push(a),a.type==="error")break}return r};function Sse(){return new TransformStream({transform(e,t){gse(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let KS;function xx(e){return e.reduce((t,n)=>t+n.length,0)}function bx(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function _se(e,t){KS||(KS=new TextDecoder);const n=[];let r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(xx(n)<1)break;const l=bx(n,1);a=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(xx(n)<2)break;const l=bx(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(xx(n)<8)break;const l=bx(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){s.enqueue(qj);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(xx(n)<i)break;const l=bx(n,i);s.enqueue(FE(a?l:KS.decode(l),t)),r=0}if(i===0||i>e){s.enqueue(qj);break}}}})}const Gz=4;function Ei(e){if(e)return Nse(e)}function Nse(e){for(var t in Ei.prototype)e[t]=Ei.prototype[t];return e}Ei.prototype.on=Ei.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ei.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ei.prototype.off=Ei.prototype.removeListener=Ei.prototype.removeAllListeners=Ei.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ei.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Ei.prototype.emitReserved=Ei.prototype.emit;Ei.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ei.prototype.hasListeners=function(e){return!!this.listeners(e).length};const E2=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),$s=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),kse="arraybuffer";function Kz(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Ase=$s.setTimeout,Pse=$s.clearTimeout;function O2(e,t){t.useNativeTimers?(e.setTimeoutFn=Ase.bind($s),e.clearTimeoutFn=Pse.bind($s)):(e.setTimeoutFn=$s.setTimeout.bind($s),e.clearTimeoutFn=$s.clearTimeout.bind($s))}const jse=1.33;function Cse(e){return typeof e=="string"?Ese(e):Math.ceil((e.byteLength||e.size)*jse)}function Ese(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Xz(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ose(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Tse(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class Mse extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class BE extends Ei{constructor(t){super(),this.writable=!1,O2(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Mse(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=FE(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Ose(t);return n.length?"?"+n:""}}class Lse extends BE{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};wse(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,bse(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Xz()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Qz=!1;try{Qz=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Rse=Qz;function Ise(){}class Dse extends Lse{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class wc extends Ei{constructor(t,n,r){super(),this.createRequest=t,O2(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Kz(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=wc.requestsCount++,wc.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ise,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wc.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}wc.requestsCount=0;wc.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",tL);else if(typeof addEventListener=="function"){const e="onpagehide"in $s?"pagehide":"unload";addEventListener(e,tL,!1)}}function tL(){for(let e in wc.requests)wc.requests.hasOwnProperty(e)&&wc.requests[e].abort()}const Fse=(function(){const e=Jz({xdomain:!1});return e&&e.responseType!==null})();class Bse extends Dse{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Fse&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new wc(Jz,this.uri(),t)}}function Jz(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Rse))return new XMLHttpRequest}catch{}if(!t)try{return new $s[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Zz=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class $se extends BE{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Zz?{}:Kz(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;DE(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}i&&E2(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Xz()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const XS=$s.WebSocket||$s.MozWebSocket;class qse extends $se{createSocket(t,n,r){return Zz?new XS(t,n,r):n?new XS(t,n):new XS(t)}doWrite(t,n){this.ws.send(n)}}class Use extends BE{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=_se(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Sse();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&E2(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const zse={websocket:qse,webtransport:Use,polling:Bse},Vse=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wse=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uj(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Vse.exec(e||""),a={},o=14;for(;o--;)a[Wse[o]]=i[o]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=Hse(a,a.path),a.queryKey=Yse(a,a.query),a}function Hse(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yse(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}const zj=typeof addEventListener=="function"&&typeof removeEventListener=="function",gb=[];zj&&addEventListener("offline",()=>{gb.forEach(e=>e())},!1);class vd extends Ei{constructor(t,n){if(super(),this.binaryType=kse,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Uj(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Uj(n.host).host);O2(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Tse(this.opts.query)),zj&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},gb.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Gz,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&vd.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",vd.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Cse(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,E2(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(vd.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),zj&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=gb.indexOf(this._offlineEventListener);r!==-1&&gb.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}vd.protocol=Gz;class Gse extends vd{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;vd.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;vd.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function a(){r||(r=!0,f(),n.close(),n=null)}const o=h=>{const g=new Error("probe error: "+h);g.transport=n.name,a(),this.emitReserved("upgradeError",g)};function s(){o("transport closed")}function l(){o("socket closed")}function c(h){n&&h.name!==n.name&&a()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",s),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Kse=class extends Gse{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>zse[i]).filter(i=>!!i)),super(t,r)}};function Xse(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Uj(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const Qse=typeof ArrayBuffer=="function",Jse=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,eV=Object.prototype.toString,Zse=typeof Blob=="function"||typeof Blob<"u"&&eV.call(Blob)==="[object BlobConstructor]",ele=typeof File=="function"||typeof File<"u"&&eV.call(File)==="[object FileConstructor]";function $E(e){return Qse&&(e instanceof ArrayBuffer||Jse(e))||Zse&&e instanceof Blob||ele&&e instanceof File}function yb(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(yb(e[n]))return!0;return!1}if($E(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return yb(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&yb(e[n]))return!0;return!1}function tle(e){const t=[],n=e.data,r=e;return r.data=Vj(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vj(e,t){if(!e)return e;if($E(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Vj(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Vj(e[r],t));return n}return e}function nle(e,t){return e.data=Wj(e.data,t),delete e.attachments,e}function Wj(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Wj(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Wj(e[n],t));return e}const rle=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var On;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(On||(On={}));class ile{constructor(t){this.replacer=t}encode(t){return(t.type===On.EVENT||t.type===On.ACK)&&yb(t)?this.encodeAsBinary({type:t.type===On.EVENT?On.BINARY_EVENT:On.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===On.BINARY_EVENT||t.type===On.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=tle(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class qE extends Ei{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===On.BINARY_EVENT;r||n.type===On.BINARY_ACK?(n.type=r?On.EVENT:On.ACK,this.reconstructor=new ale(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if($E(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(On[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===On.BINARY_EVENT||r.type===On.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(a,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const a=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(qE.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case On.CONNECT:return nL(n);case On.DISCONNECT:return n===void 0;case On.CONNECT_ERROR:return typeof n=="string"||nL(n);case On.EVENT:case On.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&rle.indexOf(n[0])===-1);case On.ACK:case On.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ale{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=nle(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function nL(e){return Object.prototype.toString.call(e)==="[object Object]"}const ole=Object.freeze(Object.defineProperty({__proto__:null,Decoder:qE,Encoder:ile,get PacketType(){return On}},Symbol.toStringTag,{value:"Module"}));function _l(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sle=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tV extends Ei{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[_l(t,"open",this.onopen.bind(this)),_l(t,"packet",this.onpacket.bind(this)),_l(t,"error",this.onerror.bind(this)),_l(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,a;if(sle.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:On.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,h=n.pop();this._registerAckCallback(f,h),o.id=f}const s=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},i),o=(...s)=>{this.io.clearTimeoutFn(a),n.apply(this,s)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const a=(o,s)=>o?i(o):r(s);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:On.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case On.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case On.EVENT:case On.BINARY_EVENT:this.onevent(t);break;case On.ACK:case On.BINARY_ACK:this.onack(t);break;case On.DISCONNECT:this.ondisconnect();break;case On.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:On.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:On.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Gg(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Gg.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Gg.prototype.reset=function(){this.attempts=0};Gg.prototype.setMin=function(e){this.ms=e};Gg.prototype.setMax=function(e){this.max=e};Gg.prototype.setJitter=function(e){this.jitter=e};class Hj extends Ei{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,O2(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Gg({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||ole;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Kse(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=_l(n,"open",function(){r.onopen(),t&&t()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},o=_l(n,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(_l(t,"ping",this.onping.bind(this)),_l(t,"data",this.ondata.bind(this)),_l(t,"error",this.onerror.bind(this)),_l(t,"close",this.onclose.bind(this)),_l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){E2(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new tV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Yy={};function vb(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Xse(e,t.path||"/socket.io"),r=n.source,i=n.id,a=n.path,o=Yy[i]&&a in Yy[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return s?l=new Hj(r,t):(Yy[i]||(Yy[i]=new Hj(r,t)),l=Yy[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(vb,{Manager:Hj,Socket:tV,io:vb,connect:vb});function rL(e,t){var n;const r=vb(e.serverUrl,{path:e.mountPath,transports:e.transports,query:{app_id:e.appId,token:(n=e.token)!==null&&n!==void 0?n:Jv()}});return r.on("connect",async()=>{var i;return console.log("connect",r.id),(i=t.connect)===null||i===void 0?void 0:i.call(t)}),r.on("update_model",async i=>{var a;return(a=t.update_model)===null||a===void 0?void 0:a.call(t,i)}),r.on("error",async i=>{var a;return(a=t.error)===null||a===void 0?void 0:a.call(t,i)}),r.on("connect_error",async i=>{var a;return console.error("connect_error",i),(a=t.error)===null||a===void 0?void 0:a.call(t,i)}),r}function lle({config:e}){let t={...e};const n={},r={connect:async()=>{const m=[];Object.keys(n).forEach(b=>{l(b);const y=h(b);y==null||y.forEach(({connect:x})=>{const w=async()=>x==null?void 0:x();m.push(w())})}),await Promise.all(m)},update_model:async m=>{const y=h(m.room).map(x=>{var w;return(w=x.update_model)===null||w===void 0?void 0:w.call(x,m)});await Promise.all(y)},error:async m=>{console.error("error",m);const b=Object.values(n).flat().map(y=>{var x;return(x=y.error)===null||x===void 0?void 0:x.call(y,m)});await Promise.all(b)}};let i=rL(e,r);function a(){o()}function o(){i&&i.disconnect()}function s(m){a(),t={...t,...m},i=rL(t,r)}function l(m){i.emit("join",m)}function c(m){i.emit("leave",m)}async function f(m,b){var y;const x=JSON.stringify(b);return(y=r.update_model)===null||y===void 0?void 0:y.call(r,{room:m,data:x})}function h(m){return n[m]}return{socket:i,subscribeToRoom:(m,b)=>(n[m]||(l(m),n[m]=[]),n[m].push(b),()=>{var y,x;n[m]=(x=(y=n[m])===null||y===void 0?void 0:y.filter(w=>w!==b))!==null&&x!==void 0?x:[],n[m].length===0&&c(m)}),updateConfig:s,updateModel:f,disconnect:o}}const Gy=typeof window<"u"?window:{base44SharedInstances:{}};function cle(e,t){return Gy.base44SharedInstances||(Gy.base44SharedInstances={}),Gy.base44SharedInstances[e]||(Gy.base44SharedInstances[e]={instance:t()}),Gy.base44SharedInstances[e].instance}const ule="__user_heartbeat_event__",fle="__initialization_event__",dle="__session_duration_event__",iL="analytics-enable",aL="base44_analytics_session_id",hle={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},ple="analytics",vr=cle(ple,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...hle,...Sle()}})),mle=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r})=>{var i;const{maxQueueSize:a,throttleTime:o,batchSize:s}=vr.config;if(!(!((i=vr.config)===null||i===void 0)&&i.enabled))return{track:()=>{},cleanup:()=>{}};let l;const c=`${t}/api/apps/${n}/analytics/track/batch`,f=async k=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:k}})},h=k=>{try{const P=JSON.stringify({events:k}),C=new Blob([P],{type:"application/json"});return typeof navigator>"u"||P.length>6e4||!navigator.sendBeacon(c,C)}catch{return!1}},g=async(k,P={})=>{if(k.length===0)return;const C=await wle(r),j=k.map(ble(C));try{(!P.isBeacon||!h(j))&&await f(j)}catch{}},m=()=>{sL(g,{throttleTime:o,batchSize:s})},b=k=>{if(vr.requestsQueue.length>=a)return;const P=xle();vr.requestsQueue.push({...k,...P}),m()},y=()=>{sL(g,{throttleTime:o,batchSize:s}),l=lL(b),yle()},x=()=>{oL(),l==null||l(),vle(b);const k=vr.requestsQueue.splice(0);g(k,{isBeacon:!0})},w=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&y())},_=()=>{oL(),l==null||l(),typeof window<"u"&&window.removeEventListener("visibilitychange",w)};return m(),l=lL(b),gle(b),typeof window<"u"&&window.addEventListener("visibilitychange",w),{track:b,cleanup:_}};function oL(){vr.isProcessing=!1}async function sL(e,t){if(vr.isProcessing)return;vr.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;vr.isProcessing&&vr.requestsQueue.length>0;){const i=vr.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(a=>setTimeout(a,n))}vr.isProcessing=!1}function lL(e){var t;if(vr.isHeartBeatProcessing||((t=vr.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};vr.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:ule})},vr.config.heartBeatInterval);return()=>{clearInterval(n),vr.isHeartBeatProcessing=!1}}function gle(e){typeof window>"u"||vr.wasInitializationTracked||(vr.wasInitializationTracked=!0,e({eventName:fle,properties:{referrer:document==null?void 0:document.referrer}}))}function yle(){typeof window>"u"||vr.sessionStartTime!==null||(vr.sessionStartTime=new Date().toISOString())}function vle(e){if(typeof window>"u"||vr.sessionStartTime===null)return;const t=new Date().getTime()-new Date(vr.sessionStartTime).getTime();vr.sessionStartTime=null,e({eventName:dle,properties:{sessionDuration:t}})}function xle(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function ble(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let QS=null;async function wle(e){if(!vr.sessionContext){if(!QS){const t=_le();QS=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}vr.sessionContext=await QS}return vr.sessionContext}function Sle(){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search).get(iL);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(iL);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function _le(){if(typeof window>"u")return HS();try{const e=localStorage.getItem(aL);if(!e){const t=HS();return localStorage.setItem(aL,t),t}return e}catch{return HS()}}function Nle(e){var t,n;const{serverUrl:r="https://base44.app",appId:i,token:a,serviceToken:o,requiresAuth:s=!1,appBaseUrl:l,options:c,functionsVersion:f,headers:h}=e,g=typeof l=="string"?l:"",m={serverUrl:r,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:i,token:a};let b=null;const y=()=>(b||(b=lle({config:m})),b),x={...h,"X-App-Id":String(i)},w=f?{...x,"Base44-Functions-Version":f}:x,_=xv({baseURL:`${r}/api`,headers:x,token:a,onError:c==null?void 0:c.onError}),k=xv({baseURL:`${r}/api`,headers:w,token:a,interceptResponses:!1,onError:c==null?void 0:c.onError}),P={...x,...a?{"on-behalf-of":`Bearer ${a}`}:{}},C=xv({baseURL:`${r}/api`,headers:P,token:o,onError:c==null?void 0:c.onError}),j=xv({baseURL:`${r}/api`,headers:w,token:o,interceptResponses:!1}),L=use(_,k,i,{appBaseUrl:g}),R={entities:Y6({axios:_,appId:i,getSocket:y}),integrations:G6(_,i),connectors:hse(_,i),auth:L,functions:K6(k,i,{getAuthHeaders:()=>{const M={},F=a||Jv();return F&&(M.Authorization=`Bearer ${F}`),M},baseURL:(t=k.defaults)===null||t===void 0?void 0:t.baseURL}),agents:X6({axios:_,getSocket:y,appId:i,serverUrl:r,token:a}),appLogs:Q6(_,i),users:mse(_,i),analytics:mle({axiosClient:_,serverUrl:r,appId:i,userAuthModule:L}),cleanup:()=>{R.analytics.cleanup(),b&&b.disconnect()}},D={entities:Y6({axios:C,appId:i,getSocket:y}),integrations:G6(C,i),sso:fse(C,i),connectors:dse(C,i),functions:K6(j,i,{getAuthHeaders:()=>{const M={};return o&&(M.Authorization=`Bearer ${o}`),M},baseURL:(n=j.defaults)===null||n===void 0?void 0:n.baseURL}),agents:X6({axios:C,getSocket:y,appId:i,serverUrl:r,token:a}),appLogs:Q6(C,i),cleanup:()=>{b&&b.disconnect()}};if(typeof window<"u"){const M=a||Jv();M&&R.auth.setToken(M)}return s&&typeof window<"u"&&setTimeout(async()=>{try{await R.auth.isAuthenticated()||R.auth.redirectToLogin(window.location.href)}catch(M){console.error("Authentication check failed:",M),R.auth.redirectToLogin(window.location.href)}},0),{...R,setToken(M){R.auth.setToken(M),b&&b.updateConfig({token:M}),m.token=M},getConfig(){return{serverUrl:r,appId:i,requiresAuth:s}},get asServiceRole(){if(!o)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return D}}}const nV=typeof window>"u",kle=nV?{localStorage:new Map}:window,Ev=kle.localStorage,Ale=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),um=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(nV)return t;const r=`base44_${Ale(e)}`,i=new URLSearchParams(window.location.search),a=i.get(e);if(n){i.delete(e);const s=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,s)}if(a)return Ev.setItem(r,a),a;if(t)return Ev.setItem(r,t),t;const o=Ev.getItem(r);return o||null},Ple=()=>(um("clear_access_token")==="true"&&(Ev.removeItem("base44_access_token"),Ev.removeItem("token")),{appId:um("app_id",{defaultValue:"69e02a4d696493d8037976f8"}),token:um("access_token",{removeFromUrl:!0}),fromUrl:um("from_url",{defaultValue:window.location.href}),functionsVersion:um("functions_version",{defaultValue:"prod"}),appBaseUrl:um("app_base_url",{defaultValue:void 0})}),wv={...Ple()},{appId:jle,token:Cle,functionsVersion:Ele,appBaseUrl:Ole}=wv,ut=Nle({appId:jle,token:Cle,functionsVersion:Ele,serverUrl:"",requiresAuth:!1,appBaseUrl:Ole});function Tle({}){var i;const t=Np().pathname.substring(1),{data:n,isFetched:r}=dn({queryKey:["user"],queryFn:async()=>{try{return{user:await ut.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return d.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-background",children:d.jsx("div",{className:"max-w-md w-full",children:d.jsxs("div",{className:"text-center space-y-6",children:[d.jsx(Ki,{className:"w-12 h-12 text-primary mx-auto opacity-30"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h1",{className:"text-7xl font-black text-muted-foreground/20 font-mono",children:"404"}),d.jsx("div",{className:"h-px w-16 bg-border mx-auto"})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Page Not Found"}),d.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["The page ",d.jsxs("span",{className:"font-mono text-primary",children:["/",t]})," could not be found."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&d.jsx("div",{className:"mt-8 p-4 bg-muted/30 rounded-lg border border-border",children:d.jsxs("p",{className:"text-sm text-muted-foreground",children:[d.jsx("span",{className:"font-semibold text-foreground",children:"Admin:"})," This page may not be implemented yet."]})}),d.jsx("div",{className:"pt-6",children:d.jsx("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-6 py-2.5 text-sm font-medium text-primary-foreground bg-primary rounded-lg hover:bg-primary/90 transition-all duration-200",children:"Go Home"})})]})})})}const rV=E.createContext(),Mle=({children:e})=>{const[t,n]=E.useState(null),[r,i]=E.useState(!1),[a,o]=E.useState(!0),[s,l]=E.useState(!0),[c,f]=E.useState(null),[h,g]=E.useState(!1),[m,b]=E.useState(null);E.useEffect(()=>{y()},[]);const y=async()=>{var k,P;try{l(!0),f(null);const C=xv({baseURL:"/api/apps/public",headers:{"X-App-Id":wv.appId},token:wv.token,interceptResponses:!0});try{const j=await C.get(`/prod/public-settings/by-id/${wv.appId}`);b(j),wv.token?await x():(o(!1),i(!1),g(!0)),l(!1)}catch(j){if(console.error("App state check failed:",j),j.status===403&&((P=(k=j.data)==null?void 0:k.extra_data)!=null&&P.reason)){const L=j.data.extra_data.reason;f(L==="auth_required"?{type:"auth_required",message:"Authentication required"}:L==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:L,message:j.message})}else f({type:"unknown",message:j.message||"Failed to load app"});l(!1),o(!1)}}catch(C){console.error("Unexpected error:",C),f({type:"unknown",message:C.message||"An unexpected error occurred"}),l(!1),o(!1)}},x=async()=>{try{o(!0);const k=await ut.auth.me();n(k),i(!0),o(!1),g(!0)}catch(k){console.error("User auth check failed:",k),o(!1),i(!1),g(!0),(k.status===401||k.status===403)&&f({type:"auth_required",message:"Authentication required"})}},w=(k=!0)=>{n(null),i(!1),k?ut.auth.logout(window.location.href):ut.auth.logout()},_=k=>{ut.auth.redirectToLogin(k||window.location.href)};return d.jsx(rV.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:a,isLoadingPublicSettings:s,authError:c,appPublicSettings:m,authChecked:h,logout:w,navigateToLogin:_,checkUserAuth:x,checkAppState:y},children:e})},Lle=()=>{const e=E.useContext(rV);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},UE=E.createContext({});function zE(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const T2=E.createContext(null),VE=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Rle extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ile({children:e,isPresent:t}){const n=E.useId(),r=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=E.useContext(VE);return E.useInsertionEffect(()=>{const{width:o,height:s,top:l,left:c}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${s}px !important;
top: ${l}px !important;
left: ${c}px !important;
}
`),()=>{document.head.removeChild(f)}},[t]),d.jsx(Rle,{isPresent:t,childRef:r,sizeRef:i,children:E.cloneElement(e,{ref:r})})}const Dle=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=zE(Fle),l=E.useId(),c=E.useCallback(h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},[s,r]),f=E.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:c,register:h=>(s.set(h,!1),()=>s.delete(h))}),a?[Math.random(),c]:[n,c]);return E.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),E.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o==="popLayout"&&(e=d.jsx(Ile,{isPresent:n,children:e})),d.jsx(T2.Provider,{value:f,children:e})};function Fle(){return new Map}function iV(e=!0){const t=E.useContext(T2);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=E.useId();E.useEffect(()=>{e&&i(a)},[e]);const o=E.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const wx=e=>e.key||"";function cL(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const WE=typeof window<"u",aV=WE?E.useLayoutEffect:E.useEffect,us=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1})=>{const[s,l]=iV(o),c=E.useMemo(()=>cL(e),[e]),f=o&&!s?[]:c.map(wx),h=E.useRef(!0),g=E.useRef(c),m=zE(()=>new Map),[b,y]=E.useState(c),[x,w]=E.useState(c);aV(()=>{h.current=!1,g.current=c;for(let P=0;P<x.length;P++){const C=wx(x[P]);f.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[x,f.length,f.join("-")]);const _=[];if(c!==b){let P=[...c];for(let C=0;C<x.length;C++){const j=x[C],L=wx(j);f.includes(L)||(P.splice(C,0,j),_.push(j))}a==="wait"&&_.length&&(P=_),w(cL(P)),y(c);return}const{forceRender:k}=E.useContext(UE);return d.jsx(d.Fragment,{children:x.map(P=>{const C=wx(P),j=o&&!s?!1:c===x||f.includes(C),L=()=>{if(m.has(C))m.set(C,!0);else return;let R=!0;m.forEach(D=>{D||(R=!1)}),R&&(k==null||k(),w(g.current),o&&(l==null||l()),r&&r())};return d.jsx(Dle,{isPresent:j,initial:!h.current||n?void 0:!1,custom:j?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:j?void 0:L,children:P},C)})})},ls=e=>e;let oV=ls;function HE(e){let t;return()=>(t===void 0&&(t=e()),t)}const yg=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$u=e=>e*1e3,qu=e=>e/1e3,Ble={useManualTiming:!1};function $le(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(c){a.has(c)&&(l.schedule(c),e()),c(o)}const l={schedule:(c,f=!1,h=!1)=>{const m=h&&r?t:n;return f&&a.add(c),m.has(c)||m.add(c),c},cancel:c=>{n.delete(c),a.delete(c)},process:c=>{if(o=c,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,l.process(c))}};return l}const Sx=["read","resolveKeyframes","update","preRender","render","postRender"],qle=40;function sV(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Sx.reduce((w,_)=>(w[_]=$le(a),w),{}),{read:s,resolveKeyframes:l,update:c,preRender:f,render:h,postRender:g}=o,m=()=>{const w=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,qle),1),i.timestamp=w,i.isProcessing=!0,s.process(i),l.process(i),c.process(i),f.process(i),h.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},b=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:Sx.reduce((w,_)=>{const k=o[_];return w[_]=(P,C=!1,j=!1)=>(n||b(),k.schedule(P,C,j)),w},{}),cancel:w=>{for(let _=0;_<Sx.length;_++)o[Sx[_]].cancel(w)},state:i,steps:o}}const{schedule:Or,cancel:kd,state:ga,steps:JS}=sV(typeof requestAnimationFrame<"u"?requestAnimationFrame:ls,!0),lV=E.createContext({strict:!1}),uL={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vg={};for(const e in uL)vg[e]={isEnabled:t=>uL[e].some(n=>!!t[n])};function Ule(e){for(const t in e)vg[t]={...vg[t],...e[t]}}const zle=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hb(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zle.has(e)}let cV=e=>!Hb(e);function Vle(e){e&&(cV=t=>t.startsWith("on")?!Hb(t):e(t))}try{Vle(require("@emotion/is-prop-valid").default)}catch{}function Wle(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(cV(i)||n===!0&&Hb(i)||!t&&!Hb(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Hle(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const M2=E.createContext({});function Zv(e){return typeof e=="string"||Array.isArray(e)}function L2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const YE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],GE=["initial",...YE];function R2(e){return L2(e.animate)||GE.some(t=>Zv(e[t]))}function uV(e){return!!(R2(e)||e.variants)}function Yle(e,t){if(R2(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Zv(n)?n:void 0,animate:Zv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Gle(e){const{initial:t,animate:n}=Yle(e,E.useContext(M2));return E.useMemo(()=>({initial:t,animate:n}),[fL(t),fL(n)])}function fL(e){return Array.isArray(e)?e.join(" "):e}const Kle=Symbol.for("motionComponentSymbol");function Cm(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Xle(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Cm(n)&&(n.current=r))},[t])}const KE=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qle="framerAppearId",fV="data-"+KE(Qle),{schedule:XE}=sV(queueMicrotask,!1),dV=E.createContext({});function Jle(e,t,n,r,i){var a,o;const{visualElement:s}=E.useContext(M2),l=E.useContext(lV),c=E.useContext(T2),f=E.useContext(VE).reducedMotion,h=E.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const g=h.current,m=E.useContext(dV);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&Zle(h.current,n,i,m);const b=E.useRef(!1);E.useInsertionEffect(()=>{g&&b.current&&g.update(n,c)});const y=n[fV],x=E.useRef(!!y&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,y))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,y)));return aV(()=>{g&&(b.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),XE.render(g.render),x.current&&g.animationState&&g.animationState.animateChanges())}),E.useEffect(()=>{g&&(!x.current&&g.animationState&&g.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,y)}),x.current=!1))}),g}function Zle(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:hV(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Cm(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function hV(e){if(e)return e.options.allowProjection!==!1?e.projection:hV(e.parent)}function ece({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var a,o;e&&Ule(e);function s(c,f){let h;const g={...E.useContext(VE),...c,layoutId:tce(c)},{isStatic:m}=g,b=Gle(c),y=r(c,m);if(!m&&WE){nce();const x=rce(g);h=x.MeasureLayout,b.visualElement=Jle(i,y,g,t,x.ProjectionNode)}return d.jsxs(M2.Provider,{value:b,children:[h&&b.visualElement?d.jsx(h,{visualElement:b.visualElement,...g}):null,n(i,c,Xle(y,b.visualElement,f),y,m,b.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${(o=(a=i.displayName)!==null&&a!==void 0?a:i.name)!==null&&o!==void 0?o:""})`}`;const l=E.forwardRef(s);return l[Kle]=i,l}function tce({layoutId:e}){const t=E.useContext(UE).id;return t&&e!==void 0?t+"-"+e:e}function nce(e,t){E.useContext(lV).strict}function rce(e){const{drag:t,layout:n}=vg;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ice=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function QE(e){return typeof e!="string"||e.includes("-")?!1:!!(ice.indexOf(e)>-1||/[A-Z]/u.test(e))}function dL(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function JE(e,t,n,r){if(typeof t=="function"){const[i,a]=dL(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=dL(r);t=t(n!==void 0?n:e.custom,i,a)}return t}const Yj=e=>Array.isArray(e),ace=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),oce=e=>Yj(e)?e[e.length-1]||0:e,qa=e=>!!(e&&e.getVelocity);function xb(e){const t=qa(e)?e.get():e;return ace(t)?t.toValue():t}function sce({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){const o={latestValues:lce(r,i,a,e),renderState:t()};return n&&(o.onMount=s=>n({props:r,current:s,...o}),o.onUpdate=s=>n(s)),o}const pV=e=>(t,n)=>{const r=E.useContext(M2),i=E.useContext(T2),a=()=>sce(e,t,r,i);return n?a():zE(a)};function lce(e,t,n,r){const i={},a=r(e,{});for(const g in a)i[g]=xb(a[g]);let{initial:o,animate:s}=e;const l=R2(e),c=uV(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const h=f?s:o;if(h&&typeof h!="boolean"&&!L2(h)){const g=Array.isArray(h)?h:[h];for(let m=0;m<g.length;m++){const b=JE(e,g[m]);if(b){const{transitionEnd:y,transition:x,...w}=b;for(const _ in w){let k=w[_];if(Array.isArray(k)){const P=f?k.length-1:0;k=k[P]}k!==null&&(i[_]=k)}for(const _ in y)i[_]=y[_]}}}return i}const Kg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ap=new Set(Kg),mV=e=>t=>typeof t=="string"&&t.startsWith(e),gV=mV("--"),cce=mV("var(--"),ZE=e=>cce(e)?uce.test(e.split("/*")[0].trim()):!1,uce=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,yV=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Yu=(e,t,n)=>n>t?t:n<e?e:n,Xg={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},e0={...Xg,transform:e=>Yu(0,1,e)},_x={...Xg,default:1},u1=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xf=u1("deg"),Sc=u1("%"),Ht=u1("px"),fce=u1("vh"),dce=u1("vw"),hL={...Sc,parse:e=>Sc.parse(e)/100,transform:e=>Sc.transform(e*100)},hce={borderWidth:Ht,borderTopWidth:Ht,borderRightWidth:Ht,borderBottomWidth:Ht,borderLeftWidth:Ht,borderRadius:Ht,radius:Ht,borderTopLeftRadius:Ht,borderTopRightRadius:Ht,borderBottomRightRadius:Ht,borderBottomLeftRadius:Ht,width:Ht,maxWidth:Ht,height:Ht,maxHeight:Ht,top:Ht,right:Ht,bottom:Ht,left:Ht,padding:Ht,paddingTop:Ht,paddingRight:Ht,paddingBottom:Ht,paddingLeft:Ht,margin:Ht,marginTop:Ht,marginRight:Ht,marginBottom:Ht,marginLeft:Ht,backgroundPositionX:Ht,backgroundPositionY:Ht},pce={rotate:Xf,rotateX:Xf,rotateY:Xf,rotateZ:Xf,scale:_x,scaleX:_x,scaleY:_x,scaleZ:_x,skew:Xf,skewX:Xf,skewY:Xf,distance:Ht,translateX:Ht,translateY:Ht,translateZ:Ht,x:Ht,y:Ht,z:Ht,perspective:Ht,transformPerspective:Ht,opacity:e0,originX:hL,originY:hL,originZ:Ht},pL={...Xg,transform:Math.round},eO={...hce,...pce,zIndex:pL,size:Ht,fillOpacity:e0,strokeOpacity:e0,numOctaves:pL},mce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gce=Kg.length;function yce(e,t,n){let r="",i=!0;for(let a=0;a<gce;a++){const o=Kg[a],s=e[o];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(o.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=yV(s,eO[o]);if(!l){i=!1;const f=mce[o]||o;r+=`${f}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function tO(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const l in t){const c=t[l];if(Ap.has(l)){o=!0;continue}else if(gV(l)){i[l]=c;continue}else{const f=yV(c,eO[l]);l.startsWith("origin")?(s=!0,a[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=yce(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:f=0}=a;r.transformOrigin=`${l} ${c} ${f}`}}const vce={offset:"stroke-dashoffset",array:"stroke-dasharray"},xce={offset:"strokeDashoffset",array:"strokeDasharray"};function bce(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?vce:xce;e[a.offset]=Ht.transform(-r);const o=Ht.transform(t),s=Ht.transform(n);e[a.array]=`${o} ${s}`}function mL(e,t,n){return typeof e=="string"?e:Ht.transform(t+n*e)}function wce(e,t,n){const r=mL(t,e.x,e.width),i=mL(n,e.y,e.height);return`${r} ${i}`}function nO(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...c},f,h){if(tO(e,c,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:b}=e;g.transform&&(b&&(m.transform=g.transform),delete g.transform),b&&(i!==void 0||a!==void 0||m.transform)&&(m.transformOrigin=wce(b,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),o!==void 0&&bce(g,o,s,l,!1)}const rO=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),vV=()=>({...rO(),attrs:{}}),iO=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xV(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const bV=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function wV(e,t,n,r){xV(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(bV.has(i)?i:KE(i),t.attrs[i])}const Yb={};function Sce(e){Object.assign(Yb,e)}function SV(e,{layout:t,layoutId:n}){return Ap.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yb[e]||e==="opacity")}function aO(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(qa(i[o])||t.style&&qa(t.style[o])||SV(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return a}function _V(e,t,n){const r=aO(e,t,n);for(const i in e)if(qa(e[i])||qa(t[i])){const a=Kg.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function _ce(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const gL=["x","y","width","height","cx","cy","r"],Nce={useVisualState:pV({scrapeMotionValuesFromProps:_V,createRenderState:vV,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(const s in i)if(Ap.has(s)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let s=0;s<gL.length;s++){const l=gL[s];e[l]!==t[l]&&(o=!0)}o&&Or.read(()=>{_ce(n,r),Or.render(()=>{nO(r,i,iO(n.tagName),e.transformTemplate),wV(n,r)})})}})},kce={useVisualState:pV({scrapeMotionValuesFromProps:aO,createRenderState:rO})};function NV(e,t,n){for(const r in t)!qa(t[r])&&!SV(r,n)&&(e[r]=t[r])}function Ace({transformTemplate:e},t){return E.useMemo(()=>{const n=rO();return tO(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Pce(e,t){const n=e.style||{},r={};return NV(r,n,e),Object.assign(r,Ace(e,t)),r}function jce(e,t){const n={},r=Pce(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function Cce(e,t,n,r){const i=E.useMemo(()=>{const a=vV();return nO(a,t,iO(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};NV(a,e.style,e),i.style={...a,...i.style}}return i}function Ece(e=!1){return(n,r,i,{latestValues:a},o)=>{const l=(QE(n)?Cce:jce)(r,a,o,n),c=Wle(r,typeof n=="string",e),f=n!==E.Fragment?{...c,...l,ref:i}:{},{children:h}=r,g=E.useMemo(()=>qa(h)?h.get():h,[h]);return E.createElement(n,{...f,children:g})}}function Oce(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...QE(r)?Nce:kce,preloadedFeatures:e,useRender:Ece(i),createVisualElement:t,Component:r};return ece(o)}}function kV(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function I2(e,t,n){const r=e.getProps();return JE(r,t,n!==void 0?n:r.custom,e)}const Tce=HE(()=>window.ScrollTimeline!==void 0);class Mce{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(Tce()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Lce extends Mce{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function oO(e,t){return e?e[t]||e.default||e:void 0}const Gj=2e4;function AV(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Gj;)t+=n,r=e.next(t);return t>=Gj?1/0:t}function sO(e){return typeof e=="function"}function yL(e,t){e.timeline=t,e.onfinish=null}const lO=e=>Array.isArray(e)&&typeof e[0]=="number",Rce={linearEasing:void 0};function Ice(e,t){const n=HE(e);return()=>{var r;return(r=Rce[t])!==null&&r!==void 0?r:n()}}const Gb=Ice(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),PV=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=e(yg(0,i-1,a))+", ";return`linear(${r.substring(0,r.length-2)})`};function jV(e){return!!(typeof e=="function"&&Gb()||!e||typeof e=="string"&&(e in Kj||Gb())||lO(e)||Array.isArray(e)&&e.every(jV))}const Sv=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Sv([0,.65,.55,1]),circOut:Sv([.55,0,1,.45]),backIn:Sv([.31,.01,.66,-.59]),backOut:Sv([.33,1.53,.69,.99])};function CV(e,t){if(e)return typeof e=="function"&&Gb()?PV(e,t):lO(e)?Sv(e):Array.isArray(e)?e.map(n=>CV(n,t)||Kj.easeOut):Kj[e]}const xl={x:!1,y:!1};function EV(){return xl.x||xl.y}function OV(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function TV(e,t){const n=OV(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function vL(e){return t=>{t.pointerType==="touch"||EV()||e(t)}}function Dce(e,t,n={}){const[r,i,a]=TV(e,n),o=vL(s=>{const{target:l}=s,c=t(s);if(typeof c!="function"||!l)return;const f=vL(h=>{c(h),l.removeEventListener("pointerleave",f)});l.addEventListener("pointerleave",f,i)});return r.forEach(s=>{s.addEventListener("pointerenter",o,i)}),a}const MV=(e,t)=>t?e===t?!0:MV(e,t.parentElement):!1,cO=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Fce=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bce(e){return Fce.has(e.tagName)||e.tabIndex!==-1}const _v=new WeakSet;function xL(e){return t=>{t.key==="Enter"&&e(t)}}function ZS(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const $ce=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=xL(()=>{if(_v.has(n))return;ZS(n,"down");const i=xL(()=>{ZS(n,"up")}),a=()=>ZS(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function bL(e){return cO(e)&&!EV()}function qce(e,t,n={}){const[r,i,a]=TV(e,n),o=s=>{const l=s.currentTarget;if(!bL(s)||_v.has(l))return;_v.add(l);const c=t(s),f=(m,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",g),!(!bL(m)||!_v.has(l))&&(_v.delete(l),typeof c=="function"&&c(m,{success:b}))},h=m=>{f(m,n.useGlobalTarget||MV(l,m.target))},g=m=>{f(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",g,i)};return r.forEach(s=>{!Bce(s)&&s.getAttribute("tabindex")===null&&(s.tabIndex=0),(n.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),s.addEventListener("focus",c=>$ce(c,i),i)}),a}function Uce(e){return e==="x"||e==="y"?xl[e]?null:(xl[e]=!0,()=>{xl[e]=!1}):xl.x||xl.y?null:(xl.x=xl.y=!0,()=>{xl.x=xl.y=!1})}const LV=new Set(["width","height","top","left","right","bottom",...Kg]);let bb;function zce(){bb=void 0}const _c={now:()=>(bb===void 0&&_c.set(ga.isProcessing||Ble.useManualTiming?ga.timestamp:performance.now()),bb),set:e=>{bb=e,queueMicrotask(zce)}};function uO(e,t){e.indexOf(t)===-1&&e.push(t)}function fO(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class dO{constructor(){this.subscriptions=[]}add(t){return uO(this.subscriptions,t),()=>fO(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function RV(e,t){return t?e*(1e3/t):0}const wL=30,Vce=e=>!isNaN(parseFloat(e));class Wce{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=_c.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_c.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vce(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new dO);const r=this.events[t].add(n);return t==="change"?()=>{r(),Or.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_c.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wL)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wL);return RV(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t0(e,t){return new Wce(e,t)}function Hce(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,t0(n))}function Yce(e,t){const n=I2(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=oce(a[o]);Hce(e,o,s)}}function Gce(e){return!!(qa(e)&&e.add)}function Xj(e,t){const n=e.getValue("willChange");if(Gce(n))return n.add(t)}function IV(e){return e.props[fV]}const DV=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Kce=1e-7,Xce=12;function Qce(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=DV(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Kce&&++s<Xce);return o}function f1(e,t,n,r){if(e===t&&n===r)return ls;const i=a=>Qce(a,0,1,e,n);return a=>a===0||a===1?a:DV(i(a),t,r)}const FV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,BV=e=>t=>1-e(1-t),$V=f1(.33,1.53,.69,.99),hO=BV($V),qV=FV(hO),UV=e=>(e*=2)<1?.5*hO(e):.5*(2-Math.pow(2,-10*(e-1))),pO=e=>1-Math.sin(Math.acos(e)),zV=BV(pO),VV=FV(pO),WV=e=>/^0[^.\s]+$/u.test(e);function Jce(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||WV(e):!0}const Ov=e=>Math.round(e*1e5)/1e5,mO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Zce(e){return e==null}const eue=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gO=(e,t)=>n=>!!(typeof n=="string"&&eue.test(n)&&n.startsWith(e)||t&&!Zce(n)&&Object.prototype.hasOwnProperty.call(n,t)),HV=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(mO);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},tue=e=>Yu(0,255,e),e_={...Xg,transform:e=>Math.round(tue(e))},Lh={test:gO("rgb","red"),parse:HV("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+e_.transform(e)+", "+e_.transform(t)+", "+e_.transform(n)+", "+Ov(e0.transform(r))+")"};function nue(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Qj={test:gO("#"),parse:nue,transform:Lh.transform},Em={test:gO("hsl","hue"),parse:HV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sc.transform(Ov(t))+", "+Sc.transform(Ov(n))+", "+Ov(e0.transform(r))+")"},Ia={test:e=>Lh.test(e)||Qj.test(e)||Em.test(e),parse:e=>Lh.test(e)?Lh.parse(e):Em.test(e)?Em.parse(e):Qj.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Lh.transform(e):Em.transform(e)},rue=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iue(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(mO))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(rue))===null||n===void 0?void 0:n.length)||0)>0}const YV="number",GV="color",aue="var",oue="var(",SL="${}",sue=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function n0(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(sue,l=>(Ia.test(l)?(r.color.push(a),i.push(GV),n.push(Ia.parse(l))):l.startsWith(oue)?(r.var.push(a),i.push(aue),n.push(l)):(r.number.push(a),i.push(YV),n.push(parseFloat(l))),++a,SL)).split(SL);return{values:n,split:s,indexes:r,types:i}}function KV(e){return n0(e).values}function XV(e){const{split:t,types:n}=n0(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===YV?a+=Ov(i[o]):s===GV?a+=Ia.transform(i[o]):a+=i[o]}return a}}const lue=e=>typeof e=="number"?0:e;function cue(e){const t=KV(e);return XV(e)(t.map(lue))}const Ad={test:iue,parse:KV,createTransformer:XV,getAnimatableNone:cue},uue=new Set(["brightness","contrast","saturate","opacity"]);function fue(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(mO)||[];if(!r)return e;const i=n.replace(r,"");let a=uue.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const due=/\b([a-z-]*)\(.*?\)/gu,Jj={...Ad,getAnimatableNone:e=>{const t=e.match(due);return t?t.map(fue).join(" "):e}},hue={...eO,color:Ia,backgroundColor:Ia,outlineColor:Ia,fill:Ia,stroke:Ia,borderColor:Ia,borderTopColor:Ia,borderRightColor:Ia,borderBottomColor:Ia,borderLeftColor:Ia,filter:Jj,WebkitFilter:Jj},yO=e=>hue[e];function QV(e,t){let n=yO(e);return n!==Jj&&(n=Ad),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pue=new Set(["auto","none","0"]);function mue(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!pue.has(a)&&n0(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=QV(n,i)}const _L=e=>e===Xg||e===Ht,NL=(e,t)=>parseFloat(e.split(", ")[t]),kL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return NL(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?NL(a[1],e):0}},gue=new Set(["x","y","z"]),yue=Kg.filter(e=>!gue.has(e));function vue(e){const t=[];return yue.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const xg={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:kL(4,13),y:kL(5,14)};xg.translateX=xg.x;xg.translateY=xg.y;const Qh=new Set;let Zj=!1,e3=!1;function JV(){if(e3){const e=Array.from(Qh).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=vue(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}e3=!1,Zj=!1,Qh.forEach(e=>e.complete()),Qh.clear()}function ZV(){Qh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(e3=!0)})}function xue(){ZV(),JV()}class vO{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Qh.add(this),Zj||(Zj=!0,Or.read(ZV),Or.resolveKeyframes(JV))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Qh.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Qh.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const eW=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),bue=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wue(e){const t=bue.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function tW(e,t,n=1){const[r,i]=wue(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return eW(o)?parseFloat(o):o}return ZE(i)?tW(i,t,n+1):i}const nW=e=>t=>t.test(e),Sue={test:e=>e==="auto",parse:e=>e},rW=[Xg,Ht,Sc,Xf,dce,fce,Sue],AL=e=>rW.find(nW(e));class iW extends vO{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ZE(c))){const f=tW(c,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!LV.has(r)||t.length!==2)return;const[i,a]=t,o=AL(i),s=AL(a);if(o!==s)if(_L(o)&&_L(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)Jce(t[i])&&r.push(i);r.length&&mue(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xg[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=xg[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const PL=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ad.test(e)||e==="0")&&!e.startsWith("url("));function _ue(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Nue(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=PL(i,t),s=PL(a,t);return!o||!s?!1:_ue(e)||(n==="spring"||sO(n))&&r}const kue=e=>e!==null;function D2(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(kue),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Aue=40;class aW{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_c.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Aue?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&xue(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=_c.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Nue(t,r,i,a))if(o)this.options.duration=0;else{l&&l(D2(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Jr=(e,t,n)=>e+(t-e)*n;function t_(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Pue({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=t_(l,s,e+1/3),a=t_(l,s,e),o=t_(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Kb(e,t){return n=>n>0?t:e}const n_=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},jue=[Qj,Lh,Em],Cue=e=>jue.find(t=>t.test(e));function jL(e){const t=Cue(e);if(!t)return!1;let n=t.parse(e);return t===Em&&(n=Pue(n)),n}const CL=(e,t)=>{const n=jL(e),r=jL(t);if(!n||!r)return Kb(e,t);const i={...n};return a=>(i.red=n_(n.red,r.red,a),i.green=n_(n.green,r.green,a),i.blue=n_(n.blue,r.blue,a),i.alpha=Jr(n.alpha,r.alpha,a),Lh.transform(i))},Eue=(e,t)=>n=>t(e(n)),d1=(...e)=>e.reduce(Eue),t3=new Set(["none","hidden"]);function Oue(e,t){return t3.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Tue(e,t){return n=>Jr(e,t,n)}function xO(e){return typeof e=="number"?Tue:typeof e=="string"?ZE(e)?Kb:Ia.test(e)?CL:Rue:Array.isArray(e)?oW:typeof e=="object"?Ia.test(e)?CL:Mue:Kb}function oW(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>xO(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function Mue(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xO(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function Lue(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][i[o]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[a]=l,i[o]++}return r}const Rue=(e,t)=>{const n=Ad.createTransformer(t),r=n0(e),i=n0(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?t3.has(e)&&!i.values.length||t3.has(t)&&!r.values.length?Oue(e,t):d1(oW(Lue(r,i),i.values),n):Kb(e,t)};function sW(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Jr(e,t,n):xO(e)(e,t)}const Iue=5;function lW(e,t,n){const r=Math.max(t-Iue,0);return RV(n-e(r),t-r)}const ui={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},r_=.001;function Due({duration:e=ui.duration,bounce:t=ui.bounce,velocity:n=ui.velocity,mass:r=ui.mass}){let i,a,o=1-t;o=Yu(ui.minDamping,ui.maxDamping,o),e=Yu(ui.minDuration,ui.maxDuration,qu(e)),o<1?(i=c=>{const f=c*o,h=f*e,g=f-n,m=n3(c,o),b=Math.exp(-h);return r_-g/m*b},a=c=>{const h=c*o*e,g=h*n+n,m=Math.pow(o,2)*Math.pow(c,2)*e,b=Math.exp(-h),y=n3(Math.pow(c,2),o);return(-i(c)+r_>0?-1:1)*((g-m)*b)/y}):(i=c=>{const f=Math.exp(-c*e),h=(c-n)*e+1;return-r_+f*h},a=c=>{const f=Math.exp(-c*e),h=(n-c)*(e*e);return f*h});const s=5/e,l=Bue(i,a,s);if(e=$u(e),isNaN(l))return{stiffness:ui.stiffness,damping:ui.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const Fue=12;function Bue(e,t,n){let r=n;for(let i=1;i<Fue;i++)r=r-e(r)/t(r);return r}function n3(e,t){return e*Math.sqrt(1-t*t)}const $ue=["duration","bounce"],que=["stiffness","damping","mass"];function EL(e,t){return t.some(n=>e[n]!==void 0)}function Uue(e){let t={velocity:ui.velocity,stiffness:ui.stiffness,damping:ui.damping,mass:ui.mass,isResolvedFromDuration:!1,...e};if(!EL(e,que)&&EL(e,$ue))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Yu(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ui.mass,stiffness:i,damping:a}}else{const n=Due(e);t={...t,...n,mass:ui.mass},t.isResolvedFromDuration=!0}return t}function cW(e=ui.visualDuration,t=ui.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:f,duration:h,velocity:g,isResolvedFromDuration:m}=Uue({...n,velocity:-qu(n.velocity||0)}),b=g||0,y=c/(2*Math.sqrt(l*f)),x=o-a,w=qu(Math.sqrt(l/f)),_=Math.abs(x)<5;r||(r=_?ui.restSpeed.granular:ui.restSpeed.default),i||(i=_?ui.restDelta.granular:ui.restDelta.default);let k;if(y<1){const C=n3(w,y);k=j=>{const L=Math.exp(-y*w*j);return o-L*((b+y*w*x)/C*Math.sin(C*j)+x*Math.cos(C*j))}}else if(y===1)k=C=>o-Math.exp(-w*C)*(x+(b+w*x)*C);else{const C=w*Math.sqrt(y*y-1);k=j=>{const L=Math.exp(-y*w*j),R=Math.min(C*j,300);return o-L*((b+y*w*x)*Math.sinh(R)+C*x*Math.cosh(R))/C}}const P={calculatedDuration:m&&h||null,next:C=>{const j=k(C);if(m)s.done=C>=h;else{let L=0;y<1&&(L=C===0?$u(b):lW(k,C,j));const R=Math.abs(L)<=r,D=Math.abs(o-j)<=i;s.done=R&&D}return s.value=s.done?o:j,s},toString:()=>{const C=Math.min(AV(P),Gj),j=PV(L=>P.next(C*L).value,C,30);return C+"ms "+j}};return P}function OL({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:c=.5,restSpeed:f}){const h=e[0],g={done:!1,value:h},m=R=>s!==void 0&&R<s||l!==void 0&&R>l,b=R=>s===void 0?l:l===void 0||Math.abs(s-R)<Math.abs(l-R)?s:l;let y=n*t;const x=h+y,w=o===void 0?x:o(x);w!==x&&(y=w-h);const _=R=>-y*Math.exp(-R/r),k=R=>w+_(R),P=R=>{const D=_(R),H=k(R);g.done=Math.abs(D)<=c,g.value=g.done?w:H};let C,j;const L=R=>{m(g.value)&&(C=R,j=cW({keyframes:[g.value,b(g.value)],velocity:lW(k,R,g.value),damping:i,stiffness:a,restDelta:c,restSpeed:f}))};return L(0),{calculatedDuration:null,next:R=>{let D=!1;return!j&&C===void 0&&(D=!0,P(R),L(R)),C!==void 0&&R>=C?j.next(R-C):(!D&&P(R),g)}}}const zue=f1(.42,0,1,1),Vue=f1(0,0,.58,1),uW=f1(.42,0,.58,1),Wue=e=>Array.isArray(e)&&typeof e[0]!="number",Hue={linear:ls,easeIn:zue,easeInOut:uW,easeOut:Vue,circIn:pO,circInOut:VV,circOut:zV,backIn:hO,backInOut:qV,backOut:$V,anticipate:UV},TL=e=>{if(lO(e)){oV(e.length===4);const[t,n,r,i]=e;return f1(t,n,r,i)}else if(typeof e=="string")return Hue[e];return e};function Yue(e,t,n){const r=[],i=n||sW,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||ls:t;s=d1(l,s)}r.push(s)}return r}function Gue(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(oV(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Yue(t,r,i),l=s.length,c=f=>{if(o&&f<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(f<e[h+1]);h++);const g=yg(e[h],e[h+1],f);return s[h](g)};return n?f=>c(Yu(e[0],e[a-1],f)):c}function Kue(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=yg(0,t,r);e.push(Jr(n,1,i))}}function Xue(e){const t=[0];return Kue(t,e.length-1),t}function Que(e,t){return e.map(n=>n*t)}function Jue(e,t){return e.map(()=>t||uW).splice(0,e.length-1)}function Xb({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Wue(r)?r.map(TL):TL(r),a={done:!1,value:t[0]},o=Que(n&&n.length===t.length?n:Xue(t),e),s=Gue(o,t,{ease:Array.isArray(i)?i:Jue(t,i)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}const Zue=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Or.update(t,!0),stop:()=>kd(t),now:()=>ga.isProcessing?ga.timestamp:_c.now()}},efe={decay:OL,inertia:OL,tween:Xb,keyframes:Xb,spring:cW},tfe=e=>e/100;class bO extends aW{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||vO,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=sO(n)?n:efe[n]||Xb;let l,c;s!==Xb&&typeof t[0]!="number"&&(l=d1(tfe,sW(t[0],t[1])),t=[0,100]);const f=s({...this.options,keyframes:t});a==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=AV(f));const{calculatedDuration:h}=f,g=h+i,m=g*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:g,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:h}=r;if(this.startTime===null)return a.next(0);const{delay:g,repeat:m,repeatType:b,repeatDelay:y,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const w=this.currentTime-g*(this.speed>=0?1:-1),_=this.speed>=0?w<0:w>f;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let k=this.currentTime,P=a;if(m){const R=Math.min(this.currentTime,f)/h;let D=Math.floor(R),H=R%1;!H&&R>=1&&(H=1),H===1&&D--,D=Math.min(D,m+1),!!(D%2)&&(b==="reverse"?(H=1-H,y&&(H-=y/h)):b==="mirror"&&(P=o)),k=Yu(0,1,H)*h}const C=_?{done:!1,value:l[0]}:P.next(k);s&&(C.value=s(C.value));let{done:j}=C;!_&&c!==null&&(j=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return L&&i!==void 0&&(C.value=D2(l,this.options,i)),x&&x(C.value),L&&this.finish(),C}get duration(){const{resolved:t}=this;return t?qu(t.calculatedDuration):0}get time(){return qu(this.currentTime)}set time(t){t=$u(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=qu(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Zue,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const nfe=new Set(["opacity","clipPath","filter","transform"]);function rfe(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const f=CV(s,i);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}const ife=HE(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Qb=10,afe=2e4;function ofe(e){return sO(e.type)||e.type==="spring"||!jV(e.ease)}function sfe(e,t){const n=new bO({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<afe;)r=n.sample(a),i.push(r.value),a+=Qb;return{times:void 0,keyframes:i,duration:a-Qb,ease:"linear"}}const fW={anticipate:UV,backInOut:qV,circInOut:VV};function lfe(e){return e in fW}class ML extends aW{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new iW(a,(o,s)=>this.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:a,type:o,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof a=="string"&&Gb()&&lfe(a)&&(a=fW[a]),ofe(this.options)){const{onComplete:h,onUpdate:g,motionValue:m,element:b,...y}=this.options,x=sfe(t,y);t=x.keyframes,t.length===1&&(t[1]=t[0]),r=x.duration,i=x.times,a=x.ease,o="keyframes"}const f=rfe(s.owner.current,l,t,{...this.options,duration:r,times:i,ease:a});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(yL(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:h}=this.options;s.set(D2(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return qu(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return qu(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=$u(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ls;const{animation:r}=n;yL(r,t)}return ls}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:h,element:g,...m}=this.options,b=new bO({...m,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),y=$u(this.time);c.setWithVelocity(b.sample(y-Qb).value,b.sample(y).value,Qb)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return ife()&&r&&nfe.has(r)&&!l&&!c&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const cfe={type:"spring",stiffness:500,damping:25,restSpeed:10},ufe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ffe={type:"keyframes",duration:.8},dfe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hfe=(e,{keyframes:t})=>t.length>2?ffe:Ap.has(e)?e.startsWith("scale")?ufe(t[1]):cfe:dfe;function pfe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const wO=(e,t,n,r={},i,a)=>o=>{const s=oO(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-$u(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:g=>{t.set(g),s.onUpdate&&s.onUpdate(g)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};pfe(s)||(f={...f,...hfe(e,f)}),f.duration&&(f.duration=$u(f.duration)),f.repeatDelay&&(f.repeatDelay=$u(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!a&&t.get()!==void 0){const g=D2(f.keyframes,s);if(g!==void 0)return Or.update(()=>{f.onUpdate(g),f.onComplete()}),new Lce([])}return!a&&ML.supports(f)?new ML(f):new bO(f)};function mfe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function dW(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(o=r);const c=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in l){const g=e.getValue(h,(a=e.latestValues[h])!==null&&a!==void 0?a:null),m=l[h];if(m===void 0||f&&mfe(f,h))continue;const b={delay:n,...oO(o||{},h)};let y=!1;if(window.MotionHandoffAnimation){const w=IV(e);if(w){const _=window.MotionHandoffAnimation(w,h,Or);_!==null&&(b.startTime=_,y=!0)}}Xj(e,h),g.start(wO(h,g,m,e.shouldReduceMotion&&LV.has(h)?{type:!1}:b,e,y));const x=g.animation;x&&c.push(x)}return s&&Promise.all(c).then(()=>{Or.update(()=>{s&&Yce(e,s)})}),c}function r3(e,t,n={}){var r;const i=I2(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(dW(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:g}=a;return gfe(e,t,f+c,h,g,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[c,f]=l==="beforeChildren"?[o,s]:[s,o];return c().then(()=>f())}else return Promise.all([o(),s(n.delay)])}function gfe(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(yfe).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(r3(c,t,{...a,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function yfe(e,t){return e.sortNodePosition(t)}function vfe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>r3(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=r3(e,t,n);else{const i=typeof t=="function"?I2(e,t,n.custom):t;r=Promise.all(dW(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const xfe=GE.length;function hW(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hW(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<xfe;n++){const r=GE[n],i=e.props[r];(Zv(i)||i===!1)&&(t[r]=i)}return t}const bfe=[...YE].reverse(),wfe=YE.length;function Sfe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>vfe(e,n,r)))}function _fe(e){let t=Sfe(e),n=LL(),r=!0;const i=l=>(c,f)=>{var h;const g=I2(e,f,l==="exit"?(h=e.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(g){const{transition:m,transitionEnd:b,...y}=g;c={...c,...y,...b}}return c};function a(l){t=l(e)}function o(l){const{props:c}=e,f=hW(e.parent)||{},h=[],g=new Set;let m={},b=1/0;for(let x=0;x<wfe;x++){const w=bfe[x],_=n[w],k=c[w]!==void 0?c[w]:f[w],P=Zv(k),C=w===l?_.isActive:null;C===!1&&(b=x);let j=k===f[w]&&k!==c[w]&&P;if(j&&r&&e.manuallyAnimateOnMount&&(j=!1),_.protectedKeys={...m},!_.isActive&&C===null||!k&&!_.prevProp||L2(k)||typeof k=="boolean")continue;const L=Nfe(_.prevProp,k);let R=L||w===l&&_.isActive&&!j&&P||x>b&&P,D=!1;const H=Array.isArray(k)?k:[k];let M=H.reduce(i(w),{});C===!1&&(M={});const{prevResolvedValues:F={}}=_,W={...F,...M},V=Z=>{R=!0,g.has(Z)&&(D=!0,g.delete(Z)),_.needsAnimating[Z]=!0;const K=e.getValue(Z);K&&(K.liveStyle=!1)};for(const Z in W){const K=M[Z],se=F[Z];if(m.hasOwnProperty(Z))continue;let z=!1;Yj(K)&&Yj(se)?z=!kV(K,se):z=K!==se,z?K!=null?V(Z):g.add(Z):K!==void 0&&g.has(Z)?V(Z):_.protectedKeys[Z]=!0}_.prevProp=k,_.prevResolvedValues=M,_.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(j&&L)||D)&&h.push(...H.map(Z=>({animation:Z,options:{type:w}})))}if(g.size){const x={};g.forEach(w=>{const _=e.getBaseTarget(w),k=e.getValue(w);k&&(k.liveStyle=!0),x[w]=_??null}),h.push({animation:x})}let y=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(h):Promise.resolve()}function s(l,c){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(g=>{var m;return(m=g.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const h=o(l);for(const g in n)n[g].protectedKeys={};return h}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=LL(),r=!0}}}function Nfe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kV(t,e):!1}function xh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function LL(){return{animate:xh(!0),whileInView:xh(),whileHover:xh(),whileTap:xh(),whileDrag:xh(),whileFocus:xh(),exit:xh()}}class Ld{constructor(t){this.isMounted=!1,this.node=t}update(){}}class kfe extends Ld{constructor(t){super(t),t.animationState||(t.animationState=_fe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();L2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Afe=0;class Pfe extends Ld{constructor(){super(...arguments),this.id=Afe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const jfe={animation:{Feature:kfe},exit:{Feature:Pfe}};function r0(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function h1(e){return{point:{x:e.pageX,y:e.pageY}}}const Cfe=e=>t=>cO(t)&&e(t,h1(t));function Tv(e,t,n,r){return r0(e,t,Cfe(n),r)}const RL=(e,t)=>Math.abs(e-t);function Efe(e,t){const n=RL(e.x,t.x),r=RL(e.y,t.y);return Math.sqrt(n**2+r**2)}class pW{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=a_(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,m=Efe(h.offset,{x:0,y:0})>=3;if(!g&&!m)return;const{point:b}=h,{timestamp:y}=ga;this.history.push({...b,timestamp:y});const{onStart:x,onMove:w}=this.handlers;g||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,g)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=i_(g,this.transformPagePoint),Or.update(this.updatePoint,!0)},this.handlePointerUp=(h,g)=>{this.end();const{onEnd:m,onSessionEnd:b,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=a_(h.type==="pointercancel"?this.lastMoveEventInfo:i_(g,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,x),b&&b(h,x)},!cO(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=h1(t),s=i_(o,this.transformPagePoint),{point:l}=s,{timestamp:c}=ga;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,a_(s,this.history)),this.removeListeners=d1(Tv(this.contextWindow,"pointermove",this.handlePointerMove),Tv(this.contextWindow,"pointerup",this.handlePointerUp),Tv(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kd(this.updatePoint)}}function i_(e,t){return t?{point:t(e.point)}:e}function IL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a_({point:e},t){return{point:e,delta:IL(e,mW(t)),offset:IL(e,Ofe(t)),velocity:Tfe(t,.1)}}function Ofe(e){return e[0]}function mW(e){return e[e.length-1]}function Tfe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=mW(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>$u(t)));)n--;if(!r)return{x:0,y:0};const a=qu(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const gW=1e-4,Mfe=1-gW,Lfe=1+gW,yW=.01,Rfe=0-yW,Ife=0+yW;function fs(e){return e.max-e.min}function Dfe(e,t,n){return Math.abs(e-t)<=n}function DL(e,t,n,r=.5){e.origin=r,e.originPoint=Jr(t.min,t.max,e.origin),e.scale=fs(n)/fs(t),e.translate=Jr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Mfe&&e.scale<=Lfe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rfe&&e.translate<=Ife||isNaN(e.translate))&&(e.translate=0)}function Mv(e,t,n,r){DL(e.x,t.x,n.x,r?r.originX:void 0),DL(e.y,t.y,n.y,r?r.originY:void 0)}function FL(e,t,n){e.min=n.min+t.min,e.max=e.min+fs(t)}function Ffe(e,t,n){FL(e.x,t.x,n.x),FL(e.y,t.y,n.y)}function BL(e,t,n){e.min=t.min-n.min,e.max=e.min+fs(t)}function Lv(e,t,n){BL(e.x,t.x,n.x),BL(e.y,t.y,n.y)}function Bfe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Jr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Jr(n,e,r.max):Math.min(e,n)),e}function $L(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function $fe(e,{top:t,left:n,bottom:r,right:i}){return{x:$L(e.x,n,i),y:$L(e.y,t,r)}}function qL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function qfe(e,t){return{x:qL(e.x,t.x),y:qL(e.y,t.y)}}function Ufe(e,t){let n=.5;const r=fs(e),i=fs(t);return i>r?n=yg(t.min,t.max-r,e.min):r>i&&(n=yg(e.min,e.max-i,t.min)),Yu(0,1,n)}function zfe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const i3=.35;function Vfe(e=i3){return e===!1?e=0:e===!0&&(e=i3),{x:UL(e,"left","right"),y:UL(e,"top","bottom")}}function UL(e,t,n){return{min:zL(e,t),max:zL(e,n)}}function zL(e,t){return typeof e=="number"?e:e[t]||0}const VL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Om=()=>({x:VL(),y:VL()}),WL=()=>({min:0,max:0}),yi=()=>({x:WL(),y:WL()});function Ds(e){return[e("x"),e("y")]}function vW({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Wfe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Hfe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function o_(e){return e===void 0||e===1}function a3({scale:e,scaleX:t,scaleY:n}){return!o_(e)||!o_(t)||!o_(n)}function Nh(e){return a3(e)||xW(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xW(e){return HL(e.x)||HL(e.y)}function HL(e){return e&&e!=="0%"}function Jb(e,t,n){const r=e-n,i=t*r;return n+i}function YL(e,t,n,r,i){return i!==void 0&&(e=Jb(e,i,r)),Jb(e,n,r)+t}function o3(e,t=0,n=1,r,i){e.min=YL(e.min,t,n,r,i),e.max=YL(e.max,t,n,r,i)}function bW(e,{x:t,y:n}){o3(e.x,t.translate,t.scale,t.originPoint),o3(e.y,n.translate,n.scale,n.originPoint)}const GL=.999999999999,KL=1.0000000000001;function Yfe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Mm(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,bW(e,o)),r&&Nh(a.latestValues)&&Mm(e,a.latestValues))}t.x<KL&&t.x>GL&&(t.x=1),t.y<KL&&t.y>GL&&(t.y=1)}function Tm(e,t){e.min=e.min+t,e.max=e.max+t}function XL(e,t,n,r,i=.5){const a=Jr(e.min,e.max,i);o3(e,t,n,a,r)}function Mm(e,t){XL(e.x,t.x,t.scaleX,t.scale,t.originX),XL(e.y,t.y,t.scaleY,t.scale,t.originY)}function wW(e,t){return vW(Hfe(e.getBoundingClientRect(),t))}function Gfe(e,t,n){const r=wW(e,n),{scroll:i}=t;return i&&(Tm(r.x,i.offset.x),Tm(r.y,i.offset.y)),r}const SW=({current:e})=>e?e.ownerDocument.defaultView:null,Kfe=new WeakMap;class Xfe{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yi(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(h1(f).point)},a=(f,h)=>{const{drag:g,dragPropagation:m,onDragStart:b}=this.getProps();if(g&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Uce(g),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ds(x=>{let w=this.getAxisMotionValue(x).get()||0;if(Sc.test(w)){const{projection:_}=this.visualElement;if(_&&_.layout){const k=_.layout.layoutBox[x];k&&(w=fs(k)*(parseFloat(w)/100))}}this.originPoint[x]=w}),b&&Or.postRender(()=>b(f,h)),Xj(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(f,h)=>{const{dragPropagation:g,dragDirectionLock:m,onDirectionLock:b,onDrag:y}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:x}=h;if(m&&this.currentDirection===null){this.currentDirection=Qfe(x),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),y&&y(f,h)},s=(f,h)=>this.stop(f,h),l=()=>Ds(f=>{var h;return this.getAnimationState(f)==="paused"&&((h=this.getAxisMotionValue(f).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new pW(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:SW(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Or.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Nx(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Bfe(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&Cm(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=$fe(i.layoutBox,n):this.constraints=!1,this.elastic=Vfe(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ds(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=zfe(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Cm(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Gfe(r,i.root,this.visualElement.getTransformPagePoint());let o=qfe(i.layout.layoutBox,a);if(n){const s=n(Wfe(o));this.hasMutatedConstraints=!!s,s&&(o=vW(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Ds(f=>{if(!Nx(f,n,this.currentDirection))return;let h=l&&l[f]||{};o&&(h={min:0,max:0});const g=i?200:1e6,m=i?40:1e7,b={type:"inertia",velocity:r?t[f]:0,bounceStiffness:g,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(f,b)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Xj(this.visualElement,t),r.start(wO(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ds(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ds(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ds(n=>{const{drag:r}=this.getProps();if(!Nx(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-Jr(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Cm(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ds(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const l=s.get();i[o]=Ufe({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ds(o=>{if(!Nx(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];s.set(Jr(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;Kfe.set(this.visualElement,this);const t=this.visualElement.current,n=Tv(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Cm(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Or.read(r);const o=r0(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ds(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=l[f].translate,h.set(h.get()+l[f].translate))}),this.visualElement.render())}));return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=i3,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Nx(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Qfe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Jfe extends Ld{constructor(t){super(t),this.removeGroupControls=ls,this.removeListeners=ls,this.controls=new Xfe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ls}unmount(){this.removeGroupControls(),this.removeListeners()}}const QL=e=>(t,n)=>{e&&Or.postRender(()=>e(t,n))};class Zfe extends Ld{constructor(){super(...arguments),this.removePointerDownListener=ls}onPointerDown(t){this.session=new pW(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:SW(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:QL(t),onStart:QL(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Or.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Tv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const wb={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function JL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ky={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ht.test(e))e=parseFloat(e);else return e;const n=JL(e,t.target.x),r=JL(e,t.target.y);return`${n}% ${r}%`}},ede={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ad.parse(e);if(i.length>5)return r;const a=Ad.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const c=Jr(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),a(i)}};class tde extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;Sce(nde),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),wb.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Or.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),XE.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _W(e){const[t,n]=iV(),r=E.useContext(UE);return d.jsx(tde,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(dV),isPresent:t,safeToRemove:n})}const nde={borderRadius:{...Ky,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ky,borderTopRightRadius:Ky,borderBottomLeftRadius:Ky,borderBottomRightRadius:Ky,boxShadow:ede};function rde(e,t,n){const r=qa(e)?e:t0(e);return r.start(wO("",r,t,n)),r.animation}function ide(e){return e instanceof SVGElement&&e.tagName!=="svg"}const ade=(e,t)=>e.depth-t.depth;class ode{constructor(){this.children=[],this.isDirty=!1}add(t){uO(this.children,t),this.isDirty=!0}remove(t){fO(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ade),this.isDirty=!1,this.children.forEach(t)}}function sde(e,t){const n=_c.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(kd(r),e(a-t))};return Or.read(r,!0),()=>kd(r)}const NW=["TopLeft","TopRight","BottomLeft","BottomRight"],lde=NW.length,ZL=e=>typeof e=="string"?parseFloat(e):e,eR=e=>typeof e=="number"||Ht.test(e);function cde(e,t,n,r,i,a){i?(e.opacity=Jr(0,n.opacity!==void 0?n.opacity:1,ude(r)),e.opacityExit=Jr(t.opacity!==void 0?t.opacity:1,0,fde(r))):a&&(e.opacity=Jr(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<lde;o++){const s=`border${NW[o]}Radius`;let l=tR(t,s),c=tR(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||eR(l)===eR(c)?(e[s]=Math.max(Jr(ZL(l),ZL(c),r),0),(Sc.test(c)||Sc.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=Jr(t.rotate||0,n.rotate||0,r))}function tR(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ude=kW(0,.5,zV),fde=kW(.5,.95,ls);function kW(e,t,n){return r=>r<e?0:r>t?1:n(yg(e,t,r))}function nR(e,t){e.min=t.min,e.max=t.max}function Ms(e,t){nR(e.x,t.x),nR(e.y,t.y)}function rR(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function iR(e,t,n,r,i){return e-=t,e=Jb(e,1/n,r),i!==void 0&&(e=Jb(e,1/i,r)),e}function dde(e,t=0,n=1,r=.5,i,a=e,o=e){if(Sc.test(t)&&(t=parseFloat(t),t=Jr(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=Jr(a.min,a.max,r);e===a&&(s-=t),e.min=iR(e.min,t,n,s,i),e.max=iR(e.max,t,n,s,i)}function aR(e,t,[n,r,i],a,o){dde(e,t[n],t[r],t[i],t.scale,a,o)}const hde=["x","scaleX","originX"],pde=["y","scaleY","originY"];function oR(e,t,n,r){aR(e.x,t,hde,n?n.x:void 0,r?r.x:void 0),aR(e.y,t,pde,n?n.y:void 0,r?r.y:void 0)}function sR(e){return e.translate===0&&e.scale===1}function AW(e){return sR(e.x)&&sR(e.y)}function lR(e,t){return e.min===t.min&&e.max===t.max}function mde(e,t){return lR(e.x,t.x)&&lR(e.y,t.y)}function cR(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function PW(e,t){return cR(e.x,t.x)&&cR(e.y,t.y)}function uR(e){return fs(e.x)/fs(e.y)}function fR(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gde{constructor(){this.members=[]}add(t){uO(this.members,t),t.scheduleRender()}remove(t){if(fO(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function yde(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:h,rotateY:g,skewX:m,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),h&&(r+=`rotateX(${h}deg) `),g&&(r+=`rotateY(${g}deg) `),m&&(r+=`skewX(${m}deg) `),b&&(r+=`skewY(${b}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const kh={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Nv=typeof window<"u"&&window.MotionDebug!==void 0,s_=["","X","Y","Z"],vde={visibility:"hidden"},dR=1e3;let xde=0;function l_(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jW(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=IV(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Or,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jW(r)}function CW({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=xde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Nv&&(kh.totalNodes=kh.resolvedTargetDeltas=kh.recalculatedProjection=0),this.nodes.forEach(Sde),this.nodes.forEach(Pde),this.nodes.forEach(jde),this.nodes.forEach(_de),Nv&&window.MotionDebug.record(kh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ode)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new dO),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ide(o),this.instance=o;const{layoutId:l,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let h;const g=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=sde(g,250),wb.hasAnimatedSinceResize&&(wb.hasAnimatedSinceResize=!1,this.nodes.forEach(pR))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:g,hasRelativeTargetChanged:m,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||f.getDefaultTransition()||Mde,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=f.getProps(),_=!this.targetLayout||!PW(this.targetLayout,b)||m,k=!g&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||k||g&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,k);const P={...oO(y,"layout"),onPlay:x,onComplete:w};(f.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else g||pR(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,kd(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Cde),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jW(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const h=this.path[f];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(hR);return}this.isUpdating||this.nodes.forEach(kde),this.isUpdating=!1,this.nodes.forEach(Ade),this.nodes.forEach(bde),this.nodes.forEach(wde),this.clearAllSnapshots();const s=_c.now();ga.delta=Yu(0,1e3/60,s-ga.timestamp),ga.timestamp=s,ga.isProcessing=!0,JS.update.process(ga),JS.preRender.process(ga),JS.render.process(ga),ga.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,XE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Nde),this.sharedNodes.forEach(Ede)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Or.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Or.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!AW(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;o&&(s||Nh(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),Lde(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return yi();const l=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(Rde))){const{scroll:f}=this.root;f&&(Tm(l.x,f.offset.x),Tm(l.y,f.offset.y))}return l}removeElementScroll(o){var s;const l=yi();if(Ms(l,o),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:h,options:g}=f;f!==this.root&&h&&g.layoutScroll&&(h.wasRoot&&Ms(l,o),Tm(l.x,h.offset.x),Tm(l.y,h.offset.y))}return l}applyTransform(o,s=!1){const l=yi();Ms(l,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];!s&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Mm(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),Nh(f.latestValues)&&Mm(l,f.latestValues)}return Nh(this.latestValues)&&Mm(l,this.latestValues),l}removeTransform(o){const s=yi();Ms(s,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Nh(c.latestValues))continue;a3(c.latestValues)&&c.updateSnapshot();const f=yi(),h=c.measurePageBox();Ms(f,h),oR(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return Nh(this.latestValues)&&oR(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ga.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:g}=this.options;if(!(!this.layout||!(h||g))){if(this.resolvedRelativeTargetAt=ga.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yi(),this.relativeTargetOrigin=yi(),Lv(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),Ms(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=yi(),this.targetWithTransforms=yi()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ffe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ms(this.target,this.layout.layoutBox),bW(this.target,this.targetDelta)):Ms(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yi(),this.relativeTargetOrigin=yi(),Lv(this.relativeTargetOrigin,this.target,m.target),Ms(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Nv&&kh.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||a3(this.parent.latestValues)||xW(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ga.timestamp&&(c=!1),c)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;Ms(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,m=this.treeScale.y;Yfe(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=yi());const{target:b}=s;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rR(this.prevProjectionDelta.x,this.projectionDelta.x),rR(this.prevProjectionDelta.y,this.projectionDelta.y)),Mv(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==m||!fR(this.projectionDelta.x,this.prevProjectionDelta.x)||!fR(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b)),Nv&&kh.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Om(),this.projectionDelta=Om(),this.projectionDeltaWithTransform=Om()}setAnimationOrigin(o,s=!1){const l=this.snapshot,c=l?l.latestValues:{},f={...this.latestValues},h=Om();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const g=yi(),m=l?l.source:void 0,b=this.layout?this.layout.source:void 0,y=m!==b,x=this.getStack(),w=!x||x.members.length<=1,_=!!(y&&!w&&this.options.crossfade===!0&&!this.path.some(Tde));this.animationProgress=0;let k;this.mixTargetDelta=P=>{const C=P/1e3;mR(h.x,o.x,C),mR(h.y,o.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lv(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ode(this.relativeTarget,this.relativeTargetOrigin,g,C),k&&mde(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=yi()),Ms(k,this.relativeTarget)),y&&(this.animationValues=f,cde(f,c,this.latestValues,C,_,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(kd(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Or.update(()=>{wb.hasAnimatedSinceResize=!0,this.currentAnimation=rde(0,dR,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:f}=o;if(!(!s||!l||!c)){if(this!==o&&this.layout&&c&&EW(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yi();const h=fs(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const g=fs(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+g}Ms(s,l),Mm(s,f),Mv(this.projectionDeltaWithTransform,this.layoutCorrected,s,f)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new gde),this.sharedNodes.get(o).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&l_("z",o,c,this.animationValues);for(let f=0;f<s_.length;f++)l_(`rotate${s_[f]}`,o,c,this.animationValues),l_(`skew${s_[f]}`,o,c,this.animationValues);o.render();for(const f in c)o.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);o.scheduleRender()}getProjectionStyles(o){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return vde;const c={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=xb(o==null?void 0:o.pointerEvents)||"",c.transform=f?f(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=xb(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Nh(this.latestValues)&&(y.transform=f?f({},""):"none",this.hasProjected=!1),y}const g=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=yde(this.projectionDeltaWithTransform,this.treeScale,g),f&&(c.transform=f(g,c.transform));const{x:m,y:b}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${b.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(s=g.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:c.opacity=h===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const y in Yb){if(g[y]===void 0)continue;const{correct:x,applyTo:w}=Yb[y],_=c.transform==="none"?g[y]:x(g[y],h);if(w){const k=w.length;for(let P=0;P<k;P++)c[w[P]]=_}else c[y]=_}return this.options.layoutId&&(c.pointerEvents=h===this?xb(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(hR),this.root.sharedNodes.clear()}}}function bde(e){e.updateLayout()}function wde(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?Ds(h=>{const g=o?n.measuredBox[h]:n.layoutBox[h],m=fs(g);g.min=r[h].min,g.max=g.min+m}):EW(a,n.layoutBox,r)&&Ds(h=>{const g=o?n.measuredBox[h]:n.layoutBox[h],m=fs(r[h]);g.max=g.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const s=Om();Mv(s,r,n.layoutBox);const l=Om();o?Mv(l,e.applyTransform(i,!0),n.measuredBox):Mv(l,r,n.layoutBox);const c=!AW(s);let f=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:g,layout:m}=h;if(g&&m){const b=yi();Lv(b,n.layoutBox,g.layoutBox);const y=yi();Lv(y,r,m.layoutBox),PW(b,y)||(f=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Sde(e){Nv&&kh.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _de(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Nde(e){e.clearSnapshot()}function hR(e){e.clearMeasurements()}function kde(e){e.isLayoutDirty=!1}function Ade(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pR(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Pde(e){e.resolveTargetDelta()}function jde(e){e.calcProjection()}function Cde(e){e.resetSkewAndRotation()}function Ede(e){e.removeLeadSnapshot()}function mR(e,t,n){e.translate=Jr(t.translate,0,n),e.scale=Jr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gR(e,t,n,r){e.min=Jr(t.min,n.min,r),e.max=Jr(t.max,n.max,r)}function Ode(e,t,n,r){gR(e.x,t.x,n.x,r),gR(e.y,t.y,n.y,r)}function Tde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Mde={duration:.45,ease:[.4,0,.1,1]},yR=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),vR=yR("applewebkit/")&&!yR("chrome/")?Math.round:ls;function xR(e){e.min=vR(e.min),e.max=vR(e.max)}function Lde(e){xR(e.x),xR(e.y)}function EW(e,t,n){return e==="position"||e==="preserve-aspect"&&!Dfe(uR(t),uR(n),.2)}function Rde(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Ide=CW({attachResizeListener:(e,t)=>r0(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),c_={current:void 0},OW=CW({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!c_.current){const e=new Ide({});e.mount(window),e.setOptions({layoutScroll:!0}),c_.current=e}return c_.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Dde={pan:{Feature:Zfe},drag:{Feature:Jfe,ProjectionNode:OW,MeasureLayout:_W}};function bR(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&Or.postRender(()=>a(t,h1(t)))}class Fde extends Ld{mount(){const{current:t}=this.node;t&&(this.unmount=Dce(t,n=>(bR(this.node,n,"Start"),r=>bR(this.node,r,"End"))))}unmount(){}}class Bde extends Ld{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=d1(r0(this.node.current,"focus",()=>this.onFocus()),r0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wR(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&Or.postRender(()=>a(t,h1(t)))}class $de extends Ld{mount(){const{current:t}=this.node;t&&(this.unmount=qce(t,n=>(wR(this.node,n,"Start"),(r,{success:i})=>wR(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const s3=new WeakMap,u_=new WeakMap,qde=e=>{const t=s3.get(e.target);t&&t(e)},Ude=e=>{e.forEach(qde)};function zde({root:e,...t}){const n=e||document;u_.has(n)||u_.set(n,{});const r=u_.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ude,{root:e,...t})),r[i]}function Vde(e,t,n){const r=zde(t);return s3.set(e,n),r.observe(e),()=>{s3.delete(e),r.unobserve(e)}}const Wde={some:0,all:1};class Hde extends Ld{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Wde[i]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),g=c?f:h;g&&g(l)};return Vde(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Yde(t,n))&&this.startObserver()}unmount(){}}function Yde({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Gde={inView:{Feature:Hde},tap:{Feature:$de},focus:{Feature:Bde},hover:{Feature:Fde}},Kde={layout:{ProjectionNode:OW,MeasureLayout:_W}},l3={current:null},TW={current:!1};function Xde(){if(TW.current=!0,!!WE)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l3.current=e.matches;e.addListener(t),t()}else l3.current=!1}const Qde=[...rW,Ia,Ad],Jde=e=>Qde.find(nW(e)),SR=new WeakMap;function Zde(e,t,n){for(const r in t){const i=t[r],a=n[r];if(qa(i))e.addValue(r,i);else if(qa(a))e.addValue(r,t0(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,t0(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const _R=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ehe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vO,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=_c.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Or.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=R2(n),this.isVariantNode=uV(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in g){const b=g[m];l[m]!==void 0&&qa(b)&&b.set(l[m],!1)}}mount(t){this.current=t,SR.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),TW.current||Xde(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:l3.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){SR.delete(this.current),this.projection&&this.projection.unmount(),kd(this.notifyUpdate),kd(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ap.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Or.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vg){const n=vg[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<_R.length;r++){const i=_R[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Zde(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=t0(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(eW(i)||WV(i))?i=parseFloat(i):!Jde(i)&&Ad.test(n)&&(i=QV(t,n)),this.setBaseTarget(t,qa(i)?i.get():i)),qa(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=JE(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!qa(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new dO),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class MW extends ehe{constructor(){super(...arguments),this.KeyframeResolver=iW}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qa(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function the(e){return window.getComputedStyle(e)}class nhe extends MW{constructor(){super(...arguments),this.type="html",this.renderInstance=xV}readValueFromInstance(t,n){if(Ap.has(n)){const r=yO(n);return r&&r.default||0}else{const r=the(t),i=(gV(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wW(t,n)}build(t,n,r){tO(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return aO(t,n,r)}}class rhe extends MW{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yi}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ap.has(n)){const r=yO(n);return r&&r.default||0}return n=bV.has(n)?n:KE(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return _V(t,n,r)}build(t,n,r){nO(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){wV(t,n,r,i)}mount(t){this.isSVGTag=iO(t.tagName),super.mount(t)}}const ihe=(e,t)=>QE(e)?new rhe(t):new nhe(t,{allowProjection:e!==E.Fragment}),ahe=Oce({...jfe,...Gde,...Dde,...Kde},ihe),He=Hle(ahe),ohe={some:0,all:1};function she(e,t,{root:n,margin:r,amount:i="some"}={}){const a=OV(e),o=new WeakMap,s=c=>{c.forEach(f=>{const h=o.get(f.target);if(f.isIntersecting!==!!h)if(f.isIntersecting){const g=t(f);typeof g=="function"?o.set(f.target,g):l.unobserve(f.target)}else typeof h=="function"&&(h(f),o.delete(f.target))})},l=new IntersectionObserver(s,{root:n,rootMargin:r,threshold:typeof i=="number"?i:ohe[i]});return a.forEach(c=>l.observe(c)),()=>l.disconnect()}function p1(e,{root:t,margin:n,amount:r,once:i=!1}={}){const[a,o]=E.useState(!1);return E.useEffect(()=>{if(!e.current||i&&a)return;const s=()=>(o(!0),i?void 0:()=>o(!1)),l={root:t&&t.current||void 0,margin:n,amount:r};return she(e.current,s,l)},[t,e,n,i,r]),a}function lhe(){const[e,t]=E.useState(!1),[n,r]=E.useState(!1),{navigateToLogin:i}=Lle();E.useEffect(()=>{const o=()=>t(window.scrollY>10);return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[]);const a=[{label:"Features",href:"#features"},{label:"How It Works",href:"#how-it-works"},{label:"Pricing",href:"#pricing"}];return d.jsxs(He.nav,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6,ease:[.22,1,.36,1]},className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${e?"bg-background/80 backdrop-blur-2xl border-b border-white/[0.06]":""}`,children:[d.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[d.jsxs(va,{to:"/",className:"flex items-center gap-2 group",children:[d.jsx(Ki,{className:"w-5 h-5 text-primary"}),d.jsxs("span",{className:"text-sm font-semibold tracking-tight text-foreground",children:["Shield",d.jsx("span",{className:"text-primary",children:"Sync"})]})]}),d.jsx("div",{className:"hidden md:flex items-center gap-8",children:a.map(o=>d.jsx("a",{href:o.href,className:"text-sm text-muted-foreground hover:text-foreground transition-colors duration-200",children:o.label},o.label))}),d.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[d.jsx("button",{onClick:()=>i("/dashboard"),className:"text-sm text-muted-foreground hover:text-foreground transition-colors duration-200",children:"Sign in"}),d.jsx("button",{onClick:()=>i("/dashboard"),className:"bg-foreground text-background text-sm font-medium px-4 py-2 rounded-full hover:bg-foreground/90 transition-all duration-200",children:"Get started"})]}),d.jsx("button",{className:"md:hidden text-foreground",onClick:()=>r(!n),children:n?d.jsx(Lc,{className:"w-5 h-5"}):d.jsx(rne,{className:"w-5 h-5"})})]}),d.jsx(us,{children:n&&d.jsx(He.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden bg-background/95 backdrop-blur-2xl border-b border-white/[0.06] overflow-hidden",children:d.jsxs("div",{className:"px-6 py-5 space-y-4",children:[a.map(o=>d.jsx("a",{href:o.href,onClick:()=>r(!1),className:"block text-sm text-muted-foreground hover:text-foreground transition-colors",children:o.label},o.label)),d.jsx("button",{onClick:()=>{i("/dashboard"),r(!1)},className:"w-full mt-2 bg-foreground text-background text-sm font-medium py-2.5 rounded-full",children:"Get started"})]})})})]})}function che({size:e=96}){const t=E.useMemo(()=>Array.from({length:36}).map(()=>({x:(Math.random()-.5)*500,y:(Math.random()-.5)*500,delay:Math.random()*3,duration:2.2+Math.random()*1.8,s:2+Math.random()*2.5})),[]),n=E.useMemo(()=>Array.from({length:14}).map((r,i)=>{const a=i/14*Math.PI*2+Math.random()*.5,o=e*.55+Math.random()*e*.25;return{path:Array.from({length:6}).map((s,l)=>{const c=a+l/6*Math.PI*2,f=o+(Math.random()-.5)*20;return{x:Math.cos(c)*f,y:Math.sin(c)*f}}),duration:6+Math.random()*4,delay:2.8+Math.random()*1.5,s:1.5+Math.random()*1.5}}),[e]);return d.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:e,height:e},children:[t.map((r,i)=>d.jsx(He.span,{initial:{x:r.x,y:r.y,opacity:0,scale:.6},animate:{x:0,y:0,opacity:[0,1,0],scale:[.6,1,.3]},transition:{delay:r.delay,duration:r.duration,ease:[.22,1,.36,1],repeat:1/0,repeatDelay:.5+Math.random()*1.5},className:"absolute rounded-full bg-primary",style:{width:r.s,height:r.s,boxShadow:"0 0 8px hsl(var(--primary))"}},`s-${i}`)),n.map((r,i)=>d.jsx(He.span,{initial:{x:r.path[0].x,y:r.path[0].y,opacity:0},animate:{x:[...r.path.map(a=>a.x),r.path[0].x],y:[...r.path.map(a=>a.y),r.path[0].y],opacity:[0,.9,.6,.9,.6,.9,0]},transition:{delay:r.delay,duration:r.duration,repeat:1/0,ease:"linear"},className:"absolute rounded-full bg-primary",style:{width:r.s,height:r.s,boxShadow:"0 0 6px hsl(var(--primary))"}},`a-${i}`)),d.jsx(He.div,{initial:{opacity:0,scale:.4,rotate:-10},animate:{opacity:1,scale:1,rotate:0},transition:{delay:2.4,duration:.9,ease:[.22,1,.36,1]},className:"relative",children:d.jsx(Ki,{className:"text-primary",style:{width:e*.72,height:e*.72},strokeWidth:2.2})})]})}function uhe(){return d.jsx("section",{className:"relative min-h-screen flex flex-col items-center justify-center overflow-hidden pt-16 bg-black",children:d.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-6 text-center",children:[d.jsxs("div",{className:"flex items-center justify-start gap-6 md:gap-10 mb-6 flex-wrap -ml-4 md:-ml-16",children:[d.jsx(che,{size:160}),d.jsxs("h1",{className:"font-display text-6xl md:text-8xl font-bold tracking-tight text-foreground leading-[1.0] mb-0 text-left",style:{letterSpacing:"-0.04em"},children:[d.jsx(He.span,{className:"block overflow-hidden",children:["Your","website,"].map((e,t)=>d.jsx(He.span,{initial:{y:"110%",opacity:0},animate:{y:"0%",opacity:1},transition:{delay:.1+t*.08,duration:.8,ease:[.22,1,.36,1]},className:"inline-block mr-[0.25em]",children:e},t))}),d.jsx(He.span,{className:"block overflow-hidden text-primary",children:["always","protected."].map((e,t)=>d.jsx(He.span,{initial:{y:"110%",opacity:0},animate:{y:"0%",opacity:1},transition:{delay:.3+t*.08,duration:.8,ease:[.22,1,.36,1]},className:"inline-block mr-[0.25em]",children:e},t))})]})]}),d.jsx(He.p,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.2,duration:.7},className:"text-lg md:text-xl text-muted-foreground max-w-xl mx-auto mb-6 leading-relaxed font-light",children:"Enterprise-grade security scanning, real-time attack blocking, and instant alerts — automatic from the moment you connect."}),d.jsxs(He.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.3,duration:.6},className:"flex flex-col sm:flex-row items-center justify-center gap-3",children:[d.jsx(va,{to:"/dashboard",children:d.jsxs("button",{className:"flex items-center gap-2 bg-foreground text-background text-sm font-semibold px-6 py-3 rounded-full hover:bg-foreground/90 transition-all duration-200 group",children:["Start free",d.jsx(zg,{className:"w-3.5 h-3.5 group-hover:translate-x-0.5 transition-transform"})]})}),d.jsx("a",{href:"#features",children:d.jsx("button",{className:"text-sm font-medium px-6 py-3 rounded-full bg-white/[0.05] border border-white/[0.1] text-foreground hover:bg-white/[0.08] transition-all duration-200",children:"See what we catch"})})]})]})})}const f_=[{type:"SQL Injection",ip:"185.220.101.42",country:"RU",severity:"critical",status:"blocked",iconName:"AlertTriangle",color:"#ef4444"},{type:"XSS Attack",ip:"103.152.220.15",country:"CN",severity:"high",status:"blocked",iconName:"Zap",color:"#f59e0b"},{type:"Brute Force",ip:"45.33.32.156",country:"BR",severity:"high",status:"blocked",iconName:"Lock",color:"#f59e0b"},{type:"DDoS Surge",ip:"91.219.236.174",country:"UA",severity:"critical",status:"mitigated",iconName:"Activity",color:"#ef4444"},{type:"Path Traversal",ip:"178.128.87.34",country:"NL",severity:"medium",status:"blocked",iconName:"AlertTriangle",color:"#8b5cf6"},{type:"Port Scan",ip:"64.225.97.113",country:"US",severity:"low",status:"logged",iconName:"Globe",color:"#6b7280"}],fhe={AlertTriangle:so,Zap:_2,Lock:Vg,Globe:jc,Activity:ite},dhe={critical:"text-red-400",high:"text-amber-400",medium:"text-violet-400",low:"text-gray-400"},hhe={blocked:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",mitigated:"bg-blue-500/15 text-blue-400 border-blue-500/20",logged:"bg-white/5 text-gray-400 border-white/10"},NR=94,phe=Array.from({length:10},(e,t)=>t),mhe=[{label:"SSL Valid",ok:!0},{label:"Headers",ok:!0},{label:"Ports",ok:!1}];function ghe(){const[e,t]=E.useState(f_.slice(0,3)),[n,r]=E.useState(1847),i=E.useRef(3);return E.useEffect(()=>{const a=setInterval(()=>{const o=f_[i.current%f_.length];i.current+=1,t(s=>[o,...s].slice(0,5)),r(s=>s+Math.floor(Math.random()*3+1))},2200);return()=>clearInterval(a)},[]),d.jsx("div",{className:"max-w-4xl mx-auto",children:d.jsxs("div",{className:"bg-white/[0.03] border border-white/[0.08] rounded-3xl overflow-hidden backdrop-blur-xl shadow-2xl shadow-black/40",children:[d.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-white/[0.06]",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-[#ff5f57]"}),d.jsx("div",{className:"w-3 h-3 rounded-full bg-[#febc2e]"}),d.jsx("div",{className:"w-3 h-3 rounded-full bg-[#28c840]"}),d.jsx("div",{className:"ml-4 flex-1 bg-white/[0.05] rounded-lg px-3 py-1 text-xs text-gray-500 text-left",children:"shieldsync.io/dashboard"})]}),d.jsxs("div",{className:"p-6 grid grid-cols-1 md:grid-cols-3 gap-5",children:[d.jsxs("div",{className:"md:col-span-1 bg-white/[0.03] border border-white/[0.06] rounded-2xl p-5 flex flex-col gap-4",children:[d.jsx("div",{className:"text-xs text-gray-500 font-medium",children:"Security Score"}),d.jsxs("div",{className:"flex items-end gap-1",children:[d.jsx("span",{className:"text-5xl font-bold text-white",children:NR}),d.jsx("span",{className:"text-lg text-gray-500 mb-1",children:"/100"})]}),d.jsx("div",{className:"flex gap-1",children:phe.map(a=>d.jsx("div",{className:"h-1.5 flex-1 rounded-full",style:{backgroundColor:a<Math.floor(NR/10)?"hsl(var(--accent))":"hsl(var(--border))"}},a))}),d.jsx("div",{className:"flex flex-col gap-2 pt-1",children:mhe.map(a=>d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs text-gray-500",children:a.label}),d.jsxs("div",{className:`text-xs font-medium flex items-center gap-1 ${a.ok?"text-emerald-400":"text-amber-400"}`,children:[d.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${a.ok?"bg-emerald-400":"bg-amber-400"}`}),a.ok?"Pass":"Review"]})]},a.label))}),d.jsxs("div",{className:"mt-auto pt-3 border-t border-white/[0.05]",children:[d.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Attacks blocked"}),d.jsx("div",{className:"text-2xl font-bold text-white",children:n.toLocaleString()})]})]}),d.jsxs("div",{className:"md:col-span-2 flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{className:"text-xs text-gray-500 font-medium",children:"Live Threat Feed"}),d.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-emerald-400",children:[d.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),"Monitoring"]})]}),d.jsx("div",{className:"flex flex-col gap-2 min-h-[280px]",children:e.map((a,o)=>{const s=fhe[a.iconName];return d.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-white/[0.03] border border-white/[0.06] rounded-xl",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[s&&d.jsx(s,{className:"w-3.5 h-3.5 flex-shrink-0",style:{color:a.color}}),d.jsxs("div",{children:[d.jsx("div",{className:`text-xs font-semibold ${dhe[a.severity]}`,children:a.type}),d.jsxs("div",{className:"text-[10px] text-gray-500 mt-0.5",children:[a.ip," · ",a.country]})]})]}),d.jsx("span",{className:`text-[10px] font-semibold px-2.5 py-1 rounded-full border ${hhe[a.status]}`,children:a.status})]},`${a.type}-${o}`)})})]})]})]})})}function yhe(){return d.jsx("section",{className:"relative py-32 md:py-44 px-6",children:d.jsxs("div",{className:"max-w-6xl mx-auto",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-14",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"04 — The shortcut"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs("div",{className:"grid md:grid-cols-2 gap-16 md:gap-20 items-center",children:[d.jsxs(He.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"order-2 md:order-1",children:[d.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-semibold tracking-tight leading-[1.15] mb-6",style:{letterSpacing:"-0.03em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Skip "}),d.jsx("span",{className:"text-foreground",children:"$50k+ and six months "}),d.jsx("span",{className:"text-foreground/60",children:"of SOC2 prep."})]}),d.jsx("p",{className:"text-base md:text-lg text-muted-foreground font-light leading-relaxed max-w-md",children:"We generate audit evidence automatically and give you real-time security monitoring from day one."})]}),d.jsx(He.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.9,ease:[.22,1,.36,1]},className:"order-1 md:order-2",children:d.jsx(ghe,{})})]})]})})}function vhe(){return d.jsx("section",{className:"relative py-32 md:py-44 overflow-hidden border-y border-white/[0.05]",children:d.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-8",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"01 — The question"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-5xl md:text-7xl font-semibold tracking-tight text-foreground/60 leading-[1.05] max-w-4xl",style:{letterSpacing:"-0.04em"},children:["If someone tried to exploit your site right now,"," ",d.jsx("span",{className:"text-foreground",children:"would you even know?"})]}),d.jsx(He.p,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2,duration:.6},className:"mt-10 text-base md:text-lg text-muted-foreground font-light max-w-xl",children:"Most teams don't. By the time they do, it's already a breach, a lawsuit, or a headline."})]})})}const Xy=[{label:"SSL certificate",result:"pass",detail:"TLS 1.3 · expires 2027-03"},{label:"Security headers",result:"pass",detail:"HSTS, CSP, X-Frame-Options"},{label:"Exposed files",result:"fail",detail:".env detected at root path"},{label:"Open ports",result:"warn",detail:"Port 3306 (MySQL) is public"},{label:"SQL injection",result:"pass",detail:"No vectors found"},{label:"XSS vectors",result:"pass",detail:"All inputs sanitized"},{label:"Directory listing",result:"fail",detail:"/uploads/ is publicly listed"},{label:"Rate limiting",result:"pass",detail:"Enabled on all endpoints"}],xhe={pass:d.jsx(ss,{className:"w-3.5 h-3.5 text-emerald-400"}),fail:d.jsx(xE,{className:"w-3.5 h-3.5 text-red-400"}),warn:d.jsx(vte,{className:"w-3.5 h-3.5 text-amber-400"}),pending:d.jsx(Xte,{className:"w-3.5 h-3.5 text-muted-foreground animate-spin"})},bhe={pass:"text-emerald-400",fail:"text-red-400",warn:"text-amber-400",pending:"text-muted-foreground"};function whe(){const e=E.useRef(null),t=p1(e,{once:!0,margin:"-80px"}),[n,r]=E.useState(0),[i,a]=E.useState(!1);E.useEffect(()=>{if(!t)return;a(!0),r(0);let s=0;const l=setInterval(()=>{s++,r(s),s>=Xy.length&&(clearInterval(l),a(!1))},400);return()=>clearInterval(l)},[t]);const o=n===Xy.length?Math.round(Xy.filter(s=>s.result==="pass").length/Xy.length*100):null;return d.jsxs("div",{ref:e,className:"bg-white/[0.03] border border-white/[0.08] rounded-3xl overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/[0.06]",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-accent animate-pulse"}),d.jsx("span",{className:"text-sm font-medium text-foreground",children:"Security Scan · acmecorp.com"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[i&&d.jsx(He.div,{animate:{opacity:[.5,1,.5]},transition:{duration:1.2,repeat:1/0},className:"text-xs text-muted-foreground",children:"Scanning…"}),o!==null&&d.jsxs(He.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:`text-sm font-bold ${o>=80?"text-accent":o>=60?"text-amber-400":"text-red-400"}`,children:["Score: ",o,"/100"]})]})]}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-px bg-white/[0.05] p-px m-4 rounded-2xl overflow-hidden",children:Xy.map((s,l)=>{const c=l<n?s.result:"pending",f=l<=n;return d.jsxs(He.div,{initial:{opacity:0},animate:{opacity:f?1:.3},transition:{duration:.3},className:"flex items-center justify-between px-4 py-3 bg-background",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(us,{mode:"wait",children:d.jsx(He.span,{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.5,opacity:0},transition:{duration:.2},children:xhe[c]},c)}),d.jsx("span",{className:"text-xs text-foreground font-medium",children:s.label})]}),l<n&&d.jsx(He.span,{initial:{opacity:0,x:6},animate:{opacity:1,x:0},className:`text-[10px] ${bhe[s.result]}`,children:s.detail})]},s.label)})})]})}function She(){return d.jsx("section",{className:"relative py-32 md:py-44 overflow-hidden",children:d.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-6",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"02 — The answer"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between gap-10 mb-14",children:[d.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] max-w-3xl",style:{letterSpacing:"-0.03em"},children:[d.jsx("span",{className:"text-foreground/60",children:"See every attack on your site — "}),d.jsx("span",{className:"text-foreground",children:"in real time."})]}),d.jsxs(He.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.15,duration:.6},className:"flex flex-col items-start md:items-end gap-5 md:min-w-[260px]",children:[d.jsx("p",{className:"text-sm md:text-base text-muted-foreground font-light leading-relaxed max-w-xs md:text-right",children:"Most websites are attacked every day. You just don't see it — until now."}),d.jsx(va,{to:"/dashboard",children:d.jsxs("button",{className:"inline-flex items-center gap-2 bg-foreground text-background text-sm font-semibold px-6 py-3 rounded-full hover:bg-foreground/90 transition-all duration-200 group",children:["Run a scan",d.jsx(zg,{className:"w-3.5 h-3.5 group-hover:translate-x-0.5 transition-transform"})]})})]})]}),d.jsx(He.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},children:d.jsx(whe,{})})]})})}function _he(){return d.jsx("section",{className:"relative py-32 md:py-44 overflow-hidden",children:d.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-6",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"03 — Active defense"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between gap-10 mb-16",children:[d.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] max-w-3xl",style:{letterSpacing:"-0.03em"},children:[d.jsx("span",{className:"text-foreground/60",children:"We don't just watch attackers — "}),d.jsx("span",{className:"text-foreground",children:"we block their IP."})]}),d.jsx(He.p,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.15,duration:.6},className:"text-sm md:text-base text-muted-foreground font-light leading-relaxed max-w-sm md:text-right",children:"Detection alone doesn't stop attacks. ShieldSync cuts attackers off at the edge — before they ever reach your origin."})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[d.jsxs(He.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"relative bg-card border border-border/50 rounded-2xl p-8 overflow-hidden",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[d.jsx(n1,{className:"w-4 h-4 text-muted-foreground"}),d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.15em] text-muted-foreground",children:"Other tools"})]}),d.jsx("h3",{className:"font-display text-2xl font-semibold text-foreground/70 mb-3",style:{letterSpacing:"-0.02em"},children:"Watch & alert"}),d.jsx("p",{className:"text-sm text-muted-foreground font-light leading-relaxed mb-6",children:"You get notified after the attack happens. The attacker keeps hammering your server."}),d.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono text-destructive/80",children:[d.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-destructive animate-pulse"}),"REQUESTS STILL REACHING YOUR SERVER"]})]}),d.jsxs(He.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.1},className:"relative bg-gradient-to-br from-primary/[0.08] via-card to-card border border-primary/30 rounded-2xl p-8 overflow-hidden animate-pulse-glow",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[d.jsx(Fb,{className:"w-4 h-4 text-primary"}),d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.15em] text-primary",children:"ShieldSync"})]}),d.jsx("h3",{className:"font-display text-2xl font-semibold text-foreground mb-3",style:{letterSpacing:"-0.02em"},children:"Detect & block"}),d.jsx("p",{className:"text-sm text-muted-foreground font-light leading-relaxed mb-6",children:"Malicious IPs, bots, and scanners get cut off automatically — your server stops serving them entirely."}),d.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono text-accent",children:[d.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent animate-pulse"}),"ATTACKER BLOCKED AT THE EDGE"]})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-5",children:[{icon:Lu,title:"Auto IP blocking",desc:"Attackers hitting known exploit patterns are blacklisted instantly."},{icon:_2,title:"Edge-level rejection",desc:"Blocked traffic never touches your origin — zero load, zero risk."},{icon:Fb,title:"Manual override",desc:"Block or whitelist any IP from your dashboard in one click."}].map((e,t)=>d.jsxs(He.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1*t},className:"bg-card/50 border border-border/40 rounded-xl p-5",children:[d.jsx(e.icon,{className:"w-4 h-4 text-primary mb-3"}),d.jsx("p",{className:"text-sm font-semibold text-foreground mb-1.5",children:e.title}),d.jsx("p",{className:"text-xs text-muted-foreground font-light leading-relaxed",children:e.desc})]},e.title))})]})})}const Nhe=[{label:"Every attack",desc:"SQLi, XSS, RCE, brute-force — logged with payload and source IP."},{label:"Every request",desc:"Full request-level visibility across your entire surface area."},{label:"Every vulnerability",desc:"Exposed files, weak headers, open ports — surfaced automatically."}];function khe(){return d.jsx("section",{className:"relative py-32 md:py-44 overflow-hidden border-y border-white/[0.05]",children:d.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"03 — The reality"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-5xl md:text-7xl font-semibold tracking-tight leading-[1.05] max-w-4xl",style:{letterSpacing:"-0.04em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Your site is being "}),d.jsx("span",{className:"text-foreground",children:"attacked right now."}),d.jsx("span",{className:"text-foreground/60",children:" You just don't have visibility."})]}),d.jsx(He.p,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.15,duration:.6},className:"mt-10 text-base md:text-lg text-muted-foreground font-light max-w-xl leading-relaxed",children:"We surface every attack, every request, and every vulnerability — instantly, with zero configuration."}),d.jsx("div",{className:"mt-20 grid md:grid-cols-3 gap-x-10 gap-y-10 border-t border-white/[0.06] pt-14",children:Nhe.map((e,t)=>d.jsxs(He.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1+t*.08,duration:.6},children:[d.jsxs("div",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-3",children:["0",t+1]}),d.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:e.label}),d.jsx("p",{className:"text-sm text-muted-foreground font-light leading-relaxed",children:e.desc})]},e.label))})]})})}const Ahe=["Google, Bing, and social crawlers see your full content","Open Graph previews render correctly on LinkedIn, X, Facebook","Zero code changes — enable it from the dashboard","Cached and served in milliseconds on repeat visits","Fully isolated per site — caches never mix between customers"];function Phe(){return d.jsx("section",{className:"relative py-32 md:py-44 overflow-hidden border-y border-white/[0.05]",children:d.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-6",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"05 — Discoverability"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"}),d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-[0.18em] text-accent",children:"New"})]}),d.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] max-w-4xl",style:{letterSpacing:"-0.04em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Your app looks beautiful — "}),d.jsx("span",{className:"text-foreground",children:"but Google sees a blank page."})]}),d.jsx(He.p,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.15,duration:.6},className:"mt-10 text-base md:text-lg text-muted-foreground font-light max-w-xl leading-relaxed",children:"React and Vite apps load content via JavaScript. Crawlers often don't wait. Your pages end up indexed with no title, no description, no content — or don't rank at all."}),d.jsxs("div",{className:"mt-24 grid md:grid-cols-12 gap-12 md:gap-16 border-t border-white/[0.06] pt-16",children:[d.jsxs(He.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"md:col-span-5",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-5",children:"Introducing"}),d.jsxs("h3",{className:"font-display text-3xl md:text-4xl font-semibold tracking-tight leading-[1.1] mb-6",style:{letterSpacing:"-0.03em"},children:[d.jsx("span",{className:"text-foreground",children:"SEO Pre-Rendering."})," ",d.jsx("span",{className:"text-foreground/60",children:"Google-ready in one click."})]}),d.jsx("p",{className:"text-sm md:text-base text-muted-foreground font-light leading-relaxed max-w-md",children:"When a search engine crawls your site, we serve it a fully-rendered version — title, meta tags, and full content. Real visitors still get your fast, interactive React app. Bots get the HTML they need to rank you."})]}),d.jsxs(He.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1,duration:.7},className:"md:col-span-7 md:border-l md:border-white/[0.08] md:pl-12",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-6",children:"What you get"}),d.jsx("ul",{className:"divide-y divide-white/[0.06] border-y border-white/[0.06]",children:Ahe.map((e,t)=>d.jsxs(He.li,{initial:{opacity:0,x:-6},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:.15+t*.06,duration:.5},className:"flex items-baseline gap-5 py-4",children:[d.jsxs("span",{className:"text-xs font-mono text-muted-foreground flex-shrink-0",children:["0",t+1]}),d.jsx("span",{className:"text-sm md:text-base text-foreground font-light leading-relaxed",children:e})]},e))})]})]})]})})}const jhe=[{title:"Real-time attack detection",desc:"SQL injection, XSS, RCE, brute force — blocked at the edge."},{title:"Full security scan",desc:"Headers, SSL, ports, exposed files — on demand or scheduled."},{title:"Instant alerts",desc:"Dashboard, email, Telegram, SMS — the moment it happens."},{title:"SOC2-ready audit logs",desc:"Tamper-proof, hash-chained evidence on demand."},{title:"Incident reports",desc:"Full attack detail: payload, source IP, affected endpoint."}];function Che(){return d.jsx("section",{className:"relative py-32 md:py-44 overflow-hidden",children:d.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"06 — What you get"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] mb-20 max-w-3xl",style:{letterSpacing:"-0.04em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Everything you need to "}),d.jsx("span",{className:"text-foreground",children:"defend your site."})]}),d.jsx("div",{className:"divide-y divide-white/[0.06] border-t border-white/[0.06]",children:jhe.map((e,t)=>d.jsxs(He.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t*.05,duration:.5},className:"grid grid-cols-12 gap-6 py-7",children:[d.jsxs("div",{className:"col-span-1 text-xs font-mono text-muted-foreground pt-1",children:["0",t+1]}),d.jsx("h3",{className:"col-span-11 md:col-span-5 text-lg font-semibold text-foreground",children:e.title}),d.jsx("p",{className:"col-span-12 md:col-span-6 text-sm text-muted-foreground font-light leading-relaxed",children:e.desc})]},e.title))})]})})}const Ehe=["Every attack logged with payload and source","Tamper-proof, hash-chained records","Audit-ready evidence on demand"];function Ohe(){return d.jsx("section",{className:"relative py-32 md:py-44 overflow-hidden border-y border-white/[0.05]",children:d.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-6",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-14",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"07 — Compliance"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs("div",{className:"grid md:grid-cols-2 gap-16 md:gap-20 items-center",children:[d.jsxs("div",{children:[d.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-5xl font-semibold tracking-tight leading-[1.05] mb-6",style:{letterSpacing:"-0.03em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Walk into your SOC2 audit with "}),d.jsx("span",{className:"text-foreground",children:"evidence already done."})]}),d.jsx(He.p,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1,duration:.6},className:"text-base md:text-lg text-muted-foreground font-light leading-relaxed max-w-md",children:"Every attack, every log, fully tracked and ready to hand to your auditor."})]}),d.jsxs(He.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.15,duration:.7},className:"border-l border-white/[0.08] pl-8",children:[d.jsxs("div",{className:"flex items-center justify-between mb-6",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground",children:"Evidence package"}),d.jsxs("span",{className:"text-[10px] font-mono text-accent flex items-center gap-1.5",children:[d.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent animate-pulse"}),"Live"]})]}),d.jsx("ul",{className:"space-y-5",children:Ehe.map((e,t)=>d.jsxs(He.li,{initial:{opacity:0,x:-8},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:.25+t*.08,duration:.5},className:"flex items-baseline gap-4",children:[d.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:["0",t+1]}),d.jsx("span",{className:"text-base text-foreground font-light",children:e})]},e))})]})]})]})})}const The=[{title:"Real-time attack detection",body:"Every request analyzed in under 50ms. SQL injection, XSS, brute force, and DDoS caught the instant they arrive."},{title:"Vulnerability scanning",body:"Full scan across exposed files, missing headers, open ports, SSL issues, and injection vectors."},{title:"Instant alerts",body:"Dashboard, Telegram, and SMS notifications the moment a threat is detected — no lag."},{title:"SSL & certificate monitoring",body:"TLS version, cipher strength, and expiry tracked continuously. Alerted before anything lapses."},{title:"Open port detection",body:"Finds exposed databases, Redis, RDP, and other services that should never be public-facing."},{title:"SOC2 compliance package",body:"Controls auto-mapped to your data. Tamper-proof hash-chained logs. One-click evidence packages."}];function Mhe({item:e,index:t}){const n=E.useRef(null),r=p1(n,{once:!0,margin:"-50px"});return d.jsxs(He.div,{ref:n,initial:{opacity:0,y:16},animate:r?{opacity:1,y:0}:{},transition:{delay:t*.05,duration:.6,ease:[.22,1,.36,1]},className:"py-8 border-t border-white/[0.06]",children:[d.jsxs("div",{className:"flex items-baseline gap-4 mb-3",children:[d.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:String(t+1).padStart(2,"0")}),d.jsx("h3",{className:"text-lg font-semibold text-foreground",children:e.title})]}),d.jsx("p",{className:"text-sm text-muted-foreground font-light leading-relaxed pl-10 max-w-xl",children:e.body})]})}function Lhe(){const e=E.useRef(null),t=p1(e,{once:!0,margin:"-80px"});return d.jsx("section",{id:"features",className:"py-32 md:py-44 px-6",children:d.jsxs("div",{className:"max-w-5xl mx-auto",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"08 — Full spectrum"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs(He.h2,{ref:e,initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] mb-20 max-w-3xl",style:{letterSpacing:"-0.04em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Built for "}),d.jsx("span",{className:"text-foreground",children:"every threat vector."})]}),d.jsxs("div",{children:[The.map((n,r)=>d.jsx(Mhe,{item:n,index:r},n.title)),d.jsx("div",{className:"border-t border-white/[0.06]"})]})]})})}const Rhe=[{num:"01",title:"Create your account",body:"Sign up in under a minute. No credit card required."},{num:"02",title:"Add your website",body:"Enter a URL — we immediately run a full vulnerability scan."},{num:"03",title:"One DNS record",body:"A single CNAME routes live traffic through our inspection layer."},{num:"04",title:"Automatic from here",body:"Scanning, blocking, alerting — all running continuously."}];function Ihe(){const e=E.useRef(null),t=p1(e,{once:!0,margin:"-80px"});return d.jsx("section",{id:"how-it-works",className:"py-32 md:py-44 px-6 border-t border-white/[0.05]",children:d.jsxs("div",{className:"max-w-5xl mx-auto",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"09 — Setup"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs(He.h2,{ref:e,initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] mb-20 max-w-3xl",style:{letterSpacing:"-0.04em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Up in "}),d.jsx("span",{className:"text-foreground",children:"five minutes."})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-16 gap-y-10 border-t border-white/[0.06] pt-14",children:Rhe.map((n,r)=>d.jsxs(He.div,{initial:{opacity:0,y:16},animate:t?{opacity:1,y:0}:{},transition:{delay:.1+r*.08,duration:.6,ease:[.22,1,.36,1]},className:"flex items-baseline gap-5",children:[d.jsx("span",{className:"text-xs font-mono text-muted-foreground flex-shrink-0 pt-1",children:n.num}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold text-foreground mb-1.5",children:n.title}),d.jsx("p",{className:"text-sm text-muted-foreground font-light leading-relaxed",children:n.body})]})]},n.num))})]})})}const qr=E.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:Un("flex h-9 w-full rounded-md border border-input bg-secondary text-foreground px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));qr.displayName="Input";function kR(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qg(...e){return t=>{let n=!1;const r=e.map(i=>{const a=kR(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():kR(e[i],null)}}}}function Ar(...e){return E.useCallback(Qg(...e),e)}var Dhe=Symbol.for("react.lazy"),Zb=y2[" use ".trim().toString()];function Fhe(e){return typeof e=="object"&&e!==null&&"then"in e}function LW(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Dhe&&"_payload"in e&&Fhe(e._payload)}function SO(e){const t=$he(e),n=E.forwardRef((r,i)=>{let{children:a,...o}=r;LW(a)&&typeof Zb=="function"&&(a=Zb(a._payload));const s=E.Children.toArray(a),l=s.find(Uhe);if(l){const c=l.props.children,f=s.map(h=>h===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:h);return d.jsx(t,{...o,ref:i,children:E.isValidElement(c)?E.cloneElement(c,void 0,f):null})}return d.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Bhe=SO("Slot");function $he(e){const t=E.forwardRef((n,r)=>{let{children:i,...a}=n;if(LW(i)&&typeof Zb=="function"&&(i=Zb(i._payload)),E.isValidElement(i)){const o=Vhe(i),s=zhe(a,i.props);return i.type!==E.Fragment&&(s.ref=r?Qg(r,o):o),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qhe=Symbol("radix.slottable");function Uhe(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qhe}function zhe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Vhe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Whe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Hhe=Whe.reduce((e,t)=>{const n=SO(`Primitive.${t}`),r=E.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Yhe="Label",RW=E.forwardRef((e,t)=>d.jsx(Hhe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));RW.displayName=Yhe;var IW=RW;const Ghe=v2("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yr=E.forwardRef(({className:e,...t},n)=>d.jsx(IW,{ref:n,className:Un(Ghe(),e),...t}));yr.displayName=IW.displayName;const F2=E.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:Un("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));F2.displayName="Textarea";const Khe=v2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-secondary text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ot=E.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Bhe:"button";return d.jsx(o,{className:Un(Khe({variant:t,size:n,className:e})),ref:a,...i})});Ot.displayName="Button";function AR(e,[t,n]){return Math.min(n,Math.max(t,e))}function Nn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Xhe(e,t){const n=E.createContext(t),r=a=>{const{children:o,...s}=a,l=E.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=E.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Rd(e,t=[]){let n=[];function r(a,o){const s=E.createContext(o),l=n.length;n=[...n,o];const c=h=>{var w;const{scope:g,children:m,...b}=h,y=((w=g==null?void 0:g[e])==null?void 0:w[l])||s,x=E.useMemo(()=>b,Object.values(b));return d.jsx(y.Provider,{value:x,children:m})};c.displayName=a+"Provider";function f(h,g){var y;const m=((y=g==null?void 0:g[e])==null?void 0:y[l])||s,b=E.useContext(m);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,f]}const i=()=>{const a=n.map(o=>E.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Qhe(i,...t)]}function Qhe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const h=l(a)[`__scope${c}`];return{...s,...h}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function PR(e){const t=Jhe(e),n=E.forwardRef((r,i)=>{const{children:a,...o}=r,s=E.Children.toArray(a),l=s.find(epe);if(l){const c=l.props.children,f=s.map(h=>h===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:h);return d.jsx(t,{...o,ref:i,children:E.isValidElement(c)?E.cloneElement(c,void 0,f):null})}return d.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function Jhe(e){const t=E.forwardRef((n,r)=>{const{children:i,...a}=n;if(E.isValidElement(i)){const o=npe(i),s=tpe(a,i.props);return i.type!==E.Fragment&&(s.ref=r?Qg(r,o):o),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zhe=Symbol("radix.slottable");function epe(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zhe}function tpe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function npe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function DW(e){const t=e+"CollectionProvider",[n,r]=Rd(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:x,children:w}=y,_=_e.useRef(null),k=_e.useRef(new Map).current;return d.jsx(i,{scope:x,itemMap:k,collectionRef:_,children:w})};o.displayName=t;const s=e+"CollectionSlot",l=PR(s),c=_e.forwardRef((y,x)=>{const{scope:w,children:_}=y,k=a(s,w),P=Ar(x,k.collectionRef);return d.jsx(l,{ref:P,children:_})});c.displayName=s;const f=e+"CollectionItemSlot",h="data-radix-collection-item",g=PR(f),m=_e.forwardRef((y,x)=>{const{scope:w,children:_,...k}=y,P=_e.useRef(null),C=Ar(x,P),j=a(f,w);return _e.useEffect(()=>(j.itemMap.set(P,{ref:P,...k}),()=>void j.itemMap.delete(P))),d.jsx(g,{[h]:"",ref:C,children:_})});m.displayName=f;function b(y){const x=a(e+"CollectionConsumer",y);return _e.useCallback(()=>{const _=x.collectionRef.current;if(!_)return[];const k=Array.from(_.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((j,L)=>k.indexOf(j.ref.current)-k.indexOf(L.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:m},b,r]}var rpe=E.createContext(void 0);function _O(e){const t=E.useContext(rpe);return e||t||"ltr"}function ipe(e){const t=ape(e),n=E.forwardRef((r,i)=>{const{children:a,...o}=r,s=E.Children.toArray(a),l=s.find(spe);if(l){const c=l.props.children,f=s.map(h=>h===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:h);return d.jsx(t,{...o,ref:i,children:E.isValidElement(c)?E.cloneElement(c,void 0,f):null})}return d.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function ape(e){const t=E.forwardRef((n,r)=>{const{children:i,...a}=n;if(E.isValidElement(i)){const o=cpe(i),s=lpe(a,i.props);return i.type!==E.Fragment&&(s.ref=r?Qg(r,o):o),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ope=Symbol("radix.slottable");function spe(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ope}function lpe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function cpe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var upe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],An=upe.reduce((e,t)=>{const n=ipe(`Primitive.${t}`),r=E.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function fpe(e,t){e&&r1.flushSync(()=>e.dispatchEvent(t))}function Pd(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function dpe(e,t=globalThis==null?void 0:globalThis.document){const n=Pd(e);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hpe="DismissableLayer",c3="dismissableLayer.update",ppe="dismissableLayer.pointerDownOutside",mpe="dismissableLayer.focusOutside",jR,FW=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),NO=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=E.useContext(FW),[f,h]=E.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=E.useState({}),b=Ar(t,L=>h(L)),y=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(x),_=f?y.indexOf(f):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,P=_>=w,C=vpe(L=>{const R=L.target,D=[...c.branches].some(H=>H.contains(R));!P||D||(i==null||i(L),o==null||o(L),L.defaultPrevented||s==null||s())},g),j=xpe(L=>{const R=L.target;[...c.branches].some(H=>H.contains(R))||(a==null||a(L),o==null||o(L),L.defaultPrevented||s==null||s())},g);return dpe(L=>{_===c.layers.size-1&&(r==null||r(L),!L.defaultPrevented&&s&&(L.preventDefault(),s()))},g),E.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(jR=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),CR(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=jR)}},[f,g,n,c]),E.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),CR())},[f,c]),E.useEffect(()=>{const L=()=>m({});return document.addEventListener(c3,L),()=>document.removeEventListener(c3,L)},[]),d.jsx(An.div,{...l,ref:b,style:{pointerEvents:k?P?"auto":"none":void 0,...e.style},onFocusCapture:Nn(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Nn(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Nn(e.onPointerDownCapture,C.onPointerDownCapture)})});NO.displayName=hpe;var gpe="DismissableLayerBranch",ype=E.forwardRef((e,t)=>{const n=E.useContext(FW),r=E.useRef(null),i=Ar(t,r);return E.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(An.div,{...e,ref:i})});ype.displayName=gpe;function vpe(e,t=globalThis==null?void 0:globalThis.document){const n=Pd(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){BW(ppe,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xpe(e,t=globalThis==null?void 0:globalThis.document){const n=Pd(e),r=E.useRef(!1);return E.useEffect(()=>{const i=a=>{a.target&&!r.current&&BW(mpe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function CR(){const e=new CustomEvent(c3);document.dispatchEvent(e)}function BW(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?fpe(i,a):i.dispatchEvent(a)}var d_=0;function $W(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ER()),document.body.insertAdjacentElement("beforeend",e[1]??ER()),d_++,()=>{d_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),d_--}},[])}function ER(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var h_="focusScope.autoFocusOnMount",p_="focusScope.autoFocusOnUnmount",OR={bubbles:!1,cancelable:!0},bpe="FocusScope",kO=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=E.useState(null),c=Pd(i),f=Pd(a),h=E.useRef(null),g=Ar(t,y=>l(y)),m=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let y=function(k){if(m.paused||!s)return;const P=k.target;s.contains(P)?h.current=P:Qf(h.current,{select:!0})},x=function(k){if(m.paused||!s)return;const P=k.relatedTarget;P!==null&&(s.contains(P)||Qf(h.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&Qf(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",x);const _=new MutationObserver(w);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),_.disconnect()}}},[r,s,m.paused]),E.useEffect(()=>{if(s){MR.add(m);const y=document.activeElement;if(!s.contains(y)){const w=new CustomEvent(h_,OR);s.addEventListener(h_,c),s.dispatchEvent(w),w.defaultPrevented||(wpe(Ape(qW(s)),{select:!0}),document.activeElement===y&&Qf(s))}return()=>{s.removeEventListener(h_,c),setTimeout(()=>{const w=new CustomEvent(p_,OR);s.addEventListener(p_,f),s.dispatchEvent(w),w.defaultPrevented||Qf(y??document.body,{select:!0}),s.removeEventListener(p_,f),MR.remove(m)},0)}}},[s,c,f,m]);const b=E.useCallback(y=>{if(!n&&!r||m.paused)return;const x=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,w=document.activeElement;if(x&&w){const _=y.currentTarget,[k,P]=Spe(_);k&&P?!y.shiftKey&&w===P?(y.preventDefault(),n&&Qf(k,{select:!0})):y.shiftKey&&w===k&&(y.preventDefault(),n&&Qf(P,{select:!0})):w===_&&y.preventDefault()}},[n,r,m.paused]);return d.jsx(An.div,{tabIndex:-1,...o,ref:g,onKeyDown:b})});kO.displayName=bpe;function wpe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Qf(r,{select:t}),document.activeElement!==n)return}function Spe(e){const t=qW(e),n=TR(t,e),r=TR(t.reverse(),e);return[n,r]}function qW(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function TR(e,t){for(const n of e)if(!_pe(n,{upTo:t}))return n}function _pe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Npe(e){return e instanceof HTMLInputElement&&"select"in e}function Qf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Npe(e)&&t&&e.select()}}var MR=kpe();function kpe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=LR(e,t),e.unshift(t)},remove(t){var n;e=LR(e,t),(n=e[0])==null||n.resume()}}}function LR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ape(e){return e.filter(t=>t.tagName!=="A")}var za=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},Ppe=y2[" useId ".trim().toString()]||(()=>{}),jpe=0;function xd(e){const[t,n]=E.useState(Ppe());return za(()=>{n(r=>r??String(jpe++))},[e]),t?`radix-${t}`:""}const Cpe=["top","right","bottom","left"],jd=Math.min,rs=Math.max,ew=Math.round,kx=Math.floor,Nc=e=>({x:e,y:e}),Epe={left:"right",right:"left",bottom:"top",top:"bottom"},Ope={start:"end",end:"start"};function u3(e,t,n){return rs(e,jd(t,n))}function Gu(e,t){return typeof e=="function"?e(t):e}function Ku(e){return e.split("-")[0]}function Jg(e){return e.split("-")[1]}function AO(e){return e==="x"?"y":"x"}function PO(e){return e==="y"?"height":"width"}const Tpe=new Set(["top","bottom"]);function yc(e){return Tpe.has(Ku(e))?"y":"x"}function jO(e){return AO(yc(e))}function Mpe(e,t,n){n===void 0&&(n=!1);const r=Jg(e),i=jO(e),a=PO(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=tw(o)),[o,tw(o)]}function Lpe(e){const t=tw(e);return[f3(e),t,f3(t)]}function f3(e){return e.replace(/start|end/g,t=>Ope[t])}const RR=["left","right"],IR=["right","left"],Rpe=["top","bottom"],Ipe=["bottom","top"];function Dpe(e,t,n){switch(e){case"top":case"bottom":return n?t?IR:RR:t?RR:IR;case"left":case"right":return t?Rpe:Ipe;default:return[]}}function Fpe(e,t,n,r){const i=Jg(e);let a=Dpe(Ku(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(f3)))),a}function tw(e){return e.replace(/left|right|bottom|top/g,t=>Epe[t])}function Bpe(e){return{top:0,right:0,bottom:0,left:0,...e}}function UW(e){return typeof e!="number"?Bpe(e):{top:e,right:e,bottom:e,left:e}}function nw(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function DR(e,t,n){let{reference:r,floating:i}=e;const a=yc(t),o=jO(t),s=PO(o),l=Ku(t),c=a==="y",f=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,g=r[s]/2-i[s]/2;let m;switch(l){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-i.width,y:h};break;default:m={x:r.x,y:r.y}}switch(Jg(t)){case"start":m[o]-=g*(n&&c?-1:1);break;case"end":m[o]+=g*(n&&c?-1:1);break}return m}async function $pe(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:g=!1,padding:m=0}=Gu(t,e),b=UW(m),x=s[g?h==="floating"?"reference":"floating":h],w=nw(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:l})),_=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),P=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},C=nw(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:k,strategy:l}):_);return{top:(w.top-C.top+b.top)/P.y,bottom:(C.bottom-w.bottom+b.bottom)/P.y,left:(w.left-C.left+b.left)/P.x,right:(C.right-w.right+b.right)/P.x}}const qpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=DR(c,r,l),g=r,m={},b=0;for(let x=0;x<s.length;x++){var y;const{name:w,fn:_}=s[x],{x:k,y:P,data:C,reset:j}=await _({x:f,y:h,initialPlacement:r,placement:g,strategy:i,middlewareData:m,rects:c,platform:{...o,detectOverflow:(y=o.detectOverflow)!=null?y:$pe},elements:{reference:e,floating:t}});f=k??f,h=P??h,m={...m,[w]:{...m[w],...C}},j&&b<=50&&(b++,typeof j=="object"&&(j.placement&&(g=j.placement),j.rects&&(c=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:f,y:h}=DR(c,g,l)),x=-1)}return{x:f,y:h,placement:g,strategy:i,middlewareData:m}},Upe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:c,padding:f=0}=Gu(e,t)||{};if(c==null)return{};const h=UW(f),g={x:n,y:r},m=jO(i),b=PO(m),y=await o.getDimensions(c),x=m==="y",w=x?"top":"left",_=x?"bottom":"right",k=x?"clientHeight":"clientWidth",P=a.reference[b]+a.reference[m]-g[m]-a.floating[b],C=g[m]-a.reference[m],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let L=j?j[k]:0;(!L||!await(o.isElement==null?void 0:o.isElement(j)))&&(L=s.floating[k]||a.floating[b]);const R=P/2-C/2,D=L/2-y[b]/2-1,H=jd(h[w],D),M=jd(h[_],D),F=H,W=L-y[b]-M,V=L/2-y[b]/2+R,X=u3(F,V,W),Y=!l.arrow&&Jg(i)!=null&&V!==X&&a.reference[b]/2-(V<F?H:M)-y[b]/2<0,Z=Y?V<F?V-F:V-W:0;return{[m]:g[m]+Z,data:{[m]:X,centerOffset:V-X-Z,...Y&&{alignmentOffset:Z}},reset:Y}}}),zpe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:y=!0,...x}=Gu(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=Ku(i),_=yc(s),k=Ku(s)===s,P=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=g||(k||!y?[tw(s)]:Lpe(s)),j=b!=="none";!g&&j&&C.push(...Fpe(s,y,b,P));const L=[s,...C],R=await l.detectOverflow(t,x),D=[];let H=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&D.push(R[w]),h){const V=Mpe(i,o,P);D.push(R[V[0]],R[V[1]])}if(H=[...H,{placement:i,overflows:D}],!D.every(V=>V<=0)){var M,F;const V=(((M=a.flip)==null?void 0:M.index)||0)+1,X=L[V];if(X&&(!(h==="alignment"?_!==yc(X):!1)||H.every(K=>yc(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:V,overflows:H},reset:{placement:X}};let Y=(F=H.filter(Z=>Z.overflows[0]<=0).sort((Z,K)=>Z.overflows[1]-K.overflows[1])[0])==null?void 0:F.placement;if(!Y)switch(m){case"bestFit":{var W;const Z=(W=H.filter(K=>{if(j){const se=yc(K.placement);return se===_||se==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(se=>se>0).reduce((se,z)=>se+z,0)]).sort((K,se)=>K[1]-se[1])[0])==null?void 0:W[0];Z&&(Y=Z);break}case"initialPlacement":Y=s;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};function FR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BR(e){return Cpe.some(t=>e[t]>=0)}const Vpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=Gu(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...a,elementContext:"reference"}),s=FR(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:BR(s)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),s=FR(o,n.floating);return{data:{escapedOffsets:s,escaped:BR(s)}}}default:return{}}}}},zW=new Set(["left","top"]);async function Wpe(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ku(n),s=Jg(n),l=yc(n)==="y",c=zW.has(o)?-1:1,f=a&&l?-1:1,h=Gu(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&typeof b=="number"&&(m=s==="end"?b*-1:b),l?{x:m*f,y:g*c}:{x:g*c,y:m*f}}const Hpe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await Wpe(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},Ype=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:w=>{let{x:_,y:k}=w;return{x:_,y:k}}},...c}=Gu(e,t),f={x:n,y:r},h=await a.detectOverflow(t,c),g=yc(Ku(i)),m=AO(g);let b=f[m],y=f[g];if(o){const w=m==="y"?"top":"left",_=m==="y"?"bottom":"right",k=b+h[w],P=b-h[_];b=u3(k,b,P)}if(s){const w=g==="y"?"top":"left",_=g==="y"?"bottom":"right",k=y+h[w],P=y-h[_];y=u3(k,y,P)}const x=l.fn({...t,[m]:b,[g]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[m]:o,[g]:s}}}}}},Gpe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Gu(e,t),f={x:n,y:r},h=yc(i),g=AO(h);let m=f[g],b=f[h];const y=Gu(s,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const k=g==="y"?"height":"width",P=a.reference[g]-a.floating[k]+x.mainAxis,C=a.reference[g]+a.reference[k]-x.mainAxis;m<P?m=P:m>C&&(m=C)}if(c){var w,_;const k=g==="y"?"width":"height",P=zW.has(Ku(i)),C=a.reference[h]-a.floating[k]+(P&&((w=o.offset)==null?void 0:w[h])||0)+(P?0:x.crossAxis),j=a.reference[h]+a.reference[k]+(P?0:((_=o.offset)==null?void 0:_[h])||0)-(P?x.crossAxis:0);b<C?b=C:b>j&&(b=j)}return{[g]:m,[h]:b}}}},Kpe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=Gu(e,t),f=await o.detectOverflow(t,c),h=Ku(i),g=Jg(i),m=yc(i)==="y",{width:b,height:y}=a.floating;let x,w;h==="top"||h==="bottom"?(x=h,w=g===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(w=h,x=g==="end"?"top":"bottom");const _=y-f.top-f.bottom,k=b-f.left-f.right,P=jd(y-f[x],_),C=jd(b-f[w],k),j=!t.middlewareData.shift;let L=P,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=_),j&&!g){const H=rs(f.left,0),M=rs(f.right,0),F=rs(f.top,0),W=rs(f.bottom,0);m?R=b-2*(H!==0||M!==0?H+M:rs(f.left,f.right)):L=y-2*(F!==0||W!==0?F+W:rs(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:L});const D=await o.getDimensions(s.floating);return b!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}};function B2(){return typeof window<"u"}function Zg(e){return VW(e)?(e.nodeName||"").toLowerCase():"#document"}function cs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rc(e){var t;return(t=(VW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function VW(e){return B2()?e instanceof Node||e instanceof cs(e).Node:!1}function Cl(e){return B2()?e instanceof Element||e instanceof cs(e).Element:!1}function Ec(e){return B2()?e instanceof HTMLElement||e instanceof cs(e).HTMLElement:!1}function $R(e){return!B2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof cs(e).ShadowRoot}const Xpe=new Set(["inline","contents"]);function m1(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=El(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Xpe.has(i)}const Qpe=new Set(["table","td","th"]);function Jpe(e){return Qpe.has(Zg(e))}const Zpe=[":popover-open",":modal"];function $2(e){return Zpe.some(t=>{try{return e.matches(t)}catch{return!1}})}const eme=["transform","translate","scale","rotate","perspective"],tme=["transform","translate","scale","rotate","perspective","filter"],nme=["paint","layout","strict","content"];function CO(e){const t=EO(),n=Cl(e)?El(e):e;return eme.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||tme.some(r=>(n.willChange||"").includes(r))||nme.some(r=>(n.contain||"").includes(r))}function rme(e){let t=Cd(e);for(;Ec(t)&&!bg(t);){if(CO(t))return t;if($2(t))return null;t=Cd(t)}return null}function EO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ime=new Set(["html","body","#document"]);function bg(e){return ime.has(Zg(e))}function El(e){return cs(e).getComputedStyle(e)}function q2(e){return Cl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cd(e){if(Zg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$R(e)&&e.host||Rc(e);return $R(t)?t.host:t}function WW(e){const t=Cd(e);return bg(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ec(t)&&m1(t)?t:WW(t)}function i0(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=WW(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=cs(i);if(a){const s=d3(o);return t.concat(o,o.visualViewport||[],m1(i)?i:[],s&&n?i0(s):[])}return t.concat(i,i0(i,[],n))}function d3(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HW(e){const t=El(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ec(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ew(n)!==a||ew(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function OO(e){return Cl(e)?e:e.contextElement}function Bm(e){const t=OO(e);if(!Ec(t))return Nc(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=HW(t);let o=(a?ew(n.width):n.width)/r,s=(a?ew(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const ame=Nc(0);function YW(e){const t=cs(e);return!EO()||!t.visualViewport?ame:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ome(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==cs(e)?!1:t}function lp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=OO(e);let o=Nc(1);t&&(r?Cl(r)&&(o=Bm(r)):o=Bm(e));const s=ome(a,n,r)?YW(a):Nc(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,f=i.width/o.x,h=i.height/o.y;if(a){const g=cs(a),m=r&&Cl(r)?cs(r):r;let b=g,y=d3(b);for(;y&&r&&m!==b;){const x=Bm(y),w=y.getBoundingClientRect(),_=El(y),k=w.left+(y.clientLeft+parseFloat(_.paddingLeft))*x.x,P=w.top+(y.clientTop+parseFloat(_.paddingTop))*x.y;l*=x.x,c*=x.y,f*=x.x,h*=x.y,l+=k,c+=P,b=cs(y),y=d3(b)}}return nw({width:f,height:h,x:l,y:c})}function U2(e,t){const n=q2(e).scrollLeft;return t?t.left+n:lp(Rc(e)).left+n}function GW(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-U2(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function sme(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=Rc(r),s=t?$2(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Nc(1);const f=Nc(0),h=Ec(r);if((h||!h&&!a)&&((Zg(r)!=="body"||m1(o))&&(l=q2(r)),Ec(r))){const m=lp(r);c=Bm(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const g=o&&!h&&!a?GW(o,l):Nc(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+f.x+g.x,y:n.y*c.y-l.scrollTop*c.y+f.y+g.y}}function lme(e){return Array.from(e.getClientRects())}function cme(e){const t=Rc(e),n=q2(e),r=e.ownerDocument.body,i=rs(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rs(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+U2(e);const s=-n.scrollTop;return El(r).direction==="rtl"&&(o+=rs(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}const qR=25;function ume(e,t){const n=cs(e),r=Rc(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const f=EO();(!f||f&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=U2(r);if(c<=0){const f=r.ownerDocument,h=f.body,g=getComputedStyle(h),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-h.clientWidth-m);b<=qR&&(a-=b)}else c<=qR&&(a+=c);return{width:a,height:o,x:s,y:l}}const fme=new Set(["absolute","fixed"]);function dme(e,t){const n=lp(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ec(e)?Bm(e):Nc(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function UR(e,t,n){let r;if(t==="viewport")r=ume(e,n);else if(t==="document")r=cme(Rc(e));else if(Cl(t))r=dme(t,n);else{const i=YW(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nw(r)}function KW(e,t){const n=Cd(e);return n===t||!Cl(n)||bg(n)?!1:El(n).position==="fixed"||KW(n,t)}function hme(e,t){const n=t.get(e);if(n)return n;let r=i0(e,[],!1).filter(s=>Cl(s)&&Zg(s)!=="body"),i=null;const a=El(e).position==="fixed";let o=a?Cd(e):e;for(;Cl(o)&&!bg(o);){const s=El(o),l=CO(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&fme.has(i.position)||m1(o)&&!l&&KW(e,o))?r=r.filter(f=>f!==o):i=s,o=Cd(o)}return t.set(e,r),r}function pme(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?$2(t)?[]:hme(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,f)=>{const h=UR(t,f,i);return c.top=rs(h.top,c.top),c.right=jd(h.right,c.right),c.bottom=jd(h.bottom,c.bottom),c.left=rs(h.left,c.left),c},UR(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mme(e){const{width:t,height:n}=HW(e);return{width:t,height:n}}function gme(e,t,n){const r=Ec(t),i=Rc(t),a=n==="fixed",o=lp(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Nc(0);function c(){l.x=U2(i)}if(r||!r&&!a)if((Zg(t)!=="body"||m1(i))&&(s=q2(t)),r){const m=lp(t,!0,a,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else i&&c();a&&!r&&i&&c();const f=i&&!r&&!a?GW(i,s):Nc(0),h=o.left+s.scrollLeft-l.x-f.x,g=o.top+s.scrollTop-l.y-f.y;return{x:h,y:g,width:o.width,height:o.height}}function m_(e){return El(e).position==="static"}function zR(e,t){if(!Ec(e)||El(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Rc(e)===n&&(n=n.ownerDocument.body),n}function XW(e,t){const n=cs(e);if($2(e))return n;if(!Ec(e)){let i=Cd(e);for(;i&&!bg(i);){if(Cl(i)&&!m_(i))return i;i=Cd(i)}return n}let r=zR(e,t);for(;r&&Jpe(r)&&m_(r);)r=zR(r,t);return r&&bg(r)&&m_(r)&&!CO(r)?n:r||rme(e)||n}const yme=async function(e){const t=this.getOffsetParent||XW,n=this.getDimensions,r=await n(e.floating);return{reference:gme(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vme(e){return El(e).direction==="rtl"}const xme={convertOffsetParentRelativeRectToViewportRelativeRect:sme,getDocumentElement:Rc,getClippingRect:pme,getOffsetParent:XW,getElementRects:yme,getClientRects:lme,getDimensions:mme,getScale:Bm,isElement:Cl,isRTL:vme};function QW(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bme(e,t){let n=null,r;const i=Rc(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:f,top:h,width:g,height:m}=c;if(s||t(),!g||!m)return;const b=kx(h),y=kx(i.clientWidth-(f+g)),x=kx(i.clientHeight-(h+m)),w=kx(f),k={rootMargin:-b+"px "+-y+"px "+-x+"px "+-w+"px",threshold:rs(0,jd(1,l))||1};let P=!0;function C(j){const L=j[0].intersectionRatio;if(L!==l){if(!P)return o();L?o(!1,L):r=setTimeout(()=>{o(!1,1e-7)},1e3)}L===1&&!QW(c,e.getBoundingClientRect())&&o(),P=!1}try{n=new IntersectionObserver(C,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,k)}n.observe(e)}return o(!0),a}function wme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=OO(e),f=i||a?[...c?i0(c):[],...i0(t)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const h=c&&s?bme(c,n):null;let g=-1,m=null;o&&(m=new ResizeObserver(w=>{let[_]=w;_&&_.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let b,y=l?lp(e):null;l&&x();function x(){const w=lp(e);y&&!QW(y,w)&&n(),y=w,b=requestAnimationFrame(x)}return n(),()=>{var w;f.forEach(_=>{i&&_.removeEventListener("scroll",n),a&&_.removeEventListener("resize",n)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(b)}}const Sme=Hpe,_me=Ype,Nme=zpe,kme=Kpe,Ame=Vpe,VR=Upe,Pme=Gpe,jme=(e,t,n)=>{const r=new Map,i={platform:xme,...n},a={...i.platform,_c:r};return qpe(e,t,{...i,platform:a})};var Cme=typeof document<"u",Eme=function(){},Sb=Cme?E.useLayoutEffect:Eme;function rw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!rw(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!rw(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function JW(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WR(e,t){const n=JW(e);return Math.round(t*n)/n}function g_(e){const t=E.useRef(e);return Sb(()=>{t.current=e}),t}function Ome(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[f,h]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=E.useState(r);rw(g,r)||m(r);const[b,y]=E.useState(null),[x,w]=E.useState(null),_=E.useCallback(K=>{K!==j.current&&(j.current=K,y(K))},[]),k=E.useCallback(K=>{K!==L.current&&(L.current=K,w(K))},[]),P=a||b,C=o||x,j=E.useRef(null),L=E.useRef(null),R=E.useRef(f),D=l!=null,H=g_(l),M=g_(i),F=g_(c),W=E.useCallback(()=>{if(!j.current||!L.current)return;const K={placement:t,strategy:n,middleware:g};M.current&&(K.platform=M.current),jme(j.current,L.current,K).then(se=>{const z={...se,isPositioned:F.current!==!1};V.current&&!rw(R.current,z)&&(R.current=z,r1.flushSync(()=>{h(z)}))})},[g,t,n,M,F]);Sb(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(K=>({...K,isPositioned:!1})))},[c]);const V=E.useRef(!1);Sb(()=>(V.current=!0,()=>{V.current=!1}),[]),Sb(()=>{if(P&&(j.current=P),C&&(L.current=C),P&&C){if(H.current)return H.current(P,C,W);W()}},[P,C,W,H,D]);const X=E.useMemo(()=>({reference:j,floating:L,setReference:_,setFloating:k}),[_,k]),Y=E.useMemo(()=>({reference:P,floating:C}),[P,C]),Z=E.useMemo(()=>{const K={position:n,left:0,top:0};if(!Y.floating)return K;const se=WR(Y.floating,f.x),z=WR(Y.floating,f.y);return s?{...K,transform:"translate("+se+"px, "+z+"px)",...JW(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:z}},[n,s,Y.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:W,refs:X,elements:Y,floatingStyles:Z}),[f,W,X,Y,Z])}const Tme=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?VR({element:r.current,padding:i}).fn(n):{}:r?VR({element:r,padding:i}).fn(n):{}}}},Mme=(e,t)=>({...Sme(e),options:[e,t]}),Lme=(e,t)=>({..._me(e),options:[e,t]}),Rme=(e,t)=>({...Pme(e),options:[e,t]}),Ime=(e,t)=>({...Nme(e),options:[e,t]}),Dme=(e,t)=>({...kme(e),options:[e,t]}),Fme=(e,t)=>({...Ame(e),options:[e,t]}),Bme=(e,t)=>({...Tme(e),options:[e,t]});var $me="Arrow",ZW=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return d.jsx(An.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ZW.displayName=$me;var qme=ZW;function TO(e){const[t,n]=E.useState(void 0);return za(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var MO="Popper",[eH,tH]=Rd(MO),[Ume,nH]=eH(MO),rH=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return d.jsx(Ume,{scope:t,anchor:r,onAnchorChange:i,children:n})};rH.displayName=MO;var iH="PopperAnchor",aH=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=nH(iH,n),o=E.useRef(null),s=Ar(t,o),l=E.useRef(null);return E.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||o.current,c!==l.current&&a.onAnchorChange(l.current)}),r?null:d.jsx(An.div,{...i,ref:s})});aH.displayName=iH;var LO="PopperContent",[zme,Vme]=eH(LO),oH=E.forwardRef((e,t)=>{var pe,ve,he,xe,Pe,Se;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...y}=e,x=nH(LO,n),[w,_]=E.useState(null),k=Ar(t,Ue=>_(Ue)),[P,C]=E.useState(null),j=TO(P),L=(j==null?void 0:j.width)??0,R=(j==null?void 0:j.height)??0,D=r+(a!=="center"?"-"+a:""),H=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(c)?c:[c],F=M.length>0,W={padding:H,boundary:M.filter(Hme),altBoundary:F},{refs:V,floatingStyles:X,placement:Y,isPositioned:Z,middlewareData:K}=Ome({strategy:"fixed",placement:D,whileElementsMounted:(...Ue)=>wme(...Ue,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Mme({mainAxis:i+R,alignmentAxis:o}),l&&Lme({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Rme():void 0,...W}),l&&Ime({...W}),Dme({...W,apply:({elements:Ue,rects:Ye,availableWidth:oe,availableHeight:Ke})=>{const{width:ht,height:gt}=Ye.reference,ze=Ue.floating.style;ze.setProperty("--radix-popper-available-width",`${oe}px`),ze.setProperty("--radix-popper-available-height",`${Ke}px`),ze.setProperty("--radix-popper-anchor-width",`${ht}px`),ze.setProperty("--radix-popper-anchor-height",`${gt}px`)}}),P&&Bme({element:P,padding:s}),Yme({arrowWidth:L,arrowHeight:R}),g&&Fme({strategy:"referenceHidden",...W})]}),[se,z]=cH(Y),te=Pd(b);za(()=>{Z&&(te==null||te())},[Z,te]);const $=(pe=K.arrow)==null?void 0:pe.x,q=(ve=K.arrow)==null?void 0:ve.y,re=((he=K.arrow)==null?void 0:he.centerOffset)!==0,[le,de]=E.useState();return za(()=>{w&&de(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(xe=K.transformOrigin)==null?void 0:xe.x,(Pe=K.transformOrigin)==null?void 0:Pe.y].join(" "),...((Se=K.hide)==null?void 0:Se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(zme,{scope:n,placedSide:se,onArrowChange:C,arrowX:$,arrowY:q,shouldHideArrow:re,children:d.jsx(An.div,{"data-side":se,"data-align":z,...y,ref:k,style:{...y.style,animation:Z?void 0:"none"}})})})});oH.displayName=LO;var sH="PopperArrow",Wme={top:"bottom",right:"left",bottom:"top",left:"right"},lH=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Vme(sH,r),o=Wme[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(qme,{...i,ref:n,style:{...i.style,display:"block"}})})});lH.displayName=sH;function Hme(e){return e!==null}var Yme=e=>({name:"transformOrigin",options:e,fn(t){var x,w,_;const{placement:n,rects:r,middlewareData:i}=t,o=((x=i.arrow)==null?void 0:x.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,f]=cH(n),h={start:"0%",center:"50%",end:"100%"}[f],g=(((w=i.arrow)==null?void 0:w.x)??0)+s/2,m=(((_=i.arrow)==null?void 0:_.y)??0)+l/2;let b="",y="";return c==="bottom"?(b=o?h:`${g}px`,y=`${-l}px`):c==="top"?(b=o?h:`${g}px`,y=`${r.floating.height+l}px`):c==="right"?(b=`${-l}px`,y=o?h:`${m}px`):c==="left"&&(b=`${r.floating.width+l}px`,y=o?h:`${m}px`),{data:{x:b,y}}}});function cH(e){const[t,n="center"]=e.split("-");return[t,n]}var Gme=rH,Kme=aH,Xme=oH,Qme=lH,Jme="Portal",RO=E.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=E.useState(!1);za(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?gie.createPortal(d.jsx(An.div,{...r,ref:t}),o):null});RO.displayName=Jme;function Zme(e){const t=ege(e),n=E.forwardRef((r,i)=>{const{children:a,...o}=r,s=E.Children.toArray(a),l=s.find(nge);if(l){const c=l.props.children,f=s.map(h=>h===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:h);return d.jsx(t,{...o,ref:i,children:E.isValidElement(c)?E.cloneElement(c,void 0,f):null})}return d.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function ege(e){const t=E.forwardRef((n,r)=>{const{children:i,...a}=n;if(E.isValidElement(i)){const o=ige(i),s=rge(a,i.props);return i.type!==E.Fragment&&(s.ref=r?Qg(r,o):o),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tge=Symbol("radix.slottable");function nge(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tge}function rge(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function ige(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var age=y2[" useInsertionEffect ".trim().toString()]||za;function cp({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=oge({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const f=E.useRef(e!==void 0);E.useEffect(()=>{const h=f.current;h!==s&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const c=E.useCallback(f=>{var h;if(s){const g=sge(f)?f(e):f;g!==e&&((h=o.current)==null||h.call(o,g))}else a(f)},[s,e,a,o]);return[l,c]}function oge({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),i=E.useRef(n),a=E.useRef(t);return age(()=>{a.current=t},[t]),E.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function sge(e){return typeof e=="function"}function IO(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var uH=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),lge="VisuallyHidden",cge=E.forwardRef((e,t)=>d.jsx(An.span,{...e,ref:t,style:{...uH,...e.style}}));cge.displayName=lge;var uge=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fm=new WeakMap,Ax=new WeakMap,Px={},y_=0,fH=function(e){return e&&(e.host||fH(e.parentNode))},fge=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fH(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},dge=function(e,t,n,r){var i=fge(t,Array.isArray(e)?e:[e]);Px[n]||(Px[n]=new WeakMap);var a=Px[n],o=[],s=new Set,l=new Set(i),c=function(h){!h||s.has(h)||(s.add(h),c(h.parentNode))};i.forEach(c);var f=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(g){if(s.has(g))f(g);else try{var m=g.getAttribute(r),b=m!==null&&m!=="false",y=(fm.get(g)||0)+1,x=(a.get(g)||0)+1;fm.set(g,y),a.set(g,x),o.push(g),y===1&&b&&Ax.set(g,!0),x===1&&g.setAttribute(n,"true"),b||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return f(t),s.clear(),y_++,function(){o.forEach(function(h){var g=fm.get(h)-1,m=a.get(h)-1;fm.set(h,g),a.set(h,m),g||(Ax.has(h)||h.removeAttribute(r),Ax.delete(h)),m||h.removeAttribute(n)}),y_--,y_||(fm=new WeakMap,fm=new WeakMap,Ax=new WeakMap,Px={})}},dH=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=uge(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),dge(r,i,n,"aria-hidden")):function(){return null}},pc=function(){return pc=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},pc.apply(this,arguments)};function hH(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function hge(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var _b="right-scroll-bar-position",Nb="width-before-scroll-bar",pge="with-scroll-bars-hidden",mge="--removed-body-scroll-bar-size";function v_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gge(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var yge=typeof window<"u"?E.useLayoutEffect:E.useEffect,HR=new WeakMap;function vge(e,t){var n=gge(null,function(r){return e.forEach(function(i){return v_(i,r)})});return yge(function(){var r=HR.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||v_(s,null)}),a.forEach(function(s){i.has(s)||v_(s,o)})}HR.set(n,e)},[e]),n}function xge(e){return e}function bge(e,t){t===void 0&&(t=xge);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var l=function(){var f=o;o=[],f.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(f){o.push(f),c()},filter:function(f){return o=o.filter(f),n}}}};return i}function wge(e){e===void 0&&(e={});var t=bge(null);return t.options=pc({async:!0,ssr:!1},e),t}var pH=function(e){var t=e.sideCar,n=hH(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,pc({},n))};pH.isSideCarExport=!0;function Sge(e,t){return e.useMedium(t),pH}var mH=wge(),x_=function(){},z2=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:x_,onWheelCapture:x_,onTouchMoveCapture:x_}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,h=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,y=e.inert,x=e.allowPinchZoom,w=e.as,_=w===void 0?"div":w,k=e.gapMode,P=hH(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,j=vge([n,t]),L=pc(pc({},P),i);return E.createElement(E.Fragment,null,f&&E.createElement(C,{sideCar:mH,removeScrollBar:c,shards:h,noRelative:m,noIsolation:b,inert:y,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:k}),o?E.cloneElement(E.Children.only(s),pc(pc({},L),{ref:j})):E.createElement(_,pc({},L,{className:l,ref:j}),s))});z2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z2.classNames={fullWidth:Nb,zeroRight:_b};var _ge=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nge(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_ge();return t&&e.setAttribute("nonce",t),e}function kge(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Age(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pge=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nge())&&(kge(t,n),Age(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jge=function(){var e=Pge();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gH=function(){var e=jge(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Cge={left:0,top:0,right:0,gap:0},b_=function(e){return parseInt(e||"",10)||0},Ege=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[b_(n),b_(r),b_(i)]},Oge=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cge;var t=Ege(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tge=gH(),$m="data-scroll-locked",Mge=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
.`.concat(pge,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(s,"px ").concat(r,`;
}
body[`).concat($m,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(a,`px;
padding-right: `).concat(o,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(s,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(_b,` {
right: `).concat(s,"px ").concat(r,`;
}
.`).concat(Nb,` {
margin-right: `).concat(s,"px ").concat(r,`;
}
.`).concat(_b," .").concat(_b,` {
right: 0 `).concat(r,`;
}
.`).concat(Nb," .").concat(Nb,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat($m,`] {
`).concat(mge,": ").concat(s,`px;
}
`)},YR=function(){var e=parseInt(document.body.getAttribute($m)||"0",10);return isFinite(e)?e:0},Lge=function(){E.useEffect(function(){return document.body.setAttribute($m,(YR()+1).toString()),function(){var e=YR()-1;e<=0?document.body.removeAttribute($m):document.body.setAttribute($m,e.toString())}},[])},Rge=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Lge();var a=E.useMemo(function(){return Oge(i)},[i]);return E.createElement(Tge,{styles:Mge(a,!t,i,n?"":"!important")})},h3=!1;if(typeof window<"u")try{var jx=Object.defineProperty({},"passive",{get:function(){return h3=!0,!0}});window.addEventListener("test",jx,jx),window.removeEventListener("test",jx,jx)}catch{h3=!1}var dm=h3?{passive:!1}:!1,Ige=function(e){return e.tagName==="TEXTAREA"},yH=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ige(e)&&n[t]==="visible")},Dge=function(e){return yH(e,"overflowY")},Fge=function(e){return yH(e,"overflowX")},GR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=vH(e,r);if(i){var a=xH(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bge=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$ge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vH=function(e,t){return e==="v"?Dge(t):Fge(t)},xH=function(e,t){return e==="v"?Bge(t):$ge(t)},qge=function(e,t){return e==="h"&&t==="rtl"?-1:1},Uge=function(e,t,n,r,i){var a=qge(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,l=t.contains(s),c=!1,f=o>0,h=0,g=0;do{if(!s)break;var m=xH(e,s),b=m[0],y=m[1],x=m[2],w=y-x-a*b;(b||w)&&vH(e,s)&&(h+=w,g+=b);var _=s.parentNode;s=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(h)<1||!f&&Math.abs(g)<1)&&(c=!0),c},Cx=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},KR=function(e){return[e.deltaX,e.deltaY]},XR=function(e){return e&&"current"in e?e.current:e},zge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vge=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Wge=0,hm=[];function Hge(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(Wge++)[0],a=E.useState(gH)[0],o=E.useRef(e);E.useEffect(function(){o.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=hge([e.lockRef.current],(e.shards||[]).map(XR),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=E.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var w=Cx(y),_=n.current,k="deltaX"in y?y.deltaX:_[0]-w[0],P="deltaY"in y?y.deltaY:_[1]-w[1],C,j=y.target,L=Math.abs(k)>Math.abs(P)?"h":"v";if("touches"in y&&L==="h"&&j.type==="range")return!1;var R=window.getSelection(),D=R&&R.anchorNode,H=D?D===j||D.contains(j):!1;if(H)return!1;var M=GR(L,j);if(!M)return!0;if(M?C=L:(C=L==="v"?"h":"v",M=GR(L,j)),!M)return!1;if(!r.current&&"changedTouches"in y&&(k||P)&&(r.current=C),!C)return!0;var F=r.current||C;return Uge(F,x,y,F==="h"?k:P)},[]),l=E.useCallback(function(y){var x=y;if(!(!hm.length||hm[hm.length-1]!==a)){var w="deltaY"in x?KR(x):Cx(x),_=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&zge(C.delta,w)})[0];if(_&&_.should){x.cancelable&&x.preventDefault();return}if(!_){var k=(o.current.shards||[]).map(XR).filter(Boolean).filter(function(C){return C.contains(x.target)}),P=k.length>0?s(x,k[0]):!o.current.noIsolation;P&&x.cancelable&&x.preventDefault()}}},[]),c=E.useCallback(function(y,x,w,_){var k={name:y,delta:x,target:w,should:_,shadowParent:Yge(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(P){return P!==k})},1)},[]),f=E.useCallback(function(y){n.current=Cx(y),r.current=void 0},[]),h=E.useCallback(function(y){c(y.type,KR(y),y.target,s(y,e.lockRef.current))},[]),g=E.useCallback(function(y){c(y.type,Cx(y),y.target,s(y,e.lockRef.current))},[]);E.useEffect(function(){return hm.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",l,dm),document.addEventListener("touchmove",l,dm),document.addEventListener("touchstart",f,dm),function(){hm=hm.filter(function(y){return y!==a}),document.removeEventListener("wheel",l,dm),document.removeEventListener("touchmove",l,dm),document.removeEventListener("touchstart",f,dm)}},[]);var m=e.removeScrollBar,b=e.inert;return E.createElement(E.Fragment,null,b?E.createElement(a,{styles:Vge(i)}):null,m?E.createElement(Rge,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yge(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Gge=Sge(mH,Hge);var DO=E.forwardRef(function(e,t){return E.createElement(z2,pc({},e,{ref:t,sideCar:Gge}))});DO.classNames=z2.classNames;var Kge=[" ","Enter","ArrowUp","ArrowDown"],Xge=[" ","Enter"],up="Select",[V2,W2,Qge]=DW(up),[ey]=Rd(up,[Qge,tH]),H2=tH(),[Jge,Id]=ey(up),[Zge,eye]=ey(up),bH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:c,name:f,autoComplete:h,disabled:g,required:m,form:b}=e,y=H2(t),[x,w]=E.useState(null),[_,k]=E.useState(null),[P,C]=E.useState(!1),j=_O(c),[L,R]=cp({prop:r,defaultProp:i??!1,onChange:a,caller:up}),[D,H]=cp({prop:o,defaultProp:s,onChange:l,caller:up}),M=E.useRef(null),F=x?b||!!x.closest("form"):!0,[W,V]=E.useState(new Set),X=Array.from(W).map(Y=>Y.props.value).join(";");return d.jsx(Gme,{...y,children:d.jsxs(Jge,{required:m,scope:t,trigger:x,onTriggerChange:w,valueNode:_,onValueNodeChange:k,valueNodeHasChildren:P,onValueNodeHasChildrenChange:C,contentId:xd(),value:D,onValueChange:H,open:L,onOpenChange:R,dir:j,triggerPointerDownPosRef:M,disabled:g,children:[d.jsx(V2.Provider,{scope:t,children:d.jsx(Zge,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(Y=>{V(Z=>new Set(Z).add(Y))},[]),onNativeOptionRemove:E.useCallback(Y=>{V(Z=>{const K=new Set(Z);return K.delete(Y),K})},[]),children:n})}),F?d.jsxs(VH,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:h,value:D,onChange:Y=>H(Y.target.value),disabled:g,form:b,children:[D===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},X):null]})})};bH.displayName=up;var wH="SelectTrigger",SH=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=H2(n),o=Id(wH,n),s=o.disabled||r,l=Ar(t,o.onTriggerChange),c=W2(n),f=E.useRef("touch"),[h,g,m]=HH(y=>{const x=c().filter(k=>!k.disabled),w=x.find(k=>k.value===o.value),_=YH(x,y,w);_!==void 0&&o.onValueChange(_.value)}),b=y=>{s||(o.onOpenChange(!0),m()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(Kme,{asChild:!0,...a,children:d.jsx(An.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":WH(o.value)?"":void 0,...i,ref:l,onClick:Nn(i.onClick,y=>{y.currentTarget.focus(),f.current!=="mouse"&&b(y)}),onPointerDown:Nn(i.onPointerDown,y=>{f.current=y.pointerType;const x=y.target;x.hasPointerCapture(y.pointerId)&&x.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(b(y),y.preventDefault())}),onKeyDown:Nn(i.onKeyDown,y=>{const x=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&g(y.key),!(x&&y.key===" ")&&Kge.includes(y.key)&&(b(),y.preventDefault())})})})});SH.displayName=wH;var _H="SelectValue",NH=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...s}=e,l=Id(_H,n),{onValueNodeHasChildrenChange:c}=l,f=a!==void 0,h=Ar(t,l.onValueNodeChange);return za(()=>{c(f)},[c,f]),d.jsx(An.span,{...s,ref:h,style:{pointerEvents:"none"},children:WH(l.value)?d.jsx(d.Fragment,{children:o}):a})});NH.displayName=_H;var tye="SelectIcon",kH=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return d.jsx(An.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});kH.displayName=tye;var nye="SelectPortal",AH=e=>d.jsx(RO,{asChild:!0,...e});AH.displayName=nye;var fp="SelectContent",PH=E.forwardRef((e,t)=>{const n=Id(fp,e.__scopeSelect),[r,i]=E.useState();if(za(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?r1.createPortal(d.jsx(jH,{scope:e.__scopeSelect,children:d.jsx(V2.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(CH,{...e,ref:t})});PH.displayName=fp;var bl=10,[jH,Dd]=ey(fp),rye="SelectContentImpl",iye=Zme("SelectContent.RemoveScroll"),CH=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:f,arrowPadding:h,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:y,avoidCollisions:x,...w}=e,_=Id(fp,n),[k,P]=E.useState(null),[C,j]=E.useState(null),L=Ar(t,pe=>P(pe)),[R,D]=E.useState(null),[H,M]=E.useState(null),F=W2(n),[W,V]=E.useState(!1),X=E.useRef(!1);E.useEffect(()=>{if(k)return dH(k)},[k]),$W();const Y=E.useCallback(pe=>{const[ve,...he]=F().map(Se=>Se.ref.current),[xe]=he.slice(-1),Pe=document.activeElement;for(const Se of pe)if(Se===Pe||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===ve&&C&&(C.scrollTop=0),Se===xe&&C&&(C.scrollTop=C.scrollHeight),Se==null||Se.focus(),document.activeElement!==Pe))return},[F,C]),Z=E.useCallback(()=>Y([R,k]),[Y,R,k]);E.useEffect(()=>{W&&Z()},[W,Z]);const{onOpenChange:K,triggerPointerDownPosRef:se}=_;E.useEffect(()=>{if(k){let pe={x:0,y:0};const ve=xe=>{var Pe,Se;pe={x:Math.abs(Math.round(xe.pageX)-(((Pe=se.current)==null?void 0:Pe.x)??0)),y:Math.abs(Math.round(xe.pageY)-(((Se=se.current)==null?void 0:Se.y)??0))}},he=xe=>{pe.x<=10&&pe.y<=10?xe.preventDefault():k.contains(xe.target)||K(!1),document.removeEventListener("pointermove",ve),se.current=null};return se.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",he,{capture:!0})}}},[k,K,se]),E.useEffect(()=>{const pe=()=>K(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[K]);const[z,te]=HH(pe=>{const ve=F().filter(Pe=>!Pe.disabled),he=ve.find(Pe=>Pe.ref.current===document.activeElement),xe=YH(ve,pe,he);xe&&setTimeout(()=>xe.ref.current.focus())}),$=E.useCallback((pe,ve,he)=>{const xe=!X.current&&!he;(_.value!==void 0&&_.value===ve||xe)&&(D(pe),xe&&(X.current=!0))},[_.value]),q=E.useCallback(()=>k==null?void 0:k.focus(),[k]),re=E.useCallback((pe,ve,he)=>{const xe=!X.current&&!he;(_.value!==void 0&&_.value===ve||xe)&&M(pe)},[_.value]),le=r==="popper"?p3:EH,de=le===p3?{side:s,sideOffset:l,align:c,alignOffset:f,arrowPadding:h,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:y,avoidCollisions:x}:{};return d.jsx(jH,{scope:n,content:k,viewport:C,onViewportChange:j,itemRefCallback:$,selectedItem:R,onItemLeave:q,itemTextRefCallback:re,focusSelectedItem:Z,selectedItemText:H,position:r,isPositioned:W,searchRef:z,children:d.jsx(DO,{as:iye,allowPinchZoom:!0,children:d.jsx(kO,{asChild:!0,trapped:_.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:Nn(i,pe=>{var ve;(ve=_.trigger)==null||ve.focus({preventScroll:!0}),pe.preventDefault()}),children:d.jsx(NO,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:d.jsx(le,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:pe=>pe.preventDefault(),...w,...de,onPlaced:()=>V(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Nn(w.onKeyDown,pe=>{const ve=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!ve&&pe.key.length===1&&te(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let xe=F().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Pe=pe.target,Se=xe.indexOf(Pe);xe=xe.slice(Se+1)}setTimeout(()=>Y(xe)),pe.preventDefault()}})})})})})})});CH.displayName=rye;var aye="SelectItemAlignedPosition",EH=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=Id(fp,n),o=Dd(fp,n),[s,l]=E.useState(null),[c,f]=E.useState(null),h=Ar(t,L=>f(L)),g=W2(n),m=E.useRef(!1),b=E.useRef(!0),{viewport:y,selectedItem:x,selectedItemText:w,focusSelectedItem:_}=o,k=E.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&y&&x&&w){const L=a.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),D=a.valueNode.getBoundingClientRect(),H=w.getBoundingClientRect();if(a.dir!=="rtl"){const Pe=H.left-R.left,Se=D.left-Pe,Ue=L.left-Se,Ye=L.width+Ue,oe=Math.max(Ye,R.width),Ke=window.innerWidth-bl,ht=AR(Se,[bl,Math.max(bl,Ke-oe)]);s.style.minWidth=Ye+"px",s.style.left=ht+"px"}else{const Pe=R.right-H.right,Se=window.innerWidth-D.right-Pe,Ue=window.innerWidth-L.right-Se,Ye=L.width+Ue,oe=Math.max(Ye,R.width),Ke=window.innerWidth-bl,ht=AR(Se,[bl,Math.max(bl,Ke-oe)]);s.style.minWidth=Ye+"px",s.style.right=ht+"px"}const M=g(),F=window.innerHeight-bl*2,W=y.scrollHeight,V=window.getComputedStyle(c),X=parseInt(V.borderTopWidth,10),Y=parseInt(V.paddingTop,10),Z=parseInt(V.borderBottomWidth,10),K=parseInt(V.paddingBottom,10),se=X+Y+W+K+Z,z=Math.min(x.offsetHeight*5,se),te=window.getComputedStyle(y),$=parseInt(te.paddingTop,10),q=parseInt(te.paddingBottom,10),re=L.top+L.height/2-bl,le=F-re,de=x.offsetHeight/2,pe=x.offsetTop+de,ve=X+Y+pe,he=se-ve;if(ve<=re){const Pe=M.length>0&&x===M[M.length-1].ref.current;s.style.bottom="0px";const Se=c.clientHeight-y.offsetTop-y.offsetHeight,Ue=Math.max(le,de+(Pe?q:0)+Se+Z),Ye=ve+Ue;s.style.height=Ye+"px"}else{const Pe=M.length>0&&x===M[0].ref.current;s.style.top="0px";const Ue=Math.max(re,X+y.offsetTop+(Pe?$:0)+de)+he;s.style.height=Ue+"px",y.scrollTop=ve-re+y.offsetTop}s.style.margin=`${bl}px 0`,s.style.minHeight=z+"px",s.style.maxHeight=F+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,s,c,y,x,w,a.dir,r]);za(()=>k(),[k]);const[P,C]=E.useState();za(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const j=E.useCallback(L=>{L&&b.current===!0&&(k(),_==null||_(),b.current=!1)},[k,_]);return d.jsx(sye,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:j,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:d.jsx(An.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});EH.displayName=aye;var oye="SelectPopperPosition",p3=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=bl,...a}=e,o=H2(n);return d.jsx(Xme,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});p3.displayName=oye;var[sye,FO]=ey(fp,{}),m3="SelectViewport",OH=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=Dd(m3,n),o=FO(m3,n),s=Ar(t,a.onViewportChange),l=E.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(V2.Slot,{scope:n,children:d.jsx(An.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Nn(i.onScroll,c=>{const f=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:g}=o;if(g!=null&&g.current&&h){const m=Math.abs(l.current-f.scrollTop);if(m>0){const b=window.innerHeight-bl*2,y=parseFloat(h.style.minHeight),x=parseFloat(h.style.height),w=Math.max(y,x);if(w<b){const _=w+m,k=Math.min(b,_),P=_-k;h.style.height=k+"px",h.style.bottom==="0px"&&(f.scrollTop=P>0?P:0,h.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});OH.displayName=m3;var TH="SelectGroup",[lye,cye]=ey(TH),uye=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=xd();return d.jsx(lye,{scope:n,id:i,children:d.jsx(An.div,{role:"group","aria-labelledby":i,...r,ref:t})})});uye.displayName=TH;var MH="SelectLabel",LH=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=cye(MH,n);return d.jsx(An.div,{id:i.id,...r,ref:t})});LH.displayName=MH;var iw="SelectItem",[fye,RH]=ey(iw),IH=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Id(iw,n),l=Dd(iw,n),c=s.value===r,[f,h]=E.useState(a??""),[g,m]=E.useState(!1),b=Ar(t,_=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,_,r,i)}),y=xd(),x=E.useRef("touch"),w=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(fye,{scope:n,value:r,disabled:i,textId:y,isSelected:c,onItemTextChange:E.useCallback(_=>{h(k=>k||((_==null?void 0:_.textContent)??"").trim())},[]),children:d.jsx(V2.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:d.jsx(An.div,{role:"option","aria-labelledby":y,"data-highlighted":g?"":void 0,"aria-selected":c&&g,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:b,onFocus:Nn(o.onFocus,()=>m(!0)),onBlur:Nn(o.onBlur,()=>m(!1)),onClick:Nn(o.onClick,()=>{x.current!=="mouse"&&w()}),onPointerUp:Nn(o.onPointerUp,()=>{x.current==="mouse"&&w()}),onPointerDown:Nn(o.onPointerDown,_=>{x.current=_.pointerType}),onPointerMove:Nn(o.onPointerMove,_=>{var k;x.current=_.pointerType,i?(k=l.onItemLeave)==null||k.call(l):x.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Nn(o.onPointerLeave,_=>{var k;_.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:Nn(o.onKeyDown,_=>{var P;((P=l.searchRef)==null?void 0:P.current)!==""&&_.key===" "||(Xge.includes(_.key)&&w(),_.key===" "&&_.preventDefault())})})})})});IH.displayName=iw;var kv="SelectItemText",DH=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=Id(kv,n),s=Dd(kv,n),l=RH(kv,n),c=eye(kv,n),[f,h]=E.useState(null),g=Ar(t,w=>h(w),l.onItemTextChange,w=>{var _;return(_=s.itemTextRefCallback)==null?void 0:_.call(s,w,l.value,l.disabled)}),m=f==null?void 0:f.textContent,b=E.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=c;return za(()=>(y(b),()=>x(b)),[y,x,b]),d.jsxs(d.Fragment,{children:[d.jsx(An.span,{id:l.textId,...a,ref:g}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?r1.createPortal(a.children,o.valueNode):null]})});DH.displayName=kv;var FH="SelectItemIndicator",BH=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return RH(FH,n).isSelected?d.jsx(An.span,{"aria-hidden":!0,...r,ref:t}):null});BH.displayName=FH;var g3="SelectScrollUpButton",$H=E.forwardRef((e,t)=>{const n=Dd(g3,e.__scopeSelect),r=FO(g3,e.__scopeSelect),[i,a]=E.useState(!1),o=Ar(t,r.onScrollButtonChange);return za(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?d.jsx(UH,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});$H.displayName=g3;var y3="SelectScrollDownButton",qH=E.forwardRef((e,t)=>{const n=Dd(y3,e.__scopeSelect),r=FO(y3,e.__scopeSelect),[i,a]=E.useState(!1),o=Ar(t,r.onScrollButtonChange);return za(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<c;a(f)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?d.jsx(UH,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});qH.displayName=y3;var UH=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Dd("SelectScrollButton",n),o=E.useRef(null),s=W2(n),l=E.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return E.useEffect(()=>()=>l(),[l]),za(()=>{var f;const c=s().find(h=>h.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),d.jsx(An.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Nn(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Nn(i.onPointerMove,()=>{var c;(c=a.onItemLeave)==null||c.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Nn(i.onPointerLeave,()=>{l()})})}),dye="SelectSeparator",zH=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(An.div,{"aria-hidden":!0,...r,ref:t})});zH.displayName=dye;var v3="SelectArrow",hye=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=H2(n),a=Id(v3,n),o=Dd(v3,n);return a.open&&o.position==="popper"?d.jsx(Qme,{...i,...r,ref:t}):null});hye.displayName=v3;var pye="SelectBubbleInput",VH=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=E.useRef(null),a=Ar(r,i),o=IO(t);return E.useEffect(()=>{const s=i.current;if(!s)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&f){const h=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(h)}},[o,t]),d.jsx(An.select,{...n,style:{...uH,...n.style},ref:a,defaultValue:t})});VH.displayName=pye;function WH(e){return e===""||e===void 0}function HH(e){const t=Pd(e),n=E.useRef(""),r=E.useRef(0),i=E.useCallback(o=>{const s=n.current+o;t(s),(function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),a=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function YH(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=mye(e,Math.max(a,0));i.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function mye(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gye=bH,GH=SH,yye=NH,vye=kH,xye=AH,KH=PH,bye=OH,XH=LH,QH=IH,wye=DH,Sye=BH,JH=$H,ZH=qH,eY=zH;const qm=gye,Um=yye,Jh=E.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(GH,{ref:r,className:Un("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(vye,{asChild:!0,children:d.jsx(x2,{className:"h-4 w-4 opacity-50"})})]}));Jh.displayName=GH.displayName;const tY=E.forwardRef(({className:e,...t},n)=>d.jsx(JH,{ref:n,className:Un("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(yE,{className:"h-4 w-4"})}));tY.displayName=JH.displayName;const nY=E.forwardRef(({className:e,...t},n)=>d.jsx(ZH,{ref:n,className:Un("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(x2,{className:"h-4 w-4"})}));nY.displayName=ZH.displayName;const Zh=E.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>d.jsx(xye,{children:d.jsxs(KH,{ref:i,className:Un("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(tY,{}),d.jsx(bye,{className:Un("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(nY,{})]})}));Zh.displayName=KH.displayName;const _ye=E.forwardRef(({className:e,...t},n)=>d.jsx(XH,{ref:n,className:Un("px-2 py-1.5 text-sm font-semibold",e),...t}));_ye.displayName=XH.displayName;const Ci=E.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(QH,{ref:r,className:Un("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Sye,{children:d.jsx(Od,{className:"h-4 w-4"})})}),d.jsx(wye,{children:t})]}));Ci.displayName=QH.displayName;const Nye=E.forwardRef(({className:e,...t},n)=>d.jsx(eY,{ref:n,className:Un("-mx-1 my-1 h-px bg-muted",e),...t}));Nye.displayName=eY.displayName;function kye({open:e,onClose:t}){const[n,r]=E.useState({name:"",email:"",company:"",website:"",team_size:"",message:""}),[i,a]=E.useState(!1),[o,s]=E.useState(!1),[l,c]=E.useState(null),f=(m,b)=>r(y=>({...y,[m]:b})),h=async m=>{if(m.preventDefault(),c(null),!n.name||!n.email||!n.message){c("Please fill in name, email, and a message.");return}a(!0);try{await ut.entities.ContactMessage.create({...n,source:"enterprise_sales",status:"new"}),s(!0)}catch(b){c((b==null?void 0:b.message)||"Something went wrong. Please try again.")}finally{a(!1)}},g=()=>{t(),setTimeout(()=>{s(!1),r({name:"",email:"",company:"",website:"",team_size:"",message:""}),c(null)},200)};return d.jsx(us,{children:e&&d.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-background/80 backdrop-blur-md",onClick:g,children:d.jsxs(He.div,{initial:{opacity:0,scale:.96,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:10},transition:{duration:.2},className:"relative w-full max-w-lg bg-card border border-white/[0.08] rounded-2xl p-7 shadow-2xl",onClick:m=>m.stopPropagation(),children:[d.jsx("button",{onClick:g,className:"absolute top-4 right-4 p-1.5 rounded-full hover:bg-white/[0.06] transition-colors",children:d.jsx(Lc,{className:"w-4 h-4 text-muted-foreground"})}),o?d.jsxs("div",{className:"py-6 text-center",children:[d.jsx("div",{className:"w-12 h-12 rounded-full bg-accent/10 border border-accent/30 flex items-center justify-center mx-auto mb-4",children:d.jsx(Od,{className:"w-5 h-5 text-accent"})}),d.jsx("h3",{className:"font-display text-2xl font-semibold text-foreground mb-2",style:{letterSpacing:"-0.02em"},children:"Thanks — message received."}),d.jsx("p",{className:"text-sm text-muted-foreground font-light mb-6",children:"We'll get back to you within one business day."}),d.jsx(Ot,{onClick:g,className:"bg-foreground text-background hover:bg-foreground/90 rounded-full",children:"Close"})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"mb-5",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-2",children:"Enterprise"}),d.jsx("h3",{className:"font-display text-2xl font-semibold text-foreground",style:{letterSpacing:"-0.02em"},children:"Talk to sales"}),d.jsx("p",{className:"text-sm text-muted-foreground font-light mt-1",children:"Tell us about your setup — we'll tailor a plan for your team."})]}),d.jsxs("form",{onSubmit:h,className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Name *"}),d.jsx(qr,{value:n.name,onChange:m=>f("name",m.target.value),placeholder:"Jane Doe",className:"bg-muted/40 border-border/50"})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Email *"}),d.jsx(qr,{type:"email",value:n.email,onChange:m=>f("email",m.target.value),placeholder:"jane@acme.com",className:"bg-muted/40 border-border/50"})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Company"}),d.jsx(qr,{value:n.company,onChange:m=>f("company",m.target.value),placeholder:"Acme Inc.",className:"bg-muted/40 border-border/50"})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Website"}),d.jsx(qr,{value:n.website,onChange:m=>f("website",m.target.value),placeholder:"acme.com",className:"bg-muted/40 border-border/50"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Team size"}),d.jsxs(qm,{value:n.team_size,onValueChange:m=>f("team_size",m),children:[d.jsx(Jh,{className:"bg-muted/40 border-border/50",children:d.jsx(Um,{placeholder:"Select team size"})}),d.jsxs(Zh,{children:[d.jsx(Ci,{value:"1-10",children:"1–10"}),d.jsx(Ci,{value:"11-50",children:"11–50"}),d.jsx(Ci,{value:"51-200",children:"51–200"}),d.jsx(Ci,{value:"201-1000",children:"201–1000"}),d.jsx(Ci,{value:"1000+",children:"1000+"})]})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"How can we help? *"}),d.jsx(F2,{value:n.message,onChange:m=>f("message",m.target.value),placeholder:"Number of sites, compliance needs, integrations...",rows:4,className:"bg-muted/40 border-border/50"})]}),l&&d.jsx("p",{className:"text-xs text-destructive",children:l}),d.jsxs(Ot,{type:"submit",disabled:i,className:"w-full bg-foreground text-background hover:bg-foreground/90 rounded-full py-2.5 h-auto text-sm font-semibold gap-2",children:[i&&d.jsx(hn,{className:"w-4 h-4 animate-spin"}),i?"Sending...":"Send message"]})]})]})]})})})}const BO=[{id:"starter",name:"Starter",monthly:{price:"$0",numeric:0},annual:{price:"$0",numeric:0,savingsLabel:"Free forever"},tagline:"Free forever",desc:"See what's attacking your site — and fix the obvious stuff.",features:["1 website","WAF detection (read-only)","Bot detection (read-only)","7-day threat history","Basic vulnerability scan","Dashboard alerts"],cta:"Get started"},{id:"pro",name:"Pro",monthly:{price:"$49",numeric:49},annual:{price:"$490",numeric:490,savingsLabel:"Save $98"},tagline:"Active protection",desc:"Block attackers, not just watch them. For growing SaaS & agencies.",features:["1 website","Active IP blocking + whitelist","Full WAF (SQLi, XSS, SSTI, RCE, path traversal)","Brute force protection","Recon scan auto-blocking","SEO Prerender — up to 10k renders/mo","30-day threat + access history","Priority scans","Email alerts on critical threats"],highlight:!0,cta:"Start Pro"},{id:"compliance",name:"Business",monthly:{price:"$149",numeric:149},annual:{price:"$1,490",numeric:1490,savingsLabel:"Save $298"},tagline:"SOC2-ready",desc:"For SaaS raising funding, fintech, healthtech, agencies with enterprise clients.",features:["2 websites","Everything in Pro","Tamper-evident audit logs (hash chain)","Admin audit trail","Chain verification API","SOC2 compliance reports","ISO 27001 control mapping","Incident documentation","90-day log retention","Unlimited prerender","Compliance export (CSV/PDF)"],cta:"Start Business"},{id:"enterprise",name:"Enterprise",monthly:{price:"$599",numeric:599},annual:{price:"$5,990",numeric:5990,savingsLabel:"Save $1,198"},tagline:"Scale & SLA",desc:"Companies >50 employees, or anyone who needs an SLA.",features:["4 websites","Unlimited log retention","Everything in Business","Custom SLA (99.9% uptime)","Dedicated Slack/email support","Standard invoicing","White-glove onboarding"],cta:"Subscribe"}],Aye="Save ~17%";function rY({value:e,onChange:t,className:n=""}){return d.jsxs("div",{className:`inline-flex items-center gap-1 bg-muted/30 border border-border/50 rounded-full p-1 ${n}`,children:[d.jsx("button",{type:"button",onClick:()=>t("monthly"),className:`text-xs font-medium px-4 py-1.5 rounded-full transition-colors ${e==="monthly"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,children:"Monthly"}),d.jsxs("button",{type:"button",onClick:()=>t("annual"),className:`text-xs font-medium px-4 py-1.5 rounded-full transition-colors inline-flex items-center gap-2 ${e==="annual"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,children:["Annual",d.jsx("span",{className:`text-[9px] font-mono uppercase tracking-wider px-1.5 py-0.5 rounded-full ${e==="annual"?"bg-background/15 text-background":"bg-accent/10 text-accent border border-accent/20"}`,children:Aye})]})]})}function Pye(){const e=E.useRef(null),t=p1(e,{once:!0,margin:"-80px"}),[n,r]=E.useState(!1),[i,a]=E.useState("monthly"),o=async s=>{localStorage.setItem("pending_checkout",JSON.stringify({plan:s.id,period:i,ts:Date.now()})),await ut.auth.isAuthenticated().catch(()=>!1)?window.location.href="/dashboard":ut.auth.redirectToLogin("/dashboard")};return d.jsxs(d.Fragment,{children:[d.jsx(kye,{open:n,onClose:()=>r(!1)}),d.jsx("section",{id:"pricing",className:"py-32 md:py-44 px-6 border-t border-white/[0.05]",children:d.jsxs("div",{className:"max-w-6xl mx-auto",children:[d.jsxs(He.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"flex items-center gap-3 mb-12",children:[d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.2em] text-muted-foreground",children:"10 — Pricing"}),d.jsx("span",{className:"h-px flex-1 bg-white/[0.08]"})]}),d.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between gap-6 mb-16",children:[d.jsxs(He.h2,{ref:e,initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,ease:[.22,1,.36,1]},className:"font-display text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] max-w-3xl",style:{letterSpacing:"-0.04em"},children:[d.jsx("span",{className:"text-foreground/60",children:"Simple, "}),d.jsx("span",{className:"text-foreground",children:"transparent pricing."})]}),d.jsx(He.div,{initial:{opacity:0},animate:t?{opacity:1}:{},transition:{delay:.2,duration:.5},children:d.jsx(rY,{value:i,onChange:a})})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:BO.map((s,l)=>{const c=s[i];return d.jsxs(He.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{delay:l*.07,duration:.6,ease:[.22,1,.36,1]},className:`relative rounded-2xl p-7 flex flex-col ${s.highlight?"bg-white/[0.05] border border-white/[0.15]":"bg-white/[0.02] border border-white/[0.06]"}`,children:[d.jsxs("div",{className:"mb-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground",children:s.name}),s.highlight&&d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-[0.15em] text-foreground",children:"Popular"})]}),d.jsxs("div",{className:"flex items-baseline gap-1 mb-2",children:[d.jsx("span",{className:"text-4xl font-semibold text-foreground tracking-tight",style:{letterSpacing:"-0.03em"},children:c.price}),c.numeric>0&&d.jsx("span",{className:"text-sm text-muted-foreground",children:i==="annual"?"/yr":"/mo"})]}),i==="annual"&&c.savingsLabel&&d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-accent mb-2",children:c.savingsLabel}),d.jsx("p",{className:"text-xs text-muted-foreground font-light leading-relaxed",children:s.desc})]}),d.jsx("ul",{className:"space-y-2.5 flex-1 mb-6",children:s.features.map(f=>d.jsxs("li",{className:"flex items-start gap-2.5",children:[d.jsx(Od,{className:"w-3 h-3 mt-1 flex-shrink-0 text-foreground/60"}),d.jsx("span",{className:"text-xs text-muted-foreground leading-relaxed",children:f})]},f))}),s.id==="enterprise"&&s.annualContactSales&&i==="annual"?d.jsx("button",{onClick:()=>r(!0),className:"w-full text-sm font-semibold py-2.5 rounded-full transition-all duration-200 bg-white/[0.05] border border-white/[0.1] text-foreground hover:bg-white/[0.08]",children:"Talk to sales"}):d.jsx("button",{onClick:()=>o(s),className:`w-full text-sm font-semibold py-2.5 rounded-full transition-all duration-200 ${s.highlight?"bg-foreground text-background hover:bg-foreground/90":"bg-white/[0.05] border border-white/[0.1] text-foreground hover:bg-white/[0.08]"}`,children:s.cta})]},s.id)})})]})})]})}function jye(){return d.jsx("footer",{className:"border-t border-white/[0.06] py-14 px-6",children:d.jsxs("div",{className:"max-w-6xl mx-auto",children:[d.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start gap-10",children:[d.jsxs("div",{children:[d.jsxs(va,{to:"/",className:"flex items-center gap-2 mb-3",children:[d.jsx(Ki,{className:"w-5 h-5 text-primary"}),d.jsxs("span",{className:"text-sm font-semibold",children:["Shield",d.jsx("span",{className:"text-primary",children:"Sync"})]})]}),d.jsx("p",{className:"text-xs text-muted-foreground max-w-[200px] leading-relaxed",children:"Enterprise-grade security monitoring for every website."})]}),d.jsx("div",{className:"grid grid-cols-3 gap-12",children:[{title:"Product",links:["Features","Pricing","How It Works"]},{title:"Company",links:["About","Blog","Careers"]},{title:"Legal",links:["Privacy","Terms","Security"]}].map(e=>d.jsxs("div",{children:[d.jsx("h4",{className:"text-xs font-semibold text-foreground mb-3",children:e.title}),d.jsx("ul",{className:"space-y-2",children:e.links.map(t=>d.jsx("li",{children:d.jsx("a",{href:"#",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:t})},t))})]},e.title))})]}),d.jsxs("div",{className:"mt-12 pt-6 border-t border-white/[0.05] flex flex-col md:flex-row justify-between items-center gap-3",children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"© 2026 ShieldSync. All rights reserved."}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Status: ",d.jsx("span",{className:"text-accent",children:"All systems operational"})]})]})]})})}function Cye(){return E.useEffect(()=>{const t=new URLSearchParams(window.location.search).get("ref");t&&localStorage.setItem("affiliate_ref",t.trim().toUpperCase())},[]),d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(lhe,{}),d.jsx(uhe,{}),d.jsx(yhe,{}),d.jsx(vhe,{}),d.jsx(She,{}),d.jsx(_he,{}),d.jsx(khe,{}),d.jsx(Phe,{}),d.jsx(Che,{}),d.jsx(Ohe,{}),d.jsx(Lhe,{}),d.jsx(Ihe,{}),d.jsx(Pye,{}),d.jsx(jye,{})]})}function Rl(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function dp(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const iY=6048e5,Eye=864e5;let Oye={};function Y2(){return Oye}function a0(e,t){var s,l,c,f;const n=Y2(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=Rl(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function aw(e){return a0(e,{weekStartsOn:1})}function aY(e){const t=Rl(e),n=t.getFullYear(),r=dp(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=aw(r),a=dp(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const o=aw(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function QR(e){const t=Rl(e);return t.setHours(0,0,0,0),t}function JR(e){const t=Rl(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Tye(e,t){const n=QR(e),r=QR(t),i=+n-JR(n),a=+r-JR(r);return Math.round((i-a)/Eye)}function Mye(e){const t=aY(e),n=dp(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),aw(n)}function Lye(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Rye(e){if(!Lye(e)&&typeof e!="number")return!1;const t=Rl(e);return!isNaN(Number(t))}function Iye(e){const t=Rl(e),n=dp(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Dye={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fye=(e,t,n)=>{let r;const i=Dye[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function w_(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Bye={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$ye={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qye={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uye={date:w_({formats:Bye,defaultWidth:"full"}),time:w_({formats:$ye,defaultWidth:"full"}),dateTime:w_({formats:qye,defaultWidth:"full"})},zye={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Vye=(e,t,n,r)=>zye[e];function Qy(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const Wye={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Hye={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Yye={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Gye={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Kye={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Xye={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qye=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Jye={ordinalNumber:Qye,era:Qy({values:Wye,defaultWidth:"wide"}),quarter:Qy({values:Hye,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qy({values:Yye,defaultWidth:"wide"}),day:Qy({values:Gye,defaultWidth:"wide"}),dayPeriod:Qy({values:Kye,defaultWidth:"wide",formattingValues:Xye,defaultFormattingWidth:"wide"})};function Jy(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?eve(s,h=>h.test(o)):Zye(s,h=>h.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(o.length);return{value:c,rest:f}}}function Zye(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function eve(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function tve(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const nve=/^(\d+)(th|st|nd|rd)?/i,rve=/\d+/i,ive={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ave={any:[/^b/i,/^(a|c)/i]},ove={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sve={any:[/1/i,/2/i,/3/i,/4/i]},lve={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},cve={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},uve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fve={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dve={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hve={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},pve={ordinalNumber:tve({matchPattern:nve,parsePattern:rve,valueCallback:e=>parseInt(e,10)}),era:Jy({matchPatterns:ive,defaultMatchWidth:"wide",parsePatterns:ave,defaultParseWidth:"any"}),quarter:Jy({matchPatterns:ove,defaultMatchWidth:"wide",parsePatterns:sve,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Jy({matchPatterns:lve,defaultMatchWidth:"wide",parsePatterns:cve,defaultParseWidth:"any"}),day:Jy({matchPatterns:uve,defaultMatchWidth:"wide",parsePatterns:fve,defaultParseWidth:"any"}),dayPeriod:Jy({matchPatterns:dve,defaultMatchWidth:"any",parsePatterns:hve,defaultParseWidth:"any"})},mve={code:"en-US",formatDistance:Fye,formatLong:Uye,formatRelative:Vye,localize:Jye,match:pve,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gve(e){const t=Rl(e);return Tye(t,Iye(t))+1}function yve(e){const t=Rl(e),n=+aw(t)-+Mye(t);return Math.round(n/iY)+1}function oY(e,t){var f,h,g,m;const n=Rl(e),r=n.getFullYear(),i=Y2(),a=(t==null?void 0:t.firstWeekContainsDate)??((h=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(g=i.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,o=dp(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=a0(o,t),l=dp(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=a0(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function vve(e,t){var s,l,c,f;const n=Y2(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=oY(e,t),a=dp(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),a0(a,t)}function xve(e,t){const n=Rl(e),r=+a0(n,t)-+vve(n,t);return Math.round(r/iY)+1}function sr(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Wf={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return sr(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):sr(n+1,2)},d(e,t){return sr(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return sr(e.getHours()%12||12,t.length)},H(e,t){return sr(e.getHours(),t.length)},m(e,t){return sr(e.getMinutes(),t.length)},s(e,t){return sr(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return sr(i,t.length)}},pm={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ZR={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Wf.y(e,t)},Y:function(e,t,n,r){const i=oY(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return sr(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):sr(a,t.length)},R:function(e,t){const n=aY(e);return sr(n,t.length)},u:function(e,t){const n=e.getFullYear();return sr(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return sr(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return sr(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Wf.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return sr(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=xve(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):sr(i,t.length)},I:function(e,t,n){const r=yve(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):sr(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Wf.d(e,t)},D:function(e,t,n){const r=gve(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):sr(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return sr(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return sr(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return sr(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=pm.noon:r===0?i=pm.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=pm.evening:r>=12?i=pm.afternoon:r>=4?i=pm.morning:i=pm.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Wf.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Wf.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):sr(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):sr(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Wf.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Wf.s(e,t)},S:function(e,t){return Wf.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tI(r);case"XXXX":case"XX":return Ah(r);case"XXXXX":case"XXX":default:return Ah(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tI(r);case"xxxx":case"xx":return Ah(r);case"xxxxx":case"xxx":default:return Ah(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eI(r,":");case"OOOO":default:return"GMT"+Ah(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eI(r,":");case"zzzz":default:return"GMT"+Ah(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return sr(r,t.length)},T:function(e,t,n){const r=e.getTime();return sr(r,t.length)}};function eI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+sr(a,2)}function tI(e,t){return e%60===0?(e>0?"-":"+")+sr(Math.abs(e)/60,2):Ah(e,t)}function Ah(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=sr(Math.trunc(r/60),2),a=sr(r%60,2);return n+i+t+a}const nI=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},sY=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},bve=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return nI(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",nI(r,t)).replace("{{time}}",sY(i,t))},wve={p:sY,P:bve},Sve=/^D+$/,_ve=/^Y+$/,Nve=["D","DD","YY","YYYY"];function kve(e){return Sve.test(e)}function Ave(e){return _ve.test(e)}function Pve(e,t,n){const r=jve(e,t,n);if(console.warn(r),Nve.includes(e))throw new RangeError(r)}function jve(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Cve=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Eve=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ove=/^'([^]*?)'?$/,Tve=/''/g,Mve=/[a-zA-Z]/;function o0(e,t,n){var f,h,g,m;const r=Y2(),i=r.locale??mve,a=r.firstWeekContainsDate??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,o=r.weekStartsOn??((m=(g=r.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,s=Rl(e);if(!Rye(s))throw new RangeError("Invalid time value");let l=t.match(Eve).map(b=>{const y=b[0];if(y==="p"||y==="P"){const x=wve[y];return x(b,i.formatLong)}return b}).join("").match(Cve).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const y=b[0];if(y==="'")return{isToken:!1,value:Lve(b)};if(ZR[y])return{isToken:!0,value:b};if(y.match(Mve))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:b}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(b=>{if(!b.isToken)return b.value;const y=b.value;(Ave(y)||kve(y))&&Pve(y,t,String(e));const x=ZR[y[0]];return x(s,y,i.localize,c)}).join("")}function Lve(e){const t=e.match(Ove);return t?t[1].replace(Tve,"'"):e}function Rve(){const[e]=bz(),t=Li(),[n,r]=E.useState(null),[i,a]=E.useState(!0);E.useEffect(()=>{let f=!1,h=0;const g=20;return(async()=>{if(!await ut.auth.isAuthenticated().catch(()=>!1)){ut.auth.redirectToLogin(window.location.pathname+window.location.search);return}for(;!f&&h<g;){const y=await ut.auth.me().catch(()=>null);if(y!=null&&y.stripe_subscription_id&&y.subscription_status==="active"){r(y),a(!1),t.invalidateQueries({queryKey:["currentUser"]}),t.invalidateQueries({queryKey:["features"]});return}h+=1,await new Promise(x=>setTimeout(x,1e3))}if(!f){const y=await ut.auth.me().catch(()=>null);r(y),a(!1)}})(),()=>{f=!0}},[t,e]);const o=n!=null&&n.plan?BO.find(f=>f.id===n.plan):null,s=(n==null?void 0:n.billing_period)==="annual"?"Annual":(n==null?void 0:n.billing_period)==="monthly"?"Monthly":null,l=n!=null&&n.subscription_current_period_end?o0(new Date(n.subscription_current_period_end),"PPP"):null;if(i)return d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-6",children:d.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[d.jsx(hn,{className:"w-7 h-7 animate-spin text-primary"}),d.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:"Confirming your payment…"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"This takes a few seconds."})]})});const c=(n==null?void 0:n.stripe_subscription_id)&&(n==null?void 0:n.subscription_status)==="active";return d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-6 py-12",children:d.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"w-full max-w-xl",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-8",children:[d.jsx(Ki,{className:"w-5 h-5 text-primary"}),d.jsx("span",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground",children:"ShieldSync"})]}),d.jsx(He.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1,type:"spring",stiffness:200},className:"w-14 h-14 rounded-full bg-accent/10 border border-accent/30 flex items-center justify-center mb-6",children:d.jsx(vE,{className:"w-7 h-7 text-accent"})}),d.jsx("h1",{className:"font-display text-4xl md:text-5xl font-semibold text-foreground mb-3 leading-[1.05]",style:{letterSpacing:"-0.03em"},children:c?"You're all set.":"Almost there."}),d.jsx("p",{className:"text-base text-muted-foreground font-light mb-10 leading-relaxed",children:c?`Welcome aboard${n!=null&&n.full_name?`, ${n.full_name.split(" ")[0]}`:""}. Your subscription is active and your sites are ready to be protected.`:"Your payment is processing. You can head to the dashboard — we'll update your plan as soon as Stripe confirms."}),o&&d.jsxs("div",{className:"bg-card border border-border/50 rounded-2xl p-6 mb-8 space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground",children:"Your plan"}),d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider bg-accent/10 text-accent border border-accent/30 px-2 py-0.5 rounded-full",children:"Active"})]}),d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx("span",{className:"font-display text-3xl font-semibold text-foreground",style:{letterSpacing:"-0.02em"},children:o.name}),s&&d.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",s]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-2",children:[s&&d.jsx(rI,{icon:t1,label:"Billing",value:s}),l&&d.jsx(rI,{icon:kU,label:"Renews",value:l})]})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[d.jsx(va,{to:"/dashboard",className:"flex-1",children:d.jsxs(Ot,{className:"w-full bg-foreground text-background hover:bg-foreground/90 rounded-full gap-2 h-11",children:["Go to dashboard",d.jsx(zg,{className:"w-4 h-4"})]})}),d.jsx(va,{to:"/dashboard/sites",className:"flex-1",children:d.jsx(Ot,{variant:"outline",className:"w-full rounded-full h-11",children:"Add your first site"})})]}),d.jsxs("p",{className:"text-xs text-muted-foreground mt-8 text-center",children:["A receipt has been sent to ",(n==null?void 0:n.email)||"your email",". Manage billing from"," ",d.jsx(va,{to:"/dashboard/subscription",className:"text-primary hover:underline",children:"Subscription"}),"."]})]})})}function rI({icon:e,label:t,value:n}){return d.jsxs("div",{className:"flex items-start gap-2.5 bg-muted/30 border border-border/40 rounded-lg p-3",children:[d.jsx(e,{className:"w-3.5 h-3.5 text-muted-foreground mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-muted-foreground",children:t}),d.jsx("p",{className:"text-sm text-foreground truncate",children:n})]})]})}const Ive=[{icon:zte,label:"Overview",path:"/dashboard"},{icon:jc,label:"Sites",path:"/dashboard/sites"},{icon:Ki,label:"Scans",path:"/dashboard/scans"},{icon:so,label:"Attacks",path:"/dashboard/attacks"},{icon:pg,label:"Alerts",path:"/dashboard/alerts"},{icon:Lte,label:"Compliance",path:"/dashboard/compliance"},{icon:Lu,label:"Protection",path:"/dashboard/protection"},{icon:t1,label:"Subscription",path:"/dashboard/subscription"},{icon:Sne,label:"Settings",path:"/dashboard/settings"}];function Dve({collapsed:e,setCollapsed:t}){const n=Np(),r=i=>i==="/dashboard"?n.pathname==="/dashboard":n.pathname.startsWith(i);return d.jsxs(He.aside,{animate:{width:e?72:260},transition:{duration:.3,ease:[.22,1,.36,1]},className:"fixed left-0 top-0 bottom-0 z-40 bg-sidebar border-r border-sidebar-border flex flex-col",children:[d.jsx("div",{className:"h-16 flex items-center px-5 border-b border-sidebar-border",children:d.jsxs(va,{to:"/",className:"flex items-center gap-3 overflow-hidden",children:[d.jsx(Ki,{className:"w-7 h-7 text-sidebar-primary flex-shrink-0"}),!e&&d.jsxs(He.span,{initial:{opacity:0},animate:{opacity:1},className:"text-base font-bold text-sidebar-foreground whitespace-nowrap",children:["Shield",d.jsx("span",{className:"text-sidebar-primary",children:"Sync"})]})]})}),d.jsx("nav",{className:"flex-1 py-4 px-3 space-y-1 overflow-hidden",children:Ive.map(i=>{const a=r(i.path);return d.jsxs(va,{to:i.path,className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 group relative ${a?"bg-sidebar-accent text-sidebar-primary":"text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent/50"}`,children:[a&&d.jsx(He.div,{layoutId:"sidebar-indicator",className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-sidebar-primary rounded-r-full",transition:{duration:.2}}),d.jsx(i.icon,{className:`w-5 h-5 flex-shrink-0 ${a?"text-sidebar-primary":""}`}),!e&&d.jsx("span",{className:"text-sm font-medium whitespace-nowrap",children:i.label})]},i.path)})}),d.jsxs("div",{className:"p-3 border-t border-sidebar-border",children:[d.jsx("button",{onClick:()=>t(!e),className:"flex items-center gap-3 px-3 py-2.5 rounded-lg text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 transition-all w-full",children:e?d.jsx(b2,{className:"w-5 h-5 flex-shrink-0"}):d.jsxs(d.Fragment,{children:[d.jsx(gE,{className:"w-5 h-5 flex-shrink-0"}),d.jsx("span",{className:"text-sm",children:"Collapse"})]})}),d.jsxs("button",{onClick:()=>ut.auth.logout(),className:"flex items-center gap-3 px-3 py-2.5 rounded-lg text-sidebar-foreground/60 hover:text-destructive hover:bg-destructive/10 transition-all w-full mt-1",children:[d.jsx(jU,{className:"w-5 h-5 flex-shrink-0"}),!e&&d.jsx("span",{className:"text-sm",children:"Sign Out"})]})]})]})}//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var lY;function Xe(){return lY.apply(null,arguments)}function Fve(e){lY=e}function Ol(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function ep(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function qn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $O(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(qn(e,t))return!1;return!0}function jo(e){return e===void 0}function Xu(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function g1(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function cY(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function fd(e,t){for(var n in t)qn(t,n)&&(e[n]=t[n]);return qn(t,"toString")&&(e.toString=t.toString),qn(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Ic(e,t,n,r){return TY(e,t,n,r,!0).utc()}function Bve(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function mn(e){return e._pf==null&&(e._pf=Bve()),e._pf}var x3;Array.prototype.some?x3=Array.prototype.some:x3=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function qO(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=mn(e),n=x3.call(t.parsedDateParts,function(i){return i!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function G2(e){var t=Ic(NaN);return e!=null?fd(mn(t),e):mn(t).userInvalidated=!0,t}var iI=Xe.momentProperties=[],S_=!1;function UO(e,t){var n,r,i,a=iI.length;if(jo(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),jo(t._i)||(e._i=t._i),jo(t._f)||(e._f=t._f),jo(t._l)||(e._l=t._l),jo(t._strict)||(e._strict=t._strict),jo(t._tzm)||(e._tzm=t._tzm),jo(t._isUTC)||(e._isUTC=t._isUTC),jo(t._offset)||(e._offset=t._offset),jo(t._pf)||(e._pf=mn(t)),jo(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=iI[n],i=t[r],jo(i)||(e[r]=i);return e}function y1(e){UO(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),S_===!1&&(S_=!0,Xe.updateOffset(this),S_=!1)}function Tl(e){return e instanceof y1||e!=null&&e._isAMomentObject!=null}function uY(e){Xe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Ks(e,t){var n=!0;return fd(function(){if(Xe.deprecationHandler!=null&&Xe.deprecationHandler(null,e),n){var r=[],i,a,o,s=arguments.length;for(a=0;a<s;a++){if(i="",typeof arguments[a]=="object"){i+=`
[`+a+"] ";for(o in arguments[0])qn(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}uY(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var aI={};function fY(e,t){Xe.deprecationHandler!=null&&Xe.deprecationHandler(e,t),aI[e]||(uY(t),aI[e]=!0)}Xe.suppressDeprecationWarnings=!1;Xe.deprecationHandler=null;function Dc(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function $ve(e){var t,n;for(n in e)qn(e,n)&&(t=e[n],Dc(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function b3(e,t){var n=fd({},e),r;for(r in t)qn(t,r)&&(ep(e[r])&&ep(t[r])?(n[r]={},fd(n[r],e[r]),fd(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)qn(e,r)&&!qn(t,r)&&ep(e[r])&&(n[r]=fd({},n[r]));return n}function zO(e){e!=null&&this.set(e)}var w3;Object.keys?w3=Object.keys:w3=function(e){var t,n=[];for(t in e)qn(e,t)&&n.push(t);return n};var qve={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Uve(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Dc(r)?r.call(t,n):r}function Oc(e,t,n){var r=""+Math.abs(e),i=t-r.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var VO=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ex=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,__={},zm={};function Ft(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(zm[e]=i),t&&(zm[t[0]]=function(){return Oc(i.apply(this,arguments),t[1],t[2])}),n&&(zm[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function zve(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Vve(e){var t=e.match(VO),n,r;for(n=0,r=t.length;n<r;n++)zm[t[n]]?t[n]=zm[t[n]]:t[n]=zve(t[n]);return function(i){var a="",o;for(o=0;o<r;o++)a+=Dc(t[o])?t[o].call(i,e):t[o];return a}}function kb(e,t){return e.isValid()?(t=dY(t,e.localeData()),__[t]=__[t]||Vve(t),__[t](e)):e.localeData().invalidDate()}function dY(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(Ex.lastIndex=0;n>=0&&Ex.test(e);)e=e.replace(Ex,r),Ex.lastIndex=0,n-=1;return e}var Wve={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Hve(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(VO).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var Yve="Invalid date";function Gve(){return this._invalidDate}var Kve="%d",Xve=/\d{1,2}/;function Qve(e){return this._ordinal.replace("%d",e)}var Jve={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Zve(e,t,n,r){var i=this._relativeTime[n];return Dc(i)?i(e,t,n,r):i.replace(/%d/i,e)}function e0e(e,t){var n=this._relativeTime[e>0?"future":"past"];return Dc(n)?n(t):n.replace(/%s/i,t)}var oI={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Xs(e){return typeof e=="string"?oI[e]||oI[e.toLowerCase()]:void 0}function WO(e){var t={},n,r;for(r in e)qn(e,r)&&(n=Xs(r),n&&(t[n]=e[r]));return t}var t0e={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function n0e(e){var t=[],n;for(n in e)qn(e,n)&&t.push({unit:n,priority:t0e[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var hY=/\d/,hs=/\d\d/,pY=/\d{3}/,HO=/\d{4}/,K2=/[+-]?\d{6}/,Mr=/\d\d?/,mY=/\d\d\d\d?/,gY=/\d\d\d\d\d\d?/,X2=/\d{1,3}/,YO=/\d{1,4}/,Q2=/[+-]?\d{1,6}/,ty=/\d+/,J2=/[+-]?\d+/,r0e=/Z|[+-]\d\d:?\d\d/gi,Z2=/Z|[+-]\d\d(?::?\d\d)?/gi,i0e=/[+-]?\d+(\.\d{1,3})?/,v1=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ny=/^[1-9]\d?/,GO=/^([1-9]\d|\d)/,ow;ow={};function vt(e,t,n){ow[e]=Dc(t)?t:function(r,i){return r&&n?n:t}}function a0e(e,t){return qn(ow,e)?ow[e](t._strict,t._locale):new RegExp(o0e(e))}function o0e(e){return Uu(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,a){return n||r||i||a}))}function Uu(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function qs(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Pn(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=qs(t)),n}var S3={};function hr(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),Xu(t)&&(r=function(a,o){o[t]=Pn(a)}),i=e.length,n=0;n<i;n++)S3[e[n]]=r}function x1(e,t){hr(e,function(n,r,i,a){i._w=i._w||{},t(n,i._w,i,a)})}function s0e(e,t,n){t!=null&&qn(S3,e)&&S3[e](t,n._a,n,e)}function e5(e){return e%4===0&&e%100!==0||e%400===0}var Ua=0,Ru=1,mc=2,Yi=3,Al=4,Iu=5,Rh=6,l0e=7,c0e=8;Ft("Y",0,0,function(){var e=this.year();return e<=9999?Oc(e,4):"+"+e});Ft(0,["YY",2],0,function(){return this.year()%100});Ft(0,["YYYY",4],0,"year");Ft(0,["YYYYY",5],0,"year");Ft(0,["YYYYYY",6,!0],0,"year");vt("Y",J2);vt("YY",Mr,hs);vt("YYYY",YO,HO);vt("YYYYY",Q2,K2);vt("YYYYYY",Q2,K2);hr(["YYYYY","YYYYYY"],Ua);hr("YYYY",function(e,t){t[Ua]=e.length===2?Xe.parseTwoDigitYear(e):Pn(e)});hr("YY",function(e,t){t[Ua]=Xe.parseTwoDigitYear(e)});hr("Y",function(e,t){t[Ua]=parseInt(e,10)});function Rv(e){return e5(e)?366:365}Xe.parseTwoDigitYear=function(e){return Pn(e)+(Pn(e)>68?1900:2e3)};var yY=ry("FullYear",!0);function u0e(){return e5(this.year())}function ry(e,t){return function(n){return n!=null?(vY(this,e,n),Xe.updateOffset(this,t),this):s0(this,e)}}function s0(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function vY(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!e5(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function f0e(e){return e=Xs(e),Dc(this[e])?this[e]():this}function d0e(e,t){if(typeof e=="object"){e=WO(e);var n=n0e(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=Xs(e),Dc(this[e]))return this[e](t);return this}function h0e(e,t){return(e%t+t)%t}var vi;Array.prototype.indexOf?vi=Array.prototype.indexOf:vi=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function KO(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=h0e(t,12);return e+=(t-n)/12,n===1?e5(e)?29:28:31-n%7%2}Ft("M",["MM",2],"Mo",function(){return this.month()+1});Ft("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Ft("MMMM",0,0,function(e){return this.localeData().months(this,e)});vt("M",Mr,ny);vt("MM",Mr,hs);vt("MMM",function(e,t){return t.monthsShortRegex(e)});vt("MMMM",function(e,t){return t.monthsRegex(e)});hr(["M","MM"],function(e,t){t[Ru]=Pn(e)-1});hr(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[Ru]=i:mn(n).invalidMonth=e});var p0e="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xY="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),bY=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,m0e=v1,g0e=v1;function y0e(e,t){return e?Ol(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||bY).test(t)?"format":"standalone"][e.month()]:Ol(this._months)?this._months:this._months.standalone}function v0e(e,t){return e?Ol(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[bY.test(t)?"format":"standalone"][e.month()]:Ol(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function x0e(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=Ic([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(i=vi.call(this._shortMonthsParse,o),i!==-1?i:null):(i=vi.call(this._longMonthsParse,o),i!==-1?i:null):t==="MMM"?(i=vi.call(this._shortMonthsParse,o),i!==-1?i:(i=vi.call(this._longMonthsParse,o),i!==-1?i:null)):(i=vi.call(this._longMonthsParse,o),i!==-1?i:(i=vi.call(this._shortMonthsParse,o),i!==-1?i:null))}function b0e(e,t,n){var r,i,a;if(this._monthsParseExact)return x0e.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ic([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function wY(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Pn(t);else if(t=e.localeData().monthsParse(t),!Xu(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,KO(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function SY(e){return e!=null?(wY(this,e),Xe.updateOffset(this,!0),this):s0(this,"Month")}function w0e(){return KO(this.year(),this.month())}function S0e(e){return this._monthsParseExact?(qn(this,"_monthsRegex")||_Y.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(qn(this,"_monthsShortRegex")||(this._monthsShortRegex=m0e),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function _0e(e){return this._monthsParseExact?(qn(this,"_monthsRegex")||_Y.call(this),e?this._monthsStrictRegex:this._monthsRegex):(qn(this,"_monthsRegex")||(this._monthsRegex=g0e),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function _Y(){function e(l,c){return c.length-l.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=Ic([2e3,i]),o=Uu(this.monthsShort(a,"")),s=Uu(this.months(a,"")),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function N0e(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function l0(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function sw(e,t,n){var r=7+t-n,i=(7+l0(e,0,r).getUTCDay()-t)%7;return-i+r-1}function NY(e,t,n,r,i){var a=(7+n-r)%7,o=sw(e,r,i),s=1+7*(t-1)+a+o,l,c;return s<=0?(l=e-1,c=Rv(l)+s):s>Rv(e)?(l=e+1,c=s-Rv(e)):(l=e,c=s),{year:l,dayOfYear:c}}function c0(e,t,n){var r=sw(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+zu(o,t,n)):i>zu(e.year(),t,n)?(a=i-zu(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function zu(e,t,n){var r=sw(e,t,n),i=sw(e+1,t,n);return(Rv(e)-r+i)/7}Ft("w",["ww",2],"wo","week");Ft("W",["WW",2],"Wo","isoWeek");vt("w",Mr,ny);vt("ww",Mr,hs);vt("W",Mr,ny);vt("WW",Mr,hs);x1(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Pn(e)});function k0e(e){return c0(e,this._week.dow,this._week.doy).week}var A0e={dow:0,doy:6};function P0e(){return this._week.dow}function j0e(){return this._week.doy}function C0e(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function E0e(e){var t=c0(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ft("d",0,"do","day");Ft("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ft("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ft("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ft("e",0,0,"weekday");Ft("E",0,0,"isoWeekday");vt("d",Mr);vt("e",Mr);vt("E",Mr);vt("dd",function(e,t){return t.weekdaysMinRegex(e)});vt("ddd",function(e,t){return t.weekdaysShortRegex(e)});vt("dddd",function(e,t){return t.weekdaysRegex(e)});x1(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:mn(n).invalidWeekday=e});x1(["d","e","E"],function(e,t,n,r){t[r]=Pn(e)});function O0e(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function T0e(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function XO(e,t){return e.slice(t,7).concat(e.slice(0,t))}var M0e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),kY="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),L0e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),R0e=v1,I0e=v1,D0e=v1;function F0e(e,t){var n=Ol(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?XO(n,this._week.dow):e?n[e.day()]:n}function B0e(e){return e===!0?XO(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function $0e(e){return e===!0?XO(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function q0e(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Ic([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=vi.call(this._weekdaysParse,o),i!==-1?i:null):t==="ddd"?(i=vi.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=vi.call(this._minWeekdaysParse,o),i!==-1?i:null):t==="dddd"?(i=vi.call(this._weekdaysParse,o),i!==-1||(i=vi.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=vi.call(this._minWeekdaysParse,o),i!==-1?i:null)):t==="ddd"?(i=vi.call(this._shortWeekdaysParse,o),i!==-1||(i=vi.call(this._weekdaysParse,o),i!==-1)?i:(i=vi.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=vi.call(this._minWeekdaysParse,o),i!==-1||(i=vi.call(this._weekdaysParse,o),i!==-1)?i:(i=vi.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function U0e(e,t,n){var r,i,a;if(this._weekdaysParseExact)return q0e.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ic([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function z0e(e){if(!this.isValid())return e!=null?this:NaN;var t=s0(this,"Day");return e!=null?(e=O0e(e,this.localeData()),this.add(e-t,"d")):t}function V0e(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function W0e(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=T0e(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function H0e(e){return this._weekdaysParseExact?(qn(this,"_weekdaysRegex")||QO.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(qn(this,"_weekdaysRegex")||(this._weekdaysRegex=R0e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Y0e(e){return this._weekdaysParseExact?(qn(this,"_weekdaysRegex")||QO.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(qn(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=I0e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function G0e(e){return this._weekdaysParseExact?(qn(this,"_weekdaysRegex")||QO.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(qn(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=D0e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function QO(){function e(f,h){return h.length-f.length}var t=[],n=[],r=[],i=[],a,o,s,l,c;for(a=0;a<7;a++)o=Ic([2e3,1]).day(a),s=Uu(this.weekdaysMin(o,"")),l=Uu(this.weekdaysShort(o,"")),c=Uu(this.weekdays(o,"")),t.push(s),n.push(l),r.push(c),i.push(s),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function JO(){return this.hours()%12||12}function K0e(){return this.hours()||24}Ft("H",["HH",2],0,"hour");Ft("h",["hh",2],0,JO);Ft("k",["kk",2],0,K0e);Ft("hmm",0,0,function(){return""+JO.apply(this)+Oc(this.minutes(),2)});Ft("hmmss",0,0,function(){return""+JO.apply(this)+Oc(this.minutes(),2)+Oc(this.seconds(),2)});Ft("Hmm",0,0,function(){return""+this.hours()+Oc(this.minutes(),2)});Ft("Hmmss",0,0,function(){return""+this.hours()+Oc(this.minutes(),2)+Oc(this.seconds(),2)});function AY(e,t){Ft(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}AY("a",!0);AY("A",!1);function PY(e,t){return t._meridiemParse}vt("a",PY);vt("A",PY);vt("H",Mr,GO);vt("h",Mr,ny);vt("k",Mr,ny);vt("HH",Mr,hs);vt("hh",Mr,hs);vt("kk",Mr,hs);vt("hmm",mY);vt("hmmss",gY);vt("Hmm",mY);vt("Hmmss",gY);hr(["H","HH"],Yi);hr(["k","kk"],function(e,t,n){var r=Pn(e);t[Yi]=r===24?0:r});hr(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});hr(["h","hh"],function(e,t,n){t[Yi]=Pn(e),mn(n).bigHour=!0});hr("hmm",function(e,t,n){var r=e.length-2;t[Yi]=Pn(e.substr(0,r)),t[Al]=Pn(e.substr(r)),mn(n).bigHour=!0});hr("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Yi]=Pn(e.substr(0,r)),t[Al]=Pn(e.substr(r,2)),t[Iu]=Pn(e.substr(i)),mn(n).bigHour=!0});hr("Hmm",function(e,t,n){var r=e.length-2;t[Yi]=Pn(e.substr(0,r)),t[Al]=Pn(e.substr(r))});hr("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Yi]=Pn(e.substr(0,r)),t[Al]=Pn(e.substr(r,2)),t[Iu]=Pn(e.substr(i))});function X0e(e){return(e+"").toLowerCase().charAt(0)==="p"}var Q0e=/[ap]\.?m?\.?/i,J0e=ry("Hours",!0);function Z0e(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var jY={calendar:qve,longDateFormat:Wve,invalidDate:Yve,ordinal:Kve,dayOfMonthOrdinalParse:Xve,relativeTime:Jve,months:p0e,monthsShort:xY,week:A0e,weekdays:M0e,weekdaysMin:L0e,weekdaysShort:kY,meridiemParse:Q0e},$r={},Zy={},u0;function e1e(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function sI(e){return e&&e.toLowerCase().replace("_","-")}function t1e(e){for(var t=0,n,r,i,a;t<e.length;){for(a=sI(e[t]).split("-"),n=a.length,r=sI(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=t5(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&e1e(a,r)>=n-1)break;n--}t++}return u0}function n1e(e){return!!(e&&e.match("^[^/\\\\]*$"))}function t5(e){var t=null,n;if($r[e]===void 0&&typeof module<"u"&&module&&module.exports&&n1e(e))try{t=u0._abbr,n=require,n("./locale/"+e),bd(t)}catch{$r[e]=null}return $r[e]}function bd(e,t){var n;return e&&(jo(t)?n=nf(e):n=ZO(e,t),n?u0=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),u0._abbr}function ZO(e,t){if(t!==null){var n,r=jY;if(t.abbr=e,$r[e]!=null)fY("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=$r[e]._config;else if(t.parentLocale!=null)if($r[t.parentLocale]!=null)r=$r[t.parentLocale]._config;else if(n=t5(t.parentLocale),n!=null)r=n._config;else return Zy[t.parentLocale]||(Zy[t.parentLocale]=[]),Zy[t.parentLocale].push({name:e,config:t}),null;return $r[e]=new zO(b3(r,t)),Zy[e]&&Zy[e].forEach(function(i){ZO(i.name,i.config)}),bd(e),$r[e]}else return delete $r[e],null}function r1e(e,t){if(t!=null){var n,r,i=jY;$r[e]!=null&&$r[e].parentLocale!=null?$r[e].set(b3($r[e]._config,t)):(r=t5(e),r!=null&&(i=r._config),t=b3(i,t),r==null&&(t.abbr=e),n=new zO(t),n.parentLocale=$r[e],$r[e]=n),bd(e)}else $r[e]!=null&&($r[e].parentLocale!=null?($r[e]=$r[e].parentLocale,e===bd()&&bd(e)):$r[e]!=null&&delete $r[e]);return $r[e]}function nf(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return u0;if(!Ol(e)){if(t=t5(e),t)return t;e=[e]}return t1e(e)}function i1e(){return w3($r)}function e4(e){var t,n=e._a;return n&&mn(e).overflow===-2&&(t=n[Ru]<0||n[Ru]>11?Ru:n[mc]<1||n[mc]>KO(n[Ua],n[Ru])?mc:n[Yi]<0||n[Yi]>24||n[Yi]===24&&(n[Al]!==0||n[Iu]!==0||n[Rh]!==0)?Yi:n[Al]<0||n[Al]>59?Al:n[Iu]<0||n[Iu]>59?Iu:n[Rh]<0||n[Rh]>999?Rh:-1,mn(e)._overflowDayOfYear&&(t<Ua||t>mc)&&(t=mc),mn(e)._overflowWeeks&&t===-1&&(t=l0e),mn(e)._overflowWeekday&&t===-1&&(t=c0e),mn(e).overflow=t),e}var a1e=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,o1e=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,s1e=/Z|[+-]\d\d(?::?\d\d)?/,Ox=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],N_=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],l1e=/^\/?Date\((-?\d+)/i,c1e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,u1e={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function CY(e){var t,n,r=e._i,i=a1e.exec(r)||o1e.exec(r),a,o,s,l,c=Ox.length,f=N_.length;if(i){for(mn(e).iso=!0,t=0,n=c;t<n;t++)if(Ox[t][1].exec(i[1])){o=Ox[t][0],a=Ox[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=f;t<n;t++)if(N_[t][1].exec(i[3])){s=(i[2]||" ")+N_[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4])if(s1e.exec(i[4]))l="Z";else{e._isValid=!1;return}e._f=o+(s||"")+(l||""),n4(e)}else e._isValid=!1}function f1e(e,t,n,r,i,a){var o=[d1e(e),xY.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function d1e(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function h1e(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function p1e(e,t,n){if(e){var r=kY.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return mn(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function m1e(e,t,n){if(e)return u1e[e];if(t)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function EY(e){var t=c1e.exec(h1e(e._i)),n;if(t){if(n=f1e(t[4],t[3],t[2],t[5],t[6],t[7]),!p1e(t[1],n,e))return;e._a=n,e._tzm=m1e(t[8],t[9],t[10]),e._d=l0.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),mn(e).rfc2822=!0}else e._isValid=!1}function g1e(e){var t=l1e.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(CY(e),e._isValid===!1)delete e._isValid;else return;if(EY(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Xe.createFromInputFallback(e)}Xe.createFromInputFallback=Ks("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Am(e,t,n){return e??t??n}function y1e(e){var t=new Date(Xe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function t4(e){var t,n,r=[],i,a,o;if(!e._d){for(i=y1e(e),e._w&&e._a[mc]==null&&e._a[Ru]==null&&v1e(e),e._dayOfYear!=null&&(o=Am(e._a[Ua],i[Ua]),(e._dayOfYear>Rv(o)||e._dayOfYear===0)&&(mn(e)._overflowDayOfYear=!0),n=l0(o,0,e._dayOfYear),e._a[Ru]=n.getUTCMonth(),e._a[mc]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Yi]===24&&e._a[Al]===0&&e._a[Iu]===0&&e._a[Rh]===0&&(e._nextDay=!0,e._a[Yi]=0),e._d=(e._useUTC?l0:N0e).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Yi]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(mn(e).weekdayMismatch=!0)}}function v1e(e){var t,n,r,i,a,o,s,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=Am(t.GG,e._a[Ua],c0(Tr(),1,4).year),r=Am(t.W,1),i=Am(t.E,1),(i<1||i>7)&&(l=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,c=c0(Tr(),a,o),n=Am(t.gg,e._a[Ua],c.year),r=Am(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),r<1||r>zu(n,a,o)?mn(e)._overflowWeeks=!0:l!=null?mn(e)._overflowWeekday=!0:(s=NY(n,r,i,a,o),e._a[Ua]=s.year,e._dayOfYear=s.dayOfYear)}Xe.ISO_8601=function(){};Xe.RFC_2822=function(){};function n4(e){if(e._f===Xe.ISO_8601){CY(e);return}if(e._f===Xe.RFC_2822){EY(e);return}e._a=[],mn(e).empty=!0;var t=""+e._i,n,r,i,a,o,s=t.length,l=0,c,f;for(i=dY(e._f,e._locale).match(VO)||[],f=i.length,n=0;n<f;n++)a=i[n],r=(t.match(a0e(a,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&mn(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),l+=r.length),zm[a]?(r?mn(e).empty=!1:mn(e).unusedTokens.push(a),s0e(a,r,e)):e._strict&&!r&&mn(e).unusedTokens.push(a);mn(e).charsLeftOver=s-l,t.length>0&&mn(e).unusedInput.push(t),e._a[Yi]<=12&&mn(e).bigHour===!0&&e._a[Yi]>0&&(mn(e).bigHour=void 0),mn(e).parsedDateParts=e._a.slice(0),mn(e).meridiem=e._meridiem,e._a[Yi]=x1e(e._locale,e._a[Yi],e._meridiem),c=mn(e).era,c!==null&&(e._a[Ua]=e._locale.erasConvertYear(c,e._a[Ua])),t4(e),e4(e)}function x1e(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function b1e(e){var t,n,r,i,a,o,s=!1,l=e._f.length;if(l===0){mn(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<l;i++)a=0,o=!1,t=UO({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],n4(t),qO(t)&&(o=!0),a+=mn(t).charsLeftOver,a+=mn(t).unusedTokens.length*10,mn(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));fd(e,n||t)}function w1e(e){if(!e._d){var t=WO(e._i),n=t.day===void 0?t.date:t.day;e._a=cY([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),t4(e)}}function S1e(e){var t=new y1(e4(OY(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function OY(e){var t=e._i,n=e._f;return e._locale=e._locale||nf(e._l),t===null||n===void 0&&t===""?G2({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Tl(t)?new y1(e4(t)):(g1(t)?e._d=t:Ol(n)?b1e(e):n?n4(e):_1e(e),qO(e)||(e._d=null),e))}function _1e(e){var t=e._i;jo(t)?e._d=new Date(Xe.now()):g1(t)?e._d=new Date(t.valueOf()):typeof t=="string"?g1e(e):Ol(t)?(e._a=cY(t.slice(0),function(n){return parseInt(n,10)}),t4(e)):ep(t)?w1e(e):Xu(t)?e._d=new Date(t):Xe.createFromInputFallback(e)}function TY(e,t,n,r,i){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(ep(e)&&$O(e)||Ol(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,S1e(a)}function Tr(e,t,n,r){return TY(e,t,n,r,!1)}var N1e=Ks("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:G2()}),k1e=Ks("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:G2()});function MY(e,t){var n,r;if(t.length===1&&Ol(t[0])&&(t=t[0]),!t.length)return Tr();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function A1e(){var e=[].slice.call(arguments,0);return MY("isBefore",e)}function P1e(){var e=[].slice.call(arguments,0);return MY("isAfter",e)}var j1e=function(){return Date.now?Date.now():+new Date},ev=["year","quarter","month","week","day","hour","minute","second","millisecond"];function C1e(e){var t,n=!1,r,i=ev.length;for(t in e)if(qn(e,t)&&!(vi.call(ev,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[ev[r]]){if(n)return!1;parseFloat(e[ev[r]])!==Pn(e[ev[r]])&&(n=!0)}return!0}function E1e(){return this._isValid}function O1e(){return Il(NaN)}function n5(e){var t=WO(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,f=t.millisecond||0;this._isValid=C1e(t),this._milliseconds=+f+c*1e3+l*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=nf(),this._bubble()}function Ab(e){return e instanceof n5}function _3(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function T1e(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)Pn(e[o])!==Pn(t[o])&&a++;return a+i}function LY(e,t){Ft(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Oc(~~(n/60),2)+t+Oc(~~n%60,2)})}LY("Z",":");LY("ZZ","");vt("Z",Z2);vt("ZZ",Z2);hr(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=r4(Z2,e)});var M1e=/([\+\-]|\d\d)/gi;function r4(e,t){var n=(t||"").match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(M1e)||["-",0,0],a=+(i[1]*60)+Pn(i[2]),a===0?0:i[0]==="+"?a:-a)}function i4(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Tl(e)||g1(e)?e.valueOf():Tr(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Xe.updateOffset(n,!1),n):Tr(e).local()}function N3(e){return-Math.round(e._d.getTimezoneOffset())}Xe.updateOffset=function(){};function L1e(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=r4(Z2,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=N3(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?DY(this,Il(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Xe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:N3(this)}function R1e(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function I1e(e){return this.utcOffset(0,e)}function D1e(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(N3(this),"m")),this}function F1e(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=r4(r0e,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function B1e(e){return this.isValid()?(e=e?Tr(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function $1e(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function q1e(){if(!jo(this._isDSTShifted))return this._isDSTShifted;var e={},t;return UO(e,this),e=OY(e),e._a?(t=e._isUTC?Ic(e._a):Tr(e._a),this._isDSTShifted=this.isValid()&&T1e(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function U1e(){return this.isValid()?!this._isUTC:!1}function z1e(){return this.isValid()?this._isUTC:!1}function RY(){return this.isValid()?this._isUTC&&this._offset===0:!1}var V1e=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,W1e=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Il(e,t){var n=e,r=null,i,a,o;return Ab(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Xu(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=V1e.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:Pn(r[mc])*i,h:Pn(r[Yi])*i,m:Pn(r[Al])*i,s:Pn(r[Iu])*i,ms:Pn(_3(r[Rh]*1e3))*i}):(r=W1e.exec(e))?(i=r[1]==="-"?-1:1,n={y:bh(r[2],i),M:bh(r[3],i),w:bh(r[4],i),d:bh(r[5],i),h:bh(r[6],i),m:bh(r[7],i),s:bh(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=H1e(Tr(n.from),Tr(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new n5(n),Ab(e)&&qn(e,"_locale")&&(a._locale=e._locale),Ab(e)&&qn(e,"_isValid")&&(a._isValid=e._isValid),a}Il.fn=n5.prototype;Il.invalid=O1e;function bh(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function lI(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function H1e(e,t){var n;return e.isValid()&&t.isValid()?(t=i4(t,e),e.isBefore(t)?n=lI(e,t):(n=lI(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function IY(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(fY(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Il(n,r),DY(this,i,e),this}}function DY(e,t,n,r){var i=t._milliseconds,a=_3(t._days),o=_3(t._months);e.isValid()&&(r=r??!0,o&&wY(e,s0(e,"Month")+o*n),a&&vY(e,"Date",s0(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&Xe.updateOffset(e,a||o))}var Y1e=IY(1,"add"),G1e=IY(-1,"subtract");function FY(e){return typeof e=="string"||e instanceof String}function K1e(e){return Tl(e)||g1(e)||FY(e)||Xu(e)||Q1e(e)||X1e(e)||e===null||e===void 0}function X1e(e){var t=ep(e)&&!$O(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n=n||qn(e,a);return t&&n}function Q1e(e){var t=Ol(e),n=!1;return t&&(n=e.filter(function(r){return!Xu(r)&&FY(e)}).length===0),t&&n}function J1e(e){var t=ep(e)&&!$O(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||qn(e,a);return t&&n}function Z1e(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function exe(e,t){arguments.length===1&&(arguments[0]?K1e(arguments[0])?(e=arguments[0],t=void 0):J1e(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Tr(),r=i4(n,this).startOf("day"),i=Xe.calendarFormat(this,r)||"sameElse",a=t&&(Dc(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Tr(n)))}function txe(){return new y1(this)}function nxe(e,t){var n=Tl(e)?e:Tr(e);return this.isValid()&&n.isValid()?(t=Xs(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function rxe(e,t){var n=Tl(e)?e:Tr(e);return this.isValid()&&n.isValid()?(t=Xs(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function ixe(e,t,n,r){var i=Tl(e)?e:Tr(e),a=Tl(t)?t:Tr(t);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function axe(e,t){var n=Tl(e)?e:Tr(e),r;return this.isValid()&&n.isValid()?(t=Xs(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function oxe(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function sxe(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function lxe(e,t,n){var r,i,a;if(!this.isValid())return NaN;if(r=i4(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=Xs(t),t){case"year":a=Pb(this,r)/12;break;case"month":a=Pb(this,r);break;case"quarter":a=Pb(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:qs(a)}function Pb(e,t){if(e.date()<t.date())return-Pb(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,a;return t-r<0?(i=e.clone().add(n-1,"months"),a=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),a=(t-r)/(i-r)),-(n+a)||0}Xe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Xe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function cxe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function uxe(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?kb(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Dc(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",kb(n,"Z")):kb(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function fxe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+i+a)}function dxe(e){e||(e=this.isUtc()?Xe.defaultFormatUtc:Xe.defaultFormat);var t=kb(this,e);return this.localeData().postformat(t)}function hxe(e,t){return this.isValid()&&(Tl(e)&&e.isValid()||Tr(e).isValid())?Il({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pxe(e){return this.from(Tr(),e)}function mxe(e,t){return this.isValid()&&(Tl(e)&&e.isValid()||Tr(e).isValid())?Il({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function gxe(e){return this.to(Tr(),e)}function BY(e){var t;return e===void 0?this._locale._abbr:(t=nf(e),t!=null&&(this._locale=t),this)}var $Y=Ks("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function qY(){return this._locale}var lw=1e3,Vm=60*lw,cw=60*Vm,UY=(365*400+97)*24*cw;function Wm(e,t){return(e%t+t)%t}function zY(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-UY:new Date(e,t,n).valueOf()}function VY(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-UY:Date.UTC(e,t,n)}function yxe(e){var t,n;if(e=Xs(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?VY:zY,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Wm(t+(this._isUTC?0:this.utcOffset()*Vm),cw);break;case"minute":t=this._d.valueOf(),t-=Wm(t,Vm);break;case"second":t=this._d.valueOf(),t-=Wm(t,lw);break}return this._d.setTime(t),Xe.updateOffset(this,!0),this}function vxe(e){var t,n;if(e=Xs(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?VY:zY,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=cw-Wm(t+(this._isUTC?0:this.utcOffset()*Vm),cw)-1;break;case"minute":t=this._d.valueOf(),t+=Vm-Wm(t,Vm)-1;break;case"second":t=this._d.valueOf(),t+=lw-Wm(t,lw)-1;break}return this._d.setTime(t),Xe.updateOffset(this,!0),this}function xxe(){return this._d.valueOf()-(this._offset||0)*6e4}function bxe(){return Math.floor(this.valueOf()/1e3)}function wxe(){return new Date(this.valueOf())}function Sxe(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _xe(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Nxe(){return this.isValid()?this.toISOString():null}function kxe(){return qO(this)}function Axe(){return fd({},mn(this))}function Pxe(){return mn(this).overflow}function jxe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ft("N",0,0,"eraAbbr");Ft("NN",0,0,"eraAbbr");Ft("NNN",0,0,"eraAbbr");Ft("NNNN",0,0,"eraName");Ft("NNNNN",0,0,"eraNarrow");Ft("y",["y",1],"yo","eraYear");Ft("y",["yy",2],0,"eraYear");Ft("y",["yyy",3],0,"eraYear");Ft("y",["yyyy",4],0,"eraYear");vt("N",a4);vt("NN",a4);vt("NNN",a4);vt("NNNN",Bxe);vt("NNNNN",$xe);hr(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?mn(n).era=i:mn(n).invalidEra=e});vt("y",ty);vt("yy",ty);vt("yyy",ty);vt("yyyy",ty);vt("yo",qxe);hr(["y","yy","yyy","yyyy"],Ua);hr(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ua]=n._locale.eraYearOrdinalParse(e,i):t[Ua]=parseInt(e,10)});function Cxe(e,t){var n,r,i,a=this._eras||nf("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=Xe(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=Xe(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function Exe(e,t,n){var r,i,a=this.eras(),o,s,l;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),l=a[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return a[r];break;case"NNNN":if(o===e)return a[r];break;case"NNNNN":if(l===e)return a[r];break}else if([o,s,l].indexOf(e)>=0)return a[r]}function Oxe(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Xe(e.since).year():Xe(e.since).year()+(t-e.offset)*n}function Txe(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function Mxe(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function Lxe(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function Rxe(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-Xe(i[e].since).year())*n+i[e].offset;return this.year()}function Ixe(e){return qn(this,"_erasNameRegex")||o4.call(this),e?this._erasNameRegex:this._erasRegex}function Dxe(e){return qn(this,"_erasAbbrRegex")||o4.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fxe(e){return qn(this,"_erasNarrowRegex")||o4.call(this),e?this._erasNarrowRegex:this._erasRegex}function a4(e,t){return t.erasAbbrRegex(e)}function Bxe(e,t){return t.erasNameRegex(e)}function $xe(e,t){return t.erasNarrowRegex(e)}function qxe(e,t){return t._eraYearOrdinalRegex||ty}function o4(){var e=[],t=[],n=[],r=[],i,a,o,s,l,c=this.eras();for(i=0,a=c.length;i<a;++i)o=Uu(c[i].name),s=Uu(c[i].abbr),l=Uu(c[i].narrow),t.push(o),e.push(s),n.push(l),r.push(o),r.push(s),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Ft(0,["gg",2],0,function(){return this.weekYear()%100});Ft(0,["GG",2],0,function(){return this.isoWeekYear()%100});function r5(e,t){Ft(0,[e,e.length],0,t)}r5("gggg","weekYear");r5("ggggg","weekYear");r5("GGGG","isoWeekYear");r5("GGGGG","isoWeekYear");vt("G",J2);vt("g",J2);vt("GG",Mr,hs);vt("gg",Mr,hs);vt("GGGG",YO,HO);vt("gggg",YO,HO);vt("GGGGG",Q2,K2);vt("ggggg",Q2,K2);x1(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Pn(e)});x1(["gg","GG"],function(e,t,n,r){t[r]=Xe.parseTwoDigitYear(e)});function Uxe(e){return WY.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function zxe(e){return WY.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vxe(){return zu(this.year(),1,4)}function Wxe(){return zu(this.isoWeekYear(),1,4)}function Hxe(){var e=this.localeData()._week;return zu(this.year(),e.dow,e.doy)}function Yxe(){var e=this.localeData()._week;return zu(this.weekYear(),e.dow,e.doy)}function WY(e,t,n,r,i){var a;return e==null?c0(this,r,i).year:(a=zu(e,r,i),t>a&&(t=a),Gxe.call(this,e,t,n,r,i))}function Gxe(e,t,n,r,i){var a=NY(e,t,n,r,i),o=l0(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Ft("Q",0,"Qo","quarter");vt("Q",hY);hr("Q",function(e,t){t[Ru]=(Pn(e)-1)*3});function Kxe(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ft("D",["DD",2],"Do","date");vt("D",Mr,ny);vt("DD",Mr,hs);vt("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});hr(["D","DD"],mc);hr("Do",function(e,t){t[mc]=Pn(e.match(Mr)[0])});var HY=ry("Date",!0);Ft("DDD",["DDDD",3],"DDDo","dayOfYear");vt("DDD",X2);vt("DDDD",pY);hr(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Pn(e)});function Xxe(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ft("m",["mm",2],0,"minute");vt("m",Mr,GO);vt("mm",Mr,hs);hr(["m","mm"],Al);var Qxe=ry("Minutes",!1);Ft("s",["ss",2],0,"second");vt("s",Mr,GO);vt("ss",Mr,hs);hr(["s","ss"],Iu);var Jxe=ry("Seconds",!1);Ft("S",0,0,function(){return~~(this.millisecond()/100)});Ft(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ft(0,["SSS",3],0,"millisecond");Ft(0,["SSSS",4],0,function(){return this.millisecond()*10});Ft(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ft(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ft(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ft(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ft(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});vt("S",X2,hY);vt("SS",X2,hs);vt("SSS",X2,pY);var dd,YY;for(dd="SSSS";dd.length<=9;dd+="S")vt(dd,ty);function Zxe(e,t){t[Rh]=Pn(("0."+e)*1e3)}for(dd="S";dd.length<=9;dd+="S")hr(dd,Zxe);YY=ry("Milliseconds",!1);Ft("z",0,0,"zoneAbbr");Ft("zz",0,0,"zoneName");function ebe(){return this._isUTC?"UTC":""}function tbe(){return this._isUTC?"Coordinated Universal Time":""}var tt=y1.prototype;tt.add=Y1e;tt.calendar=exe;tt.clone=txe;tt.diff=lxe;tt.endOf=vxe;tt.format=dxe;tt.from=hxe;tt.fromNow=pxe;tt.to=mxe;tt.toNow=gxe;tt.get=f0e;tt.invalidAt=Pxe;tt.isAfter=nxe;tt.isBefore=rxe;tt.isBetween=ixe;tt.isSame=axe;tt.isSameOrAfter=oxe;tt.isSameOrBefore=sxe;tt.isValid=kxe;tt.lang=$Y;tt.locale=BY;tt.localeData=qY;tt.max=k1e;tt.min=N1e;tt.parsingFlags=Axe;tt.set=d0e;tt.startOf=yxe;tt.subtract=G1e;tt.toArray=Sxe;tt.toObject=_xe;tt.toDate=wxe;tt.toISOString=uxe;tt.inspect=fxe;typeof Symbol<"u"&&Symbol.for!=null&&(tt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});tt.toJSON=Nxe;tt.toString=cxe;tt.unix=bxe;tt.valueOf=xxe;tt.creationData=jxe;tt.eraName=Txe;tt.eraNarrow=Mxe;tt.eraAbbr=Lxe;tt.eraYear=Rxe;tt.year=yY;tt.isLeapYear=u0e;tt.weekYear=Uxe;tt.isoWeekYear=zxe;tt.quarter=tt.quarters=Kxe;tt.month=SY;tt.daysInMonth=w0e;tt.week=tt.weeks=C0e;tt.isoWeek=tt.isoWeeks=E0e;tt.weeksInYear=Hxe;tt.weeksInWeekYear=Yxe;tt.isoWeeksInYear=Vxe;tt.isoWeeksInISOWeekYear=Wxe;tt.date=HY;tt.day=tt.days=z0e;tt.weekday=V0e;tt.isoWeekday=W0e;tt.dayOfYear=Xxe;tt.hour=tt.hours=J0e;tt.minute=tt.minutes=Qxe;tt.second=tt.seconds=Jxe;tt.millisecond=tt.milliseconds=YY;tt.utcOffset=L1e;tt.utc=I1e;tt.local=D1e;tt.parseZone=F1e;tt.hasAlignedHourOffset=B1e;tt.isDST=$1e;tt.isLocal=U1e;tt.isUtcOffset=z1e;tt.isUtc=RY;tt.isUTC=RY;tt.zoneAbbr=ebe;tt.zoneName=tbe;tt.dates=Ks("dates accessor is deprecated. Use date instead.",HY);tt.months=Ks("months accessor is deprecated. Use month instead",SY);tt.years=Ks("years accessor is deprecated. Use year instead",yY);tt.zone=Ks("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",R1e);tt.isDSTShifted=Ks("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",q1e);function nbe(e){return Tr(e*1e3)}function rbe(){return Tr.apply(null,arguments).parseZone()}function GY(e){return e}var Vn=zO.prototype;Vn.calendar=Uve;Vn.longDateFormat=Hve;Vn.invalidDate=Gve;Vn.ordinal=Qve;Vn.preparse=GY;Vn.postformat=GY;Vn.relativeTime=Zve;Vn.pastFuture=e0e;Vn.set=$ve;Vn.eras=Cxe;Vn.erasParse=Exe;Vn.erasConvertYear=Oxe;Vn.erasAbbrRegex=Dxe;Vn.erasNameRegex=Ixe;Vn.erasNarrowRegex=Fxe;Vn.months=y0e;Vn.monthsShort=v0e;Vn.monthsParse=b0e;Vn.monthsRegex=_0e;Vn.monthsShortRegex=S0e;Vn.week=k0e;Vn.firstDayOfYear=j0e;Vn.firstDayOfWeek=P0e;Vn.weekdays=F0e;Vn.weekdaysMin=$0e;Vn.weekdaysShort=B0e;Vn.weekdaysParse=U0e;Vn.weekdaysRegex=H0e;Vn.weekdaysShortRegex=Y0e;Vn.weekdaysMinRegex=G0e;Vn.isPM=X0e;Vn.meridiem=Z0e;function uw(e,t,n,r){var i=nf(),a=Ic().set(r,t);return i[n](a,e)}function KY(e,t,n){if(Xu(e)&&(t=e,e=void 0),e=e||"",t!=null)return uw(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=uw(e,r,n,"month");return i}function s4(e,t,n,r){typeof e=="boolean"?(Xu(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Xu(t)&&(n=t,t=void 0),t=t||"");var i=nf(),a=e?i._week.dow:0,o,s=[];if(n!=null)return uw(t,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=uw(t,(o+a)%7,r,"day");return s}function ibe(e,t){return KY(e,t,"months")}function abe(e,t){return KY(e,t,"monthsShort")}function obe(e,t,n){return s4(e,t,n,"weekdays")}function sbe(e,t,n){return s4(e,t,n,"weekdaysShort")}function lbe(e,t,n){return s4(e,t,n,"weekdaysMin")}bd("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Pn(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Xe.lang=Ks("moment.lang is deprecated. Use moment.locale instead.",bd);Xe.langData=Ks("moment.langData is deprecated. Use moment.localeData instead.",nf);var Su=Math.abs;function cbe(){var e=this._data;return this._milliseconds=Su(this._milliseconds),this._days=Su(this._days),this._months=Su(this._months),e.milliseconds=Su(e.milliseconds),e.seconds=Su(e.seconds),e.minutes=Su(e.minutes),e.hours=Su(e.hours),e.months=Su(e.months),e.years=Su(e.years),this}function XY(e,t,n,r){var i=Il(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function ube(e,t){return XY(this,e,t,1)}function fbe(e,t){return XY(this,e,t,-1)}function cI(e){return e<0?Math.floor(e):Math.ceil(e)}function dbe(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=cI(k3(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=qs(e/1e3),r.seconds=i%60,a=qs(i/60),r.minutes=a%60,o=qs(a/60),r.hours=o%24,t+=qs(o/24),l=qs(QY(t)),n+=l,t-=cI(k3(l)),s=qs(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function QY(e){return e*4800/146097}function k3(e){return e*146097/4800}function hbe(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Xs(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+QY(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(k3(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function rf(e){return function(){return this.as(e)}}var JY=rf("ms"),pbe=rf("s"),mbe=rf("m"),gbe=rf("h"),ybe=rf("d"),vbe=rf("w"),xbe=rf("M"),bbe=rf("Q"),wbe=rf("y"),Sbe=JY;function _be(){return Il(this)}function Nbe(e){return e=Xs(e),this.isValid()?this[e+"s"]():NaN}function Pp(e){return function(){return this.isValid()?this._data[e]:NaN}}var kbe=Pp("milliseconds"),Abe=Pp("seconds"),Pbe=Pp("minutes"),jbe=Pp("hours"),Cbe=Pp("days"),Ebe=Pp("months"),Obe=Pp("years");function Tbe(){return qs(this.days()/7)}var Pu=Math.round,Lm={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Mbe(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Lbe(e,t,n,r){var i=Il(e).abs(),a=Pu(i.as("s")),o=Pu(i.as("m")),s=Pu(i.as("h")),l=Pu(i.as("d")),c=Pu(i.as("M")),f=Pu(i.as("w")),h=Pu(i.as("y")),g=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(g=g||f<=1&&["w"]||f<n.w&&["ww",f]),g=g||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h],g[2]=t,g[3]=+e>0,g[4]=r,Mbe.apply(null,g)}function Rbe(e){return e===void 0?Pu:typeof e=="function"?(Pu=e,!0):!1}function Ibe(e,t){return Lm[e]===void 0?!1:t===void 0?Lm[e]:(Lm[e]=t,e==="s"&&(Lm.ss=t-1),!0)}function Dbe(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Lm,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Lm,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=Lbe(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var k_=Math.abs;function mm(e){return(e>0)-(e<0)||+e}function i5(){if(!this.isValid())return this.localeData().invalidDate();var e=k_(this._milliseconds)/1e3,t=k_(this._days),n=k_(this._months),r,i,a,o,s=this.asSeconds(),l,c,f,h;return s?(r=qs(e/60),i=qs(r/60),e%=60,r%=60,a=qs(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",c=mm(this._months)!==mm(s)?"-":"",f=mm(this._days)!==mm(s)?"-":"",h=mm(this._milliseconds)!==mm(s)?"-":"",l+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(t?f+t+"D":"")+(i||r||e?"T":"")+(i?h+i+"H":"")+(r?h+r+"M":"")+(e?h+o+"S":"")):"P0D"}var Ln=n5.prototype;Ln.isValid=E1e;Ln.abs=cbe;Ln.add=ube;Ln.subtract=fbe;Ln.as=hbe;Ln.asMilliseconds=JY;Ln.asSeconds=pbe;Ln.asMinutes=mbe;Ln.asHours=gbe;Ln.asDays=ybe;Ln.asWeeks=vbe;Ln.asMonths=xbe;Ln.asQuarters=bbe;Ln.asYears=wbe;Ln.valueOf=Sbe;Ln._bubble=dbe;Ln.clone=_be;Ln.get=Nbe;Ln.milliseconds=kbe;Ln.seconds=Abe;Ln.minutes=Pbe;Ln.hours=jbe;Ln.days=Cbe;Ln.weeks=Tbe;Ln.months=Ebe;Ln.years=Obe;Ln.humanize=Dbe;Ln.toISOString=i5;Ln.toString=i5;Ln.toJSON=i5;Ln.locale=BY;Ln.localeData=qY;Ln.toIsoString=Ks("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",i5);Ln.lang=$Y;Ft("X",0,0,"unix");Ft("x",0,0,"valueOf");vt("x",J2);vt("X",i0e);hr("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});hr("x",function(e,t,n){n._d=new Date(Pn(e))});//! moment.js
Xe.version="2.30.1";Fve(Tr);Xe.fn=tt;Xe.min=A1e;Xe.max=P1e;Xe.now=j1e;Xe.utc=Ic;Xe.unix=nbe;Xe.months=ibe;Xe.isDate=g1;Xe.locale=bd;Xe.invalid=G2;Xe.duration=Il;Xe.isMoment=Tl;Xe.weekdays=obe;Xe.parseZone=rbe;Xe.localeData=nf;Xe.isDuration=Ab;Xe.monthsShort=abe;Xe.weekdaysMin=lbe;Xe.defineLocale=ZO;Xe.updateLocale=r1e;Xe.locales=i1e;Xe.weekdaysShort=sbe;Xe.normalizeUnits=Xs;Xe.relativeTimeRounding=Rbe;Xe.relativeTimeThreshold=Ibe;Xe.calendarFormat=Z1e;Xe.prototype=tt;Xe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const uI={notif_dashboard_alerts:!0,notif_critical_attacks:!0,notif_scan_completion:!0,notif_weekly_reports:!1};function ZY(e){const t={...uI};if(!e)return t;for(const n of Object.keys(uI))e[n]!==void 0&&(t[n]=!!e[n]);return t}function Fbe(e){if(!e)return"other";if(e.source==="attack"||e.source==="live")return"attack";const t=(e.attack_type||"").toLowerCase();return t==="scan_complete"||t==="scan"||t.startsWith("scan_")?"scan":t?"attack":"other"}function eG(e,t){return t.notif_dashboard_alerts?e.filter(n=>{const r=Fbe(n);return!(r==="attack"&&!t.notif_critical_attacks||r==="scan"&&!t.notif_scan_completion)}):[]}const fI=200;async function Fc(e,t,n="-created_date"){const r=[];let i=0;for(;;){const a=await e.filter(t,n,fI,i);if(!a||a.length===0||(r.push(...a),a.length<fI))break;i+=a.length}return r}const tv=e=>ut.functions.invoke("siteApi",e).then(t=>t.data),dI={critical:d.jsx(Nne,{className:"w-3.5 h-3.5 text-destructive"}),high:d.jsx(so,{className:"w-3.5 h-3.5 text-amber-400"}),medium:d.jsx(so,{className:"w-3.5 h-3.5 text-orange-400"}),low:d.jsx(t6,{className:"w-3.5 h-3.5 text-primary"}),info:d.jsx(t6,{className:"w-3.5 h-3.5 text-muted-foreground"})},Bbe={critical:"bg-destructive",high:"bg-amber-400",medium:"bg-orange-400",low:"bg-primary",info:"bg-muted-foreground"},tG="shieldsync_alerts_read_v1",$be=()=>{try{return new Set(JSON.parse(localStorage.getItem(tG)||"[]"))}catch{return new Set}},A_=e=>{try{localStorage.setItem(tG,JSON.stringify(Array.from(e)))}catch{}};function qbe({user:e}){const[t,n]=E.useState(!1),[r,i]=E.useState(()=>$be()),a=E.useRef(null),o=Li(),s=e==null?void 0:e.email,{data:l=[]}=dn({queryKey:["sites",s],queryFn:()=>Fc(ut.entities.Site,{created_by:s}),enabled:!!s,initialData:[]});E.useMemo(()=>new Set(l.map(w=>w.id)),[l]);const{data:c=[]}=dn({queryKey:["all-alerts",s],queryFn:async()=>{const w=await tv({action:"get_all_alerts"});return(w==null?void 0:w.alerts)||[]},enabled:!!s&&l.length>0,initialData:[],refetchInterval:3e4,staleTime:5e3}),{data:f=[]}=dn({queryKey:["all-threats",s],queryFn:async()=>{const w=await tv({action:"get_all_threats"});return(w==null?void 0:w.threats)||[]},enabled:!!s&&l.length>0,initialData:[],refetchInterval:3e4,staleTime:5e3});E.useEffect(()=>{const w=_=>{a.current&&!a.current.contains(_.target)&&n(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]),E.useEffect(()=>{if(!t)return;const w=m.filter(P=>!P.read);if(w.length===0)return;const _=w.filter(P=>P.source==="db"&&P.dbId).map(P=>P.dbId);(_.length>0?tv({action:"mark_all_alerts_read",alert_ids:_}):Promise.resolve()).then(()=>{o.invalidateQueries({queryKey:["all-alerts"]}),o.invalidateQueries({queryKey:["unreadAlerts"]})});const k=new Set(r);w.forEach(P=>k.add(P.id)),i(k),A_(k)},[t]);const h=E.useMemo(()=>{const w=new Map;return c.forEach(_=>{w.set(`db-${_.id}`,{id:`db-${_.id}`,source:"db",dbId:_.id,title:_.title,description:_.description,severity:_.severity,attack_type:_.attack_type,created_date:_.created_date,read:_.read||r.has(`db-${_.id}`)})}),f.forEach(_=>{const k=`attack-${_.id}`;if(w.has(k))return;const P=(_.severity||"medium").toLowerCase();w.set(k,{id:k,source:"attack",title:`${P.toUpperCase()}: ${_.attack_type||"Threat detected"}`,description:`Attack from ${_.attacker_ip||"unknown IP"}${_.endpoint?` on ${_.endpoint}`:""}`,severity:P,attack_type:_.attack_type,created_date:_.attack_timestamp||_.created_date,read:!0})}),Array.from(w.values()).sort((_,k)=>{const P=new Date(_.created_date||0).getTime();return new Date(k.created_date||0).getTime()-P})},[c,f,r]),g=E.useMemo(()=>ZY(e),[e]),m=E.useMemo(()=>eG(h,g).slice(0,30),[h,g]),b=w=>{w.source==="db"&&w.dbId&&tv({action:"mark_alert_read",alert_id:w.dbId}).then(()=>{o.invalidateQueries({queryKey:["all-alerts"]}),o.invalidateQueries({queryKey:["unreadAlerts"]})});const _=new Set(r);_.add(w.id),i(_),A_(_)},y=Hi({mutationFn:async()=>{const w=m.filter(P=>!P.read),_=w.filter(P=>P.source==="db"&&P.dbId).map(P=>P.dbId);_.length>0&&await tv({action:"mark_all_alerts_read",alert_ids:_});const k=new Set(r);w.forEach(P=>k.add(P.id)),i(k),A_(k)},onSuccess:()=>{o.invalidateQueries({queryKey:["all-alerts"]}),o.invalidateQueries({queryKey:["unreadAlerts"]})}}),x=m.filter(w=>!w.read).length;return d.jsxs("div",{className:"relative",ref:a,children:[d.jsxs("button",{onClick:()=>n(w=>!w),className:"relative p-2 rounded-lg hover:bg-muted/50 transition-colors",children:[d.jsx(pg,{className:"w-5 h-5 text-muted-foreground"}),d.jsx(us,{children:x>0&&d.jsx(He.span,{initial:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-0.5 -right-0.5 w-4 h-4 bg-destructive text-destructive-foreground text-[10px] font-bold rounded-full flex items-center justify-center",children:x>9?"9+":x},"badge")})]}),d.jsx(us,{children:t&&d.jsxs(He.div,{initial:{opacity:0,y:-8,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.97},transition:{duration:.15},className:"absolute right-0 top-full mt-2 w-80 bg-card border border-border/60 rounded-xl shadow-2xl shadow-black/40 z-50 overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border/40",children:[d.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),d.jsxs("div",{className:"flex items-center gap-2",children:[x>0&&d.jsxs("button",{onClick:()=>y.mutate(),className:"text-[10px] text-primary hover:underline flex items-center gap-1",children:[d.jsx(AU,{className:"w-3 h-3"})," Mark all read"]}),d.jsx("button",{onClick:()=>n(!1),className:"text-muted-foreground hover:text-foreground",children:d.jsx(Lc,{className:"w-4 h-4"})})]})]}),d.jsx("div",{className:"overflow-y-auto max-h-96",children:m.length===0?d.jsxs("div",{className:"py-10 text-center text-sm text-muted-foreground",children:[d.jsx(pg,{className:"w-8 h-8 mx-auto mb-2 opacity-20"}),g.notif_dashboard_alerts?"No notifications yet":"Dashboard alerts are turned off"]}):m.map(w=>d.jsxs("button",{onClick:()=>!w.read&&b(w),className:`w-full text-left px-4 py-3 border-b border-border/20 hover:bg-muted/30 transition-colors flex items-start gap-3 ${w.read?"":"bg-muted/10"}`,children:[d.jsx("div",{className:"mt-0.5",children:dI[w.severity]||dI.info}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("p",{className:"text-xs font-semibold text-foreground truncate",children:w.title}),!w.read&&d.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${Bbe[w.severity]||"bg-primary"}`})]}),w.description&&d.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5 line-clamp-2",children:w.description}),d.jsx("p",{className:"text-[10px] text-muted-foreground/60 mt-1",children:Xe(w.created_date).fromNow()})]})]},w.id))})]})})]})}function Ube({user:e}){var t,n;return d.jsxs("header",{className:"h-16 border-b border-border bg-background/80 backdrop-blur-xl flex items-center justify-between px-6 sticky top-0 z-30",children:[d.jsx("div",{className:"flex items-center gap-4 flex-1",children:d.jsxs("div",{className:"relative max-w-sm w-full hidden md:block",children:[d.jsx(EU,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),d.jsx(qr,{placeholder:"Search sites, attacks, alerts...",className:"pl-10 bg-muted/50 border-border/50 h-9 text-sm"})]})}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx(qbe,{user:e}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 border border-primary/30 flex items-center justify-center",children:d.jsx("span",{className:"text-xs font-bold text-primary",children:((t=e==null?void 0:e.full_name)==null?void 0:t[0])||((n=e==null?void 0:e.email)==null?void 0:n[0])||"U"})}),d.jsxs("div",{className:"hidden md:block",children:[d.jsx("p",{className:"text-sm font-medium text-foreground leading-none",children:(e==null?void 0:e.full_name)||"User"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:e==null?void 0:e.email})]})]}),d.jsx(Ot,{size:"sm",variant:"ghost",onClick:()=>ut.auth.logout(),className:"gap-2 text-muted-foreground hover:text-foreground",children:d.jsx(jU,{className:"w-4 h-4"})})]})]})}function zbe({user:e}){const t=E.useRef(!1);return E.useEffect(()=>{if(!e||t.current)return;let n;try{n=JSON.parse(localStorage.getItem("pending_checkout")||"null")}catch{localStorage.removeItem("pending_checkout");return}if(!(n!=null&&n.plan))return;if(n.ts&&Date.now()-n.ts>3600*1e3){localStorage.removeItem("pending_checkout");return}if(e.stripe_subscription_id&&e.subscription_status==="active"){localStorage.removeItem("pending_checkout");return}t.current=!0,localStorage.removeItem("pending_checkout");const r=localStorage.getItem("affiliate_ref")||void 0;ut.functions.invoke("stripeCheckout",{action:"checkout",plan:n.plan,billing_period:n.period==="annual"?"annual":"monthly",affiliate_code:r}).then(i=>{var o;const a=(o=i==null?void 0:i.data)==null?void 0:o.url;a&&(window.location.href=a)}).catch(i=>{console.error("Auto-checkout failed:",i)})},[e==null?void 0:e.id]),null}const Tx=e=>ut.functions.invoke("siteApi",e).then(t=>t.data);function Vbe(){const[e,t]=E.useState(!1),[n,r]=E.useState(null),[i,a]=E.useState(!0);OE();const o=Li();E.useEffect(()=>{ut.auth.isAuthenticated().then(b=>{b?a(!1):ut.auth.redirectToLogin("/dashboard")})},[]);const{data:s,refetch:l}=dn({queryKey:["currentUser"],queryFn:()=>ut.auth.me(),enabled:!i});E.useEffect(()=>{if(!s)return;const b=localStorage.getItem("affiliate_ref");b&&ut.functions.invoke("trackAffiliateReferral",{code:b}).then(()=>localStorage.removeItem("affiliate_ref")).catch(()=>{})},[s==null?void 0:s.id]),E.useEffect(()=>{if(!s||n)return;if(s.shieldsync_api_key){r(s.shieldsync_api_key);return}(async()=>{var y;try{const w=(y=(await ut.functions.invoke("provisionUser",{})).data)==null?void 0:y.api_key;w&&(r(w),o.invalidateQueries({queryKey:["currentUser"]}),await l())}catch(x){console.error("Provisioning failed:",x)}})()},[s==null?void 0:s.id,n]);const c=s?{...s,shieldsync_api_key:s.shieldsync_api_key||n}:null,{data:f=null}=dn({queryKey:["features",c==null?void 0:c.shieldsync_api_key],queryFn:async()=>{const y=(await ut.functions.invoke("getFeatures",{})).data;return y&&y.error?null:y},enabled:!!(c!=null&&c.shieldsync_api_key),staleTime:300*1e3,retry:!1}),{data:h=[]}=dn({queryKey:["sites",c==null?void 0:c.email],queryFn:()=>Fc(ut.entities.Site,{created_by:c.email}),enabled:!!(c!=null&&c.email),initialData:[]}),g=E.useMemo(()=>new Set(h.map(b=>b.id)),[h]);dn({queryKey:["sync-audit",c==null?void 0:c.email],queryFn:()=>Tx({action:"sync_audit"}),enabled:!!(c!=null&&c.email)&&h.length>0,refetchInterval:6e4,refetchIntervalInBackground:!1,refetchOnWindowFocus:!1,retry:!1,throwOnError:!1}),dn({queryKey:["sync-sites",c==null?void 0:c.email],queryFn:async()=>(await Tx({action:"sync_sites"}),o.invalidateQueries({queryKey:["sites"]}),!0),enabled:!!(c!=null&&c.email)&&h.length>0,refetchInterval:3e4,refetchOnWindowFocus:!0,retry:!1}),dn({queryKey:["all-threats",c==null?void 0:c.email],queryFn:async()=>{const b=await Tx({action:"get_all_threats"});return(b==null?void 0:b.threats)||[]},enabled:!!(c!=null&&c.email)&&h.length>0,refetchInterval:1e4,staleTime:5e3,retry:!1}),dn({queryKey:["all-alerts",c==null?void 0:c.email],queryFn:async()=>{const b=await Tx({action:"get_all_alerts"});return(b==null?void 0:b.alerts)||[]},enabled:!!(c!=null&&c.email)&&h.length>0,initialData:[],refetchInterval:1e4,staleTime:5e3}),E.useEffect(()=>{const b=ut.entities.Attack.subscribe(()=>{o.invalidateQueries({queryKey:["all-threats"]})}),y=ut.entities.Alert.subscribe(()=>{o.invalidateQueries({queryKey:["all-alerts"]}),o.invalidateQueries({queryKey:["unreadAlerts"]})}),x=ut.entities.Site.subscribe(()=>{o.invalidateQueries({queryKey:["sites"]})});return()=>{b(),y(),x()}},[o]);const{data:m=[]}=dn({queryKey:["unreadAlerts",c==null?void 0:c.email,h.map(b=>b.id).join(",")],queryFn:async()=>{var x;return(((x=(await ut.functions.invoke("siteApi",{action:"get_all_alerts"})).data)==null?void 0:x.alerts)||[]).filter(w=>!w.read&&g.has(w.site_id))},enabled:!!(c!=null&&c.email)&&h.length>0,initialData:[],refetchInterval:3e4,staleTime:5e3});return i?d.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-background",children:d.jsxs("div",{className:"flex flex-col items-center gap-4",children:[d.jsx("div",{className:"w-10 h-10 border-2 border-primary/30 border-t-primary rounded-full animate-spin"}),d.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:"Initializing ShieldSync..."})]})}):d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(zbe,{user:c}),d.jsx(Dve,{collapsed:e,setCollapsed:t,features:f}),d.jsxs(He.div,{animate:{marginLeft:e?72:260},transition:{duration:.3,ease:[.22,1,.36,1]},className:"min-h-screen",children:[d.jsx(Ube,{user:c,unreadAlerts:m.length}),d.jsx("main",{className:"p-6",children:d.jsx(lae,{context:{user:c,features:f}})})]})]})}function nv({icon:e,label:t,value:n,trend:r,trendUp:i,color:a="text-primary",delay:o=0}){return d.jsx(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o,duration:.5,ease:[.22,1,.36,1]},className:"bg-card border border-border/50 rounded-xl p-5 hover:border-primary/20 transition-all duration-300 group",children:d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider font-mono",children:t}),d.jsx("p",{className:`text-3xl font-black mt-2 font-mono ${a}`,children:n}),r&&d.jsxs("p",{className:`text-xs mt-2 font-mono ${i?"text-accent":"text-destructive"}`,children:[i?"↑":"↓"," ",r]})]}),d.jsx("div",{className:`p-2.5 rounded-lg bg-muted/50 ${a} group-hover:scale-110 transition-transform duration-300`,children:d.jsx(e,{className:"w-5 h-5"})})]})})}function nG({score:e=0,size:t=160}){const[n,r]=E.useState(0),i=8,a=(t-i)/2,o=2*Math.PI*a,s=o-n/100*o;E.useEffect(()=>{let c;const h=Date.now(),g=()=>{const m=Date.now()-h,b=Math.min(m/1500,1),y=1-Math.pow(1-b,3);r(Math.round(y*e)),b<1&&(c=requestAnimationFrame(g))};return c=requestAnimationFrame(g),()=>cancelAnimationFrame(c)},[e]);const l=()=>n>=90?"hsl(142, 71%, 45%)":n>=70?"hsl(38, 92%, 50%)":"hsl(0, 84%, 60%)";return d.jsxs("div",{className:"relative",style:{width:t,height:t},children:[d.jsxs("svg",{width:t,height:t,className:"-rotate-90",children:[d.jsx("circle",{cx:t/2,cy:t/2,r:a,fill:"none",stroke:"hsl(222, 30%, 12%)",strokeWidth:i}),d.jsx(He.circle,{cx:t/2,cy:t/2,r:a,fill:"none",stroke:l(),strokeWidth:i,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:s,style:{filter:`drop-shadow(0 0 8px ${l()})`}})]}),d.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[d.jsx("span",{className:"text-4xl font-black font-mono text-foreground",children:n}),d.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"/ 100"})]})]})}const Wbe=v2("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Oi({className:e,variant:t,...n}){return d.jsx("div",{className:Un(Wbe({variant:t}),e),...n})}const Hbe={critical:"bg-destructive/20 text-destructive border-destructive/30",high:"bg-neon-orange/20 text-neon-orange border-neon-orange/30",medium:"bg-neon-purple/20 text-neon-purple border-neon-purple/30",low:"bg-primary/20 text-primary border-primary/30",info:"bg-muted text-muted-foreground border-border"},Ybe={sql_injection:"SQL Injection",xss:"XSS Attack",path_traversal:"Path Traversal",rce:"Remote Code Exec",template_injection:"Template Injection",brute_force:"Brute Force",ddos:"DDoS Attempt",recon_scan:"Recon Scan",tool_detection:"Tool Detected",sensitive_path_probe:"Path Probe",unusual_http_method:"Unusual Method",exposed_file_probe:"Path Probe",scanner_detected:"Tool Detected",dos_attempt:"DoS Attempt",ssti:"Template Injection"};function Gbe({attacks:e=[],canBlock:t=!1}){const{toast:n}=Gs(),[r,i]=E.useState(null),{data:a=[]}=dn({queryKey:["sites-feed-internal"],queryFn:async()=>{const f=await ut.auth.me();return Fc(ut.entities.Site,{created_by:f.email})},initialData:[],staleTime:6e4}),o=f=>f.attacker_ip||f.source_ip||f.src_ip||f.client_ip||f.ip||f.remote_addr||f.remote_ip||null,s=f=>f.attacker_country||f.country||f.geo_country||null,l=f=>f.attacker_city||f.city||f.geo_city||null,c=async f=>{var m;const h=o(f);if(!h)return;const g=f.site_id||((m=a[0])==null?void 0:m.id);if(!g){n({title:"No site found",description:"Could not determine site to block on.",variant:"destructive"});return}i(h);try{await ut.functions.invoke("protection",{action:"block_ip",site_id:g,ip:h,reason:`${f.attack_type||"Attack"} detected`}),n({title:"IP Blocked",description:`${h} has been blocked.`})}catch(b){n({title:"Error",description:b.message,variant:"destructive"})}finally{i(null)}};return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"p-5 border-b border-border/50 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"relative",children:d.jsxs("span",{className:"flex h-2.5 w-2.5",children:[d.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-destructive opacity-75"}),d.jsx("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-destructive"})]})}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Live Attack Feed"})]}),d.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[e.length," events"]})]}),d.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:d.jsx(us,{mode:"popLayout",children:e.length===0?d.jsxs("div",{className:"p-8 text-center text-muted-foreground text-sm",children:[d.jsx(so,{className:"w-8 h-8 mx-auto mb-3 opacity-30"}),d.jsx("p",{children:"No attacks detected yet"}),d.jsx("p",{className:"text-xs mt-1 font-mono",children:"Monitoring active..."})]}):e.map((f,h)=>d.jsx(He.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{delay:h*.05,duration:.3},className:"px-5 py-3 border-b border-border/30 hover:bg-muted/30 transition-colors",children:d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(Oi,{className:`text-[10px] px-1.5 py-0 border ${Hbe[f.severity]}`,children:f.severity}),d.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:Ybe[f.attack_type]||f.attack_type})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[d.jsx("span",{className:"font-mono",children:o(f)||"Unknown IP"}),s(f)&&d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(bE,{className:"w-3 h-3"}),l(f)?`${l(f)}, `:"",s(f)]})]}),d.jsxs("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[(f.site_name||f.site_url)&&d.jsx("span",{className:"text-[10px] font-medium bg-primary/10 text-primary border border-primary/20 rounded px-1.5 py-0.5 truncate max-w-[160px]",children:f.site_name||f.site_url}),f.endpoint&&d.jsx("p",{className:"text-xs font-mono text-primary/60 truncate",children:f.endpoint})]})]}),d.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[d.jsxs("div",{className:"flex flex-col items-end gap-0.5",children:[d.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[d.jsx(w2,{className:"w-3 h-3"}),Xe(f.attack_timestamp||f.created_date).format("HH:mm:ss")]}),d.jsxs("span",{className:"text-[10px] text-muted-foreground/70 font-mono",children:[Xe(f.attack_timestamp||f.created_date).format("MMM D")," · ",Xe(f.attack_timestamp||f.created_date).fromNow()]})]}),t&&o(f)&&d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:()=>c(f),disabled:r===o(f),className:"h-6 px-2 text-[10px] text-destructive hover:bg-destructive/10 gap-1",children:[r===f.attacker_ip?d.jsx(hn,{className:"w-3 h-3 animate-spin"}):d.jsx(Lu,{className:"w-3 h-3"}),"Block"]})]})]})},f.id))})})]})}var P_,hI;function Ro(){if(hI)return P_;hI=1;var e=Array.isArray;return P_=e,P_}var j_,pI;function rG(){if(pI)return j_;pI=1;var e=typeof hx=="object"&&hx&&hx.Object===Object&&hx;return j_=e,j_}var C_,mI;function Bc(){if(mI)return C_;mI=1;var e=rG(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return C_=n,C_}var E_,gI;function b1(){if(gI)return E_;gI=1;var e=Bc(),t=e.Symbol;return E_=t,E_}var O_,yI;function Kbe(){if(yI)return O_;yI=1;var e=b1(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),l=o[i];try{o[i]=void 0;var c=!0}catch{}var f=r.call(o);return c&&(s?o[i]=l:delete o[i]),f}return O_=a,O_}var T_,vI;function Xbe(){if(vI)return T_;vI=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return T_=n,T_}var M_,xI;function af(){if(xI)return M_;xI=1;var e=b1(),t=Kbe(),n=Xbe(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:r:a&&a in Object(s)?t(s):n(s)}return M_=o,M_}var L_,bI;function of(){if(bI)return L_;bI=1;function e(t){return t!=null&&typeof t=="object"}return L_=e,L_}var R_,wI;function iy(){if(wI)return R_;wI=1;var e=af(),t=of(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return R_=r,R_}var I_,SI;function l4(){if(SI)return I_;SI=1;var e=Ro(),t=iy(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return I_=i,I_}var D_,_I;function Fd(){if(_I)return D_;_I=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return D_=e,D_}var F_,NI;function c4(){if(NI)return F_;NI=1;var e=af(),t=Fd(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var l=e(s);return l==r||l==i||l==n||l==a}return F_=o,F_}var B_,kI;function Qbe(){if(kI)return B_;kI=1;var e=Bc(),t=e["__core-js_shared__"];return B_=t,B_}var $_,AI;function Jbe(){if(AI)return $_;AI=1;var e=Qbe(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return $_=n,$_}var q_,PI;function iG(){if(PI)return q_;PI=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return q_=n,q_}var U_,jI;function Zbe(){if(jI)return U_;jI=1;var e=c4(),t=Jbe(),n=Fd(),r=iG(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,f=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!n(g)||t(g))return!1;var m=e(g)?f:a;return m.test(r(g))}return U_=h,U_}var z_,CI;function ewe(){if(CI)return z_;CI=1;function e(t,n){return t==null?void 0:t[n]}return z_=e,z_}var V_,EI;function jp(){if(EI)return V_;EI=1;var e=Zbe(),t=ewe();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return V_=n,V_}var W_,OI;function a5(){if(OI)return W_;OI=1;var e=jp(),t=e(Object,"create");return W_=t,W_}var H_,TI;function twe(){if(TI)return H_;TI=1;var e=a5();function t(){this.__data__=e?e(null):{},this.size=0}return H_=t,H_}var Y_,MI;function nwe(){if(MI)return Y_;MI=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Y_=e,Y_}var G_,LI;function rwe(){if(LI)return G_;LI=1;var e=a5(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return r.call(o,a)?o[a]:void 0}return G_=i,G_}var K_,RI;function iwe(){if(RI)return K_;RI=1;var e=a5(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return K_=r,K_}var X_,II;function awe(){if(II)return X_;II=1;var e=a5(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return X_=n,X_}var Q_,DI;function owe(){if(DI)return Q_;DI=1;var e=twe(),t=nwe(),n=rwe(),r=iwe(),i=awe();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Q_=a,Q_}var J_,FI;function swe(){if(FI)return J_;FI=1;function e(){this.__data__=[],this.size=0}return J_=e,J_}var Z_,BI;function u4(){if(BI)return Z_;BI=1;function e(t,n){return t===n||t!==t&&n!==n}return Z_=e,Z_}var eN,$I;function o5(){if($I)return eN;$I=1;var e=u4();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return eN=t,eN}var tN,qI;function lwe(){if(qI)return tN;qI=1;var e=o5(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():n.call(a,o,1),--this.size,!0}return tN=r,tN}var nN,UI;function cwe(){if(UI)return nN;UI=1;var e=o5();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return nN=t,nN}var rN,zI;function uwe(){if(zI)return rN;zI=1;var e=o5();function t(n){return e(this.__data__,n)>-1}return rN=t,rN}var iN,VI;function fwe(){if(VI)return iN;VI=1;var e=o5();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return iN=t,iN}var aN,WI;function s5(){if(WI)return aN;WI=1;var e=swe(),t=lwe(),n=cwe(),r=uwe(),i=fwe();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,aN=a,aN}var oN,HI;function f4(){if(HI)return oN;HI=1;var e=jp(),t=Bc(),n=e(t,"Map");return oN=n,oN}var sN,YI;function dwe(){if(YI)return sN;YI=1;var e=owe(),t=s5(),n=f4();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return sN=r,sN}var lN,GI;function hwe(){if(GI)return lN;GI=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return lN=e,lN}var cN,KI;function l5(){if(KI)return cN;KI=1;var e=hwe();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return cN=t,cN}var uN,XI;function pwe(){if(XI)return uN;XI=1;var e=l5();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return uN=t,uN}var fN,QI;function mwe(){if(QI)return fN;QI=1;var e=l5();function t(n){return e(this,n).get(n)}return fN=t,fN}var dN,JI;function gwe(){if(JI)return dN;JI=1;var e=l5();function t(n){return e(this,n).has(n)}return dN=t,dN}var hN,ZI;function ywe(){if(ZI)return hN;ZI=1;var e=l5();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return hN=t,hN}var pN,eD;function d4(){if(eD)return pN;eD=1;var e=dwe(),t=pwe(),n=mwe(),r=gwe(),i=ywe();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,pN=a,pN}var mN,tD;function aG(){if(tD)return mN;tD=1;var e=d4(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],l=a.cache;if(l.has(s))return l.get(s);var c=r.apply(this,o);return a.cache=l.set(s,c)||l,c};return a.cache=new(n.Cache||e),a}return n.Cache=e,mN=n,mN}var gN,nD;function vwe(){if(nD)return gN;nD=1;var e=aG(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return gN=n,gN}var yN,rD;function xwe(){if(rD)return yN;rD=1;var e=vwe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,s,l,c){a.push(l?c.replace(n,"$1"):s||o)}),a});return yN=r,yN}var vN,iD;function h4(){if(iD)return vN;iD=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return vN=e,vN}var xN,aD;function bwe(){if(aD)return xN;aD=1;var e=b1(),t=h4(),n=Ro(),r=iy(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(n(s))return t(s,o)+"";if(r(s))return a?a.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return xN=o,xN}var bN,oD;function oG(){if(oD)return bN;oD=1;var e=bwe();function t(n){return n==null?"":e(n)}return bN=t,bN}var wN,sD;function sG(){if(sD)return wN;sD=1;var e=Ro(),t=l4(),n=xwe(),r=oG();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return wN=i,wN}var SN,lD;function c5(){if(lD)return SN;lD=1;var e=iy();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return SN=t,SN}var _N,cD;function p4(){if(cD)return _N;cD=1;var e=sG(),t=c5();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return _N=n,_N}var NN,uD;function lG(){if(uD)return NN;uD=1;var e=p4();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return NN=t,NN}var wwe=lG();const Ws=Kn(wwe);var kN,fD;function Swe(){if(fD)return kN;fD=1;function e(t){return t==null}return kN=e,kN}var _we=Swe();const jn=Kn(_we);var AN,dD;function Nwe(){if(dD)return AN;dD=1;var e=af(),t=Ro(),n=of(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return AN=i,AN}var kwe=Nwe();const hp=Kn(kwe);var Awe=c4();const fn=Kn(Awe);var Pwe=Fd();const ay=Kn(Pwe);var PN={exports:{}},Zn={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var hD;function jwe(){if(hD)return Zn;hD=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function y(x){if(typeof x=="object"&&x!==null){var w=x.$$typeof;switch(w){case e:switch(x=x.type,x){case n:case i:case r:case c:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case o:case l:case g:case h:case a:return x;default:return w}}case t:return w}}}return Zn.ContextConsumer=o,Zn.ContextProvider=a,Zn.Element=e,Zn.ForwardRef=l,Zn.Fragment=n,Zn.Lazy=g,Zn.Memo=h,Zn.Portal=t,Zn.Profiler=i,Zn.StrictMode=r,Zn.Suspense=c,Zn.SuspenseList=f,Zn.isAsyncMode=function(){return!1},Zn.isConcurrentMode=function(){return!1},Zn.isContextConsumer=function(x){return y(x)===o},Zn.isContextProvider=function(x){return y(x)===a},Zn.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},Zn.isForwardRef=function(x){return y(x)===l},Zn.isFragment=function(x){return y(x)===n},Zn.isLazy=function(x){return y(x)===g},Zn.isMemo=function(x){return y(x)===h},Zn.isPortal=function(x){return y(x)===t},Zn.isProfiler=function(x){return y(x)===i},Zn.isStrictMode=function(x){return y(x)===r},Zn.isSuspense=function(x){return y(x)===c},Zn.isSuspenseList=function(x){return y(x)===f},Zn.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===i||x===r||x===c||x===f||x===m||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===h||x.$$typeof===a||x.$$typeof===o||x.$$typeof===l||x.$$typeof===b||x.getModuleId!==void 0)},Zn.typeOf=y,Zn}var pD;function Cwe(){return pD||(pD=1,PN.exports=jwe()),PN.exports}var Ewe=Cwe(),jN,mD;function cG(){if(mD)return jN;mD=1;var e=af(),t=of(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return jN=r,jN}var CN,gD;function Owe(){if(gD)return CN;gD=1;var e=cG();function t(n){return e(n)&&n!=+n}return CN=t,CN}var Twe=Owe();const oy=Kn(Twe);var Mwe=cG();const Lwe=Kn(Mwe);var Pl=function(t){return t===0?0:t>0?1:-1},Ih=function(t){return hp(t)&&t.indexOf("%")===t.length-1},it=function(t){return Lwe(t)&&!oy(t)},Rwe=function(t){return jn(t)},Gi=function(t){return it(t)||hp(t)},Iwe=0,w1=function(t){var n=++Iwe;return"".concat(t||"").concat(n)},pp=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!it(t)&&!hp(t))return r;var a;if(Ih(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return oy(a)&&(a=r),i&&a>n&&(a=n),a},ed=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Dwe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Us=function(t,n){return it(t)&&it(n)?function(r){return t+r*(n-t)}:function(){return n}};function fw(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Ws(r,t))===n})}var Fwe=function(t,n){return it(t)&&it(n)?t-n:hp(t)&&hp(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Hm(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function A3(e){"@babel/helpers - typeof";return A3=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},A3(e)}var Bwe=["viewBox","children"],$we=["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"],yD=["points","pathLength"],EN={svg:Bwe,polygon:yD,polyline:yD},m4=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","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"],dw=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(E.isValidElement(t)&&(r=t.props),!ay(r))return null;var i={};return Object.keys(r).forEach(function(a){m4.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},qwe=function(t,n,r){return function(i){return t(n,r,i),null}},hw=function(t,n,r){if(!ay(t)||A3(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];m4.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=qwe(o,n,r))}),i},Uwe=["children"],zwe=["children"];function vD(e,t){if(e==null)return{};var n=Vwe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function P3(e){"@babel/helpers - typeof";return P3=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},P3(e)}var xD={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"},Vu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},bD=null,ON=null,g4=function e(t){if(t===bD&&Array.isArray(ON))return ON;var n=[];return E.Children.forEach(t,function(r){jn(r)||(Ewe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),ON=n,bD=t,n};function jl(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Vu(i)}):r=[Vu(t)],g4(e).forEach(function(i){var a=Ws(i,"type.displayName")||Ws(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function ns(e,t){var n=jl(e,t);return n&&n[0]}var wD=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!it(r)||r<=0||!it(i)||i<=0)},Wwe=["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"],Hwe=function(t){return t&&t.type&&hp(t.type)&&Wwe.indexOf(t.type)>=0},Ywe=function(t){return t&&P3(t)==="object"&&"clipDot"in t},Gwe=function(t,n,r,i){var a,o=(a=EN==null?void 0:EN[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!fn(t)&&(i&&o.includes(n)||$we.includes(n))||r&&m4.includes(n)},kn=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(E.isValidElement(t)&&(i=t.props),!ay(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;Gwe((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},j3=function e(t,n){if(t===n)return!0;var r=E.Children.count(t);if(r!==E.Children.count(n))return!1;if(r===0)return!0;if(r===1)return SD(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!SD(a,o))return!1}return!0},SD=function(t,n){if(jn(t)&&jn(n))return!0;if(!jn(t)&&!jn(n)){var r=t.props||{},i=r.children,a=vD(r,Uwe),o=n.props||{},s=o.children,l=vD(o,zwe);return i&&s?Hm(a,l)&&j3(i,s):!i&&!s?Hm(a,l):!1}return!1},_D=function(t,n){var r=[],i={};return g4(t).forEach(function(a,o){if(Hwe(a))r.push(a);else if(a){var s=Vu(a.type),l=n[s]||{},c=l.handler,f=l.once;if(c&&(!f||!i[s])){var h=c(a,s,o);r.push(h),i[s]=!0}}}),r},Kwe=function(t){var n=t&&t.type;return n&&xD[n]?xD[n]:null},Xwe=function(t,n){return g4(n).indexOf(t)},Qwe=["children","width","height","viewBox","className","style","title","desc"];function C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C3.apply(this,arguments)}function Jwe(e,t){if(e==null)return{};var n=Zwe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function E3(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,c=Jwe(e,Qwe),f=i||{width:n,height:r,x:0,y:0},h=Tn("recharts-surface",a);return _e.createElement("svg",C3({},kn(c,!0,"svg"),{className:h,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_e.createElement("title",null,s),_e.createElement("desc",null,l),t)}var e2e=["children","className"];function O3(){return O3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O3.apply(this,arguments)}function t2e(e,t){if(e==null)return{};var n=n2e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function n2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ur=_e.forwardRef(function(e,t){var n=e.children,r=e.className,i=t2e(e,e2e),a=Tn("recharts-layer",r);return _e.createElement("g",O3({className:a},kn(i,!0),{ref:t}),n)}),kc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]},TN,ND;function r2e(){if(ND)return TN;ND=1;function e(t,n,r){var i=-1,a=t.length;n<0&&(n=-n>a?0:a+n),r=r>a?a:r,r<0&&(r+=a),a=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+n];return o}return TN=e,TN}var MN,kD;function i2e(){if(kD)return MN;kD=1;var e=r2e();function t(n,r,i){var a=n.length;return i=i===void 0?a:i,!r&&i>=a?n:e(n,r,i)}return MN=t,MN}var LN,AD;function uG(){if(AD)return LN;AD=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+i+a+"]");function l(c){return s.test(c)}return LN=l,LN}var RN,PD;function a2e(){if(PD)return RN;PD=1;function e(t){return t.split("")}return RN=e,RN}var IN,jD;function o2e(){if(jD)return IN;jD=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+l+")",f="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=c+"?",y="["+a+"]?",x="(?:"+m+"(?:"+[f,h,g].join("|")+")"+y+b+")*",w=y+b+x,_="(?:"+[f+s+"?",s,h,g,o].join("|")+")",k=RegExp(l+"(?="+l+")|"+_+w,"g");function P(C){return C.match(k)||[]}return IN=P,IN}var DN,CD;function s2e(){if(CD)return DN;CD=1;var e=a2e(),t=uG(),n=o2e();function r(i){return t(i)?n(i):e(i)}return DN=r,DN}var FN,ED;function l2e(){if(ED)return FN;ED=1;var e=i2e(),t=uG(),n=s2e(),r=oG();function i(a){return function(o){o=r(o);var s=t(o)?n(o):void 0,l=s?s[0]:o.charAt(0),c=s?e(s,1).join(""):o.slice(1);return l[a]()+c}}return FN=i,FN}var BN,OD;function c2e(){if(OD)return BN;OD=1;var e=l2e(),t=e("toUpperCase");return BN=t,BN}var u2e=c2e();const u5=Kn(u2e);function Nr(e){return function(){return e}}const fG=Math.cos,pw=Math.sin,Dl=Math.sqrt,mw=Math.PI,f5=2*mw,T3=Math.PI,M3=2*T3,Ph=1e-6,f2e=M3-Ph;function dG(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function d2e(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return dG;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class h2e{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?dG:d2e(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,c=i-n,f=o-t,h=s-n,g=f*f+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>Ph)if(!(Math.abs(h*l-c*f)>Ph)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-o,b=i-s,y=l*l+c*c,x=m*m+b*b,w=Math.sqrt(y),_=Math.sqrt(g),k=a*Math.tan((T3-Math.acos((y+g-x)/(2*w*_)))/2),P=k/_,C=k/w;Math.abs(P-1)>Ph&&this._append`L${t+P*f},${n+P*h}`,this._append`A${a},${a},0,0,${+(h*m>f*b)},${this._x1=t+C*l},${this._y1=n+C*c}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,f=n+l,h=1^o,g=o?i-a:a-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>Ph||Math.abs(this._y1-f)>Ph)&&this._append`L${c},${f}`,r&&(g<0&&(g=g%M3+M3),g>f2e?this._append`A${r},${r},0,1,${h},${t-s},${n-l}A${r},${r},0,1,${h},${this._x1=c},${this._y1=f}`:g>Ph&&this._append`A${r},${r},0,${+(g>=T3)},${h},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function y4(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new h2e(t)}function v4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hG(e){this._context=e}hG.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 d5(e){return new hG(e)}function pG(e){return e[0]}function mG(e){return e[1]}function gG(e,t){var n=Nr(!0),r=null,i=d5,a=null,o=y4(s);e=typeof e=="function"?e:e===void 0?pG:Nr(e),t=typeof t=="function"?t:t===void 0?mG:Nr(t);function s(l){var c,f=(l=v4(l)).length,h,g=!1,m;for(r==null&&(a=i(m=o())),c=0;c<=f;++c)!(c<f&&n(h=l[c],c,l))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+e(h,c,l),+t(h,c,l));if(m)return a=null,m+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Nr(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Nr(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Nr(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function Mx(e,t,n){var r=null,i=Nr(!0),a=null,o=d5,s=null,l=y4(c);e=typeof e=="function"?e:e===void 0?pG:Nr(+e),t=typeof t=="function"?t:Nr(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?mG:Nr(+n);function c(h){var g,m,b,y=(h=v4(h)).length,x,w=!1,_,k=new Array(y),P=new Array(y);for(a==null&&(s=o(_=l())),g=0;g<=y;++g){if(!(g<y&&i(x=h[g],g,h))===w)if(w=!w)m=g,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),b=g-1;b>=m;--b)s.point(k[b],P[b]);s.lineEnd(),s.areaEnd()}w&&(k[g]=+e(x,g,h),P[g]=+t(x,g,h),s.point(r?+r(x,g,h):k[g],n?+n(x,g,h):P[g]))}if(_)return s=null,_+""||null}function f(){return gG().defined(i).curve(o).context(a)}return c.x=function(h){return arguments.length?(e=typeof h=="function"?h:Nr(+h),r=null,c):e},c.x0=function(h){return arguments.length?(e=typeof h=="function"?h:Nr(+h),c):e},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Nr(+h),c):r},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:Nr(+h),n=null,c):t},c.y0=function(h){return arguments.length?(t=typeof h=="function"?h:Nr(+h),c):t},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Nr(+h),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:Nr(!!h),c):i},c.curve=function(h){return arguments.length?(o=h,a!=null&&(s=o(a)),c):o},c.context=function(h){return arguments.length?(h==null?a=s=null:s=o(a=h),c):a},c}class yG{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function p2e(e){return new yG(e,!0)}function m2e(e){return new yG(e,!1)}const x4={draw(e,t){const n=Dl(t/mw);e.moveTo(n,0),e.arc(0,0,n,0,f5)}},g2e={draw(e,t){const n=Dl(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},vG=Dl(1/3),y2e=vG*2,v2e={draw(e,t){const n=Dl(t/y2e),r=n*vG;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},x2e={draw(e,t){const n=Dl(t),r=-n/2;e.rect(r,r,n,n)}},b2e=.8908130915292852,xG=pw(mw/10)/pw(7*mw/10),w2e=pw(f5/10)*xG,S2e=-fG(f5/10)*xG,_2e={draw(e,t){const n=Dl(t*b2e),r=w2e*n,i=S2e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=f5*a/5,s=fG(o),l=pw(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},$N=Dl(3),N2e={draw(e,t){const n=-Dl(t/($N*3));e.moveTo(0,n*2),e.lineTo(-$N*n,-n),e.lineTo($N*n,-n),e.closePath()}},Ls=-.5,Rs=Dl(3)/2,L3=1/Dl(12),k2e=(L3/2+1)*3,A2e={draw(e,t){const n=Dl(t/k2e),r=n/2,i=n*L3,a=r,o=n*L3+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Ls*r-Rs*i,Rs*r+Ls*i),e.lineTo(Ls*a-Rs*o,Rs*a+Ls*o),e.lineTo(Ls*s-Rs*l,Rs*s+Ls*l),e.lineTo(Ls*r+Rs*i,Ls*i-Rs*r),e.lineTo(Ls*a+Rs*o,Ls*o-Rs*a),e.lineTo(Ls*s+Rs*l,Ls*l-Rs*s),e.closePath()}};function P2e(e,t){let n=null,r=y4(i);e=typeof e=="function"?e:Nr(e||x4),t=typeof t=="function"?t:Nr(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Nr(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Nr(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function gw(){}function yw(e,t,n){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+n)/6)}function bG(e){this._context=e}bG.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:yw(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:yw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function j2e(e){return new bG(e)}function wG(e){this._context=e}wG.prototype={areaStart:gw,areaEnd:gw,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:yw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function C2e(e){return new wG(e)}function SG(e){this._context=e}SG.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function E2e(e){return new SG(e)}function _G(e){this._context=e}_G.prototype={areaStart:gw,areaEnd:gw,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 O2e(e){return new _G(e)}function TD(e){return e<0?-1:1}function MD(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(TD(a)+TD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function LD(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function qN(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function vw(e){this._context=e}vw.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:qN(this,this._t0,LD(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 n=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,qN(this,LD(this,n=MD(this,e,t)),n);break;default:qN(this,this._t0,n=MD(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function NG(e){this._context=new kG(e)}(NG.prototype=Object.create(vw.prototype)).point=function(e,t){vw.prototype.point.call(this,t,e)};function kG(e){this._context=e}kG.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,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function T2e(e){return new vw(e)}function M2e(e){return new NG(e)}function AG(e){this._context=e}AG.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=RD(e),i=RD(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===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 RD(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function L2e(e){return new AG(e)}function h5(e,t){this._context=e,this._t=t}h5.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;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function R2e(e){return new h5(e,.5)}function I2e(e){return new h5(e,0)}function D2e(e){return new h5(e,1)}function wg(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function R3(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function F2e(e,t){return e[t]}function B2e(e){const t=[];return t.key=e,t}function $2e(){var e=Nr([]),t=R3,n=wg,r=F2e;function i(a){var o=Array.from(e.apply(this,arguments),B2e),s,l=o.length,c=-1,f;for(const h of a)for(s=0,++c;s<l;++s)(o[s][c]=[0,+r(h,o[s].key,c,a)]).data=h;for(s=0,f=v4(t(o));s<l;++s)o[f[s]].index=s;return n(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Nr(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Nr(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?R3:typeof a=="function"?a:Nr(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??wg,i):n},i}function q2e(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}wg(e,t)}}function U2e(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}wg(e,t)}}function z2e(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,l=0,c=0;s<o;++s){for(var f=e[t[s]],h=f[r][1]||0,g=f[r-1][1]||0,m=(h-g)/2,b=0;b<s;++b){var y=e[t[b]],x=y[r][1]||0,w=y[r-1][1]||0;m+=x-w}l+=h,c+=m*h}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,wg(e,t)}}function f0(e){"@babel/helpers - typeof";return f0=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},f0(e)}var V2e=["type","size","sizeType"];function I3(){return I3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I3.apply(this,arguments)}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function DD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ID(Object(n),!0).forEach(function(r){W2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W2e(e,t,n){return t=H2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H2e(e){var t=Y2e(e,"string");return f0(t)=="symbol"?t:t+""}function Y2e(e,t){if(f0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(f0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G2e(e,t){if(e==null)return{};var n=K2e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var PG={symbolCircle:x4,symbolCross:g2e,symbolDiamond:v2e,symbolSquare:x2e,symbolStar:_2e,symbolTriangle:N2e,symbolWye:A2e},X2e=Math.PI/180,Q2e=function(t){var n="symbol".concat(u5(t));return PG[n]||x4},J2e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*X2e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},Z2e=function(t,n){PG["symbol".concat(u5(t))]=n},b4=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=G2e(t,V2e),c=DD(DD({},l),{},{type:r,size:a,sizeType:s}),f=function(){var x=Q2e(r),w=P2e().type(x).size(J2e(a,s,r));return w()},h=c.className,g=c.cx,m=c.cy,b=kn(c,!0);return g===+g&&m===+m&&a===+a?_e.createElement("path",I3({},b,{className:Tn("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(m,")"),d:f()})):null};b4.registerSymbol=Z2e;function Sg(e){"@babel/helpers - typeof";return Sg=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},Sg(e)}function D3(){return D3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D3.apply(this,arguments)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function e5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FD(Object(n),!0).forEach(function(r){d0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n5e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CG(r.key),r)}}function r5e(e,t,n){return t&&n5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i5e(e,t,n){return t=xw(t),a5e(e,jG()?Reflect.construct(t,n||[],xw(e).constructor):t.apply(e,n))}function a5e(e,t){if(t&&(Sg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o5e(e)}function o5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jG=function(){return!!e})()}function xw(e){return xw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xw(e)}function s5e(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&&F3(e,t)}function F3(e,t){return F3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},F3(e,t)}function d0(e,t,n){return t=CG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CG(e){var t=l5e(e,"string");return Sg(t)=="symbol"?t:t+""}function l5e(e,t){if(Sg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Is=32,w4=(function(e){function t(){return t5e(this,t),i5e(this,t,arguments)}return s5e(t,e),r5e(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=Is/2,o=Is/6,s=Is/3,l=r.inactive?i:r.color;if(r.type==="plainline")return _e.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:Is,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return _e.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
H`).concat(Is,"M").concat(2*s,",").concat(a,`
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return _e.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Is/8,"h").concat(Is,"v").concat(Is*3/4,"h").concat(-Is,"z"),className:"recharts-legend-icon"});if(_e.isValidElement(r.legendIcon)){var c=e5e({},r);return delete c.legendIcon,_e.cloneElement(r.legendIcon,c)}return _e.createElement(b4,{fill:l,cx:a,cy:a,size:Is,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,l=i.formatter,c=i.inactiveColor,f={x:0,y:0,width:Is,height:Is},h={display:s==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(m,b){var y=m.formatter||l,x=Tn(d0(d0({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",m.inactive));if(m.type==="none")return null;var w=fn(m.value)?null:m.value;kc(!fn(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 _=m.inactive?c:m.color;return _e.createElement("li",D3({className:x,style:h,key:"legend-item-".concat(b)},hw(r.props,m,b)),_e.createElement(E3,{width:o,height:o,viewBox:f,style:g},r.renderIcon(m)),_e.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},y?y(w,m,b):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return _e.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])})(E.PureComponent);d0(w4,"displayName","Legend");d0(w4,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var UN,BD;function c5e(){if(BD)return UN;BD=1;var e=s5();function t(){this.__data__=new e,this.size=0}return UN=t,UN}var zN,$D;function u5e(){if($D)return zN;$D=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return zN=e,zN}var VN,qD;function f5e(){if(qD)return VN;qD=1;function e(t){return this.__data__.get(t)}return VN=e,VN}var WN,UD;function d5e(){if(UD)return WN;UD=1;function e(t){return this.__data__.has(t)}return WN=e,WN}var HN,zD;function h5e(){if(zD)return HN;zD=1;var e=s5(),t=f4(),n=d4(),r=200;function i(a,o){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<r-1)return l.push([a,o]),this.size=++s.size,this;s=this.__data__=new n(l)}return s.set(a,o),this.size=s.size,this}return HN=i,HN}var YN,VD;function EG(){if(VD)return YN;VD=1;var e=s5(),t=c5e(),n=u5e(),r=f5e(),i=d5e(),a=h5e();function o(s){var l=this.__data__=new e(s);this.size=l.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,YN=o,YN}var GN,WD;function p5e(){if(WD)return GN;WD=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return GN=t,GN}var KN,HD;function m5e(){if(HD)return KN;HD=1;function e(t){return this.__data__.has(t)}return KN=e,KN}var XN,YD;function OG(){if(YD)return XN;YD=1;var e=d4(),t=p5e(),n=m5e();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,XN=r,XN}var QN,GD;function TG(){if(GD)return QN;GD=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return QN=e,QN}var JN,KD;function MG(){if(KD)return JN;KD=1;function e(t,n){return t.has(n)}return JN=e,JN}var ZN,XD;function LG(){if(XD)return ZN;XD=1;var e=OG(),t=TG(),n=MG(),r=1,i=2;function a(o,s,l,c,f,h){var g=l&r,m=o.length,b=s.length;if(m!=b&&!(g&&b>m))return!1;var y=h.get(o),x=h.get(s);if(y&&x)return y==s&&x==o;var w=-1,_=!0,k=l&i?new e:void 0;for(h.set(o,s),h.set(s,o);++w<m;){var P=o[w],C=s[w];if(c)var j=g?c(C,P,w,s,o,h):c(P,C,w,o,s,h);if(j!==void 0){if(j)continue;_=!1;break}if(k){if(!t(s,function(L,R){if(!n(k,R)&&(P===L||f(P,L,l,c,h)))return k.push(R)})){_=!1;break}}else if(!(P===C||f(P,C,l,c,h))){_=!1;break}}return h.delete(o),h.delete(s),_}return ZN=a,ZN}var ek,QD;function g5e(){if(QD)return ek;QD=1;var e=Bc(),t=e.Uint8Array;return ek=t,ek}var tk,JD;function y5e(){if(JD)return tk;JD=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return tk=e,tk}var nk,ZD;function S4(){if(ZD)return nk;ZD=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return nk=e,nk}var rk,e8;function v5e(){if(e8)return rk;e8=1;var e=b1(),t=g5e(),n=u4(),r=LG(),i=y5e(),a=S4(),o=1,s=2,l="[object Boolean]",c="[object Date]",f="[object Error]",h="[object Map]",g="[object Number]",m="[object RegExp]",b="[object Set]",y="[object String]",x="[object Symbol]",w="[object ArrayBuffer]",_="[object DataView]",k=e?e.prototype:void 0,P=k?k.valueOf:void 0;function C(j,L,R,D,H,M,F){switch(R){case _:if(j.byteLength!=L.byteLength||j.byteOffset!=L.byteOffset)return!1;j=j.buffer,L=L.buffer;case w:return!(j.byteLength!=L.byteLength||!M(new t(j),new t(L)));case l:case c:case g:return n(+j,+L);case f:return j.name==L.name&&j.message==L.message;case m:case y:return j==L+"";case h:var W=i;case b:var V=D&o;if(W||(W=a),j.size!=L.size&&!V)return!1;var X=F.get(j);if(X)return X==L;D|=s,F.set(j,L);var Y=r(W(j),W(L),D,H,M,F);return F.delete(j),Y;case x:if(P)return P.call(j)==P.call(L)}return!1}return rk=C,rk}var ik,t8;function RG(){if(t8)return ik;t8=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return ik=e,ik}var ak,n8;function x5e(){if(n8)return ak;n8=1;var e=RG(),t=Ro();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return ak=n,ak}var ok,r8;function b5e(){if(r8)return ok;r8=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var s=t[r];n(s,r,t)&&(o[a++]=s)}return o}return ok=e,ok}var sk,i8;function w5e(){if(i8)return sk;i8=1;function e(){return[]}return sk=e,sk}var lk,a8;function S5e(){if(a8)return lk;a8=1;var e=b5e(),t=w5e(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return r.call(o,s)}))}:t;return lk=a,lk}var ck,o8;function _5e(){if(o8)return ck;o8=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return ck=e,ck}var uk,s8;function N5e(){if(s8)return uk;s8=1;var e=af(),t=of(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return uk=r,uk}var fk,l8;function _4(){if(l8)return fk;l8=1;var e=N5e(),t=of(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return fk=a,fk}var Av={exports:{}},dk,c8;function k5e(){if(c8)return dk;c8=1;function e(){return!1}return dk=e,dk}Av.exports;var u8;function IG(){return u8||(u8=1,(function(e,t){var n=Bc(),r=k5e(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||r;e.exports=c})(Av,Av.exports)),Av.exports}var hk,f8;function N4(){if(f8)return hk;f8=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return hk=n,hk}var pk,d8;function k4(){if(d8)return pk;d8=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return pk=t,pk}var mk,h8;function A5e(){if(h8)return mk;h8=1;var e=af(),t=k4(),n=of(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",f="[object Number]",h="[object Object]",g="[object RegExp]",m="[object Set]",b="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",k="[object Float64Array]",P="[object Int8Array]",C="[object Int16Array]",j="[object Int32Array]",L="[object Uint8Array]",R="[object Uint8ClampedArray]",D="[object Uint16Array]",H="[object Uint32Array]",M={};M[_]=M[k]=M[P]=M[C]=M[j]=M[L]=M[R]=M[D]=M[H]=!0,M[r]=M[i]=M[x]=M[a]=M[w]=M[o]=M[s]=M[l]=M[c]=M[f]=M[h]=M[g]=M[m]=M[b]=M[y]=!1;function F(W){return n(W)&&t(W.length)&&!!M[e(W)]}return mk=F,mk}var gk,p8;function DG(){if(p8)return gk;p8=1;function e(t){return function(n){return t(n)}}return gk=e,gk}var Pv={exports:{}};Pv.exports;var m8;function P5e(){return m8||(m8=1,(function(e,t){var n=rG(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=(function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}})();e.exports=s})(Pv,Pv.exports)),Pv.exports}var yk,g8;function FG(){if(g8)return yk;g8=1;var e=A5e(),t=DG(),n=P5e(),r=n&&n.isTypedArray,i=r?t(r):e;return yk=i,yk}var vk,y8;function j5e(){if(y8)return vk;y8=1;var e=_5e(),t=_4(),n=Ro(),r=IG(),i=N4(),a=FG(),o=Object.prototype,s=o.hasOwnProperty;function l(c,f){var h=n(c),g=!h&&t(c),m=!h&&!g&&r(c),b=!h&&!g&&!m&&a(c),y=h||g||m||b,x=y?e(c.length,String):[],w=x.length;for(var _ in c)(f||s.call(c,_))&&!(y&&(_=="length"||m&&(_=="offset"||_=="parent")||b&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,w)))&&x.push(_);return x}return vk=l,vk}var xk,v8;function C5e(){if(v8)return xk;v8=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return xk=t,xk}var bk,x8;function BG(){if(x8)return bk;x8=1;function e(t,n){return function(r){return t(n(r))}}return bk=e,bk}var wk,b8;function E5e(){if(b8)return wk;b8=1;var e=BG(),t=e(Object.keys,Object);return wk=t,wk}var Sk,w8;function O5e(){if(w8)return Sk;w8=1;var e=C5e(),t=E5e(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))r.call(a,s)&&s!="constructor"&&o.push(s);return o}return Sk=i,Sk}var _k,S8;function S1(){if(S8)return _k;S8=1;var e=c4(),t=k4();function n(r){return r!=null&&t(r.length)&&!e(r)}return _k=n,_k}var Nk,_8;function p5(){if(_8)return Nk;_8=1;var e=j5e(),t=O5e(),n=S1();function r(i){return n(i)?e(i):t(i)}return Nk=r,Nk}var kk,N8;function T5e(){if(N8)return kk;N8=1;var e=x5e(),t=S5e(),n=p5();function r(i){return e(i,n,t)}return kk=r,kk}var Ak,k8;function M5e(){if(k8)return Ak;k8=1;var e=T5e(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s,l,c,f){var h=s&t,g=e(a),m=g.length,b=e(o),y=b.length;if(m!=y&&!h)return!1;for(var x=m;x--;){var w=g[x];if(!(h?w in o:r.call(o,w)))return!1}var _=f.get(a),k=f.get(o);if(_&&k)return _==o&&k==a;var P=!0;f.set(a,o),f.set(o,a);for(var C=h;++x<m;){w=g[x];var j=a[w],L=o[w];if(l)var R=h?l(L,j,w,o,a,f):l(j,L,w,a,o,f);if(!(R===void 0?j===L||c(j,L,s,l,f):R)){P=!1;break}C||(C=w=="constructor")}if(P&&!C){var D=a.constructor,H=o.constructor;D!=H&&"constructor"in a&&"constructor"in o&&!(typeof D=="function"&&D instanceof D&&typeof H=="function"&&H instanceof H)&&(P=!1)}return f.delete(a),f.delete(o),P}return Ak=i,Ak}var Pk,A8;function L5e(){if(A8)return Pk;A8=1;var e=jp(),t=Bc(),n=e(t,"DataView");return Pk=n,Pk}var jk,P8;function R5e(){if(P8)return jk;P8=1;var e=jp(),t=Bc(),n=e(t,"Promise");return jk=n,jk}var Ck,j8;function $G(){if(j8)return Ck;j8=1;var e=jp(),t=Bc(),n=e(t,"Set");return Ck=n,Ck}var Ek,C8;function I5e(){if(C8)return Ek;C8=1;var e=jp(),t=Bc(),n=e(t,"WeakMap");return Ek=n,Ek}var Ok,E8;function D5e(){if(E8)return Ok;E8=1;var e=L5e(),t=f4(),n=R5e(),r=$G(),i=I5e(),a=af(),o=iG(),s="[object Map]",l="[object Object]",c="[object Promise]",f="[object Set]",h="[object WeakMap]",g="[object DataView]",m=o(e),b=o(t),y=o(n),x=o(r),w=o(i),_=a;return(e&&_(new e(new ArrayBuffer(1)))!=g||t&&_(new t)!=s||n&&_(n.resolve())!=c||r&&_(new r)!=f||i&&_(new i)!=h)&&(_=function(k){var P=a(k),C=P==l?k.constructor:void 0,j=C?o(C):"";if(j)switch(j){case m:return g;case b:return s;case y:return c;case x:return f;case w:return h}return P}),Ok=_,Ok}var Tk,O8;function F5e(){if(O8)return Tk;O8=1;var e=EG(),t=LG(),n=v5e(),r=M5e(),i=D5e(),a=Ro(),o=IG(),s=FG(),l=1,c="[object Arguments]",f="[object Array]",h="[object Object]",g=Object.prototype,m=g.hasOwnProperty;function b(y,x,w,_,k,P){var C=a(y),j=a(x),L=C?f:i(y),R=j?f:i(x);L=L==c?h:L,R=R==c?h:R;var D=L==h,H=R==h,M=L==R;if(M&&o(y)){if(!o(x))return!1;C=!0,D=!1}if(M&&!D)return P||(P=new e),C||s(y)?t(y,x,w,_,k,P):n(y,x,L,w,_,k,P);if(!(w&l)){var F=D&&m.call(y,"__wrapped__"),W=H&&m.call(x,"__wrapped__");if(F||W){var V=F?y.value():y,X=W?x.value():x;return P||(P=new e),k(V,X,w,_,P)}}return M?(P||(P=new e),r(y,x,w,_,k,P)):!1}return Tk=b,Tk}var Mk,T8;function A4(){if(T8)return Mk;T8=1;var e=F5e(),t=of();function n(r,i,a,o,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,s)}return Mk=n,Mk}var Lk,M8;function B5e(){if(M8)return Lk;M8=1;var e=EG(),t=A4(),n=1,r=2;function i(a,o,s,l){var c=s.length,f=c,h=!l;if(a==null)return!f;for(a=Object(a);c--;){var g=s[c];if(h&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++c<f;){g=s[c];var m=g[0],b=a[m],y=g[1];if(h&&g[2]){if(b===void 0&&!(m in a))return!1}else{var x=new e;if(l)var w=l(b,y,m,a,o,x);if(!(w===void 0?t(y,b,n|r,l,x):w))return!1}}return!0}return Lk=i,Lk}var Rk,L8;function qG(){if(L8)return Rk;L8=1;var e=Fd();function t(n){return n===n&&!e(n)}return Rk=t,Rk}var Ik,R8;function $5e(){if(R8)return Ik;R8=1;var e=qG(),t=p5();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],s=r[o];i[a]=[o,s,e(s)]}return i}return Ik=n,Ik}var Dk,I8;function UG(){if(I8)return Dk;I8=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Dk=e,Dk}var Fk,D8;function q5e(){if(D8)return Fk;D8=1;var e=B5e(),t=$5e(),n=UG();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return Fk=r,Fk}var Bk,F8;function U5e(){if(F8)return Bk;F8=1;function e(t,n){return t!=null&&n in Object(t)}return Bk=e,Bk}var $k,B8;function z5e(){if(B8)return $k;B8=1;var e=sG(),t=_4(),n=Ro(),r=N4(),i=k4(),a=c5();function o(s,l,c){l=e(l,s);for(var f=-1,h=l.length,g=!1;++f<h;){var m=a(l[f]);if(!(g=s!=null&&c(s,m)))break;s=s[m]}return g||++f!=h?g:(h=s==null?0:s.length,!!h&&i(h)&&r(m,h)&&(n(s)||t(s)))}return $k=o,$k}var qk,$8;function V5e(){if($8)return qk;$8=1;var e=U5e(),t=z5e();function n(r,i){return r!=null&&t(r,i,e)}return qk=n,qk}var Uk,q8;function W5e(){if(q8)return Uk;q8=1;var e=A4(),t=lG(),n=V5e(),r=l4(),i=qG(),a=UG(),o=c5(),s=1,l=2;function c(f,h){return r(f)&&i(h)?a(o(f),h):function(g){var m=t(g,f);return m===void 0&&m===h?n(g,f):e(h,m,s|l)}}return Uk=c,Uk}var zk,U8;function sy(){if(U8)return zk;U8=1;function e(t){return t}return zk=e,zk}var Vk,z8;function H5e(){if(z8)return Vk;z8=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Vk=e,Vk}var Wk,V8;function Y5e(){if(V8)return Wk;V8=1;var e=p4();function t(n){return function(r){return e(r,n)}}return Wk=t,Wk}var Hk,W8;function G5e(){if(W8)return Hk;W8=1;var e=H5e(),t=Y5e(),n=l4(),r=c5();function i(a){return n(a)?e(r(a)):t(a)}return Hk=i,Hk}var Yk,H8;function Bd(){if(H8)return Yk;H8=1;var e=q5e(),t=W5e(),n=sy(),r=Ro(),i=G5e();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return Yk=a,Yk}var Gk,Y8;function zG(){if(Y8)return Gk;Y8=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return Gk=e,Gk}var Kk,G8;function K5e(){if(G8)return Kk;G8=1;function e(t){return t!==t}return Kk=e,Kk}var Xk,K8;function X5e(){if(K8)return Xk;K8=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return Xk=e,Xk}var Qk,X8;function Q5e(){if(X8)return Qk;X8=1;var e=zG(),t=K5e(),n=X5e();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return Qk=r,Qk}var Jk,Q8;function J5e(){if(Q8)return Jk;Q8=1;var e=Q5e();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return Jk=t,Jk}var Zk,J8;function Z5e(){if(J8)return Zk;J8=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return Zk=e,Zk}var eA,Z8;function eSe(){if(Z8)return eA;Z8=1;function e(){}return eA=e,eA}var tA,eF;function tSe(){if(eF)return tA;eF=1;var e=$G(),t=eSe(),n=S4(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return tA=i,tA}var nA,tF;function nSe(){if(tF)return nA;tF=1;var e=OG(),t=J5e(),n=Z5e(),r=MG(),i=tSe(),a=S4(),o=200;function s(l,c,f){var h=-1,g=t,m=l.length,b=!0,y=[],x=y;if(f)b=!1,g=n;else if(m>=o){var w=c?null:i(l);if(w)return a(w);b=!1,g=r,x=new e}else x=c?[]:y;e:for(;++h<m;){var _=l[h],k=c?c(_):_;if(_=f||_!==0?_:0,b&&k===k){for(var P=x.length;P--;)if(x[P]===k)continue e;c&&x.push(k),y.push(_)}else g(x,k,f)||(x!==y&&x.push(k),y.push(_))}return y}return nA=s,nA}var rA,nF;function rSe(){if(nF)return rA;nF=1;var e=Bd(),t=nSe();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return rA=n,rA}var iSe=rSe();const rF=Kn(iSe);function VG(e,t,n){return t===!0?rF(e,n):fn(t)?rF(e,t):e}function _g(e){"@babel/helpers - typeof";return _g=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},_g(e)}var aSe=["ref"];function iF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iF(Object(n),!0).forEach(function(r){m5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HG(r.key),r)}}function sSe(e,t,n){return t&&aF(e.prototype,t),n&&aF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lSe(e,t,n){return t=bw(t),cSe(e,WG()?Reflect.construct(t,n||[],bw(e).constructor):t.apply(e,n))}function cSe(e,t){if(t&&(_g(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uSe(e)}function uSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WG=function(){return!!e})()}function bw(e){return bw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bw(e)}function fSe(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&&B3(e,t)}function B3(e,t){return B3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B3(e,t)}function m5(e,t,n){return t=HG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HG(e){var t=dSe(e,"string");return _g(t)=="symbol"?t:t+""}function dSe(e,t){if(_g(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_g(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hSe(e,t){if(e==null)return{};var n=pSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function mSe(e){return e.value}function gSe(e,t){if(_e.isValidElement(e))return _e.cloneElement(e,t);if(typeof e=="function")return _e.createElement(e,t);t.ref;var n=hSe(t,aSe);return _e.createElement(w4,n)}var oF=1,Ym=(function(e){function t(){var n;oSe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=lSe(this,t,[].concat(i)),m5(n,"lastBoundingBox",{width:-1,height:-1}),n}return fSe(t,e),sSe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>oF||Math.abs(i.height-this.lastBoundingBox.height)>oF)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?_u({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,f=i.chartHeight,h,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var m=this.getBBoxSnapshot();h={left:((c||0)-m.width)/2}}else h=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var b=this.getBBoxSnapshot();g={top:((f||0)-b.height)/2}}else g=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return _u(_u({},h),g)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,h=_u(_u({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return _e.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(m){r.wrapperNode=m}},gSe(a,_u(_u({},this.props),{},{payload:VG(f,c,mSe)})))}}],[{key:"getWithHeight",value:function(r,i){var a=_u(_u({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&it(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(E.PureComponent);m5(Ym,"displayName","Legend");m5(Ym,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var iA,sF;function ySe(){if(sF)return iA;sF=1;var e=b1(),t=_4(),n=Ro(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return iA=i,iA}var aA,lF;function YG(){if(lF)return aA;lF=1;var e=RG(),t=ySe();function n(r,i,a,o,s){var l=-1,c=r.length;for(a||(a=t),s||(s=[]);++l<c;){var f=r[l];i>0&&a(f)?i>1?n(f,i-1,a,o,s):e(s,f):o||(s[s.length]=f)}return s}return aA=n,aA}var oA,cF;function vSe(){if(cF)return oA;cF=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),s=i(n),l=s.length;l--;){var c=s[t?l:++a];if(r(o[c],c,o)===!1)break}return n}}return oA=e,oA}var sA,uF;function xSe(){if(uF)return sA;uF=1;var e=vSe(),t=e();return sA=t,sA}var lA,fF;function GG(){if(fF)return lA;fF=1;var e=xSe(),t=p5();function n(r,i){return r&&e(r,i,t)}return lA=n,lA}var cA,dF;function bSe(){if(dF)return cA;dF=1;var e=S1();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,s=r?o:-1,l=Object(i);(r?s--:++s<o)&&a(l[s],s,l)!==!1;);return i}}return cA=t,cA}var uA,hF;function P4(){if(hF)return uA;hF=1;var e=GG(),t=bSe(),n=t(e);return uA=n,uA}var fA,pF;function KG(){if(pF)return fA;pF=1;var e=P4(),t=S1();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(s,l,c){o[++a]=i(s,l,c)}),o}return fA=n,fA}var dA,mF;function wSe(){if(mF)return dA;mF=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return dA=e,dA}var hA,gF;function SSe(){if(gF)return hA;gF=1;var e=iy();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,s=e(n),l=r!==void 0,c=r===null,f=r===r,h=e(r);if(!c&&!h&&!s&&n>r||s&&l&&f&&!c&&!h||a&&l&&f||!i&&f||!o)return 1;if(!a&&!s&&!h&&n<r||h&&i&&o&&!a&&!s||c&&i&&o||!l&&o||!f)return-1}return 0}return hA=t,hA}var pA,yF;function _Se(){if(yF)return pA;yF=1;var e=SSe();function t(n,r,i){for(var a=-1,o=n.criteria,s=r.criteria,l=o.length,c=i.length;++a<l;){var f=e(o[a],s[a]);if(f){if(a>=c)return f;var h=i[a];return f*(h=="desc"?-1:1)}}return n.index-r.index}return pA=t,pA}var mA,vF;function NSe(){if(vF)return mA;vF=1;var e=h4(),t=p4(),n=Bd(),r=KG(),i=wSe(),a=DG(),o=_Se(),s=sy(),l=Ro();function c(f,h,g){h.length?h=e(h,function(y){return l(y)?function(x){return t(x,y.length===1?y[0]:y)}:y}):h=[s];var m=-1;h=e(h,a(n));var b=r(f,function(y,x,w){var _=e(h,function(k){return k(y)});return{criteria:_,index:++m,value:y}});return i(b,function(y,x){return o(y,x,g)})}return mA=c,mA}var gA,xF;function kSe(){if(xF)return gA;xF=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return gA=e,gA}var yA,bF;function ASe(){if(bF)return yA;bF=1;var e=kSe(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,s=-1,l=t(o.length-i,0),c=Array(l);++s<l;)c[s]=o[i+s];s=-1;for(var f=Array(i+1);++s<i;)f[s]=o[s];return f[i]=a(c),e(r,this,f)}}return yA=n,yA}var vA,wF;function PSe(){if(wF)return vA;wF=1;function e(t){return function(){return t}}return vA=e,vA}var xA,SF;function XG(){if(SF)return xA;SF=1;var e=jp(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return xA=t,xA}var bA,_F;function jSe(){if(_F)return bA;_F=1;var e=PSe(),t=XG(),n=sy(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return bA=r,bA}var wA,NF;function CSe(){if(NF)return wA;NF=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var s=n(),l=t-(s-o);if(o=s,l>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return wA=r,wA}var SA,kF;function ESe(){if(kF)return SA;kF=1;var e=jSe(),t=CSe(),n=t(e);return SA=n,SA}var _A,AF;function OSe(){if(AF)return _A;AF=1;var e=sy(),t=ASe(),n=ESe();function r(i,a){return n(t(i,a,e),i+"")}return _A=r,_A}var NA,PF;function g5(){if(PF)return NA;PF=1;var e=u4(),t=S1(),n=N4(),r=Fd();function i(a,o,s){if(!r(s))return!1;var l=typeof o;return(l=="number"?t(s)&&n(o,s.length):l=="string"&&o in s)?e(s[o],a):!1}return NA=i,NA}var kA,jF;function TSe(){if(jF)return kA;jF=1;var e=YG(),t=NSe(),n=OSe(),r=g5(),i=n(function(a,o){if(a==null)return[];var s=o.length;return s>1&&r(a,o[0],o[1])?o=[]:s>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return kA=i,kA}var MSe=TSe();const j4=Kn(MSe);function h0(e){"@babel/helpers - typeof";return h0=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},h0(e)}function $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$3.apply(this,arguments)}function LSe(e,t){return FSe(e)||DSe(e,t)||ISe(e,t)||RSe()}function RSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ISe(e,t){if(e){if(typeof e=="string")return CF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CF(e,t)}}function CF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function DSe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function FSe(e){if(Array.isArray(e))return e}function EF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function AA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EF(Object(n),!0).forEach(function(r){BSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BSe(e,t,n){return t=$Se(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Se(e){var t=qSe(e,"string");return h0(t)=="symbol"?t:t+""}function qSe(e,t){if(h0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(h0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function USe(e){return Array.isArray(e)&&Gi(e[0])&&Gi(e[1])?e.join(" ~ "):e}var zSe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,c=l===void 0?{}:l,f=t.payload,h=t.formatter,g=t.itemSorter,m=t.wrapperClassName,b=t.labelClassName,y=t.label,x=t.labelFormatter,w=t.accessibilityLayer,_=w===void 0?!1:w,k=function(){if(f&&f.length){var F={padding:0,margin:0},W=(g?j4(f,g):f).map(function(V,X){if(V.type==="none")return null;var Y=AA({display:"block",paddingTop:4,paddingBottom:4,color:V.color||"#000"},s),Z=V.formatter||h||USe,K=V.value,se=V.name,z=K,te=se;if(Z&&z!=null&&te!=null){var $=Z(K,se,V,X,f);if(Array.isArray($)){var q=LSe($,2);z=q[0],te=q[1]}else z=$}return _e.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(X),style:Y},Gi(te)?_e.createElement("span",{className:"recharts-tooltip-item-name"},te):null,Gi(te)?_e.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,_e.createElement("span",{className:"recharts-tooltip-item-value"},z),_e.createElement("span",{className:"recharts-tooltip-item-unit"},V.unit||""))});return _e.createElement("ul",{className:"recharts-tooltip-item-list",style:F},W)}return null},P=AA({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),C=AA({margin:0},c),j=!jn(y),L=j?y:"",R=Tn("recharts-default-tooltip",m),D=Tn("recharts-tooltip-label",b);j&&x&&f!==void 0&&f!==null&&(L=x(y,f));var H=_?{role:"status","aria-live":"assertive"}:{};return _e.createElement("div",$3({className:R,style:P},H),_e.createElement("p",{className:D,style:C},_e.isValidElement(L)?L:"".concat(L)),k())};function p0(e){"@babel/helpers - typeof";return p0=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},p0(e)}function Lx(e,t,n){return t=VSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VSe(e){var t=WSe(e,"string");return p0(t)=="symbol"?t:t+""}function WSe(e,t){if(p0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(p0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rv="recharts-tooltip-wrapper",HSe={visibility:"hidden"};function YSe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Tn(rv,Lx(Lx(Lx(Lx({},"".concat(rv,"-right"),it(n)&&t&&it(t.x)&&n>=t.x),"".concat(rv,"-left"),it(n)&&t&&it(t.x)&&n<t.x),"".concat(rv,"-bottom"),it(r)&&t&&it(t.y)&&r>=t.y),"".concat(rv,"-top"),it(r)&&t&&it(t.y)&&r<t.y))}function OF(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(a&&it(a[r]))return a[r];var f=n[r]-s-i,h=n[r]+i;if(t[r])return o[r]?f:h;if(o[r]){var g=f,m=l[r];return g<m?Math.max(h,l[r]):Math.max(f,l[r])}var b=h+s,y=l[r]+c;return b>y?Math.max(f,l[r]):Math.max(h,l[r])}function GSe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function KSe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,f,h;return o.height>0&&o.width>0&&n?(f=OF({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),h=OF({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=GSe({translateX:f,translateY:h,useTranslate3d:s})):c=HSe,{cssProperties:c,cssClasses:YSe({translateX:f,translateY:h,coordinate:n})}}function Ng(e){"@babel/helpers - typeof";return Ng=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},Ng(e)}function TF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TF(Object(n),!0).forEach(function(r){U3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JG(r.key),r)}}function JSe(e,t,n){return t&&QSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZSe(e,t,n){return t=ww(t),e_e(e,QG()?Reflect.construct(t,n||[],ww(e).constructor):t.apply(e,n))}function e_e(e,t){if(t&&(Ng(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t_e(e)}function t_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QG=function(){return!!e})()}function ww(e){return ww=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ww(e)}function n_e(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&&q3(e,t)}function q3(e,t){return q3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},q3(e,t)}function U3(e,t,n){return t=JG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JG(e){var t=r_e(e,"string");return Ng(t)=="symbol"?t:t+""}function r_e(e,t){if(Ng(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ng(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var LF=1,i_e=(function(e){function t(){var n;XSe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ZSe(this,t,[].concat(i)),U3(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),U3(n,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,c,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(c=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&c!==void 0?c:0}})}}),n}return n_e(t,e),JSe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>LF||Math.abs(r.height-this.state.lastBoundingBox.height)>LF)&&this.setState({lastBoundingBox:{width:r.width,height:r.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 r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,f=i.coordinate,h=i.hasPayload,g=i.isAnimationActive,m=i.offset,b=i.position,y=i.reverseDirection,x=i.useTranslate3d,w=i.viewBox,_=i.wrapperStyle,k=KSe({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:m,position:b,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:w}),P=k.cssClasses,C=k.cssProperties,j=MF(MF({transition:g&&a?"transform ".concat(s,"ms ").concat(l):void 0},C),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},_);return _e.createElement("div",{tabIndex:-1,className:P,style:j,ref:function(R){r.wrapperNode=R}},c)}}])})(E.PureComponent),a_e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ly={isSsr:a_e()};function kg(e){"@babel/helpers - typeof";return kg=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},kg(e)}function RF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RF(Object(n),!0).forEach(function(r){C4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s_e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eK(r.key),r)}}function l_e(e,t,n){return t&&s_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function c_e(e,t,n){return t=Sw(t),u_e(e,ZG()?Reflect.construct(t,n||[],Sw(e).constructor):t.apply(e,n))}function u_e(e,t){if(t&&(kg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f_e(e)}function f_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZG=function(){return!!e})()}function Sw(e){return Sw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sw(e)}function d_e(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&&z3(e,t)}function z3(e,t){return z3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},z3(e,t)}function C4(e,t,n){return t=eK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eK(e){var t=h_e(e,"string");return kg(t)=="symbol"?t:t+""}function h_e(e,t){if(kg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function p_e(e){return e.dataKey}function m_e(e,t){return _e.isValidElement(e)?_e.cloneElement(e,t):typeof e=="function"?_e.createElement(e,t):_e.createElement(zSe,t)}var uc=(function(e){function t(){return o_e(this,t),c_e(this,t,arguments)}return d_e(t,e),l_e(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.content,f=i.coordinate,h=i.filterNull,g=i.isAnimationActive,m=i.offset,b=i.payload,y=i.payloadUniqBy,x=i.position,w=i.reverseDirection,_=i.useTranslate3d,k=i.viewBox,P=i.wrapperStyle,C=b??[];h&&C.length&&(C=VG(b.filter(function(L){return L.value!=null&&(L.hide!==!0||r.props.includeHidden)}),y,p_e));var j=C.length>0;return _e.createElement(i_e,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:g,active:a,coordinate:f,hasPayload:j,offset:m,position:x,reverseDirection:w,useTranslate3d:_,viewBox:k,wrapperStyle:P},m_e(c,IF(IF({},this.props),{},{payload:C})))}}])})(E.PureComponent);C4(uc,"displayName","Tooltip");C4(uc,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ly.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 PA,DF;function g_e(){if(DF)return PA;DF=1;var e=Bc(),t=function(){return e.Date.now()};return PA=t,PA}var jA,FF;function y_e(){if(FF)return jA;FF=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return jA=t,jA}var CA,BF;function v_e(){if(BF)return CA;BF=1;var e=y_e(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return CA=n,CA}var EA,$F;function tK(){if($F)return EA;$F=1;var e=v_e(),t=Fd(),n=iy(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=t(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=e(c);var h=a.test(c);return h||o.test(c)?s(c.slice(2),h?2:8):i.test(c)?r:+c}return EA=l,EA}var OA,qF;function x_e(){if(qF)return OA;qF=1;var e=Fd(),t=g_e(),n=tK(),r="Expected a function",i=Math.max,a=Math.min;function o(s,l,c){var f,h,g,m,b,y,x=0,w=!1,_=!1,k=!0;if(typeof s!="function")throw new TypeError(r);l=n(l)||0,e(c)&&(w=!!c.leading,_="maxWait"in c,g=_?i(n(c.maxWait)||0,l):g,k="trailing"in c?!!c.trailing:k);function P(W){var V=f,X=h;return f=h=void 0,x=W,m=s.apply(X,V),m}function C(W){return x=W,b=setTimeout(R,l),w?P(W):m}function j(W){var V=W-y,X=W-x,Y=l-V;return _?a(Y,g-X):Y}function L(W){var V=W-y,X=W-x;return y===void 0||V>=l||V<0||_&&X>=g}function R(){var W=t();if(L(W))return D(W);b=setTimeout(R,j(W))}function D(W){return b=void 0,k&&f?P(W):(f=h=void 0,m)}function H(){b!==void 0&&clearTimeout(b),x=0,f=y=h=b=void 0}function M(){return b===void 0?m:D(t())}function F(){var W=t(),V=L(W);if(f=arguments,h=this,y=W,V){if(b===void 0)return C(y);if(_)return clearTimeout(b),b=setTimeout(R,l),P(y)}return b===void 0&&(b=setTimeout(R,l)),m}return F.cancel=H,F.flush=M,F}return OA=o,OA}var TA,UF;function b_e(){if(UF)return TA;UF=1;var e=x_e(),t=Fd(),n="Expected a function";function r(i,a,o){var s=!0,l=!0;if(typeof i!="function")throw new TypeError(n);return t(o)&&(s="leading"in o?!!o.leading:s,l="trailing"in o?!!o.trailing:l),e(i,a,{leading:s,maxWait:a,trailing:l})}return TA=r,TA}var w_e=b_e();const nK=Kn(w_e);function m0(e){"@babel/helpers - typeof";return m0=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},m0(e)}function zF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zF(Object(n),!0).forEach(function(r){S_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function S_e(e,t,n){return t=__e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function __e(e){var t=N_e(e,"string");return m0(t)=="symbol"?t:t+""}function N_e(e,t){if(m0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(m0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function k_e(e,t){return C_e(e)||j_e(e,t)||P_e(e,t)||A_e()}function A_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P_e(e,t){if(e){if(typeof e=="string")return VF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VF(e,t)}}function VF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function C_e(e){if(Array.isArray(e))return e}var E_e=E.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,f=c===void 0?0:c,h=e.minHeight,g=e.maxHeight,m=e.children,b=e.debounce,y=b===void 0?0:b,x=e.id,w=e.className,_=e.onResize,k=e.style,P=k===void 0?{}:k,C=E.useRef(null),j=E.useRef();j.current=_,E.useImperativeHandle(t,function(){return Object.defineProperty(C.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),C.current},configurable:!0})});var L=E.useState({containerWidth:i.width,containerHeight:i.height}),R=k_e(L,2),D=R[0],H=R[1],M=E.useCallback(function(W,V){H(function(X){var Y=Math.round(W),Z=Math.round(V);return X.containerWidth===Y&&X.containerHeight===Z?X:{containerWidth:Y,containerHeight:Z}})},[]);E.useEffect(function(){var W=function(se){var z,te=se[0].contentRect,$=te.width,q=te.height;M($,q),(z=j.current)===null||z===void 0||z.call(j,$,q)};y>0&&(W=nK(W,y,{trailing:!0,leading:!1}));var V=new ResizeObserver(W),X=C.current.getBoundingClientRect(),Y=X.width,Z=X.height;return M(Y,Z),V.observe(C.current),function(){V.disconnect()}},[M,y]);var F=E.useMemo(function(){var W=D.containerWidth,V=D.containerHeight;if(W<0||V<0)return null;kc(Ih(o)||Ih(l),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,o,l),kc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var X=Ih(o)?W:o,Y=Ih(l)?V:l;n&&n>0&&(X?Y=X/n:Y&&(X=Y*n),g&&Y>g&&(Y=g)),kc(X>0||Y>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,X,Y,o,l,f,h,n);var Z=!Array.isArray(m)&&Vu(m.type).endsWith("Chart");return _e.Children.map(m,function(K){return _e.isValidElement(K)?E.cloneElement(K,Rx({width:X,height:Y},Z?{style:Rx({height:"100%",width:"100%",maxHeight:Y,maxWidth:X},K.props.style)}:{})):K})},[n,m,l,g,h,f,D,o]);return _e.createElement("div",{id:x?"".concat(x):void 0,className:Tn("recharts-responsive-container",w),style:Rx(Rx({},P),{},{width:o,height:l,minWidth:f,minHeight:h,maxHeight:g}),ref:C},F)}),rK=function(t){return null};rK.displayName="Cell";function g0(e){"@babel/helpers - typeof";return g0=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},g0(e)}function WF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function V3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WF(Object(n),!0).forEach(function(r){O_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O_e(e,t,n){return t=T_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T_e(e){var t=M_e(e,"string");return g0(t)=="symbol"?t:t+""}function M_e(e,t){if(g0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(g0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gm={widthCache:{},cacheCount:0},L_e=2e3,R_e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},HF="recharts_measurement_span";function I_e(e){var t=V3({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Iv=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ly.isSsr)return{width:0,height:0};var r=I_e(n),i=JSON.stringify({text:t,copyStyle:r});if(gm.widthCache[i])return gm.widthCache[i];try{var a=document.getElementById(HF);a||(a=document.createElement("span"),a.setAttribute("id",HF),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=V3(V3({},R_e),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return gm.widthCache[i]=l,++gm.cacheCount>L_e&&(gm.cacheCount=0,gm.widthCache={}),l}catch{return{width:0,height:0}}},D_e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function y0(e){"@babel/helpers - typeof";return y0=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},y0(e)}function _w(e,t){return q_e(e)||$_e(e,t)||B_e(e,t)||F_e()}function F_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B_e(e,t){if(e){if(typeof e=="string")return YF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YF(e,t)}}function YF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function q_e(e){if(Array.isArray(e))return e}function U_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V_e(r.key),r)}}function z_e(e,t,n){return t&&GF(e.prototype,t),n&&GF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function V_e(e){var t=W_e(e,"string");return y0(t)=="symbol"?t:t+""}function W_e(e,t){if(y0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(y0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KF=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,XF=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,H_e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Y_e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,iK={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},G_e=Object.keys(iK),Rm="NaN";function K_e(e,t){return e*iK[t]}var Ix=(function(){function e(t,n){U_e(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!H_e.test(n)&&(this.num=NaN,this.unit=""),G_e.includes(n)&&(this.num=K_e(t,n),this.unit="px")}return z_e(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.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(n){var r,i=(r=Y_e.exec(n))!==null&&r!==void 0?r:[],a=_w(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])})();function aK(e){if(e.includes(Rm))return Rm;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=KF.exec(t))!==null&&n!==void 0?n:[],i=_w(r,4),a=i[1],o=i[2],s=i[3],l=Ix.parse(a??""),c=Ix.parse(s??""),f=o==="*"?l.multiply(c):l.divide(c);if(f.isNaN())return Rm;t=t.replace(KF,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,g=(h=XF.exec(t))!==null&&h!==void 0?h:[],m=_w(g,4),b=m[1],y=m[2],x=m[3],w=Ix.parse(b??""),_=Ix.parse(x??""),k=y==="+"?w.add(_):w.subtract(_);if(k.isNaN())return Rm;t=t.replace(XF,k.toString())}return t}var QF=/\(([^()]*)\)/;function X_e(e){for(var t=e;t.includes("(");){var n=QF.exec(t),r=_w(n,2),i=r[1];t=t.replace(QF,aK(i))}return t}function Q_e(e){var t=e.replace(/\s+/g,"");return t=X_e(t),t=aK(t),t}function J_e(e){try{return Q_e(e)}catch{return Rm}}function MA(e){var t=J_e(e.slice(5,-1));return t===Rm?"":t}var Z_e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],eNe=["dx","dy","angle","className","breakAll"];function W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W3.apply(this,arguments)}function JF(e,t){if(e==null)return{};var n=tNe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ZF(e,t){return aNe(e)||iNe(e,t)||rNe(e,t)||nNe()}function nNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rNe(e,t){if(e){if(typeof e=="string")return e7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e7(e,t)}}function e7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iNe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function aNe(e){if(Array.isArray(e))return e}var oK=/[ \f\n\r\t\v\u2028\u2029]+/,sK=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];jn(n)||(r?a=n.toString().split(""):a=n.toString().split(oK));var o=a.map(function(l){return{word:l,width:Iv(l,i).width}}),s=r?0:Iv(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},oNe=function(t,n,r,i,a){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,f=it(o),h=s,g=function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return X.reduce(function(Y,Z){var K=Z.word,se=Z.width,z=Y[Y.length-1];if(z&&(i==null||a||z.width+se+r<Number(i)))z.words.push(K),z.width+=se+r;else{var te={words:[K],width:se};Y.push(te)}return Y},[])},m=g(n),b=function(X){return X.reduce(function(Y,Z){return Y.width>Z.width?Y:Z})};if(!f)return m;for(var y="…",x=function(X){var Y=h.slice(0,X),Z=sK({breakAll:c,style:l,children:Y+y}).wordsWithComputedWidth,K=g(Z),se=K.length>o||b(K).width>Number(i);return[se,K]},w=0,_=h.length-1,k=0,P;w<=_&&k<=h.length-1;){var C=Math.floor((w+_)/2),j=C-1,L=x(j),R=ZF(L,2),D=R[0],H=R[1],M=x(C),F=ZF(M,1),W=F[0];if(!D&&!W&&(w=C+1),D&&W&&(_=C-1),!D&&W){P=H;break}k++}return P||m},t7=function(t){var n=jn(t)?[]:t.toString().split(oK);return[{words:n}]},sNe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!ly.isSsr){var l,c,f=sK({breakAll:o,children:i,style:a});if(f){var h=f.wordsWithComputedWidth,g=f.spaceWidth;l=h,c=g}else return t7(i);return oNe({breakAll:o,children:i,maxLines:s,style:a},l,c,n,r)}return t7(i)},n7="#808080",Nw=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,h=f===void 0?!1:f,g=t.textAnchor,m=g===void 0?"start":g,b=t.verticalAnchor,y=b===void 0?"end":b,x=t.fill,w=x===void 0?n7:x,_=JF(t,Z_e),k=E.useMemo(function(){return sNe({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:h,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,h,_.style,_.width]),P=_.dx,C=_.dy,j=_.angle,L=_.className,R=_.breakAll,D=JF(_,eNe);if(!Gi(r)||!Gi(a))return null;var H=r+(it(P)?P:0),M=a+(it(C)?C:0),F;switch(y){case"start":F=MA("calc(".concat(c,")"));break;case"middle":F=MA("calc(".concat((k.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:F=MA("calc(".concat(k.length-1," * -").concat(s,")"));break}var W=[];if(h){var V=k[0].width,X=_.width;W.push("scale(".concat((it(X)?X/V:1)/V,")"))}return j&&W.push("rotate(".concat(j,", ").concat(H,", ").concat(M,")")),W.length&&(D.transform=W.join(" ")),_e.createElement("text",W3({},kn(D,!0),{x:H,y:M,className:Tn("recharts-text",L),textAnchor:m,fill:w.includes("url")?n7:w}),k.map(function(Y,Z){var K=Y.words.join(R?"":" ");return _e.createElement("tspan",{x:H,dy:Z===0?F:s,key:"".concat(K,"-").concat(Z)},K)}))};function wd(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function lNe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function E4(e){let t,n,r;e.length!==2?(t=wd,n=(s,l)=>wd(e(s),l),r=(s,l)=>e(s)-l):(t=e===wd||e===lNe?e:cNe,n=e,r=e);function i(s,l,c=0,f=s.length){if(c<f){if(t(l,l)!==0)return f;do{const h=c+f>>>1;n(s[h],l)<0?c=h+1:f=h}while(c<f)}return c}function a(s,l,c=0,f=s.length){if(c<f){if(t(l,l)!==0)return f;do{const h=c+f>>>1;n(s[h],l)<=0?c=h+1:f=h}while(c<f)}return c}function o(s,l,c=0,f=s.length){const h=i(s,l,c,f-1);return h>c&&r(s[h-1],l)>-r(s[h],l)?h-1:h}return{left:i,center:o,right:a}}function cNe(){return 0}function lK(e){return e===null?NaN:+e}function*uNe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const fNe=E4(wd),_1=fNe.right;E4(lK).center;class r7 extends Map{constructor(t,n=pNe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(i7(this,t))}has(t){return super.has(i7(this,t))}set(t,n){return super.set(dNe(this,t),n)}delete(t){return super.delete(hNe(this,t))}}function i7({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function dNe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function hNe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function pNe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function mNe(e=wd){if(e===wd)return cK;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function cK(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const gNe=Math.sqrt(50),yNe=Math.sqrt(10),vNe=Math.sqrt(2);function kw(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=gNe?10:a>=yNe?5:a>=vNe?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?kw(e,t,n*2):[s,l,c]}function H3(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?kw(t,e,n):kw(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let c=0;c<s;++c)l[c]=(a-c)/-o;else for(let c=0;c<s;++c)l[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}function Y3(e,t,n){return t=+t,e=+e,n=+n,kw(e,t,n)[2]}function G3(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Y3(t,e,n):Y3(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function a7(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function o7(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function uK(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?cK:mNe(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),h=.5*Math.exp(2*f/3),g=.5*Math.sqrt(f*h*(l-h)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(t-c*h/l+g)),b=Math.min(r,Math.floor(t+(l-c)*h/l+g));uK(e,t,m,b,i)}const a=e[t];let o=n,s=r;for(iv(e,n,t),i(e[r],a)>0&&iv(e,n,r);o<s;){for(iv(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?iv(e,n,s):(++s,iv(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function iv(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function xNe(e,t,n){if(e=Float64Array.from(uNe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return o7(e);if(t>=1)return a7(e);var r,i=(r-1)*t,a=Math.floor(i),o=a7(uK(e,a).subarray(0,a+1)),s=o7(e.subarray(a+1));return o+(s-o)*(i-a)}}function bNe(e,t,n=lK){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function wNe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Qs(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function sf(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 K3=Symbol("implicit");function O4(){var e=new r7,t=[],n=[],r=K3;function i(a){let o=e.get(a);if(o===void 0){if(r!==K3)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new r7;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return O4(t,n).unknown(r)},Qs.apply(i,arguments),i}function v0(){var e=O4().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,c=0,f=.5;delete e.unknown;function h(){var g=t().length,m=i<r,b=m?i:r,y=m?r:i;a=(y-b)/Math.max(1,g-l+c*2),s&&(a=Math.floor(a)),b+=(y-b-a*(g-l))*f,o=a*(1-l),s&&(b=Math.round(b),o=Math.round(o));var x=wNe(g).map(function(w){return b+a*w});return n(m?x.reverse():x)}return e.domain=function(g){return arguments.length?(t(g),h()):t()},e.range=function(g){return arguments.length?([r,i]=g,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(g){return[r,i]=g,r=+r,i=+i,s=!0,h()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(g){return arguments.length?(s=!!g,h()):s},e.padding=function(g){return arguments.length?(l=Math.min(1,c=+g),h()):l},e.paddingInner=function(g){return arguments.length?(l=Math.min(1,g),h()):l},e.paddingOuter=function(g){return arguments.length?(c=+g,h()):c},e.align=function(g){return arguments.length?(f=Math.max(0,Math.min(1,g)),h()):f},e.copy=function(){return v0(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(f)},Qs.apply(h(),arguments)}function fK(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return fK(t())},e}function Dv(){return fK(v0.apply(null,arguments).paddingInner(1))}function T4(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function dK(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function N1(){}var x0=.7,Aw=1/x0,Gm="\\s*([+-]?\\d+)\\s*",b0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ac="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SNe=/^#([0-9a-f]{3,8})$/,_Ne=new RegExp(`^rgb\\(${Gm},${Gm},${Gm}\\)$`),NNe=new RegExp(`^rgb\\(${Ac},${Ac},${Ac}\\)$`),kNe=new RegExp(`^rgba\\(${Gm},${Gm},${Gm},${b0}\\)$`),ANe=new RegExp(`^rgba\\(${Ac},${Ac},${Ac},${b0}\\)$`),PNe=new RegExp(`^hsl\\(${b0},${Ac},${Ac}\\)$`),jNe=new RegExp(`^hsla\\(${b0},${Ac},${Ac},${b0}\\)$`),s7={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};T4(N1,w0,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:l7,formatHex:l7,formatHex8:CNe,formatHsl:ENe,formatRgb:c7,toString:c7});function l7(){return this.rgb().formatHex()}function CNe(){return this.rgb().formatHex8()}function ENe(){return hK(this).formatHsl()}function c7(){return this.rgb().formatRgb()}function w0(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SNe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?u7(t):n===3?new Oo(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Dx(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Dx(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=_Ne.exec(e))?new Oo(t[1],t[2],t[3],1):(t=NNe.exec(e))?new Oo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kNe.exec(e))?Dx(t[1],t[2],t[3],t[4]):(t=ANe.exec(e))?Dx(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PNe.exec(e))?h7(t[1],t[2]/100,t[3]/100,1):(t=jNe.exec(e))?h7(t[1],t[2]/100,t[3]/100,t[4]):s7.hasOwnProperty(e)?u7(s7[e]):e==="transparent"?new Oo(NaN,NaN,NaN,0):null}function u7(e){return new Oo(e>>16&255,e>>8&255,e&255,1)}function Dx(e,t,n,r){return r<=0&&(e=t=n=NaN),new Oo(e,t,n,r)}function ONe(e){return e instanceof N1||(e=w0(e)),e?(e=e.rgb(),new Oo(e.r,e.g,e.b,e.opacity)):new Oo}function X3(e,t,n,r){return arguments.length===1?ONe(e):new Oo(e,t,n,r??1)}function Oo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}T4(Oo,X3,dK(N1,{brighter(e){return e=e==null?Aw:Math.pow(Aw,e),new Oo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?x0:Math.pow(x0,e),new Oo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Oo(tp(this.r),tp(this.g),tp(this.b),Pw(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:f7,formatHex:f7,formatHex8:TNe,formatRgb:d7,toString:d7}));function f7(){return`#${Dh(this.r)}${Dh(this.g)}${Dh(this.b)}`}function TNe(){return`#${Dh(this.r)}${Dh(this.g)}${Dh(this.b)}${Dh((isNaN(this.opacity)?1:this.opacity)*255)}`}function d7(){const e=Pw(this.opacity);return`${e===1?"rgb(":"rgba("}${tp(this.r)}, ${tp(this.g)}, ${tp(this.b)}${e===1?")":`, ${e})`}`}function Pw(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dh(e){return e=tp(e),(e<16?"0":"")+e.toString(16)}function h7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kl(e,t,n,r)}function hK(e){if(e instanceof kl)return new kl(e.h,e.s,e.l,e.opacity);if(e instanceof N1||(e=w0(e)),!e)return new kl;if(e instanceof kl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new kl(o,s,l,e.opacity)}function MNe(e,t,n,r){return arguments.length===1?hK(e):new kl(e,t,n,r??1)}function kl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}T4(kl,MNe,dK(N1,{brighter(e){return e=e==null?Aw:Math.pow(Aw,e),new kl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?x0:Math.pow(x0,e),new kl(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Oo(LA(e>=240?e-240:e+120,i,r),LA(e,i,r),LA(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new kl(p7(this.h),Fx(this.s),Fx(this.l),Pw(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=Pw(this.opacity);return`${e===1?"hsl(":"hsla("}${p7(this.h)}, ${Fx(this.s)*100}%, ${Fx(this.l)*100}%${e===1?")":`, ${e})`}`}}));function p7(e){return e=(e||0)%360,e<0?e+360:e}function Fx(e){return Math.max(0,Math.min(1,e||0))}function LA(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const M4=e=>()=>e;function LNe(e,t){return function(n){return e+n*t}}function RNe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function INe(e){return(e=+e)==1?pK:function(t,n){return n-t?RNe(t,n,e):M4(isNaN(t)?n:t)}}function pK(e,t){var n=t-e;return n?LNe(e,n):M4(isNaN(e)?t:e)}const m7=(function e(t){var n=INe(t);function r(i,a){var o=n((i=X3(i)).r,(a=X3(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=pK(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=c(f),i+""}}return r.gamma=e,r})(1);function DNe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function FNe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function BNe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=cy(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function $Ne(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function jw(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qNe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=cy(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Q3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,RA=new RegExp(Q3.source,"g");function UNe(e){return function(){return e}}function zNe(e){return function(t){return e(t)+""}}function VNe(e,t){var n=Q3.lastIndex=RA.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(r=Q3.exec(e))&&(i=RA.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:jw(r,i)})),n=RA.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?zNe(l[0].x):UNe(t):(t=l.length,function(c){for(var f=0,h;f<t;++f)s[(h=l[f]).i]=h.x(c);return s.join("")})}function cy(e,t){var n=typeof t,r;return t==null||n==="boolean"?M4(t):(n==="number"?jw:n==="string"?(r=w0(t))?(t=r,m7):VNe:t instanceof w0?m7:t instanceof Date?$Ne:FNe(t)?DNe:Array.isArray(t)?BNe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qNe:jw)(e,t)}function L4(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function WNe(e,t){t===void 0&&(t=e,e=cy);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function HNe(e){return function(){return e}}function Cw(e){return+e}var g7=[0,1];function oo(e){return e}function J3(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:HNe(isNaN(t)?NaN:.5)}function YNe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function GNe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=J3(i,r),a=n(o,a)):(r=J3(r,i),a=n(a,o)),function(s){return a(r(s))}}function KNe(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=J3(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var l=_1(e,s,1,r)-1;return a[l](i[l](s))}}function k1(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function y5(){var e=g7,t=g7,n=cy,r,i,a,o=oo,s,l,c;function f(){var g=Math.min(e.length,t.length);return o!==oo&&(o=YNe(e[0],e[g-1])),s=g>2?KNe:GNe,l=c=null,h}function h(g){return g==null||isNaN(g=+g)?a:(l||(l=s(e.map(r),t,n)))(r(o(g)))}return h.invert=function(g){return o(i((c||(c=s(t,e.map(r),jw)))(g)))},h.domain=function(g){return arguments.length?(e=Array.from(g,Cw),f()):e.slice()},h.range=function(g){return arguments.length?(t=Array.from(g),f()):t.slice()},h.rangeRound=function(g){return t=Array.from(g),n=L4,f()},h.clamp=function(g){return arguments.length?(o=g?!0:oo,f()):o!==oo},h.interpolate=function(g){return arguments.length?(n=g,f()):n},h.unknown=function(g){return arguments.length?(a=g,h):a},function(g,m){return r=g,i=m,f()}}function R4(){return y5()(oo,oo)}function XNe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ew(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ag(e){return e=Ew(Math.abs(e)),e?e[1]:NaN}function QNe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function JNe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ZNe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function S0(e){if(!(t=ZNe.exec(e)))throw new Error("invalid format: "+e);var t;return new I4({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]})}S0.prototype=I4.prototype;function I4(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+""}I4.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 eke(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Ow;function tke(e,t){var n=Ew(e,t);if(!n)return Ow=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Ow=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ew(e,Math.max(0,t+a-1))[0]}function y7(e,t){var n=Ew(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const v7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:XNe,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)=>y7(e*100,t),r:y7,s:tke,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function x7(e){return e}var b7=Array.prototype.map,w7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nke(e){var t=e.grouping===void 0||e.thousands===void 0?x7:QNe(b7.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?x7:JNe(b7.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(h,g){h=S0(h);var m=h.fill,b=h.align,y=h.sign,x=h.symbol,w=h.zero,_=h.width,k=h.comma,P=h.precision,C=h.trim,j=h.type;j==="n"?(k=!0,j="g"):v7[j]||(P===void 0&&(P=12),C=!0,j="g"),(w||m==="0"&&b==="=")&&(w=!0,m="0",b="=");var L=(g&&g.prefix!==void 0?g.prefix:"")+(x==="$"?n:x==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),R=(x==="$"?r:/[%p]/.test(j)?o:"")+(g&&g.suffix!==void 0?g.suffix:""),D=v7[j],H=/[defgprs%]/.test(j);P=P===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function M(F){var W=L,V=R,X,Y,Z;if(j==="c")V=D(F)+V,F="";else{F=+F;var K=F<0||1/F<0;if(F=isNaN(F)?l:D(Math.abs(F),P),C&&(F=eke(F)),K&&+F==0&&y!=="+"&&(K=!1),W=(K?y==="("?y:s:y==="-"||y==="("?"":y)+W,V=(j==="s"&&!isNaN(F)&&Ow!==void 0?w7[8+Ow/3]:"")+V+(K&&y==="("?")":""),H){for(X=-1,Y=F.length;++X<Y;)if(Z=F.charCodeAt(X),48>Z||Z>57){V=(Z===46?i+F.slice(X+1):F.slice(X))+V,F=F.slice(0,X);break}}}k&&!w&&(F=t(F,1/0));var se=W.length+F.length+V.length,z=se<_?new Array(_-se+1).join(m):"";switch(k&&w&&(F=t(z+F,z.length?_-V.length:1/0),z=""),b){case"<":F=W+F+V+z;break;case"=":F=W+z+F+V;break;case"^":F=z.slice(0,se=z.length>>1)+W+F+V+z.slice(se);break;default:F=z+W+F+V;break}return a(F)}return M.toString=function(){return h+""},M}function f(h,g){var m=Math.max(-8,Math.min(8,Math.floor(Ag(g)/3)))*3,b=Math.pow(10,-m),y=c((h=S0(h),h.type="f",h),{suffix:w7[8+m/3]});return function(x){return y(b*x)}}return{format:c,formatPrefix:f}}var Bx,D4,mK;rke({thousands:",",grouping:[3],currency:["$",""]});function rke(e){return Bx=nke(e),D4=Bx.format,mK=Bx.formatPrefix,Bx}function ike(e){return Math.max(0,-Ag(Math.abs(e)))}function ake(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ag(t)/3)))*3-Ag(Math.abs(e)))}function oke(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ag(t)-Ag(e))+1}function gK(e,t,n,r){var i=G3(e,t,n),a;switch(r=S0(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=ake(i,o))&&(r.precision=a),mK(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=oke(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=ike(i))&&(r.precision=a-(r.type==="%")*2);break}}return D4(r)}function $d(e){var t=e.domain;return e.ticks=function(n){var r=t();return H3(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return gK(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,c,f=10;for(s<o&&(c=o,o=s,s=c,c=i,i=a,a=c);f-- >0;){if(c=Y3(o,s,n),c===l)return r[i]=o,r[a]=s,t(r);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Tw(){var e=R4();return e.copy=function(){return k1(e,Tw())},Qs.apply(e,arguments),$d(e)}function yK(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Cw),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return yK(e).unknown(t)},e=arguments.length?Array.from(e,Cw):[0,1],$d(n)}function vK(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function S7(e){return Math.log(e)}function _7(e){return Math.exp(e)}function ske(e){return-Math.log(-e)}function lke(e){return-Math.exp(-e)}function cke(e){return isFinite(e)?+("1e"+e):e<0?0:e}function uke(e){return e===10?cke:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fke(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 N7(e){return(t,n)=>-e(-t,n)}function F4(e){const t=e(S7,_7),n=t.domain;let r=10,i,a;function o(){return i=fke(r),a=uke(r),n()[0]<0?(i=N7(i),a=N7(a),e(ske,lke)):e(S7,_7),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let c=l[0],f=l[l.length-1];const h=f<c;h&&([c,f]=[f,c]);let g=i(c),m=i(f),b,y;const x=s==null?10:+s;let w=[];if(!(r%1)&&m-g<x){if(g=Math.floor(g),m=Math.ceil(m),c>0){for(;g<=m;++g)for(b=1;b<r;++b)if(y=g<0?b/a(-g):b*a(g),!(y<c)){if(y>f)break;w.push(y)}}else for(;g<=m;++g)for(b=r-1;b>=1;--b)if(y=g>0?b/a(-g):b*a(g),!(y<c)){if(y>f)break;w.push(y)}w.length*2<x&&(w=H3(c,f,x))}else w=H3(g,m,Math.min(m-g,x)).map(a);return h?w.reverse():w},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=S0(l)).precision==null&&(l.trim=!0),l=D4(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return f=>{let h=f/a(Math.round(i(f)));return h*r<r-.5&&(h*=r),h<=c?l(f):""}},t.nice=()=>n(vK(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function xK(){const e=F4(y5()).domain([1,10]);return e.copy=()=>k1(e,xK()).base(e.base()),Qs.apply(e,arguments),e}function k7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function A7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function B4(e){var t=1,n=e(k7(t),A7(t));return n.constant=function(r){return arguments.length?e(k7(t=+r),A7(t)):t},$d(n)}function bK(){var e=B4(y5());return e.copy=function(){return k1(e,bK()).constant(e.constant())},Qs.apply(e,arguments)}function P7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function dke(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hke(e){return e<0?-e*e:e*e}function $4(e){var t=e(oo,oo),n=1;function r(){return n===1?e(oo,oo):n===.5?e(dke,hke):e(P7(n),P7(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},$d(t)}function q4(){var e=$4(y5());return e.copy=function(){return k1(e,q4()).exponent(e.exponent())},Qs.apply(e,arguments),e}function pke(){return q4.apply(null,arguments).exponent(.5)}function j7(e){return Math.sign(e)*e*e}function mke(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function wK(){var e=R4(),t=[0,1],n=!1,r;function i(a){var o=mke(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(j7(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Cw)).map(j7)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return wK(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Qs.apply(i,arguments),$d(i)}function SK(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=bNe(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[_1(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(wd),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return SK().domain(e).range(t).unknown(r)},Qs.apply(a,arguments)}function _K(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[_1(r,l,0,n)]:a}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return _K().domain([e,t]).range(i).unknown(a)},Qs.apply($d(o),arguments)}function NK(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[_1(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return NK().domain(e).range(t).unknown(n)},Qs.apply(i,arguments)}const IA=new Date,DA=new Date;function Xi(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let c;do l.push(c=new Date(+a)),t(a,s),e(a);while(c<a&&a<o);return l},i.filter=a=>Xi(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(IA.setTime(+a),DA.setTime(+o),e(IA),e(DA),Math.floor(n(IA,DA))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Mw=Xi(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Mw.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xi(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Mw);Mw.range;const Du=1e3,Vs=Du*60,Fu=Vs*60,Qu=Fu*24,U4=Qu*7,C7=Qu*30,FA=Qu*365,Fh=Xi(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Du)},(e,t)=>(t-e)/Du,e=>e.getUTCSeconds());Fh.range;const z4=Xi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Du)},(e,t)=>{e.setTime(+e+t*Vs)},(e,t)=>(t-e)/Vs,e=>e.getMinutes());z4.range;const V4=Xi(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vs)},(e,t)=>(t-e)/Vs,e=>e.getUTCMinutes());V4.range;const W4=Xi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Du-e.getMinutes()*Vs)},(e,t)=>{e.setTime(+e+t*Fu)},(e,t)=>(t-e)/Fu,e=>e.getHours());W4.range;const H4=Xi(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fu)},(e,t)=>(t-e)/Fu,e=>e.getUTCHours());H4.range;const A1=Xi(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vs)/Qu,e=>e.getDate()-1);A1.range;const v5=Xi(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qu,e=>e.getUTCDate()-1);v5.range;const kK=Xi(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qu,e=>Math.floor(e/Qu));kK.range;function Cp(e){return Xi(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vs)/U4)}const x5=Cp(0),Lw=Cp(1),gke=Cp(2),yke=Cp(3),Pg=Cp(4),vke=Cp(5),xke=Cp(6);x5.range;Lw.range;gke.range;yke.range;Pg.range;vke.range;xke.range;function Ep(e){return Xi(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/U4)}const b5=Ep(0),Rw=Ep(1),bke=Ep(2),wke=Ep(3),jg=Ep(4),Ske=Ep(5),_ke=Ep(6);b5.range;Rw.range;bke.range;wke.range;jg.range;Ske.range;_ke.range;const Y4=Xi(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());Y4.range;const G4=Xi(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());G4.range;const Ju=Xi(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());Ju.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xi(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ju.range;const Zu=Xi(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());Zu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xi(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Zu.range;function AK(e,t,n,r,i,a){const o=[[Fh,1,Du],[Fh,5,5*Du],[Fh,15,15*Du],[Fh,30,30*Du],[a,1,Vs],[a,5,5*Vs],[a,15,15*Vs],[a,30,30*Vs],[i,1,Fu],[i,3,3*Fu],[i,6,6*Fu],[i,12,12*Fu],[r,1,Qu],[r,2,2*Qu],[n,1,U4],[t,1,C7],[t,3,3*C7],[e,1,FA]];function s(c,f,h){const g=f<c;g&&([c,f]=[f,c]);const m=h&&typeof h.range=="function"?h:l(c,f,h),b=m?m.range(c,+f+1):[];return g?b.reverse():b}function l(c,f,h){const g=Math.abs(f-c)/h,m=E4(([,,x])=>x).right(o,g);if(m===o.length)return e.every(G3(c/FA,f/FA,h));if(m===0)return Mw.every(Math.max(G3(c,f,h),1));const[b,y]=o[g/o[m-1][2]<o[m][2]/g?m-1:m];return b.every(y)}return[s,l]}const[Nke,kke]=AK(Zu,G4,b5,kK,H4,V4),[Ake,Pke]=AK(Ju,Y4,x5,A1,W4,z4);function BA(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 $A(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 av(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function jke(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=ov(i),f=sv(i),h=ov(a),g=sv(a),m=ov(o),b=sv(o),y=ov(s),x=sv(s),w=ov(l),_=sv(l),k={a:Z,A:K,b:se,B:z,c:null,d:R7,e:R7,f:Qke,g:sAe,G:cAe,H:Gke,I:Kke,j:Xke,L:PK,m:Jke,M:Zke,p:te,q:$,Q:F7,s:B7,S:eAe,u:tAe,U:nAe,V:rAe,w:iAe,W:aAe,x:null,X:null,y:oAe,Y:lAe,Z:uAe,"%":D7},P={a:q,A:re,b:le,B:de,c:null,d:I7,e:I7,f:pAe,g:NAe,G:AAe,H:fAe,I:dAe,j:hAe,L:CK,m:mAe,M:gAe,p:pe,q:ve,Q:F7,s:B7,S:yAe,u:vAe,U:xAe,V:bAe,w:wAe,W:SAe,x:null,X:null,y:_Ae,Y:kAe,Z:PAe,"%":D7},C={a:H,A:M,b:F,B:W,c:V,d:M7,e:M7,f:Vke,g:T7,G:O7,H:L7,I:L7,j:$ke,L:zke,m:Bke,M:qke,p:D,q:Fke,Q:Hke,s:Yke,S:Uke,u:Mke,U:Lke,V:Rke,w:Tke,W:Ike,x:X,X:Y,y:T7,Y:O7,Z:Dke,"%":Wke};k.x=j(n,k),k.X=j(r,k),k.c=j(t,k),P.x=j(n,P),P.X=j(r,P),P.c=j(t,P);function j(he,xe){return function(Pe){var Se=[],Ue=-1,Ye=0,oe=he.length,Ke,ht,gt;for(Pe instanceof Date||(Pe=new Date(+Pe));++Ue<oe;)he.charCodeAt(Ue)===37&&(Se.push(he.slice(Ye,Ue)),(ht=E7[Ke=he.charAt(++Ue)])!=null?Ke=he.charAt(++Ue):ht=Ke==="e"?" ":"0",(gt=xe[Ke])&&(Ke=gt(Pe,ht)),Se.push(Ke),Ye=Ue+1);return Se.push(he.slice(Ye,Ue)),Se.join("")}}function L(he,xe){return function(Pe){var Se=av(1900,void 0,1),Ue=R(Se,he,Pe+="",0),Ye,oe;if(Ue!=Pe.length)return null;if("Q"in Se)return new Date(Se.Q);if("s"in Se)return new Date(Se.s*1e3+("L"in Se?Se.L:0));if(xe&&!("Z"in Se)&&(Se.Z=0),"p"in Se&&(Se.H=Se.H%12+Se.p*12),Se.m===void 0&&(Se.m="q"in Se?Se.q:0),"V"in Se){if(Se.V<1||Se.V>53)return null;"w"in Se||(Se.w=1),"Z"in Se?(Ye=$A(av(Se.y,0,1)),oe=Ye.getUTCDay(),Ye=oe>4||oe===0?Rw.ceil(Ye):Rw(Ye),Ye=v5.offset(Ye,(Se.V-1)*7),Se.y=Ye.getUTCFullYear(),Se.m=Ye.getUTCMonth(),Se.d=Ye.getUTCDate()+(Se.w+6)%7):(Ye=BA(av(Se.y,0,1)),oe=Ye.getDay(),Ye=oe>4||oe===0?Lw.ceil(Ye):Lw(Ye),Ye=A1.offset(Ye,(Se.V-1)*7),Se.y=Ye.getFullYear(),Se.m=Ye.getMonth(),Se.d=Ye.getDate()+(Se.w+6)%7)}else("W"in Se||"U"in Se)&&("w"in Se||(Se.w="u"in Se?Se.u%7:"W"in Se?1:0),oe="Z"in Se?$A(av(Se.y,0,1)).getUTCDay():BA(av(Se.y,0,1)).getDay(),Se.m=0,Se.d="W"in Se?(Se.w+6)%7+Se.W*7-(oe+5)%7:Se.w+Se.U*7-(oe+6)%7);return"Z"in Se?(Se.H+=Se.Z/100|0,Se.M+=Se.Z%100,$A(Se)):BA(Se)}}function R(he,xe,Pe,Se){for(var Ue=0,Ye=xe.length,oe=Pe.length,Ke,ht;Ue<Ye;){if(Se>=oe)return-1;if(Ke=xe.charCodeAt(Ue++),Ke===37){if(Ke=xe.charAt(Ue++),ht=C[Ke in E7?xe.charAt(Ue++):Ke],!ht||(Se=ht(he,Pe,Se))<0)return-1}else if(Ke!=Pe.charCodeAt(Se++))return-1}return Se}function D(he,xe,Pe){var Se=c.exec(xe.slice(Pe));return Se?(he.p=f.get(Se[0].toLowerCase()),Pe+Se[0].length):-1}function H(he,xe,Pe){var Se=m.exec(xe.slice(Pe));return Se?(he.w=b.get(Se[0].toLowerCase()),Pe+Se[0].length):-1}function M(he,xe,Pe){var Se=h.exec(xe.slice(Pe));return Se?(he.w=g.get(Se[0].toLowerCase()),Pe+Se[0].length):-1}function F(he,xe,Pe){var Se=w.exec(xe.slice(Pe));return Se?(he.m=_.get(Se[0].toLowerCase()),Pe+Se[0].length):-1}function W(he,xe,Pe){var Se=y.exec(xe.slice(Pe));return Se?(he.m=x.get(Se[0].toLowerCase()),Pe+Se[0].length):-1}function V(he,xe,Pe){return R(he,t,xe,Pe)}function X(he,xe,Pe){return R(he,n,xe,Pe)}function Y(he,xe,Pe){return R(he,r,xe,Pe)}function Z(he){return o[he.getDay()]}function K(he){return a[he.getDay()]}function se(he){return l[he.getMonth()]}function z(he){return s[he.getMonth()]}function te(he){return i[+(he.getHours()>=12)]}function $(he){return 1+~~(he.getMonth()/3)}function q(he){return o[he.getUTCDay()]}function re(he){return a[he.getUTCDay()]}function le(he){return l[he.getUTCMonth()]}function de(he){return s[he.getUTCMonth()]}function pe(he){return i[+(he.getUTCHours()>=12)]}function ve(he){return 1+~~(he.getUTCMonth()/3)}return{format:function(he){var xe=j(he+="",k);return xe.toString=function(){return he},xe},parse:function(he){var xe=L(he+="",!1);return xe.toString=function(){return he},xe},utcFormat:function(he){var xe=j(he+="",P);return xe.toString=function(){return he},xe},utcParse:function(he){var xe=L(he+="",!0);return xe.toString=function(){return he},xe}}}var E7={"-":"",_:" ",0:"0"},la=/^\s*\d+/,Cke=/^%/,Eke=/[\\^$*+?|[\]().{}]/g;function zn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function Oke(e){return e.replace(Eke,"\\$&")}function ov(e){return new RegExp("^(?:"+e.map(Oke).join("|")+")","i")}function sv(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Tke(e,t,n){var r=la.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Mke(e,t,n){var r=la.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Lke(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Rke(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ike(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function O7(e,t,n){var r=la.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function T7(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Dke(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Fke(e,t,n){var r=la.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Bke(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function M7(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $ke(e,t,n){var r=la.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function L7(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function qke(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Uke(e,t,n){var r=la.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zke(e,t,n){var r=la.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Vke(e,t,n){var r=la.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Wke(e,t,n){var r=Cke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Hke(e,t,n){var r=la.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Yke(e,t,n){var r=la.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function R7(e,t){return zn(e.getDate(),t,2)}function Gke(e,t){return zn(e.getHours(),t,2)}function Kke(e,t){return zn(e.getHours()%12||12,t,2)}function Xke(e,t){return zn(1+A1.count(Ju(e),e),t,3)}function PK(e,t){return zn(e.getMilliseconds(),t,3)}function Qke(e,t){return PK(e,t)+"000"}function Jke(e,t){return zn(e.getMonth()+1,t,2)}function Zke(e,t){return zn(e.getMinutes(),t,2)}function eAe(e,t){return zn(e.getSeconds(),t,2)}function tAe(e){var t=e.getDay();return t===0?7:t}function nAe(e,t){return zn(x5.count(Ju(e)-1,e),t,2)}function jK(e){var t=e.getDay();return t>=4||t===0?Pg(e):Pg.ceil(e)}function rAe(e,t){return e=jK(e),zn(Pg.count(Ju(e),e)+(Ju(e).getDay()===4),t,2)}function iAe(e){return e.getDay()}function aAe(e,t){return zn(Lw.count(Ju(e)-1,e),t,2)}function oAe(e,t){return zn(e.getFullYear()%100,t,2)}function sAe(e,t){return e=jK(e),zn(e.getFullYear()%100,t,2)}function lAe(e,t){return zn(e.getFullYear()%1e4,t,4)}function cAe(e,t){var n=e.getDay();return e=n>=4||n===0?Pg(e):Pg.ceil(e),zn(e.getFullYear()%1e4,t,4)}function uAe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zn(t/60|0,"0",2)+zn(t%60,"0",2)}function I7(e,t){return zn(e.getUTCDate(),t,2)}function fAe(e,t){return zn(e.getUTCHours(),t,2)}function dAe(e,t){return zn(e.getUTCHours()%12||12,t,2)}function hAe(e,t){return zn(1+v5.count(Zu(e),e),t,3)}function CK(e,t){return zn(e.getUTCMilliseconds(),t,3)}function pAe(e,t){return CK(e,t)+"000"}function mAe(e,t){return zn(e.getUTCMonth()+1,t,2)}function gAe(e,t){return zn(e.getUTCMinutes(),t,2)}function yAe(e,t){return zn(e.getUTCSeconds(),t,2)}function vAe(e){var t=e.getUTCDay();return t===0?7:t}function xAe(e,t){return zn(b5.count(Zu(e)-1,e),t,2)}function EK(e){var t=e.getUTCDay();return t>=4||t===0?jg(e):jg.ceil(e)}function bAe(e,t){return e=EK(e),zn(jg.count(Zu(e),e)+(Zu(e).getUTCDay()===4),t,2)}function wAe(e){return e.getUTCDay()}function SAe(e,t){return zn(Rw.count(Zu(e)-1,e),t,2)}function _Ae(e,t){return zn(e.getUTCFullYear()%100,t,2)}function NAe(e,t){return e=EK(e),zn(e.getUTCFullYear()%100,t,2)}function kAe(e,t){return zn(e.getUTCFullYear()%1e4,t,4)}function AAe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?jg(e):jg.ceil(e),zn(e.getUTCFullYear()%1e4,t,4)}function PAe(){return"+0000"}function D7(){return"%"}function F7(e){return+e}function B7(e){return Math.floor(+e/1e3)}var ym,OK,TK;jAe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jAe(e){return ym=jke(e),OK=ym.format,ym.parse,TK=ym.utcFormat,ym.utcParse,ym}function CAe(e){return new Date(e)}function EAe(e){return e instanceof Date?+e:+new Date(+e)}function K4(e,t,n,r,i,a,o,s,l,c){var f=R4(),h=f.invert,g=f.domain,m=c(".%L"),b=c(":%S"),y=c("%I:%M"),x=c("%I %p"),w=c("%a %d"),_=c("%b %d"),k=c("%B"),P=c("%Y");function C(j){return(l(j)<j?m:s(j)<j?b:o(j)<j?y:a(j)<j?x:r(j)<j?i(j)<j?w:_:n(j)<j?k:P)(j)}return f.invert=function(j){return new Date(h(j))},f.domain=function(j){return arguments.length?g(Array.from(j,EAe)):g().map(CAe)},f.ticks=function(j){var L=g();return e(L[0],L[L.length-1],j??10)},f.tickFormat=function(j,L){return L==null?C:c(L)},f.nice=function(j){var L=g();return(!j||typeof j.range!="function")&&(j=t(L[0],L[L.length-1],j??10)),j?g(vK(L,j)):f},f.copy=function(){return k1(f,K4(e,t,n,r,i,a,o,s,l,c))},f}function OAe(){return Qs.apply(K4(Ake,Pke,Ju,Y4,x5,A1,W4,z4,Fh,OK).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function TAe(){return Qs.apply(K4(Nke,kke,Zu,G4,b5,v5,H4,V4,Fh,TK).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function w5(){var e=0,t=1,n,r,i,a,o=oo,s=!1,l;function c(h){return h==null||isNaN(h=+h)?l:o(i===0?.5:(h=(a(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([e,t]=h,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(o=h,c):o};function f(h){return function(g){var m,b;return arguments.length?([m,b]=g,o=h(m,b),c):[o(0),o(1)]}}return c.range=f(cy),c.rangeRound=f(L4),c.unknown=function(h){return arguments.length?(l=h,c):l},function(h){return a=h,n=h(e),r=h(t),i=n===r?0:1/(r-n),c}}function qd(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function MK(){var e=$d(w5()(oo));return e.copy=function(){return qd(e,MK())},sf.apply(e,arguments)}function LK(){var e=F4(w5()).domain([1,10]);return e.copy=function(){return qd(e,LK()).base(e.base())},sf.apply(e,arguments)}function RK(){var e=B4(w5());return e.copy=function(){return qd(e,RK()).constant(e.constant())},sf.apply(e,arguments)}function X4(){var e=$4(w5());return e.copy=function(){return qd(e,X4()).exponent(e.exponent())},sf.apply(e,arguments)}function MAe(){return X4.apply(null,arguments).exponent(.5)}function IK(){var e=[],t=oo;function n(r){if(r!=null&&!isNaN(r=+r))return t((_1(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(wd),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>xNe(e,a/r))},n.copy=function(){return IK(t).domain(e)},sf.apply(n,arguments)}function S5(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,c=oo,f,h=!1,g;function m(y){return isNaN(y=+y)?g:(y=.5+((y=+f(y))-a)*(r*y<r*a?s:l),c(h?Math.max(0,Math.min(1,y)):y))}m.domain=function(y){return arguments.length?([e,t,n]=y,i=f(e=+e),a=f(t=+t),o=f(n=+n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,m):[e,t,n]},m.clamp=function(y){return arguments.length?(h=!!y,m):h},m.interpolator=function(y){return arguments.length?(c=y,m):c};function b(y){return function(x){var w,_,k;return arguments.length?([w,_,k]=x,c=WNe(y,[w,_,k]),m):[c(0),c(.5),c(1)]}}return m.range=b(cy),m.rangeRound=b(L4),m.unknown=function(y){return arguments.length?(g=y,m):g},function(y){return f=y,i=y(e),a=y(t),o=y(n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,m}}function DK(){var e=$d(S5()(oo));return e.copy=function(){return qd(e,DK())},sf.apply(e,arguments)}function FK(){var e=F4(S5()).domain([.1,1,10]);return e.copy=function(){return qd(e,FK()).base(e.base())},sf.apply(e,arguments)}function BK(){var e=B4(S5());return e.copy=function(){return qd(e,BK()).constant(e.constant())},sf.apply(e,arguments)}function Q4(){var e=$4(S5());return e.copy=function(){return qd(e,Q4()).exponent(e.exponent())},sf.apply(e,arguments)}function LAe(){return Q4.apply(null,arguments).exponent(.5)}const $7=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:v0,scaleDiverging:DK,scaleDivergingLog:FK,scaleDivergingPow:Q4,scaleDivergingSqrt:LAe,scaleDivergingSymlog:BK,scaleIdentity:yK,scaleImplicit:K3,scaleLinear:Tw,scaleLog:xK,scaleOrdinal:O4,scalePoint:Dv,scalePow:q4,scaleQuantile:SK,scaleQuantize:_K,scaleRadial:wK,scaleSequential:MK,scaleSequentialLog:LK,scaleSequentialPow:X4,scaleSequentialQuantile:IK,scaleSequentialSqrt:MAe,scaleSequentialSymlog:RK,scaleSqrt:pke,scaleSymlog:bK,scaleThreshold:NK,scaleTime:OAe,scaleUtc:TAe,tickFormat:gK},Symbol.toStringTag,{value:"Module"}));var qA,q7;function $K(){if(q7)return qA;q7=1;var e=iy();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var s=n[a],l=r(s);if(l!=null&&(c===void 0?l===l&&!e(l):i(l,c)))var c=l,f=s}return f}return qA=t,qA}var UA,U7;function RAe(){if(U7)return UA;U7=1;function e(t,n){return t>n}return UA=e,UA}var zA,z7;function IAe(){if(z7)return zA;z7=1;var e=$K(),t=RAe(),n=sy();function r(i){return i&&i.length?e(i,n,t):void 0}return zA=r,zA}var DAe=IAe();const hd=Kn(DAe);var VA,V7;function FAe(){if(V7)return VA;V7=1;function e(t,n){return t<n}return VA=e,VA}var WA,W7;function BAe(){if(W7)return WA;W7=1;var e=$K(),t=FAe(),n=sy();function r(i){return i&&i.length?e(i,n,t):void 0}return WA=r,WA}var $Ae=BAe();const _5=Kn($Ae);var HA,H7;function qAe(){if(H7)return HA;H7=1;var e=h4(),t=Bd(),n=KG(),r=Ro();function i(a,o){var s=r(a)?e:n;return s(a,t(o,3))}return HA=i,HA}var YA,Y7;function UAe(){if(Y7)return YA;Y7=1;var e=YG(),t=qAe();function n(r,i){return e(t(r,i),1)}return YA=n,YA}var zAe=UAe();const VAe=Kn(zAe);var GA,G7;function WAe(){if(G7)return GA;G7=1;var e=A4();function t(n,r){return e(n,r)}return GA=t,GA}var HAe=WAe();const _0=Kn(HAe);var uy=1e9,YAe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Z4,zr=!0,Hs="[DecimalError] ",np=Hs+"Invalid argument: ",J4=Hs+"Exponent out of range: ",fy=Math.floor,jh=Math.pow,GAe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,is,oa=1e7,Cr=7,qK=9007199254740991,Iw=fy(qK/Cr),wt={};wt.absoluteValue=wt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};wt.comparedTo=wt.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};wt.decimalPlaces=wt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Cr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};wt.dividedBy=wt.div=function(e){return Wu(this,new this.constructor(e))};wt.dividedToIntegerBy=wt.idiv=function(e){var t=this,n=t.constructor;return xr(Wu(t,new n(e),0,1),n.precision)};wt.equals=wt.eq=function(e){return!this.cmp(e)};wt.exponent=function(){return Mi(this)};wt.greaterThan=wt.gt=function(e){return this.cmp(e)>0};wt.greaterThanOrEqualTo=wt.gte=function(e){return this.cmp(e)>=0};wt.isInteger=wt.isint=function(){return this.e>this.d.length-2};wt.isNegative=wt.isneg=function(){return this.s<0};wt.isPositive=wt.ispos=function(){return this.s>0};wt.isZero=function(){return this.s===0};wt.lessThan=wt.lt=function(e){return this.cmp(e)<0};wt.lessThanOrEqualTo=wt.lte=function(e){return this.cmp(e)<1};wt.logarithm=wt.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(is))throw Error(Hs+"NaN");if(n.s<1)throw Error(Hs+(n.s?"NaN":"-Infinity"));return n.eq(is)?new r(0):(zr=!1,t=Wu(N0(n,a),N0(e,a),a),zr=!0,xr(t,i))};wt.minus=wt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?VK(t,e):UK(t,(e.s=-e.s,e))};wt.modulo=wt.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Hs+"NaN");return n.s?(zr=!1,t=Wu(n,e,0,1).times(e),zr=!0,n.minus(t)):xr(new r(n),i)};wt.naturalExponential=wt.exp=function(){return zK(this)};wt.naturalLogarithm=wt.ln=function(){return N0(this)};wt.negated=wt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};wt.plus=wt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?UK(t,e):VK(t,(e.s=-e.s,e))};wt.precision=wt.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(np+e);if(t=Mi(i)+1,r=i.d.length-1,n=r*Cr+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};wt.squareRoot=wt.sqrt=function(){var e,t,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Hs+"NaN")}for(e=Mi(s),zr=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=vc(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=fy((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(Wu(s,a,o+2)).times(.5),vc(a.d).slice(0,o)===(t=vc(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(xr(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return zr=!0,xr(r,n)};wt.times=wt.mul=function(e){var t,n,r,i,a,o,s,l,c,f=this,h=f.constructor,g=f.d,m=(e=new h(e)).d;if(!f.s||!e.s)return new h(0);for(e.s*=f.s,n=f.e+e.e,l=g.length,c=m.length,l<c&&(a=g,g=m,m=a,o=l,l=c,c=o),a=[],o=l+c,r=o;r--;)a.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=a[i]+m[r]*g[i-r-1]+t,a[i--]=s%oa|0,t=s/oa|0;a[i]=(a[i]+t)%oa|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,zr?xr(e,h.precision):e};wt.toDecimalPlaces=wt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Tc(e,0,uy),t===void 0?t=r.rounding:Tc(t,0,8),xr(n,e+Mi(n)+1,t))};wt.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=mp(r,!0):(Tc(e,0,uy),t===void 0?t=i.rounding:Tc(t,0,8),r=xr(new i(r),e+1,t),n=mp(r,!0,e+1)),n};wt.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?mp(i):(Tc(e,0,uy),t===void 0?t=a.rounding:Tc(t,0,8),r=xr(new a(i),e+Mi(i)+1,t),n=mp(r.abs(),!1,e+Mi(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};wt.toInteger=wt.toint=function(){var e=this,t=e.constructor;return xr(new t(e),Mi(e)+1,t.rounding)};wt.toNumber=function(){return+this};wt.toPower=wt.pow=function(e){var t,n,r,i,a,o,s=this,l=s.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(is);if(s=new l(s),!s.s){if(e.s<1)throw Error(Hs+"Infinity");return s}if(s.eq(is))return s;if(r=l.precision,e.eq(is))return xr(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=f<0?-f:f)<=qK){for(i=new l(is),t=Math.ceil(r/Cr+4),zr=!1;n%2&&(i=i.times(s),X7(i.d,t)),n=fy(n/2),n!==0;)s=s.times(s),X7(s.d,t);return zr=!0,e.s<0?new l(is).div(i):xr(i,r)}}else if(a<0)throw Error(Hs+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,zr=!1,i=e.times(N0(s,r+c)),zr=!0,i=zK(i),i.s=a,i};wt.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Mi(i),r=mp(i,n<=a.toExpNeg||n>=a.toExpPos)):(Tc(e,1,uy),t===void 0?t=a.rounding:Tc(t,0,8),i=xr(new a(i),e,t),n=Mi(i),r=mp(i,e<=n||n<=a.toExpNeg,e)),r};wt.toSignificantDigits=wt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Tc(e,1,uy),t===void 0?t=r.rounding:Tc(t,0,8)),xr(new r(n),e,t)};wt.toString=wt.valueOf=wt.val=wt.toJSON=wt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mi(e),n=e.constructor;return mp(e,t<=n.toExpNeg||t>=n.toExpPos)};function UK(e,t){var n,r,i,a,o,s,l,c,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),zr?xr(t,h):t;if(l=e.d,c=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=c.length):(r=c,i=o,s=l.length),o=Math.ceil(h/Cr),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,r=c,c=l,l=r),n=0;a;)n=(l[--a]=l[a]+c[a]+n)/oa|0,l[a]%=oa;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,zr?xr(t,h):t}function Tc(e,t,n){if(e!==~~e||e<t||e>n)throw Error(np+e)}function vc(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=Cr-r.length,n&&(a+=Zf(n)),a+=r;o=e[t],r=o+"",n=Cr-r.length,n&&(a+=Zf(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Wu=(function(){function e(r,i){var a,o=0,s=r.length;for(r=r.slice();s--;)a=r[s]*i+o,r[s]=a%oa|0,o=a/oa|0;return o&&r.unshift(o),r}function t(r,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*oa+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var s,l,c,f,h,g,m,b,y,x,w,_,k,P,C,j,L,R,D=r.constructor,H=r.s==i.s?1:-1,M=r.d,F=i.d;if(!r.s)return new D(r);if(!i.s)throw Error(Hs+"Division by zero");for(l=r.e-i.e,L=F.length,C=M.length,m=new D(H),b=m.d=[],c=0;F[c]==(M[c]||0);)++c;if(F[c]>(M[c]||0)&&--l,a==null?_=a=D.precision:o?_=a+(Mi(r)-Mi(i))+1:_=a,_<0)return new D(0);if(_=_/Cr+2|0,c=0,L==1)for(f=0,F=F[0],_++;(c<C||f)&&_--;c++)k=f*oa+(M[c]||0),b[c]=k/F|0,f=k%F|0;else{for(f=oa/(F[0]+1)|0,f>1&&(F=e(F,f),M=e(M,f),L=F.length,C=M.length),P=L,y=M.slice(0,L),x=y.length;x<L;)y[x++]=0;R=F.slice(),R.unshift(0),j=F[0],F[1]>=oa/2&&++j;do f=0,s=t(F,y,L,x),s<0?(w=y[0],L!=x&&(w=w*oa+(y[1]||0)),f=w/j|0,f>1?(f>=oa&&(f=oa-1),h=e(F,f),g=h.length,x=y.length,s=t(h,y,g,x),s==1&&(f--,n(h,L<g?R:F,g))):(f==0&&(s=f=1),h=F.slice()),g=h.length,g<x&&h.unshift(0),n(y,h,x),s==-1&&(x=y.length,s=t(F,y,L,x),s<1&&(f++,n(y,L<x?R:F,x))),x=y.length):s===0&&(f++,y=[0]),b[c++]=f,s&&y[0]?y[x++]=M[P]||0:(y=[M[P]],x=1);while((P++<C||y[0]!==void 0)&&_--)}return b[0]||b.shift(),m.e=l,xr(m,o?a+Mi(m)+1:a)}})();function zK(e,t){var n,r,i,a,o,s,l=0,c=0,f=e.constructor,h=f.precision;if(Mi(e)>16)throw Error(J4+Mi(e));if(!e.s)return new f(is);for(zr=!1,s=h,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(r=Math.log(jh(2,c))/Math.LN10*2+5|0,s+=r,n=i=a=new f(is),f.precision=s;;){if(i=xr(i.times(e),s),n=n.times(++l),o=a.plus(Wu(i,n,s)),vc(o.d).slice(0,s)===vc(a.d).slice(0,s)){for(;c--;)a=xr(a.times(a),s);return f.precision=h,t==null?(zr=!0,xr(a,h)):a}a=o}}function Mi(e){for(var t=e.e*Cr,n=e.d[0];n>=10;n/=10)t++;return t}function KA(e,t,n){if(t>e.LN10.sd())throw zr=!0,n&&(e.precision=n),Error(Hs+"LN10 precision limit exceeded");return xr(new e(e.LN10),t)}function Zf(e){for(var t="";e--;)t+="0";return t}function N0(e,t){var n,r,i,a,o,s,l,c,f,h=1,g=10,m=e,b=m.d,y=m.constructor,x=y.precision;if(m.s<1)throw Error(Hs+(m.s?"NaN":"-Infinity"));if(m.eq(is))return new y(0);if(t==null?(zr=!1,c=x):c=t,m.eq(10))return t==null&&(zr=!0),KA(y,c);if(c+=g,y.precision=c,n=vc(b),r=n.charAt(0),a=Mi(m),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=vc(m.d),r=n.charAt(0),h++;a=Mi(m),r>1?(m=new y("0."+n),a++):m=new y(r+"."+n.slice(1))}else return l=KA(y,c+2,x).times(a+""),m=N0(new y(r+"."+n.slice(1)),c-g).plus(l),y.precision=x,t==null?(zr=!0,xr(m,x)):m;for(s=o=m=Wu(m.minus(is),m.plus(is),c),f=xr(m.times(m),c),i=3;;){if(o=xr(o.times(f),c),l=s.plus(Wu(o,new y(i),c)),vc(l.d).slice(0,c)===vc(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(KA(y,c+2,x).times(a+""))),s=Wu(s,new y(h),c),y.precision=x,t==null?(zr=!0,xr(s,x)):s;s=l,i+=2}}function K7(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=fy(n/Cr),e.d=[],r=(n+1)%Cr,n<0&&(r+=Cr),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Cr;r<i;)e.d.push(+t.slice(r,r+=Cr));t=t.slice(r),r=Cr-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),zr&&(e.e>Iw||e.e<-Iw))throw Error(J4+n)}else e.s=0,e.e=0,e.d=[0];return e}function xr(e,t,n){var r,i,a,o,s,l,c,f,h=e.d;for(o=1,a=h[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Cr,i=t,c=h[f=0];else{if(f=Math.ceil((r+1)/Cr),a=h.length,f>=a)return e;for(c=a=h[f],o=1;a>=10;a/=10)o++;r%=Cr,i=r-Cr+o}if(n!==void 0&&(a=jh(10,o-i-1),s=c/a%10|0,l=t<0||h[f+1]!==void 0||c%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/jh(10,o-i):0:h[f-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return l?(a=Mi(e),h.length=1,t=t-a-1,h[0]=jh(10,(Cr-t%Cr)%Cr),e.e=fy(-t/Cr)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=f,a=1,f--):(h.length=f+1,a=jh(10,Cr-r),h[f]=i>0?(c/jh(10,o-i)%jh(10,i)|0)*a:0),l)for(;;)if(f==0){(h[0]+=a)==oa&&(h[0]=1,++e.e);break}else{if(h[f]+=a,h[f]!=oa)break;h[f--]=0,a=1}for(r=h.length;h[--r]===0;)h.pop();if(zr&&(e.e>Iw||e.e<-Iw))throw Error(J4+Mi(e));return e}function VK(e,t){var n,r,i,a,o,s,l,c,f,h,g=e.constructor,m=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),zr?xr(t,m):t;if(l=e.d,h=t.d,r=t.e,c=e.e,l=l.slice(),o=c-r,o){for(f=o<0,f?(n=l,o=-o,s=h.length):(n=h,r=c,s=l.length),i=Math.max(Math.ceil(m/Cr),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=h.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(l[i]!=h[i]){f=l[i]<h[i];break}o=0}for(f&&(n=l,l=h,h=n,t.s=-t.s),s=l.length,i=h.length-s;i>0;--i)l[s++]=0;for(i=h.length;i>o;){if(l[--i]<h[i]){for(a=i;a&&l[--a]===0;)l[a]=oa-1;--l[a],l[i]+=oa}l[i]-=h[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,zr?xr(t,m):t):new g(0)}function mp(e,t,n){var r,i=Mi(e),a=vc(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+Zf(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Zf(-i-1)+a,n&&(r=n-o)>0&&(a+=Zf(r))):i>=o?(a+=Zf(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Zf(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=Zf(r))),e.s<0?"-"+a:a}function X7(e,t){if(e.length>t)return e.length=t,!0}function WK(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(np+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return K7(o,a.toString())}else if(typeof a!="string")throw Error(np+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,GAe.test(a))K7(o,a);else throw Error(np+a)}if(i.prototype=wt,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=WK,i.config=i.set=KAe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function KAe(e){if(!e||typeof e!="object")throw Error(Hs+"Object expected");var t,n,r,i=["precision",1,uy,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(fy(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(np+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(np+n+": "+r);return this}var Z4=WK(YAe);is=new Z4(1);const dr=Z4;function XAe(e){return ePe(e)||ZAe(e)||JAe(e)||QAe()}function QAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JAe(e,t){if(e){if(typeof e=="string")return Z3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z3(e,t)}}function ZAe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ePe(e){if(Array.isArray(e))return Z3(e)}function Z3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var tPe=function(t){return t},HK={},YK=function(t){return t===HK},Q7=function(t){return function n(){return arguments.length===0||arguments.length===1&&YK(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},nPe=function e(t,n){return t===1?n:Q7(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==HK}).length;return o>=t?n.apply(void 0,i):e(t-o,Q7(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var f=i.map(function(h){return YK(h)?l.shift():h});return n.apply(void 0,XAe(f).concat(l))}))})},N5=function(t){return nPe(t.length,t)},eC=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},rPe=N5(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),iPe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return tPe;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},tC=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},GK=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n&&a.every(function(s,l){return s===n[l]})||(n=a,r=t.apply(void 0,a)),r}};function aPe(e){var t;return e===0?t=1:t=Math.floor(new dr(e).abs().log(10).toNumber())+1,t}function oPe(e,t,n){for(var r=new dr(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var sPe=N5(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),lPe=N5(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),cPe=N5(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const k5={rangeStep:oPe,getDigitCount:aPe,interpolateNumber:sPe,uninterpolateNumber:lPe,uninterpolateTruncation:cPe};function nC(e){return dPe(e)||fPe(e)||KK(e)||uPe()}function uPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fPe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function dPe(e){if(Array.isArray(e))return rC(e)}function k0(e,t){return mPe(e)||pPe(e,t)||KK(e,t)||hPe()}function hPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KK(e,t){if(e){if(typeof e=="string")return rC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rC(e,t)}}function rC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pPe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function mPe(e){if(Array.isArray(e))return e}function XK(e){var t=k0(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function QK(e,t,n){if(e.lte(0))return new dr(0);var r=k5.getDigitCount(e.toNumber()),i=new dr(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new dr(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return t?l:new dr(Math.ceil(l))}function gPe(e,t,n){var r=1,i=new dr(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new dr(10).pow(k5.getDigitCount(e)-1),i=new dr(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new dr(Math.floor(e)))}else e===0?i=new dr(Math.floor((t-1)/2)):n||(i=new dr(Math.floor(e)));var o=Math.floor((t-1)/2),s=iPe(rPe(function(l){return i.add(new dr(l-o).mul(r)).toNumber()}),eC);return s(0,t)}function JK(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new dr(0),tickMin:new dr(0),tickMax:new dr(0)};var a=QK(new dr(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new dr(0):(o=new dr(e).add(t).div(2),o=o.sub(new dr(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new dr(t).sub(o).div(a).toNumber()),c=s+l+1;return c>n?JK(e,t,n,r,i+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:a,tickMin:o.sub(new dr(s).mul(a)),tickMax:o.add(new dr(l).mul(a))})}function yPe(e){var t=k0(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=XK([n,r]),l=k0(s,2),c=l[0],f=l[1];if(c===-1/0||f===1/0){var h=f===1/0?[c].concat(nC(eC(0,i-1).map(function(){return 1/0}))):[].concat(nC(eC(0,i-1).map(function(){return-1/0})),[f]);return n>r?tC(h):h}if(c===f)return gPe(c,i,a);var g=JK(c,f,o,a),m=g.step,b=g.tickMin,y=g.tickMax,x=k5.rangeStep(b,y.add(new dr(.1).mul(m)),m);return n>r?tC(x):x}function vPe(e,t){var n=k0(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=XK([r,i]),s=k0(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var f=Math.max(t,2),h=QK(new dr(c).sub(l).div(f-1),a,0),g=[].concat(nC(k5.rangeStep(new dr(l),new dr(c).sub(new dr(.99).mul(h)),h)),[c]);return r>i?tC(g):g}var xPe=GK(yPe),bPe=GK(vPe),wPe="Invariant failed";function gp(e,t){throw new Error(wPe)}var SPe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Cg(e){"@babel/helpers - typeof";return Cg=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},Cg(e)}function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dw.apply(this,arguments)}function _Pe(e,t){return PPe(e)||APe(e,t)||kPe(e,t)||NPe()}function NPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kPe(e,t){if(e){if(typeof e=="string")return J7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J7(e,t)}}function J7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function APe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function PPe(e){if(Array.isArray(e))return e}function jPe(e,t){if(e==null)return{};var n=CPe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OPe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tX(r.key),r)}}function TPe(e,t,n){return t&&OPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MPe(e,t,n){return t=Fw(t),LPe(e,ZK()?Reflect.construct(t,n||[],Fw(e).constructor):t.apply(e,n))}function LPe(e,t){if(t&&(Cg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RPe(e)}function RPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZK=function(){return!!e})()}function Fw(e){return Fw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fw(e)}function IPe(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&&iC(e,t)}function iC(e,t){return iC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iC(e,t)}function eX(e,t,n){return t=tX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tX(e){var t=DPe(e,"string");return Cg(t)=="symbol"?t:t+""}function DPe(e,t){if(Cg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var A5=(function(e){function t(){return EPe(this,t),MPe(this,t,arguments)}return IPe(t,e),TPe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,s=r.dataKey,l=r.data,c=r.dataPointFormatter,f=r.xAxis,h=r.yAxis,g=jPe(r,SPe),m=kn(g,!1);this.props.direction==="x"&&f.type!=="number"&&gp();var b=l.map(function(y){var x=c(y,s),w=x.x,_=x.y,k=x.value,P=x.errorVal;if(!P)return null;var C=[],j,L;if(Array.isArray(P)){var R=_Pe(P,2);j=R[0],L=R[1]}else j=L=P;if(a==="vertical"){var D=f.scale,H=_+i,M=H+o,F=H-o,W=D(k-j),V=D(k+L);C.push({x1:V,y1:M,x2:V,y2:F}),C.push({x1:W,y1:H,x2:V,y2:H}),C.push({x1:W,y1:M,x2:W,y2:F})}else if(a==="horizontal"){var X=h.scale,Y=w+i,Z=Y-o,K=Y+o,se=X(k-j),z=X(k+L);C.push({x1:Z,y1:z,x2:K,y2:z}),C.push({x1:Y,y1:se,x2:Y,y2:z}),C.push({x1:Z,y1:se,x2:K,y2:se})}return _e.createElement(Ur,Dw({className:"recharts-errorBar",key:"bar-".concat(C.map(function(te){return"".concat(te.x1,"-").concat(te.x2,"-").concat(te.y1,"-").concat(te.y2)}))},m),C.map(function(te){return _e.createElement("line",Dw({},te,{key:"line-".concat(te.x1,"-").concat(te.x2,"-").concat(te.y1,"-").concat(te.y2)}))}))});return _e.createElement(Ur,{className:"recharts-errorBars"},b)}}])})(_e.Component);eX(A5,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});eX(A5,"displayName","ErrorBar");function A0(e){"@babel/helpers - typeof";return A0=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},A0(e)}function Z7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z7(Object(n),!0).forEach(function(r){FPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FPe(e,t,n){return t=BPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BPe(e){var t=$Pe(e,"string");return A0(t)=="symbol"?t:t+""}function $Pe(e,t){if(A0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(A0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nX=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=ns(n,Ym);if(!o)return null;var s=Ym.defaultProps,l=s!==void 0?wh(wh({},s),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:a==="children"?c=(r||[]).reduce(function(f,h){var g=h.item,m=h.props,b=m.sectors||m.data||[];return f.concat(b.map(function(y){return{type:o.props.iconType||g.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):c=(r||[]).map(function(f){var h=f.item,g=h.type.defaultProps,m=g!==void 0?wh(wh({},g),h.props):{},b=m.dataKey,y=m.name,x=m.legendType,w=m.hide;return{inactive:w,dataKey:b,type:l.iconType||x||"square",color:eT(h),value:y||b,payload:m}}),wh(wh(wh({},l),Ym.getWithHeight(o,i)),{},{payload:c,item:o})};function P0(e){"@babel/helpers - typeof";return P0=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},P0(e)}function eB(e){return VPe(e)||zPe(e)||UPe(e)||qPe()}function qPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UPe(e,t){if(e){if(typeof e=="string")return aC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aC(e,t)}}function zPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VPe(e){if(Array.isArray(e))return aC(e)}function aC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tB(Object(n),!0).forEach(function(r){Km(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Km(e,t,n){return t=WPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WPe(e){var t=HPe(e,"string");return P0(t)=="symbol"?t:t+""}function HPe(e,t){if(P0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(P0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ds(e,t,n){return jn(e)||jn(t)?n:Gi(t)?Ws(e,t,n):fn(t)?t(e):n}function Fv(e,t,n,r){var i=VAe(e,function(s){return ds(s,t)});if(n==="number"){var a=i.filter(function(s){return it(s)||parseFloat(s)});return a.length?[_5(a),hd(a)]:[1/0,-1/0]}var o=r?i.filter(function(s){return!jn(s)}):i;return o.map(function(s){return Gi(s)||s instanceof Date?s:""})}var YPe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,c=0;c<s;c++){var f=c>0?i[c-1].coordinate:i[s-1].coordinate,h=i[c].coordinate,g=c>=s-1?i[0].coordinate:i[c+1].coordinate,m=void 0;if(Pl(h-f)!==Pl(g-h)){var b=[];if(Pl(g-h)===Pl(l[1]-l[0])){m=g;var y=h+l[1]-l[0];b[0]=Math.min(y,(y+f)/2),b[1]=Math.max(y,(y+f)/2)}else{m=f;var x=g+l[1]-l[0];b[0]=Math.min(h,(x+h)/2),b[1]=Math.max(h,(x+h)/2)}var w=[Math.min(h,(m+h)/2),Math.max(h,(m+h)/2)];if(t>w[0]&&t<=w[1]||t>=b[0]&&t<=b[1]){o=i[c].index;break}}else{var _=Math.min(f,g),k=Math.max(f,g);if(t>(_+h)/2&&t<=(k+h)/2){o=i[c].index;break}}}else for(var P=0;P<s;P++)if(P===0&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P>0&&P<s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){o=r[P].index;break}return o},eT=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?fi(fi({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},GPe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,c=s.length;l<c;l++)for(var f=a[s[l]].stackGroups,h=Object.keys(f),g=0,m=h.length;g<m;g++){var b=f[h[g]],y=b.items,x=b.cateAxisId,w=y.filter(function(L){return Vu(L.type).indexOf("Bar")>=0});if(w&&w.length){var _=w[0].type.defaultProps,k=_!==void 0?fi(fi({},_),w[0].props):w[0].props,P=k.barSize,C=k[x];o[C]||(o[C]=[]);var j=jn(P)?n:P;o[C].push({item:w[0],stackList:w.slice(1),barSize:jn(j)?void 0:pp(j,r,0)})}}return o},KPe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var c=pp(n,i,0,!0),f,h=[];if(o[0].barSize===+o[0].barSize){var g=!1,m=i/l,b=o.reduce(function(P,C){return P+C.barSize||0},0);b+=(l-1)*c,b>=i&&(b-=(l-1)*c,c=0),b>=i&&m>0&&(g=!0,m*=.9,b=l*m);var y=(i-b)/2>>0,x={offset:y-c,size:0};f=o.reduce(function(P,C){var j={item:C.item,position:{offset:x.offset+x.size+c,size:g?m:C.barSize}},L=[].concat(eB(P),[j]);return x=L[L.length-1].position,C.stackList&&C.stackList.length&&C.stackList.forEach(function(R){L.push({item:R,position:x})}),L},h)}else{var w=pp(r,i,0,!0);i-2*w-(l-1)*c<=0&&(c=0);var _=(i-2*w-(l-1)*c)/l;_>1&&(_>>=0);var k=s===+s?Math.min(_,s):_;f=o.reduce(function(P,C,j){var L=[].concat(eB(P),[{item:C.item,position:{offset:w+(_+c)*j+(_-k)/2,size:k}}]);return C.stackList&&C.stackList.length&&C.stackList.forEach(function(R){L.push({item:R,position:L[L.length-1].position})}),L},h)}return f},XPe=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),c=nX({children:a,legendWidth:l});if(c){var f=i||{},h=f.width,g=f.height,m=c.align,b=c.verticalAlign,y=c.layout;if((y==="vertical"||y==="horizontal"&&b==="middle")&&m!=="center"&&it(t[m]))return fi(fi({},t),{},Km({},m,t[m]+(h||0)));if((y==="horizontal"||y==="vertical"&&m==="center")&&b!=="middle"&&it(t[b]))return fi(fi({},t),{},Km({},b,t[b]+(g||0)))}return t},QPe=function(t,n,r){return jn(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},rX=function(t,n,r,i,a){var o=n.props.children,s=jl(o,A5).filter(function(c){return QPe(i,a,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var h=ds(f,r);if(jn(h))return c;var g=Array.isArray(h)?[_5(h),hd(h)]:[h,h],m=l.reduce(function(b,y){var x=ds(f,y,0),w=g[0]-Math.abs(Array.isArray(x)?x[0]:x),_=g[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(w,b[0]),Math.max(_,b[1])]},[1/0,-1/0]);return[Math.min(m[0],c[0]),Math.max(m[1],c[1])]},[1/0,-1/0])}return null},JPe=function(t,n,r,i,a){var o=n.map(function(s){return rX(t,s,r,a,i)}).filter(function(s){return!jn(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},iX=function(t,n,r,i,a){var o=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&rX(t,l,c,i)||Fv(t,c,r,a)});if(r==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var f=0,h=c.length;f<h;f++)s[c[f]]||(s[c[f]]=!0,l.push(c[f]));return l},[])},aX=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},oX=function(t,n,r,i){if(i)return t.map(function(l){return l.coordinate});var a,o,s=t.map(function(l){return l.coordinate===n&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate});return a||s.push(n),o||s.push(r),s},Bu=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Pl(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(h){var g=a?a.indexOf(h):h;return{coordinate:i(g)+c,value:h,offset:c}});return f.filter(function(h){return!oy(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,g){return{coordinate:i(h)+c,value:h,index:g,offset:c}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(h){return{coordinate:i(h)+c,value:h,offset:c}}):i.domain().map(function(h,g){return{coordinate:i(h)+c,value:a?a[h]:h,index:g,offset:c}})},XA=new WeakMap,$x=function(t,n){if(typeof n!="function")return t;XA.has(t)||XA.set(t,new WeakMap);var r=XA.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},ZPe=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:v0(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Tw(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Dv(),realScaleType:"point"}:a==="category"?{scale:v0(),realScaleType:"band"}:{scale:Tw(),realScaleType:"linear"};if(hp(i)){var l="scale".concat(u5(i));return{scale:($7[l]||Dv)(),realScaleType:$7[l]?l:"point"}}return fn(i)?{scale:i}:{scale:Dv(),realScaleType:"point"}},nB=1e-4,eje=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-nB,o=Math.max(i[0],i[1])+nB,s=t(n[0]),l=t(n[r-1]);(s<a||s>o||l<a||l>o)&&t.domain([n[0],n[r-1]])}},tje=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},nje=function(t,n){if(!n||n.length!==2||!it(n[0])||!it(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!it(t[0])||t[0]<r)&&(a[0]=r),(!it(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},rje=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,s=0;s<n;++s){var l=oy(t[s][r][1])?t[s][r][0]:t[s][r][1];l>=0?(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1])}},ije=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var s=oy(t[o][r][1])?t[o][r][0]:t[o][r][1];s>=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},aje={sign:rje,expand:q2e,none:wg,silhouette:U2e,wiggle:z2e,positive:ije},oje=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=aje[r],o=$2e().keys(i).value(function(s,l){return+ds(s,l,0)}).order(R3).offset(a);return o(t)},sje=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,l={},c=s.reduce(function(h,g){var m,b=(m=g.type)!==null&&m!==void 0&&m.defaultProps?fi(fi({},g.type.defaultProps),g.props):g.props,y=b.stackId,x=b.hide;if(x)return h;var w=b[r],_=h[w]||{hasStack:!1,stackGroups:{}};if(Gi(y)){var k=_.stackGroups[y]||{numericAxisId:r,cateAxisId:i,items:[]};k.items.push(g),_.hasStack=!0,_.stackGroups[y]=k}else _.stackGroups[w1("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[g]};return fi(fi({},h),{},Km({},w,_))},l),f={};return Object.keys(c).reduce(function(h,g){var m=c[g];if(m.hasStack){var b={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(y,x){var w=m.stackGroups[x];return fi(fi({},y),{},Km({},x,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:oje(t,w.items,a)}))},b)}return fi(fi({},h),{},Km({},g,m))},f)},lje=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var f=xPe(c,a,s);return t.domain([_5(f),hd(f)]),{niceTicks:f}}if(a&&i==="number"){var h=t.domain(),g=bPe(h,a,s);return{niceTicks:g}}return null};function rB(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!jn(i[t.dataKey])){var s=fw(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var l=ds(i,jn(o)?t.dataKey:o);return jn(l)?null:t.scale(l)}var iB=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=ds(o,n.dataKey,n.domain[s]);return jn(l)?null:n.scale(l)-a/2+i},cje=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},uje=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?fi(fi({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Gi(a)){var o=n[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},fje=function(t){return t.reduce(function(n,r){return[_5(r.concat([n[0]]).filter(it)),hd(r.concat([n[1]]).filter(it))]},[1/0,-1/0])},sX=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(c,f){var h=fje(f.slice(n,r+1));return[Math.min(c[0],h[0]),Math.max(c[1],h[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},aB=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,oB=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,oC=function(t,n,r){if(fn(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(it(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(aB.test(t[0])){var a=+aB.exec(t[0])[1];i[0]=n[0]-a}else fn(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(it(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(oB.test(t[1])){var o=+oB.exec(t[1])[1];i[1]=n[1]+o}else fn(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Bw=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=j4(n,function(h){return h.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var c=a[s],f=a[s-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},sB=function(t,n,r){return!t||!t.length||_0(t,Ws(r,"type.defaultProps.domain"))?n:t},lX=function(t,n){var r=t.type.defaultProps?fi(fi({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,s=r.formatter,l=r.tooltipType,c=r.chartType,f=r.hide;return fi(fi({},kn(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:eT(t),value:ds(n,i),type:l,payload:n,chartType:c,hide:f})};function j0(e){"@babel/helpers - typeof";return j0=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},j0(e)}function lB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lB(Object(n),!0).forEach(function(r){dje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dje(e,t,n){return t=hje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hje(e){var t=pje(e,"string");return j0(t)=="symbol"?t:t+""}function pje(e,t){if(j0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(j0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $w=Math.PI/180,mje=function(t){return t*180/Math.PI},ya=function(t,n,r,i){return{x:t+Math.cos(-$w*i)*r,y:n+Math.sin(-$w*i)*r}},gje=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},yje=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,s=gje({x:r,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(r-a)/s,c=Math.acos(l);return i>o&&(c=2*Math.PI-c),{radius:s,angle:mje(c),angleInRadian:c}},vje=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},xje=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},uB=function(t,n){var r=t.x,i=t.y,a=yje({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,c=n.outerRadius;if(o<l||o>c)return!1;if(o===0)return!0;var f=vje(n),h=f.startAngle,g=f.endAngle,m=s,b;if(h<=g){for(;m>g;)m-=360;for(;m<h;)m+=360;b=m>=h&&m<=g}else{for(;m>h;)m-=360;for(;m<g;)m+=360;b=m>=g&&m<=h}return b?cB(cB({},n),{},{radius:o,angle:xje(m,n)}):null};function C0(e){"@babel/helpers - typeof";return C0=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},C0(e)}var bje=["offset"];function wje(e){return kje(e)||Nje(e)||_je(e)||Sje()}function Sje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _je(e,t){if(e){if(typeof e=="string")return sC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sC(e,t)}}function Nje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kje(e){if(Array.isArray(e))return sC(e)}function sC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Aje(e,t){if(e==null)return{};var n=Pje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fB(Object(n),!0).forEach(function(r){jje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jje(e,t,n){return t=Cje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cje(e){var t=Eje(e,"string");return C0(t)=="symbol"?t:t+""}function Eje(e,t){if(C0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(C0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E0(){return E0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E0.apply(this,arguments)}var Oje=function(t){var n=t.value,r=t.formatter,i=jn(t.children)?n:t.children;return fn(r)?r(i):i},Tje=function(t,n){var r=Pl(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Mje=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,c=l.cx,f=l.cy,h=l.innerRadius,g=l.outerRadius,m=l.startAngle,b=l.endAngle,y=l.clockWise,x=(h+g)/2,w=Tje(m,b),_=w>=0?1:-1,k,P;i==="insideStart"?(k=m+_*o,P=y):i==="insideEnd"?(k=b-_*o,P=!y):i==="end"&&(k=b+_*o,P=y),P=w<=0?P:!P;var C=ya(c,f,x,k),j=ya(c,f,x,k+(P?1:-1)*359),L="M".concat(C.x,",").concat(C.y,`
A`).concat(x,",").concat(x,",0,1,").concat(P?0:1,`,
`).concat(j.x,",").concat(j.y),R=jn(t.id)?w1("recharts-radial-line-"):t.id;return _e.createElement("text",E0({},r,{dominantBaseline:"central",className:Tn("recharts-radial-bar-label",s)}),_e.createElement("defs",null,_e.createElement("path",{id:R,d:L})),_e.createElement("textPath",{xlinkHref:"#".concat(R)},n))},Lje=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,l=a.innerRadius,c=a.outerRadius,f=a.startAngle,h=a.endAngle,g=(f+h)/2;if(i==="outside"){var m=ya(o,s,c+r,g),b=m.x,y=m.y;return{x:b,y,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var x=(l+c)/2,w=ya(o,s,x,g),_=w.x,k=w.y;return{x:_,y:k,textAnchor:"middle",verticalAnchor:"middle"}},Rje=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,l=o.y,c=o.width,f=o.height,h=f>=0?1:-1,g=h*i,m=h>0?"end":"start",b=h>0?"start":"end",y=c>=0?1:-1,x=y*i,w=y>0?"end":"start",_=y>0?"start":"end";if(a==="top"){var k={x:s+c/2,y:l-h*i,textAnchor:"middle",verticalAnchor:m};return Vi(Vi({},k),r?{height:Math.max(l-r.y,0),width:c}:{})}if(a==="bottom"){var P={x:s+c/2,y:l+f+g,textAnchor:"middle",verticalAnchor:b};return Vi(Vi({},P),r?{height:Math.max(r.y+r.height-(l+f),0),width:c}:{})}if(a==="left"){var C={x:s-x,y:l+f/2,textAnchor:w,verticalAnchor:"middle"};return Vi(Vi({},C),r?{width:Math.max(C.x-r.x,0),height:f}:{})}if(a==="right"){var j={x:s+c+x,y:l+f/2,textAnchor:_,verticalAnchor:"middle"};return Vi(Vi({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:f}:{})}var L=r?{width:c,height:f}:{};return a==="insideLeft"?Vi({x:s+x,y:l+f/2,textAnchor:_,verticalAnchor:"middle"},L):a==="insideRight"?Vi({x:s+c-x,y:l+f/2,textAnchor:w,verticalAnchor:"middle"},L):a==="insideTop"?Vi({x:s+c/2,y:l+g,textAnchor:"middle",verticalAnchor:b},L):a==="insideBottom"?Vi({x:s+c/2,y:l+f-g,textAnchor:"middle",verticalAnchor:m},L):a==="insideTopLeft"?Vi({x:s+x,y:l+g,textAnchor:_,verticalAnchor:b},L):a==="insideTopRight"?Vi({x:s+c-x,y:l+g,textAnchor:w,verticalAnchor:b},L):a==="insideBottomLeft"?Vi({x:s+x,y:l+f-g,textAnchor:_,verticalAnchor:m},L):a==="insideBottomRight"?Vi({x:s+c-x,y:l+f-g,textAnchor:w,verticalAnchor:m},L):ay(a)&&(it(a.x)||Ih(a.x))&&(it(a.y)||Ih(a.y))?Vi({x:s+pp(a.x,c),y:l+pp(a.y,f),textAnchor:"end",verticalAnchor:"end"},L):Vi({x:s+c/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},L)},Ije=function(t){return"cx"in t&&it(t.cx)};function Fa(e){var t=e.offset,n=t===void 0?5:t,r=Aje(e,bje),i=Vi({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,c=i.content,f=i.className,h=f===void 0?"":f,g=i.textBreakAll;if(!a||jn(s)&&jn(l)&&!E.isValidElement(c)&&!fn(c))return null;if(E.isValidElement(c))return E.cloneElement(c,i);var m;if(fn(c)){if(m=E.createElement(c,i),E.isValidElement(m))return m}else m=Oje(i);var b=Ije(a),y=kn(i,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Mje(i,m,y);var x=b?Lje(i):Rje(i);return _e.createElement(Nw,E0({className:Tn("recharts-label",h)},y,x,{breakAll:g}),m)}Fa.displayName="Label";var cX=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,f=t.outerRadius,h=t.x,g=t.y,m=t.top,b=t.left,y=t.width,x=t.height,w=t.clockWise,_=t.labelViewBox;if(_)return _;if(it(y)&&it(x)){if(it(h)&&it(g))return{x:h,y:g,width:y,height:x};if(it(m)&&it(b))return{x:m,y:b,width:y,height:x}}return it(h)&&it(g)?{x:h,y:g,width:0,height:0}:it(n)&&it(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:f||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},Dje=function(t,n){return t?t===!0?_e.createElement(Fa,{key:"label-implicit",viewBox:n}):Gi(t)?_e.createElement(Fa,{key:"label-implicit",viewBox:n,value:t}):E.isValidElement(t)?t.type===Fa?E.cloneElement(t,{key:"label-implicit",viewBox:n}):_e.createElement(Fa,{key:"label-implicit",content:t,viewBox:n}):fn(t)?_e.createElement(Fa,{key:"label-implicit",content:t,viewBox:n}):ay(t)?_e.createElement(Fa,E0({viewBox:n},t,{key:"label-implicit"})):null:null},Fje=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=cX(t),o=jl(i,Fa).map(function(l,c){return E.cloneElement(l,{viewBox:n||a,key:"label-".concat(c)})});if(!r)return o;var s=Dje(t.label,n||a);return[s].concat(wje(o))};Fa.parseViewBox=cX;Fa.renderCallByParent=Fje;var QA,dB;function Bje(){if(dB)return QA;dB=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return QA=e,QA}var $je=Bje();const qje=Kn($je);function O0(e){"@babel/helpers - typeof";return O0=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},O0(e)}var Uje=["valueAccessor"],zje=["data","dataKey","clockWise","id","textBreakAll"];function Vje(e){return Gje(e)||Yje(e)||Hje(e)||Wje()}function Wje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hje(e,t){if(e){if(typeof e=="string")return lC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lC(e,t)}}function Yje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gje(e){if(Array.isArray(e))return lC(e)}function lC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qw(){return qw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qw.apply(this,arguments)}function hB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hB(Object(n),!0).forEach(function(r){Kje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kje(e,t,n){return t=Xje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xje(e){var t=Qje(e,"string");return O0(t)=="symbol"?t:t+""}function Qje(e,t){if(O0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(O0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mB(e,t){if(e==null)return{};var n=Jje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Zje=function(t){return Array.isArray(t.value)?qje(t.value):t.value};function Sd(e){var t=e.valueAccessor,n=t===void 0?Zje:t,r=mB(e,Uje),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,c=mB(r,zje);return!i||!i.length?null:_e.createElement(Ur,{className:"recharts-label-list"},i.map(function(f,h){var g=jn(a)?n(f,h):ds(f&&f.payload,a),m=jn(s)?{}:{id:"".concat(s,"-").concat(h)};return _e.createElement(Fa,qw({},kn(f,!0),c,m,{parentViewBox:f.parentViewBox,value:g,textBreakAll:l,viewBox:Fa.parseViewBox(jn(o)?f:pB(pB({},f),{},{clockWise:o})),key:"label-".concat(h),index:h}))}))}Sd.displayName="LabelList";function e3e(e,t){return e?e===!0?_e.createElement(Sd,{key:"labelList-implicit",data:t}):_e.isValidElement(e)||fn(e)?_e.createElement(Sd,{key:"labelList-implicit",data:t,content:e}):ay(e)?_e.createElement(Sd,qw({data:t},e,{key:"labelList-implicit"})):null:null}function t3e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=jl(r,Sd).map(function(o,s){return E.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=e3e(e.label,t);return[a].concat(Vje(i))}Sd.renderCallByParent=t3e;var n3e=["component"];function cC(e){"@babel/helpers - typeof";return cC=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},cC(e)}function r3e(e,t){if(e==null)return{};var n=i3e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function uC(e){var t=e.component,n=r3e(e,n3e),r;return E.isValidElement(t)?r=E.cloneElement(t,n):fn(t)?r=E.createElement(t,n):kc(!1,"Customized's props `component` must be React.element or Function, but got %s.",cC(t)),_e.createElement(Ur,{className:"recharts-customized-wrapper"},r)}uC.displayName="Customized";function T0(e){"@babel/helpers - typeof";return T0=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},T0(e)}function fC(){return fC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fC.apply(this,arguments)}function gB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gB(Object(n),!0).forEach(function(r){a3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a3e(e,t,n){return t=o3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o3e(e){var t=s3e(e,"string");return T0(t)=="symbol"?t:t+""}function s3e(e,t){if(T0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(T0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l3e=function(t,n){var r=Pl(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},qx=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,f=l*(s?1:-1)+i,h=Math.asin(l/f)/$w,g=c?a:a+o*h,m=ya(n,r,f,g),b=ya(n,r,i,g),y=c?a-o*h:a,x=ya(n,r,f*Math.cos(h*$w),y);return{center:m,circleTangency:b,lineTangency:x,theta:h}},uX=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=l3e(o,s),c=o+l,f=ya(n,r,a,o),h=ya(n,r,a,c),g="M ".concat(f.x,",").concat(f.y,`
A `).concat(a,",").concat(a,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
`).concat(h.x,",").concat(h.y,`
`);if(i>0){var m=ya(n,r,i,o),b=ya(n,r,i,c);g+="L ".concat(b.x,",").concat(b.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
`).concat(m.x,",").concat(m.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},c3e=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,h=Pl(f-c),g=qx({cx:n,cy:r,radius:a,angle:c,sign:h,cornerRadius:o,cornerIsExternal:l}),m=g.circleTangency,b=g.lineTangency,y=g.theta,x=qx({cx:n,cy:r,radius:a,angle:f,sign:-h,cornerRadius:o,cornerIsExternal:l}),w=x.circleTangency,_=x.lineTangency,k=x.theta,P=l?Math.abs(c-f):Math.abs(c-f)-y-k;if(P<0)return s?"M ".concat(b.x,",").concat(b.y,`
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
`):uX({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:c,endAngle:f});var C="M ".concat(b.x,",").concat(b.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(m.x,",").concat(m.y,`
A`).concat(a,",").concat(a,",0,").concat(+(P>180),",").concat(+(h<0),",").concat(w.x,",").concat(w.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(_.x,",").concat(_.y,`
`);if(i>0){var j=qx({cx:n,cy:r,radius:i,angle:c,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),L=j.circleTangency,R=j.lineTangency,D=j.theta,H=qx({cx:n,cy:r,radius:i,angle:f,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),M=H.circleTangency,F=H.lineTangency,W=H.theta,V=l?Math.abs(c-f):Math.abs(c-f)-D-W;if(V<0&&o===0)return"".concat(C,"L").concat(n,",").concat(r,"Z");C+="L".concat(F.x,",").concat(F.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(M.x,",").concat(M.y,`
A`).concat(i,",").concat(i,",0,").concat(+(V>180),",").concat(+(h>0),",").concat(L.x,",").concat(L.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,"Z")}else C+="L".concat(n,",").concat(r,"Z");return C},u3e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},fX=function(t){var n=yB(yB({},u3e),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,f=n.startAngle,h=n.endAngle,g=n.className;if(o<a||f===h)return null;var m=Tn("recharts-sector",g),b=o-a,y=pp(s,b,0,!0),x;return y>0&&Math.abs(f-h)<360?x=c3e({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(y,b/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:h}):x=uX({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:h}),_e.createElement("path",fC({},kn(n,!0),{className:m,d:x,role:"img"}))};function M0(e){"@babel/helpers - typeof";return M0=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},M0(e)}function dC(){return dC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dC.apply(this,arguments)}function vB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vB(Object(n),!0).forEach(function(r){f3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function f3e(e,t,n){return t=d3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d3e(e){var t=h3e(e,"string");return M0(t)=="symbol"?t:t+""}function h3e(e,t){if(M0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(M0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bB={curveBasisClosed:C2e,curveBasisOpen:E2e,curveBasis:j2e,curveBumpX:p2e,curveBumpY:m2e,curveLinearClosed:O2e,curveLinear:d5,curveMonotoneX:T2e,curveMonotoneY:M2e,curveNatural:L2e,curveStep:R2e,curveStepAfter:D2e,curveStepBefore:I2e},Ux=function(t){return t.x===+t.x&&t.y===+t.y},lv=function(t){return t.x},cv=function(t){return t.y},p3e=function(t,n){if(fn(t))return t;var r="curve".concat(u5(t));return(r==="curveMonotone"||r==="curveBump")&&n?bB["".concat(r).concat(n==="vertical"?"Y":"X")]:bB[r]||d5},m3e=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,f=p3e(r,s),h=c?a.filter(function(y){return Ux(y)}):a,g;if(Array.isArray(o)){var m=c?o.filter(function(y){return Ux(y)}):o,b=h.map(function(y,x){return xB(xB({},y),{},{base:m[x]})});return s==="vertical"?g=Mx().y(cv).x1(lv).x0(function(y){return y.base.x}):g=Mx().x(lv).y1(cv).y0(function(y){return y.base.y}),g.defined(Ux).curve(f),g(b)}return s==="vertical"&&it(o)?g=Mx().y(cv).x1(lv).x0(o):it(o)?g=Mx().x(lv).y1(cv).y0(o):g=gG().x(lv).y(cv),g.defined(Ux).curve(f),g(h)},Bv=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?m3e(t):i;return E.createElement("path",dC({},kn(t,!1),dw(t),{className:Tn("recharts-curve",n),d:o,ref:a}))},JA={exports:{}},ZA,wB;function g3e(){if(wB)return ZA;wB=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ZA=e,ZA}var eP,SB;function y3e(){if(SB)return eP;SB=1;var e=g3e();function t(){}function n(){}return n.resetWarningCache=t,eP=function(){function r(o,s,l,c,f,h){if(h!==e){var g=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 g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},eP}var _B;function v3e(){return _B||(_B=1,JA.exports=y3e()()),JA.exports}var x3e=v3e();const er=Kn(x3e),{getOwnPropertyNames:b3e,getOwnPropertySymbols:w3e}=Object,{hasOwnProperty:S3e}=Object.prototype;function tP(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function zx(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:a}=i,o=a.get(n),s=a.get(r);if(o&&s)return o===r&&s===n;a.set(n,r),a.set(r,n);const l=e(n,r,i);return a.delete(n),a.delete(r),l}}function _3e(e){return e!=null?e[Symbol.toStringTag]:void 0}function NB(e){return b3e(e).concat(w3e(e))}const N3e=Object.hasOwn||((e,t)=>S3e.call(e,t));function Op(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const k3e="__v",A3e="__o",P3e="_owner",{getOwnPropertyDescriptor:kB,keys:AB}=Object;function j3e(e,t){return e.byteLength===t.byteLength&&Uw(new Uint8Array(e),new Uint8Array(t))}function C3e(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function E3e(e,t){return e.byteLength===t.byteLength&&Uw(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function O3e(e,t){return Op(e.getTime(),t.getTime())}function T3e(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function M3e(e,t){return e===t}function PB(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const c=t.entries();let f=!1,h=0;for(;(s=c.next())&&!s.done;){if(i[h]){h++;continue}const g=o.value,m=s.value;if(n.equals(g[0],m[0],l,h,e,t,n)&&n.equals(g[1],m[1],g[0],m[0],e,t,n)){f=i[h]=!0;break}h++}if(!f)return!1;l++}return!0}const L3e=Op;function R3e(e,t,n){const r=AB(e);let i=r.length;if(AB(t).length!==i)return!1;for(;i-- >0;)if(!dX(e,t,n,r[i]))return!1;return!0}function uv(e,t,n){const r=NB(e);let i=r.length;if(NB(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!dX(e,t,n,a)||(o=kB(e,a),s=kB(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function I3e(e,t){return Op(e.valueOf(),t.valueOf())}function D3e(e,t){return e.source===t.source&&e.flags===t.flags}function jB(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let c=!1,f=0;for(;(s=l.next())&&!s.done;){if(!i[f]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){c=i[f]=!0;break}f++}if(!c)return!1}return!0}function Uw(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function F3e(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 dX(e,t,n,r){return(r===P3e||r===A3e||r===k3e)&&(e.$$typeof||t.$$typeof)?!0:N3e(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const B3e="[object ArrayBuffer]",$3e="[object Arguments]",q3e="[object Boolean]",U3e="[object DataView]",z3e="[object Date]",V3e="[object Error]",W3e="[object Map]",H3e="[object Number]",Y3e="[object Object]",G3e="[object RegExp]",K3e="[object Set]",X3e="[object String]",Q3e={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},J3e="[object URL]",Z3e=Object.prototype.toString;function eCe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:f,areSetsEqual:h,areTypedArraysEqual:g,areUrlsEqual:m,unknownTagComparators:b}){return function(x,w,_){if(x===w)return!0;if(x==null||w==null)return!1;const k=typeof x;if(k!==typeof w)return!1;if(k!=="object")return k==="number"?s(x,w,_):k==="function"?a(x,w,_):!1;const P=x.constructor;if(P!==w.constructor)return!1;if(P===Object)return l(x,w,_);if(Array.isArray(x))return t(x,w,_);if(P===Date)return r(x,w,_);if(P===RegExp)return f(x,w,_);if(P===Map)return o(x,w,_);if(P===Set)return h(x,w,_);const C=Z3e.call(x);if(C===z3e)return r(x,w,_);if(C===G3e)return f(x,w,_);if(C===W3e)return o(x,w,_);if(C===K3e)return h(x,w,_);if(C===Y3e)return typeof x.then!="function"&&typeof w.then!="function"&&l(x,w,_);if(C===J3e)return m(x,w,_);if(C===V3e)return i(x,w,_);if(C===$3e)return l(x,w,_);if(Q3e[C])return g(x,w,_);if(C===B3e)return e(x,w,_);if(C===U3e)return n(x,w,_);if(C===q3e||C===H3e||C===X3e)return c(x,w,_);if(b){let j=b[C];if(!j){const L=_3e(x);L&&(j=b[L])}if(j)return j(x,w,_)}return!1}}function tCe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:j3e,areArraysEqual:n?uv:C3e,areDataViewsEqual:E3e,areDatesEqual:O3e,areErrorsEqual:T3e,areFunctionsEqual:M3e,areMapsEqual:n?tP(PB,uv):PB,areNumbersEqual:L3e,areObjectsEqual:n?uv:R3e,arePrimitiveWrappersEqual:I3e,areRegExpsEqual:D3e,areSetsEqual:n?tP(jB,uv):jB,areTypedArraysEqual:n?tP(Uw,uv):Uw,areUrlsEqual:F3e,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=zx(r.areArraysEqual),a=zx(r.areMapsEqual),o=zx(r.areObjectsEqual),s=zx(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return r}function nCe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function rCe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,l){const{cache:c=e?new WeakMap:void 0,meta:f}=n();return t(s,l,{cache:c,equals:r,meta:f,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const iCe=Ud();Ud({strict:!0});Ud({circular:!0});Ud({circular:!0,strict:!0});Ud({createInternalComparator:()=>Op});Ud({strict:!0,createInternalComparator:()=>Op});Ud({circular:!0,createInternalComparator:()=>Op});Ud({circular:!0,createInternalComparator:()=>Op,strict:!0});function Ud(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=tCe(e),o=eCe(a),s=n?n(o):nCe(o);return rCe({circular:t,comparator:o,createState:r,equals:s,strict:i})}function aCe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function CB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):aCe(i)};requestAnimationFrame(r)}function hC(e){"@babel/helpers - typeof";return hC=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},hC(e)}function oCe(e){return uCe(e)||cCe(e)||lCe(e)||sCe()}function sCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lCe(e,t){if(e){if(typeof e=="string")return EB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EB(e,t)}}function EB(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uCe(e){if(Array.isArray(e))return e}function fCe(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,s=oCe(o),l=s[0],c=s.slice(1);if(typeof l=="number"){CB(i.bind(null,c),l);return}i(l),CB(i.bind(null,c));return}hC(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function L0(e){"@babel/helpers - typeof";return L0=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},L0(e)}function OB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OB(Object(n),!0).forEach(function(r){hX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hX(e,t,n){return t=dCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dCe(e){var t=hCe(e,"string");return L0(t)==="symbol"?t:String(t)}function hCe(e,t){if(L0(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(L0(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pCe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},mCe=function(t){return t},gCe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},$v=function(t,n){return Object.keys(n).reduce(function(r,i){return TB(TB({},r),{},hX({},i,t(i,n[i])))},{})},MB=function(t,n,r){return t.map(function(i){return"".concat(gCe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function yCe(e,t){return bCe(e)||xCe(e,t)||pX(e,t)||vCe()}function vCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xCe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function bCe(e){if(Array.isArray(e))return e}function wCe(e){return NCe(e)||_Ce(e)||pX(e)||SCe()}function SCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pX(e,t){if(e){if(typeof e=="string")return pC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pC(e,t)}}function _Ce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NCe(e){if(Array.isArray(e))return pC(e)}function pC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zw=1e-4,mX=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},gX=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},LB=function(t,n){return function(r){var i=mX(t,n);return gX(i,r)}},kCe=function(t,n){return function(r){var i=mX(t,n),a=[].concat(wCe(i.map(function(o,s){return o*s}).slice(1)),[0]);return gX(a,r)}},RB=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(x){return parseFloat(x)}),f=yCe(c,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var h=LB(i,o),g=LB(a,s),m=kCe(i,o),b=function(w){return w>1?1:w<0?0:w},y=function(w){for(var _=w>1?1:w,k=_,P=0;P<8;++P){var C=h(k)-_,j=m(k);if(Math.abs(C-_)<zw||j<zw)return g(k);k=b(k-C/j)}return g(k)};return y.isStepper=!1,y},ACe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,h,g){var m=-(f-h)*r,b=g*a,y=g+(m-b)*s/1e3,x=g*s/1e3+f;return Math.abs(x-h)<zw&&Math.abs(y)<zw?[h,0]:[x,y]};return l.isStepper=!0,l.dt=s,l},PCe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return RB(i);case"spring":return ACe();default:if(i.split("(")[0]==="cubic-bezier")return RB(i)}return typeof i=="function"?i:null};function R0(e){"@babel/helpers - typeof";return R0=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},R0(e)}function IB(e){return ECe(e)||CCe(e)||yX(e)||jCe()}function jCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ECe(e){if(Array.isArray(e))return gC(e)}function DB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DB(Object(n),!0).forEach(function(r){mC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mC(e,t,n){return t=OCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OCe(e){var t=TCe(e,"string");return R0(t)==="symbol"?t:String(t)}function TCe(e,t){if(R0(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(R0(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MCe(e,t){return ICe(e)||RCe(e,t)||yX(e,t)||LCe()}function LCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yX(e,t){if(e){if(typeof e=="string")return gC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gC(e,t)}}function gC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RCe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function ICe(e){if(Array.isArray(e))return e}var Vw=function(t,n,r){return t+(n-t)*r},yC=function(t){var n=t.from,r=t.to;return n!==r},DCe=function e(t,n,r){var i=$v(function(a,o){if(yC(o)){var s=t(o.from,o.to,o.velocity),l=MCe(s,2),c=l[0],f=l[1];return ma(ma({},o),{},{from:c,velocity:f})}return o},n);return r<1?$v(function(a,o){return yC(o)?ma(ma({},o),{},{velocity:Vw(o.velocity,i[a].velocity,r),from:Vw(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const FCe=(function(e,t,n,r,i){var a=pCe(e,t),o=a.reduce(function(x,w){return ma(ma({},x),{},mC({},w,[e[w],t[w]]))},{}),s=a.reduce(function(x,w){return ma(ma({},x),{},mC({},w,{from:e[w],velocity:0,to:t[w]}))},{}),l=-1,c,f,h=function(){return null},g=function(){return $v(function(w,_){return _.from},s)},m=function(){return!Object.values(s).filter(yC).length},b=function(w){c||(c=w);var _=w-c,k=_/n.dt;s=DCe(n,s,k),i(ma(ma(ma({},e),t),g())),c=w,m()||(l=requestAnimationFrame(h))},y=function(w){f||(f=w);var _=(w-f)/r,k=$v(function(C,j){return Vw.apply(void 0,IB(j).concat([n(_)]))},o);if(i(ma(ma(ma({},e),t),k)),_<1)l=requestAnimationFrame(h);else{var P=$v(function(C,j){return Vw.apply(void 0,IB(j).concat([n(1)]))},o);i(ma(ma(ma({},e),t),P))}};return h=n.isStepper?b:y,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(l)}}});function Eg(e){"@babel/helpers - typeof";return Eg=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},Eg(e)}var BCe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function $Ce(e,t){if(e==null)return{};var n=qCe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function nP(e){return WCe(e)||VCe(e)||zCe(e)||UCe()}function UCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zCe(e,t){if(e){if(typeof e=="string")return vC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vC(e,t)}}function VCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WCe(e){if(Array.isArray(e))return vC(e)}function vC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FB(Object(n),!0).forEach(function(r){jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jv(e,t,n){return t=vX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YCe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vX(r.key),r)}}function GCe(e,t,n){return t&&YCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vX(e){var t=KCe(e,"string");return Eg(t)==="symbol"?t:String(t)}function KCe(e,t){if(Eg(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eg(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XCe(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&&xC(e,t)}function xC(e,t){return xC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xC(e,t)}function QCe(e){var t=JCe();return function(){var r=Ww(e),i;if(t){var a=Ww(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return bC(this,i)}}function bC(e,t){if(t&&(Eg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wC(e)}function wC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JCe(){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 Ww(e){return Ww=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ww(e)}var ef=(function(e){XCe(n,e);var t=QCe(n);function n(r,i){var a;HCe(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,c=o.from,f=o.to,h=o.steps,g=o.children,m=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(wC(a)),a.changeStyle=a.changeStyle.bind(wC(a)),!s||m<=0)return a.state={style:{}},typeof g=="function"&&(a.state={style:f}),bC(a);if(h&&h.length)a.state={style:h[0].style};else if(c){if(typeof g=="function")return a.state={style:c},bC(a);a.state={style:l?jv({},l,c):c}}else a.state={style:{}};return a}return GCe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,c=a.shouldReAnimate,f=a.to,h=a.from,g=this.state.style;if(s){if(!o){var m={style:l?jv({},l,f):f};this.state&&g&&(l&&g[l]!==f||!l&&g!==f)&&this.setState(m);return}if(!(iCe(i.to,f)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=b||c?h:i.to;if(this.state&&g){var x={style:l?jv({},l,y):y};(l&&g[l]!==y||!l&&g!==y)&&this.setState(x)}this.runAnimation(yl(yl({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,c=i.easing,f=i.begin,h=i.onAnimationEnd,g=i.onAnimationStart,m=FCe(o,s,PCe(c),l,this.changeStyle),b=function(){a.stopJSAnimation=m()};this.manager.start([g,f,b,l,h])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,c=o[0],f=c.style,h=c.duration,g=h===void 0?0:h,m=function(y,x,w){if(w===0)return y;var _=x.duration,k=x.easing,P=k===void 0?"ease":k,C=x.style,j=x.properties,L=x.onAnimationEnd,R=w>0?o[w-1]:x,D=j||Object.keys(C);if(typeof P=="function"||P==="spring")return[].concat(nP(y),[a.runJSAnimation.bind(a,{from:R.style,to:C,duration:_,easing:P}),_]);var H=MB(D,_,P),M=yl(yl(yl({},R.style),C),{},{transition:H});return[].concat(nP(y),[M,_,L]).filter(mCe)};return this.manager.start([l].concat(nP(o.reduce(m,[f,Math.max(g,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=fCe());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,c=i.easing,f=i.onAnimationStart,h=i.onAnimationEnd,g=i.steps,m=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var y=s?jv({},s,l):l,x=MB(Object.keys(y),o,c);b.start([f,a,yl(yl({},y),{},{transition:x}),o,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=$Ce(i,BCe),c=E.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||c===0||o<=0)return a;var h=function(m){var b=m.props,y=b.style,x=y===void 0?{}:y,w=b.className,_=E.cloneElement(m,yl(yl({},l),{},{style:yl(yl({},x),f),className:w}));return _};return c===1?h(E.Children.only(a)):_e.createElement("div",null,E.Children.map(a,function(g){return h(g)}))}}]),n})(E.PureComponent);ef.displayName="Animate";ef.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ef.propTypes={from:er.oneOfType([er.object,er.string]),to:er.oneOfType([er.object,er.string]),attributeName:er.string,duration:er.number,begin:er.number,easing:er.oneOfType([er.string,er.func]),steps:er.arrayOf(er.shape({duration:er.number.isRequired,style:er.object.isRequired,easing:er.oneOfType([er.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),er.func]),properties:er.arrayOf("string"),onAnimationEnd:er.func})),children:er.oneOfType([er.node,er.func]),isActive:er.bool,canBegin:er.bool,onAnimationEnd:er.func,shouldReAnimate:er.bool,onAnimationStart:er.func,onAnimationReStart:er.func};function I0(e){"@babel/helpers - typeof";return I0=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},I0(e)}function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hw.apply(this,arguments)}function ZCe(e,t){return rEe(e)||nEe(e,t)||tEe(e,t)||eEe()}function eEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tEe(e,t){if(e){if(typeof e=="string")return BB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BB(e,t)}}function BB(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function rEe(e){if(Array.isArray(e))return e}function $B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$B(Object(n),!0).forEach(function(r){iEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$B(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iEe(e,t,n){return t=aEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aEe(e){var t=oEe(e,"string");return I0(t)=="symbol"?t:t+""}function oEe(e,t){if(I0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(I0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UB=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),s=i>=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,f;if(o>0&&a instanceof Array){for(var h=[0,0,0,0],g=0,m=4;g<m;g++)h[g]=a[g]>o?o:a[g];f="M".concat(t,",").concat(n+s*h[0]),h[0]>0&&(f+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(c,",").concat(t+l*h[0],",").concat(n)),f+="L ".concat(t+r-l*h[1],",").concat(n),h[1]>0&&(f+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(c,`,
`).concat(t+r,",").concat(n+s*h[1])),f+="L ".concat(t+r,",").concat(n+i-s*h[2]),h[2]>0&&(f+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(c,`,
`).concat(t+r-l*h[2],",").concat(n+i)),f+="L ".concat(t+l*h[3],",").concat(n+i),h[3]>0&&(f+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(c,`,
`).concat(t,",").concat(n+i-s*h[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);f="M ".concat(t,",").concat(n+s*b,`
A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+l*b,",").concat(n,`
L `).concat(t+r-l*b,",").concat(n,`
A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+r,",").concat(n+s*b,`
L `).concat(t+r,",").concat(n+i-s*b,`
A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+r-l*b,",").concat(n+i,`
L `).concat(t+l*b,",").concat(n+i,`
A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t,",").concat(n+i-s*b," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},sEe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(a,a+s),f=Math.max(a,a+s),h=Math.min(o,o+l),g=Math.max(o,o+l);return r>=c&&r<=f&&i>=h&&i<=g}return!1},lEe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tT=function(t){var n=qB(qB({},lEe),t),r=E.useRef(),i=E.useState(-1),a=ZCe(i,2),o=a[0],s=a[1];E.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,c=n.y,f=n.width,h=n.height,g=n.radius,m=n.className,b=n.animationEasing,y=n.animationDuration,x=n.animationBegin,w=n.isAnimationActive,_=n.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||h!==+h||f===0||h===0)return null;var k=Tn("recharts-rectangle",m);return _?_e.createElement(ef,{canBegin:o>0,from:{width:f,height:h,x:l,y:c},to:{width:f,height:h,x:l,y:c},duration:y,animationEasing:b,isActive:_},function(P){var C=P.width,j=P.height,L=P.x,R=P.y;return _e.createElement(ef,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:y,isActive:w,easing:b},_e.createElement("path",Hw({},kn(n,!0),{className:k,d:UB(L,R,C,j,g),ref:r})))}):_e.createElement("path",Hw({},kn(n,!0),{className:k,d:UB(l,c,f,h,g)}))};function SC(){return SC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SC.apply(this,arguments)}var nT=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=Tn("recharts-dot",a);return n===+n&&r===+r&&i===+i?E.createElement("circle",SC({},kn(t,!1),dw(t),{className:o,cx:n,cy:r,r:i})):null};function D0(e){"@babel/helpers - typeof";return D0=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},D0(e)}var cEe=["x","y","top","left","width","height","className"];function _C(){return _C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_C.apply(this,arguments)}function zB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uEe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zB(Object(n),!0).forEach(function(r){fEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fEe(e,t,n){return t=dEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dEe(e){var t=hEe(e,"string");return D0(t)=="symbol"?t:t+""}function hEe(e,t){if(D0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(D0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pEe(e,t){if(e==null)return{};var n=mEe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mEe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var gEe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},yEe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,c=l===void 0?0:l,f=t.width,h=f===void 0?0:f,g=t.height,m=g===void 0?0:g,b=t.className,y=pEe(t,cEe),x=uEe({x:r,y:a,top:s,left:c,width:h,height:m},y);return!it(r)||!it(a)||!it(h)||!it(m)||!it(s)||!it(c)?null:_e.createElement("path",_C({},kn(x,!0),{className:Tn("recharts-cross",b),d:gEe(r,a,h,m,s,c)}))},rP,VB;function vEe(){if(VB)return rP;VB=1;var e=BG(),t=e(Object.getPrototypeOf,Object);return rP=t,rP}var iP,WB;function xEe(){if(WB)return iP;WB=1;var e=af(),t=vEe(),n=of(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,l=o.call(Object);function c(f){if(!n(f)||e(f)!=r)return!1;var h=t(f);if(h===null)return!0;var g=s.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&o.call(g)==l}return iP=c,iP}var bEe=xEe();const wEe=Kn(bEe);var aP,HB;function SEe(){if(HB)return aP;HB=1;var e=af(),t=of(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return aP=r,aP}var _Ee=SEe();const NEe=Kn(_Ee);function F0(e){"@babel/helpers - typeof";return F0=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},F0(e)}function Yw(){return Yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yw.apply(this,arguments)}function kEe(e,t){return CEe(e)||jEe(e,t)||PEe(e,t)||AEe()}function AEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PEe(e,t){if(e){if(typeof e=="string")return YB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YB(e,t)}}function YB(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function CEe(e){if(Array.isArray(e))return e}function GB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function KB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GB(Object(n),!0).forEach(function(r){EEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EEe(e,t,n){return t=OEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OEe(e){var t=TEe(e,"string");return F0(t)=="symbol"?t:t+""}function TEe(e,t){if(F0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(F0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XB=function(t,n,r,i,a){var o=r-i,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-o/2,",").concat(n+a),s+="L ".concat(t+r-o/2-i,",").concat(n+a),s+="L ".concat(t,",").concat(n," Z"),s},MEe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},LEe=function(t){var n=KB(KB({},MEe),t),r=E.useRef(),i=E.useState(-1),a=kEe(i,2),o=a[0],s=a[1];E.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var k=r.current.getTotalLength();k&&s(k)}catch{}},[]);var l=n.x,c=n.y,f=n.upperWidth,h=n.lowerWidth,g=n.height,m=n.className,b=n.animationEasing,y=n.animationDuration,x=n.animationBegin,w=n.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||h!==+h||g!==+g||f===0&&h===0||g===0)return null;var _=Tn("recharts-trapezoid",m);return w?_e.createElement(ef,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:g,x:l,y:c},to:{upperWidth:f,lowerWidth:h,height:g,x:l,y:c},duration:y,animationEasing:b,isActive:w},function(k){var P=k.upperWidth,C=k.lowerWidth,j=k.height,L=k.x,R=k.y;return _e.createElement(ef,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:y,easing:b},_e.createElement("path",Yw({},kn(n,!0),{className:_,d:XB(L,R,P,C,j),ref:r})))}):_e.createElement("g",null,_e.createElement("path",Yw({},kn(n,!0),{className:_,d:XB(l,c,f,h,g)})))},REe=["option","shapeType","propTransformer","activeClassName","isActive"];function B0(e){"@babel/helpers - typeof";return B0=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},B0(e)}function IEe(e,t){if(e==null)return{};var n=DEe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DEe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function QB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QB(Object(n),!0).forEach(function(r){FEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FEe(e,t,n){return t=BEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BEe(e){var t=$Ee(e,"string");return B0(t)=="symbol"?t:t+""}function $Ee(e,t){if(B0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(B0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qEe(e,t){return Gw(Gw({},t),e)}function UEe(e,t){return e==="symbols"}function JB(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return _e.createElement(tT,n);case"trapezoid":return _e.createElement(LEe,n);case"sector":return _e.createElement(fX,n);case"symbols":if(UEe(t))return _e.createElement(b4,n);break;default:return null}}function zEe(e){return E.isValidElement(e)?e.props:e}function VEe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?qEe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=IEe(e,REe),c;if(E.isValidElement(t))c=E.cloneElement(t,Gw(Gw({},l),zEe(t)));else if(fn(t))c=t(l);else if(wEe(t)&&!NEe(t)){var f=i(t,l);c=_e.createElement(JB,{shapeType:n,elementProps:f})}else{var h=l;c=_e.createElement(JB,{shapeType:n,elementProps:h})}return s?_e.createElement(Ur,{className:o},c):c}function P5(e,t){return t!=null&&"trapezoids"in e.props}function j5(e,t){return t!=null&&"sectors"in e.props}function $0(e,t){return t!=null&&"points"in e.props}function WEe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function HEe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function YEe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function GEe(e,t){var n;return P5(e,t)?n=WEe:j5(e,t)?n=HEe:$0(e,t)&&(n=YEe),n}function KEe(e,t){var n;return P5(e,t)?n="trapezoids":j5(e,t)?n="sectors":$0(e,t)&&(n="points"),n}function XEe(e,t){if(P5(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}if(j5(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}return $0(e,t)?t.payload:{}}function QEe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=KEe(n,t),a=XEe(n,t),o=r.filter(function(l,c){var f=_0(a,l),h=n.props[i].filter(function(b){var y=GEe(n,t);return y(b,t)}),g=n.props[i].indexOf(h[h.length-1]),m=c===g;return f&&m}),s=r.indexOf(o[o.length-1]);return s}var oP,ZB;function JEe(){if(ZB)return oP;ZB=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var s=-1,l=t(e((i-r)/(a||1)),0),c=Array(l);l--;)c[o?l:++s]=r,r+=a;return c}return oP=n,oP}var sP,e$;function xX(){if(e$)return sP;e$=1;var e=tK(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return sP=r,sP}var lP,t$;function ZEe(){if(t$)return lP;t$=1;var e=JEe(),t=g5(),n=xX();function r(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),s=s===void 0?a<o?1:-1:n(s),e(a,o,s,i)}}return lP=r,lP}var cP,n$;function eOe(){if(n$)return cP;n$=1;var e=ZEe(),t=e();return cP=t,cP}var tOe=eOe();const Kw=Kn(tOe);function q0(e){"@babel/helpers - typeof";return q0=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},q0(e)}function r$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function i$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r$(Object(n),!0).forEach(function(r){bX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bX(e,t,n){return t=nOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nOe(e){var t=rOe(e,"string");return q0(t)=="symbol"?t:t+""}function rOe(e,t){if(q0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(q0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iOe=["Webkit","Moz","O","ms"],aOe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=iOe.reduce(function(a,o){return i$(i$({},a),{},bX({},o+r,n))},{});return i[t]=n,i};function Og(e){"@babel/helpers - typeof";return Og=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},Og(e)}function Xw(){return Xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xw.apply(this,arguments)}function a$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a$(Object(n),!0).forEach(function(r){ts(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SX(r.key),r)}}function sOe(e,t,n){return t&&o$(e.prototype,t),n&&o$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lOe(e,t,n){return t=Qw(t),cOe(e,wX()?Reflect.construct(t,n||[],Qw(e).constructor):t.apply(e,n))}function cOe(e,t){if(t&&(Og(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uOe(e)}function uOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wX=function(){return!!e})()}function Qw(e){return Qw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qw(e)}function fOe(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&&NC(e,t)}function NC(e,t){return NC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},NC(e,t)}function ts(e,t,n){return t=SX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SX(e){var t=dOe(e,"string");return Og(t)=="symbol"?t:t+""}function dOe(e,t){if(Og(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Og(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hOe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=Dv().domain(Kw(0,l)).range([a,a+o-s]),f=c.domain().map(function(h){return c(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(i),scale:c,scaleValues:f}},s$=function(t){return t.changedTouches&&!!t.changedTouches.length},Tg=(function(e){function t(n){var r;return oOe(this,t),r=lOe(this,t,[n]),ts(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),ts(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),ts(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),ts(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ts(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ts(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ts(r,"handleSlideDragStart",function(i){var a=s$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return fOe(t,e),sOe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,f=c.length-1,h=Math.min(i,a),g=Math.max(i,a),m=t.getIndexInRange(o,h),b=t.getIndexInRange(o,g);return{startIndex:m-m%l,endIndex:b===f?f:b-b%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=ds(a[r],s,r);return fn(o)?o(l,r):l}},{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(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,c=l.x,f=l.width,h=l.travellerWidth,g=l.startIndex,m=l.endIndex,b=l.onChange,y=r.pageX-a;y>0?y=Math.min(y,c+f-h-s,c+f-h-o):y<0&&(y=Math.max(y,c-o,c-s));var x=this.getIndex({startX:o+y,endX:s+y});(x.startIndex!==g||x.endIndex!==m)&&b&&b(x),this.setState({startX:o+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=s$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[o],f=this.props,h=f.x,g=f.width,m=f.travellerWidth,b=f.onChange,y=f.gap,x=f.data,w={startX:this.state.startX,endX:this.state.endX},_=r.pageX-a;_>0?_=Math.min(_,h+g-m-c):_<0&&(_=Math.max(_,h-c)),w[o]=c+_;var k=this.getIndex(w),P=k.startIndex,C=k.endIndex,j=function(){var R=x.length-1;return o==="startX"&&(s>l?P%y===0:C%y===0)||s<l&&C===R||o==="endX"&&(s>l?C%y===0:P%y===0)||s>l&&C===R};this.setState(ts(ts({},o,c+_),"brushMoveStartX",r.pageX),function(){b&&j()&&b(k)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,f=this.state[i],h=s.indexOf(f);if(h!==-1){var g=h+r;if(!(g===-1||g>=s.length)){var m=s[g];i==="startX"&&m>=c||i==="endX"&&m<=l||this.setState(ts({},i,m),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,c=r.stroke;return _e.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,c=r.children,f=r.padding,h=E.Children.only(c);return h?_e.cloneElement(h,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,l=this.props,c=l.y,f=l.travellerWidth,h=l.height,g=l.traveller,m=l.ariaLabel,b=l.data,y=l.startIndex,x=l.endIndex,w=Math.max(r,this.props.x),_=uP(uP({},kn(this.props,!1)),{},{x:w,y:c,width:f,height:h}),k=m||"Min value: ".concat((a=b[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[x])===null||o===void 0?void 0:o.name);return _e.createElement(Ur,{tabIndex:0,role:"slider","aria-label":k,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(C){["ArrowLeft","ArrowRight"].includes(C.key)&&(C.preventDefault(),C.stopPropagation(),s.handleTravellerMoveKeyboard(C.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,_))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,c=a.travellerWidth,f=Math.min(r,i)+c,h=Math.max(Math.abs(i-r)-c,0);return _e.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:h,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,f=this.state,h=f.startX,g=f.endX,m=5,b={pointerEvents:"none",fill:c};return _e.createElement(Ur,{className:"recharts-brush-texts"},_e.createElement(Nw,Xw({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-m,y:o+s/2},b),this.getTextOfTick(i)),_e.createElement(Nw,Xw({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,g)+l+m,y:o+s/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,c=r.width,f=r.height,h=r.alwaysShowText,g=this.state,m=g.startX,b=g.endX,y=g.isTextActive,x=g.isSlideMoving,w=g.isTravellerMoving,_=g.isTravellerFocused;if(!i||!i.length||!it(s)||!it(l)||!it(c)||!it(f)||c<=0||f<=0)return null;var k=Tn("recharts-brush",a),P=_e.Children.count(o)===1,C=aOe("userSelect","none");return _e.createElement(Ur,{className:k,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:C},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(m,b),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(b,"endX"),(y||x||w||_||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,c=Math.floor(a+s/2)-1;return _e.createElement(_e.Fragment,null,_e.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),_e.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),_e.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return _e.isValidElement(r)?a=_e.cloneElement(r,i):fn(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,f=r.startIndex,h=r.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return uP({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?hOe({data:a,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var g=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}])})(E.PureComponent);ts(Tg,"displayName","Brush");ts(Tg,"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 fP,l$;function pOe(){if(l$)return fP;l$=1;var e=P4();function t(n,r){var i;return e(n,function(a,o,s){return i=r(a,o,s),!i}),!!i}return fP=t,fP}var dP,c$;function mOe(){if(c$)return dP;c$=1;var e=TG(),t=Bd(),n=pOe(),r=Ro(),i=g5();function a(o,s,l){var c=r(o)?e:n;return l&&i(o,s,l)&&(s=void 0),c(o,t(s,3))}return dP=a,dP}var gOe=mOe();const yOe=Kn(gOe);var Pc=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},hP,u$;function vOe(){if(u$)return hP;u$=1;var e=XG();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return hP=t,hP}var pP,f$;function xOe(){if(f$)return pP;f$=1;var e=vOe(),t=GG(),n=Bd();function r(i,a){var o={};return a=n(a,3),t(i,function(s,l,c){e(o,l,a(s,l,c))}),o}return pP=r,pP}var bOe=xOe();const wOe=Kn(bOe);var mP,d$;function SOe(){if(d$)return mP;d$=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return mP=e,mP}var gP,h$;function _Oe(){if(h$)return gP;h$=1;var e=P4();function t(n,r){var i=!0;return e(n,function(a,o,s){return i=!!r(a,o,s),i}),i}return gP=t,gP}var yP,p$;function NOe(){if(p$)return yP;p$=1;var e=SOe(),t=_Oe(),n=Bd(),r=Ro(),i=g5();function a(o,s,l){var c=r(o)?e:t;return l&&i(o,s,l)&&(s=void 0),c(o,n(s,3))}return yP=a,yP}var kOe=NOe();const _X=Kn(kOe);var AOe=["x","y"];function U0(e){"@babel/helpers - typeof";return U0=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},U0(e)}function kC(){return kC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kC.apply(this,arguments)}function m$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m$(Object(n),!0).forEach(function(r){POe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function POe(e,t,n){return t=jOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jOe(e){var t=COe(e,"string");return U0(t)=="symbol"?t:t+""}function COe(e,t){if(U0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(U0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EOe(e,t){if(e==null)return{};var n=OOe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function TOe(e,t){var n=e.x,r=e.y,i=EOe(e,AOe),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),f=parseInt(c,10),h="".concat(t.width||i.width),g=parseInt(h,10);return fv(fv(fv(fv(fv({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:g,name:t.name,radius:t.radius})}function g$(e){return _e.createElement(VEe,kC({shapeType:"rectangle",propTransformer:TOe,activeClassName:"recharts-active-bar"},e))}var MOe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=it(r)||Rwe(r);return a?t(r,i):(a||gp(),n)}},LOe=["value","background"],NX;function Mg(e){"@babel/helpers - typeof";return Mg=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},Mg(e)}function ROe(e,t){if(e==null)return{};var n=IOe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Jw(){return Jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jw.apply(this,arguments)}function y$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y$(Object(n),!0).forEach(function(r){pd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,AX(r.key),r)}}function FOe(e,t,n){return t&&v$(e.prototype,t),n&&v$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BOe(e,t,n){return t=Zw(t),$Oe(e,kX()?Reflect.construct(t,n||[],Zw(e).constructor):t.apply(e,n))}function $Oe(e,t){if(t&&(Mg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qOe(e)}function qOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kX=function(){return!!e})()}function Zw(e){return Zw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zw(e)}function UOe(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&&AC(e,t)}function AC(e,t){return AC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AC(e,t)}function pd(e,t,n){return t=AX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AX(e){var t=zOe(e,"string");return Mg(t)=="symbol"?t:t+""}function zOe(e,t){if(Mg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var P1=(function(e){function t(){var n;DOe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=BOe(this,t,[].concat(i)),pd(n,"state",{isAnimationFinished:!1}),pd(n,"id",w1("recharts-bar-")),pd(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),pd(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return UOe(t,e),FOe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,c=a.activeBar,f=kn(this.props,!1);return r&&r.map(function(h,g){var m=g===l,b=m?c:o,y=Pi(Pi(Pi({},f),h),{},{isActive:m,option:b,index:g,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return _e.createElement(Ur,Jw({className:"recharts-bar-rectangle"},hw(i.props,h,g),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(g)}),_e.createElement(g$,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,f=i.animationEasing,h=i.animationId,g=this.state.prevData;return _e.createElement(ef,{begin:l,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var b=m.t,y=a.map(function(x,w){var _=g&&g[w];if(_){var k=Us(_.x,x.x),P=Us(_.y,x.y),C=Us(_.width,x.width),j=Us(_.height,x.height);return Pi(Pi({},x),{},{x:k(b),y:P(b),width:C(b),height:j(b)})}if(o==="horizontal"){var L=Us(0,x.height),R=L(b);return Pi(Pi({},x),{},{y:x.y+x.height-R,height:R})}var D=Us(0,x.width),H=D(b);return Pi(Pi({},x),{},{width:H})});return _e.createElement(Ur,null,r.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!_0(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=kn(this.props.background,!1);return a.map(function(c,f){c.value;var h=c.background,g=ROe(c,LOe);if(!h)return null;var m=Pi(Pi(Pi(Pi(Pi({},g),{},{fill:"#eee"},h),l),hw(r.props,c,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return _e.createElement(g$,Jw({key:"background-bar-".concat(f),option:r.props.background,isActive:f===s},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,c=a.layout,f=a.children,h=jl(f,A5);if(!h)return null;var g=c==="vertical"?o[0].height/2:o[0].width/2,m=function(x,w){var _=Array.isArray(x.value)?x.value[1]:x.value;return{x:x.x,y:x.y,value:_,errorVal:ds(x,w)}},b={clipPath:r?"url(#clipPath-".concat(i,")"):null};return _e.createElement(Ur,b,h.map(function(y){return _e.cloneElement(y,{key:"error-bar-".concat(i,"-").concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:g,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.xAxis,l=r.yAxis,c=r.left,f=r.top,h=r.width,g=r.height,m=r.isAnimationActive,b=r.background,y=r.id;if(i||!a||!a.length)return null;var x=this.state.isAnimationFinished,w=Tn("recharts-bar",o),_=s&&s.allowDataOverflow,k=l&&l.allowDataOverflow,P=_||k,C=jn(y)?this.id:y;return _e.createElement(Ur,{className:w},_||k?_e.createElement("defs",null,_e.createElement("clipPath",{id:"clipPath-".concat(C)},_e.createElement("rect",{x:_?c:c-h/2,y:k?f:f-g/2,width:_?h:h*2,height:k?g:g*2}))):null,_e.createElement(Ur,{className:"recharts-bar-rectangles",clipPath:P?"url(#clipPath-".concat(C,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(P,C),(!m||x)&&Sd.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(E.PureComponent);NX=P1;pd(P1,"displayName","Bar");pd(P1,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ly.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});pd(P1,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,f=e.dataStartIndex,h=e.displayedData,g=e.offset,m=tje(r,n);if(!m)return null;var b=t.layout,y=n.type.defaultProps,x=y!==void 0?Pi(Pi({},y),n.props):n.props,w=x.dataKey,_=x.children,k=x.minPointSize,P=b==="horizontal"?o:a,C=c?P.scale.domain():null,j=cje({numericAxis:P}),L=jl(_,rK),R=h.map(function(D,H){var M,F,W,V,X,Y;c?M=nje(c[f+H],C):(M=ds(D,w),Array.isArray(M)||(M=[j,M]));var Z=MOe(k,NX.defaultProps.minPointSize)(M[1],H);if(b==="horizontal"){var K,se=[o.scale(M[0]),o.scale(M[1])],z=se[0],te=se[1];F=iB({axis:a,ticks:s,bandSize:i,offset:m.offset,entry:D,index:H}),W=(K=te??z)!==null&&K!==void 0?K:void 0,V=m.size;var $=z-te;if(X=Number.isNaN($)?0:$,Y={x:F,y:o.y,width:V,height:o.height},Math.abs(Z)>0&&Math.abs(X)<Math.abs(Z)){var q=Pl(X||Z)*(Math.abs(Z)-Math.abs(X));W-=q,X+=q}}else{var re=[a.scale(M[0]),a.scale(M[1])],le=re[0],de=re[1];if(F=le,W=iB({axis:o,ticks:l,bandSize:i,offset:m.offset,entry:D,index:H}),V=de-le,X=m.size,Y={x:a.x,y:W,width:a.width,height:X},Math.abs(Z)>0&&Math.abs(V)<Math.abs(Z)){var pe=Pl(V||Z)*(Math.abs(Z)-Math.abs(V));V+=pe}}return Pi(Pi(Pi({},D),{},{x:F,y:W,width:V,height:X,value:c?M:M[1],payload:D,background:Y},L&&L[H]&&L[H].props),{},{tooltipPayload:[lX(n,D)],tooltipPosition:{x:F+V/2,y:W+X/2}})});return Pi({data:R,layout:b},g)});function z0(e){"@babel/helpers - typeof";return z0=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},z0(e)}function VOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PX(r.key),r)}}function WOe(e,t,n){return t&&x$(e.prototype,t),n&&x$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b$(Object(n),!0).forEach(function(r){C5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C5(e,t,n){return t=PX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PX(e){var t=HOe(e,"string");return z0(t)=="symbol"?t:t+""}function HOe(e,t){if(z0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(z0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YOe=function(t,n,r,i,a){var o=t.width,s=t.height,l=t.layout,c=t.children,f=Object.keys(n),h={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},g=!!ns(c,P1);return f.reduce(function(m,b){var y=n[b],x=y.orientation,w=y.domain,_=y.padding,k=_===void 0?{}:_,P=y.mirror,C=y.reversed,j="".concat(x).concat(P?"Mirror":""),L,R,D,H,M;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var F=w[1]-w[0],W=1/0,V=y.categoricalDomain.sort(Fwe);if(V.forEach(function(re,le){le>0&&(W=Math.min((re||0)-(V[le-1]||0),W))}),Number.isFinite(W)){var X=W/F,Y=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(L=X*Y/2),y.padding==="no-gap"){var Z=pp(t.barCategoryGap,X*Y),K=X*Y/2;L=K-Z-(K-Z)/Y*Z}}}i==="xAxis"?R=[r.left+(k.left||0)+(L||0),r.left+r.width-(k.right||0)-(L||0)]:i==="yAxis"?R=l==="horizontal"?[r.top+r.height-(k.bottom||0),r.top+(k.top||0)]:[r.top+(k.top||0)+(L||0),r.top+r.height-(k.bottom||0)-(L||0)]:R=y.range,C&&(R=[R[1],R[0]]);var se=ZPe(y,a,g),z=se.scale,te=se.realScaleType;z.domain(w).range(R),eje(z);var $=lje(z,Nl(Nl({},y),{},{realScaleType:te}));i==="xAxis"?(M=x==="top"&&!P||x==="bottom"&&P,D=r.left,H=h[j]-M*y.height):i==="yAxis"&&(M=x==="left"&&!P||x==="right"&&P,D=h[j]-M*y.width,H=r.top);var q=Nl(Nl(Nl({},y),$),{},{realScaleType:te,x:D,y:H,scale:z,width:i==="xAxis"?r.width:y.width,height:i==="yAxis"?r.height:y.height});return q.bandSize=Bw(q,$),!y.hide&&i==="xAxis"?h[j]+=(M?-1:1)*q.height:y.hide||(h[j]+=(M?-1:1)*q.width),Nl(Nl({},m),{},C5({},b,q))},{})},jX=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},GOe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return jX({x:n,y:r},{x:i,y:a})},CX=(function(){function e(t){VOe(this,e),this.scale=t}return WOe(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(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();C5(CX,"EPS",1e-4);var rT=function(t){var n=Object.keys(t).reduce(function(r,i){return Nl(Nl({},r),{},C5({},i,CX.create(t[i])))},{});return Nl(Nl({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return wOe(i,function(l,c){return n[c].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return _X(i,function(a,o){return n[o].isInRange(a)})}})};function KOe(e){return(e%180+180)%180}var XOe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=KOe(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&o<Math.PI-s?r/Math.sin(o):n/Math.cos(o);return Math.abs(l)},vP,w$;function QOe(){if(w$)return vP;w$=1;var e=Bd(),t=S1(),n=p5();function r(i){return function(a,o,s){var l=Object(a);if(!t(a)){var c=e(o,3);a=n(a),o=function(h){return c(l[h],h,l)}}var f=i(a,o,s);return f>-1?l[c?a[f]:f]:void 0}}return vP=r,vP}var xP,S$;function JOe(){if(S$)return xP;S$=1;var e=xX();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return xP=t,xP}var bP,_$;function ZOe(){if(_$)return bP;_$=1;var e=zG(),t=Bd(),n=JOe(),r=Math.max;function i(a,o,s){var l=a==null?0:a.length;if(!l)return-1;var c=s==null?0:n(s);return c<0&&(c=r(l+c,0)),e(a,t(o,3),c)}return bP=i,bP}var wP,N$;function e4e(){if(N$)return wP;N$=1;var e=QOe(),t=ZOe(),n=e(t);return wP=n,wP}var t4e=e4e();const n4e=Kn(t4e);var r4e=aG();const i4e=Kn(r4e);var a4e=i4e(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("")}),iT=E.createContext(void 0),aT=E.createContext(void 0),EX=E.createContext(void 0),OX=E.createContext({}),TX=E.createContext(void 0),MX=E.createContext(0),LX=E.createContext(0),k$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,f=a4e(a);return _e.createElement(iT.Provider,{value:r},_e.createElement(aT.Provider,{value:i},_e.createElement(OX.Provider,{value:a},_e.createElement(EX.Provider,{value:f},_e.createElement(TX.Provider,{value:o},_e.createElement(MX.Provider,{value:c},_e.createElement(LX.Provider,{value:l},s)))))))},o4e=function(){return E.useContext(TX)},RX=function(t){var n=E.useContext(iT);n==null&&gp();var r=n[t];return r==null&&gp(),r},s4e=function(){var t=E.useContext(iT);return ed(t)},l4e=function(){var t=E.useContext(aT),n=n4e(t,function(r){return _X(r.domain,Number.isFinite)});return n||ed(t)},IX=function(t){var n=E.useContext(aT);n==null&&gp();var r=n[t];return r==null&&gp(),r},c4e=function(){var t=E.useContext(EX);return t},u4e=function(){return E.useContext(OX)},oT=function(){return E.useContext(LX)},sT=function(){return E.useContext(MX)};function Lg(e){"@babel/helpers - typeof";return Lg=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},Lg(e)}function f4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d4e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FX(r.key),r)}}function h4e(e,t,n){return t&&d4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function p4e(e,t,n){return t=e2(t),m4e(e,DX()?Reflect.construct(t,n||[],e2(e).constructor):t.apply(e,n))}function m4e(e,t){if(t&&(Lg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g4e(e)}function g4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DX=function(){return!!e})()}function e2(e){return e2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},e2(e)}function y4e(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)}function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function A$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function P$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(n),!0).forEach(function(r){lT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lT(e,t,n){return t=FX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FX(e){var t=v4e(e,"string");return Lg(t)=="symbol"?t:t+""}function v4e(e,t){if(Lg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function x4e(e,t){return _4e(e)||S4e(e,t)||w4e(e,t)||b4e()}function b4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w4e(e,t){if(e){if(typeof e=="string")return j$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j$(e,t)}}function j$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S4e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function _4e(e){if(Array.isArray(e))return e}function jC(){return jC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jC.apply(this,arguments)}var N4e=function(t,n){var r;return _e.isValidElement(t)?r=_e.cloneElement(t,n):fn(t)?r=t(n):r=_e.createElement("line",jC({},n,{className:"recharts-reference-line-line"})),r},k4e=function(t,n,r,i,a,o,s,l,c){var f=a.x,h=a.y,g=a.width,m=a.height;if(r){var b=c.y,y=t.y.apply(b,{position:o});if(Pc(c,"discard")&&!t.y.isInRange(y))return null;var x=[{x:f+g,y},{x:f,y}];return l==="left"?x.reverse():x}if(n){var w=c.x,_=t.x.apply(w,{position:o});if(Pc(c,"discard")&&!t.x.isInRange(_))return null;var k=[{x:_,y:h+m},{x:_,y:h}];return s==="top"?k.reverse():k}if(i){var P=c.segment,C=P.map(function(j){return t.apply(j,{position:o})});return Pc(c,"discard")&&yOe(C,function(j){return!t.isInRange(j)})?null:C}return null};function A4e(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,c=o4e(),f=RX(i),h=IX(a),g=c4e();if(!c||!g)return null;kc(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=rT({x:f.scale,y:h.scale}),b=Gi(t),y=Gi(n),x=r&&r.length===2,w=k4e(m,b,y,x,g,e.position,f.orientation,h.orientation,e);if(!w)return null;var _=x4e(w,2),k=_[0],P=k.x,C=k.y,j=_[1],L=j.x,R=j.y,D=Pc(e,"hidden")?"url(#".concat(c,")"):void 0,H=P$(P$({clipPath:D},kn(e,!0)),{},{x1:P,y1:C,x2:L,y2:R});return _e.createElement(Ur,{className:Tn("recharts-reference-line",s)},N4e(o,H),Fa.renderCallByParent(e,GOe({x1:P,y1:C,x2:L,y2:R})))}var cT=(function(e){function t(){return f4e(this,t),p4e(this,t,arguments)}return y4e(t,e),h4e(t,[{key:"render",value:function(){return _e.createElement(A4e,this.props)}}])})(_e.Component);lT(cT,"displayName","ReferenceLine");lT(cT,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function CC(){return CC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CC.apply(this,arguments)}function Rg(e){"@babel/helpers - typeof";return Rg=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},Rg(e)}function C$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C$(Object(n),!0).forEach(function(r){E5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j4e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$X(r.key),r)}}function C4e(e,t,n){return t&&j4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function E4e(e,t,n){return t=t2(t),O4e(e,BX()?Reflect.construct(t,n||[],t2(e).constructor):t.apply(e,n))}function O4e(e,t){if(t&&(Rg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T4e(e)}function T4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BX=function(){return!!e})()}function t2(e){return t2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},t2(e)}function M4e(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&&EC(e,t)}function EC(e,t){return EC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},EC(e,t)}function E5(e,t,n){return t=$X(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $X(e){var t=L4e(e,"string");return Rg(t)=="symbol"?t:t+""}function L4e(e,t){if(Rg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var R4e=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=rT({x:i.scale,y:a.scale}),s=o.apply({x:n,y:r},{bandAware:!0});return Pc(t,"discard")&&!o.isInRange(s)?null:s},O5=(function(e){function t(){return P4e(this,t),E4e(this,t,arguments)}return M4e(t,e),C4e(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,s=r.alwaysShow,l=r.clipPathId,c=Gi(i),f=Gi(a);if(kc(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!f)return null;var h=R4e(this.props);if(!h)return null;var g=h.x,m=h.y,b=this.props,y=b.shape,x=b.className,w=Pc(this.props,"hidden")?"url(#".concat(l,")"):void 0,_=E$(E$({clipPath:w},kn(this.props,!0)),{},{cx:g,cy:m});return _e.createElement(Ur,{className:Tn("recharts-reference-dot",x)},t.renderDot(y,_),Fa.renderCallByParent(this.props,{x:g-o,y:m-o,width:2*o,height:2*o}))}}])})(_e.Component);E5(O5,"displayName","ReferenceDot");E5(O5,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});E5(O5,"renderDot",function(e,t){var n;return _e.isValidElement(e)?n=_e.cloneElement(e,t):fn(e)?n=e(t):n=_e.createElement(nT,CC({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function OC(){return OC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OC.apply(this,arguments)}function Ig(e){"@babel/helpers - typeof";return Ig=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},Ig(e)}function O$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function T$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O$(Object(n),!0).forEach(function(r){T5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D4e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,UX(r.key),r)}}function F4e(e,t,n){return t&&D4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function B4e(e,t,n){return t=n2(t),$4e(e,qX()?Reflect.construct(t,n||[],n2(e).constructor):t.apply(e,n))}function $4e(e,t){if(t&&(Ig(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q4e(e)}function q4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qX=function(){return!!e})()}function n2(e){return n2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},n2(e)}function U4e(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&&TC(e,t)}function TC(e,t){return TC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},TC(e,t)}function T5(e,t,n){return t=UX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UX(e){var t=z4e(e,"string");return Ig(t)=="symbol"?t:t+""}function z4e(e,t){if(Ig(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ig(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var V4e=function(t,n,r,i,a){var o=a.x1,s=a.x2,l=a.y1,c=a.y2,f=a.xAxis,h=a.yAxis;if(!f||!h)return null;var g=rT({x:f.scale,y:h.scale}),m={x:t?g.x.apply(o,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(l,{position:"start"}):g.y.rangeMin},b={x:n?g.x.apply(s,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(c,{position:"end"}):g.y.rangeMax};return Pc(a,"discard")&&(!g.isInRange(m)||!g.isInRange(b))?null:jX(m,b)},M5=(function(e){function t(){return I4e(this,t),B4e(this,t,arguments)}return U4e(t,e),F4e(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,s=r.y2,l=r.className,c=r.alwaysShow,f=r.clipPathId;kc(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Gi(i),g=Gi(a),m=Gi(o),b=Gi(s),y=this.props.shape;if(!h&&!g&&!m&&!b&&!y)return null;var x=V4e(h,g,m,b,this.props);if(!x&&!y)return null;var w=Pc(this.props,"hidden")?"url(#".concat(f,")"):void 0;return _e.createElement(Ur,{className:Tn("recharts-reference-area",l)},t.renderRect(y,T$(T$({clipPath:w},kn(this.props,!0)),x)),Fa.renderCallByParent(this.props,x))}}])})(_e.Component);T5(M5,"displayName","ReferenceArea");T5(M5,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});T5(M5,"renderRect",function(e,t){var n;return _e.isValidElement(e)?n=_e.cloneElement(e,t):fn(e)?n=e(t):n=_e.createElement(tT,OC({},t,{className:"recharts-reference-area-rect"})),n});function zX(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function W4e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return XOe(r,n)}function H4e(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function r2(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function Y4e(e,t){return zX(e,t+1)}function G4e(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,c=1,f=o,h=function(){var b=r==null?void 0:r[l];if(b===void 0)return{v:zX(r,c)};var y=l,x,w=function(){return x===void 0&&(x=n(b,y)),x},_=b.coordinate,k=l===0||r2(e,_,w,f,s);k||(l=0,f=o,c+=1),k&&(f=_+e*(w()/2+i),l+=c)},g;c<=a.length;)if(g=h(),g)return g.v;return[]}function V0(e){"@babel/helpers - typeof";return V0=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},V0(e)}function M$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M$(Object(n),!0).forEach(function(r){K4e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K4e(e,t,n){return t=X4e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X4e(e){var t=Q4e(e,"string");return V0(t)=="symbol"?t:t+""}function Q4e(e,t){if(V0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(V0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J4e(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,l=t.end,c=function(g){var m=a[g],b,y=function(){return b===void 0&&(b=n(m,g)),b};if(g===o-1){var x=e*(m.coordinate+e*y()/2-l);a[g]=m=Da(Da({},m),{},{tickCoord:x>0?m.coordinate-x*e:m.coordinate})}else a[g]=m=Da(Da({},m),{},{tickCoord:m.coordinate});var w=r2(e,m.tickCoord,y,s,l);w&&(l=m.tickCoord-e*(y()/2+i),a[g]=Da(Da({},m),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return a}function Z4e(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,c=t.end;if(a){var f=r[s-1],h=n(f,s-1),g=e*(f.coordinate+e*h/2-c);o[s-1]=f=Da(Da({},f),{},{tickCoord:g>0?f.coordinate-g*e:f.coordinate});var m=r2(e,f.tickCoord,function(){return h},l,c);m&&(c=f.tickCoord-e*(h/2+i),o[s-1]=Da(Da({},f),{},{isShow:!0}))}for(var b=a?s-1:s,y=function(_){var k=o[_],P,C=function(){return P===void 0&&(P=n(k,_)),P};if(_===0){var j=e*(k.coordinate-e*C()/2-l);o[_]=k=Da(Da({},k),{},{tickCoord:j<0?k.coordinate-j*e:k.coordinate})}else o[_]=k=Da(Da({},k),{},{tickCoord:k.coordinate});var L=r2(e,k.tickCoord,C,l,c);L&&(l=k.tickCoord+e*(C()/2+i),o[_]=Da(Da({},k),{},{isShow:!0}))},x=0;x<b;x++)y(x);return o}function uT(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,f=e.unit,h=e.angle;if(!i||!i.length||!r)return[];if(it(l)||ly.isSsr)return Y4e(i,typeof l=="number"&&it(l)?l:0);var g=[],m=s==="top"||s==="bottom"?"width":"height",b=f&&m==="width"?Iv(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},y=function(k,P){var C=fn(c)?c(k.value,P):k.value;return m==="width"?W4e(Iv(C,{fontSize:t,letterSpacing:n}),b,h):Iv(C,{fontSize:t,letterSpacing:n})[m]},x=i.length>=2?Pl(i[1].coordinate-i[0].coordinate):1,w=H4e(a,x,m);return l==="equidistantPreserveStart"?G4e(x,w,y,i,o):(l==="preserveStart"||l==="preserveStartEnd"?g=Z4e(x,w,y,i,o,l==="preserveStartEnd"):g=J4e(x,w,y,i,o),g.filter(function(_){return _.isShow}))}var eTe=["viewBox"],tTe=["viewBox"],nTe=["ticks"];function Dg(e){"@babel/helpers - typeof";return Dg=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},Dg(e)}function Im(){return Im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Im.apply(this,arguments)}function L$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L$(Object(n),!0).forEach(function(r){fT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SP(e,t){if(e==null)return{};var n=rTe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WX(r.key),r)}}function aTe(e,t,n){return t&&R$(e.prototype,t),n&&R$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oTe(e,t,n){return t=i2(t),sTe(e,VX()?Reflect.construct(t,n||[],i2(e).constructor):t.apply(e,n))}function sTe(e,t){if(t&&(Dg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lTe(e)}function lTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VX=function(){return!!e})()}function i2(e){return i2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},i2(e)}function cTe(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&&MC(e,t)}function MC(e,t){return MC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},MC(e,t)}function fT(e,t,n){return t=WX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WX(e){var t=uTe(e,"string");return Dg(t)=="symbol"?t:t+""}function uTe(e,t){if(Dg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dy=(function(e){function t(n){var r;return iTe(this,t),r=oTe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return cTe(t,e),aTe(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=SP(r,eTe),s=this.props,l=s.viewBox,c=SP(s,tTe);return!Hm(a,l)||!Hm(o,c)||!Hm(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,c=i.orientation,f=i.tickSize,h=i.mirror,g=i.tickMargin,m,b,y,x,w,_,k=h?-1:1,P=r.tickSize||f,C=it(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":m=b=r.coordinate,x=o+ +!h*l,y=x-k*P,_=y-k*g,w=C;break;case"left":y=x=r.coordinate,b=a+ +!h*s,m=b-k*P,w=m-k*g,_=C;break;case"right":y=x=r.coordinate,b=a+ +h*s,m=b+k*P,w=m+k*g,_=C;break;default:m=b=r.coordinate,x=o+ +h*l,y=x+k*P,_=y+k*g,w=C;break}return{line:{x1:m,y1:y,x2:b,y2:x},tick:{x:w,y:_}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.orientation,c=r.mirror,f=r.axisLine,h=zi(zi(zi({},kn(this.props,!1)),kn(f,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var g=+(l==="top"&&!c||l==="bottom"&&c);h=zi(zi({},h),{},{x1:i,y1:a+g*s,x2:i+o,y2:a+g*s})}else{var m=+(l==="left"&&!c||l==="right"&&c);h=zi(zi({},h),{},{x1:i+m*o,y1:a,x2:i+m*o,y2:a+s})}return _e.createElement("line",Im({},h,{className:Tn("recharts-cartesian-axis-line",Ws(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,s=this.props,l=s.tickLine,c=s.stroke,f=s.tick,h=s.tickFormatter,g=s.unit,m=uT(zi(zi({},this.props),{},{ticks:r}),i,a),b=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),x=kn(this.props,!1),w=kn(f,!1),_=zi(zi({},x),{},{fill:"none"},kn(l,!1)),k=m.map(function(P,C){var j=o.getTickLineCoord(P),L=j.line,R=j.tick,D=zi(zi(zi(zi({textAnchor:b,verticalAnchor:y},x),{},{stroke:"none",fill:c},w),R),{},{index:C,payload:P,visibleTicksCount:m.length,tickFormatter:h});return _e.createElement(Ur,Im({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},hw(o.props,P,C)),l&&_e.createElement("line",Im({},_,L,{className:Tn("recharts-cartesian-axis-tick-line",Ws(l,"className"))})),f&&t.renderTickItem(f,D,"".concat(fn(h)?h(P.value,C):P.value).concat(g||"")))});return _e.createElement("g",{className:"recharts-cartesian-axis-ticks"},k)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,c=i.className,f=i.hide;if(f)return null;var h=this.props,g=h.ticks,m=SP(h,nTe),b=g;return fn(l)&&(b=g&&g.length>0?l(this.props):l(m)),o<=0||s<=0||!b||!b.length?null:_e.createElement(Ur,{className:Tn("recharts-cartesian-axis",c),ref:function(x){r.layerReference=x}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Fa.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,s=Tn(i.className,"recharts-cartesian-axis-tick-value");return _e.isValidElement(r)?o=_e.cloneElement(r,zi(zi({},i),{},{className:s})):fn(r)?o=r(zi(zi({},i),{},{className:s})):o=_e.createElement(Nw,Im({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(E.Component);fT(dy,"displayName","CartesianAxis");fT(dy,"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 fTe=["x1","y1","x2","y2","key"],dTe=["offset"];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 I$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I$(Object(n),!0).forEach(function(r){hTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hTe(e,t,n){return t=pTe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pTe(e){var t=mTe(e,"string");return yp(t)=="symbol"?t:t+""}function mTe(e,t){if(yp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bh(){return Bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bh.apply(this,arguments)}function D$(e,t){if(e==null)return{};var n=gTe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var yTe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return _e.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function HX(e,t){var n;if(_e.isValidElement(e))n=_e.cloneElement(e,t);else if(fn(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=D$(t,fTe),c=kn(l,!1);c.offset;var f=D$(c,dTe);n=_e.createElement("line",Bh({},f,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:s}))}return n}function vTe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=Ba(Ba({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return HX(i,c)});return _e.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function xTe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=Ba(Ba({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return HX(i,c)});return _e.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function bTe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var f=s.map(function(g){return Math.round(g+i-i)}).sort(function(g,m){return g-m});i!==f[0]&&f.unshift(0);var h=f.map(function(g,m){var b=!f[m+1],y=b?i+o-g:f[m+1]-g;if(y<=0)return null;var x=m%t.length;return _e.createElement("rect",{key:"react-".concat(m),y:g,x:r,height:y,width:a,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return _e.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function wTe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var f=c.map(function(g){return Math.round(g+a-a)}).sort(function(g,m){return g-m});a!==f[0]&&f.unshift(0);var h=f.map(function(g,m){var b=!f[m+1],y=b?a+s-g:f[m+1]-g;if(y<=0)return null;var x=m%r.length;return _e.createElement("rect",{key:"react-".concat(m),x:g,y:o,width:y,height:l,stroke:"none",fill:r[x],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return _e.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var STe=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return oX(uT(Ba(Ba(Ba({},dy.defaultProps),r),{},{ticks:Bu(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},_Te=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return oX(uT(Ba(Ba(Ba({},dy.defaultProps),r),{},{ticks:Bu(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},vm={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function YX(e){var t,n,r,i,a,o,s=oT(),l=sT(),c=u4e(),f=Ba(Ba({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:vm.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:vm.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:vm.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:vm.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:vm.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:vm.verticalFill,x:it(e.x)?e.x:c.left,y:it(e.y)?e.y:c.top,width:it(e.width)?e.width:c.width,height:it(e.height)?e.height:c.height}),h=f.x,g=f.y,m=f.width,b=f.height,y=f.syncWithTicks,x=f.horizontalValues,w=f.verticalValues,_=s4e(),k=l4e();if(!it(m)||m<=0||!it(b)||b<=0||!it(h)||h!==+h||!it(g)||g!==+g)return null;var P=f.verticalCoordinatesGenerator||STe,C=f.horizontalCoordinatesGenerator||_Te,j=f.horizontalPoints,L=f.verticalPoints;if((!j||!j.length)&&fn(C)){var R=x&&x.length,D=C({yAxis:k?Ba(Ba({},k),{},{ticks:R?x:k.ticks}):void 0,width:s,height:l,offset:c},R?!0:y);kc(Array.isArray(D),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(yp(D),"]")),Array.isArray(D)&&(j=D)}if((!L||!L.length)&&fn(P)){var H=w&&w.length,M=P({xAxis:_?Ba(Ba({},_),{},{ticks:H?w:_.ticks}):void 0,width:s,height:l,offset:c},H?!0:y);kc(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(yp(M),"]")),Array.isArray(M)&&(L=M)}return _e.createElement("g",{className:"recharts-cartesian-grid"},_e.createElement(yTe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),_e.createElement(vTe,Bh({},f,{offset:c,horizontalPoints:j,xAxis:_,yAxis:k})),_e.createElement(xTe,Bh({},f,{offset:c,verticalPoints:L,xAxis:_,yAxis:k})),_e.createElement(bTe,Bh({},f,{horizontalPoints:j})),_e.createElement(wTe,Bh({},f,{verticalPoints:L})))}YX.displayName="CartesianGrid";var NTe=["layout","type","stroke","connectNulls","isRange","ref"],kTe=["key"],GX;function Fg(e){"@babel/helpers - typeof";return Fg=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},Fg(e)}function KX(e,t){if(e==null)return{};var n=ATe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ATe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $h(){return $h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$h.apply(this,arguments)}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F$(Object(n),!0).forEach(function(r){xc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QX(r.key),r)}}function jTe(e,t,n){return t&&B$(e.prototype,t),n&&B$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CTe(e,t,n){return t=a2(t),ETe(e,XX()?Reflect.construct(t,n||[],a2(e).constructor):t.apply(e,n))}function ETe(e,t){if(t&&(Fg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OTe(e)}function OTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XX=function(){return!!e})()}function a2(e){return a2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},a2(e)}function TTe(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&&LC(e,t)}function LC(e,t){return LC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LC(e,t)}function xc(e,t,n){return t=QX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QX(e){var t=MTe(e,"string");return Fg(t)=="symbol"?t:t+""}function MTe(e,t){if(Fg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tf=(function(e){function t(){var n;PTe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=CTe(this,t,[].concat(i)),xc(n,"state",{isAnimationFinished:!0}),xc(n,"id",w1("recharts-area-")),xc(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),fn(o)&&o()}),xc(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),fn(o)&&o()}),n}return TTe(t,e),jTe(t,[{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,c=l.dot,f=l.points,h=l.dataKey,g=kn(this.props,!1),m=kn(c,!0),b=f.map(function(x,w){var _=Jf(Jf(Jf({key:"dot-".concat(w),r:3},g),m),{},{index:w,cx:x.x,cy:x.y,dataKey:h,value:x.value,payload:x.payload,points:f});return t.renderDotItem(c,_)}),y={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return _e.createElement(Ur,$h({className:"recharts-area-dots"},y),b)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].x,c=o[o.length-1].x,f=r*Math.abs(l-c),h=hd(o.map(function(g){return g.y||0}));return it(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(hd(a.map(function(g){return g.y||0})),h)),it(h)?_e.createElement("rect",{x:l<c?l:l-f,y:0,width:f,height:Math.floor(h+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].y,c=o[o.length-1].y,f=r*Math.abs(l-c),h=hd(o.map(function(g){return g.x||0}));return it(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(hd(a.map(function(g){return g.x||0})),h)),it(h)?_e.createElement("rect",{x:0,y:l<c?l:l-f,width:h+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,a,o){var s=this.props,l=s.layout,c=s.type,f=s.stroke,h=s.connectNulls,g=s.isRange;s.ref;var m=KX(s,NTe);return _e.createElement(Ur,{clipPath:a?"url(#clipPath-".concat(o,")"):null},_e.createElement(Bv,$h({},kn(m,!0),{points:r,connectNulls:h,type:c,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),f!=="none"&&_e.createElement(Bv,$h({},kn(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:h,fill:"none",points:r})),f!=="none"&&g&&_e.createElement(Bv,$h({},kn(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:h,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var a=this,o=this.props,s=o.points,l=o.baseLine,c=o.isAnimationActive,f=o.animationBegin,h=o.animationDuration,g=o.animationEasing,m=o.animationId,b=this.state,y=b.prevPoints,x=b.prevBaseLine;return _e.createElement(ef,{begin:f,duration:h,isActive:c,easing:g,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var _=w.t;if(y){var k=y.length/s.length,P=s.map(function(R,D){var H=Math.floor(D*k);if(y[H]){var M=y[H],F=Us(M.x,R.x),W=Us(M.y,R.y);return Jf(Jf({},R),{},{x:F(_),y:W(_)})}return R}),C;if(it(l)&&typeof l=="number"){var j=Us(x,l);C=j(_)}else if(jn(l)||oy(l)){var L=Us(x,0);C=L(_)}else C=l.map(function(R,D){var H=Math.floor(D*k);if(x[H]){var M=x[H],F=Us(M.x,R.x),W=Us(M.y,R.y);return Jf(Jf({},R),{},{x:F(_),y:W(_)})}return R});return a.renderAreaStatically(P,C,r,i)}return _e.createElement(Ur,null,_e.createElement("defs",null,_e.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(_))),_e.createElement(Ur,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,l,r,i)))})}},{key:"renderArea",value:function(r,i){var a=this.props,o=a.points,s=a.baseLine,l=a.isAnimationActive,c=this.state,f=c.prevPoints,h=c.prevBaseLine,g=c.totalLength;return l&&o&&o.length&&(!f&&g>0||!_0(f,o)||!_0(h,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,c=i.top,f=i.left,h=i.xAxis,g=i.yAxis,m=i.width,b=i.height,y=i.isAnimationActive,x=i.id;if(a||!s||!s.length)return null;var w=this.state.isAnimationFinished,_=s.length===1,k=Tn("recharts-area",l),P=h&&h.allowDataOverflow,C=g&&g.allowDataOverflow,j=P||C,L=jn(x)?this.id:x,R=(r=kn(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=R.r,H=D===void 0?3:D,M=R.strokeWidth,F=M===void 0?2:M,W=Ywe(o)?o:{},V=W.clipDot,X=V===void 0?!0:V,Y=H*2+F;return _e.createElement(Ur,{className:k},P||C?_e.createElement("defs",null,_e.createElement("clipPath",{id:"clipPath-".concat(L)},_e.createElement("rect",{x:P?f:f-m/2,y:C?c:c-b/2,width:P?m:m*2,height:C?b:b*2})),!X&&_e.createElement("clipPath",{id:"clipPath-dots-".concat(L)},_e.createElement("rect",{x:f-Y/2,y:c-Y/2,width:m+Y,height:b+Y}))):null,_?null:this.renderArea(j,L),(o||_)&&this.renderDots(j,X,L),(!y||w)&&Sd.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(E.PureComponent);GX=tf;xc(tf,"displayName","Area");xc(tf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ly.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});xc(tf,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(it(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var f=Math.max(c[0],c[1]),h=Math.min(c[0],c[1]);return s==="dataMin"?h:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});xc(tf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,f=e.dataStartIndex,h=e.displayedData,g=e.offset,m=t.layout,b=c&&c.length,y=GX.getBaseValue(t,n,r,i),x=m==="horizontal",w=!1,_=h.map(function(P,C){var j;b?j=c[f+C]:(j=ds(P,l),Array.isArray(j)?w=!0:j=[y,j]);var L=j[1]==null||b&&ds(P,l)==null;return x?{x:rB({axis:r,ticks:a,bandSize:s,entry:P,index:C}),y:L?null:i.scale(j[1]),value:j,payload:P}:{x:L?null:r.scale(j[1]),y:rB({axis:i,ticks:o,bandSize:s,entry:P,index:C}),value:j,payload:P}}),k;return b||w?k=_.map(function(P){var C=Array.isArray(P.value)?P.value[0]:null;return x?{x:P.x,y:C!=null&&P.y!=null?i.scale(C):null}:{x:C!=null?r.scale(C):null,y:P.y}}):k=x?i.scale(y):r.scale(y),Jf({points:_,baseLine:k,layout:m,isRange:w},g)});xc(tf,"renderDotItem",function(e,t){var n;if(_e.isValidElement(e))n=_e.cloneElement(e,t);else if(fn(e))n=e(t);else{var r=Tn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=KX(t,kTe);n=_e.createElement(nT,$h({},a,{key:i,className:r}))}return n});function Bg(e){"@babel/helpers - typeof";return Bg=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},Bg(e)}function LTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RTe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eQ(r.key),r)}}function ITe(e,t,n){return t&&RTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DTe(e,t,n){return t=o2(t),FTe(e,JX()?Reflect.construct(t,n||[],o2(e).constructor):t.apply(e,n))}function FTe(e,t){if(t&&(Bg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BTe(e)}function BTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JX=function(){return!!e})()}function o2(e){return o2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},o2(e)}function $Te(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&&RC(e,t)}function RC(e,t){return RC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},RC(e,t)}function ZX(e,t,n){return t=eQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eQ(e){var t=qTe(e,"string");return Bg(t)=="symbol"?t:t+""}function qTe(e,t){if(Bg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function IC(){return IC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IC.apply(this,arguments)}function UTe(e){var t=e.xAxisId,n=oT(),r=sT(),i=RX(t);return i==null?null:E.createElement(dy,IC({},i,{className:Tn("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return Bu(o,!0)}}))}var L5=(function(e){function t(){return LTe(this,t),DTe(this,t,arguments)}return $Te(t,e),ITe(t,[{key:"render",value:function(){return E.createElement(UTe,this.props)}}])})(E.Component);ZX(L5,"displayName","XAxis");ZX(L5,"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 $g(e){"@babel/helpers - typeof";return $g=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},$g(e)}function zTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VTe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rQ(r.key),r)}}function WTe(e,t,n){return t&&VTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HTe(e,t,n){return t=s2(t),YTe(e,tQ()?Reflect.construct(t,n||[],s2(e).constructor):t.apply(e,n))}function YTe(e,t){if(t&&($g(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GTe(e)}function GTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tQ=function(){return!!e})()}function s2(e){return s2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},s2(e)}function KTe(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&&DC(e,t)}function DC(e,t){return DC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},DC(e,t)}function nQ(e,t,n){return t=rQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rQ(e){var t=XTe(e,"string");return $g(t)=="symbol"?t:t+""}function XTe(e,t){if($g(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($g(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function FC(){return FC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FC.apply(this,arguments)}var QTe=function(t){var n=t.yAxisId,r=oT(),i=sT(),a=IX(n);return a==null?null:E.createElement(dy,FC({},a,{className:Tn("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(s){return Bu(s,!0)}}))},R5=(function(e){function t(){return zTe(this,t),HTe(this,t,arguments)}return KTe(t,e),WTe(t,[{key:"render",value:function(){return E.createElement(QTe,this.props)}}])})(E.Component);nQ(R5,"displayName","YAxis");nQ(R5,"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 $$(e){return tMe(e)||eMe(e)||ZTe(e)||JTe()}function JTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZTe(e,t){if(e){if(typeof e=="string")return BC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BC(e,t)}}function eMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tMe(e){if(Array.isArray(e))return BC(e)}function BC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $C=function(t,n,r,i,a){var o=jl(t,cT),s=jl(t,O5),l=[].concat($$(o),$$(s)),c=jl(t,M5),f="".concat(i,"Id"),h=i[0],g=n;if(l.length&&(g=l.reduce(function(y,x){if(x.props[f]===r&&Pc(x.props,"extendDomain")&&it(x.props[h])){var w=x.props[h];return[Math.min(y[0],w),Math.max(y[1],w)]}return y},g)),c.length){var m="".concat(h,"1"),b="".concat(h,"2");g=c.reduce(function(y,x){if(x.props[f]===r&&Pc(x.props,"extendDomain")&&it(x.props[m])&&it(x.props[b])){var w=x.props[m],_=x.props[b];return[Math.min(y[0],w,_),Math.max(y[1],w,_)]}return y},g)}return a&&a.length&&(g=a.reduce(function(y,x){return it(x)?[Math.min(y[0],x),Math.max(y[1],x)]:y},g)),g},_P={exports:{}},q$;function nMe(){return q$||(q$=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function a(l,c,f,h,g){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new i(f,h||l,g),b=n?n+c:c;return l._events[b]?l._events[b].fn?l._events[b]=[l._events[b],m]:l._events[b].push(m):(l._events[b]=m,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],f,h;if(this._eventsCount===0)return c;for(h in f=this._events)t.call(f,h)&&c.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},s.prototype.listeners=function(c){var f=n?n+c:c,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,m=h.length,b=new Array(m);g<m;g++)b[g]=h[g].fn;return b},s.prototype.listenerCount=function(c){var f=n?n+c:c,h=this._events[f];return h?h.fn?1:h.length:0},s.prototype.emit=function(c,f,h,g,m,b){var y=n?n+c:c;if(!this._events[y])return!1;var x=this._events[y],w=arguments.length,_,k;if(x.fn){switch(x.once&&this.removeListener(c,x.fn,void 0,!0),w){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,f),!0;case 3:return x.fn.call(x.context,f,h),!0;case 4:return x.fn.call(x.context,f,h,g),!0;case 5:return x.fn.call(x.context,f,h,g,m),!0;case 6:return x.fn.call(x.context,f,h,g,m,b),!0}for(k=1,_=new Array(w-1);k<w;k++)_[k-1]=arguments[k];x.fn.apply(x.context,_)}else{var P=x.length,C;for(k=0;k<P;k++)switch(x[k].once&&this.removeListener(c,x[k].fn,void 0,!0),w){case 1:x[k].fn.call(x[k].context);break;case 2:x[k].fn.call(x[k].context,f);break;case 3:x[k].fn.call(x[k].context,f,h);break;case 4:x[k].fn.call(x[k].context,f,h,g);break;default:if(!_)for(C=1,_=new Array(w-1);C<w;C++)_[C-1]=arguments[C];x[k].fn.apply(x[k].context,_)}}return!0},s.prototype.on=function(c,f,h){return a(this,c,f,h,!1)},s.prototype.once=function(c,f,h){return a(this,c,f,h,!0)},s.prototype.removeListener=function(c,f,h,g){var m=n?n+c:c;if(!this._events[m])return this;if(!f)return o(this,m),this;var b=this._events[m];if(b.fn)b.fn===f&&(!g||b.once)&&(!h||b.context===h)&&o(this,m);else{for(var y=0,x=[],w=b.length;y<w;y++)(b[y].fn!==f||g&&!b[y].once||h&&b[y].context!==h)&&x.push(b[y]);x.length?this._events[m]=x.length===1?x[0]:x:o(this,m)}return this},s.prototype.removeAllListeners=function(c){var f;return c?(f=n?n+c:c,this._events[f]&&o(this,f)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(_P)),_P.exports}var rMe=nMe();const iMe=Kn(rMe);var NP=new iMe,kP="recharts.syncMouseEvents";function W0(e){"@babel/helpers - typeof";return W0=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},W0(e)}function aMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oMe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iQ(r.key),r)}}function sMe(e,t,n){return t&&oMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AP(e,t,n){return t=iQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iQ(e){var t=lMe(e,"string");return W0(t)=="symbol"?t:t+""}function lMe(e,t){if(W0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(W0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cMe=(function(){function e(){aMe(this,e),AP(this,"activeIndex",0),AP(this,"coordinateList",[]),AP(this,"layout","horizontal")}return sMe(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,s=o===void 0?null:o,l=n.layout,c=l===void 0?null:l,f=n.offset,h=f===void 0?null:f,g=n.mouseHandlerCallback,m=g===void 0?null:g;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=h??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(n){if(this.coordinateList.length!==0)switch(n.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(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=a+l+c,g=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:h,pageY:g})}}}])})();function uMe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&it(r)&&it(i))return!0}return!1}function fMe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function aQ(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=ya(t,n,r,i),s=ya(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function dMe(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,f=t.outerRadius,h=t.angle,g=ya(s,l,c,h),m=ya(s,l,f,h);r=g.x,i=g.y,a=m.x,o=m.y}else return aQ(t);return[{x:r,y:i},{x:a,y:o}]}function H0(e){"@babel/helpers - typeof";return H0=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},H0(e)}function U$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U$(Object(n),!0).forEach(function(r){hMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hMe(e,t,n){return t=pMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pMe(e){var t=mMe(e,"string");return H0(t)=="symbol"?t:t+""}function mMe(e,t){if(H0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(H0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gMe(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,f=e.tooltipAxisBandSize,h=e.layout,g=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!a||!o||g!=="ScatterChart"&&i!=="axis")return null;var b,y=Bv;if(g==="ScatterChart")b=o,y=yEe;else if(g==="BarChart")b=fMe(h,o,l,f),y=tT;else if(h==="radial"){var x=aQ(o),w=x.cx,_=x.cy,k=x.radius,P=x.startAngle,C=x.endAngle;b={cx:w,cy:_,startAngle:P,endAngle:C,innerRadius:k,outerRadius:k},y=fX}else b={points:dMe(h,o,l)},y=Bv;var j=Vx(Vx(Vx(Vx({stroke:"#ccc",pointerEvents:"none"},l),b),kn(m,!1)),{},{payload:s,payloadIndex:c,className:Tn("recharts-tooltip-cursor",m.className)});return E.isValidElement(m)?E.cloneElement(m,j):E.createElement(y,j)}var yMe=["item"],vMe=["children","className","width","height","style","compact","title","desc"];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 Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dm.apply(this,arguments)}function z$(e,t){return wMe(e)||bMe(e,t)||sQ(e,t)||xMe()}function xMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bMe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function wMe(e){if(Array.isArray(e))return e}function V$(e,t){if(e==null)return{};var n=SMe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SMe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NMe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lQ(r.key),r)}}function kMe(e,t,n){return t&&NMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AMe(e,t,n){return t=l2(t),PMe(e,oQ()?Reflect.construct(t,n||[],l2(e).constructor):t.apply(e,n))}function PMe(e,t){if(t&&(qg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jMe(e)}function jMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oQ=function(){return!!e})()}function l2(e){return l2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},l2(e)}function CMe(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&&qC(e,t)}function qC(e,t){return qC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qC(e,t)}function Ug(e){return TMe(e)||OMe(e)||sQ(e)||EMe()}function EMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sQ(e,t){if(e){if(typeof e=="string")return UC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UC(e,t)}}function OMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function TMe(e){if(Array.isArray(e))return UC(e)}function UC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W$(Object(n),!0).forEach(function(r){Wt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wt(e,t,n){return t=lQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lQ(e){var t=MMe(e,"string");return qg(t)=="symbol"?t:t+""}function MMe(e,t){if(qg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LMe={xAxis:["bottom","top"],yAxis:["left","right"]},RMe={width:"100%",height:"100%"},cQ={x:0,y:0};function Wx(e){return e}var IMe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},DMe=function(t,n,r,i){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return $e($e($e({},i),ya(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,c=i.angle;return $e($e($e({},i),ya(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return cQ},I5=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(Ug(s),Ug(c)):s},[]);return o.length>0?o:t&&t.length&&it(i)&&it(a)?t.slice(i,a+1):[]};function uQ(e){return e==="number"?[0,"auto"]:void 0}var zC=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=I5(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,c){var f,h=(f=c.props.data)!==null&&f!==void 0?f:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(o.dataKey&&!o.allowDuplicatedCategory){var m=h===void 0?s:h;g=fw(m,o.dataKey,i)}else g=h&&h[r]||s[r];return g?[].concat(Ug(l),[lX(c,g)]):l},[])},H$=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=IMe(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=YPe(o,s,c,l);if(f>=0&&c){var h=c[f]&&c[f].value,g=zC(t,n,f,h),m=DMe(r,s,f,a);return{activeTooltipIndex:f,activeLabel:h,activePayload:g,activeCoordinate:m}}return null},FMe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,h=t.children,g=t.stackOffset,m=aX(f,a);return r.reduce(function(b,y){var x,w=y.type.defaultProps!==void 0?$e($e({},y.type.defaultProps),y.props):y.props,_=w.type,k=w.dataKey,P=w.allowDataOverflow,C=w.allowDuplicatedCategory,j=w.scale,L=w.ticks,R=w.includeHidden,D=w[o];if(b[D])return b;var H=I5(t.data,{graphicalItems:i.filter(function($){var q,re=o in $.props?$.props[o]:(q=$.type.defaultProps)===null||q===void 0?void 0:q[o];return re===D}),dataStartIndex:l,dataEndIndex:c}),M=H.length,F,W,V;uMe(w.domain,P,_)&&(F=oC(w.domain,null,P),m&&(_==="number"||j!=="auto")&&(V=Fv(H,k,"category")));var X=uQ(_);if(!F||F.length===0){var Y,Z=(Y=w.domain)!==null&&Y!==void 0?Y:X;if(k){if(F=Fv(H,k,_),_==="category"&&m){var K=Dwe(F);C&&K?(W=F,F=Kw(0,M)):C||(F=sB(Z,F,y).reduce(function($,q){return $.indexOf(q)>=0?$:[].concat(Ug($),[q])},[]))}else if(_==="category")C?F=F.filter(function($){return $!==""&&!jn($)}):F=sB(Z,F,y).reduce(function($,q){return $.indexOf(q)>=0||q===""||jn(q)?$:[].concat(Ug($),[q])},[]);else if(_==="number"){var se=JPe(H,i.filter(function($){var q,re,le=o in $.props?$.props[o]:(q=$.type.defaultProps)===null||q===void 0?void 0:q[o],de="hide"in $.props?$.props.hide:(re=$.type.defaultProps)===null||re===void 0?void 0:re.hide;return le===D&&(R||!de)}),k,a,f);se&&(F=se)}m&&(_==="number"||j!=="auto")&&(V=Fv(H,k,"category"))}else m?F=Kw(0,M):s&&s[D]&&s[D].hasStack&&_==="number"?F=g==="expand"?[0,1]:sX(s[D].stackGroups,l,c):F=iX(H,i.filter(function($){var q=o in $.props?$.props[o]:$.type.defaultProps[o],re="hide"in $.props?$.props.hide:$.type.defaultProps.hide;return q===D&&(R||!re)}),_,f,!0);if(_==="number")F=$C(h,F,D,a,L),Z&&(F=oC(Z,F,P));else if(_==="category"&&Z){var z=Z,te=F.every(function($){return z.indexOf($)>=0});te&&(F=z)}}return $e($e({},b),{},Wt({},D,$e($e({},w),{},{axisType:a,domain:F,categoricalDomain:V,duplicateDomain:W,originalDomain:(x=w.domain)!==null&&x!==void 0?x:X,isCategorical:m,layout:f})))},{})},BMe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,h=t.children,g=I5(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=g.length,b=aX(f,a),y=-1;return r.reduce(function(x,w){var _=w.type.defaultProps!==void 0?$e($e({},w.type.defaultProps),w.props):w.props,k=_[o],P=uQ("number");if(!x[k]){y++;var C;return b?C=Kw(0,m):s&&s[k]&&s[k].hasStack?(C=sX(s[k].stackGroups,l,c),C=$C(h,C,k,a)):(C=oC(P,iX(g,r.filter(function(j){var L,R,D=o in j.props?j.props[o]:(L=j.type.defaultProps)===null||L===void 0?void 0:L[o],H="hide"in j.props?j.props.hide:(R=j.type.defaultProps)===null||R===void 0?void 0:R.hide;return D===k&&!H}),"number",f),i.defaultProps.allowDataOverflow),C=$C(h,C,k,a)),$e($e({},x),{},Wt({},k,$e($e({axisType:a},i.defaultProps),{},{hide:!0,orientation:Ws(LMe,"".concat(a,".").concat(y%2),null),domain:C,originalDomain:P,isCategorical:b,layout:f})))}return x},{})},$Me=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.children,h="".concat(i,"Id"),g=jl(f,a),m={};return g&&g.length?m=FMe(t,{axes:g,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(m=BMe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),m},qMe=function(t){var n=ed(t),r=Bu(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:j4(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Bw(n,r)}},Y$=function(t){var n=t.children,r=t.defaultShowTooltip,i=ns(n,Tg),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},UMe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Vu(n&&n.type);return r&&r.indexOf("Bar")>=0})},G$=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"}},zMe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,f=r.height,h=r.children,g=r.margin||{},m=ns(h,Tg),b=ns(h,Ym),y=Object.keys(l).reduce(function(C,j){var L=l[j],R=L.orientation;return!L.mirror&&!L.hide?$e($e({},C),{},Wt({},R,C[R]+L.width)):C},{left:g.left||0,right:g.right||0}),x=Object.keys(o).reduce(function(C,j){var L=o[j],R=L.orientation;return!L.mirror&&!L.hide?$e($e({},C),{},Wt({},R,Ws(C,"".concat(R))+L.height)):C},{top:g.top||0,bottom:g.bottom||0}),w=$e($e({},x),y),_=w.bottom;m&&(w.bottom+=m.props.height||Tg.defaultProps.height),b&&n&&(w=XPe(w,i,r,n));var k=c-w.left-w.right,P=f-w.top-w.bottom;return $e($e({brushBottom:_},w),{},{width:Math.max(k,0),height:Math.max(P,0)})},VMe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},WMe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,f=t.formatAxisMap,h=t.defaultProps,g=function(w,_){var k=_.graphicalItems,P=_.stackGroups,C=_.offset,j=_.updateId,L=_.dataStartIndex,R=_.dataEndIndex,D=w.barSize,H=w.layout,M=w.barGap,F=w.barCategoryGap,W=w.maxBarSize,V=G$(H),X=V.numericAxisName,Y=V.cateAxisName,Z=UMe(k),K=[];return k.forEach(function(se,z){var te=I5(w.data,{graphicalItems:[se],dataStartIndex:L,dataEndIndex:R}),$=se.type.defaultProps!==void 0?$e($e({},se.type.defaultProps),se.props):se.props,q=$.dataKey,re=$.maxBarSize,le=$["".concat(X,"Id")],de=$["".concat(Y,"Id")],pe={},ve=l.reduce(function(st,xt){var Ct=_["".concat(xt.axisType,"Map")],bn=$["".concat(xt.axisType,"Id")];Ct&&Ct[bn]||xt.axisType==="zAxis"||gp();var sn=Ct[bn];return $e($e({},st),{},Wt(Wt({},xt.axisType,sn),"".concat(xt.axisType,"Ticks"),Bu(sn)))},pe),he=ve[Y],xe=ve["".concat(Y,"Ticks")],Pe=P&&P[le]&&P[le].hasStack&&uje(se,P[le].stackGroups),Se=Vu(se.type).indexOf("Bar")>=0,Ue=Bw(he,xe),Ye=[],oe=Z&&GPe({barSize:D,stackGroups:P,totalSize:VMe(ve,Y)});if(Se){var Ke,ht,gt=jn(re)?W:re,ze=(Ke=(ht=Bw(he,xe,!0))!==null&&ht!==void 0?ht:gt)!==null&&Ke!==void 0?Ke:0;Ye=KPe({barGap:M,barCategoryGap:F,bandSize:ze!==Ue?ze:Ue,sizeList:oe[de],maxBarSize:gt}),ze!==Ue&&(Ye=Ye.map(function(st){return $e($e({},st),{},{position:$e($e({},st.position),{},{offset:st.position.offset-ze/2})})}))}var St=se&&se.type&&se.type.getComposedData;St&&K.push({props:$e($e({},St($e($e({},ve),{},{displayedData:te,props:w,dataKey:q,item:se,bandSize:Ue,barPosition:Ye,offset:C,stackedData:Pe,layout:H,dataStartIndex:L,dataEndIndex:R}))),{},Wt(Wt(Wt({key:se.key||"item-".concat(z)},X,ve[X]),Y,ve[Y]),"animationId",j)),childIndex:Xwe(se,w.children),item:se})}),K},m=function(w,_){var k=w.props,P=w.dataStartIndex,C=w.dataEndIndex,j=w.updateId;if(!wD({props:k}))return null;var L=k.children,R=k.layout,D=k.stackOffset,H=k.data,M=k.reverseStackOrder,F=G$(R),W=F.numericAxisName,V=F.cateAxisName,X=jl(L,r),Y=sje(H,X,"".concat(W,"Id"),"".concat(V,"Id"),D,M),Z=l.reduce(function($,q){var re="".concat(q.axisType,"Map");return $e($e({},$),{},Wt({},re,$Me(k,$e($e({},q),{},{graphicalItems:X,stackGroups:q.axisType===W&&Y,dataStartIndex:P,dataEndIndex:C}))))},{}),K=zMe($e($e({},Z),{},{props:k,graphicalItems:X}),_==null?void 0:_.legendBBox);Object.keys(Z).forEach(function($){Z[$]=f(k,Z[$],K,$.replace("Map",""),n)});var se=Z["".concat(V,"Map")],z=qMe(se),te=g(k,$e($e({},Z),{},{dataStartIndex:P,dataEndIndex:C,updateId:j,graphicalItems:X,stackGroups:Y,offset:K}));return $e($e({formattedGraphicalItems:te,graphicalItems:X,offset:K,stackGroups:Y},z),Z)},b=(function(x){function w(_){var k,P,C;return _Me(this,w),C=AMe(this,w,[_]),Wt(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Wt(C,"accessibilityManager",new cMe),Wt(C,"handleLegendBBoxUpdate",function(j){if(j){var L=C.state,R=L.dataStartIndex,D=L.dataEndIndex,H=L.updateId;C.setState($e({legendBBox:j},m({props:C.props,dataStartIndex:R,dataEndIndex:D,updateId:H},$e($e({},C.state),{},{legendBBox:j}))))}}),Wt(C,"handleReceiveSyncEvent",function(j,L,R){if(C.props.syncId===j){if(R===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(L)}}),Wt(C,"handleBrushChange",function(j){var L=j.startIndex,R=j.endIndex;if(L!==C.state.dataStartIndex||R!==C.state.dataEndIndex){var D=C.state.updateId;C.setState(function(){return $e({dataStartIndex:L,dataEndIndex:R},m({props:C.props,dataStartIndex:L,dataEndIndex:R,updateId:D},C.state))}),C.triggerSyncEvent({dataStartIndex:L,dataEndIndex:R})}}),Wt(C,"handleMouseEnter",function(j){var L=C.getMouseInfo(j);if(L){var R=$e($e({},L),{},{isTooltipActive:!0});C.setState(R),C.triggerSyncEvent(R);var D=C.props.onMouseEnter;fn(D)&&D(R,j)}}),Wt(C,"triggeredAfterMouseMove",function(j){var L=C.getMouseInfo(j),R=L?$e($e({},L),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(R),C.triggerSyncEvent(R);var D=C.props.onMouseMove;fn(D)&&D(R,j)}),Wt(C,"handleItemMouseEnter",function(j){C.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),Wt(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),Wt(C,"handleMouseMove",function(j){j.persist(),C.throttleTriggeredAfterMouseMove(j)}),Wt(C,"handleMouseLeave",function(j){C.throttleTriggeredAfterMouseMove.cancel();var L={isTooltipActive:!1};C.setState(L),C.triggerSyncEvent(L);var R=C.props.onMouseLeave;fn(R)&&R(L,j)}),Wt(C,"handleOuterEvent",function(j){var L=Kwe(j),R=Ws(C.props,"".concat(L));if(L&&fn(R)){var D,H;/.*touch.*/i.test(L)?H=C.getMouseInfo(j.changedTouches[0]):H=C.getMouseInfo(j),R((D=H)!==null&&D!==void 0?D:{},j)}}),Wt(C,"handleClick",function(j){var L=C.getMouseInfo(j);if(L){var R=$e($e({},L),{},{isTooltipActive:!0});C.setState(R),C.triggerSyncEvent(R);var D=C.props.onClick;fn(D)&&D(R,j)}}),Wt(C,"handleMouseDown",function(j){var L=C.props.onMouseDown;if(fn(L)){var R=C.getMouseInfo(j);L(R,j)}}),Wt(C,"handleMouseUp",function(j){var L=C.props.onMouseUp;if(fn(L)){var R=C.getMouseInfo(j);L(R,j)}}),Wt(C,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),Wt(C,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&C.handleMouseDown(j.changedTouches[0])}),Wt(C,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&C.handleMouseUp(j.changedTouches[0])}),Wt(C,"handleDoubleClick",function(j){var L=C.props.onDoubleClick;if(fn(L)){var R=C.getMouseInfo(j);L(R,j)}}),Wt(C,"handleContextMenu",function(j){var L=C.props.onContextMenu;if(fn(L)){var R=C.getMouseInfo(j);L(R,j)}}),Wt(C,"triggerSyncEvent",function(j){C.props.syncId!==void 0&&NP.emit(kP,C.props.syncId,j,C.eventEmitterSymbol)}),Wt(C,"applySyncEvent",function(j){var L=C.props,R=L.layout,D=L.syncMethod,H=C.state.updateId,M=j.dataStartIndex,F=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)C.setState($e({dataStartIndex:M,dataEndIndex:F},m({props:C.props,dataStartIndex:M,dataEndIndex:F,updateId:H},C.state)));else if(j.activeTooltipIndex!==void 0){var W=j.chartX,V=j.chartY,X=j.activeTooltipIndex,Y=C.state,Z=Y.offset,K=Y.tooltipTicks;if(!Z)return;if(typeof D=="function")X=D(K,j);else if(D==="value"){X=-1;for(var se=0;se<K.length;se++)if(K[se].value===j.activeLabel){X=se;break}}var z=$e($e({},Z),{},{x:Z.left,y:Z.top}),te=Math.min(W,z.x+z.width),$=Math.min(V,z.y+z.height),q=K[X]&&K[X].value,re=zC(C.state,C.props.data,X),le=K[X]?{x:R==="horizontal"?K[X].coordinate:te,y:R==="horizontal"?$:K[X].coordinate}:cQ;C.setState($e($e({},j),{},{activeLabel:q,activeCoordinate:le,activePayload:re,activeTooltipIndex:X}))}else C.setState(j)}),Wt(C,"renderCursor",function(j){var L,R=C.state,D=R.isTooltipActive,H=R.activeCoordinate,M=R.activePayload,F=R.offset,W=R.activeTooltipIndex,V=R.tooltipAxisBandSize,X=C.getTooltipEventType(),Y=(L=j.props.active)!==null&&L!==void 0?L:D,Z=C.props.layout,K=j.key||"_recharts-cursor";return _e.createElement(gMe,{key:K,activeCoordinate:H,activePayload:M,activeTooltipIndex:W,chartName:n,element:j,isActive:Y,layout:Z,offset:F,tooltipAxisBandSize:V,tooltipEventType:X})}),Wt(C,"renderPolarAxis",function(j,L,R){var D=Ws(j,"type.axisType"),H=Ws(C.state,"".concat(D,"Map")),M=j.type.defaultProps,F=M!==void 0?$e($e({},M),j.props):j.props,W=H&&H[F["".concat(D,"Id")]];return E.cloneElement(j,$e($e({},W),{},{className:Tn(D,W.className),key:j.key||"".concat(L,"-").concat(R),ticks:Bu(W,!0)}))}),Wt(C,"renderPolarGrid",function(j){var L=j.props,R=L.radialLines,D=L.polarAngles,H=L.polarRadius,M=C.state,F=M.radiusAxisMap,W=M.angleAxisMap,V=ed(F),X=ed(W),Y=X.cx,Z=X.cy,K=X.innerRadius,se=X.outerRadius;return E.cloneElement(j,{polarAngles:Array.isArray(D)?D:Bu(X,!0).map(function(z){return z.coordinate}),polarRadius:Array.isArray(H)?H:Bu(V,!0).map(function(z){return z.coordinate}),cx:Y,cy:Z,innerRadius:K,outerRadius:se,key:j.key||"polar-grid",radialLines:R})}),Wt(C,"renderLegend",function(){var j=C.state.formattedGraphicalItems,L=C.props,R=L.children,D=L.width,H=L.height,M=C.props.margin||{},F=D-(M.left||0)-(M.right||0),W=nX({children:R,formattedGraphicalItems:j,legendWidth:F,legendContent:c});if(!W)return null;var V=W.item,X=V$(W,yMe);return E.cloneElement(V,$e($e({},X),{},{chartWidth:D,chartHeight:H,margin:M,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),Wt(C,"renderTooltip",function(){var j,L=C.props,R=L.children,D=L.accessibilityLayer,H=ns(R,uc);if(!H)return null;var M=C.state,F=M.isTooltipActive,W=M.activeCoordinate,V=M.activePayload,X=M.activeLabel,Y=M.offset,Z=(j=H.props.active)!==null&&j!==void 0?j:F;return E.cloneElement(H,{viewBox:$e($e({},Y),{},{x:Y.left,y:Y.top}),active:Z,label:X,payload:Z?V:[],coordinate:W,accessibilityLayer:D})}),Wt(C,"renderBrush",function(j){var L=C.props,R=L.margin,D=L.data,H=C.state,M=H.offset,F=H.dataStartIndex,W=H.dataEndIndex,V=H.updateId;return E.cloneElement(j,{key:j.key||"_recharts-brush",onChange:$x(C.handleBrushChange,j.props.onChange),data:D,x:it(j.props.x)?j.props.x:M.left,y:it(j.props.y)?j.props.y:M.top+M.height+M.brushBottom-(R.bottom||0),width:it(j.props.width)?j.props.width:M.width,startIndex:F,endIndex:W,updateId:"brush-".concat(V)})}),Wt(C,"renderReferenceElement",function(j,L,R){if(!j)return null;var D=C,H=D.clipPathId,M=C.state,F=M.xAxisMap,W=M.yAxisMap,V=M.offset,X=j.type.defaultProps||{},Y=j.props,Z=Y.xAxisId,K=Z===void 0?X.xAxisId:Z,se=Y.yAxisId,z=se===void 0?X.yAxisId:se;return E.cloneElement(j,{key:j.key||"".concat(L,"-").concat(R),xAxis:F[K],yAxis:W[z],viewBox:{x:V.left,y:V.top,width:V.width,height:V.height},clipPathId:H})}),Wt(C,"renderActivePoints",function(j){var L=j.item,R=j.activePoint,D=j.basePoint,H=j.childIndex,M=j.isRange,F=[],W=L.props.key,V=L.item.type.defaultProps!==void 0?$e($e({},L.item.type.defaultProps),L.item.props):L.item.props,X=V.activeDot,Y=V.dataKey,Z=$e($e({index:H,dataKey:Y,cx:R.x,cy:R.y,r:4,fill:eT(L.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},kn(X,!1)),dw(X));return F.push(w.renderActiveDot(X,Z,"".concat(W,"-activePoint-").concat(H))),D?F.push(w.renderActiveDot(X,$e($e({},Z),{},{cx:D.x,cy:D.y}),"".concat(W,"-basePoint-").concat(H))):M&&F.push(null),F}),Wt(C,"renderGraphicChild",function(j,L,R){var D=C.filterFormatItem(j,L,R);if(!D)return null;var H=C.getTooltipEventType(),M=C.state,F=M.isTooltipActive,W=M.tooltipAxis,V=M.activeTooltipIndex,X=M.activeLabel,Y=C.props.children,Z=ns(Y,uc),K=D.props,se=K.points,z=K.isRange,te=K.baseLine,$=D.item.type.defaultProps!==void 0?$e($e({},D.item.type.defaultProps),D.item.props):D.item.props,q=$.activeDot,re=$.hide,le=$.activeBar,de=$.activeShape,pe=!!(!re&&F&&Z&&(q||le||de)),ve={};H!=="axis"&&Z&&Z.props.trigger==="click"?ve={onClick:$x(C.handleItemMouseEnter,j.props.onClick)}:H!=="axis"&&(ve={onMouseLeave:$x(C.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:$x(C.handleItemMouseEnter,j.props.onMouseEnter)});var he=E.cloneElement(j,$e($e({},D.props),ve));function xe(xt){return typeof W.dataKey=="function"?W.dataKey(xt.payload):null}if(pe)if(V>=0){var Pe,Se;if(W.dataKey&&!W.allowDuplicatedCategory){var Ue=typeof W.dataKey=="function"?xe:"payload.".concat(W.dataKey.toString());Pe=fw(se,Ue,X),Se=z&&te&&fw(te,Ue,X)}else Pe=se==null?void 0:se[V],Se=z&&te&&te[V];if(de||le){var Ye=j.props.activeIndex!==void 0?j.props.activeIndex:V;return[E.cloneElement(j,$e($e($e({},D.props),ve),{},{activeIndex:Ye})),null,null]}if(!jn(Pe))return[he].concat(Ug(C.renderActivePoints({item:D,activePoint:Pe,basePoint:Se,childIndex:V,isRange:z})))}else{var oe,Ke=(oe=C.getItemByXY(C.state.activeCoordinate))!==null&&oe!==void 0?oe:{graphicalItem:he},ht=Ke.graphicalItem,gt=ht.item,ze=gt===void 0?j:gt,St=ht.childIndex,st=$e($e($e({},D.props),ve),{},{activeIndex:St});return[E.cloneElement(ze,st),null,null]}return z?[he,null,null]:[he,null]}),Wt(C,"renderCustomized",function(j,L,R){return E.cloneElement(j,$e($e({key:"recharts-customized-".concat(R)},C.props),C.state))}),Wt(C,"renderMap",{CartesianGrid:{handler:Wx,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:Wx},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:Wx},YAxis:{handler:Wx},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((k=_.id)!==null&&k!==void 0?k:w1("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=nK(C.triggeredAfterMouseMove,(P=_.throttleDelay)!==null&&P!==void 0?P:1e3/60),C.state={},C}return CMe(w,x),kMe(w,[{key:"componentDidMount",value:function(){var k,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var k=this.props,P=k.children,C=k.data,j=k.height,L=k.layout,R=ns(P,uc);if(R){var D=R.props.defaultIndex;if(!(typeof D!="number"||D<0||D>this.state.tooltipTicks.length-1)){var H=this.state.tooltipTicks[D]&&this.state.tooltipTicks[D].value,M=zC(this.state,C,D,H),F=this.state.tooltipTicks[D].coordinate,W=(this.state.offset.top+j)/2,V=L==="horizontal",X=V?{x:F,y:W}:{y:F,x:W},Y=this.state.formattedGraphicalItems.find(function(K){var se=K.item;return se.type.name==="Scatter"});Y&&(X=$e($e({},X),Y.props.points[D].tooltipPosition),M=Y.props.points[D].tooltipPayload);var Z={activeTooltipIndex:D,isTooltipActive:!0,activeLabel:H,activePayload:M,activeCoordinate:X};this.setState(Z),this.renderCursor(R),this.accessibilityManager.setIndex(D)}}}},{key:"getSnapshotBeforeUpdate",value:function(k,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==k.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==k.margin){var C,j;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(k){j3([ns(k.children,uc)],[ns(this.props.children,uc)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var k=ns(this.props.children,uc);if(k&&typeof k.props.shared=="boolean"){var P=k.props.shared?"axis":"item";return s.indexOf(P)>=0?P:a}return a}},{key:"getMouseInfo",value:function(k){if(!this.container)return null;var P=this.container,C=P.getBoundingClientRect(),j=D_e(C),L={chartX:Math.round(k.pageX-j.left),chartY:Math.round(k.pageY-j.top)},R=C.width/P.offsetWidth||1,D=this.inRange(L.chartX,L.chartY,R);if(!D)return null;var H=this.state,M=H.xAxisMap,F=H.yAxisMap,W=this.getTooltipEventType(),V=H$(this.state,this.props.data,this.props.layout,D);if(W!=="axis"&&M&&F){var X=ed(M).scale,Y=ed(F).scale,Z=X&&X.invert?X.invert(L.chartX):null,K=Y&&Y.invert?Y.invert(L.chartY):null;return $e($e({},L),{},{xValue:Z,yValue:K},V)}return V?$e($e({},L),V):null}},{key:"inRange",value:function(k,P){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,L=k/C,R=P/C;if(j==="horizontal"||j==="vertical"){var D=this.state.offset,H=L>=D.left&&L<=D.left+D.width&&R>=D.top&&R<=D.top+D.height;return H?{x:L,y:R}:null}var M=this.state,F=M.angleAxisMap,W=M.radiusAxisMap;if(F&&W){var V=ed(F);return uB({x:L,y:R},V)}return null}},{key:"parseEventsOfWrapper",value:function(){var k=this.props.children,P=this.getTooltipEventType(),C=ns(k,uc),j={};C&&P==="axis"&&(C.props.trigger==="click"?j={onClick:this.handleClick}:j={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 L=dw(this.props,this.handleOuterEvent);return $e($e({},L),j)}},{key:"addListener",value:function(){NP.on(kP,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){NP.removeListener(kP,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(k,P,C){for(var j=this.state.formattedGraphicalItems,L=0,R=j.length;L<R;L++){var D=j[L];if(D.item===k||D.props.key===k.key||P===Vu(D.item.type)&&C===D.childIndex)return D}return null}},{key:"renderClipPath",value:function(){var k=this.clipPathId,P=this.state.offset,C=P.left,j=P.top,L=P.height,R=P.width;return _e.createElement("defs",null,_e.createElement("clipPath",{id:k},_e.createElement("rect",{x:C,y:j,height:L,width:R})))}},{key:"getXScales",value:function(){var k=this.state.xAxisMap;return k?Object.entries(k).reduce(function(P,C){var j=z$(C,2),L=j[0],R=j[1];return $e($e({},P),{},Wt({},L,R.scale))},{}):null}},{key:"getYScales",value:function(){var k=this.state.yAxisMap;return k?Object.entries(k).reduce(function(P,C){var j=z$(C,2),L=j[0],R=j[1];return $e($e({},P),{},Wt({},L,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(k){var P;return(P=this.state.xAxisMap)===null||P===void 0||(P=P[k])===null||P===void 0?void 0:P.scale}},{key:"getYScaleByAxisId",value:function(k){var P;return(P=this.state.yAxisMap)===null||P===void 0||(P=P[k])===null||P===void 0?void 0:P.scale}},{key:"getItemByXY",value:function(k){var P=this.state,C=P.formattedGraphicalItems,j=P.activeItem;if(C&&C.length)for(var L=0,R=C.length;L<R;L++){var D=C[L],H=D.props,M=D.item,F=M.type.defaultProps!==void 0?$e($e({},M.type.defaultProps),M.props):M.props,W=Vu(M.type);if(W==="Bar"){var V=(H.data||[]).find(function(K){return sEe(k,K)});if(V)return{graphicalItem:D,payload:V}}else if(W==="RadialBar"){var X=(H.data||[]).find(function(K){return uB(k,K)});if(X)return{graphicalItem:D,payload:X}}else if(P5(D,j)||j5(D,j)||$0(D,j)){var Y=QEe({graphicalItem:D,activeTooltipItem:j,itemData:F.data}),Z=F.activeIndex===void 0?Y:F.activeIndex;return{graphicalItem:$e($e({},D),{},{childIndex:Z}),payload:$0(D,j)?F.data[Y]:D.props.data[Y]}}}return null}},{key:"render",value:function(){var k=this;if(!wD(this))return null;var P=this.props,C=P.children,j=P.className,L=P.width,R=P.height,D=P.style,H=P.compact,M=P.title,F=P.desc,W=V$(P,vMe),V=kn(W,!1);if(H)return _e.createElement(k$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_e.createElement(E3,Dm({},V,{width:L,height:R,title:M,desc:F}),this.renderClipPath(),_D(C,this.renderMap)));if(this.props.accessibilityLayer){var X,Y;V.tabIndex=(X=this.props.tabIndex)!==null&&X!==void 0?X:0,V.role=(Y=this.props.role)!==null&&Y!==void 0?Y:"application",V.onKeyDown=function(K){k.accessibilityManager.keyboardEvent(K)},V.onFocus=function(){k.accessibilityManager.focus()}}var Z=this.parseEventsOfWrapper();return _e.createElement(k$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_e.createElement("div",Dm({className:Tn("recharts-wrapper",j),style:$e({position:"relative",cursor:"default",width:L,height:R},D)},Z,{ref:function(se){k.container=se}}),_e.createElement(E3,Dm({},V,{width:L,height:R,title:M,desc:F,style:RMe}),this.renderClipPath(),_D(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(E.Component);Wt(b,"displayName",n),Wt(b,"defaultProps",$e({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Wt(b,"getDerivedStateFromProps",function(x,w){var _=x.dataKey,k=x.data,P=x.children,C=x.width,j=x.height,L=x.layout,R=x.stackOffset,D=x.margin,H=w.dataStartIndex,M=w.dataEndIndex;if(w.updateId===void 0){var F=Y$(x);return $e($e($e({},F),{},{updateId:0},m($e($e({props:x},F),{},{updateId:0}),w)),{},{prevDataKey:_,prevData:k,prevWidth:C,prevHeight:j,prevLayout:L,prevStackOffset:R,prevMargin:D,prevChildren:P})}if(_!==w.prevDataKey||k!==w.prevData||C!==w.prevWidth||j!==w.prevHeight||L!==w.prevLayout||R!==w.prevStackOffset||!Hm(D,w.prevMargin)){var W=Y$(x),V={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},X=$e($e({},H$(w,k,L)),{},{updateId:w.updateId+1}),Y=$e($e($e({},W),V),X);return $e($e($e({},Y),m($e({props:x},Y),w)),{},{prevDataKey:_,prevData:k,prevWidth:C,prevHeight:j,prevLayout:L,prevStackOffset:R,prevMargin:D,prevChildren:P})}if(!j3(P,w.prevChildren)){var Z,K,se,z,te=ns(P,Tg),$=te&&(Z=(K=te.props)===null||K===void 0?void 0:K.startIndex)!==null&&Z!==void 0?Z:H,q=te&&(se=(z=te.props)===null||z===void 0?void 0:z.endIndex)!==null&&se!==void 0?se:M,re=$!==H||q!==M,le=!jn(k),de=le&&!re?w.updateId:w.updateId+1;return $e($e({updateId:de},m($e($e({props:x},w),{},{updateId:de,dataStartIndex:$,dataEndIndex:q}),w)),{},{prevChildren:P,dataStartIndex:$,dataEndIndex:q})}return null}),Wt(b,"renderActiveDot",function(x,w,_){var k;return E.isValidElement(x)?k=E.cloneElement(x,w):fn(x)?k=x(w):k=_e.createElement(nT,w),_e.createElement(Ur,{className:"recharts-active-dot",key:_},k)});var y=E.forwardRef(function(w,_){return _e.createElement(b,Dm({},w,{ref:_}))});return y.displayName=b.displayName,y},HMe=WMe({chartName:"AreaChart",GraphicalChild:tf,axisComponents:[{axisType:"xAxis",AxisComp:L5},{axisType:"yAxis",AxisComp:R5}],formatAxisMap:YOe});const YMe=({active:e,payload:t})=>{var n,r,i;if(e&&t&&t.length){const a=(n=t[0])==null?void 0:n.payload;return d.jsxs("div",{className:"bg-card border border-border rounded-lg p-3 shadow-xl min-w-[200px]",children:[d.jsx("p",{className:"text-xs font-mono text-muted-foreground mb-2",children:(a==null?void 0:a.rangeLabel)||(a==null?void 0:a.time)}),t.map((o,s)=>d.jsxs("p",{className:"text-sm font-semibold",style:{color:o.color},children:[o.name,": ",o.value]},s)),((r=a==null?void 0:a.siteNames)==null?void 0:r.length)>0&&d.jsxs("div",{className:"mt-2 pt-2 border-t border-border/50",children:[d.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Sites hit"}),a.siteNames.map((o,s)=>d.jsx("p",{className:"text-xs text-foreground truncate",children:o},s))]}),((i=a==null?void 0:a.attackTimes)==null?void 0:i.length)>0&&d.jsxs("div",{className:"mt-2 pt-2 border-t border-border/50",children:[d.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Exact times"}),d.jsxs("div",{className:"max-h-24 overflow-y-auto",children:[a.attackTimes.slice(0,8).map((o,s)=>d.jsx("p",{className:"text-[11px] font-mono text-foreground",children:o},s)),a.attackTimes.length>8&&d.jsxs("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:["+",a.attackTimes.length-8," more"]})]})]})]})}return null};function GMe({attacks:e=[],sites:t=[]}){const[n,r]=E.useState(()=>Xe().startOf("day")),[i,a]=E.useState(()=>Xe()),o=n.isSame(i.clone().startOf("day"),"day");E.useEffect(()=>{const w=setInterval(()=>a(Xe()),1e3);return()=>clearInterval(w)},[]),E.useEffect(()=>{if(!o)return;const w=Xe(),_=Xe().endOf("day").diff(w)+100,k=setTimeout(()=>r(Xe().startOf("day")),_);return()=>clearTimeout(k)},[o,n]);const s=E.useMemo(()=>{const w=new Map;return t.forEach(_=>w.set(_.id,_.name||_.url)),w},[t]),l=E.useMemo(()=>{const w=n.clone().startOf("day");return Array.from({length:24},(_,k)=>{const P=w.clone().add(k,"hours"),C=P.clone().add(1,"hour"),j=e.filter(D=>{const H=Xe(D.created_date||D.timestamp);return H.isValid()&&H.isSameOrAfter(P)&&H.isBefore(C)}),L=Array.from(new Set(j.map(D=>D.site_name||s.get(D.site_id)).filter(Boolean))),R=j.map(D=>Xe(D.created_date||D.timestamp)).filter(D=>D.isValid()).sort((D,H)=>D.valueOf()-H.valueOf()).map(D=>D.format("HH:mm:ss"));return{time:P.format("HH:mm"),rangeLabel:`${P.format("HH:mm")} – ${C.format("HH:mm")}`,hour:k,attacks:j.length,blocked:j.filter(D=>D.blocked).length,siteNames:L,attackTimes:R,primarySite:L[0]||null}})},[e,n,s]),c=E.useMemo(()=>l.filter(w=>w.attacks>0&&w.primarySite),[l]),f=()=>r(w=>w.clone().subtract(1,"day")),h=()=>{o||r(w=>w.clone().add(1,"day"))},g=()=>r(Xe().startOf("day")),m=n.format("dddd, MMM D, YYYY"),b=Xe.tz?Xe.tz.guess():Intl.DateTimeFormat().resolvedOptions().timeZone,y=({xAxisMap:w,yAxisMap:_})=>{var V,X;if(!o||!w||!_)return null;const k=Object.values(w)[0],P=Object.values(_)[0];if(!k||!P)return null;const C=i.hour(),j=i.minute()/60,L=(V=l[C])==null?void 0:V.time,R=(X=l[C+1])==null?void 0:X.time,D=k.scale(L),H=R?k.scale(R):D;if(D==null||isNaN(D))return null;const M=D+(H-D)*j,F=P.scale(P.domain[1]),W=P.scale(0);return d.jsxs("g",{children:[d.jsx("line",{x1:M,x2:M,y1:F,y2:W,stroke:"hsl(187 100% 50%)",strokeWidth:1,strokeDasharray:"3 3",opacity:.7}),d.jsxs("g",{transform:`translate(${M}, ${F-4})`,children:[d.jsx("rect",{x:-22,y:-12,width:44,height:14,rx:3,fill:"hsl(187 100% 50%)"}),d.jsx("text",{x:0,y:-2,textAnchor:"middle",fontSize:9,fontFamily:"var(--font-mono)",fill:"hsl(222 47% 4%)",fontWeight:700,children:i.format("HH:mm")})]})]})},x=({xAxisMap:w,yAxisMap:_,offset:k})=>{if(!w||!_)return null;const P=Object.values(w)[0],C=Object.values(_)[0];return!P||!C?null:d.jsx("g",{children:c.map(j=>{const L=P.scale(j.time),R=C.scale(Math.max(j.attacks,j.blocked));if(L==null||R==null||isNaN(L)||isNaN(R))return null;const D=j.primarySite.length>14?j.primarySite.slice(0,13)+"…":j.primarySite,H=j.siteNames.length>1?` +${j.siteNames.length-1}`:"";return d.jsxs("g",{transform:`translate(${L}, ${R-10})`,children:[d.jsx("rect",{x:-((D.length+H.length)*3.2+8),y:-12,width:(D.length+H.length)*6.4+16,height:18,rx:4,fill:"hsl(222 47% 7%)",stroke:"hsl(0 84% 60% / 0.6)",strokeWidth:1}),d.jsxs("text",{x:0,y:1,textAnchor:"middle",fontSize:10,fontFamily:"var(--font-mono)",fill:"hsl(0 84% 70%)",fontWeight:600,children:[D,H]}),d.jsx("circle",{cx:0,cy:10,r:3,fill:"hsl(0 84% 60%)"})]},`peak-${j.hour}`)})})};return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-5",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4 flex-wrap gap-3",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Attack Activity (24h)"}),o&&d.jsxs("div",{className:"flex items-center gap-1.5 bg-accent/10 border border-accent/30 rounded-full px-2 py-0.5",children:[d.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[d.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-accent opacity-75"}),d.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-accent"})]}),d.jsx("span",{className:"text-[10px] font-medium text-accent uppercase tracking-wider",children:"Live"}),d.jsx("span",{className:"text-[10px] font-mono text-accent/80",children:i.format("HH:mm:ss")})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-destructive"}),d.jsx("span",{className:"text-xs text-muted-foreground",children:"Detected"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:`w-2 h-2 rounded-full bg-accent ${o?"animate-pulse":""}`}),d.jsx("span",{className:"text-xs text-muted-foreground",children:"Blocked"})]})]})]}),d.jsxs("div",{className:"flex items-center justify-between mb-5 bg-muted/30 border border-border/40 rounded-lg px-3 py-2",children:[d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:f,className:"h-7 px-2 text-muted-foreground hover:text-foreground gap-1",children:[d.jsx(gE,{className:"w-3.5 h-3.5"}),d.jsx("span",{className:"text-xs",children:"Prev"})]}),d.jsxs("div",{className:"flex items-center gap-2 text-center",children:[d.jsx(kU,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-semibold text-foreground",children:m}),d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono",children:b})]}),!o&&d.jsx(Ot,{size:"sm",variant:"ghost",onClick:g,className:"h-6 px-2 text-[10px] text-primary ml-2",children:"Today"})]}),d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:h,disabled:o,className:"h-7 px-2 text-muted-foreground hover:text-foreground gap-1 disabled:opacity-30",children:[d.jsx("span",{className:"text-xs",children:"Next"}),d.jsx(b2,{className:"w-3.5 h-3.5"})]})]}),d.jsx(E_e,{width:"100%",height:240,children:d.jsxs(HMe,{data:l,margin:{top:30,right:10,left:-10,bottom:0},children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"attackGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"hsl(0, 84%, 60%)",stopOpacity:.3}),d.jsx("stop",{offset:"95%",stopColor:"hsl(0, 84%, 60%)",stopOpacity:0})]}),d.jsxs("linearGradient",{id:"blockedGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"hsl(142, 71%, 45%)",stopOpacity:.3}),d.jsx("stop",{offset:"95%",stopColor:"hsl(142, 71%, 45%)",stopOpacity:0})]})]}),d.jsx(YX,{strokeDasharray:"3 3",stroke:"hsl(222, 30%, 12%)"}),d.jsx(L5,{dataKey:"time",tick:{fill:"hsl(215, 20%, 55%)",fontSize:10},axisLine:!1,tickLine:!1,interval:1}),d.jsx(R5,{tick:{fill:"hsl(215, 20%, 55%)",fontSize:10},axisLine:!1,tickLine:!1,allowDecimals:!1}),d.jsx(uc,{content:d.jsx(YMe,{})}),d.jsx(tf,{type:"monotone",dataKey:"attacks",name:"Detected",stroke:"hsl(0, 84%, 60%)",fill:"url(#attackGrad)",strokeWidth:2}),d.jsx(tf,{type:"monotone",dataKey:"blocked",name:"Blocked",stroke:"hsl(142, 71%, 45%)",fill:"url(#blockedGrad)",strokeWidth:2,className:o?"blocked-line-pulse":""}),d.jsx(uC,{component:y}),d.jsx(uC,{component:x})]})})]})}const K$={active:"bg-accent/20 text-accent border-accent/30",pending_dns:"bg-neon-orange/20 text-neon-orange border-neon-orange/30",scanning:"bg-primary/20 text-primary border-primary/30",paused:"bg-muted text-muted-foreground border-border"};function fQ({sites:e=[],compact:t=!1,onDelete:n,deletingId:r}){return e.length===0?d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-8 text-center",children:[d.jsx(jc,{className:"w-10 h-10 mx-auto text-muted-foreground/30 mb-3"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No sites added yet"}),d.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1 font-mono",children:"Add your first website to start monitoring"})]}):d.jsx(d.Fragment,{children:d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[!t&&d.jsx("div",{className:"p-5 border-b border-border/50",children:d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Your Sites"})}),d.jsx("div",{className:"divide-y divide-border/30",children:e.map((i,a)=>d.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:a*.05,duration:.3},className:"px-5 py-4 flex items-center justify-between hover:bg-muted/20 transition-colors group",children:[d.jsxs("div",{className:"flex items-center gap-4 min-w-0 flex-1",children:[d.jsx("div",{className:"w-10 h-10 rounded-lg bg-muted/50 border border-border/50 flex items-center justify-center flex-shrink-0",children:d.jsx(jc,{className:"w-5 h-5 text-primary"})}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:i.name||i.url}),d.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:i.url})]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[i.security_score!==void 0&&i.security_score!==null&&d.jsxs("div",{className:"hidden md:flex items-center gap-2",children:[d.jsx(Ki,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsx("span",{className:`text-sm font-mono font-bold ${i.security_score>=80?"text-accent":i.security_score>=60?"text-neon-orange":"text-destructive"}`,children:i.security_score})]}),d.jsx(Oi,{className:`text-[10px] border ${K$[i.status]||K$.active}`,children:(i.status||"active").replace("_"," ")}),i.status==="pending_dns"&&!t&&d.jsx(Oi,{className:"text-[10px] border bg-neon-orange/10 text-neon-orange border-neon-orange/20",children:"Awaiting DNS"}),n&&!t&&d.jsx(Ot,{size:"sm",variant:"ghost",onClick:()=>n(i.id),disabled:r===i.id,className:"h-7 px-2 text-[11px] text-destructive hover:bg-destructive/10",children:r===i.id?d.jsx(hn,{className:"w-3 h-3 animate-spin"}):d.jsx(Gv,{className:"w-3 h-3"})})]})]},i.id))})]})})}function dQ(){return d.jsxs("div",{className:"bg-neon-orange/[0.06] border border-neon-orange/30 rounded-xl px-4 py-3 flex items-center gap-3 flex-wrap",children:[d.jsx("div",{className:"w-8 h-8 rounded-full bg-neon-orange/15 flex items-center justify-center flex-shrink-0",children:d.jsx(n1,{className:"w-4 h-4 text-neon-orange"})}),d.jsxs("div",{className:"flex-1 min-w-[220px]",children:[d.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Detection-only mode — attacks are ",d.jsx("span",{className:"text-neon-orange",children:"not being blocked"})]}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"You can see threats in real time, but your free plan doesn't block them. Upgrade to Pro for active protection."})]}),d.jsx(va,{to:"/dashboard/subscription",children:d.jsxs("button",{className:"text-xs font-semibold px-3 py-1.5 rounded-full bg-neon-orange text-background hover:bg-neon-orange/90 transition-colors flex items-center gap-1.5 whitespace-nowrap",children:["Upgrade",d.jsx(zg,{className:"w-3 h-3"})]})})]})}const X$="This website uses ShieldSync, a security service that inspects web traffic to protect against attacks. ShieldSync processes visitor IP addresses and request metadata for security purposes. Data is retained for 90 days. For more information, see https://shieldsync.io/dpa";function hQ({onDismiss:e}){const[t,n]=E.useState(!1),r=()=>{navigator.clipboard.writeText(X$),n(!0),setTimeout(()=>n(!1),2500)};return d.jsxs("div",{className:"bg-primary/[0.06] border border-primary/30 rounded-xl px-5 py-4 relative",children:[e&&d.jsx("button",{onClick:e,className:"absolute top-3 right-3 text-muted-foreground hover:text-foreground transition-colors",children:d.jsx(Lc,{className:"w-4 h-4"})}),d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/15 flex items-center justify-center flex-shrink-0 mt-0.5",children:d.jsx(mg,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{className:"flex-1 min-w-0 pr-6",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Action required: Update your Privacy Policy"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:"Add the following text to your website's privacy policy to comply with GDPR requirements:"}),d.jsx("div",{className:"bg-muted/40 border border-border/50 rounded-lg p-3 mt-3 text-xs text-foreground leading-relaxed font-mono",children:X$}),d.jsx(Ot,{size:"sm",variant:"outline",onClick:r,className:"mt-3 gap-2 text-xs",children:t?d.jsxs(d.Fragment,{children:[d.jsx(ss,{className:"w-3.5 h-3.5 text-accent"}),"Copied!"]}):d.jsxs(d.Fragment,{children:[d.jsx(Yv,{className:"w-3.5 h-3.5"}),"Copy text"]})})]})]})]})}const PP=e=>ut.functions.invoke("siteApi",e).then(t=>t.data),KMe=e=>ut.functions.invoke("protection",e).then(t=>t.data);function XMe(){const{features:e,user:t}=kp()||{},{data:n=[]}=dn({queryKey:["sites",t==null?void 0:t.email],queryFn:()=>Fc(ut.entities.Site,{created_by:t.email}),enabled:!!(t!=null&&t.email),initialData:[]}),{data:r=[],isFetching:i}=dn({queryKey:["all-threats",t==null?void 0:t.email],queryFn:async()=>{const y=await PP({action:"get_all_threats"});return(y==null?void 0:y.threats)||[]},enabled:!!(t!=null&&t.email)&&n.length>0,refetchInterval:1e4,refetchIntervalInBackground:!1,refetchOnWindowFocus:!0,staleTime:5e3,retry:!1}),{data:a=0}=dn({queryKey:["protection-stats-total",n.map(y=>y.id).join(",")],queryFn:async()=>(await Promise.all(n.map(async x=>{try{const w=await KMe({action:"get_blocklist",site_id:x.id}),_=Array.isArray(w)&&w||(w==null?void 0:w.blocklist)||(w==null?void 0:w.blocked_ips)||(w==null?void 0:w.items)||(w==null?void 0:w.ips)||(w==null?void 0:w.data)||[];return Array.isArray(_)?_.length:0}catch{return 0}}))).reduce((x,w)=>x+(Number(w)||0),0),enabled:n.length>0,refetchInterval:3e4,retry:!1,initialData:0}),{data:o=0}=dn({queryKey:["blocked-today",n.map(y=>y.id).join(",")],queryFn:async()=>(await Promise.all(n.map(async x=>{try{const w=await PP({action:"get_blocked_hits",site_id:x.id});return(w==null?void 0:w.count)||(w==null?void 0:w.blocked_hits)||0}catch{return 0}}))).reduce((x,w)=>x+(Number(w)||0),0),enabled:n.length>0,refetchInterval:15e3,retry:!1,initialData:0}),{data:s=[]}=dn({queryKey:["all-alerts",t==null?void 0:t.email],queryFn:async()=>{const y=await PP({action:"get_all_alerts"});return(y==null?void 0:y.alerts)||[]},enabled:!!(t!=null&&t.email)&&n.length>0,initialData:[],staleTime:5e3}),l=s.filter(y=>!y.read),c=_e.useMemo(()=>r.map(y=>{const x=y.attacker_ip||y.source_ip||y.src_ip||y.client_ip||y.ip||y.remote_addr||y.remote_ip,w=y.attack_timestamp||y.created_date||y.timestamp||y.created_at;let _=w;w&&typeof w=="string"&&!w.includes("T")&&(_=w.replace(" ","T").replace(/(\.\d{3})\d+$/,"$1")+"Z");let k=y.attacker_city||y.city||y.geo_city||null,P=y.attacker_country||y.country||y.geo_country||null;if(!k&&!P&&typeof y.geo=="string"){const j=y.geo.split(",").map(L=>L.trim()).filter(Boolean);j.length>=2?(k=j[0],P=j[j.length-1]):j.length===1&&(P=j[0])}const C=y.blocked!==!1&&y.is_blocked!==!1;return{...y,attacker_ip:x,attacker_country:P,attacker_city:k,attack_type:y.attack_type||y.threat_type||y.type,blocked:C,created_date:_}}).sort((y,x)=>new Date(x.created_date||0)-new Date(y.created_date||0)),[r]),f=n.length>0?Math.round(n.reduce((y,x)=>y+(x.security_score||0),0)/n.length):0,h=c.filter(y=>y.severity==="critical").length,[g,m]=_e.useState(()=>localStorage.getItem("shieldsync_privacy_banner_dismissed")==="true"),b=n.some(y=>y.status==="active"||y.status==="scanning")&&!g;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.5},className:"flex items-start justify-between gap-4 flex-wrap",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Security Overview"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Real-time monitoring across all your sites"})]}),d.jsxs("div",{className:"flex items-center gap-2 bg-card border border-border/50 rounded-full px-3 py-1.5",children:[d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full ${i?"bg-primary animate-ping":"bg-accent"} opacity-75`}),d.jsx("span",{className:`relative inline-flex rounded-full h-2 w-2 ${i?"bg-primary":"bg-accent"}`})]}),d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider text-muted-foreground",children:i?"Syncing":"Live"})]})]}),b&&d.jsx(hQ,{onDismiss:()=>{m(!0),localStorage.setItem("shieldsync_privacy_banner_dismissed","true")}}),e&&!e.ip_blocking&&d.jsx(dQ,{}),d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-4",children:[d.jsx(nv,{icon:jc,label:"Active Sites",value:n.filter(y=>y.status==="active"||y.status==="scanning"||y.status==="pending_dns").length,delay:0,color:"text-primary"}),d.jsx(nv,{icon:so,label:"Attacks (recent)",value:c.length,trend:`${h} critical`,trendUp:!1,delay:.1,color:"text-destructive"}),d.jsx(nv,{icon:Ki,label:"Blocked",value:a,trend:"IPs blocked",trendUp:!0,delay:.2,color:"text-accent"}),d.jsx(nv,{icon:Fb,label:"Blocked Today",value:o,trend:"rejected hits",trendUp:!0,delay:.25,color:"text-neon-purple"}),d.jsx(nv,{icon:_2,label:"Unread Alerts",value:l.length,delay:.3,color:"text-neon-orange"})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[d.jsx(GMe,{attacks:c,sites:n}),d.jsx(Gbe,{attacks:c,canBlock:!!(e!=null&&e.ip_blocking)})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.3,duration:.5},className:"bg-card border border-border/50 rounded-xl p-6 flex flex-col items-center",children:[d.jsx("h3",{className:"text-sm font-semibold text-foreground mb-4 self-start",children:"Average Security Score"}),d.jsx(nG,{score:f}),d.jsxs("p",{className:"text-xs text-muted-foreground mt-4 font-mono",children:[n.length," site",n.length!==1?"s":""," monitored"]})]}),d.jsx(fQ,{sites:n.slice(0,5),compact:!0})]})]})]})}function dT({onClose:e,children:t,maxWidth:n="max-w-lg",hideClose:r=!1}){const i=E.useCallback(()=>{typeof e=="function"&&e()},[e]);return E.useEffect(()=>{const a=o=>{o.key==="Escape"&&i()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[i]),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onMouseDown:a=>{a.target===a.currentTarget&&i()},children:d.jsxs(He.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},onMouseDown:a=>a.stopPropagation(),className:`relative bg-card border border-border/60 rounded-2xl w-full ${n} shadow-2xl max-h-[90vh] overflow-y-auto`,children:[!r&&d.jsx("button",{type:"button","aria-label":"Close",onClick:i,className:"absolute top-3 right-3 z-10 w-9 h-9 inline-flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors cursor-pointer",children:d.jsx(Lc,{className:"w-4 h-4"})}),t]})})}function QMe(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var hy=e=>{const{present:t,children:n}=e,r=JMe(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),a=Ar(r.ref,ZMe(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:a}):null};hy.displayName="Presence";function JMe(e){const[t,n]=E.useState(),r=E.useRef(null),i=E.useRef(e),a=E.useRef("none"),o=e?"mounted":"unmounted",[s,l]=QMe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=Hx(r.current);a.current=s==="mounted"?c:"none"},[s]),za(()=>{const c=r.current,f=i.current;if(f!==e){const g=a.current,m=Hx(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),za(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,h=m=>{const y=Hx(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(l("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=m=>{m.target===t&&(a.current=Hx(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Hx(e){return(e==null?void 0:e.animationName)||"none"}function ZMe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var D5="Checkbox",[e6e]=Rd(D5),[t6e,hT]=e6e(D5);function n6e(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:c,value:f="on",internal_do_not_use_render:h}=e,[g,m]=cp({prop:n,defaultProp:i??!1,onChange:l,caller:D5}),[b,y]=E.useState(null),[x,w]=E.useState(null),_=E.useRef(!1),k=b?!!o||!!b.closest("form"):!0,P={checked:g,disabled:a,setChecked:m,control:b,setControl:y,name:s,form:o,value:f,hasConsumerStoppedPropagationRef:_,required:c,defaultChecked:_d(i)?!1:i,isFormControl:k,bubbleInput:x,setBubbleInput:w};return d.jsx(t6e,{scope:t,...P,children:r6e(h)?h(P):r})}var pQ="CheckboxTrigger",mQ=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:o,disabled:s,checked:l,required:c,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:g,isFormControl:m,bubbleInput:b}=hT(pQ,e),y=Ar(i,f),x=E.useRef(l);return E.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const _=()=>h(x.current);return w.addEventListener("reset",_),()=>w.removeEventListener("reset",_)}},[a,h]),d.jsx(An.button,{type:"button",role:"checkbox","aria-checked":_d(l)?"mixed":l,"aria-required":c,"data-state":bQ(l),"data-disabled":s?"":void 0,disabled:s,value:o,...r,ref:y,onKeyDown:Nn(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Nn(n,w=>{h(_=>_d(_)?!0:!_),b&&m&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})});mQ.displayName=pQ;var pT=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:l,onCheckedChange:c,form:f,...h}=e;return d.jsx(n6e,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:c,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:g})=>d.jsxs(d.Fragment,{children:[d.jsx(mQ,{...h,ref:t,__scopeCheckbox:n}),g&&d.jsx(xQ,{__scopeCheckbox:n})]})})});pT.displayName=D5;var gQ="CheckboxIndicator",yQ=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=hT(gQ,n);return d.jsx(hy,{present:r||_d(a.checked)||a.checked===!0,children:d.jsx(An.span,{"data-state":bQ(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});yQ.displayName=gQ;var vQ="CheckboxBubbleInput",xQ=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:l,name:c,value:f,form:h,bubbleInput:g,setBubbleInput:m}=hT(vQ,e),b=Ar(n,m),y=IO(a),x=TO(r);E.useEffect(()=>{const _=g;if(!_)return;const k=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(k,"checked").set,j=!i.current;if(y!==a&&C){const L=new Event("click",{bubbles:j});_.indeterminate=_d(a),C.call(_,_d(a)?!1:a),_.dispatchEvent(L)}},[g,y,a,i]);const w=E.useRef(_d(a)?!1:a);return d.jsx(An.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??w.current,required:s,disabled:l,name:c,value:f,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xQ.displayName=vQ;function r6e(e){return typeof e=="function"}function _d(e){return e==="indeterminate"}function bQ(e){return _d(e)?"indeterminate":e?"checked":"unchecked"}const wQ=E.forwardRef(({className:e,...t},n)=>d.jsx(pT,{ref:n,className:Un("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:d.jsx(yQ,{className:Un("flex items-center justify-center text-current"),children:d.jsx(Od,{className:"h-4 w-4"})})}));wQ.displayName=pT.displayName;function i6e({onAccepted:e,onClose:t}){const[n,r]=E.useState(!1),[i,a]=E.useState(!1),[o,s]=E.useState(null),l=async()=>{var c,f;a(!0),s(null);try{await ut.functions.invoke("acceptDpa",{}),e()}catch(h){s(((f=(c=h==null?void 0:h.response)==null?void 0:c.data)==null?void 0:f.error)||h.message||"Failed to record DPA acceptance.")}a(!1)};return d.jsx(dT,{onClose:t,maxWidth:"max-w-lg",children:d.jsxs("div",{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/30 flex items-center justify-center",children:d.jsx(mg,{className:"w-5 h-5 text-primary"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-base font-bold text-foreground",children:"Data Processing Agreement"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Required before connecting your first site"})]})]}),d.jsxs("div",{className:"bg-muted/30 border border-border/40 rounded-xl p-4 space-y-3 text-sm text-muted-foreground leading-relaxed",children:[d.jsxs("p",{children:["By using ShieldSync, you agree to our"," ",d.jsxs("a",{href:"/dpa",target:"_blank",className:"text-primary hover:underline inline-flex items-center gap-1",children:["Data Processing Agreement",d.jsx(PU,{className:"w-3 h-3"})]})," ","as the ",d.jsx("strong",{className:"text-foreground",children:"data controller"})," for your website's traffic."]}),d.jsxs("p",{children:["ShieldSync acts as a ",d.jsx("strong",{className:"text-foreground",children:"data processor"})," on your behalf under GDPR Article 28. We process visitor IP addresses and request metadata solely for security purposes."]})]}),d.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[d.jsx(wQ,{checked:n,onCheckedChange:c=>r(!!c),className:"mt-0.5"}),d.jsx("span",{className:"text-sm text-foreground group-hover:text-primary transition-colors",children:"I accept the Data Processing Agreement"})]}),o&&d.jsx("div",{className:"text-xs text-destructive bg-destructive/10 border border-destructive/30 rounded-lg px-3 py-2",children:o}),d.jsxs("div",{className:"flex gap-3",children:[d.jsx(Ot,{variant:"outline",onClick:t,className:"flex-1",children:"Cancel"}),d.jsxs(Ot,{onClick:l,disabled:!n||i,className:"flex-1 bg-primary text-primary-foreground gap-2",children:[i?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(Ki,{className:"w-4 h-4"}),i?"Saving…":"Accept & Continue"]})]})]})})}function a6e({domain:e,siteName:t}){const n=`https://${e}`,r=t||e;return d.jsxs("div",{className:"space-y-2",children:[d.jsx("p",{className:"text-[10px] uppercase tracking-wider text-primary font-semibold",children:"Google Search Preview"}),d.jsxs("div",{className:"bg-white rounded-xl p-4 space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2 bg-[#f1f3f4] rounded-full px-3 py-1.5 mb-3",children:[d.jsx(EU,{className:"w-3.5 h-3.5 text-[#9aa0a6]"}),d.jsx("span",{className:"text-xs text-[#202124]",children:e})]}),d.jsx("p",{className:"text-xs text-[#202124] font-sans",children:n}),d.jsxs("p",{className:"text-base text-[#1a0dab] font-sans hover:underline cursor-default leading-tight",children:[r," — Secured by ShieldSync"]}),d.jsxs("p",{className:"text-xs text-[#4d5156] font-sans leading-relaxed",children:[e," is protected by ShieldSync web security. All traffic is monitored, threats are blocked in real time, and your data is safe."]})]})]})}const o6e=["info","dns","verify","activate","ssl","done"];function s6e({onClose:e,features:t}){const r=((t==null?void 0:t.plan)||(t==null?void 0:t.tier)||"free")==="free",i=Li(),[a,o]=E.useState("info"),[s,l]=E.useState(!1),[c,f]=E.useState(null),[h,g]=E.useState(!1),[m,b]=E.useState(!1),[y,x]=E.useState(!0),[w,_]=E.useState(""),[k,P]=E.useState(""),[C,j]=E.useState(""),[L,R]=E.useState(null),[D,H]=E.useState(null),[M,F]=E.useState(!1);E.useEffect(()=>{ut.auth.me().then($=>{$!=null&&$.dpa_accepted?b(!0):g(!0),x(!1)}).catch(()=>x(!1))},[]);const W=()=>{g(!1),b(!0),i.invalidateQueries({queryKey:["currentUser"]})};if(h&&!y)return d.jsx(i6e,{onAccepted:W,onClose:e});const V=w.replace(/^https?:\/\//,"").split("/")[0],X=$=>ut.functions.invoke("siteSetup",$).then(q=>q.data),Y=async()=>{var $,q,re;if(!(!w||!k)){l(!0),f(null);try{const le=await X({action:"register",url:w.startsWith("http")?w:`https://${w}`,origin_host:k,name:C||V});R(($=le.site)==null?void 0:$.id),H(le.server_ip),i.invalidateQueries({queryKey:["sites"]}),o("dns")}catch(le){f(((re=(q=le==null?void 0:le.response)==null?void 0:q.data)==null?void 0:re.error)||le.message)}l(!1)}},Z=async()=>{var $,q;l(!0),f(null);try{(await X({action:"verify_dns",domain:V,site_id:L})).verified?(o("activate"),f(null)):f("DNS hasn't propagated yet — this can take up to 30 minutes. Try again shortly.")}catch(re){f(((q=($=re==null?void 0:re.response)==null?void 0:$.data)==null?void 0:q.error)||re.message)}l(!1)},K=async()=>{var $,q;l(!0),f(null);try{await X({action:"activate_proxy",site_id:L}),o("ssl")}catch(re){f(((q=($=re==null?void 0:re.response)==null?void 0:$.data)==null?void 0:q.error)||re.message)}l(!1)},se=async()=>{l(!0),f(null);try{await X({action:"issue_ssl",site_id:L}),i.invalidateQueries({queryKey:["sites"]}),o("done")}catch{f("SSL issuance can take a few minutes — you can retry from Site Settings.")}l(!1)},z=()=>{D&&(navigator.clipboard.writeText(D),F(!0),setTimeout(()=>F(!1),2e3))},te=o6e.indexOf(a);return d.jsxs(dT,{onClose:e,maxWidth:"max-w-lg",children:[d.jsx("div",{className:"flex items-center justify-between p-6 pr-14 border-b border-border/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/30 flex items-center justify-center",children:d.jsx(Oh,{className:"w-5 h-5 text-primary"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-base font-bold text-foreground",children:a==="done"?"Protection Active":"Add Site"}),V&&a!=="info"&&d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 font-mono",children:V})]})]})}),a!=="info"&&a!=="done"&&d.jsx("div",{className:"px-6 pt-4",children:d.jsx("div",{className:"flex gap-1.5",children:["Register","DNS","Verify","Proxy","SSL"].map(($,q)=>d.jsxs("div",{className:"flex-1 space-y-1",children:[d.jsx("div",{className:`h-1 rounded-full transition-colors ${q<te?"bg-accent":q===te?"bg-primary":"bg-border"}`}),d.jsx("p",{className:`text-[9px] font-medium text-center ${q<te?"text-accent":q===te?"text-primary":"text-muted-foreground/40"}`,children:$})]},$))})}),d.jsx("div",{className:"p-6",children:d.jsxs(us,{mode:"wait",children:[a==="info"&&d.jsx(xm,{children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Domain to protect"}),d.jsx(qr,{placeholder:"e.g. mystore.com",value:w,onChange:$=>_($.target.value),className:"bg-muted/50 border-border/50 font-mono text-sm"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Original hosting address"}),d.jsx(qr,{placeholder:"e.g. mysite.webflow.io, mysite.framer.app, or 123.45.67.89",value:k,onChange:$=>P($.target.value),className:"bg-muted/50 border-border/50 font-mono text-sm"}),d.jsx("p",{className:"text-[11px] text-muted-foreground",children:"This is where your site is currently hosted — Webflow, Framer, Bubble, or a custom server IP."})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Display name (optional)"}),d.jsx(qr,{placeholder:"My Store",value:C,onChange:$=>j($.target.value),className:"bg-muted/50 border-border/50 text-sm"})]}),d.jsx(Yx,{error:c}),d.jsxs(Ot,{onClick:Y,disabled:s||!w||!k,className:"w-full bg-primary text-primary-foreground gap-2",children:[s?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(zg,{className:"w-4 h-4"}),s?"Registering…":"Continue"]})]})},"info"),a==="dns"&&d.jsx(xm,{children:d.jsxs("div",{className:"space-y-5",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:["To activate ShieldSync protection, point your domain's DNS ",d.jsx("strong",{className:"text-foreground",children:"A records"})," to our proxy server."]}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Go to your domain registrar (GoDaddy, Namecheap, Cloudflare, etc.) and create ",d.jsx("strong",{className:"text-foreground",children:"both"})," of the following records:"]}),d.jsxs("div",{className:"bg-muted/30 border border-border/40 rounded-xl p-4 space-y-2 font-mono text-sm",children:[d.jsx("p",{className:"text-[10px] uppercase tracking-wider text-primary font-sans font-semibold mb-1",children:"Record 1 — root domain"}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Type:"}),d.jsx("span",{className:"text-foreground font-semibold",children:"A"})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Name:"}),d.jsx("span",{className:"text-foreground font-semibold",children:"@"})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-muted-foreground",children:"Value:"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-primary font-bold",children:D}),d.jsx("button",{onClick:z,className:"text-muted-foreground hover:text-primary transition-colors",children:M?d.jsx(ss,{className:"w-3.5 h-3.5 text-accent"}):d.jsx(Yv,{className:"w-3.5 h-3.5"})})]})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"TTL:"}),d.jsx("span",{className:"text-foreground font-semibold",children:"300 (or lowest)"})]})]}),d.jsxs("div",{className:"bg-muted/30 border border-border/40 rounded-xl p-4 space-y-2 font-mono text-sm",children:[d.jsx("p",{className:"text-[10px] uppercase tracking-wider text-primary font-sans font-semibold mb-1",children:"Record 2 — www subdomain"}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Type:"}),d.jsx("span",{className:"text-foreground font-semibold",children:"A"})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Name:"}),d.jsx("span",{className:"text-foreground font-semibold",children:"www"})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-muted-foreground",children:"Value:"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-primary font-bold",children:D}),d.jsx("button",{onClick:z,className:"text-muted-foreground hover:text-primary transition-colors",children:M?d.jsx(ss,{className:"w-3.5 h-3.5 text-accent"}):d.jsx(Yv,{className:"w-3.5 h-3.5"})})]})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"TTL:"}),d.jsx("span",{className:"text-foreground font-semibold",children:"300 (or lowest)"})]})]}),d.jsxs("div",{className:"flex items-start gap-2 text-xs text-neon-orange bg-neon-orange/10 border border-neon-orange/30 rounded-lg p-3",children:[d.jsx(so,{className:"w-3.5 h-3.5 flex-shrink-0 mt-0.5"}),d.jsxs("span",{children:["You need ",d.jsx("strong",{children:"both"})," records — one for ",d.jsx("code",{className:"font-mono",children:"@"})," (e.g. direktesalg.com) and one for ",d.jsx("code",{className:"font-mono",children:"www"})," (e.g. www.direktesalg.com). Missing either will break part of your traffic."]})]}),d.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground bg-primary/5 border border-primary/20 rounded-lg p-3",children:[d.jsx(jc,{className:"w-3.5 h-3.5 text-primary flex-shrink-0 mt-0.5"}),d.jsxs("span",{children:["This does ",d.jsx("strong",{className:"text-foreground",children:"NOT"})," take your site offline — your site continues to load normally, it just routes through ShieldSync first so we can protect it."]})]}),d.jsxs(Ot,{onClick:()=>{f(null),o("verify")},className:"w-full bg-primary text-primary-foreground gap-2",children:[d.jsx($S,{className:"w-4 h-4"}),"I've updated my DNS — verify it"]})]})},"dns"),a==="verify"&&d.jsx(xm,{children:d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx($S,{className:"w-8 h-8 text-primary mx-auto"}),d.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Verifying DNS records…"}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Checking if ",V," points to our proxy server."]})]}),d.jsx(Yx,{error:c}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(Ot,{variant:"outline",onClick:()=>{f(null),o("dns")},className:"gap-2",children:[d.jsx(Db,{className:"w-4 h-4"}),"Back"]}),d.jsxs(Ot,{onClick:Z,disabled:s,className:"flex-1 bg-primary text-primary-foreground gap-2",children:[s?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx($S,{className:"w-4 h-4"}),s?"Checking…":"Verify DNS"]})]})]})},"verify"),a==="activate"&&d.jsx(xm,{children:d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx(ss,{className:"w-8 h-8 text-accent mx-auto"}),d.jsx("p",{className:"text-sm font-semibold text-foreground",children:"DNS verified!"}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Ready to activate the ShieldSync proxy for ",V,"."]})]}),d.jsx(Yx,{error:c}),d.jsxs(Ot,{onClick:K,disabled:s,className:"w-full bg-primary text-primary-foreground gap-2",children:[s?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(Oh,{className:"w-4 h-4"}),s?"Activating proxy…":"Activate Proxy"]})]})},"activate"),a==="ssl"&&d.jsx(xm,{children:d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx(Oh,{className:"w-8 h-8 text-accent mx-auto"}),d.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Proxy active!"}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Now let's issue a free HTTPS certificate for ",V,"."]})]}),d.jsx(Yx,{error:c}),d.jsxs(Ot,{onClick:se,disabled:s,className:"w-full bg-primary text-primary-foreground gap-2",children:[s?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(Vg,{className:"w-4 h-4"}),s?"Issuing SSL certificate…":"Issue SSL Certificate"]})]})},"ssl"),a==="done"&&d.jsx(xm,{children:d.jsxs("div",{className:"text-center space-y-4",children:[d.jsx("div",{className:`w-16 h-16 rounded-full ${r?"bg-primary/10 border-primary/30":"bg-accent/10 border-accent/30"} border flex items-center justify-center mx-auto`,children:r?d.jsx(n1,{className:"w-8 h-8 text-primary"}):d.jsx(Oh,{className:"w-8 h-8 text-accent"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-lg font-bold text-foreground",children:r?"👀 Monitoring Active":"🎉 Protection Active"}),d.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Your site ",d.jsx("strong",{className:"text-foreground font-mono",children:V})," is now ",r?"being monitored":"fully protected"," by ShieldSync."]})]}),r?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"bg-muted/30 border border-border/40 rounded-xl p-4 text-left space-y-2 text-xs text-muted-foreground",children:[d.jsx("p",{children:"✓ All traffic routes through ShieldSync"}),d.jsx("p",{children:"✓ Attacks are detected and logged"}),d.jsx("p",{children:"✓ Threat logs and alerts appear automatically"}),d.jsx("p",{children:"✓ No further DNS changes needed"})]}),d.jsxs("div",{className:"flex items-start gap-2 text-xs text-neon-orange bg-neon-orange/10 border border-neon-orange/30 rounded-lg p-3 text-left",children:[d.jsx(so,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-semibold text-neon-orange",children:"Free plan — Detection only"}),d.jsx("p",{className:"text-muted-foreground mt-0.5",children:"You can see attacks in real time, but automatic blocking, IP banning, and Google SEO pre-rendering require a paid plan."}),d.jsx("a",{href:"/dashboard/subscription",onClick:e,className:"inline-block mt-1.5 text-neon-orange font-semibold hover:underline",children:"Upgrade to start blocking →"})]})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"bg-muted/30 border border-border/40 rounded-xl p-4 text-left space-y-2 text-xs text-muted-foreground",children:[d.jsx("p",{children:"✓ All traffic routes through ShieldSync"}),d.jsx("p",{children:"✓ Attacks are detected and blocked in real time"}),d.jsx("p",{children:"✓ HTTPS certificate is active — no action needed"}),d.jsx("p",{children:"✓ Threat logs and alerts appear automatically"}),d.jsx("p",{children:"✓ No further DNS changes needed"})]}),d.jsx(a6e,{domain:V,siteName:C||V})]}),d.jsx(hQ,{}),d.jsx(Ot,{onClick:e,className:`w-full ${r?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-accent text-accent-foreground hover:bg-accent/90"}`,children:"Go to Dashboard"})]})},"done")]})})]})}function xm({children:e}){return d.jsx(He.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:e})}function Yx({error:e}){return e?d.jsxs("div",{className:"flex items-start gap-2 text-xs text-destructive bg-destructive/10 border border-destructive/30 rounded-lg px-3 py-2.5",children:[d.jsx(so,{className:"w-3.5 h-3.5 flex-shrink-0 mt-0.5"}),d.jsx("span",{children:e})]}):null}const l6e={free:"Free",starter:"Starter",pro:"Pro",compliance:"Business",enterprise:"Enterprise"};function c6e({used:e,max:t,plan:n}){const r=t===-1,i=r?1/0:Math.max(0,t-e),a=!r&&i===0,o=r?0:Math.min(100,e/t*100),s=l6e[n]||"Free";return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-4 flex items-center justify-between gap-4 flex-wrap",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center ${a?"bg-destructive/15 text-destructive":"bg-primary/15 text-primary"}`,children:d.jsx(jc,{className:"w-4 h-4"})}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsxs("span",{className:"text-sm font-semibold text-foreground",children:[e," / ",r?"∞":t," sites used"]}),d.jsxs("span",{className:"text-[10px] font-mono uppercase tracking-wider text-muted-foreground",children:[s," plan"]})]}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:r?"Unlimited sites on your plan":a?"You've reached your site limit — upgrade for more slots":`${i} ${i===1?"slot":"slots"} remaining`}),!r&&d.jsx("div",{className:"mt-2 w-48 h-1 bg-muted rounded-full overflow-hidden",children:d.jsx("div",{className:`h-full transition-all ${a?"bg-destructive":"bg-primary"}`,style:{width:`${o}%`}})})]})]}),a&&d.jsx(va,{to:"/dashboard/subscription",children:d.jsxs(Ot,{size:"sm",className:"bg-primary text-primary-foreground gap-1.5 text-xs",children:[d.jsx(Bb,{className:"w-3.5 h-3.5"}),"Upgrade for more"]})})]})}function u6e(){const[e,t]=E.useState(!1),n=Li(),{toast:r}=Gs(),{user:i,features:a}=kp()||{},{data:o=[],isLoading:s}=dn({queryKey:["sites",i==null?void 0:i.email],queryFn:()=>Fc(ut.entities.Site,{created_by:i.email}),enabled:!!(i!=null&&i.email),initialData:[]}),l=Hi({mutationFn:b=>ut.functions.invoke("siteApi",{action:"delete_site",site_id:b}).then(y=>y.data),onSuccess:()=>{n.invalidateQueries({queryKey:["sites"]}),r({title:"Site removed",description:"The site has been deleted."})},onError:b=>r({title:"Error",description:b.message,variant:"destructive"})}),c=(a==null?void 0:a.max_sites)??1,f=(a==null?void 0:a.plan)||(a==null?void 0:a.tier)||(i==null?void 0:i.plan)||"free",g=!(c===-1)&&o.length>=c,m=()=>{if(g){r({title:"Site limit reached",description:`Your ${f} plan allows ${c} ${c===1?"site":"sites"}. Upgrade to add more.`,variant:"destructive"});return}t(!0)};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Sites"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage your monitored websites"})]}),d.jsxs(Ot,{onClick:m,disabled:g,className:"bg-primary text-primary-foreground gap-2 disabled:opacity-60 disabled:cursor-not-allowed",children:[g?d.jsx(Vg,{className:"w-4 h-4"}):d.jsx(S2,{className:"w-4 h-4"}),"Add Site"]})]}),d.jsx(c6e,{used:o.length,max:c,plan:f}),d.jsx(us,{children:e&&d.jsx(s6e,{onClose:()=>t(!1),features:a})}),s?d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx(hn,{className:"w-6 h-6 animate-spin text-primary"})}):d.jsx(fQ,{sites:o,onDelete:b=>l.mutate(b),deletingId:l.isPending?l.variables:null})]})}const SQ=["cors_wildcard","cors_reflected_origin","cors_credentials_any_origin","cors_dangerous_methods","admin_panel_exposed","no_rate_limiting"],f6e=["missing_security_header","info_disclosure_header","ssl_expired","ssl_expiring_soon","ssl_invalid_cert","no_https","weak_tls","exposed_file","sql_injection","reflected_xss","path_traversal","open_redirect","idor_vulnerability","broken_auth_unprotected_api","graphql_introspection_enabled","api_user_enumeration"];function d6e(e){return SQ.includes(e.type)?"platform":e.severity==="info"?"info":(f6e.includes(e.type),"action")}function Q$(e=[]){return e.filter(t=>SQ.includes(t.type)).length}const J$={critical:"bg-destructive/20 text-destructive border-destructive/30",high:"bg-destructive/20 text-destructive border-destructive/30",medium:"bg-neon-orange/20 text-neon-orange border-neon-orange/30",low:"bg-muted text-muted-foreground border-border",info:"bg-muted text-muted-foreground border-border"};function Sh({title:e,icon:t,iconColor:n,findings:r=[],emptyMessage:i}){return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"p-4 border-b border-border/30 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(t,{className:`w-4 h-4 ${n}`}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e})]}),d.jsx(Oi,{variant:"outline",className:"text-[10px] font-mono",children:r.length})]}),r.length===0?d.jsxs("div",{className:"p-5 flex items-center gap-2 text-sm text-accent",children:[d.jsx(ss,{className:"w-4 h-4"}),d.jsx("span",{children:i||"No issues found"})]}):d.jsx("div",{className:"divide-y divide-border/20",children:r.map((a,o)=>{const s=d6e(a);return d.jsxs("div",{className:"p-4 space-y-2 hover:bg-muted/10 transition-colors",children:[d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsx("p",{className:"text-sm text-foreground",children:a.detail}),d.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[s==="platform"&&d.jsxs(Oi,{className:"text-[10px] border bg-muted text-muted-foreground border-border gap-1",children:[d.jsx(mE,{className:"w-2.5 h-2.5"})," Platform Issue"]}),s==="action"&&d.jsxs(Oi,{className:"text-[10px] border bg-destructive/20 text-destructive border-destructive/30 gap-1",children:[d.jsx(so,{className:"w-2.5 h-2.5"})," Action Required"]}),d.jsx(Oi,{className:`text-[10px] border ${J$[a.severity]||J$.info}`,children:a.severity})]})]}),s==="platform"?d.jsxs("p",{className:"text-xs text-muted-foreground",children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Note: "}),"This is controlled by your hosting platform, not your own code. Share this report with your hosting provider."]}):a.recommendation?d.jsxs("p",{className:"text-xs text-muted-foreground",children:[d.jsx("span",{className:"text-primary font-medium",children:"Fix: "}),a.recommendation]}):null]},o)})})]})}function h6e(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const p6e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m6e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,g6e={};function Z$(e,t){return(g6e.jsx?m6e:p6e).test(e)}const y6e=/[ \t\n\f\r]/g;function v6e(e){return typeof e=="object"?e.type==="text"?e9(e.value):!1:e9(e)}function e9(e){return e.replace(y6e,"")===""}class j1{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}j1.prototype.normal={};j1.prototype.property={};j1.prototype.space=void 0;function _Q(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new j1(n,r,t)}function VC(e){return e.toLowerCase()}class Io{constructor(t,n){this.attribute=n,this.property=t}}Io.prototype.attribute="";Io.prototype.booleanish=!1;Io.prototype.boolean=!1;Io.prototype.commaOrSpaceSeparated=!1;Io.prototype.commaSeparated=!1;Io.prototype.defined=!1;Io.prototype.mustUseProperty=!1;Io.prototype.number=!1;Io.prototype.overloadedBoolean=!1;Io.prototype.property="";Io.prototype.spaceSeparated=!1;Io.prototype.space=void 0;let x6e=0;const pn=Tp(),ji=Tp(),WC=Tp(),nt=Tp(),_r=Tp(),Xm=Tp(),es=Tp();function Tp(){return 2**++x6e}const HC=Object.freeze(Object.defineProperty({__proto__:null,boolean:pn,booleanish:ji,commaOrSpaceSeparated:es,commaSeparated:Xm,number:nt,overloadedBoolean:WC,spaceSeparated:_r},Symbol.toStringTag,{value:"Module"})),jP=Object.keys(HC);class mT extends Io{constructor(t,n,r,i){let a=-1;if(super(t,n),t9(this,"space",i),typeof r=="number")for(;++a<jP.length;){const o=jP[a];t9(this,jP[a],(r&HC[o])===HC[o])}}}mT.prototype.defined=!0;function t9(e,t,n){n&&(e[t]=n)}function py(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new mT(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[VC(r)]=r,n[VC(a.attribute)]=r}return new j1(t,n,e.space)}const NQ=py({properties:{ariaActiveDescendant:null,ariaAtomic:ji,ariaAutoComplete:null,ariaBusy:ji,ariaChecked:ji,ariaColCount:nt,ariaColIndex:nt,ariaColSpan:nt,ariaControls:_r,ariaCurrent:null,ariaDescribedBy:_r,ariaDetails:null,ariaDisabled:ji,ariaDropEffect:_r,ariaErrorMessage:null,ariaExpanded:ji,ariaFlowTo:_r,ariaGrabbed:ji,ariaHasPopup:null,ariaHidden:ji,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_r,ariaLevel:nt,ariaLive:null,ariaModal:ji,ariaMultiLine:ji,ariaMultiSelectable:ji,ariaOrientation:null,ariaOwns:_r,ariaPlaceholder:null,ariaPosInSet:nt,ariaPressed:ji,ariaReadOnly:ji,ariaRelevant:null,ariaRequired:ji,ariaRoleDescription:_r,ariaRowCount:nt,ariaRowIndex:nt,ariaRowSpan:nt,ariaSelected:ji,ariaSetSize:nt,ariaSort:null,ariaValueMax:nt,ariaValueMin:nt,ariaValueNow:nt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function kQ(e,t){return t in e?e[t]:t}function AQ(e,t){return kQ(e,t.toLowerCase())}const b6e=py({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xm,acceptCharset:_r,accessKey:_r,action:null,allow:null,allowFullScreen:pn,allowPaymentRequest:pn,allowUserMedia:pn,alt:null,as:null,async:pn,autoCapitalize:null,autoComplete:_r,autoFocus:pn,autoPlay:pn,blocking:_r,capture:null,charSet:null,checked:pn,cite:null,className:_r,cols:nt,colSpan:null,content:null,contentEditable:ji,controls:pn,controlsList:_r,coords:nt|Xm,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pn,defer:pn,dir:null,dirName:null,disabled:pn,download:WC,draggable:ji,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pn,formTarget:null,headers:_r,height:nt,hidden:WC,high:nt,href:null,hrefLang:null,htmlFor:_r,httpEquiv:_r,id:null,imageSizes:null,imageSrcSet:null,inert:pn,inputMode:null,integrity:null,is:null,isMap:pn,itemId:null,itemProp:_r,itemRef:_r,itemScope:pn,itemType:_r,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pn,low:nt,manifest:null,max:null,maxLength:nt,media:null,method:null,min:null,minLength:nt,multiple:pn,muted:pn,name:null,nonce:null,noModule:pn,noValidate:pn,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:pn,optimum:nt,pattern:null,ping:_r,placeholder:null,playsInline:pn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pn,referrerPolicy:null,rel:_r,required:pn,reversed:pn,rows:nt,rowSpan:nt,sandbox:_r,scope:null,scoped:pn,seamless:pn,selected:pn,shadowRootClonable:pn,shadowRootDelegatesFocus:pn,shadowRootMode:null,shape:null,size:nt,sizes:null,slot:null,span:nt,spellCheck:ji,src:null,srcDoc:null,srcLang:null,srcSet:null,start:nt,step:null,style:null,tabIndex:nt,target:null,title:null,translate:null,type:null,typeMustMatch:pn,useMap:null,value:ji,width:nt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_r,axis:null,background:null,bgColor:null,border:nt,borderColor:null,bottomMargin:nt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pn,declare:pn,event:null,face:null,frame:null,frameBorder:null,hSpace:nt,leftMargin:nt,link:null,longDesc:null,lowSrc:null,marginHeight:nt,marginWidth:nt,noResize:pn,noHref:pn,noShade:pn,noWrap:pn,object:null,profile:null,prompt:null,rev:null,rightMargin:nt,rules:null,scheme:null,scrolling:ji,standby:null,summary:null,text:null,topMargin:nt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:nt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pn,disableRemotePlayback:pn,prefix:null,property:null,results:nt,security:null,unselectable:null},space:"html",transform:AQ}),w6e=py({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-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:nt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:nt,amplitude:nt,arabicForm:null,ascent:nt,attributeName:null,attributeType:null,azimuth:nt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:nt,by:null,calcMode:null,capHeight:nt,className:_r,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:nt,diffuseConstant:nt,direction:null,display:null,dur:null,divisor:nt,dominantBaseline:null,download:pn,dx:null,dy:null,edgeMode:null,editable:null,elevation:nt,enableBackground:null,end:null,event:null,exponent:nt,externalResourcesRequired:null,fill:null,fillOpacity:nt,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:Xm,g2:Xm,glyphName:Xm,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:nt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:nt,horizOriginX:nt,horizOriginY:nt,id:null,ideographic:nt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:nt,k:nt,k1:nt,k2:nt,k3:nt,k4:nt,kernelMatrix:es,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:nt,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:nt,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,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:nt,overlineThickness:nt,paintOrder:null,panose1:null,path:null,pathLength:nt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_r,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:nt,pointsAtY:nt,pointsAtZ:nt,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:nt,specularExponent:nt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:nt,strikethroughThickness:nt,string:null,stroke:null,strokeDashArray:es,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:nt,strokeOpacity:nt,strokeWidth:null,style:null,surfaceScale:nt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:es,tabIndex:nt,tableValues:null,target:null,targetX:nt,targetY:nt,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:nt,underlineThickness:nt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:nt,values:null,vAlphabetic:nt,vMathematical:nt,vectorEffect:null,vHanging:nt,vIdeographic:nt,version:null,vertAdvY:nt,vertOriginX:nt,vertOriginY:nt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:nt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kQ}),PQ=py({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()}}),jQ=py({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:AQ}),CQ=py({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),S6e={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"},_6e=/[A-Z]/g,n9=/-[a-z]/g,N6e=/^data[-\w.:]+$/i;function k6e(e,t){const n=VC(t);let r=t,i=Io;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&N6e.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(n9,P6e);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!n9.test(a)){let o=a.replace(_6e,A6e);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=mT}return new i(r,t)}function A6e(e){return"-"+e.toLowerCase()}function P6e(e){return e.charAt(1).toUpperCase()}const j6e=_Q([NQ,b6e,PQ,jQ,CQ],"html"),gT=_Q([NQ,w6e,PQ,jQ,CQ],"svg");function C6e(e){return e.join(" ").trim()}var bm={},CP,r9;function E6e(){if(r9)return CP;r9=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
`,c="/",f="*",h="",g="comment",m="declaration";function b(x,w){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];w=w||{};var _=1,k=1;function P(V){var X=V.match(t);X&&(_+=X.length);var Y=V.lastIndexOf(l);k=~Y?V.length-Y:k+V.length}function C(){var V={line:_,column:k};return function(X){return X.position=new j(V),D(),X}}function j(V){this.start=V,this.end={line:_,column:k},this.source=w.source}j.prototype.content=x;function L(V){var X=new Error(w.source+":"+_+":"+k+": "+V);if(X.reason=V,X.filename=w.source,X.line=_,X.column=k,X.source=x,!w.silent)throw X}function R(V){var X=V.exec(x);if(X){var Y=X[0];return P(Y),x=x.slice(Y.length),X}}function D(){R(n)}function H(V){var X;for(V=V||[];X=M();)X!==!1&&V.push(X);return V}function M(){var V=C();if(!(c!=x.charAt(0)||f!=x.charAt(1))){for(var X=2;h!=x.charAt(X)&&(f!=x.charAt(X)||c!=x.charAt(X+1));)++X;if(X+=2,h===x.charAt(X-1))return L("End of comment missing");var Y=x.slice(2,X-2);return k+=2,P(Y),x=x.slice(X),k+=2,V({type:g,comment:Y})}}function F(){var V=C(),X=R(r);if(X){if(M(),!R(i))return L("property missing ':'");var Y=R(a),Z=V({type:m,property:y(X[0].replace(e,h)),value:Y?y(Y[0].replace(e,h)):h});return R(o),Z}}function W(){var V=[];H(V);for(var X;X=F();)X!==!1&&(V.push(X),H(V));return V}return D(),W()}function y(x){return x?x.replace(s,h):h}return CP=b,CP}var i9;function O6e(){if(i9)return bm;i9=1;var e=bm&&bm.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bm,"__esModule",{value:!0}),bm.default=n;const t=e(E6e());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const o=(0,t.default)(r),s=typeof i=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:f}=l;s?i(c,f,l):f&&(a=a||{},a[c]=f)}),a}return bm}var dv={},a9;function T6e(){if(a9)return dv;a9=1,Object.defineProperty(dv,"__esModule",{value:!0}),dv.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},o=function(c,f){return f.toUpperCase()},s=function(c,f){return"".concat(f,"-")},l=function(c,f){return f===void 0&&(f={}),a(c)?c:(c=c.toLowerCase(),f.reactCompat?c=c.replace(i,s):c=c.replace(r,s),c.replace(t,o))};return dv.camelCase=l,dv}var hv,o9;function M6e(){if(o9)return hv;o9=1;var e=hv&&hv.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(O6e()),n=T6e();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,l){s&&l&&(o[(0,n.camelCase)(s,a)]=l)}),o}return r.default=r,hv=r,hv}var L6e=M6e();const R6e=Kn(L6e),EQ=OQ("end"),yT=OQ("start");function OQ(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function I6e(e){const t=yT(e),n=EQ(e);if(t&&n)return{start:t,end:n}}function qv(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?s9(e.position):"start"in e||"end"in e?s9(e):"line"in e||"column"in e?YC(e):""}function YC(e){return l9(e&&e.line)+":"+l9(e&&e.column)}function s9(e){return YC(e&&e.start)+"-"+YC(e&&e.end)}function l9(e){return e&&typeof e=="number"?e:1}class Va extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=qv(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Va.prototype.file="";Va.prototype.name="";Va.prototype.reason="";Va.prototype.message="";Va.prototype.stack="";Va.prototype.column=void 0;Va.prototype.line=void 0;Va.prototype.ancestors=void 0;Va.prototype.cause=void 0;Va.prototype.fatal=void 0;Va.prototype.place=void 0;Va.prototype.ruleId=void 0;Va.prototype.source=void 0;const vT={}.hasOwnProperty,D6e=new Map,F6e=/[A-Z]/g,B6e=new Set(["table","tbody","thead","tfoot","tr"]),$6e=new Set(["td","th"]),TQ="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function q6e(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=K6e(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=G6e(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?gT:j6e,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=MQ(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function MQ(e,t,n){if(t.type==="element")return U6e(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return z6e(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return W6e(e,t,n);if(t.type==="mdxjsEsm")return V6e(e,t);if(t.type==="root")return H6e(e,t,n);if(t.type==="text")return Y6e(e,t)}function U6e(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=gT,e.schema=i),e.ancestors.push(t);const a=RQ(e,t.tagName,!1),o=X6e(e,t);let s=bT(e,t);return B6e.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!v6e(l):!0})),LQ(e,o,a,t),xT(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function z6e(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Y0(e,t.position)}function V6e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Y0(e,t.position)}function W6e(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=gT,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:RQ(e,t.name,!0),o=Q6e(e,t),s=bT(e,t);return LQ(e,o,a,t),xT(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function H6e(e,t,n){const r={};return xT(r,bT(e,t)),e.create(t,e.Fragment,r,n)}function Y6e(e,t){return t.value}function LQ(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xT(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function G6e(e,t,n){return r;function r(i,a,o,s){const c=Array.isArray(o.children)?n:t;return s?c(a,o,s):c(a,o)}}function K6e(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),l=yT(r);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function X6e(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&vT.call(t.properties,i)){const a=J6e(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&$6e.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Q6e(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Y0(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Y0(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function bT(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:D6e;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const s=MQ(e,a,o);s!==void 0&&n.push(s)}return n}function J6e(e,t,n){const r=k6e(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?h6e(n):C6e(n)),r.property==="style"){let i=typeof n=="object"?n:Z6e(e,String(n));return e.stylePropertyNameCase==="css"&&(i=eLe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?S6e[r.property]||r.property:r.attribute,n]}}function Z6e(e,t){try{return R6e(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Va("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=TQ+"#cannot-parse-style-attribute",i}}function RQ(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=Z$(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=Z$(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return vT.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Y0(e)}function Y0(e,t){const n=new Va("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=TQ+"#cannot-handle-mdx-estrees-without-createevaluater",n}function eLe(e){const t={};let n;for(n in e)vT.call(e,n)&&(t[tLe(n)]=e[n]);return t}function tLe(e){let t=e.replace(F6e,nLe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function nLe(e){return"-"+e.toLowerCase()}const EP={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"]},rLe={};function iLe(e,t){const n=rLe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return IQ(e,r,i)}function IQ(e,t,n){if(aLe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return c9(e.children,t,n)}return Array.isArray(e)?c9(e,t,n):""}function c9(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=IQ(e[i],t,n);return r.join("")}function aLe(e){return!!(e&&typeof e=="object")}const u9=document.createElement("i");function wT(e){const t="&"+e+";";u9.innerHTML=t;const n=u9.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Mc(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function zs(e,t){return e.length>0?(Mc(e,e.length,0,t),e):t}const f9={}.hasOwnProperty;function oLe(e){const t={};let n=-1;for(;++n<e.length;)sLe(t,e[n]);return t}function sLe(e,t){let n;for(n in t){const i=(f9.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){f9.call(i,o)||(i[o]=[]);const s=a[o];lLe(i[o],Array.isArray(s)?s:s?[s]:[])}}}function lLe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Mc(e,0,0,r)}function DQ(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Qm(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gc=zd(/[A-Za-z]/),as=zd(/[\dA-Za-z]/),cLe=zd(/[#-'*+\--9=?A-Z^-~]/);function GC(e){return e!==null&&(e<32||e===127)}const KC=zd(/\d/),uLe=zd(/[\dA-Fa-f]/),fLe=zd(/[!-/:-@[-`{-~]/);function tn(e){return e!==null&&e<-2}function Lo(e){return e!==null&&(e<0||e===32)}function Gn(e){return e===-2||e===-1||e===32}const dLe=zd(new RegExp("\\p{P}|\\p{S}","u")),hLe=zd(/\s/);function zd(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function my(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&as(e.charCodeAt(n+1))&&as(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function kr(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return Gn(l)?(e.enter(n),s(l)):t(l)}function s(l){return Gn(l)&&a++<i?(e.consume(l),s):(e.exit(n),t(l))}}const pLe={tokenize:mLe};function mLe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),kr(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return tn(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const gLe={tokenize:yLe},d9={tokenize:vLe};function yLe(e){const t=this,n=[];let r=0,i,a,o;return s;function s(k){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,l,c)(k)}return c(k)}function l(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const P=t.events.length;let C=P,j;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){j=t.events[C][1].end;break}w(r);let L=P;for(;L<t.events.length;)t.events[L][1].end={...j},L++;return Mc(t.events,C+1,0,t.events.slice(P)),t.events.length=L,c(k)}return s(k)}function c(k){if(r===n.length){if(!i)return g(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(d9,f,h)(k)}function f(k){return i&&_(),w(r),g(k)}function h(k){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,b(k)}function g(k){return t.containerState={},e.attempt(d9,m,b)(k)}function m(k){return r++,n.push([t.currentConstruct,t.containerState]),g(k)}function b(k){if(k===null){i&&_(),w(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),y(k)}function y(k){if(k===null){x(e.exit("chunkFlow"),!0),w(0),e.consume(k);return}return tn(k)?(e.consume(k),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(k),y)}function x(k,P){const C=t.sliceStream(k);if(P&&C.push(null),k.previous=a,a&&(a.next=k),a=k,i.defineSkip(k.start),i.write(C),t.parser.lazy[k.start.line]){let j=i.events.length;for(;j--;)if(i.events[j][1].start.offset<o&&(!i.events[j][1].end||i.events[j][1].end.offset>o))return;const L=t.events.length;let R=L,D,H;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(D){H=t.events[R][1].end;break}D=!0}for(w(r),j=L;j<t.events.length;)t.events[j][1].end={...H},j++;Mc(t.events,R+1,0,t.events.slice(L)),t.events.length=j}}function w(k){let P=n.length;for(;P-- >k;){const C=n[P];t.containerState=C[1],C[0].exit.call(t,e)}n.length=k}function _(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function vLe(e,t,n){return kr(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function h9(e){if(e===null||Lo(e)||hLe(e))return 1;if(dLe(e))return 2}function ST(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const XC={name:"attention",resolveAll:xLe,tokenize:bLe};function xLe(e,t){let n=-1,r,i,a,o,s,l,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},g={...e[n][1].start};p9(h,-l),p9(g,l),o={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=zs(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=zs(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),c=zs(c,ST(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=zs(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=zs(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Mc(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function bLe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=h9(r);let a;return o;function o(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const c=e.exit("attentionSequence"),f=h9(l),h=!f||f===2&&i||n.includes(l),g=!i||i===2&&f||n.includes(r);return c._open=!!(a===42?h:h&&(i||!g)),c._close=!!(a===42?g:g&&(f||!h)),t(l)}}function p9(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wLe={name:"autolink",tokenize:SLe};function SLe(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(m){return gc(m)?(e.consume(m),o):m===64?n(m):c(m)}function o(m){return m===43||m===45||m===46||as(m)?(r=1,s(m)):c(m)}function s(m){return m===58?(e.consume(m),r=0,l):(m===43||m===45||m===46||as(m))&&r++<32?(e.consume(m),s):(r=0,c(m))}function l(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||GC(m)?n(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),f):cLe(m)?(e.consume(m),c):n(m)}function f(m){return as(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,f):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):g(m)}function g(m){if((m===45||as(m))&&r++<63){const b=m===45?g:h;return e.consume(m),b}return n(m)}}const F5={partial:!0,tokenize:_Le};function _Le(e,t,n){return r;function r(a){return Gn(a)?kr(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||tn(a)?t(a):n(a)}}const FQ={continuation:{tokenize:kLe},exit:ALe,name:"blockQuote",tokenize:NLe};function NLe(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Gn(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function kLe(e,t,n){const r=this;return i;function i(o){return Gn(o)?kr(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(FQ,t,n)(o)}}function ALe(e){e.exit("blockQuote")}const BQ={name:"characterEscape",tokenize:PLe};function PLe(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return fLe(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const $Q={name:"characterReference",tokenize:jLe};function jLe(e,t,n){const r=this;let i=0,a,o;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=as,f(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=uLe,f):(e.enter("characterReferenceValue"),a=7,o=KC,f(h))}function f(h){if(h===59&&i){const g=e.exit("characterReferenceValue");return o===as&&!wT(r.sliceSerialize(g))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(h)&&i++<a?(e.consume(h),f):n(h)}}const m9={partial:!0,tokenize:ELe},g9={concrete:!0,name:"codeFenced",tokenize:CLe};function CLe(e,t,n){const r=this,i={partial:!0,tokenize:C};let a=0,o=0,s;return l;function l(j){return c(j)}function c(j){const L=r.events[r.events.length-1];return a=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,s=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(j)}function f(j){return j===s?(o++,e.consume(j),f):o<3?n(j):(e.exit("codeFencedFenceSequence"),Gn(j)?kr(e,h,"whitespace")(j):h(j))}function h(j){return j===null||tn(j)?(e.exit("codeFencedFence"),r.interrupt?t(j):e.check(m9,y,P)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(j))}function g(j){return j===null||tn(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(j)):Gn(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),kr(e,m,"whitespace")(j)):j===96&&j===s?n(j):(e.consume(j),g)}function m(j){return j===null||tn(j)?h(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===null||tn(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(j)):j===96&&j===s?n(j):(e.consume(j),b)}function y(j){return e.attempt(i,P,x)(j)}function x(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),w}function w(j){return a>0&&Gn(j)?kr(e,_,"linePrefix",a+1)(j):_(j)}function _(j){return j===null||tn(j)?e.check(m9,y,P)(j):(e.enter("codeFlowValue"),k(j))}function k(j){return j===null||tn(j)?(e.exit("codeFlowValue"),_(j)):(e.consume(j),k)}function P(j){return e.exit("codeFenced"),t(j)}function C(j,L,R){let D=0;return H;function H(X){return j.enter("lineEnding"),j.consume(X),j.exit("lineEnding"),M}function M(X){return j.enter("codeFencedFence"),Gn(X)?kr(j,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):F(X)}function F(X){return X===s?(j.enter("codeFencedFenceSequence"),W(X)):R(X)}function W(X){return X===s?(D++,j.consume(X),W):D>=o?(j.exit("codeFencedFenceSequence"),Gn(X)?kr(j,V,"whitespace")(X):V(X)):R(X)}function V(X){return X===null||tn(X)?(j.exit("codeFencedFence"),L(X)):R(X)}}}function ELe(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const OP={name:"codeIndented",tokenize:TLe},OLe={partial:!0,tokenize:MLe};function TLe(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),kr(e,a,"linePrefix",5)(c)}function a(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):tn(c)?e.attempt(OLe,o,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||tn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function MLe(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):tn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):kr(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):tn(o)?i(o):n(o)}}const LLe={name:"codeText",previous:ILe,resolve:RLe,tokenize:DLe};function RLe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ILe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function DLe(e,t,n){let r=0,i,a;return o;function o(h){return e.enter("codeText"),e.enter("codeTextSequence"),s(h)}function s(h){return h===96?(e.consume(h),r++,s):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(a=e.enter("codeTextSequence"),i=0,f(h)):tn(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||tn(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",c(h))}}class FLe{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&pv(this.left,r),a.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),pv(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pv(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);pv(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pv(this.left,n.reverse())}}}function pv(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function qQ(e){const t={};let n=-1,r,i,a,o,s,l,c;const f=new FLe(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,BLe(f,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=f.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return Mc(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function BLe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],c={};let f,h,g=-1,m=n,b=0,y=0;const x=[y];for(;m;){for(;e.get(++i)[1]!==m;);a.push(i),m._tokenizer||(f=r.sliceStream(m),m.next||f.push(null),h&&o.defineSkip(m.start),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++g<s.length;)s[g][0]==="exit"&&s[g-1][0]==="enter"&&s[g][1].type===s[g-1][1].type&&s[g][1].start.line!==s[g][1].end.line&&(y=g+1,x.push(y),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(o.events=[],m?(m._tokenizer=void 0,m.previous=void 0):x.pop(),g=x.length;g--;){const w=s.slice(x[g],x[g+1]),_=a.pop();l.push([_,_+w.length-1]),e.splice(_,2,w)}for(l.reverse(),g=-1;++g<l.length;)c[b+l[g][0]]=b+l[g][1],b+=l[g][1]-l[g][0]-1;return c}const $Le={resolve:ULe,tokenize:zLe},qLe={partial:!0,tokenize:VLe};function ULe(e){return qQ(e),e}function zLe(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):tn(s)?e.check(qLe,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function VLe(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),kr(e,a,"linePrefix")}function a(o){if(o===null||tn(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function UQ(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(w){return w===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(w),e.exit(a),g):w===null||w===32||w===41||GC(w)?n(w):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(w))}function g(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===62?(e.exit("chunkString"),e.exit(s),g(w)):w===null||w===60||tn(w)?n(w):(e.consume(w),w===92?b:m)}function b(w){return w===60||w===62||w===92?(e.consume(w),m):m(w)}function y(w){return!f&&(w===null||w===41||Lo(w))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(w)):f<c&&w===40?(e.consume(w),f++,y):w===41?(e.consume(w),f--,y):w===null||w===32||w===40||GC(w)?n(w):(e.consume(w),w===92?x:y)}function x(w){return w===40||w===41||w===92?(e.consume(w),y):y(w)}}function zQ(e,t,n,r,i,a){const o=this;let s=0,l;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(a),f}function f(m){return s>999||m===null||m===91||m===93&&!l||m===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):tn(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||tn(m)||s++>999?(e.exit("chunkString"),f(m)):(e.consume(m),l||(l=!Gn(m)),m===92?g:h)}function g(m){return m===91||m===92||m===93?(e.consume(m),s++,h):h(m)}}function VQ(e,t,n,r,i,a){let o;return s;function s(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),o=g===40?41:g,l):n(g)}function l(g){return g===o?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(a),c(g))}function c(g){return g===o?(e.exit(a),l(o)):g===null?n(g):tn(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),kr(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===o||g===null||tn(g)?(e.exit("chunkString"),c(g)):(e.consume(g),g===92?h:f)}function h(g){return g===o||g===92?(e.consume(g),f):f(g)}}function Uv(e,t){let n;return r;function r(i){return tn(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Gn(i)?kr(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const WLe={name:"definition",tokenize:YLe},HLe={partial:!0,tokenize:GLe};function YLe(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),o(m)}function o(m){return zQ.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=Qm(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Lo(m)?Uv(e,c)(m):c(m)}function c(m){return UQ(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt(HLe,h,h)(m)}function h(m){return Gn(m)?kr(e,g,"whitespace")(m):g(m)}function g(m){return m===null||tn(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function GLe(e,t,n){return r;function r(s){return Lo(s)?Uv(e,i)(s):n(s)}function i(s){return VQ(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Gn(s)?kr(e,o,"whitespace")(s):o(s)}function o(s){return s===null||tn(s)?t(s):n(s)}}const KLe={name:"hardBreakEscape",tokenize:XLe};function XLe(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return tn(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const QLe={name:"headingAtx",resolve:JLe,tokenize:ZLe};function JLe(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Mc(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function ZLe(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||Lo(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||tn(f)?(e.exit("atxHeading"),t(f)):Gn(f)?kr(e,s,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function c(f){return f===null||f===35||Lo(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),c)}}const eRe=["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"],y9=["pre","script","style","textarea"],tRe={concrete:!0,name:"htmlFlow",resolveTo:iRe,tokenize:aRe},nRe={partial:!0,tokenize:sRe},rRe={partial:!0,tokenize:oRe};function iRe(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 aRe(e,t,n){const r=this;let i,a,o,s,l;return c;function c(q){return f(q)}function f(q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(q),h}function h(q){return q===33?(e.consume(q),g):q===47?(e.consume(q),a=!0,y):q===63?(e.consume(q),i=3,r.interrupt?t:z):gc(q)?(e.consume(q),o=String.fromCharCode(q),x):n(q)}function g(q){return q===45?(e.consume(q),i=2,m):q===91?(e.consume(q),i=5,s=0,b):gc(q)?(e.consume(q),i=4,r.interrupt?t:z):n(q)}function m(q){return q===45?(e.consume(q),r.interrupt?t:z):n(q)}function b(q){const re="CDATA[";return q===re.charCodeAt(s++)?(e.consume(q),s===re.length?r.interrupt?t:F:b):n(q)}function y(q){return gc(q)?(e.consume(q),o=String.fromCharCode(q),x):n(q)}function x(q){if(q===null||q===47||q===62||Lo(q)){const re=q===47,le=o.toLowerCase();return!re&&!a&&y9.includes(le)?(i=1,r.interrupt?t(q):F(q)):eRe.includes(o.toLowerCase())?(i=6,re?(e.consume(q),w):r.interrupt?t(q):F(q)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(q):a?_(q):k(q))}return q===45||as(q)?(e.consume(q),o+=String.fromCharCode(q),x):n(q)}function w(q){return q===62?(e.consume(q),r.interrupt?t:F):n(q)}function _(q){return Gn(q)?(e.consume(q),_):H(q)}function k(q){return q===47?(e.consume(q),H):q===58||q===95||gc(q)?(e.consume(q),P):Gn(q)?(e.consume(q),k):H(q)}function P(q){return q===45||q===46||q===58||q===95||as(q)?(e.consume(q),P):C(q)}function C(q){return q===61?(e.consume(q),j):Gn(q)?(e.consume(q),C):k(q)}function j(q){return q===null||q===60||q===61||q===62||q===96?n(q):q===34||q===39?(e.consume(q),l=q,L):Gn(q)?(e.consume(q),j):R(q)}function L(q){return q===l?(e.consume(q),l=null,D):q===null||tn(q)?n(q):(e.consume(q),L)}function R(q){return q===null||q===34||q===39||q===47||q===60||q===61||q===62||q===96||Lo(q)?C(q):(e.consume(q),R)}function D(q){return q===47||q===62||Gn(q)?k(q):n(q)}function H(q){return q===62?(e.consume(q),M):n(q)}function M(q){return q===null||tn(q)?F(q):Gn(q)?(e.consume(q),M):n(q)}function F(q){return q===45&&i===2?(e.consume(q),Y):q===60&&i===1?(e.consume(q),Z):q===62&&i===4?(e.consume(q),te):q===63&&i===3?(e.consume(q),z):q===93&&i===5?(e.consume(q),se):tn(q)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(nRe,$,W)(q)):q===null||tn(q)?(e.exit("htmlFlowData"),W(q)):(e.consume(q),F)}function W(q){return e.check(rRe,V,$)(q)}function V(q){return e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),X}function X(q){return q===null||tn(q)?W(q):(e.enter("htmlFlowData"),F(q))}function Y(q){return q===45?(e.consume(q),z):F(q)}function Z(q){return q===47?(e.consume(q),o="",K):F(q)}function K(q){if(q===62){const re=o.toLowerCase();return y9.includes(re)?(e.consume(q),te):F(q)}return gc(q)&&o.length<8?(e.consume(q),o+=String.fromCharCode(q),K):F(q)}function se(q){return q===93?(e.consume(q),z):F(q)}function z(q){return q===62?(e.consume(q),te):q===45&&i===2?(e.consume(q),z):F(q)}function te(q){return q===null||tn(q)?(e.exit("htmlFlowData"),$(q)):(e.consume(q),te)}function $(q){return e.exit("htmlFlow"),t(q)}}function oRe(e,t,n){const r=this;return i;function i(o){return tn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function sRe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(F5,t,n)}}const lRe={name:"htmlText",tokenize:cRe};function cRe(e,t,n){const r=this;let i,a,o;return s;function s(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),l}function l(z){return z===33?(e.consume(z),c):z===47?(e.consume(z),C):z===63?(e.consume(z),k):gc(z)?(e.consume(z),R):n(z)}function c(z){return z===45?(e.consume(z),f):z===91?(e.consume(z),a=0,b):gc(z)?(e.consume(z),_):n(z)}function f(z){return z===45?(e.consume(z),m):n(z)}function h(z){return z===null?n(z):z===45?(e.consume(z),g):tn(z)?(o=h,Z(z)):(e.consume(z),h)}function g(z){return z===45?(e.consume(z),m):h(z)}function m(z){return z===62?Y(z):z===45?g(z):h(z)}function b(z){const te="CDATA[";return z===te.charCodeAt(a++)?(e.consume(z),a===te.length?y:b):n(z)}function y(z){return z===null?n(z):z===93?(e.consume(z),x):tn(z)?(o=y,Z(z)):(e.consume(z),y)}function x(z){return z===93?(e.consume(z),w):y(z)}function w(z){return z===62?Y(z):z===93?(e.consume(z),w):y(z)}function _(z){return z===null||z===62?Y(z):tn(z)?(o=_,Z(z)):(e.consume(z),_)}function k(z){return z===null?n(z):z===63?(e.consume(z),P):tn(z)?(o=k,Z(z)):(e.consume(z),k)}function P(z){return z===62?Y(z):k(z)}function C(z){return gc(z)?(e.consume(z),j):n(z)}function j(z){return z===45||as(z)?(e.consume(z),j):L(z)}function L(z){return tn(z)?(o=L,Z(z)):Gn(z)?(e.consume(z),L):Y(z)}function R(z){return z===45||as(z)?(e.consume(z),R):z===47||z===62||Lo(z)?D(z):n(z)}function D(z){return z===47?(e.consume(z),Y):z===58||z===95||gc(z)?(e.consume(z),H):tn(z)?(o=D,Z(z)):Gn(z)?(e.consume(z),D):Y(z)}function H(z){return z===45||z===46||z===58||z===95||as(z)?(e.consume(z),H):M(z)}function M(z){return z===61?(e.consume(z),F):tn(z)?(o=M,Z(z)):Gn(z)?(e.consume(z),M):D(z)}function F(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),i=z,W):tn(z)?(o=F,Z(z)):Gn(z)?(e.consume(z),F):(e.consume(z),V)}function W(z){return z===i?(e.consume(z),i=void 0,X):z===null?n(z):tn(z)?(o=W,Z(z)):(e.consume(z),W)}function V(z){return z===null||z===34||z===39||z===60||z===61||z===96?n(z):z===47||z===62||Lo(z)?D(z):(e.consume(z),V)}function X(z){return z===47||z===62||Lo(z)?D(z):n(z)}function Y(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),t):n(z)}function Z(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),K}function K(z){return Gn(z)?kr(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):se(z)}function se(z){return e.enter("htmlTextData"),o(z)}}const _T={name:"labelEnd",resolveAll:hRe,resolveTo:pRe,tokenize:mRe},uRe={tokenize:gRe},fRe={tokenize:yRe},dRe={tokenize:vRe};function hRe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Mc(e,0,e.length,n),e}function pRe(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=zs(s,e.slice(a+1,a+r+3)),s=zs(s,[["enter",f,t]]),s=zs(s,ST(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=zs(s,[["exit",f,t],e[o-2],e[o-1],["exit",c,t]]),s=zs(s,e.slice(o+1)),s=zs(s,[["exit",l,t]]),Mc(e,a,e.length,s),e}function mRe(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(g){return a?a._inactive?h(g):(o=r.parser.defined.includes(Qm(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),l):n(g)}function l(g){return g===40?e.attempt(uRe,f,o?f:h)(g):g===91?e.attempt(fRe,f,o?c:h)(g):o?f(g):h(g)}function c(g){return e.attempt(dRe,f,h)(g)}function f(g){return t(g)}function h(g){return a._balanced=!0,n(g)}}function gRe(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Lo(h)?Uv(e,a)(h):a(h)}function a(h){return h===41?f(h):UQ(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return Lo(h)?Uv(e,l)(h):f(h)}function s(h){return n(h)}function l(h){return h===34||h===39||h===40?VQ(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function c(h){return Lo(h)?Uv(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function yRe(e,t,n){const r=this;return i;function i(s){return zQ.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Qm(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function vRe(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const xRe={name:"labelStartImage",resolveAll:_T.resolveAll,tokenize:bRe};function bRe(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const wRe={name:"labelStartLink",resolveAll:_T.resolveAll,tokenize:SRe};function SRe(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const TP={name:"lineEnding",tokenize:_Re};function _Re(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),kr(e,t,"linePrefix")}}const jb={name:"thematicBreak",tokenize:NRe};function NRe(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||tn(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Gn(c)?kr(e,s,"whitespace")(c):s(c))}}const Po={continuation:{tokenize:jRe},exit:ERe,name:"list",tokenize:PRe},kRe={partial:!0,tokenize:ORe},ARe={partial:!0,tokenize:CRe};function PRe(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(m){const b=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:KC(m)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(jb,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return KC(m)&&++o<10?(e.consume(m),l):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(F5,r.interrupt?n:f,e.attempt(kRe,g,h))}function f(m){return r.containerState.initialBlankLine=!0,a++,g(m)}function h(m){return Gn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),g):n(m)}function g(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function jRe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(F5,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kr(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Gn(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ARe,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,kr(e,e.attempt(Po,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function CRe(e,t,n){const r=this;return kr(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function ERe(e){e.exit(this.containerState.type)}function ORe(e,t,n){const r=this;return kr(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Gn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const v9={name:"setextUnderline",resolveTo:TRe,tokenize:MRe};function TRe(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function MRe(e,t,n){const r=this;let i;return a;function a(c){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Gn(c)?kr(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||tn(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const LRe={tokenize:RRe};function RRe(e){const t=this,n=e.attempt(F5,r,e.attempt(this.parser.constructs.flowInitial,i,kr(e,e.attempt(this.parser.constructs.flow,i,e.attempt($Le,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const IRe={resolveAll:HQ()},DRe=WQ("string"),FRe=WQ("text");function WQ(e){return{resolveAll:HQ(e==="text"?BRe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(f){return c(f)?a(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return c(f)?(n.exit("data"),a(f)):(n.consume(f),l)}function c(f){if(f===null)return!0;const h=i[f];let g=-1;if(h)for(;++g<h.length;){const m=h[g];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function HQ(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function BRe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(c===-2)l=!0,s++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const $Re={42:Po,43:Po,45:Po,48:Po,49:Po,50:Po,51:Po,52:Po,53:Po,54:Po,55:Po,56:Po,57:Po,62:FQ},qRe={91:WLe},URe={[-2]:OP,[-1]:OP,32:OP},zRe={35:QLe,42:jb,45:[v9,jb],60:tRe,61:v9,95:jb,96:g9,126:g9},VRe={38:$Q,92:BQ},WRe={[-5]:TP,[-4]:TP,[-3]:TP,33:xRe,38:$Q,42:XC,60:[wLe,lRe],91:wRe,92:[KLe,BQ],93:_T,95:XC,96:LLe},HRe={null:[XC,IRe]},YRe={null:[42,95]},GRe={null:[]},KRe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:YRe,contentInitial:qRe,disable:GRe,document:$Re,flow:zRe,flowInitial:URe,insideSpan:HRe,string:VRe,text:WRe},Symbol.toStringTag,{value:"Module"}));function XRe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],s=[];const l={attempt:L(C),check:L(j),consume:_,enter:k,exit:P,interrupt:L(j,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:b,parser:e,previous:null,sliceSerialize:g,sliceStream:m,write:h};let f=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function h(M){return o=zs(o,M),x(),o[o.length-1]!==null?[]:(R(t,0),c.events=ST(a,c.events,c),c.events)}function g(M,F){return JRe(m(M),F)}function m(M){return QRe(o,M)}function b(){const{_bufferIndex:M,_index:F,line:W,column:V,offset:X}=r;return{_bufferIndex:M,_index:F,line:W,column:V,offset:X}}function y(M){i[M.line]=M.column,H()}function x(){let M;for(;r._index<o.length;){const F=o[r._index];if(typeof F=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<F.length;)w(F.charCodeAt(r._bufferIndex));else w(F)}}function w(M){f=f(M)}function _(M){tn(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,H()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function k(M,F){const W=F||{};return W.type=M,W.start=b(),c.events.push(["enter",W,c]),s.push(W),W}function P(M){const F=s.pop();return F.end=b(),c.events.push(["exit",F,c]),F}function C(M,F){R(M,F.from)}function j(M,F){F.restore()}function L(M,F){return W;function W(V,X,Y){let Z,K,se,z;return Array.isArray(V)?$(V):"tokenize"in V?$([V]):te(V);function te(de){return pe;function pe(ve){const he=ve!==null&&de[ve],xe=ve!==null&&de.null,Pe=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(xe)?xe:xe?[xe]:[]];return $(Pe)(ve)}}function $(de){return Z=de,K=0,de.length===0?Y:q(de[K])}function q(de){return pe;function pe(ve){return z=D(),se=de,de.partial||(c.currentConstruct=de),de.name&&c.parser.constructs.disable.null.includes(de.name)?le():de.tokenize.call(F?Object.assign(Object.create(c),F):c,l,re,le)(ve)}}function re(de){return M(se,z),X}function le(de){return z.restore(),++K<Z.length?q(Z[K]):Y}}}function R(M,F){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&Mc(c.events,F,c.events.length-F,M.resolve(c.events.slice(F),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function D(){const M=b(),F=c.previous,W=c.currentConstruct,V=c.events.length,X=Array.from(s);return{from:V,restore:Y};function Y(){r=M,c.previous=F,c.currentConstruct=W,c.events.length=V,s=X,H()}}function H(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function QRe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function JRe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
`;break}case-3:{o=`\r
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function ZRe(e){const r={constructs:oLe([KRe,...(e||{}).extensions||[]]),content:i(pLe),defined:[],document:i(gLe),flow:i(LRe),lazy:{},string:i(DRe),text:i(FRe)};return r;function i(a){return o;function o(s){return XRe(r,a,s)}}}function eIe(e){for(;!qQ(e););return e}const x9=/[\0\t\n\r]/g;function tIe(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const l=[];let c,f,h,g,m;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(x9.lastIndex=h,c=x9.exec(a),g=c&&c.index!==void 0?c.index:a.length,m=a.charCodeAt(g),!c){t=a.slice(h);break}if(m===10&&h===g&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),h<g&&(l.push(a.slice(h,g)),e+=g-h),m){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}h=g+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const nIe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rIe(e){return e.replace(nIe,iIe)}function iIe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return DQ(n.slice(a?2:1),a?16:10)}return wT(n)||e}const YQ={}.hasOwnProperty;function aIe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),oIe(n)(eIe(ZRe(n).document().write(tIe()(e,t,!0))))}function oIe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ze),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(oe),blockQuote:a(xe),characterEscape:D,characterReference:D,codeFenced:a(Pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Pe,o),codeText:a(Se,o),codeTextData:D,data:D,codeFlowValue:D,definition:a(Ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Ye),hardBreakEscape:a(Ke),hardBreakTrailing:a(Ke),htmlFlow:a(ht,o),htmlFlowData:D,htmlText:a(ht,o),htmlTextData:D,image:a(gt),label:o,link:a(ze),listItem:a(st),listItemValue:g,listOrdered:a(St,h),listUnordered:a(St),paragraph:a(xt),reference:q,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(oe),strong:a(Ct),thematicBreak:a(sn)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:he,autolinkProtocol:ve,blockQuote:l(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:de,characterReference:pe,codeFenced:l(x),codeFencedFence:y,codeFencedFenceInfo:m,codeFencedFenceMeta:b,codeFlowValue:H,codeIndented:l(w),codeText:l(X),codeTextData:H,data:H,definition:l(),definitionDestinationString:P,definitionLabelString:_,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(F),hardBreakTrailing:l(F),htmlFlow:l(W),htmlFlowData:H,htmlText:l(V),htmlTextData:H,image:l(Z),label:se,labelText:K,lineEnding:M,link:l(Y),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:z,resourceTitleString:te,resource:$,setextHeading:l(R),setextHeadingLineSequence:L,setextHeadingText:j,strong:l(),thematicBreak:l()}};GQ(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Ee){let Ve={type:"root",children:[]};const at={stack:[Ve],tokenStack:[],config:t,enter:s,exit:c,buffer:o,resume:f,data:n},Ze=[];let lt=-1;for(;++lt<Ee.length;)if(Ee[lt][1].type==="listOrdered"||Ee[lt][1].type==="listUnordered")if(Ee[lt][0]==="enter")Ze.push(lt);else{const ct=Ze.pop();lt=i(Ee,ct,lt)}for(lt=-1;++lt<Ee.length;){const ct=t[Ee[lt][0]];YQ.call(ct,Ee[lt][1].type)&&ct[Ee[lt][1].type].call(Object.assign({sliceSerialize:Ee[lt][2].sliceSerialize},at),Ee[lt][1])}if(at.tokenStack.length>0){const ct=at.tokenStack[at.tokenStack.length-1];(ct[1]||b9).call(at,void 0,ct[0])}for(Ve.position={start:Hf(Ee.length>0?Ee[0][1].start:{line:1,column:1,offset:0}),end:Hf(Ee.length>0?Ee[Ee.length-2][1].end:{line:1,column:1,offset:0})},lt=-1;++lt<t.transforms.length;)Ve=t.transforms[lt](Ve)||Ve;return Ve}function i(Ee,Ve,at){let Ze=Ve-1,lt=-1,ct=!1,Wn,nn,Gt,Qt;for(;++Ze<=at;){const un=Ee[Ze];switch(un[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{un[0]==="enter"?lt++:lt--,Qt=void 0;break}case"lineEndingBlank":{un[0]==="enter"&&(Wn&&!Qt&&!lt&&!Gt&&(Gt=Ze),Qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qt=void 0}if(!lt&&un[0]==="enter"&&un[1].type==="listItemPrefix"||lt===-1&&un[0]==="exit"&&(un[1].type==="listUnordered"||un[1].type==="listOrdered")){if(Wn){let kt=Ze;for(nn=void 0;kt--;){const gn=Ee[kt];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;nn&&(Ee[nn][1].type="lineEndingBlank",ct=!0),gn[1].type="lineEnding",nn=kt}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}Gt&&(!nn||Gt<nn)&&(Wn._spread=!0),Wn.end=Object.assign({},nn?Ee[nn][1].start:un[1].end),Ee.splice(nn||Ze,0,["exit",Wn,un[2]]),Ze++,at++}if(un[1].type==="listItemPrefix"){const kt={type:"listItem",_spread:!1,start:Object.assign({},un[1].start),end:void 0};Wn=kt,Ee.splice(Ze,0,["enter",kt,un[2]]),Ze++,at++,Gt=void 0,Qt=!0}}}return Ee[Ve][1]._spread=ct,at}function a(Ee,Ve){return at;function at(Ze){s.call(this,Ee(Ze),Ze),Ve&&Ve.call(this,Ze)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(Ee,Ve,at){this.stack[this.stack.length-1].children.push(Ee),this.stack.push(Ee),this.tokenStack.push([Ve,at||void 0]),Ee.position={start:Hf(Ve.start),end:void 0}}function l(Ee){return Ve;function Ve(at){Ee&&Ee.call(this,at),c.call(this,at)}}function c(Ee,Ve){const at=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==Ee.type&&(Ve?Ve.call(this,Ee,Ze[0]):(Ze[1]||b9).call(this,Ee,Ze[0]));else throw new Error("Cannot close `"+Ee.type+"` ("+qv({start:Ee.start,end:Ee.end})+"): it’s not open");at.position.end=Hf(Ee.end)}function f(){return iLe(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function g(Ee){if(this.data.expectingFirstListItemValue){const Ve=this.stack[this.stack.length-2];Ve.start=Number.parseInt(this.sliceSerialize(Ee),10),this.data.expectingFirstListItemValue=void 0}}function m(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.lang=Ee}function b(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.meta=Ee}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.value=Ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.value=Ee.replace(/(\r?\n|\r)$/g,"")}function _(Ee){const Ve=this.resume(),at=this.stack[this.stack.length-1];at.label=Ve,at.identifier=Qm(this.sliceSerialize(Ee)).toLowerCase()}function k(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.title=Ee}function P(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.url=Ee}function C(Ee){const Ve=this.stack[this.stack.length-1];if(!Ve.depth){const at=this.sliceSerialize(Ee).length;Ve.depth=at}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function L(Ee){const Ve=this.stack[this.stack.length-1];Ve.depth=this.sliceSerialize(Ee).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function D(Ee){const at=this.stack[this.stack.length-1].children;let Ze=at[at.length-1];(!Ze||Ze.type!=="text")&&(Ze=bn(),Ze.position={start:Hf(Ee.start),end:void 0},at.push(Ze)),this.stack.push(Ze)}function H(Ee){const Ve=this.stack.pop();Ve.value+=this.sliceSerialize(Ee),Ve.position.end=Hf(Ee.end)}function M(Ee){const Ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const at=Ve.children[Ve.children.length-1];at.position.end=Hf(Ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ve.type)&&(D.call(this,Ee),H.call(this,Ee))}function F(){this.data.atHardBreak=!0}function W(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.value=Ee}function V(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.value=Ee}function X(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.value=Ee}function Y(){const Ee=this.stack[this.stack.length-1];if(this.data.inReference){const Ve=this.data.referenceType||"shortcut";Ee.type+="Reference",Ee.referenceType=Ve,delete Ee.url,delete Ee.title}else delete Ee.identifier,delete Ee.label;this.data.referenceType=void 0}function Z(){const Ee=this.stack[this.stack.length-1];if(this.data.inReference){const Ve=this.data.referenceType||"shortcut";Ee.type+="Reference",Ee.referenceType=Ve,delete Ee.url,delete Ee.title}else delete Ee.identifier,delete Ee.label;this.data.referenceType=void 0}function K(Ee){const Ve=this.sliceSerialize(Ee),at=this.stack[this.stack.length-2];at.label=rIe(Ve),at.identifier=Qm(Ve).toLowerCase()}function se(){const Ee=this.stack[this.stack.length-1],Ve=this.resume(),at=this.stack[this.stack.length-1];if(this.data.inReference=!0,at.type==="link"){const Ze=Ee.children;at.children=Ze}else at.alt=Ve}function z(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.url=Ee}function te(){const Ee=this.resume(),Ve=this.stack[this.stack.length-1];Ve.title=Ee}function $(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function re(Ee){const Ve=this.resume(),at=this.stack[this.stack.length-1];at.label=Ve,at.identifier=Qm(this.sliceSerialize(Ee)).toLowerCase(),this.data.referenceType="full"}function le(Ee){this.data.characterReferenceType=Ee.type}function de(Ee){const Ve=this.sliceSerialize(Ee),at=this.data.characterReferenceType;let Ze;at?(Ze=DQ(Ve,at==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=wT(Ve);const lt=this.stack[this.stack.length-1];lt.value+=Ze}function pe(Ee){const Ve=this.stack.pop();Ve.position.end=Hf(Ee.end)}function ve(Ee){H.call(this,Ee);const Ve=this.stack[this.stack.length-1];Ve.url=this.sliceSerialize(Ee)}function he(Ee){H.call(this,Ee);const Ve=this.stack[this.stack.length-1];Ve.url="mailto:"+this.sliceSerialize(Ee)}function xe(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ye(){return{type:"emphasis",children:[]}}function oe(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function ht(){return{type:"html",value:""}}function gt(){return{type:"image",title:null,url:"",alt:null}}function ze(){return{type:"link",title:null,url:"",children:[]}}function St(Ee){return{type:"list",ordered:Ee.type==="listOrdered",start:null,spread:Ee._spread,children:[]}}function st(Ee){return{type:"listItem",spread:Ee._spread,checked:null,children:[]}}function xt(){return{type:"paragraph",children:[]}}function Ct(){return{type:"strong",children:[]}}function bn(){return{type:"text",value:""}}function sn(){return{type:"thematicBreak"}}}function Hf(e){return{line:e.line,column:e.column,offset:e.offset}}function GQ(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?GQ(e,r):sIe(e,r)}}function sIe(e,t){let n;for(n in t)if(YQ.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function b9(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qv({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qv({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qv({start:t.start,end:t.end})+") is still open")}function lIe(e){const t=this;t.parser=n;function n(r){return aIe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cIe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uIe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function fIe(e,t){const n=t.value?t.value+`
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function dIe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hIe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pIe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=my(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function mIe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gIe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function KQ(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function yIe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return KQ(e,t);const i={src:my(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function vIe(e,t){const n={src:my(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function xIe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function bIe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return KQ(e,t);const i={href:my(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wIe(e,t){const n={href:my(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function SIe(e,t,n){const r=e.all(t),i=n?_Ie(n):XQ(t),a={},o=[];if(typeof t.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
`}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function _Ie(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=XQ(n[r])}return t}function XQ(e){const t=e.spread;return t??e.children.length>1}function NIe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function kIe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AIe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function PIe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jIe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=yT(t.children[1]),l=EQ(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function CIe(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const h=t.children[l],g={},m=o?o[l]:void 0;m&&(g.align=m);let b={type:"element",tagName:a,properties:g,children:[]};h&&(b.children=e.all(h),e.patch(h,b),b=e.applyData(h,b)),c.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function EIe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const w9=9,S9=32;function OIe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(_9(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(_9(t.slice(i),i>0,!1)),a.join("")}function _9(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===w9||a===S9;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===w9||a===S9;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function TIe(e,t){const n={type:"text",value:OIe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function MIe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const LIe={blockquote:cIe,break:uIe,code:fIe,delete:dIe,emphasis:hIe,footnoteReference:pIe,heading:mIe,html:gIe,imageReference:yIe,image:vIe,inlineCode:xIe,linkReference:bIe,link:wIe,listItem:SIe,list:NIe,paragraph:kIe,root:AIe,strong:PIe,table:jIe,tableCell:EIe,tableRow:CIe,text:TIe,thematicBreak:MIe,toml:Gx,yaml:Gx,definition:Gx,footnoteDefinition:Gx};function Gx(){}const QQ=-1,B5=0,zv=1,c2=2,NT=3,kT=4,AT=5,PT=6,JQ=7,ZQ=8,N9=typeof self=="object"?self:globalThis,RIe=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case B5:case QQ:return n(o,i);case zv:{const s=n([],i);for(const l of o)s.push(r(l));return s}case c2:{const s=n({},i);for(const[l,c]of o)s[r(l)]=r(c);return s}case NT:return n(new Date(o),i);case kT:{const{source:s,flags:l}=o;return n(new RegExp(s,l),i)}case AT:{const s=n(new Map,i);for(const[l,c]of o)s.set(r(l),r(c));return s}case PT:{const s=n(new Set,i);for(const l of o)s.add(r(l));return s}case JQ:{const{name:s,message:l}=o;return n(new N9[s](l),i)}case ZQ:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new N9[a](o),i)};return r},k9=e=>RIe(new Map,e)(0),wm="",{toString:IIe}={},{keys:DIe}=Object,mv=e=>{const t=typeof e;if(t!=="object"||!e)return[B5,t];const n=IIe.call(e).slice(8,-1);switch(n){case"Array":return[zv,wm];case"Object":return[c2,wm];case"Date":return[NT,wm];case"RegExp":return[kT,wm];case"Map":return[AT,wm];case"Set":return[PT,wm];case"DataView":return[zv,n]}return n.includes("Array")?[zv,n]:n.includes("Error")?[JQ,n]:[c2,n]},Kx=([e,t])=>e===B5&&(t==="function"||t==="symbol"),FIe=(e,t,n,r)=>{const i=(o,s)=>{const l=r.push(o)-1;return n.set(s,l),l},a=o=>{if(n.has(o))return n.get(o);let[s,l]=mv(o);switch(s){case B5:{let f=o;switch(l){case"bigint":s=ZQ,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([QQ],o)}return i([s,f],o)}case zv:{if(l){let g=o;return l==="DataView"?g=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(g=new Uint8Array(o)),i([l,[...g]],o)}const f=[],h=i([s,f],o);for(const g of o)f.push(a(g));return h}case c2:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const f=[],h=i([s,f],o);for(const g of DIe(o))(e||!Kx(mv(o[g])))&&f.push([a(g),a(o[g])]);return h}case NT:return i([s,o.toISOString()],o);case kT:{const{source:f,flags:h}=o;return i([s,{source:f,flags:h}],o)}case AT:{const f=[],h=i([s,f],o);for(const[g,m]of o)(e||!(Kx(mv(g))||Kx(mv(m))))&&f.push([a(g),a(m)]);return h}case PT:{const f=[],h=i([s,f],o);for(const g of o)(e||!Kx(mv(g)))&&f.push(a(g));return h}}const{message:c}=o;return i([s,{name:l,message:c}],o)};return a},A9=(e,{json:t,lossy:n}={})=>{const r=[];return FIe(!(t||n),!!t,new Map,r)(e),r},u2=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?k9(A9(e,t)):structuredClone(e):(e,t)=>k9(A9(e,t));function BIe(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function $Ie(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qIe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||BIe,r=e.options.footnoteBackLabel||$Ie,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),h=String(c.identifier).toUpperCase(),g=my(h.toLowerCase());let m=0;const b=[],y=e.footnoteCounts.get(h);for(;y!==void 0&&++m<=y;){b.length>0&&b.push({type:"text",value:" "});let _=typeof n=="string"?n:n(l,m);typeof _=="string"&&(_={type:"text",value:_}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const x=f[f.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const _=x.children[x.children.length-1];_&&_.type==="text"?_.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...b)}else f.push(...b);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(f,!0)};e.patch(c,w),s.push(w)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...u2(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
`}]}}const eJ=(function(e){if(e==null)return WIe;if(typeof e=="function")return $5(e);if(typeof e=="object")return Array.isArray(e)?UIe(e):zIe(e);if(typeof e=="string")return VIe(e);throw new Error("Expected function, string, or object as test")});function UIe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=eJ(e[n]);return $5(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function zIe(e){const t=e;return $5(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function VIe(e){return $5(t);function t(n){return n&&n.type===e}}function $5(e){return t;function t(n,r,i){return!!(HIe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function WIe(){return!0}function HIe(e){return e!==null&&typeof e=="object"&&"type"in e}const tJ=[],YIe=!0,P9=!1,GIe="skip";function KIe(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=eJ(i),o=r?-1:1;s(e,void 0,[])();function s(l,c,f){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return g;function g(){let m=tJ,b,y,x;if((!t||a(l,c,f[f.length-1]||void 0))&&(m=XIe(n(l,f)),m[0]===P9))return m;if("children"in l&&l.children){const w=l;if(w.children&&m[0]!==GIe)for(y=(r?w.children.length:-1)+o,x=f.concat(w);y>-1&&y<w.children.length;){const _=w.children[y];if(b=s(_,y,x)(),b[0]===P9)return b;y=typeof b[1]=="number"?b[1]:y+o}}return m}}}function XIe(e){return Array.isArray(e)?e:typeof e=="number"?[YIe,e]:e==null?tJ:[e]}function nJ(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),KIe(e,a,s,i);function s(l,c){const f=c[c.length-1],h=f?f.children.indexOf(l):void 0;return o(l,h,f)}}const QC={}.hasOwnProperty,QIe={};function JIe(e,t){const n=t||QIe,r=new Map,i=new Map,a=new Map,o={...LIe,...n.handlers},s={all:c,applyData:eDe,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:l,options:n,patch:ZIe,wrap:nDe};return nJ(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,g=String(f.identifier).toUpperCase();h.has(g)||h.set(g,f)}}),s;function l(f,h){const g=f.type,m=s.handlers[g];if(QC.call(s.handlers,g)&&m)return m(s,f,h);if(s.options.passThrough&&s.options.passThrough.includes(g)){if("children"in f){const{children:y,...x}=f,w=u2(x);return w.children=s.all(f),w}return u2(f)}return(s.options.unknownHandler||tDe)(s,f,h)}function c(f){const h=[];if("children"in f){const g=f.children;let m=-1;for(;++m<g.length;){const b=s.one(g[m],f);if(b){if(m&&g[m-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=j9(b.value)),!Array.isArray(b)&&b.type==="element")){const y=b.children[0];y&&y.type==="text"&&(y.value=j9(y.value))}Array.isArray(b)?h.push(...b):h.push(b)}}}return h}}function ZIe(e,t){e.position&&(t.position=I6e(e))}function eDe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,u2(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function tDe(e,t){const n=t.data||{},r="value"in t&&!(QC.call(n,"hProperties")||QC.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nDe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function j9(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function C9(e,t){const n=JIe(e,t),r=n.one(e,void 0),i=qIe(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
`},i),a}function rDe(e,t){return e&&"run"in e?async function(n,r){const i=C9(n,{file:r,...t});await e.run(i,r)}:function(n,r){return C9(n,{file:r,...e||t})}}function E9(e){if(e)throw e}var MP,O9;function iDe(){if(O9)return MP;O9=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var f=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!f&&!h)return!1;var g;for(g in c);return typeof g>"u"||e.call(c,g)},o=function(c,f){n&&f.name==="__proto__"?n(c,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):c[f.name]=f.newValue},s=function(c,f){if(f==="__proto__")if(e.call(c,f)){if(r)return r(c,f).value}else return;return c[f]};return MP=function l(){var c,f,h,g,m,b,y=arguments[0],x=1,w=arguments.length,_=!1;for(typeof y=="boolean"&&(_=y,y=arguments[1]||{},x=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});x<w;++x)if(c=arguments[x],c!=null)for(f in c)h=s(y,f),g=s(c,f),y!==g&&(_&&g&&(a(g)||(m=i(g)))?(m?(m=!1,b=h&&i(h)?h:[]):b=h&&a(h)?h:{},o(y,{name:f,newValue:l(_,b,g)})):typeof g<"u"&&o(y,{name:f,newValue:g}));return y},MP}var aDe=iDe();const LP=Kn(aDe);function JC(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function oDe(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...c){const f=e[++a];let h=-1;if(l){o(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,f?sDe(f,s)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function sDe(e,t){let n;return r;function r(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(c){const f=c;if(s&&n)throw f;return i(f)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const cc={basename:lDe,dirname:cDe,extname:uDe,join:fDe,sep:"/"};function lDe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');C1(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function cDe(e){if(C1(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function uDe(e){C1(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function fDe(...e){let t=-1,n;for(;++t<e.length;)C1(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":dDe(n)}function dDe(e){C1(e);const t=e.codePointAt(0)===47;let n=hDe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function hDe(e,t){let n="",r=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function C1(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const pDe={cwd:mDe};function mDe(){return"/"}function ZC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function gDe(e){if(typeof e=="string")e=new URL(e);else if(!ZC(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 yDe(e)}function yDe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const RP=["history","path","basename","stem","extname","dirname"];class rJ{constructor(t){let n;t?ZC(t)?n={path:t}:typeof t=="string"||vDe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":pDe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<RP.length;){const a=RP[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)RP.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?cc.basename(this.path):void 0}set basename(t){DP(t,"basename"),IP(t,"basename"),this.path=cc.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cc.dirname(this.path):void 0}set dirname(t){T9(this.basename,"dirname"),this.path=cc.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cc.extname(this.path):void 0}set extname(t){if(IP(t,"extname"),T9(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=cc.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ZC(t)&&(t=gDe(t)),DP(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cc.basename(this.path,this.extname):void 0}set stem(t){DP(t,"stem"),IP(t,"stem"),this.path=cc.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Va(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function IP(e,t){if(e&&e.includes(cc.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cc.sep+"`")}function DP(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function T9(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vDe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xDe=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),bDe={}.hasOwnProperty;class jT extends xDe{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=oDe()}copy(){const t=new jT;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(LP(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($P("data",this.frozen),this.namespace[t]=n,this):bDe.call(this.namespace,t)&&this.namespace[t]||void 0:t?($P("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xx(t),r=this.parser||this.Parser;return FP("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),FP("process",this.parser||this.Parser),BP("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=Xx(t),l=r.parse(s);r.run(l,s,function(f,h,g){if(f||!h||!g)return c(f);const m=h,b=r.stringify(m,g);_De(b)?g.value=b:g.result=b,c(f,g)});function c(f,h){f||!h?o(f):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),FP("processSync",this.parser||this.Parser),BP("processSync",this.compiler||this.Compiler),this.process(t,i),L9("processSync","process",n),r;function i(a,o){n=!0,E9(a),r=o}}run(t,n,r){M9(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const l=Xx(n);i.run(t,l,c);function c(f,h,g){const m=h||t;f?s(f):o?o(m):r(void 0,m,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),L9("runSync","run",r),i;function a(o,s){E9(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=Xx(n),i=this.compiler||this.Compiler;return BP("stringify",i),M9(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if($P("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...h]=c;l(f,h)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))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");s(c.plugins),c.settings&&(i.settings=LP(!0,i.settings,c.settings))}function s(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const h=c[f];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let h=-1,g=-1;for(;++h<r.length;)if(r[h][0]===c){g=h;break}if(g===-1)r.push([c,...f]);else if(f.length>0){let[m,...b]=f;const y=r[g][1];JC(y)&&JC(m)&&(m=LP(!0,y,m)),r[g]=[c,m,...b]}}}}const wDe=new jT().freeze();function FP(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function BP(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $P(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 M9(e){if(!JC(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function L9(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xx(e){return SDe(e)?e:new rJ(e)}function SDe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _De(e){return typeof e=="string"||NDe(e)}function NDe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kDe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",R9=[],I9={allowDangerousHtml:!0},ADe=/^(https?|ircs?|mailto|xmpp)$/i,PDe=[{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:"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 iJ(e){const t=jDe(e),n=CDe(e);return EDe(t.runSync(t.parse(n),n),e)}function jDe(e){const t=e.rehypePlugins||R9,n=e.remarkPlugins||R9,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...I9}:I9;return wDe().use(lIe).use(n).use(rDe,r).use(t)}function CDe(e){const t=e.children||"",n=new rJ;return typeof t=="string"&&(n.value=t),n}function EDe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||ODe;for(const f of PDe)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+kDe+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),nJ(e,c),q6e(e,{Fragment:d.Fragment,components:i,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function c(f,h,g){if(f.type==="raw"&&g&&typeof h=="number")return o?g.children.splice(h,1):g.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let m;for(m in EP)if(Object.hasOwn(EP,m)&&Object.hasOwn(f.properties,m)){const b=f.properties[m],y=EP[m];(y===null||y.includes(f.tagName))&&(f.properties[m]=l(String(b||""),m,f))}}if(f.type==="element"){let m=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(f,h,g)),m&&g&&typeof h=="number")return s&&f.children?g.children.splice(h,1,...f.children):g.children.splice(h,1),h}}}function ODe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ADe.test(e.slice(0,t))?e:""}function TDe({findings:e,siteUrl:t,siteId:n}){const r=Li(),[i,a]=E.useState(null),[o,s]=E.useState(!1),[l,c]=E.useState(!1),[f,h]=E.useState(!1),[g,m]=E.useState(null),b=async()=>{var C,j;if(e.length===0)return;s(!0),a(null),h(!1),m(null);const x=e.map(L=>{var R;return`- [${(R=L.severity)==null?void 0:R.toUpperCase()}] ${L.category}: ${L.detail}${L.recommendation?` (Recommendation: ${L.recommendation})`:""}`}).join(`
`),w=`You are a cybersecurity expert writing a fix report for scan findings on "${t||"unknown"}".
FINDINGS:
${x}
IMPORTANT RULES — read these carefully before writing:
1. **Content-Security-Policy**: NEVER recommend "default-src 'self'; script-src 'self'" — this will break most sites by blocking CDNs, fonts, analytics, and platform scripts. Instead always use:
\`Content-Security-Policy: default-src 'self' https: data: 'unsafe-inline'; frame-ancestors 'none';\`
This provides meaningful protection without breaking anything.
2. **Rate Limiting**: NEVER recommend 1r/s — that's way too aggressive and will block normal users clicking around. Use 30r/m with burst=20:
\`limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m;\` with \`limit_req zone=one burst=20 nodelay;\`
3. **robots.txt**: If a finding mentions robots.txt being accessible, do NOT recommend blocking or removing it — that causes SEO problems. It's informational only. Just note: "This is informational — check that your robots.txt doesn't expose sensitive paths, but don't block or remove it."
4. **CORS**: Do NOT recommend adding CORS headers at the nginx/server level — if the app already sets them, duplicate headers cause browsers to reject responses. Instead recommend fixing CORS at the application/platform level (app settings, hosting dashboard, or framework config).
5. **Server tokens / server version exposure**: If a finding mentions exposed server information (server_tokens, X-Powered-By, Server header), check if the recommendation is already standard practice. Add a note: "Verify this isn't already resolved — if your hosting provider or CDN handles this, it may already be fixed."
6. **Admin panel access**: If a finding mentions an accessible admin panel or /admin path, soften the severity. Many platforms (including Base44) redirect /admin to a login page, so it may not be truly open. Always include: "First verify this page is actually accessible without logging in. If it redirects to a login screen, this is already protected and no action is needed."
Now write TWO sections:
---
## ðŸ› ï¸ For Developers
For each finding, give step-by-step technical fix instructions with exact code snippets, config lines, server commands, nginx/apache configs, .htaccess rules, and HTTP header values. Follow the rules above strictly. Be specific and practical.
---
## ✨ For Vibe Coders
The reader is a solo founder who builds with AI tools (Cursor, ChatGPT, v0, Bolt, etc.) and uses platforms like Vercel, Netlify, Cloudflare, WordPress, or Webflow. They have NO developer to ask. They ARE the developer.
BANNED PHRASES — never write any of these:
- "ask your developer" / "tell your developer" / "contact your developer"
- "talk to your developer" / "your web developer" / "have your developer"
- "request your developer" / "suggest to your developer" / "instruct your developer"
- "recommend your developer" / "hire a developer"
For EACH finding provide:
1. **What's wrong** — one plain-English sentence
2. **Why it matters** — the real risk in simple terms
3. **AI Prompt to fix it** — a ready-to-paste prompt for ChatGPT/Cursor/Bolt, inside a code block
4. **Platform shortcut** (if applicable) — exact dashboard path like "Cloudflare → Rules → Transform Rules → Modify Response Header → Add: X-Frame-Options = DENY"
Every fix must be immediately actionable by the reader alone. No delegating to others. Use markdown with code blocks.`,_=await ut.integrations.Core.InvokeLLM({prompt:w,model:"claude_sonnet_4_6"}),P=(typeof _=="string"?_:(_==null?void 0:_.response)||(_==null?void 0:_.text)||(_==null?void 0:_.content)||JSON.stringify(_))||"No content returned. Please try again.";if(a(P),s(!1),n)try{await ut.entities.ScanReport.create({site_id:n,site_url:t||"",findings_count:e.length,report_content:P}),h(!0),r.invalidateQueries({queryKey:["saved-scan-reports",n]})}catch(L){console.error("[AiFixReport] Failed to save report:",L),m(((j=(C=L==null?void 0:L.response)==null?void 0:C.data)==null?void 0:j.message)||(L==null?void 0:L.message)||"Failed to save report")}},y=()=>{navigator.clipboard.writeText(i||""),c(!0),setTimeout(()=>c(!1),2e3)};return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl",children:[d.jsxs("div",{className:"p-4 border-b border-border/30 flex items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Bb,{className:"w-4 h-4 text-neon-purple"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"AI Fix Report"})]}),!i&&!o&&d.jsxs(Ot,{onClick:b,disabled:e.length===0,size:"sm",className:"gap-2 bg-neon-purple/20 text-neon-purple border border-neon-purple/30 hover:bg-neon-purple/30",children:[d.jsx(Bb,{className:"w-3.5 h-3.5"}),"Generate Fix Report"]})]}),o&&d.jsxs("div",{className:"p-8 flex flex-col items-center gap-3",children:[d.jsx(hn,{className:"w-6 h-6 animate-spin text-neon-purple"}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Analyzing ",e.length," finding",e.length!==1?"s":""," and generating fixes…"]})]}),!o&&!i&&d.jsx("div",{className:"p-6 text-center",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:e.length===0?"No findings to analyze — your site looks clean!":'Click "Generate Fix Report" to get AI-powered fix instructions.'})}),!o&&i&&d.jsxs("div",{children:[d.jsxs("div",{className:"px-4 pt-3 flex items-center justify-end gap-2",children:[d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:y,className:"gap-1.5 text-xs h-7",children:[l?d.jsx(ss,{className:"w-3 h-3 text-accent"}):d.jsx(Yv,{className:"w-3 h-3"}),l?"Copied":"Copy"]}),d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:b,className:"gap-1.5 text-xs h-7",children:[d.jsx(ip,{className:"w-3 h-3"}),"Regenerate"]}),f&&d.jsxs("span",{className:"text-xs text-accent flex items-center gap-1",children:[d.jsx(ss,{className:"w-3 h-3"})," Saved"]}),g&&d.jsxs("span",{className:"text-xs text-destructive flex items-center gap-1",title:g,children:[d.jsx(so,{className:"w-3 h-3"})," Save failed"]})]}),d.jsx("div",{className:`p-4 prose prose-invert prose-sm max-w-none
prose-headings:text-foreground prose-headings:font-bold prose-headings:mt-4 prose-headings:mb-2
prose-p:text-muted-foreground prose-p:leading-relaxed
prose-li:text-muted-foreground
prose-strong:text-foreground
prose-code:text-primary prose-code:bg-muted prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-xs prose-code:font-mono
prose-pre:bg-muted/50 prose-pre:border prose-pre:border-border/50 prose-pre:rounded-lg
prose-a:text-primary prose-a:no-underline hover:prose-a:underline
`,children:d.jsx(iJ,{children:i})})]})]})}function MDe(e,t=[]){let n=[];function r(a,o){const s=E.createContext(o);s.displayName=a+"Context";const l=n.length;n=[...n,o];const c=h=>{var w;const{scope:g,children:m,...b}=h,y=((w=g==null?void 0:g[e])==null?void 0:w[l])||s,x=E.useMemo(()=>b,Object.values(b));return d.jsx(y.Provider,{value:x,children:m})};c.displayName=a+"Provider";function f(h,g){var y;const m=((y=g==null?void 0:g[e])==null?void 0:y[l])||s,b=E.useContext(m);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,f]}const i=()=>{const a=n.map(o=>E.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,LDe(i,...t)]}function LDe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const h=l(a)[`__scope${c}`];return{...s,...h}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var RDe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],aJ=RDe.reduce((e,t)=>{const n=SO(`Primitive.${t}`),r=E.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),CT="Progress",ET=100,[IDe]=MDe(CT),[DDe,FDe]=IDe(CT),oJ=E.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=BDe,...o}=e;(i||i===0)&&!D9(i)&&console.error($De(`${i}`,"Progress"));const s=D9(i)?i:ET;r!==null&&!F9(r,s)&&console.error(qDe(`${r}`,"Progress"));const l=F9(r,s)?r:null,c=f2(l)?a(l,s):void 0;return d.jsx(DDe,{scope:n,value:l,max:s,children:d.jsx(aJ.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":f2(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":cJ(l,s),"data-value":l??void 0,"data-max":s,...o,ref:t})})});oJ.displayName=CT;var sJ="ProgressIndicator",lJ=E.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=FDe(sJ,n);return d.jsx(aJ.div,{"data-state":cJ(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});lJ.displayName=sJ;function BDe(e,t){return`${Math.round(e/t*100)}%`}function cJ(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function f2(e){return typeof e=="number"}function D9(e){return f2(e)&&!isNaN(e)&&e>0}function F9(e,t){return f2(e)&&!isNaN(e)&&e<=t&&e>=0}function $De(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ET}\`.`}function qDe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${ET} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var uJ=oJ,UDe=lJ;const fJ=E.forwardRef(({className:e,value:t,...n},r)=>d.jsx(uJ,{ref:r,className:Un("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:d.jsx(UDe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));fJ.displayName=uJ.displayName;function zDe({used:e=0,limit:t=0,tierName:n=""}){if(!t)return null;const r=Math.max(0,t-e),i=Math.min(100,e/t*100),a=r<=1&&r>0,o=r===0;return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-4 flex items-center gap-4",children:[d.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10 flex-shrink-0",children:d.jsx(CU,{className:"w-5 h-5 text-primary"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Scan History"}),d.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[e," / ",t," used"]})]}),d.jsx(fJ,{value:i,className:"h-1.5"}),d.jsxs("p",{className:`text-xs mt-1.5 ${o?"text-destructive":a?"text-neon-orange":"text-muted-foreground"}`,children:[o?"Scan history limit reached — upgrade for more":a?`Only ${r} scan slot remaining`:`${r} scan slot${r!==1?"s":""} remaining`,n&&d.jsxs("span",{className:"text-muted-foreground/60",children:[" · ",n," plan"]})]})]})]})}function VDe({siteId:e}){const t=Li(),[n,r]=E.useState(null),[i,a]=E.useState(null),{data:o=[],isLoading:s}=dn({queryKey:["saved-scan-reports",e],queryFn:()=>ut.entities.ScanReport.filter({site_id:e},"-created_date"),enabled:!!e,initialData:[]}),l=Hi({mutationFn:f=>ut.entities.ScanReport.delete(f),onSuccess:()=>t.invalidateQueries({queryKey:["saved-scan-reports",e]})}),c=(f,h)=>{navigator.clipboard.writeText(h||""),a(f),setTimeout(()=>a(null),2e3)};return s?d.jsx("div",{className:"bg-card border border-border/50 rounded-xl p-6 flex items-center justify-center",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):o.length===0?null:d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl",children:[d.jsxs("div",{className:"p-4 border-b border-border/30 flex items-center gap-2",children:[d.jsx(mg,{className:"w-4 h-4 text-primary"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Saved Fix Reports"}),d.jsxs("span",{className:"text-xs text-muted-foreground font-mono ml-auto",children:[o.length," saved"]})]}),d.jsx("div",{className:"divide-y divide-border/30",children:o.map(f=>{const h=n===f.id;return d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("button",{onClick:()=>r(h?null:f.id),className:"flex items-center gap-3 flex-1 min-w-0 text-left",children:[h?d.jsx(yE,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}):d.jsx(x2,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"text-sm font-medium text-foreground truncate",children:["Report — ",f.findings_count," finding",f.findings_count!==1?"s":""]}),d.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:Xe(f.created_date).format("MMM D, YYYY [at] HH:mm")})]})]}),d.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d.jsx(Ot,{size:"sm",variant:"ghost",onClick:()=>c(f.id,f.report_content),className:"h-7 px-2 gap-1 text-xs",children:i===f.id?d.jsx(ss,{className:"w-3 h-3 text-accent"}):d.jsx(Yv,{className:"w-3 h-3"})}),d.jsx(Ot,{size:"sm",variant:"ghost",onClick:()=>l.mutate(f.id),disabled:l.isPending,className:"h-7 px-2 text-destructive hover:bg-destructive/10",children:d.jsx(Gv,{className:"w-3 h-3"})})]})]}),d.jsx(us,{children:h&&d.jsx(He.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:d.jsx("div",{className:`mt-3 pt-3 border-t border-border/30 prose prose-invert prose-sm max-w-none
prose-headings:text-foreground prose-headings:font-bold prose-headings:mt-4 prose-headings:mb-2
prose-p:text-muted-foreground prose-p:leading-relaxed
prose-li:text-muted-foreground
prose-strong:text-foreground
prose-code:text-primary prose-code:bg-muted prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-xs prose-code:font-mono
prose-pre:bg-muted/50 prose-pre:border prose-pre:border-border/50 prose-pre:rounded-lg
prose-a:text-primary prose-a:no-underline hover:prose-a:underline
`,children:d.jsx(iJ,{children:f.report_content})})})})]},f.id)})})]})}const B9=e=>ut.functions.invoke("scanApi",e).then(t=>t.data);function WDe(){var H;const{toast:e}=Gs();Li();const{user:t,features:n}=kp()||{},[r,i]=E.useState(null),[a,o]=E.useState(!1),s=E.useRef(null),l=!!(n!=null&&n.rescan_on_demand),{data:c=[]}=dn({queryKey:["sites",t==null?void 0:t.email],queryFn:()=>Fc(ut.entities.Site,{created_by:t.email}),enabled:!!(t!=null&&t.email),initialData:[]});E.useEffect(()=>{!r&&c.length>0&&i(c[0].id)},[c]);const{data:f=[],isLoading:h,refetch:g}=dn({queryKey:["scan-reports",r],queryFn:()=>B9({action:"get_reports",site_id:r}),enabled:!!r,retry:!1,select:M=>Array.isArray(M)?M:[],onError:()=>{}}),m=f.length>0?f[0]:null,b=((m==null?void 0:m.findings)||[]).filter(M=>!(M.path||M.endpoint||M.file||M.description||"").toLowerCase().includes("robots.txt")),y=b.filter(M=>M.category==="headers"),x=b.filter(M=>M.category==="exposed_files"),w=b.filter(M=>M.category==="ssl"),_=b.filter(M=>M.category==="ports"),k=b.filter(M=>M.category==="cors"),P=b.filter(M=>M.category==="access_control"),C=b.filter(M=>M.category==="injection"||M.category==="tech"),j=(m==null?void 0:m.score)??0,L=j>=90?"Good":j>=70?"Warnings":"Issues Found",R=j>=90?"text-accent":j>=70?"text-neon-orange":"text-destructive",D=Hi({mutationFn:()=>B9({action:"rescan",site_id:r}),onSuccess:()=>{o(!0),e({title:"Scan started",description:"Results will refresh in ~60 seconds."}),s.current=setTimeout(()=>{g(),o(!1)},6e4)},onError:M=>{var V,X,Y,Z;const F=((X=(V=M==null?void 0:M.response)==null?void 0:V.data)==null?void 0:X.message)||((Z=(Y=M==null?void 0:M.response)==null?void 0:Y.data)==null?void 0:Z.error)||(M==null?void 0:M.message);e({title:"Scan failed",description:typeof F=="string"?F:"Scan not available on your current plan",variant:"destructive"})}});return E.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),E.useEffect(()=>{o(!1),s.current&&clearTimeout(s.current)},[r]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Security Scans"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Detailed vulnerability scan results"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("select",{value:r||"",onChange:M=>i(M.target.value),className:"bg-secondary border border-border text-foreground text-sm rounded-lg px-3 py-2 focus:outline-none focus:ring-1 focus:ring-primary",children:[d.jsx("option",{value:"",disabled:!0,children:"Select a site…"}),c.map(M=>d.jsx("option",{value:M.id,children:M.name||M.url},M.id))]}),l&&d.jsxs(Ot,{onClick:()=>D.mutate(),disabled:!r||D.isPending||a,variant:"outline",className:"gap-2",children:[D.isPending||a?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(ip,{className:"w-4 h-4"}),a?"Scanning…":"Rescan"]})]})]}),d.jsx(zDe,{used:f.length,limit:(n==null?void 0:n.scan_history)||0,tierName:n==null?void 0:n.display_name}),a&&d.jsxs(He.div,{initial:{opacity:0},animate:{opacity:1},className:"flex items-center gap-3 bg-primary/10 border border-primary/30 rounded-xl px-5 py-4",children:[d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-semibold text-primary",children:"Scan in progress…"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Results will refresh automatically in about 60 seconds."})]})]}),h?d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx(hn,{className:"w-6 h-6 animate-spin text-primary"})}):m?d.jsxs(d.Fragment,{children:[d.jsx(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"bg-card border border-border/50 rounded-xl p-6",children:d.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[d.jsx(nG,{score:j,size:140}),d.jsxs("div",{className:"flex-1 space-y-3 text-center md:text-left",children:[d.jsxs("div",{children:[d.jsx("p",{className:`text-lg font-bold ${R}`,children:L}),d.jsxs("p",{className:"text-xs text-muted-foreground font-mono mt-1",children:["Scanned ",Xe(m.created_at).format("MMM D, YYYY [at] HH:mm")]})]}),d.jsxs("div",{className:"flex flex-wrap gap-3 justify-center md:justify-start",children:[d.jsx(_h,{label:"Headers",count:y.length,color:"text-destructive"}),d.jsx(_h,{label:"Exposed Files",count:x.length,color:"text-neon-orange"}),d.jsx(_h,{label:"SSL Issues",count:w.length,color:"text-primary"}),d.jsx(_h,{label:"Open Ports",count:_.length,color:"text-neon-purple"}),d.jsx(_h,{label:"CORS",count:k.length,color:"text-neon-cyan"}),d.jsx(_h,{label:"Access Control",count:P.length,color:"text-neon-orange"}),C.length>0&&d.jsx(_h,{label:"Other",count:C.length,color:"text-muted-foreground"})]}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[b.length," total finding",b.length!==1?"s":""," across all categories"]})]})]})}),Q$(b)>0&&d.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex items-start gap-3 bg-muted/30 border border-border rounded-xl px-5 py-4",children:[d.jsx(mE,{className:"w-5 h-5 text-muted-foreground flex-shrink-0 mt-0.5"}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[d.jsxs("span",{className:"font-semibold text-foreground",children:[Q$(b)," of your findings are platform-level issues outside your direct control."]})," ","We've flagged these separately so you know what to bring to your hosting provider vs. what your developer can fix today."]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[d.jsx(Sh,{title:"Missing Security Headers",icon:Ki,iconColor:"text-destructive",findings:y,emptyMessage:"All security headers present"}),d.jsx(Sh,{title:"Exposed Files",icon:Dte,iconColor:"text-neon-orange",findings:x,emptyMessage:"No exposed files detected"}),d.jsx(Sh,{title:"SSL / TLS",icon:Vg,iconColor:"text-primary",findings:w,emptyMessage:"SSL certificate is valid — no issues"}),d.jsx(Sh,{title:"Open Ports",icon:bne,iconColor:"text-neon-purple",findings:_,emptyMessage:"No unexpected open ports"}),d.jsx(Sh,{title:"CORS Configuration",icon:jc,iconColor:"text-neon-cyan",findings:k,emptyMessage:"CORS policy looks secure"}),d.jsx(Sh,{title:"Access Control",icon:Oh,iconColor:"text-neon-orange",findings:P,emptyMessage:"No access control issues found"})]}),C.length>0&&d.jsx(Sh,{title:"Other Findings",icon:Nte,iconColor:"text-muted-foreground",findings:C,emptyMessage:"No additional findings"}),b.length>0&&d.jsx(TDe,{findings:b,siteUrl:(H=c.find(M=>M.id===r))==null?void 0:H.url,siteId:r}),d.jsx(VDe,{siteId:r})]}):d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-12 text-center",children:[d.jsx(CU,{className:"w-10 h-10 mx-auto text-muted-foreground/30 mb-3"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No scan reports yet"}),d.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1 font-mono",children:"Reports appear after your first security scan completes"})]})]})}function _h({label:e,count:t,color:n}){return d.jsxs("div",{className:"flex items-center gap-1.5 bg-muted/30 rounded-lg px-3 py-1.5",children:[d.jsx("span",{className:`text-lg font-bold font-mono ${t>0?n:"text-accent"}`,children:t}),d.jsx("span",{className:"text-xs text-muted-foreground",children:e})]})}function HDe(e){const t=YDe(e),n=E.forwardRef((r,i)=>{const{children:a,...o}=r,s=E.Children.toArray(a),l=s.find(KDe);if(l){const c=l.props.children,f=s.map(h=>h===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:h);return d.jsx(t,{...o,ref:i,children:E.isValidElement(c)?E.cloneElement(c,void 0,f):null})}return d.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function YDe(e){const t=E.forwardRef((n,r)=>{const{children:i,...a}=n;if(E.isValidElement(i)){const o=QDe(i),s=XDe(a,i.props);return i.type!==E.Fragment&&(s.ref=r?Qg(r,o):o),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GDe=Symbol("radix.slottable");function KDe(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GDe}function XDe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function QDe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var q5="Dialog",[dJ]=Rd(q5),[JDe,Fl]=dJ(q5),hJ=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=E.useRef(null),l=E.useRef(null),[c,f]=cp({prop:r,defaultProp:i??!1,onChange:a,caller:q5});return d.jsx(JDe,{scope:t,triggerRef:s,contentRef:l,contentId:xd(),titleId:xd(),descriptionId:xd(),open:c,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(h=>!h),[f]),modal:o,children:n})};hJ.displayName=q5;var pJ="DialogTrigger",ZDe=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fl(pJ,n),a=Ar(t,i.triggerRef);return d.jsx(An.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":MT(i.open),...r,ref:a,onClick:Nn(e.onClick,i.onOpenToggle)})});ZDe.displayName=pJ;var OT="DialogPortal",[e8e,mJ]=dJ(OT,{forceMount:void 0}),gJ=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Fl(OT,t);return d.jsx(e8e,{scope:t,forceMount:n,children:E.Children.map(r,o=>d.jsx(hy,{present:n||a.open,children:d.jsx(RO,{asChild:!0,container:i,children:o})}))})};gJ.displayName=OT;var d2="DialogOverlay",yJ=E.forwardRef((e,t)=>{const n=mJ(d2,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Fl(d2,e.__scopeDialog);return a.modal?d.jsx(hy,{present:r||a.open,children:d.jsx(n8e,{...i,ref:t})}):null});yJ.displayName=d2;var t8e=HDe("DialogOverlay.RemoveScroll"),n8e=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fl(d2,n);return d.jsx(DO,{as:t8e,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(An.div,{"data-state":MT(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),vp="DialogContent",vJ=E.forwardRef((e,t)=>{const n=mJ(vp,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Fl(vp,e.__scopeDialog);return d.jsx(hy,{present:r||a.open,children:a.modal?d.jsx(r8e,{...i,ref:t}):d.jsx(i8e,{...i,ref:t})})});vJ.displayName=vp;var r8e=E.forwardRef((e,t)=>{const n=Fl(vp,e.__scopeDialog),r=E.useRef(null),i=Ar(t,n.contentRef,r);return E.useEffect(()=>{const a=r.current;if(a)return dH(a)},[]),d.jsx(xJ,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nn(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Nn(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Nn(e.onFocusOutside,a=>a.preventDefault())})}),i8e=E.forwardRef((e,t)=>{const n=Fl(vp,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return d.jsx(xJ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),xJ=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Fl(vp,n),l=E.useRef(null),c=Ar(t,l);return $W(),d.jsxs(d.Fragment,{children:[d.jsx(kO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(NO,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":MT(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(a8e,{titleId:s.titleId}),d.jsx(s8e,{contentRef:l,descriptionId:s.descriptionId})]})]})}),TT="DialogTitle",bJ=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fl(TT,n);return d.jsx(An.h2,{id:i.titleId,...r,ref:t})});bJ.displayName=TT;var wJ="DialogDescription",SJ=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fl(wJ,n);return d.jsx(An.p,{id:i.descriptionId,...r,ref:t})});SJ.displayName=wJ;var _J="DialogClose",NJ=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fl(_J,n);return d.jsx(An.button,{type:"button",...r,ref:t,onClick:Nn(e.onClick,()=>i.onOpenChange(!1))})});NJ.displayName=_J;function MT(e){return e?"open":"closed"}var kJ="DialogTitleWarning",[A$e,AJ]=Xhe(kJ,{contentName:vp,titleName:TT,docsSlug:"dialog"}),a8e=({titleId:e})=>{const t=AJ(kJ),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},o8e="DialogDescriptionWarning",s8e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${AJ(o8e).contentName}}.`;return E.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},l8e=hJ,c8e=gJ,PJ=yJ,jJ=vJ,CJ=bJ,EJ=SJ,u8e=NJ;const f8e=l8e,d8e=c8e,OJ=E.forwardRef(({className:e,...t},n)=>d.jsx(PJ,{ref:n,className:Un("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));OJ.displayName=PJ.displayName;const TJ=E.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(d8e,{children:[d.jsx(OJ,{}),d.jsxs(jJ,{ref:r,className:Un("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(u8e,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(Lc,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));TJ.displayName=jJ.displayName;const MJ=({className:e,...t})=>d.jsx("div",{className:Un("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});MJ.displayName="DialogHeader";const LJ=({className:e,...t})=>d.jsx("div",{className:Un("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});LJ.displayName="DialogFooter";const RJ=E.forwardRef(({className:e,...t},n)=>d.jsx(CJ,{ref:n,className:Un("text-lg font-semibold leading-none tracking-tight",e),...t}));RJ.displayName=CJ.displayName;const IJ=E.forwardRef(({className:e,...t},n)=>d.jsx(EJ,{ref:n,className:Un("text-sm text-muted-foreground",e),...t}));IJ.displayName=EJ.displayName;function h8e({open:e,onClose:t,ip:n}){return d.jsx(f8e,{open:e,onOpenChange:r=>!r&&t(),children:d.jsxs(TJ,{className:"max-w-md bg-card border-border/60",children:[d.jsxs(MJ,{children:[d.jsx("div",{className:"w-10 h-10 rounded-full bg-destructive/10 flex items-center justify-center mb-2",children:d.jsx(Fb,{className:"w-5 h-5 text-destructive"})}),d.jsx(RJ,{className:"text-lg",children:"Blocking is a Pro feature"}),d.jsxs(IJ,{className:"text-sm text-muted-foreground leading-relaxed",children:["Your current plan detects attacks but doesn't block them. Upgrade to ",d.jsx("span",{className:"text-foreground font-medium",children:"Pro"})," to instantly block ",n?d.jsx("span",{className:"font-mono text-foreground",children:n}):"attackers"," and every future threat automatically."]})]}),d.jsx("ul",{className:"space-y-2 py-2",children:["Active IP blocking & whitelist","Full WAF (SQLi, XSS, RCE, path traversal)","Brute force & recon auto-blocking","Email alerts on critical threats"].map(r=>d.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[d.jsx(Od,{className:"w-3.5 h-3.5 mt-0.5 text-accent flex-shrink-0"}),d.jsx("span",{children:r})]},r))}),d.jsxs(LJ,{className:"gap-2 sm:gap-2",children:[d.jsx(Ot,{variant:"outline",size:"sm",onClick:t,className:"text-xs",children:"Maybe later"}),d.jsx(va,{to:"/dashboard/subscription",onClick:t,children:d.jsxs(Ot,{size:"sm",className:"text-xs gap-1.5 bg-primary text-primary-foreground hover:bg-primary/90",children:["Upgrade to Pro",d.jsx(zg,{className:"w-3 h-3"})]})})]})]})})}function Vv({items:e,pageSize:t=10,children:n,resetKey:r}){const[i,a]=E.useState(1),o=Math.max(1,Math.ceil(((e==null?void 0:e.length)||0)/t));E.useEffect(()=>{a(1)},[r]),E.useEffect(()=>{i>o&&a(o)},[o,i]);const s=E.useMemo(()=>{const l=(i-1)*t;return e.slice(l,l+t)},[e,i,t]);return d.jsxs(d.Fragment,{children:[n(s),e.length>t&&d.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border/30 text-xs text-muted-foreground",children:[d.jsxs("span",{className:"font-mono",children:["Page ",i," of ",o," · ",e.length," total"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(Ot,{size:"sm",variant:"outline",disabled:i===1,onClick:()=>a(l=>Math.max(1,l-1)),className:"h-7 px-2 text-xs gap-1",children:[d.jsx(gE,{className:"w-3.5 h-3.5"})," Prev"]}),d.jsxs(Ot,{size:"sm",variant:"outline",disabled:i===o,onClick:()=>a(l=>Math.min(o,l+1)),className:"h-7 px-2 text-xs gap-1",children:["Next ",d.jsx(b2,{className:"w-3.5 h-3.5"})]})]})]})]})}const p8e={critical:"bg-destructive/20 text-destructive border-destructive/30",high:"bg-neon-orange/20 text-neon-orange border-neon-orange/30",medium:"bg-neon-purple/20 text-neon-purple border-neon-purple/30",low:"bg-primary/20 text-primary border-primary/30",info:"bg-muted text-muted-foreground border-border"},$9={sql_injection:"SQL Injection",xss:"XSS Attack",path_traversal:"Path Traversal",rce:"Remote Code Exec",template_injection:"Template Injection",brute_force:"Brute Force",ddos:"DDoS Attempt",recon_scan:"Recon Scan",tool_detection:"Tool Detected",sensitive_path_probe:"Path Probe",unusual_http_method:"Unusual Method"},m8e=e=>ut.functions.invoke("siteApi",e).then(t=>t.data),g8e=e=>ut.functions.invoke("protection",e).then(t=>t.data);function y8e(){const[e,t]=E.useState("all"),[n,r]=E.useState("all"),[i,a]=E.useState(null),[o,s]=E.useState(null),[l,c]=E.useState(null),{toast:f}=Gs(),h=Li(),{user:g,features:m}=kp()||{},[,b]=E.useState(0);E.useEffect(()=>{const R=setInterval(()=>b(D=>D+1),3e4);return()=>clearInterval(R)},[]);const x=!((m==null?void 0:m.ip_blocking)===!0||["pro","compliance","enterprise"].includes(((m==null?void 0:m.tier)||"").toLowerCase())),{data:w=[]}=dn({queryKey:["sites",g==null?void 0:g.email],queryFn:()=>Fc(ut.entities.Site,{created_by:g.email}),enabled:!!(g!=null&&g.email),initialData:[]});E.useEffect(()=>{!i&&w.length>0&&a(w[0].id)},[w]);const{data:_=[],isLoading:k}=dn({queryKey:["all-threats",g==null?void 0:g.email],queryFn:async()=>{const R=await m8e({action:"get_all_threats"});return(R==null?void 0:R.threats)||[]},enabled:!!(g!=null&&g.email)&&w.length>0,refetchInterval:1e4,staleTime:5e3,retry:!1}),P=Hi({mutationFn:R=>g8e({action:"block_ip",site_id:i,ip:R,reason:"Blocked from threat feed"}),onSuccess:(R,D)=>{s(null),h.invalidateQueries({queryKey:["blocklist",i]}),f({title:"IP Blocked",description:`${D} has been blocked.`})},onError:R=>{s(null),f({title:"Error",description:R.message,variant:"destructive"})}}),C=R=>{if(!(!R||!i)){if(x){c(R);return}s(R),P.mutate(R)}},L=(i?_.filter(R=>R.site_id===i):_).filter(R=>!(e!=="all"&&R.severity!==e||n!=="all"&&(R.attack_type||R.type)!==n));return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Attack Log"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"All detected threats across your sites"})]}),d.jsxs("select",{value:i||"",onChange:R=>a(R.target.value),className:"bg-secondary border border-border text-foreground text-sm rounded-lg px-3 py-2 focus:outline-none focus:ring-1 focus:ring-primary",children:[d.jsx("option",{value:"",disabled:!0,children:"Select a site…"}),w.map(R=>d.jsx("option",{value:R.id,children:R.name||R.url},R.id))]})]}),x&&d.jsx(dQ,{}),d.jsxs("div",{className:"flex flex-wrap gap-3",children:[d.jsxs(qm,{value:e,onValueChange:t,children:[d.jsx(Jh,{className:"w-40 bg-card border-border/50 h-9 text-sm",children:d.jsx(Um,{placeholder:"Severity"})}),d.jsxs(Zh,{children:[d.jsx(Ci,{value:"all",children:"All Severities"}),d.jsx(Ci,{value:"critical",children:"Critical"}),d.jsx(Ci,{value:"high",children:"High"}),d.jsx(Ci,{value:"medium",children:"Medium"}),d.jsx(Ci,{value:"low",children:"Low"})]})]}),d.jsxs(qm,{value:n,onValueChange:r,children:[d.jsx(Jh,{className:"w-48 bg-card border-border/50 h-9 text-sm",children:d.jsx(Um,{placeholder:"Attack Type"})}),d.jsxs(Zh,{children:[d.jsx(Ci,{value:"all",children:"All Types"}),Object.entries($9).map(([R,D])=>d.jsx(Ci,{value:R,children:D},R))]})]})]}),d.jsx("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:k?d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx(hn,{className:"w-6 h-6 animate-spin text-primary"})}):L.length===0?d.jsxs("div",{className:"text-center py-12 text-sm text-muted-foreground",children:[d.jsx(Ki,{className:"w-8 h-8 mx-auto mb-3 opacity-30"}),"No attacks match your filters"]}):d.jsx(Vv,{items:L,pageSize:25,resetKey:`${i}-${e}-${n}`,children:R=>d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border/50 bg-muted/30",children:[d.jsx("th",{className:"text-left text-xs font-mono text-muted-foreground px-5 py-3",children:"Type"}),d.jsx("th",{className:"text-left text-xs font-mono text-muted-foreground px-5 py-3",children:"Severity"}),d.jsx("th",{className:"text-left text-xs font-mono text-muted-foreground px-5 py-3",children:"Attacker"}),d.jsx("th",{className:"text-left text-xs font-mono text-muted-foreground px-5 py-3",children:"Target"}),d.jsx("th",{className:"text-left text-xs font-mono text-muted-foreground px-5 py-3",children:"Status"}),d.jsx("th",{className:"text-left text-xs font-mono text-muted-foreground px-5 py-3",children:"Time"}),d.jsx("th",{className:"text-left text-xs font-mono text-muted-foreground px-5 py-3",children:"Action"})]})}),d.jsx("tbody",{children:R.map((D,H)=>{const M=D.attacker_ip||D.ip,F=D.attack_type||D.type;return d.jsxs("tr",{className:"border-b border-border/20 hover:bg-muted/20 transition-colors",children:[d.jsx("td",{className:"px-5 py-3",children:d.jsx("span",{className:"text-sm font-medium text-foreground",children:$9[F]||F||"—"})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx(Oi,{className:`text-[10px] border ${p8e[D.severity]}`,children:D.severity})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("div",{children:[d.jsx("span",{className:"text-sm font-mono text-foreground",children:M||"—"}),D.attacker_country&&d.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-0.5",children:[d.jsx(bE,{className:"w-3 h-3"}),D.attacker_city?`${D.attacker_city}, `:"",D.attacker_country]})]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx("span",{className:"text-xs font-mono text-primary/70",children:D.endpoint||"—"})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx(Oi,{variant:"outline",className:`text-[10px] ${!x&&D.blocked?"text-accent border-accent/30":"text-neon-orange border-neon-orange/30"}`,children:x?"Detected — not blocked":D.blocked?"Blocked":"Detected"})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:Xe(D.attack_timestamp||D.timestamp||D.created_date).fromNow()})}),d.jsx("td",{className:"px-5 py-3",children:M&&d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:()=>C(M),disabled:o===M,className:"h-6 px-2 text-[10px] text-destructive hover:bg-destructive/10 gap-1",children:[o===M?d.jsx(hn,{className:"w-3 h-3 animate-spin"}):d.jsx(Lu,{className:"w-3 h-3"}),"Block"]})})]},D.id||H)})})]})})})}),d.jsx(h8e,{open:!!l,ip:l,onClose:()=>c(null)})]})}function Qx({icon:e,label:t,value:n,color:r,delay:i}){return d.jsx(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:i,duration:.4},className:"bg-card border border-border/50 rounded-xl p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider font-mono",children:t}),d.jsx("p",{className:`text-2xl font-black font-mono mt-1 ${r}`,children:n})]}),d.jsx("div",{className:`p-2 rounded-lg bg-muted/50 ${r}`,children:d.jsx(e,{className:"w-4 h-4"})})]})})}function v8e({alerts:e}){const t=e.filter(a=>!a.read).length,n=e.filter(a=>a.severity==="critical").length,r=e.filter(a=>a.severity==="high").length,i=e.length;return d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[d.jsx(Qx,{icon:pg,label:"Unread",value:t,color:"text-primary",delay:0}),d.jsx(Qx,{icon:one,label:"Critical",value:n,color:"text-destructive",delay:.05}),d.jsx(Qx,{icon:so,label:"High",value:r,color:"text-neon-orange",delay:.1}),d.jsx(Qx,{icon:n1,label:"Total",value:i,color:"text-muted-foreground",delay:.15})]})}const q9={critical:"border-l-destructive",high:"border-l-neon-orange",medium:"border-l-neon-purple",low:"border-l-primary",info:"border-l-muted-foreground"},U9={critical:"bg-destructive/20 text-destructive border-destructive/30",high:"bg-neon-orange/20 text-neon-orange border-neon-orange/30",medium:"bg-neon-purple/20 text-neon-purple border-neon-purple/30",low:"bg-primary/20 text-primary border-primary/30",info:"bg-muted text-muted-foreground border-border"},x8e={sql_injection:"SQL Injection",xss:"XSS Attack",path_traversal:"Path Traversal",rce:"Remote Code Exec",template_injection:"Template Injection",brute_force:"Brute Force",ddos:"DDoS Attempt",recon_scan:"Recon Scan",tool_detection:"Tool Detected",sensitive_path_probe:"Path Probe",unusual_http_method:"Unusual Method"};function b8e({alert:e,siteName:t,onDismiss:n,index:r}){const i=!e.read,a=e.attack_type?x8e[e.attack_type]||e.attack_type:null;return d.jsxs(He.div,{layout:!0,initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,x:30},transition:{delay:Math.min(r*.03,.3),duration:.3},className:`relative border-l-4 bg-card border border-border/50 rounded-xl p-5 transition-all hover:border-border group ${q9[e.severity]||q9.info} ${i?"":"opacity-60"}`,children:[i&&d.jsx("span",{className:"absolute top-5 right-5 w-2 h-2 rounded-full bg-primary",children:d.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-primary animate-ping opacity-75"})}),d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[d.jsx(Oi,{className:`text-[10px] border uppercase ${U9[e.severity]||U9.info}`,children:e.severity}),a&&d.jsxs(Oi,{variant:"outline",className:"text-[10px] border-border/50",children:[d.jsx(Ki,{className:"w-2.5 h-2.5 mr-1"}),a]}),t&&d.jsxs(Oi,{variant:"outline",className:"text-[10px] border-border/50 text-muted-foreground",children:[d.jsx(jc,{className:"w-2.5 h-2.5 mr-1"}),t]})]}),d.jsx("h3",{className:"text-sm font-semibold text-foreground leading-snug",children:e.title}),e.description&&d.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:e.description}),d.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-3 text-xs text-muted-foreground",children:[e.attacker_ip&&d.jsxs("span",{className:"flex items-center gap-1 font-mono",children:[d.jsx(_2,{className:"w-3 h-3"}),e.attacker_ip]}),e.attacker_location&&d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(bE,{className:"w-3 h-3"}),e.attacker_location]}),e.target_page&&d.jsx("span",{className:"font-mono text-primary/70 truncate max-w-[240px]",title:e.target_page,children:e.target_page}),d.jsx("span",{className:"ml-auto text-[10px] font-mono",children:Xe(e.created_date).fromNow()})]})]}),i&&d.jsxs(Ot,{variant:"ghost",size:"sm",onClick:()=>n(e.id),className:"text-xs text-muted-foreground hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity",children:[d.jsx(Od,{className:"w-3 h-3 mr-1"}),"Dismiss"]})]})]})}const w8e=[{key:"all",label:"All"},{key:"unread",label:"Unread"},{key:"critical",label:"Critical"},{key:"high",label:"High"},{key:"medium",label:"Medium"}],DJ="shieldsync_alerts_read_v1",S8e=()=>{try{const e=localStorage.getItem(DJ);return new Set(e?JSON.parse(e):[])}catch{return new Set}},z9=e=>{try{localStorage.setItem(DJ,JSON.stringify(Array.from(e)))}catch{}},Jx=e=>ut.functions.invoke("siteApi",e).then(t=>t.data);function _8e(){const e=Li(),{user:t}=kp()||{},[n,r]=E.useState("all"),[i,a]=E.useState(()=>S8e()),[,o]=E.useState(0);E.useEffect(()=>{const j=setInterval(()=>o(L=>L+1),3e4);return()=>clearInterval(j)},[]);const{data:s=[]}=dn({queryKey:["sites",t==null?void 0:t.email],queryFn:()=>Fc(ut.entities.Site,{created_by:t.email}),enabled:!!(t!=null&&t.email),initialData:[]}),l=E.useMemo(()=>{const j=new Map;return s.forEach(L=>j.set(L.id,L.name||L.url)),j},[s]),{data:c=[],isFetching:f,refetch:h}=dn({queryKey:["all-threats",t==null?void 0:t.email],queryFn:async()=>{const j=await Jx({action:"get_all_threats"});return(j==null?void 0:j.threats)||[]},enabled:!!(t!=null&&t.email)&&s.length>0,refetchInterval:1e4,staleTime:5e3,retry:!1}),{data:g=[],refetch:m}=dn({queryKey:["all-alerts",t==null?void 0:t.email],queryFn:async()=>{const j=await Jx({action:"get_all_alerts"});return(j==null?void 0:j.alerts)||[]},enabled:!!(t!=null&&t.email)&&s.length>0,initialData:[],refetchInterval:1e4,staleTime:5e3}),b=()=>{h(),m()},y=E.useMemo(()=>{const j=new Map;return g.forEach(L=>{j.set(`db-${L.id}`,{id:`db-${L.id}`,source:"db",dbId:L.id,site_id:L.site_id,title:L.title,description:L.description,severity:L.severity,attack_type:L.attack_type,attacker_ip:L.attacker_ip,attacker_location:L.attacker_location,target_page:L.target_page,created_date:L.created_date,read:L.read||i.has(`db-${L.id}`)})}),c.forEach(L=>{const R=`attack-${L.id}`;if(j.has(R))return;const D=(L.severity||"medium").toLowerCase(),H=L.attacker_ip||L.source_ip||L.ip||"";j.set(R,{id:R,source:"attack",site_id:L.site_id,title:`${D.toUpperCase()}: ${L.attack_type||"Threat detected"}`,description:`Attack from ${H||"unknown IP"}${L.endpoint?` on ${L.endpoint}`:""}`,severity:D,attack_type:L.attack_type,attacker_ip:H,attacker_location:L.attacker_city?`${L.attacker_city}, ${L.attacker_country}`:L.attacker_country,target_page:L.endpoint,created_date:L.attack_timestamp||L.created_date,read:!0})}),Array.from(j.values()).sort((L,R)=>{const D=new Date(L.created_date||0).getTime();return new Date(R.created_date||0).getTime()-D})},[g,c,i]),x=Hi({mutationFn:async j=>{j.source==="db"&&j.dbId&&await Jx({action:"mark_alert_read",alert_id:j.dbId});const L=new Set(i);L.add(j.id),a(L),z9(L)},onSuccess:()=>{e.invalidateQueries({queryKey:["all-alerts"]}),e.invalidateQueries({queryKey:["unreadAlerts"]})}}),w=Hi({mutationFn:async()=>{const j=y.filter(D=>!D.read),L=j.filter(D=>D.source==="db"&&D.dbId).map(D=>D.dbId);L.length>0&&await Jx({action:"mark_all_alerts_read",alert_ids:L});const R=new Set(i);j.forEach(D=>R.add(D.id)),a(R),z9(R)},onSuccess:()=>{e.invalidateQueries({queryKey:["all-alerts"]}),e.invalidateQueries({queryKey:["unreadAlerts"]})}}),_=E.useMemo(()=>ZY(t),[t]),k=E.useMemo(()=>eG(y,_),[y,_]),P=E.useMemo(()=>n==="all"?k:n==="unread"?k.filter(j=>!j.read):k.filter(j=>j.severity===n),[k,n]),C=k.filter(j=>!j.read).length;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex items-start justify-between gap-4 flex-wrap",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Alerts"}),d.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[C," unread ",C===1?"alert":"alerts"," across ",s.length," ",s.length===1?"site":"sites"]})]}),d.jsxs("div",{className:"flex items-center gap-2 bg-card border border-border/50 rounded-full px-3 py-1.5 mt-1",children:[d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full ${f?"bg-primary animate-ping":"bg-accent"} opacity-75`}),d.jsx("span",{className:`relative inline-flex rounded-full h-2 w-2 ${f?"bg-primary":"bg-accent"}`})]}),d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider text-muted-foreground",children:f?"Syncing":"Live"})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(Ot,{variant:"outline",size:"sm",onClick:b,className:"gap-2 text-xs",children:[d.jsx(ip,{className:`w-3.5 h-3.5 ${f?"animate-spin":""}`}),"Refresh"]}),C>0&&d.jsxs(Ot,{variant:"outline",size:"sm",onClick:()=>w.mutate(),disabled:w.isPending,className:"gap-2 text-xs",children:[d.jsx(AU,{className:"w-3.5 h-3.5"}),"Mark all read"]})]})]}),d.jsx(v8e,{alerts:k}),d.jsx("div",{className:"flex flex-wrap items-center gap-2 bg-card border border-border/50 rounded-xl p-2",children:w8e.map(j=>{const L=j.key==="all"?k.length:j.key==="unread"?C:k.filter(D=>D.severity===j.key).length,R=n===j.key;return d.jsxs("button",{onClick:()=>r(j.key),className:`relative text-xs font-medium px-3 py-1.5 rounded-md transition-colors flex items-center gap-2 ${R?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[j.label,d.jsx("span",{className:`text-[10px] font-mono px-1.5 py-0.5 rounded ${R?"bg-primary/20":"bg-muted/70"}`,children:L})]},j.key)})}),d.jsx("div",{className:"space-y-3",children:P.length===0?d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-12 text-center",children:[d.jsx(pg,{className:"w-10 h-10 mx-auto text-muted-foreground/30 mb-3"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:y.length===0?"No alerts yet":`No ${n==="all"?"":n+" "}alerts`}),d.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1 font-mono",children:y.length===0?"Alerts will appear when attacks are detected":"Try a different filter"})]}):d.jsx(Vv,{items:P,pageSize:25,resetKey:n,children:j=>d.jsx(us,{mode:"popLayout",children:j.map((L,R)=>d.jsx(b8e,{alert:L,index:R,siteName:l.get(L.site_id),onDismiss:()=>x.mutate(L)},L.id))})})})]})}var qP="rovingFocusGroup.onEntryFocus",N8e={bubbles:!1,cancelable:!0},E1="RovingFocusGroup",[eE,FJ,k8e]=DW(E1),[A8e,BJ]=Rd(E1,[k8e]),[P8e,j8e]=A8e(E1),$J=E.forwardRef((e,t)=>d.jsx(eE.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(eE.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(C8e,{...e,ref:t})})}));$J.displayName=E1;var C8e=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...h}=e,g=E.useRef(null),m=Ar(t,g),b=_O(a),[y,x]=cp({prop:o,defaultProp:s??null,onChange:l,caller:E1}),[w,_]=E.useState(!1),k=Pd(c),P=FJ(n),C=E.useRef(!1),[j,L]=E.useState(0);return E.useEffect(()=>{const R=g.current;if(R)return R.addEventListener(qP,k),()=>R.removeEventListener(qP,k)},[k]),d.jsx(P8e,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:y,onItemFocus:E.useCallback(R=>x(R),[x]),onItemShiftTab:E.useCallback(()=>_(!0),[]),onFocusableItemAdd:E.useCallback(()=>L(R=>R+1),[]),onFocusableItemRemove:E.useCallback(()=>L(R=>R-1),[]),children:d.jsx(An.div,{tabIndex:w||j===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:Nn(e.onMouseDown,()=>{C.current=!0}),onFocus:Nn(e.onFocus,R=>{const D=!C.current;if(R.target===R.currentTarget&&D&&!w){const H=new CustomEvent(qP,N8e);if(R.currentTarget.dispatchEvent(H),!H.defaultPrevented){const M=P().filter(Y=>Y.focusable),F=M.find(Y=>Y.active),W=M.find(Y=>Y.id===y),X=[F,W,...M].filter(Boolean).map(Y=>Y.ref.current);zJ(X,f)}}C.current=!1}),onBlur:Nn(e.onBlur,()=>_(!1))})})}),qJ="RovingFocusGroupItem",UJ=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=xd(),c=a||l,f=j8e(qJ,n),h=f.currentTabStopId===c,g=FJ(n),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:y}=f;return E.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),d.jsx(eE.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:d.jsx(An.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Nn(e.onMouseDown,x=>{r?f.onItemFocus(c):x.preventDefault()}),onFocus:Nn(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:Nn(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=T8e(x,f.orientation,f.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let k=g().filter(P=>P.focusable).map(P=>P.ref.current);if(w==="last")k.reverse();else if(w==="prev"||w==="next"){w==="prev"&&k.reverse();const P=k.indexOf(x.currentTarget);k=f.loop?M8e(k,P+1):k.slice(P+1)}setTimeout(()=>zJ(k))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:y!=null}):o})})});UJ.displayName=qJ;var E8e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O8e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function T8e(e,t,n){const r=O8e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return E8e[r]}function zJ(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function M8e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var L8e=$J,R8e=UJ,U5="Tabs",[I8e]=Rd(U5,[BJ]),VJ=BJ(),[D8e,LT]=I8e(U5),WJ=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:l="automatic",...c}=e,f=_O(s),[h,g]=cp({prop:r,onChange:i,defaultProp:a??"",caller:U5});return d.jsx(D8e,{scope:n,baseId:xd(),value:h,onValueChange:g,orientation:o,dir:f,activationMode:l,children:d.jsx(An.div,{dir:f,"data-orientation":o,...c,ref:t})})});WJ.displayName=U5;var HJ="TabsList",YJ=E.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=LT(HJ,n),o=VJ(n);return d.jsx(L8e,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(An.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});YJ.displayName=HJ;var GJ="TabsTrigger",KJ=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=LT(GJ,n),s=VJ(n),l=JJ(o.baseId,r),c=ZJ(o.baseId,r),f=r===o.value;return d.jsx(R8e,{asChild:!0,...s,focusable:!i,active:f,children:d.jsx(An.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:t,onMouseDown:Nn(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:Nn(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:Nn(e.onFocus,()=>{const h=o.activationMode!=="manual";!f&&!i&&h&&o.onValueChange(r)})})})});KJ.displayName=GJ;var XJ="TabsContent",QJ=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=LT(XJ,n),l=JJ(s.baseId,r),c=ZJ(s.baseId,r),f=r===s.value,h=E.useRef(f);return E.useEffect(()=>{const g=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(g)},[]),d.jsx(hy,{present:i||f,children:({present:g})=>d.jsx(An.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!g,id:c,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:g&&a})})});QJ.displayName=XJ;function JJ(e,t){return`${e}-trigger-${t}`}function ZJ(e,t){return`${e}-content-${t}`}var F8e=WJ,eZ=YJ,tZ=KJ,nZ=QJ;const B8e=F8e,rZ=E.forwardRef(({className:e,...t},n)=>d.jsx(eZ,{ref:n,className:Un("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));rZ.displayName=eZ.displayName;const Cb=E.forwardRef(({className:e,...t},n)=>d.jsx(tZ,{ref:n,className:Un("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Cb.displayName=tZ.displayName;const Eb=E.forwardRef(({className:e,...t},n)=>d.jsx(nZ,{ref:n,className:Un("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Eb.displayName=nZ.displayName;function Nd({title:e,description:t,requiredPlan:n="Compliance"}){return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-10 text-center flex flex-col items-center gap-3",children:[d.jsx("div",{className:"w-12 h-12 rounded-xl bg-neon-purple/10 border border-neon-purple/30 flex items-center justify-center",children:d.jsx(Vg,{className:"w-5 h-5 text-neon-purple"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-bold text-foreground",children:e||"Upgrade required"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:t||`This feature is available on the ${n} plan and above.`})]}),d.jsx(va,{to:"/dashboard/settings",children:d.jsxs(Ot,{size:"sm",className:"gap-2 bg-neon-purple/20 text-neon-purple border border-neon-purple/30 hover:bg-neon-purple/30",children:[d.jsx(Bb,{className:"w-3.5 h-3.5"}),"Upgrade plan"]})})]})}const V9=e=>ut.functions.invoke("siteApi",e).then(t=>t.data),W9={critical:"bg-destructive/20 text-destructive border-destructive/30",high:"bg-neon-orange/20 text-neon-orange border-neon-orange/30",medium:"bg-neon-purple/20 text-neon-purple border-neon-purple/30",low:"bg-primary/20 text-primary border-primary/30"};function $8e({siteId:e,externalSiteId:t}){const{toast:n}=Gs(),r=Li(),[i,a]=E.useState(null),[o,s]=E.useState({}),{data:l,isLoading:c}=dn({queryKey:["incidents",e],queryFn:()=>V9({action:"get_incidents",site_id:e}),enabled:!!e,retry:!1}),f=(l==null?void 0:l._status)===403,h=Array.isArray(l==null?void 0:l.data)?l.data:Array.isArray(l==null?void 0:l.incidents)?l.incidents:Array.isArray(l)?l:[],g=Hi({mutationFn:({incidentId:m})=>V9({action:"resolve_incident",site_id:e,incident_id:m,resolution_notes:o[m]||""}),onSuccess:(m,{incidentId:b})=>{r.invalidateQueries({queryKey:["incidents",e]}),a(null),n({title:"Incident resolved",description:"Resolution notes saved."})},onError:m=>n({title:"Error",description:m.message,variant:"destructive"})});return c?d.jsx("div",{className:"flex justify-center py-10",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):f?d.jsx(Nd,{title:"Incident management requires an upgrade",description:(l==null?void 0:l.detail)||(l==null?void 0:l.message)||"IR documentation is available on the Compliance and Enterprise plans."}):h.length===0?d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-10 text-center",children:[d.jsx(ss,{className:"w-8 h-8 mx-auto text-accent mb-2"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No open incidents"})]}):d.jsx("div",{className:"space-y-3",children:h.map((m,b)=>{const y=i===m.id,x=m.status==="resolved";return d.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:b*.04},className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"flex items-start justify-between gap-4 p-5 cursor-pointer hover:bg-muted/20 transition-colors",onClick:()=>a(y?null:m.id),children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(Oi,{className:`text-[10px] border ${W9[m.severity]||W9.medium}`,children:m.severity}),x&&d.jsx(Oi,{className:"text-[10px] border bg-accent/20 text-accent border-accent/30",children:"Resolved"}),d.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:Xe(m.created_at||m.timestamp).fromNow()})]}),d.jsx("p",{className:"text-sm font-medium text-foreground",children:m.title||m.type}),m.description&&d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:m.description})]}),y?d.jsx(yE,{className:"w-4 h-4 text-muted-foreground flex-shrink-0 mt-1"}):d.jsx(x2,{className:"w-4 h-4 text-muted-foreground flex-shrink-0 mt-1"})]}),y&&d.jsxs("div",{className:"px-5 pb-5 border-t border-border/30 pt-4 space-y-3",children:[m.description&&d.jsx("p",{className:"text-sm text-muted-foreground",children:m.description}),!x&&d.jsxs(d.Fragment,{children:[d.jsx(F2,{placeholder:"Add resolution notes…",value:o[m.id]||"",onChange:w=>s(_=>({..._,[m.id]:w.target.value})),className:"bg-muted/50 border-border/50 text-sm resize-none h-20"}),d.jsxs(Ot,{size:"sm",onClick:()=>g.mutate({incidentId:m.id}),disabled:g.isPending,className:"gap-2 bg-accent text-accent-foreground hover:bg-accent/90",children:[g.isPending?d.jsx(hn,{className:"w-3.5 h-3.5 animate-spin"}):d.jsx(ss,{className:"w-3.5 h-3.5"}),"Mark Resolved"]})]}),x&&m.resolution_notes&&d.jsxs("div",{className:"bg-muted/30 rounded-lg p-3",children:[d.jsx("p",{className:"text-xs text-muted-foreground font-mono mb-1",children:"Resolution notes:"}),d.jsx("p",{className:"text-sm text-foreground",children:m.resolution_notes})]})]})]},m.id)})})}const q8e="modulepreload",U8e=function(e){return"/"+e},H9={},UP=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(c){return Promise.all(c.map(f=>Promise.resolve(f).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=o(n.map(c=>{if(c=U8e(c),c in H9)return;H9[c]=!0;const f=c.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const g=document.createElement("link");if(g.rel=f?"stylesheet":q8e,f||(g.as="script"),g.crossOrigin="",g.href=c,l&&g.setAttribute("nonce",l),document.head.appendChild(g),f)return new Promise((m,b)=>{g.addEventListener("load",m),g.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function lr(e){"@babel/helpers - typeof";return lr=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},lr(e)}var Ml=Uint8Array,os=Uint16Array,RT=Int32Array,IT=new Ml([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]),DT=new Ml([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]),Y9=new Ml([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),iZ=function(e,t){for(var n=new os(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new RT(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},aZ=iZ(IT,2),z8e=aZ.b,tE=aZ.r;z8e[28]=258,tE[258]=28;var V8e=iZ(DT,0),G9=V8e.r,nE=new os(32768);for(var Er=0;Er<32768;++Er){var Yf=(Er&43690)>>1|(Er&21845)<<1;Yf=(Yf&52428)>>2|(Yf&13107)<<2,Yf=(Yf&61680)>>4|(Yf&3855)<<4,nE[Er]=((Yf&65280)>>8|(Yf&255)<<8)>>1}var Wv=(function(e,t,n){for(var r=e.length,i=0,a=new os(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new os(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new os(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],f=t-e[i],h=o[e[i]-1]++<<f,g=h|(1<<f)-1;h<=g;++h)s[nE[h]>>l]=c}else for(s=new os(r),i=0;i<r;++i)e[i]&&(s[i]=nE[o[e[i]-1]++]>>15-e[i]);return s}),xp=new Ml(288);for(var Er=0;Er<144;++Er)xp[Er]=8;for(var Er=144;Er<256;++Er)xp[Er]=9;for(var Er=256;Er<280;++Er)xp[Er]=7;for(var Er=280;Er<288;++Er)xp[Er]=8;var h2=new Ml(32);for(var Er=0;Er<32;++Er)h2[Er]=5;var W8e=Wv(xp,9,0),H8e=Wv(h2,5,0),oZ=function(e){return(e+7)/8|0},Y8e=function(e,t,n){return(n==null||n>e.length)&&(n=e.length),new Ml(e.subarray(t,n))},Nu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},gv=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},zP=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:lZ,l:0};if(i==1){var o=new Ml(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(C,j){return C.f-j.f}),n.push({s:-1,f:25001});var s=n[0],l=n[1],c=0,f=1,h=2;for(n[0]={s:-1,f:s.f+l.f,l:s,r:l};f!=i-1;)s=n[n[c].f<n[h].f?c++:h++],l=n[c!=f&&n[c].f<n[h].f?c++:h++],n[f++]={s:-1,f:s.f+l.f,l:s,r:l};for(var g=a[0].s,r=1;r<i;++r)a[r].s>g&&(g=a[r].s);var m=new os(g+1),b=rE(n[f-1],m,0);if(b>t){var r=0,y=0,x=b-t,w=1<<x;for(a.sort(function(j,L){return m[L.s]-m[j.s]||j.f-L.f});r<i;++r){var _=a[r].s;if(m[_]>t)y+=w-(1<<b-m[_]),m[_]=t;else break}for(y>>=x;y>0;){var k=a[r].s;m[k]<t?y-=1<<t-m[k]++-1:++r}for(;r>=0&&y;--r){var P=a[r].s;m[P]==t&&(--m[P],++y)}b=t}return{t:new Ml(m),l:b}},rE=function(e,t,n){return e.s==-1?Math.max(rE(e.l,t,n+1),rE(e.r,t,n+1)):t[e.s]=n},K9=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new os(++t),r=0,i=e[0],a=1,o=function(l){n[r++]=l},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},yv=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},sZ=function(e,t,n){var r=n.length,i=oZ(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},X9=function(e,t,n,r,i,a,o,s,l,c,f){Nu(t,f++,n),++i[256];for(var h=zP(i,15),g=h.t,m=h.l,b=zP(a,15),y=b.t,x=b.l,w=K9(g),_=w.c,k=w.n,P=K9(y),C=P.c,j=P.n,L=new os(19),R=0;R<_.length;++R)++L[_[R]&31];for(var R=0;R<C.length;++R)++L[C[R]&31];for(var D=zP(L,7),H=D.t,M=D.l,F=19;F>4&&!H[Y9[F-1]];--F);var W=c+5<<3,V=yv(i,xp)+yv(a,h2)+o,X=yv(i,g)+yv(a,y)+o+14+3*F+yv(L,H)+2*L[16]+3*L[17]+7*L[18];if(l>=0&&W<=V&&W<=X)return sZ(t,f,e.subarray(l,l+c));var Y,Z,K,se;if(Nu(t,f,1+(X<V)),f+=2,X<V){Y=Wv(g,m,0),Z=g,K=Wv(y,x,0),se=y;var z=Wv(H,M,0);Nu(t,f,k-257),Nu(t,f+5,j-1),Nu(t,f+10,F-4),f+=14;for(var R=0;R<F;++R)Nu(t,f+3*R,H[Y9[R]]);f+=3*F;for(var te=[_,C],$=0;$<2;++$)for(var q=te[$],R=0;R<q.length;++R){var re=q[R]&31;Nu(t,f,z[re]),f+=H[re],re>15&&(Nu(t,f,q[R]>>5&127),f+=q[R]>>12)}}else Y=W8e,Z=xp,K=H8e,se=h2;for(var R=0;R<s;++R){var le=r[R];if(le>255){var re=le>>18&31;gv(t,f,Y[re+257]),f+=Z[re+257],re>7&&(Nu(t,f,le>>23&31),f+=IT[re]);var de=le&31;gv(t,f,K[de]),f+=se[de],de>3&&(gv(t,f,le>>5&8191),f+=DT[de])}else gv(t,f,Y[le]),f+=Z[le]}return gv(t,f,Y[256]),f+Z[256]},G8e=new RT([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),lZ=new Ml(0),K8e=function(e,t,n,r,i,a){var o=a.z||e.length,s=new Ml(r+o+5*(1+Math.ceil(o/7e3))+i),l=s.subarray(r,s.length-i),c=a.l,f=(a.r||0)&7;if(t){f&&(l[0]=a.r>>3);for(var h=G8e[t-1],g=h>>13,m=h&8191,b=(1<<n)-1,y=a.p||new os(32768),x=a.h||new os(b+1),w=Math.ceil(n/3),_=2*w,k=function(Ye){return(e[Ye]^e[Ye+1]<<w^e[Ye+2]<<_)&b},P=new RT(25e3),C=new os(288),j=new os(32),L=0,R=0,D=a.i||0,H=0,M=a.w||0,F=0;D+2<o;++D){var W=k(D),V=D&32767,X=x[W];if(y[V]=X,x[W]=V,M<=D){var Y=o-D;if((L>7e3||H>24576)&&(Y>423||!c)){f=X9(e,l,0,P,C,j,R,H,F,D-F,f),H=L=R=0,F=D;for(var Z=0;Z<286;++Z)C[Z]=0;for(var Z=0;Z<30;++Z)j[Z]=0}var K=2,se=0,z=m,te=V-X&32767;if(Y>2&&W==k(D-te))for(var $=Math.min(g,Y)-1,q=Math.min(32767,D),re=Math.min(258,Y);te<=q&&--z&&V!=X;){if(e[D+K]==e[D+K-te]){for(var le=0;le<re&&e[D+le]==e[D+le-te];++le);if(le>K){if(K=le,se=te,le>$)break;for(var de=Math.min(te,le-2),pe=0,Z=0;Z<de;++Z){var ve=D-te+Z&32767,he=y[ve],xe=ve-he&32767;xe>pe&&(pe=xe,X=ve)}}}V=X,X=y[V],te+=V-X&32767}if(se){P[H++]=268435456|tE[K]<<18|G9[se];var Pe=tE[K]&31,Se=G9[se]&31;R+=IT[Pe]+DT[Se],++C[257+Pe],++j[Se],M=D+K,++L}else P[H++]=e[D],++C[e[D]]}}for(D=Math.max(D,M);D<o;++D)P[H++]=e[D],++C[e[D]];f=X9(e,l,c,P,C,j,R,H,F,D-F,f),c||(a.r=f&7|l[f/8|0]<<3,f-=7,a.h=x,a.p=y,a.i=D,a.w=M)}else{for(var D=a.w||0;D<o+c;D+=65535){var Ue=D+65535;Ue>=o&&(l[f/8|0]=c,Ue=o),f=sZ(l,f+1,e.subarray(D,Ue))}a.i=o}return Y8e(s,0,r+oZ(f)+i)},cZ=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=r+=n[o];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},X8e=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new Ml(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return K8e(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},uZ=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},Q8e=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=cZ();i.p(t.dictionary),uZ(e,2,i.d())}};function iE(e,t){t||(t={});var n=cZ();n.p(e);var r=X8e(e,t,t.dictionary?6:2,4);return Q8e(r,t),uZ(r,r.length-4,n.d()),r}var J8e=typeof TextDecoder<"u"&&new TextDecoder,Z8e=0;try{J8e.decode(lZ,{stream:!0}),Z8e=1}catch{}function eFe(e){if(Array.isArray(e))return e}function tFe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Q9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nFe(e,t){if(e){if(typeof e=="string")return Q9(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q9(e,t):void 0}}function rFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J9(e,t){return eFe(e)||tFe(e,t)||nFe(e,t)||rFe()}function Z9(e,t="utf8"){return new TextDecoder(t).decode(e)}const iFe=new TextEncoder;function aFe(e){return iFe.encode(e)}const oFe=1024*8,sFe=(()=>{const e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),VP={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class FT{constructor(t=oFe,n={}){or(this,"buffer");or(this,"byteLength");or(this,"byteOffset");or(this,"length");or(this,"offset");or(this,"lastWrittenByte");or(this,"littleEndian");or(this,"_data");or(this,"_mark");or(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const i=n.offset?n.offset>>>0:0,a=t.byteLength-i;let o=i;(ArrayBuffer.isView(t)||t instanceof FT)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const r=(this.offset+t)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,n){const r=VP[n].BYTES_PER_ELEMENT*t,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+r);if(this.littleEndian===sFe&&n!=="uint8"&&n!=="int8"){const s=new Uint8Array(this.buffer.slice(i,i+r));s.reverse();const l=new VP[n](s.buffer);return this.offset+=r,l.reverse(),l}const o=new VP[n](a);return this.offset+=r,o}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let n="";for(let r=0;r<t;r++)n+=this.readChar();return n}readUtf8(t=1){return Z9(this.readBytes(t))}decodeText(t=1,n="utf8"){return Z9(this.readBytes(t),n)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let n=0;n<t.length;n++)this._data.setUint8(this.offset++,t[n]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let n=0;n<t.length;n++)this.writeUint8(t.charCodeAt(n));return this}writeUtf8(t){return this.writeBytes(aFe(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function gy(e){let t=e.length;for(;--t>=0;)e[t]=0}const lFe=3,cFe=258,fZ=29,uFe=256,fFe=uFe+1+fZ,dZ=30,dFe=512,hFe=new Array((fFe+2)*2);gy(hFe);const pFe=new Array(dZ*2);gy(pFe);const mFe=new Array(dFe);gy(mFe);const gFe=new Array(cFe-lFe+1);gy(gFe);const yFe=new Array(fZ);gy(yFe);const vFe=new Array(dZ);gy(vFe);const xFe=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};var aE=xFe;const bFe=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},wFe=new Uint32Array(bFe()),SFe=(e,t,n,r)=>{const i=wFe,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1};var sc=SFe,oE={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},hZ={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const _Fe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var NFe=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)_Fe(n,r)&&(e[r]=n[r])}}return e},kFe=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,a=e.length;r<a;r++){let o=e[r];n.set(o,i),i+=o.length}return n},pZ={assign:NFe,flattenChunks:kFe};let mZ=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{mZ=!1}const G0=new Uint8Array(256);for(let e=0;e<256;e++)G0[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;G0[254]=G0[254]=1;var AFe=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const PFe=(e,t)=>{if(t<65534&&e.subarray&&mZ)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var jFe=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=e[r++];if(o<128){a[i++]=o;continue}let s=G0[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|e[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return PFe(a,i)},CFe=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+G0[e[n]]>t?n:t},sE={string2buf:AFe,buf2string:jFe,utf8border:CFe};function EFe(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var OFe=EFe;const Zx=16209,TFe=16191;var MFe=function(t,n){let r,i,a,o,s,l,c,f,h,g,m,b,y,x,w,_,k,P,C,j,L,R,D,H;const M=t.state;r=t.next_in,D=t.input,i=r+(t.avail_in-5),a=t.next_out,H=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),l=M.dmax,c=M.wsize,f=M.whave,h=M.wnext,g=M.window,m=M.hold,b=M.bits,y=M.lencode,x=M.distcode,w=(1<<M.lenbits)-1,_=(1<<M.distbits)-1;e:do{b<15&&(m+=D[r++]<<b,b+=8,m+=D[r++]<<b,b+=8),k=y[m&w];t:for(;;){if(P=k>>>24,m>>>=P,b-=P,P=k>>>16&255,P===0)H[a++]=k&65535;else if(P&16){C=k&65535,P&=15,P&&(b<P&&(m+=D[r++]<<b,b+=8),C+=m&(1<<P)-1,m>>>=P,b-=P),b<15&&(m+=D[r++]<<b,b+=8,m+=D[r++]<<b,b+=8),k=x[m&_];n:for(;;){if(P=k>>>24,m>>>=P,b-=P,P=k>>>16&255,P&16){if(j=k&65535,P&=15,b<P&&(m+=D[r++]<<b,b+=8,b<P&&(m+=D[r++]<<b,b+=8)),j+=m&(1<<P)-1,j>l){t.msg="invalid distance too far back",M.mode=Zx;break e}if(m>>>=P,b-=P,P=a-o,j>P){if(P=j-P,P>f&&M.sane){t.msg="invalid distance too far back",M.mode=Zx;break e}if(L=0,R=g,h===0){if(L+=c-P,P<C){C-=P;do H[a++]=g[L++];while(--P);L=a-j,R=H}}else if(h<P){if(L+=c+h-P,P-=h,P<C){C-=P;do H[a++]=g[L++];while(--P);if(L=0,h<C){P=h,C-=P;do H[a++]=g[L++];while(--P);L=a-j,R=H}}}else if(L+=h-P,P<C){C-=P;do H[a++]=g[L++];while(--P);L=a-j,R=H}for(;C>2;)H[a++]=R[L++],H[a++]=R[L++],H[a++]=R[L++],C-=3;C&&(H[a++]=R[L++],C>1&&(H[a++]=R[L++]))}else{L=a-j;do H[a++]=H[L++],H[a++]=H[L++],H[a++]=H[L++],C-=3;while(C>2);C&&(H[a++]=H[L++],C>1&&(H[a++]=H[L++]))}}else if((P&64)===0){k=x[(k&65535)+(m&(1<<P)-1)];continue n}else{t.msg="invalid distance code",M.mode=Zx;break e}break}}else if((P&64)===0){k=y[(k&65535)+(m&(1<<P)-1)];continue t}else if(P&32){M.mode=TFe;break e}else{t.msg="invalid literal/length code",M.mode=Zx;break e}break}}while(r<i&&a<s);C=b>>3,r-=C,b-=C<<3,m&=(1<<b)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),M.hold=m,M.bits=b};const Sm=15,eq=852,tq=592,nq=0,WP=1,rq=2,LFe=new Uint16Array([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,0,0]),RFe=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),IFe=new Uint16Array([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,0,0]),DFe=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),FFe=(e,t,n,r,i,a,o,s)=>{const l=s.bits;let c=0,f=0,h=0,g=0,m=0,b=0,y=0,x=0,w=0,_=0,k,P,C,j,L,R=null,D;const H=new Uint16Array(Sm+1),M=new Uint16Array(Sm+1);let F=null,W,V,X;for(c=0;c<=Sm;c++)H[c]=0;for(f=0;f<r;f++)H[t[n+f]]++;for(m=l,g=Sm;g>=1&&H[g]===0;g--);if(m>g&&(m=g),g===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(h=1;h<g&&H[h]===0;h++);for(m<h&&(m=h),x=1,c=1;c<=Sm;c++)if(x<<=1,x-=H[c],x<0)return-1;if(x>0&&(e===nq||g!==1))return-1;for(M[1]=0,c=1;c<Sm;c++)M[c+1]=M[c]+H[c];for(f=0;f<r;f++)t[n+f]!==0&&(o[M[t[n+f]]++]=f);if(e===nq?(R=F=o,D=20):e===WP?(R=LFe,F=RFe,D=257):(R=IFe,F=DFe,D=0),_=0,f=0,c=h,L=a,b=m,y=0,C=-1,w=1<<m,j=w-1,e===WP&&w>eq||e===rq&&w>tq)return 1;for(;;){W=c-y,o[f]+1<D?(V=0,X=o[f]):o[f]>=D?(V=F[o[f]-D],X=R[o[f]-D]):(V=96,X=0),k=1<<c-y,P=1<<b,h=P;do P-=k,i[L+(_>>y)+P]=W<<24|V<<16|X|0;while(P!==0);for(k=1<<c-1;_&k;)k>>=1;if(k!==0?(_&=k-1,_+=k):_=0,f++,--H[c]===0){if(c===g)break;c=t[n+o[f]]}if(c>m&&(_&j)!==C){for(y===0&&(y=m),L+=h,b=c-y,x=1<<b;b+y<g&&(x-=H[b+y],!(x<=0));)b++,x<<=1;if(w+=1<<b,e===WP&&w>eq||e===rq&&w>tq)return 1;C=_&j,i[C]=m<<24|b<<16|L-a|0}}return _!==0&&(i[L+_]=c-y<<24|64<<16|0),s.bits=m,0};var Hv=FFe;const BFe=0,gZ=1,yZ=2,{Z_FINISH:iq,Z_BLOCK:$Fe,Z_TREES:eb,Z_OK:bp,Z_STREAM_END:qFe,Z_NEED_DICT:UFe,Z_STREAM_ERROR:Ys,Z_DATA_ERROR:vZ,Z_MEM_ERROR:xZ,Z_BUF_ERROR:zFe,Z_DEFLATED:aq}=hZ,z5=16180,oq=16181,sq=16182,lq=16183,cq=16184,uq=16185,fq=16186,dq=16187,hq=16188,pq=16189,p2=16190,ku=16191,HP=16192,mq=16193,YP=16194,gq=16195,yq=16196,vq=16197,xq=16198,tb=16199,nb=16200,bq=16201,wq=16202,Sq=16203,_q=16204,Nq=16205,GP=16206,kq=16207,Aq=16208,Br=16209,bZ=16210,wZ=16211,VFe=852,WFe=592,HFe=15,YFe=HFe,Pq=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function GFe(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Mp=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<z5||t.mode>wZ?1:0},SZ=e=>{if(Mp(e))return Ys;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=z5,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(VFe),t.distcode=t.distdyn=new Int32Array(WFe),t.sane=1,t.back=-1,bp},_Z=e=>{if(Mp(e))return Ys;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,SZ(e)},NZ=(e,t)=>{let n;if(Mp(e))return Ys;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Ys:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,_Z(e))},kZ=(e,t)=>{if(!e)return Ys;const n=new GFe;e.state=n,n.strm=e,n.window=null,n.mode=z5;const r=NZ(e,t);return r!==bp&&(e.state=null),r},KFe=e=>kZ(e,YFe);let jq=!0,KP,XP;const XFe=e=>{if(jq){KP=new Int32Array(512),XP=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Hv(gZ,e.lens,0,288,KP,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Hv(yZ,e.lens,0,32,XP,0,e.work,{bits:5}),jq=!1}e.lencode=KP,e.lenbits=9,e.distcode=XP,e.distbits=5},AZ=(e,t,n,r)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},QFe=(e,t)=>{let n,r,i,a,o,s,l,c,f,h,g,m,b,y,x=0,w,_,k,P,C,j,L,R;const D=new Uint8Array(4);let H,M;const F=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Mp(e)||!e.output||!e.input&&e.avail_in!==0)return Ys;n=e.state,n.mode===ku&&(n.mode=HP),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,f=n.bits,h=s,g=l,R=bp;e:for(;;)switch(n.mode){case z5:if(n.wrap===0){n.mode=HP;break}for(;f<16;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(n.wrap&2&&c===35615){n.wbits===0&&(n.wbits=15),n.check=0,D[0]=c&255,D[1]=c>>>8&255,n.check=sc(n.check,D,2,0),c=0,f=0,n.mode=oq;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Br;break}if((c&15)!==aq){e.msg="unknown compression method",n.mode=Br;break}if(c>>>=4,f-=4,L=(c&15)+8,n.wbits===0&&(n.wbits=L),L>15||L>n.wbits){e.msg="invalid window size",n.mode=Br;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=c&512?pq:ku,c=0,f=0;break;case oq:for(;f<16;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(n.flags=c,(n.flags&255)!==aq){e.msg="unknown compression method",n.mode=Br;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Br;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&n.wrap&4&&(D[0]=c&255,D[1]=c>>>8&255,n.check=sc(n.check,D,2,0)),c=0,f=0,n.mode=sq;case sq:for(;f<32;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}n.head&&(n.head.time=c),n.flags&512&&n.wrap&4&&(D[0]=c&255,D[1]=c>>>8&255,D[2]=c>>>16&255,D[3]=c>>>24&255,n.check=sc(n.check,D,4,0)),c=0,f=0,n.mode=lq;case lq:for(;f<16;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&n.wrap&4&&(D[0]=c&255,D[1]=c>>>8&255,n.check=sc(n.check,D,2,0)),c=0,f=0,n.mode=cq;case cq:if(n.flags&1024){for(;f<16;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&n.wrap&4&&(D[0]=c&255,D[1]=c>>>8&255,n.check=sc(n.check,D,2,0)),c=0,f=0}else n.head&&(n.head.extra=null);n.mode=uq;case uq:if(n.flags&1024&&(m=n.length,m>s&&(m=s),m&&(n.head&&(L=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+m),L)),n.flags&512&&n.wrap&4&&(n.check=sc(n.check,r,m,a)),s-=m,a+=m,n.length-=m),n.length))break e;n.length=0,n.mode=fq;case fq:if(n.flags&2048){if(s===0)break e;m=0;do L=r[a+m++],n.head&&L&&n.length<65536&&(n.head.name+=String.fromCharCode(L));while(L&&m<s);if(n.flags&512&&n.wrap&4&&(n.check=sc(n.check,r,m,a)),s-=m,a+=m,L)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=dq;case dq:if(n.flags&4096){if(s===0)break e;m=0;do L=r[a+m++],n.head&&L&&n.length<65536&&(n.head.comment+=String.fromCharCode(L));while(L&&m<s);if(n.flags&512&&n.wrap&4&&(n.check=sc(n.check,r,m,a)),s-=m,a+=m,L)break e}else n.head&&(n.head.comment=null);n.mode=hq;case hq:if(n.flags&512){for(;f<16;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(n.wrap&4&&c!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Br;break}c=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ku;break;case pq:for(;f<32;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}e.adler=n.check=Pq(c),c=0,f=0,n.mode=p2;case p2:if(n.havedict===0)return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=f,UFe;e.adler=n.check=1,n.mode=ku;case ku:if(t===$Fe||t===eb)break e;case HP:if(n.last){c>>>=f&7,f-=f&7,n.mode=GP;break}for(;f<3;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}switch(n.last=c&1,c>>>=1,f-=1,c&3){case 0:n.mode=mq;break;case 1:if(XFe(n),n.mode=tb,t===eb){c>>>=2,f-=2;break e}break;case 2:n.mode=yq;break;case 3:e.msg="invalid block type",n.mode=Br}c>>>=2,f-=2;break;case mq:for(c>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Br;break}if(n.length=c&65535,c=0,f=0,n.mode=YP,t===eb)break e;case YP:n.mode=gq;case gq:if(m=n.length,m){if(m>s&&(m=s),m>l&&(m=l),m===0)break e;i.set(r.subarray(a,a+m),o),s-=m,a+=m,l-=m,o+=m,n.length-=m;break}n.mode=ku;break;case yq:for(;f<14;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(n.nlen=(c&31)+257,c>>>=5,f-=5,n.ndist=(c&31)+1,c>>>=5,f-=5,n.ncode=(c&15)+4,c>>>=4,f-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Br;break}n.have=0,n.mode=vq;case vq:for(;n.have<n.ncode;){for(;f<3;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}n.lens[F[n.have++]]=c&7,c>>>=3,f-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,H={bits:n.lenbits},R=Hv(BFe,n.lens,0,19,n.lencode,0,n.work,H),n.lenbits=H.bits,R){e.msg="invalid code lengths set",n.mode=Br;break}n.have=0,n.mode=xq;case xq:for(;n.have<n.nlen+n.ndist;){for(;x=n.lencode[c&(1<<n.lenbits)-1],w=x>>>24,_=x>>>16&255,k=x&65535,!(w<=f);){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(k<16)c>>>=w,f-=w,n.lens[n.have++]=k;else{if(k===16){for(M=w+2;f<M;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(c>>>=w,f-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Br;break}L=n.lens[n.have-1],m=3+(c&3),c>>>=2,f-=2}else if(k===17){for(M=w+3;f<M;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}c>>>=w,f-=w,L=0,m=3+(c&7),c>>>=3,f-=3}else{for(M=w+7;f<M;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}c>>>=w,f-=w,L=0,m=11+(c&127),c>>>=7,f-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Br;break}for(;m--;)n.lens[n.have++]=L}}if(n.mode===Br)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Br;break}if(n.lenbits=9,H={bits:n.lenbits},R=Hv(gZ,n.lens,0,n.nlen,n.lencode,0,n.work,H),n.lenbits=H.bits,R){e.msg="invalid literal/lengths set",n.mode=Br;break}if(n.distbits=6,n.distcode=n.distdyn,H={bits:n.distbits},R=Hv(yZ,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,H),n.distbits=H.bits,R){e.msg="invalid distances set",n.mode=Br;break}if(n.mode=tb,t===eb)break e;case tb:n.mode=nb;case nb:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=f,MFe(e,g),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,f=n.bits,n.mode===ku&&(n.back=-1);break}for(n.back=0;x=n.lencode[c&(1<<n.lenbits)-1],w=x>>>24,_=x>>>16&255,k=x&65535,!(w<=f);){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(_&&(_&240)===0){for(P=w,C=_,j=k;x=n.lencode[j+((c&(1<<P+C)-1)>>P)],w=x>>>24,_=x>>>16&255,k=x&65535,!(P+w<=f);){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}c>>>=P,f-=P,n.back+=P}if(c>>>=w,f-=w,n.back+=w,n.length=k,_===0){n.mode=Nq;break}if(_&32){n.back=-1,n.mode=ku;break}if(_&64){e.msg="invalid literal/length code",n.mode=Br;break}n.extra=_&15,n.mode=bq;case bq:if(n.extra){for(M=n.extra;f<M;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=wq;case wq:for(;x=n.distcode[c&(1<<n.distbits)-1],w=x>>>24,_=x>>>16&255,k=x&65535,!(w<=f);){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if((_&240)===0){for(P=w,C=_,j=k;x=n.distcode[j+((c&(1<<P+C)-1)>>P)],w=x>>>24,_=x>>>16&255,k=x&65535,!(P+w<=f);){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}c>>>=P,f-=P,n.back+=P}if(c>>>=w,f-=w,n.back+=w,_&64){e.msg="invalid distance code",n.mode=Br;break}n.offset=k,n.extra=_&15,n.mode=Sq;case Sq:if(n.extra){for(M=n.extra;f<M;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Br;break}n.mode=_q;case _q:if(l===0)break e;if(m=g-l,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Br;break}m>n.wnext?(m-=n.wnext,b=n.wsize-m):b=n.wnext-m,m>n.length&&(m=n.length),y=n.window}else y=i,b=o-n.offset,m=n.length;m>l&&(m=l),l-=m,n.length-=m;do i[o++]=y[b++];while(--m);n.length===0&&(n.mode=nb);break;case Nq:if(l===0)break e;i[o++]=n.length,l--,n.mode=nb;break;case GP:if(n.wrap){for(;f<32;){if(s===0)break e;s--,c|=r[a++]<<f,f+=8}if(g-=l,e.total_out+=g,n.total+=g,n.wrap&4&&g&&(e.adler=n.check=n.flags?sc(n.check,i,g,o-g):aE(n.check,i,g,o-g)),g=l,n.wrap&4&&(n.flags?c:Pq(c))!==n.check){e.msg="incorrect data check",n.mode=Br;break}c=0,f=0}n.mode=kq;case kq:if(n.wrap&&n.flags){for(;f<32;){if(s===0)break e;s--,c+=r[a++]<<f,f+=8}if(n.wrap&4&&c!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Br;break}c=0,f=0}n.mode=Aq;case Aq:R=qFe;break e;case Br:R=vZ;break e;case bZ:return xZ;case wZ:default:return Ys}return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=f,(n.wsize||g!==e.avail_out&&n.mode<Br&&(n.mode<GP||t!==iq))&&AZ(e,e.output,e.next_out,g-e.avail_out),h-=e.avail_in,g-=e.avail_out,e.total_in+=h,e.total_out+=g,n.total+=g,n.wrap&4&&g&&(e.adler=n.check=n.flags?sc(n.check,i,g,e.next_out-g):aE(n.check,i,g,e.next_out-g)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ku?128:0)+(n.mode===tb||n.mode===YP?256:0),(h===0&&g===0||t===iq)&&R===bp&&(R=zFe),R},JFe=e=>{if(Mp(e))return Ys;let t=e.state;return t.window&&(t.window=null),e.state=null,bp},ZFe=(e,t)=>{if(Mp(e))return Ys;const n=e.state;return(n.wrap&2)===0?Ys:(n.head=t,t.done=!1,bp)},e7e=(e,t)=>{const n=t.length;let r,i,a;return Mp(e)||(r=e.state,r.wrap!==0&&r.mode!==p2)?Ys:r.mode===p2&&(i=1,i=aE(i,t,n,0),i!==r.check)?vZ:(a=AZ(e,t,n,n),a?(r.mode=bZ,xZ):(r.havedict=1,bp))};var t7e=_Z,n7e=NZ,r7e=SZ,i7e=KFe,a7e=kZ,o7e=QFe,s7e=JFe,l7e=ZFe,c7e=e7e,u7e="pako inflate (from Nodeca project)",ju={inflateReset:t7e,inflateReset2:n7e,inflateResetKeep:r7e,inflateInit:i7e,inflateInit2:a7e,inflate:o7e,inflateEnd:s7e,inflateGetHeader:l7e,inflateSetDictionary:c7e,inflateInfo:u7e};function f7e(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var d7e=f7e;const PZ=Object.prototype.toString,{Z_NO_FLUSH:h7e,Z_FINISH:p7e,Z_OK:K0,Z_STREAM_END:QP,Z_NEED_DICT:JP,Z_STREAM_ERROR:m7e,Z_DATA_ERROR:Cq,Z_MEM_ERROR:g7e}=hZ;function O1(e){this.options=pZ.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new OFe,this.strm.avail_out=0;let n=ju.inflateInit2(this.strm,t.windowBits);if(n!==K0)throw new Error(oE[n]);if(this.header=new d7e,ju.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=sE.string2buf(t.dictionary):PZ.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ju.inflateSetDictionary(this.strm,t.dictionary),n!==K0)))throw new Error(oE[n])}O1.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?p7e:h7e,PZ.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=ju.inflate(n,o),a===JP&&i&&(a=ju.inflateSetDictionary(n,i),a===K0?a=ju.inflate(n,o):a===Cq&&(a=JP));n.avail_in>0&&a===QP&&n.state.wrap>0&&e[n.next_in]!==0;)ju.inflateReset(n),a=ju.inflate(n,o);switch(a){case m7e:case Cq:case JP:case g7e:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===QP))if(this.options.to==="string"){let l=sE.utf8border(n.output,n.next_out),c=n.next_out-l,f=sE.buf2string(n.output,l);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(l,l+c),0),this.onData(f)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===K0&&s===0)){if(a===QP)return a=ju.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};O1.prototype.onData=function(e){this.chunks.push(e)};O1.prototype.onEnd=function(e){e===K0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=pZ.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function y7e(e,t){const n=new O1(t);if(n.push(e),n.err)throw n.msg||oE[n.err];return n.result}var v7e=O1,x7e=y7e,b7e={Inflate:v7e,inflate:x7e};const{Inflate:w7e,inflate:S7e}=b7e;var Eq=w7e,_7e=S7e;const jZ=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=3988292384^t>>>1:t=t>>>1;jZ[e]=t}const Oq=4294967295;function N7e(e,t,n){let r=e;for(let i=0;i<n;i++)r=jZ[(r^t[i])&255]^r>>>8;return r}function k7e(e,t){return(N7e(Oq,e,t)^Oq)>>>0}function Tq(e,t,n){const r=e.readUint32(),i=k7e(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==r)throw new Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function CZ(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function EZ(e,t,n,r){let i=0;for(;i<r;i++)t[i]=e[i];for(;i<n;i++)t[i]=e[i]+t[i-r]&255}function OZ(e,t,n,r){let i=0;if(n.length===0)for(;i<r;i++)t[i]=e[i];else for(;i<r;i++)t[i]=e[i]+n[i]&255}function TZ(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+(t[a-i]>>1)&255}else{for(;a<i;a++)t[a]=e[a]+(n[a]>>1)&255;for(;a<r;a++)t[a]=e[a]+(t[a-i]+n[a]>>1)&255}}function MZ(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+t[a-i]&255}else{for(;a<i;a++)t[a]=e[a]+n[a]&255;for(;a<r;a++)t[a]=e[a]+A7e(t[a-i],n[a],n[a-i])&255}}function A7e(e,t,n){const r=e+t-n,i=Math.abs(r-e),a=Math.abs(r-t),o=Math.abs(r-n);return i<=a&&i<=o?e:a<=o?t:n}function P7e(e,t,n,r,i,a){switch(e){case 0:CZ(t,n,i);break;case 1:EZ(t,n,i,a);break;case 2:OZ(t,n,r,i);break;case 3:TZ(t,n,r,i,a);break;case 4:MZ(t,n,r,i,a);break;default:throw new Error(`Unsupported filter: ${e}`)}}const j7e=new Uint16Array([255]),C7e=new Uint8Array(j7e.buffer),E7e=C7e[0]===255;function O7e(e){const{data:t,width:n,height:r,channels:i,depth:a}=e,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(a/8)*i,l=new Uint8Array(r*n*s);let c=0;for(let f=0;f<7;f++){const h=o[f],g=Math.ceil((n-h.x)/h.xStep),m=Math.ceil((r-h.y)/h.yStep);if(g<=0||m<=0)continue;const b=g*s,y=new Uint8Array(b);for(let x=0;x<m;x++){const w=t[c++],_=t.subarray(c,c+b);c+=b;const k=new Uint8Array(b);P7e(w,_,k,y,b,s),y.set(k);for(let P=0;P<g;P++){const C=h.x+P*h.xStep,j=h.y+x*h.yStep;if(!(C>=n||j>=r))for(let L=0;L<s;L++)l[(j*n+C)*s+L]=k[P*s+L]}}}if(a===16){const f=new Uint16Array(l.buffer);if(E7e)for(let h=0;h<f.length;h++)f[h]=T7e(f[h]);return f}else return l}function T7e(e){return(e&255)<<8|e>>8&255}const M7e=new Uint16Array([255]),L7e=new Uint8Array(M7e.buffer),R7e=L7e[0]===255,I7e=new Uint8Array(0);function Mq(e){const{data:t,width:n,height:r,channels:i,depth:a}=e,o=Math.ceil(a/8)*i,s=Math.ceil(a/8*i*n),l=new Uint8Array(r*s);let c=I7e,f=0,h,g;for(let m=0;m<r;m++){switch(h=t.subarray(f+1,f+1+s),g=l.subarray(m*s,(m+1)*s),t[f]){case 0:CZ(h,g,s);break;case 1:EZ(h,g,s,o);break;case 2:OZ(h,g,c,s);break;case 3:TZ(h,g,c,s,o);break;case 4:MZ(h,g,c,s,o);break;default:throw new Error(`Unsupported filter: ${t[f]}`)}c=g,f+=s+1}if(a===16){const m=new Uint16Array(l.buffer);if(R7e)for(let b=0;b<m.length;b++)m[b]=D7e(m[b]);return m}else return l}function D7e(e){return(e&255)<<8|e>>8&255}const Ob=Uint8Array.of(137,80,78,71,13,10,26,10);function Lq(e){if(!F7e(e.readBytes(Ob.length)))throw new Error("wrong PNG signature")}function F7e(e){if(e.length<Ob.length)return!1;for(let t=0;t<Ob.length;t++)if(e[t]!==Ob[t])return!1;return!0}const B7e="tEXt",$7e=0,LZ=new TextDecoder("latin1");function q7e(e){if(z7e(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const U7e=/^[\u0000-\u00FF]*$/;function z7e(e){if(!U7e.test(e))throw new Error("invalid latin1 text")}function V7e(e,t,n){const r=RZ(t);e[r]=W7e(t,n-r.length-1)}function RZ(e){for(e.mark();e.readByte()!==$7e;);const t=e.offset;e.reset();const n=LZ.decode(e.readBytes(t-e.offset-1));return e.skip(1),q7e(n),n}function W7e(e,t){return LZ.decode(e.readBytes(t))}const Zo={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},ZP={UNKNOWN:-1,DEFLATE:0},Rq={UNKNOWN:-1,ADAPTIVE:0},ej={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},rb={NONE:0,BACKGROUND:1,PREVIOUS:2},tj={SOURCE:0,OVER:1};class H7e extends FT{constructor(n,r={}){super(n);or(this,"_checkCrc");or(this,"_inflator");or(this,"_png");or(this,"_apng");or(this,"_end");or(this,"_hasPalette");or(this,"_palette");or(this,"_hasTransparency");or(this,"_transparency");or(this,"_compressionMethod");or(this,"_filterMethod");or(this,"_interlaceMethod");or(this,"_colorType");or(this,"_isAnimated");or(this,"_numberOfFrames");or(this,"_numberOfPlays");or(this,"_frames");or(this,"_writingDataChunks");const{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new Eq,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=ZP.UNKNOWN,this._filterMethod=Rq.UNKNOWN,this._interlaceMethod=ej.UNKNOWN,this._colorType=Zo.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Lq(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeChunk(n,r)}return this.decodeImage(),this._png}decodeApng(){for(Lq(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(n,r)}return this.decodeApngImage(),this._apng}decodeChunk(n,r){const i=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case B7e:V7e(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?Tq(this,n+4,r):this.skip(4)}decodeApngChunk(n,r){const i=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,r),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?Tq(this,n+4,r):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=Y7e(this.readUint8());const r=this.readUint8();this._colorType=r;let i;switch(r){case Zo.GREYSCALE:i=1;break;case Zo.TRUECOLOUR:i=3;break;case Zo.INDEXED_COLOUR:i=1;break;case Zo.GREYSCALE_ALPHA:i=2;break;case Zo.TRUECOLOUR_ALPHA:i=4;break;case Zo.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==ZP.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const r=n/3;this._hasPalette=!0;const i=[];this._palette=i;for(let a=0;a<r;a++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const r=n,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let r=n,i=this.offset+this.byteOffset;if(i+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case Zo.GREYSCALE:case Zo.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let r=0;r<n/2;r++)this._transparency[r]=this.readUint16();break}case Zo.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let r=0;for(;r<n;r++){const i=this.readByte();this._palette[r].push(i)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case Zo.UNKNOWN:case Zo.GREYSCALE_ALPHA:case Zo.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const r=RZ(this),i=this.readUint8();if(i!==ZP.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const a=this.readBytes(n-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:_7e(a)}}decodepHYs(){const n=this.readUint32(),r=this.readUint32(),i=this.readByte();this._png.resolution={x:n,y:r,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){const r={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(n);if(i){if(i.data=Mq({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)r.data=i.data;else{const a=this._apng.frames.at(n-1);this.disposeFrame(i,a,r),this.addFrameDataToCanvas(r,i)}this._apng.frames.push(r)}}return this._apng}disposeFrame(n,r,i){switch(n.disposeOp){case rb.NONE:break;case rb.BACKGROUND:for(let a=0;a<this._png.height;a++)for(let o=0;o<this._png.width;o++){const s=(a*n.width+o)*this._png.channels;for(let l=0;l<this._png.channels;l++)i.data[s+l]=0}break;case rb.PREVIOUS:i.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,r){const i=1<<this._png.depth,a=(o,s)=>{const l=((o+r.yOffset)*this._png.width+r.xOffset+s)*this._png.channels,c=(o*r.width+s)*this._png.channels;return{index:l,frameIndex:c}};switch(r.blendOp){case tj.SOURCE:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:l,frameIndex:c}=a(o,s);for(let f=0;f<this._png.channels;f++)n.data[l+f]=r.data[c+f]}break;case tj.OVER:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:l,frameIndex:c}=a(o,s);for(let f=0;f<this._png.channels;f++){const h=r.data[c+this._png.channels-1]/i,g=f%(this._png.channels-1)===0?1:r.data[c+f],m=Math.floor(h*g+(1-h)*n.data[l+f]);n.data[l+f]+=m}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==Rq.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===ej.NO_INTERLACE)this._png.data=Mq({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===ej.ADAM7)this._png.data=O7e({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const n=this._inflator.result,r=this._frames.at(-1);r?r.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:rb.NONE,blendOp:tj.SOURCE,data:n}),this._inflator=new Eq,this._writingDataChunks=!1}}function Y7e(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var Iq;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(Iq||(Iq={}));function G7e(e,t){return new H7e(e,t).decode()}var en=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function nj(){en.console&&typeof en.console.log=="function"&&en.console.log.apply(en.console,arguments)}var gr={log:nj,warn:function(e){en.console&&(typeof en.console.warn=="function"?en.console.warn.apply(en.console,arguments):nj.call(null,arguments))},error:function(e){en.console&&(typeof en.console.error=="function"?en.console.error.apply(en.console,arguments):nj(e))}};function rj(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Ch(r.response,t,n)},r.onerror=function(){gr.error("could not download file")},r.send()}function Dq(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ib(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Ch=en.saveAs||((typeof window>"u"?"undefined":lr(window))!=="object"||window!==en?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=en.URL||en.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener",typeof e=="string"?(i.href=e,i.origin!==location.origin?Dq(i.href)?rj(e,t,n):ib(i,i.target="_blank"):ib(i)):(i.href=r.createObjectURL(e),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){ib(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download",typeof e=="string")if(Dq(e))rj(e,t,n);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ib(r)})}else navigator.msSaveOrOpenBlob((function(i,a){return a===void 0?a={autoBom:!1}:lr(a)!=="object"&&(gr.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i})(e,n),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return rj(e,t,n);var i=e.type==="application/octet-stream",a=/constructor/i.test(en.HTMLElement)||en.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":lr(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var f=s.result;f=o?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=f:location=f,r=null},s.readAsDataURL(e)}else{var l=en.URL||en.webkitURL,c=l.createObjectURL(e);r?r.location=c:location.href=c,r=null,setTimeout(function(){l.revokeObjectURL(c)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function IZ(e){var t;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,a=n[r].process,o=i.exec(e);o&&(t=a(o),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),l=this.g.toString(16),c=this.b.toString(16);return s.length==1&&(s="0"+s),l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),"#"+s+l+c}}var Tb=en.atob.bind(en),Fq=en.btoa.bind(en);/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/function ij(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n=Ea(n,r,i,a,t[0],7,-680876936),a=Ea(a,n,r,i,t[1],12,-389564586),i=Ea(i,a,n,r,t[2],17,606105819),r=Ea(r,i,a,n,t[3],22,-1044525330),n=Ea(n,r,i,a,t[4],7,-176418897),a=Ea(a,n,r,i,t[5],12,1200080426),i=Ea(i,a,n,r,t[6],17,-1473231341),r=Ea(r,i,a,n,t[7],22,-45705983),n=Ea(n,r,i,a,t[8],7,1770035416),a=Ea(a,n,r,i,t[9],12,-1958414417),i=Ea(i,a,n,r,t[10],17,-42063),r=Ea(r,i,a,n,t[11],22,-1990404162),n=Ea(n,r,i,a,t[12],7,1804603682),a=Ea(a,n,r,i,t[13],12,-40341101),i=Ea(i,a,n,r,t[14],17,-1502002290),n=Oa(n,r=Ea(r,i,a,n,t[15],22,1236535329),i,a,t[1],5,-165796510),a=Oa(a,n,r,i,t[6],9,-1069501632),i=Oa(i,a,n,r,t[11],14,643717713),r=Oa(r,i,a,n,t[0],20,-373897302),n=Oa(n,r,i,a,t[5],5,-701558691),a=Oa(a,n,r,i,t[10],9,38016083),i=Oa(i,a,n,r,t[15],14,-660478335),r=Oa(r,i,a,n,t[4],20,-405537848),n=Oa(n,r,i,a,t[9],5,568446438),a=Oa(a,n,r,i,t[14],9,-1019803690),i=Oa(i,a,n,r,t[3],14,-187363961),r=Oa(r,i,a,n,t[8],20,1163531501),n=Oa(n,r,i,a,t[13],5,-1444681467),a=Oa(a,n,r,i,t[2],9,-51403784),i=Oa(i,a,n,r,t[7],14,1735328473),n=Ta(n,r=Oa(r,i,a,n,t[12],20,-1926607734),i,a,t[5],4,-378558),a=Ta(a,n,r,i,t[8],11,-2022574463),i=Ta(i,a,n,r,t[11],16,1839030562),r=Ta(r,i,a,n,t[14],23,-35309556),n=Ta(n,r,i,a,t[1],4,-1530992060),a=Ta(a,n,r,i,t[4],11,1272893353),i=Ta(i,a,n,r,t[7],16,-155497632),r=Ta(r,i,a,n,t[10],23,-1094730640),n=Ta(n,r,i,a,t[13],4,681279174),a=Ta(a,n,r,i,t[0],11,-358537222),i=Ta(i,a,n,r,t[3],16,-722521979),r=Ta(r,i,a,n,t[6],23,76029189),n=Ta(n,r,i,a,t[9],4,-640364487),a=Ta(a,n,r,i,t[12],11,-421815835),i=Ta(i,a,n,r,t[15],16,530742520),n=Ma(n,r=Ta(r,i,a,n,t[2],23,-995338651),i,a,t[0],6,-198630844),a=Ma(a,n,r,i,t[7],10,1126891415),i=Ma(i,a,n,r,t[14],15,-1416354905),r=Ma(r,i,a,n,t[5],21,-57434055),n=Ma(n,r,i,a,t[12],6,1700485571),a=Ma(a,n,r,i,t[3],10,-1894986606),i=Ma(i,a,n,r,t[10],15,-1051523),r=Ma(r,i,a,n,t[1],21,-2054922799),n=Ma(n,r,i,a,t[8],6,1873313359),a=Ma(a,n,r,i,t[15],10,-30611744),i=Ma(i,a,n,r,t[6],15,-1560198380),r=Ma(r,i,a,n,t[13],21,1309151649),n=Ma(n,r,i,a,t[4],6,-145523070),a=Ma(a,n,r,i,t[11],10,-1120210379),i=Ma(i,a,n,r,t[2],15,718787259),r=Ma(r,i,a,n,t[9],21,-343485551),e[0]=md(n,e[0]),e[1]=md(r,e[1]),e[2]=md(i,e[2]),e[3]=md(a,e[3])}function V5(e,t,n,r,i,a){return t=md(md(t,e),md(r,a)),md(t<<i|t>>>32-i,n)}function Ea(e,t,n,r,i,a,o){return V5(t&n|~t&r,e,t,i,a,o)}function Oa(e,t,n,r,i,a,o){return V5(t&r|n&~r,e,t,i,a,o)}function Ta(e,t,n,r,i,a,o){return V5(t^n^r,e,t,i,a,o)}function Ma(e,t,n,r,i,a,o){return V5(n^(t|~r),e,t,i,a,o)}function DZ(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)ij(r,K7e(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(ij(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,ij(r,i),r}function K7e(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var Bq="0123456789abcdef".split("");function X7e(e){for(var t="",n=0;n<4;n++)t+=Bq[e>>8*n+4&15]+Bq[e>>8*n&15];return t}function Q7e(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function lE(e){return DZ(e).map(Q7e).join("")}var J7e=(function(e){for(var t=0;t<e.length;t++)e[t]=X7e(e[t]);return e.join("")})(DZ("hello"))!="5d41402abc4b2a76b9719d911017c592";function md(e,t){if(J7e){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/function cE(e,t){var n,r,i,a;if(e!==n){for(var o=(i=e,a=1+(256/e.length|0),new Array(a+1).join(i)),s=[],l=0;l<256;l++)s[l]=l;var c=0;for(l=0;l<256;l++){var f=s[l];c=(c+f+o.charCodeAt(l))%256,s[l]=s[c],s[c]=f}n=e,r=s}else s=r;var h=t.length,g=0,m=0,b="";for(l=0;l<h;l++)m=(m+(f=s[g=(g+1)%256]))%256,s[g]=s[m],s[m]=f,o=s[(s[g]+s[m])%256],b+=String.fromCharCode(t.charCodeAt(l)^o);return b}/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var $q={print:4,modify:8,copy:16,"annot-forms":32};function Pm(e,t,n,r){this.v=1,this.r=2;var i=192;e.forEach(function(s){if($q.perm!==void 0)throw new Error("Invalid permission: "+s);i+=$q[s]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ãh>€/\f©þdSiz";var a=(t+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=lE(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=cE(this.encryptionKey,this.padding)}function jm(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):e[r]}return t}function qq(e){if(lr(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(n,r,i){if(i=i||!1,typeof n!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(n)||(t[n]={});var a=Math.random().toString(35);return t[n][a]=[r,!!i],a},this.unsubscribe=function(n){for(var r in t)if(t[r][n])return delete t[r][n],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[n]){var o=t[n][a];try{o[0].apply(e,r)}catch(s){en.console&&gr.error("jsPDF PubSub Error",s.message,s)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function m2(e){if(!(this instanceof m2))return new m2(e);var t="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function FZ(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function Eh(e,t,n,r,i){if(!(this instanceof Eh))return new Eh(e,t,n,r,i);this.type=e==="axial"?2:3,this.coords=t,this.colors=n,FZ.call(this,r,i)}function Fm(e,t,n,r,i){if(!(this instanceof Fm))return new Fm(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,FZ.call(this,r,i)}function It(e){var t,n=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],a=arguments[3],o=[],s=1,l=16,c="S",f=null;lr(e=e||{})==="object"&&(n=e.orientation,r=e.unit||r,i=e.format||i,a=e.compress||e.compressPdf||a,(f=e.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),s=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(l=e.floatPrecision),c=e.defaultPathOperation||"S"),o=e.filters||(a===!0?["FlateEncode"]:o),r=r||"mm",n=(""+(n||"P")).toLowerCase();var h=e.putOnlyUsedFonts||!1,g={},m={internal:{},__private__:{}};m.__private__.PubSub=qq;var b="1.3",y=m.__private__.getPdfVersion=function(){return b};m.__private__.setPdfVersion=function(O){b=O};var x={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};m.__private__.getPageFormats=function(){return x};var w=m.__private__.getPageFormat=function(O){return x[O]};i=i||"a4";var _="compat",k="advanced",P=_;function C(){this.saveGraphicsState(),oe(new qt(lt,0,0,-lt,0,yo()*lt).toString()+" cm"),this.setFontSize(this.getFontSize()/lt),c="n",P=k}function j(){this.restoreGraphicsState(),c="S",P=_}var L=m.__private__.combineFontStyleAndFontWeight=function(O,Q){if(O=="bold"&&Q=="normal"||O=="bold"&&Q==400||O=="normal"&&Q=="italic"||O=="bold"&&Q=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return Q&&(O=Q==400||Q==="normal"?O==="italic"?"italic":"normal":Q!=700&&Q!=="bold"||O!=="normal"?(Q==700?"bold":Q)+""+O:"bold"),O};m.advancedAPI=function(O){var Q=P===_;return Q&&C.call(this),typeof O!="function"||(O(this),Q&&j.call(this)),this},m.compatAPI=function(O){var Q=P===k;return Q&&j.call(this),typeof O!="function"||(O(this),Q&&C.call(this)),this},m.isAdvancedAPI=function(){return P===k};var R,D=function(O){if(P!==k)throw new Error(O+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},H=m.roundToPrecision=m.__private__.roundToPrecision=function(O,Q){var fe=t||Q;if(isNaN(O)||isNaN(fe))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return O.toFixed(fe).replace(/0+$/,"")};R=m.hpf=m.__private__.hpf=typeof l=="number"?function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.hpf");return H(O,l)}:l==="smart"?function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.hpf");return H(O,O>-1&&O<1?16:5)}:function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.hpf");return H(O,16)};var M=m.f2=m.__private__.f2=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.f2");return H(O,2)},F=m.__private__.f3=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.f3");return H(O,3)},W=m.scale=m.__private__.scale=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.scale");return P===_?O*lt:P===k?O:void 0},V=function(O){return W((function(Q){return P===_?yo()-Q:P===k?Q:void 0})(O))};m.__private__.setPrecision=m.setPrecision=function(O){typeof parseInt(O,10)=="number"&&(t=parseInt(O,10))};var X,Y="00000000000000000000000000000000",Z=m.__private__.getFileId=function(){return Y},K=m.__private__.setFileId=function(O){return Y=O!==void 0&&/^[a-fA-F0-9]{32}$/.test(O)?O.toUpperCase():Y.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(di=new Pm(f.userPermissions,f.userPassword,f.ownerPassword,Y)),Y};m.setFileId=function(O){return K(O),this},m.getFileId=function(){return Z()};var se=m.__private__.convertDateToPDFDate=function(O){var Q=O.getTimezoneOffset(),fe=Q<0?"+":"-",ye=Math.floor(Math.abs(Q/60)),Ae=Math.abs(Q%60),Be=[fe,re(ye),"'",re(Ae),"'"].join("");return["D:",O.getFullYear(),re(O.getMonth()+1),re(O.getDate()),re(O.getHours()),re(O.getMinutes()),re(O.getSeconds()),Be].join("")},z=m.__private__.convertPDFDateToDate=function(O){var Q=parseInt(O.substr(2,4),10),fe=parseInt(O.substr(6,2),10)-1,ye=parseInt(O.substr(8,2),10),Ae=parseInt(O.substr(10,2),10),Be=parseInt(O.substr(12,2),10),Ge=parseInt(O.substr(14,2),10);return new Date(Q,fe,ye,Ae,Be,Ge,0)},te=m.__private__.setCreationDate=function(O){var Q;if(O===void 0&&(O=new Date),O instanceof Date)Q=se(O);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(O))throw new Error("Invalid argument passed to jsPDF.setCreationDate");Q=O}return X=Q},$=m.__private__.getCreationDate=function(O){var Q=X;return O==="jsDate"&&(Q=z(X)),Q};m.setCreationDate=function(O){return te(O),this},m.getCreationDate=function(O){return $(O)};var q,re=m.__private__.padd2=function(O){return("0"+parseInt(O)).slice(-2)},le=m.__private__.padd2Hex=function(O){return("00"+(O=O.toString())).substr(O.length)},de=0,pe=[],ve=[],he=0,xe=[],Pe=[],Se=!1,Ue=ve;m.__private__.setCustomOutputDestination=function(O){Se=!0,Ue=O};var Ye=function(O){Se||(Ue=O)};m.__private__.resetCustomOutputDestination=function(){Se=!1,Ue=ve};var oe=m.__private__.out=function(O){return O=O.toString(),he+=O.length+1,Ue.push(O),Ue},Ke=m.__private__.write=function(O){return oe(arguments.length===1?O.toString():Array.prototype.join.call(arguments," "))},ht=m.__private__.getArrayBuffer=function(O){for(var Q=O.length,fe=new ArrayBuffer(Q),ye=new Uint8Array(fe);Q--;)ye[Q]=O.charCodeAt(Q);return fe},gt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];m.__private__.getStandardFonts=function(){return gt};var ze=e.fontSize||16;m.__private__.setFontSize=m.setFontSize=function(O){return ze=P===k?O/lt:O,this};var St,st=m.__private__.getFontSize=m.getFontSize=function(){return P===_?ze:ze*lt},xt=e.R2L||!1;m.__private__.setR2L=m.setR2L=function(O){return xt=O,this},m.__private__.getR2L=m.getR2L=function(){return xt};var Ct,bn=m.__private__.setZoomMode=function(O){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(O))St=O;else if(isNaN(O)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(O)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+O+'" is not recognized.');St=O}else St=parseInt(O,10)};m.__private__.getZoomMode=function(){return St};var sn,Ee=m.__private__.setPageMode=function(O){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(O)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+O+'" is not recognized.');Ct=O};m.__private__.getPageMode=function(){return Ct};var Ve=m.__private__.setLayoutMode=function(O){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(O)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+O+'" is not recognized.');sn=O};m.__private__.getLayoutMode=function(){return sn},m.__private__.setDisplayMode=m.setDisplayMode=function(O,Q,fe){return bn(O),Ve(Q),Ee(fe),this};var at={title:"",subject:"",author:"",keywords:"",creator:""};m.__private__.getDocumentProperty=function(O){if(Object.keys(at).indexOf(O)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return at[O]},m.__private__.getDocumentProperties=function(){return at},m.__private__.setDocumentProperties=m.setProperties=m.setDocumentProperties=function(O){for(var Q in at)at.hasOwnProperty(Q)&&O[Q]&&(at[Q]=O[Q]);return this},m.__private__.setDocumentProperty=function(O,Q){if(Object.keys(at).indexOf(O)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return at[O]=Q};var Ze,lt,ct,Wn,nn,Gt={},Qt={},un=[],kt={},gn={},Bt={},Jt={},Hn=null,an=0,$t=[],Rn=new qq(m),ql=e.hotfixes||[],Ri={},ps={},lo=[],qt=function O(Q,fe,ye,Ae,Be,Ge){if(!(this instanceof O))return new O(Q,fe,ye,Ae,Be,Ge);isNaN(Q)&&(Q=1),isNaN(fe)&&(fe=0),isNaN(ye)&&(ye=0),isNaN(Ae)&&(Ae=1),isNaN(Be)&&(Be=0),isNaN(Ge)&&(Ge=0),this._matrix=[Q,fe,ye,Ae,Be,Ge]};Object.defineProperty(qt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(O){this._matrix[0]=O}}),Object.defineProperty(qt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(O){this._matrix[1]=O}}),Object.defineProperty(qt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(O){this._matrix[2]=O}}),Object.defineProperty(qt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(O){this._matrix[3]=O}}),Object.defineProperty(qt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(O){this._matrix[4]=O}}),Object.defineProperty(qt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(O){this._matrix[5]=O}}),Object.defineProperty(qt.prototype,"a",{get:function(){return this._matrix[0]},set:function(O){this._matrix[0]=O}}),Object.defineProperty(qt.prototype,"b",{get:function(){return this._matrix[1]},set:function(O){this._matrix[1]=O}}),Object.defineProperty(qt.prototype,"c",{get:function(){return this._matrix[2]},set:function(O){this._matrix[2]=O}}),Object.defineProperty(qt.prototype,"d",{get:function(){return this._matrix[3]},set:function(O){this._matrix[3]=O}}),Object.defineProperty(qt.prototype,"e",{get:function(){return this._matrix[4]},set:function(O){this._matrix[4]=O}}),Object.defineProperty(qt.prototype,"f",{get:function(){return this._matrix[5]},set:function(O){this._matrix[5]=O}}),Object.defineProperty(qt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(qt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(qt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(qt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),qt.prototype.join=function(O){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(R).join(O)},qt.prototype.multiply=function(O){var Q=O.sx*this.sx+O.shy*this.shx,fe=O.sx*this.shy+O.shy*this.sy,ye=O.shx*this.sx+O.sy*this.shx,Ae=O.shx*this.shy+O.sy*this.sy,Be=O.tx*this.sx+O.ty*this.shx+this.tx,Ge=O.tx*this.shy+O.ty*this.sy+this.ty;return new qt(Q,fe,ye,Ae,Be,Ge)},qt.prototype.decompose=function(){var O=this.sx,Q=this.shy,fe=this.shx,ye=this.sy,Ae=this.tx,Be=this.ty,Ge=Math.sqrt(O*O+Q*Q),_t=(O/=Ge)*fe+(Q/=Ge)*ye;fe-=O*_t,ye-=Q*_t;var Mt=Math.sqrt(fe*fe+ye*ye);return _t/=Mt,O*(ye/=Mt)<Q*(fe/=Mt)&&(O=-O,Q=-Q,_t=-_t,Ge=-Ge),{scale:new qt(Ge,0,0,Mt,0,0),translate:new qt(1,0,0,1,Ae,Be),rotate:new qt(O,Q,-Q,O,0,0),skew:new qt(1,0,_t,1,0,0)}},qt.prototype.toString=function(O){return this.join(" ")},qt.prototype.inversed=function(){var O=this.sx,Q=this.shy,fe=this.shx,ye=this.sy,Ae=this.tx,Be=this.ty,Ge=1/(O*ye-Q*fe),_t=ye*Ge,Mt=-Q*Ge,Kt=-fe*Ge,rn=O*Ge;return new qt(_t,Mt,Kt,rn,-_t*Ae-Kt*Be,-Mt*Ae-rn*Be)},qt.prototype.applyToPoint=function(O){var Q=O.x*this.sx+O.y*this.shx+this.tx,fe=O.x*this.shy+O.y*this.sy+this.ty;return new po(Q,fe)},qt.prototype.applyToRectangle=function(O){var Q=this.applyToPoint(O),fe=this.applyToPoint(new po(O.x+O.w,O.y+O.h));return new Jc(Q.x,Q.y,fe.x-Q.x,fe.y-Q.y)},qt.prototype.clone=function(){var O=this.sx,Q=this.shy,fe=this.shx,ye=this.sy,Ae=this.tx,Be=this.ty;return new qt(O,Q,fe,ye,Ae,Be)},m.Matrix=qt;var Wa=m.matrixMult=function(O,Q){return Q.multiply(O)},Fo=new qt(1,0,0,1,0,0);m.unitMatrix=m.identityMatrix=Fo;var Qi=function(O,Q){if(!gn[O]){var fe=(Q instanceof Eh?"Sh":"P")+(Object.keys(kt).length+1).toString(10);Q.id=fe,gn[O]=fe,kt[fe]=Q,Rn.publish("addPattern",Q)}};m.ShadingPattern=Eh,m.TilingPattern=Fm,m.addShadingPattern=function(O,Q){return D("addShadingPattern()"),Qi(O,Q),this},m.beginTilingPattern=function(O){D("beginTilingPattern()"),mo(O.boundingBox[0],O.boundingBox[1],O.boundingBox[2]-O.boundingBox[0],O.boundingBox[3]-O.boundingBox[1],O.matrix)},m.endTilingPattern=function(O,Q){D("endTilingPattern()"),Q.stream=Pe[q].join(`
`),Qi(O,Q),Rn.publish("endTilingPattern",Q),lo.pop().restore()};var co,cr=m.__private__.newObject=function(){var O=Vr();return Zr(O,!0),O},Vr=m.__private__.newObjectDeferred=function(){return de++,pe[de]=function(){return he},de},Zr=function(O,Q){return Q=typeof Q=="boolean"&&Q,pe[O]=he,Q&&oe(O+" 0 obj"),O},Js=m.__private__.newAdditionalObject=function(){var O={objId:Vr(),content:""};return xe.push(O),O},Ul=Vr(),Bo=Vr(),ms=m.__private__.decodeColorString=function(O){var Q=O.split(" ");if(Q.length!==2||Q[1]!=="g"&&Q[1]!=="G")Q.length!==5||Q[4]!=="k"&&Q[4]!=="K"||(Q=[(1-Q[0])*(1-Q[3]),(1-Q[1])*(1-Q[3]),(1-Q[2])*(1-Q[3]),"r"]);else{var fe=parseFloat(Q[0]);Q=[fe,fe,fe,"r"]}for(var ye="#",Ae=0;Ae<3;Ae++)ye+=("0"+Math.floor(255*parseFloat(Q[Ae])).toString(16)).slice(-2);return ye},Ii=m.__private__.encodeColorString=function(O){var Q;typeof O=="string"&&(O={ch1:O});var fe=O.ch1,ye=O.ch2,Ae=O.ch3,Be=O.ch4,Ge=O.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof fe=="string"&&fe.charAt(0)!=="#"){var _t=new IZ(fe);if(_t.ok)fe=_t.toHex();else if(!/^\d*\.?\d*$/.test(fe))throw new Error('Invalid color "'+fe+'" passed to jsPDF.encodeColorString.')}if(typeof fe=="string"&&/^#[0-9A-Fa-f]{3}$/.test(fe)&&(fe="#"+fe[1]+fe[1]+fe[2]+fe[2]+fe[3]+fe[3]),typeof fe=="string"&&/^#[0-9A-Fa-f]{6}$/.test(fe)){var Mt=parseInt(fe.substr(1),16);fe=Mt>>16&255,ye=Mt>>8&255,Ae=255&Mt}if(ye===void 0||Be===void 0&&fe===ye&&ye===Ae)Q=typeof fe=="string"?fe+" "+Ge[0]:O.precision===2?M(fe/255)+" "+Ge[0]:F(fe/255)+" "+Ge[0];else if(Be===void 0||lr(Be)==="object"){if(Be&&!isNaN(Be.a)&&Be.a===0)return["1.","1.","1.",Ge[1]].join(" ");Q=typeof fe=="string"?[fe,ye,Ae,Ge[1]].join(" "):O.precision===2?[M(fe/255),M(ye/255),M(Ae/255),Ge[1]].join(" "):[F(fe/255),F(ye/255),F(Ae/255),Ge[1]].join(" ")}else Q=typeof fe=="string"?[fe,ye,Ae,Be,Ge[2]].join(" "):O.precision===2?[M(fe),M(ye),M(Ae),M(Be),Ge[2]].join(" "):[F(fe),F(ye),F(Ae),F(Be),Ge[2]].join(" ");return Q},uo=m.__private__.getFilters=function(){return o},Ha=m.__private__.putStream=function(O){var Q=(O=O||{}).data||"",fe=O.filters||uo(),ye=O.alreadyAppliedFilters||[],Ae=O.addLength1||!1,Be=Q.length,Ge=O.objectId,_t=function(hi){return hi};if(f!==null&&Ge===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(_t=di.encryptor(Ge,0));var Mt={};fe===!0&&(fe=["FlateEncode"]);var Kt=O.additionalKeyValues||[],rn=(Mt=It.API.processDataByFilters!==void 0?It.API.processDataByFilters(Q,fe):{data:Q,reverseChain:[]}).reverseChain+(Array.isArray(ye)?ye.join(" "):ye.toString());if(Mt.data.length!==0&&(Kt.push({key:"Length",value:Mt.data.length}),Ae===!0&&Kt.push({key:"Length1",value:Be})),rn.length!=0)if(rn.split("/").length-1==1)Kt.push({key:"Filter",value:rn});else{Kt.push({key:"Filter",value:"["+rn+"]"});for(var Cn=0;Cn<Kt.length;Cn+=1)if(Kt[Cn].key==="DecodeParms"){for(var Pr=[],ni=0;ni<Mt.reverseChain.split("/").length-1;ni+=1)Pr.push("null");Pr.push(Kt[Cn].value),Kt[Cn].value="["+Pr.join(" ")+"]"}}oe("<<");for(var ur=0;ur<Kt.length;ur++)oe("/"+Kt[ur].key+" "+Kt[ur].value);oe(">>"),Mt.data.length!==0&&(oe("stream"),oe(_t(Mt.data)),oe("endstream"))},qc=m.__private__.putPage=function(O){var Q=O.number,fe=O.data,ye=O.objId,Ae=O.contentsObjId;Zr(ye,!0),oe("<</Type /Page"),oe("/Parent "+O.rootDictionaryObjId+" 0 R"),oe("/Resources "+O.resourceDictionaryObjId+" 0 R"),oe("/MediaBox ["+parseFloat(R(O.mediaBox.bottomLeftX))+" "+parseFloat(R(O.mediaBox.bottomLeftY))+" "+R(O.mediaBox.topRightX)+" "+R(O.mediaBox.topRightY)+"]"),O.cropBox!==null&&oe("/CropBox ["+R(O.cropBox.bottomLeftX)+" "+R(O.cropBox.bottomLeftY)+" "+R(O.cropBox.topRightX)+" "+R(O.cropBox.topRightY)+"]"),O.bleedBox!==null&&oe("/BleedBox ["+R(O.bleedBox.bottomLeftX)+" "+R(O.bleedBox.bottomLeftY)+" "+R(O.bleedBox.topRightX)+" "+R(O.bleedBox.topRightY)+"]"),O.trimBox!==null&&oe("/TrimBox ["+R(O.trimBox.bottomLeftX)+" "+R(O.trimBox.bottomLeftY)+" "+R(O.trimBox.topRightX)+" "+R(O.trimBox.topRightY)+"]"),O.artBox!==null&&oe("/ArtBox ["+R(O.artBox.bottomLeftX)+" "+R(O.artBox.bottomLeftY)+" "+R(O.artBox.topRightX)+" "+R(O.artBox.topRightY)+"]"),typeof O.userUnit=="number"&&O.userUnit!==1&&oe("/UserUnit "+O.userUnit),Rn.publish("putPage",{objId:ye,pageContext:$t[Q],pageNumber:Q,page:fe}),oe("/Contents "+Ae+" 0 R"),oe(">>"),oe("endobj");var Be=fe.join(`
`);return P===k&&(Be+=`
Q`),Zr(Ae,!0),Ha({data:Be,filters:uo(),objectId:Ae}),oe("endobj"),ye},$o=m.__private__.putPages=function(){var O,Q,fe=[];for(O=1;O<=an;O++)$t[O].objId=Vr(),$t[O].contentsObjId=Vr();for(O=1;O<=an;O++)fe.push(qc({number:O,data:Pe[O],objId:$t[O].objId,contentsObjId:$t[O].contentsObjId,mediaBox:$t[O].mediaBox,cropBox:$t[O].cropBox,bleedBox:$t[O].bleedBox,trimBox:$t[O].trimBox,artBox:$t[O].artBox,userUnit:$t[O].userUnit,rootDictionaryObjId:Ul,resourceDictionaryObjId:Bo}));Zr(Ul,!0),oe("<</Type /Pages");var ye="/Kids [";for(Q=0;Q<an;Q++)ye+=fe[Q]+" 0 R ";oe(ye+"]"),oe("/Count "+an),oe(">>"),oe("endobj"),Rn.publish("postPutPages")},zl=function(O){Rn.publish("putFont",{font:O,out:oe,newObject:cr,putStream:Ha}),O.isAlreadyPutted!==!0&&(O.objectNumber=cr(),oe("<<"),oe("/Type /Font"),oe("/BaseFont /"+jm(O.postScriptName)),oe("/Subtype /Type1"),typeof O.encoding=="string"&&oe("/Encoding /"+O.encoding),oe("/FirstChar 32"),oe("/LastChar 255"),oe(">>"),oe("endobj"))},Uc=function(O){O.objectNumber=cr();var Q=[];Q.push({key:"Type",value:"/XObject"}),Q.push({key:"Subtype",value:"/Form"}),Q.push({key:"BBox",value:"["+[R(O.x),R(O.y),R(O.x+O.width),R(O.y+O.height)].join(" ")+"]"}),Q.push({key:"Matrix",value:"["+O.matrix.toString()+"]"});var fe=O.pages[1].join(`
`);Ha({data:fe,additionalKeyValues:Q,objectId:O.objectNumber}),oe("endobj")},zc=function(O,Q){Q||(Q=21);var fe=cr(),ye=(function(Ge,_t){var Mt,Kt=[],rn=1/(_t-1);for(Mt=0;Mt<1;Mt+=rn)Kt.push(Mt);if(Kt.push(1),Ge[0].offset!=0){var Cn={offset:0,color:Ge[0].color};Ge.unshift(Cn)}if(Ge[Ge.length-1].offset!=1){var Pr={offset:1,color:Ge[Ge.length-1].color};Ge.push(Pr)}for(var ni="",ur=0,hi=0;hi<Kt.length;hi++){for(Mt=Kt[hi];Mt>Ge[ur+1].offset;)ur++;var Wr=Ge[ur].offset,Di=(Mt-Wr)/(Ge[ur+1].offset-Wr),tl=Ge[ur].color,zo=Ge[ur+1].color;ni+=le(Math.round((1-Di)*tl[0]+Di*zo[0]).toString(16))+le(Math.round((1-Di)*tl[1]+Di*zo[1]).toString(16))+le(Math.round((1-Di)*tl[2]+Di*zo[2]).toString(16))}return ni.trim()})(O.colors,Q),Ae=[];Ae.push({key:"FunctionType",value:"0"}),Ae.push({key:"Domain",value:"[0.0 1.0]"}),Ae.push({key:"Size",value:"["+Q+"]"}),Ae.push({key:"BitsPerSample",value:"8"}),Ae.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ae.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ha({data:ye,additionalKeyValues:Ae,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:fe}),oe("endobj"),O.objectNumber=cr(),oe("<< /ShadingType "+O.type),oe("/ColorSpace /DeviceRGB");var Be="/Coords ["+R(parseFloat(O.coords[0]))+" "+R(parseFloat(O.coords[1]))+" ";O.type===2?Be+=R(parseFloat(O.coords[2]))+" "+R(parseFloat(O.coords[3])):Be+=R(parseFloat(O.coords[2]))+" "+R(parseFloat(O.coords[3]))+" "+R(parseFloat(O.coords[4]))+" "+R(parseFloat(O.coords[5])),oe(Be+="]"),O.matrix&&oe("/Matrix ["+O.matrix.toString()+"]"),oe("/Function "+fe+" 0 R"),oe("/Extend [true true]"),oe(">>"),oe("endobj")},lf=function(O,Q){var fe=Vr(),ye=cr();Q.push({resourcesOid:fe,objectOid:ye}),O.objectNumber=ye;var Ae=[];Ae.push({key:"Type",value:"/Pattern"}),Ae.push({key:"PatternType",value:"1"}),Ae.push({key:"PaintType",value:"1"}),Ae.push({key:"TilingType",value:"1"}),Ae.push({key:"BBox",value:"["+O.boundingBox.map(R).join(" ")+"]"}),Ae.push({key:"XStep",value:R(O.xStep)}),Ae.push({key:"YStep",value:R(O.yStep)}),Ae.push({key:"Resources",value:fe+" 0 R"}),O.matrix&&Ae.push({key:"Matrix",value:"["+O.matrix.toString()+"]"}),Ha({data:O.stream,additionalKeyValues:Ae,objectId:O.objectNumber}),oe("endobj")},yy=function(O){for(var Q in O.objectNumber=cr(),oe("<<"),O)switch(Q){case"opacity":oe("/ca "+M(O[Q]));break;case"stroke-opacity":oe("/CA "+M(O[Q]))}oe(">>"),oe("endobj")},pr=function(O){Zr(O.resourcesOid,!0),oe("<<"),oe("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var Q in oe("/Font <<"),Gt)Gt.hasOwnProperty(Q)&&(h===!1||h===!0&&g.hasOwnProperty(Q))&&oe("/"+Q+" "+Gt[Q].objectNumber+" 0 R");oe(">>")})(),(function(){if(Object.keys(kt).length>0){for(var Q in oe("/Shading <<"),kt)kt.hasOwnProperty(Q)&&kt[Q]instanceof Eh&&kt[Q].objectNumber>=0&&oe("/"+Q+" "+kt[Q].objectNumber+" 0 R");Rn.publish("putShadingPatternDict"),oe(">>")}})(),(function(Q){if(Object.keys(kt).length>0){for(var fe in oe("/Pattern <<"),kt)kt.hasOwnProperty(fe)&&kt[fe]instanceof m.TilingPattern&&kt[fe].objectNumber>=0&&kt[fe].objectNumber<Q&&oe("/"+fe+" "+kt[fe].objectNumber+" 0 R");Rn.publish("putTilingPatternDict"),oe(">>")}})(O.objectOid),(function(){if(Object.keys(Bt).length>0){var Q;for(Q in oe("/ExtGState <<"),Bt)Bt.hasOwnProperty(Q)&&Bt[Q].objectNumber>=0&&oe("/"+Q+" "+Bt[Q].objectNumber+" 0 R");Rn.publish("putGStateDict"),oe(">>")}})(),(function(){for(var Q in oe("/XObject <<"),Ri)Ri.hasOwnProperty(Q)&&Ri[Q].objectNumber>=0&&oe("/"+Q+" "+Ri[Q].objectNumber+" 0 R");Rn.publish("putXobjectDict"),oe(">>")})(),oe(">>"),oe("endobj")},Rp=function(O){Qt[O.fontName]=Qt[O.fontName]||{},Qt[O.fontName][O.fontStyle]=O.id},cf=function(O,Q,fe,ye,Ae){var Be={id:"F"+(Object.keys(Gt).length+1).toString(10),postScriptName:O,fontName:Q,fontStyle:fe,encoding:ye,isStandardFont:Ae||!1,metadata:{}};return Rn.publish("addFont",{font:Be,instance:this}),Gt[Be.id]=Be,Rp(Be),Be.id},Ya=m.__private__.pdfEscape=m.pdfEscape=function(O,Q){return(function(fe,ye){var Ae,Be,Ge,_t,Mt,Kt,rn,Cn,Pr;if(Ge=(ye=ye||{}).sourceEncoding||"Unicode",Mt=ye.outputEncoding,(ye.autoencode||Mt)&&Gt[Ze].metadata&&Gt[Ze].metadata[Ge]&&Gt[Ze].metadata[Ge].encoding&&(_t=Gt[Ze].metadata[Ge].encoding,!Mt&&Gt[Ze].encoding&&(Mt=Gt[Ze].encoding),!Mt&&_t.codePages&&(Mt=_t.codePages[0]),typeof Mt=="string"&&(Mt=_t[Mt]),Mt)){for(rn=!1,Kt=[],Ae=0,Be=fe.length;Ae<Be;Ae++)(Cn=Mt[fe.charCodeAt(Ae)])?Kt.push(String.fromCharCode(Cn)):Kt.push(fe[Ae]),Kt[Ae].charCodeAt(0)>>8&&(rn=!0);fe=Kt.join("")}for(Ae=fe.length;rn===void 0&&Ae!==0;)fe.charCodeAt(Ae-1)>>8&&(rn=!0),Ae--;if(!rn)return fe;for(Kt=ye.noBOM?[]:[254,255],Ae=0,Be=fe.length;Ae<Be;Ae++){if((Pr=(Cn=fe.charCodeAt(Ae))>>8)>>8)throw new Error("Character at position "+Ae+" of string '"+fe+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Kt.push(Pr),Kt.push(Cn-(Pr<<8))}return String.fromCharCode.apply(void 0,Kt)})(O,Q).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Vl=m.__private__.beginPage=function(O){Pe[++an]=[],$t[an]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(O[0]),topRightY:Number(O[1])}},Vc(an),Ye(Pe[q])},Ip=function(O,Q){var fe,ye,Ae;switch(n=Q||n,typeof O=="string"&&(fe=w(O.toLowerCase()),Array.isArray(fe)&&(ye=fe[0],Ae=fe[1])),Array.isArray(O)&&(ye=O[0]*lt,Ae=O[1]*lt),isNaN(ye)&&(ye=i[0],Ae=i[1]),(ye>14400||Ae>14400)&&(gr.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),ye=Math.min(14400,ye),Ae=Math.min(14400,Ae)),i=[ye,Ae],n.substr(0,1)){case"l":Ae>ye&&(i=[Ae,ye]);break;case"p":ye>Ae&&(i=[Ae,ye])}Vl(i),Vt(ho),oe(Xc),Gd!==0&&oe(Gd+" J"),Kd!==0&&oe(Kd+" j"),Rn.publish("addPage",{pageNumber:an})},uf=function(O){O>0&&O<=an&&(Pe.splice(O,1),$t.splice(O,1),an--,q>an&&(q=an),this.setPage(q))},Vc=function(O){O>0&&O<=an&&(q=O)},Ga=m.__private__.getNumberOfPages=m.getNumberOfPages=function(){return Pe.length-1},Dp=function(O,Q,fe){var ye,Ae=void 0;return fe=fe||{},O=O!==void 0?O:Gt[Ze].fontName,Q=Q!==void 0?Q:Gt[Ze].fontStyle,ye=O.toLowerCase(),Qt[ye]!==void 0&&Qt[ye][Q]!==void 0?Ae=Qt[ye][Q]:Qt[O]!==void 0&&Qt[O][Q]!==void 0?Ae=Qt[O][Q]:fe.disableWarning===!1&&gr.warn("Unable to look up font label for font '"+O+"', '"+Q+"'. Refer to getFontList() for available fonts."),Ae||fe.noFallback||(Ae=Qt.times[Q])==null&&(Ae=Qt.times.normal),Ae},ei=m.__private__.putInfo=function(){var O=cr(),Q=function(ye){return ye};for(var fe in f!==null&&(Q=di.encryptor(O,0)),oe("<<"),oe("/Producer ("+Ya(Q("jsPDF "+It.version))+")"),at)at.hasOwnProperty(fe)&&at[fe]&&oe("/"+fe.substr(0,1).toUpperCase()+fe.substr(1)+" ("+Ya(Q(at[fe]))+")");oe("/CreationDate ("+Ya(Q(X))+")"),oe(">>"),oe("endobj")},ff=m.__private__.putCatalog=function(O){var Q=(O=O||{}).rootDictionaryObjId||Ul;switch(cr(),oe("<<"),oe("/Type /Catalog"),oe("/Pages "+Q+" 0 R"),St||(St="fullwidth"),St){case"fullwidth":oe("/OpenAction [3 0 R /FitH null]");break;case"fullheight":oe("/OpenAction [3 0 R /FitV null]");break;case"fullpage":oe("/OpenAction [3 0 R /Fit]");break;case"original":oe("/OpenAction [3 0 R /XYZ null null 1]");break;default:var fe=""+St;fe.substr(fe.length-1)==="%"&&(St=parseInt(St)/100),typeof St=="number"&&oe("/OpenAction [3 0 R /XYZ null null "+M(St)+"]")}switch(sn||(sn="continuous"),sn){case"continuous":oe("/PageLayout /OneColumn");break;case"single":oe("/PageLayout /SinglePage");break;case"two":case"twoleft":oe("/PageLayout /TwoColumnLeft");break;case"tworight":oe("/PageLayout /TwoColumnRight")}Ct&&oe("/PageMode /"+Ct),Rn.publish("putCatalog"),oe(">>"),oe("endobj")},vy=m.__private__.putTrailer=function(){oe("trailer"),oe("<<"),oe("/Size "+(de+1)),oe("/Root "+de+" 0 R"),oe("/Info "+(de-1)+" 0 R"),f!==null&&oe("/Encrypt "+di.oid+" 0 R"),oe("/ID [ <"+Y+"> <"+Y+"> ]"),oe(">>")},ti=m.__private__.putHeader=function(){oe("%PDF-"+b),oe("%ºß¬à ")},Wc=m.__private__.putXRef=function(){var O="0000000000";oe("xref"),oe("0 "+(de+1)),oe("0000000000 65535 f ");for(var Q=1;Q<=de;Q++)typeof pe[Q]=="function"?oe((O+pe[Q]()).slice(-10)+" 00000 n "):pe[Q]!==void 0?oe((O+pe[Q]).slice(-10)+" 00000 n "):oe("0000000000 00000 n ")},Ka=m.__private__.buildDocument=function(){var O;de=0,he=0,ve=[],pe=[],xe=[],Ul=Vr(),Bo=Vr(),Ye(ve),Rn.publish("buildDocument"),ti(),$o(),(function(){Rn.publish("putAdditionalObjects");for(var fe=0;fe<xe.length;fe++){var ye=xe[fe];Zr(ye.objId,!0),oe(ye.content),oe("endobj")}Rn.publish("postPutAdditionalObjects")})(),O=[],(function(){for(var fe in Gt)Gt.hasOwnProperty(fe)&&(h===!1||h===!0&&g.hasOwnProperty(fe))&&zl(Gt[fe])})(),(function(){var fe;for(fe in Bt)Bt.hasOwnProperty(fe)&&yy(Bt[fe])})(),(function(){for(var fe in Ri)Ri.hasOwnProperty(fe)&&Uc(Ri[fe])})(),(function(fe){var ye;for(ye in kt)kt.hasOwnProperty(ye)&&(kt[ye]instanceof Eh?zc(kt[ye]):kt[ye]instanceof Fm&&lf(kt[ye],fe))})(O),Rn.publish("putResources"),O.forEach(pr),pr({resourcesOid:Bo,objectOid:Number.MAX_SAFE_INTEGER}),Rn.publish("postPutResources"),f!==null&&(di.oid=cr(),oe("<<"),oe("/Filter /Standard"),oe("/V "+di.v),oe("/R "+di.r),oe("/U <"+di.toHexString(di.U)+">"),oe("/O <"+di.toHexString(di.O)+">"),oe("/P "+di.P),oe(">>"),oe("endobj")),ei(),ff();var Q=he;return Wc(),vy(),oe("startxref"),oe(""+Q),oe("%%EOF"),Ye(Pe[q]),ve.join(`
`)},gs=m.__private__.getBlob=function(O){return new Blob([ht(O)],{type:"application/pdf"})},Hc=m.output=m.__private__.output=(co=function(O,Q){switch(typeof(Q=Q||{})=="string"?Q={filename:Q}:Q.filename=Q.filename||"generated.pdf",O){case void 0:return Ka();case"save":m.save(Q.filename);break;case"arraybuffer":return ht(Ka());case"blob":return gs(Ka());case"bloburi":case"bloburl":if(en.URL!==void 0&&typeof en.URL.createObjectURL=="function")return en.URL&&en.URL.createObjectURL(gs(Ka()))||void 0;gr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var fe="",ye=Ka();try{fe=Fq(ye)}catch{fe=Fq(unescape(encodeURIComponent(ye)))}return"data:application/pdf;filename="+Q.filename+";base64,"+fe;case"pdfobjectnewwindow":if(Object.prototype.toString.call(en)==="[object Window]"){var Ae="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Be=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';Q.pdfObjectUrl&&(Ae=Q.pdfObjectUrl,Be="");var Ge='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+Ae+'"'+Be+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(Q)+");<\/script></body></html>",_t=en.open();return _t!==null&&_t.document.write(Ge),_t}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(en)==="[object Window]"){var Mt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(Q.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+Q.filename+'" width="500px" height="400px" /></body></html>',Kt=en.open();if(Kt!==null){Kt.document.write(Mt);var rn=this;Kt.document.documentElement.querySelector("#pdfViewer").onload=function(){Kt.document.title=Q.filename,Kt.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(rn.output("bloburl"))}}return Kt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(en)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Cn='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",Q)+'"></iframe></body></html>',Pr=en.open();if(Pr!==null&&(Pr.document.write(Cn),Pr.document.title=Q.filename),Pr||typeof safari>"u")return Pr;break;case"datauri":case"dataurl":return en.document.location.href=this.output("datauristring",Q);default:return null}},co.foo=function(){try{return co.apply(this,arguments)}catch(fe){var O=fe.stack||"";~O.indexOf(" at ")&&(O=O.split(" at ")[1]);var Q="Error in function "+O.split(`
`)[0].split("<")[0]+": "+fe.message;if(!en.console)throw new Error(Q);en.console.error(Q,fe),en.alert&&alert(Q)}},co.foo.bar=co,co.foo),fo=function(O){return Array.isArray(ql)===!0&&ql.indexOf(O)>-1};switch(r){case"pt":lt=1;break;case"mm":lt=72/25.4;break;case"cm":lt=72/2.54;break;case"in":lt=72;break;case"px":lt=fo("px_scaling")==1?.75:96/72;break;case"pc":case"em":lt=12;break;case"ex":lt=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);lt=r}var di=null;te(),K();var qo=m.__private__.getPageInfo=m.getPageInfo=function(O){if(isNaN(O)||O%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:$t[O].objId,pageNumber:O,pageContext:$t[O]}},Vd=m.__private__.getPageInfoByObjId=function(O){if(isNaN(O)||O%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var Q in $t)if($t[Q].objId===O)break;return qo(Q)},Wd=m.__private__.getCurrentPageInfo=m.getCurrentPageInfo=function(){return{objId:$t[q].objId,pageNumber:q,pageContext:$t[q]}};m.addPage=function(){return Ip.apply(this,arguments),this},m.setPage=function(){return Vc.apply(this,arguments),Ye.call(this,Pe[q]),this},m.insertPage=function(O){return this.addPage(),this.movePage(q,O),this},m.movePage=function(O,Q){var fe,ye;if(O>Q){fe=Pe[O],ye=$t[O];for(var Ae=O;Ae>Q;Ae--)Pe[Ae]=Pe[Ae-1],$t[Ae]=$t[Ae-1];Pe[Q]=fe,$t[Q]=ye,this.setPage(Q)}else if(O<Q){fe=Pe[O],ye=$t[O];for(var Be=O;Be<Q;Be++)Pe[Be]=Pe[Be+1],$t[Be]=$t[Be+1];Pe[Q]=fe,$t[Q]=ye,this.setPage(Q)}return this},m.deletePage=function(){return uf.apply(this,arguments),this},m.__private__.text=m.text=function(O,Q,fe,ye,Ae){var Be,Ge,_t,Mt,Kt,rn,Cn,Pr,ni,ur=(ye=ye||{}).scope||this;if(typeof O=="number"&&typeof Q=="number"&&(typeof fe=="string"||Array.isArray(fe))){var hi=fe;fe=Q,Q=O,O=hi}if(arguments[3]instanceof qt==0?(_t=arguments[4],Mt=arguments[5],lr(Cn=arguments[3])==="object"&&Cn!==null||(typeof _t=="string"&&(Mt=_t,_t=null),typeof Cn=="string"&&(Mt=Cn,Cn=null),typeof Cn=="number"&&(_t=Cn,Cn=null),ye={flags:Cn,angle:_t,align:Mt})):(D("The transform parameter of text() with a Matrix value"),ni=Ae),isNaN(Q)||isNaN(fe)||O==null)throw new Error("Invalid arguments passed to jsPDF.text");if(O.length===0)return ur;var Wr,Di="",tl=typeof ye.lineHeightFactor=="number"?ye.lineHeightFactor:ba,zo=ur.internal.scaleFactor;function nl(In){return In=In.split(" ").join(Array(ye.TabLen||9).join(" ")),Ya(In,Cn)}function tu(In){for(var Xn,Rr=In.concat(),ri=[],Ho=Rr.length;Ho--;)typeof(Xn=Rr.shift())=="string"?ri.push(Xn):Array.isArray(In)&&(Xn.length===1||Xn[1]===void 0&&Xn[2]===void 0)?ri.push(Xn[0]):ri.push([Xn[0],Xn[1],Xn[2]]);return ri}function xf(In,Xn){var Rr;if(typeof In=="string")Rr=Xn(In)[0];else if(Array.isArray(In)){for(var ri,Ho,Zd=In.concat(),Nf=[],sl=Zd.length;sl--;)typeof(ri=Zd.shift())=="string"?Nf.push(Xn(ri)[0]):Array.isArray(ri)&&typeof ri[0]=="string"&&(Ho=Xn(ri[0],ri[1],ri[2]),Nf.push([Ho[0],Ho[1],Ho[2]]));Rr=Nf}return Rr}var Yl=!1,nu=!0;if(typeof O=="string")Yl=!0;else if(Array.isArray(O)){var Gl=O.concat();Ge=[];for(var Kl,Fi=Gl.length;Fi--;)(typeof(Kl=Gl.shift())!="string"||Array.isArray(Kl)&&typeof Kl[0]!="string")&&(nu=!1);Yl=nu}if(Yl===!1)throw new Error('Type of text must be string or Array. "'+O+'" is not recognized.');typeof O=="string"&&(O=O.match(/[\r?\n]/)?O.split(/\r\n|\r|\n/g):[O]);var ru=ze/ur.internal.scaleFactor,iu=ru*(tl-1);switch(ye.baseline){case"bottom":fe-=iu;break;case"top":fe+=ru-iu;break;case"hanging":fe+=ru-2*iu;break;case"middle":fe+=ru/2-iu}if((rn=ye.maxWidth||0)>0&&(typeof O=="string"?O=ur.splitTextToSize(O,rn):Object.prototype.toString.call(O)==="[object Array]"&&(O=O.reduce(function(In,Xn){return In.concat(ur.splitTextToSize(Xn,rn))},[]))),Be={text:O,x:Q,y:fe,options:ye,mutex:{pdfEscape:Ya,activeFontKey:Ze,fonts:Gt,activeFontSize:ze}},Rn.publish("preProcessText",Be),O=Be.text,_t=(ye=Be.options).angle,ni instanceof qt==0&&_t&&typeof _t=="number"){_t*=Math.PI/180,ye.rotationDirection===0&&(_t=-_t),P===k&&(_t=-_t);var Qd=Math.cos(_t),Jd=Math.sin(_t);ni=new qt(Qd,Jd,-Jd,Qd,0,0)}else _t&&_t instanceof qt&&(ni=_t);P!==k||ni||(ni=Fo),(Kt=ye.charSpace||wa)!==void 0&&(Di+=R(W(Kt))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Pr=ye.horizontalScale)!==void 0&&(Di+=R(100*Pr)+` Tz
`),ye.lang;var ca=-1,Vo=ye.renderingMode!==void 0?ye.renderingMode:ye.stroke,ws=ur.internal.getCurrentPageInfo().pageContext;switch(Vo){case 0:case!1:case"fill":ca=0;break;case 1:case!0:case"stroke":ca=1;break;case 2:case"fillThenStroke":ca=2;break;case 3:case"invisible":ca=3;break;case 4:case"fillAndAddForClipping":ca=4;break;case 5:case"strokeAndAddPathForClipping":ca=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":ca=6;break;case 7:case"addToPathForClipping":ca=7}var Up=ws.usedRenderingMode!==void 0?ws.usedRenderingMode:-1;ca!==-1?Di+=ca+` Tr
`:Up!==-1&&(Di+=`0 Tr
`),ca!==-1&&(ws.usedRenderingMode=ca),Mt=ye.align||"left";var Qa,Xl=ze*tl,bf=ur.internal.pageSize.getWidth(),wf=Gt[Ze];Kt=ye.charSpace||wa,rn=ye.maxWidth||0,Cn=Object.assign({autoencode:!0,noBOM:!0},ye.flags);var rl=[],vo=function(In){return ur.getStringUnitWidth(In,{font:wf,charSpace:Kt,fontSize:ze,doKerning:!1})*ze/zo};if(Object.prototype.toString.call(O)==="[object Array]"){var Ja;Ge=tu(O),Mt!=="left"&&(Qa=Ge.map(vo));var Za,Ql=0;if(Mt==="right"){Q-=Qa[0],O=[],Fi=Ge.length;for(var Ss=0;Ss<Fi;Ss++)Ss===0?(Za=Xa(Q),Ja=Zs(fe)):(Za=W(Ql-Qa[Ss]),Ja=-Xl),O.push([Ge[Ss],Za,Ja]),Ql=Qa[Ss]}else if(Mt==="center"){Q-=Qa[0]/2,O=[],Fi=Ge.length;for(var il=0;il<Fi;il++)il===0?(Za=Xa(Q),Ja=Zs(fe)):(Za=W((Ql-Qa[il])/2),Ja=-Xl),O.push([Ge[il],Za,Ja]),Ql=Qa[il]}else if(Mt==="left"){O=[],Fi=Ge.length;for(var al=0;al<Fi;al++)O.push(Ge[al])}else if(Mt==="justify"&&wf.encoding==="Identity-H"){O=[],Fi=Ge.length,rn=rn!==0?rn:bf;for(var _s=0,Hr=0;Hr<Fi;Hr++)if(Ja=Hr===0?Zs(fe):-Xl,Za=Hr===0?Xa(Q):_s,Hr<Fi-1){var au=W((rn-Qa[Hr])/(Ge[Hr].split(" ").length-1)),Ns=Ge[Hr].split(" ");O.push([Ns[0]+" ",Za,Ja]),_s=0;for(var Wo=1;Wo<Ns.length;Wo++){var ou=(vo(Ns[Wo-1]+" "+Ns[Wo])-vo(Ns[Wo]))*zo+au;Wo==Ns.length-1?O.push([Ns[Wo],ou,0]):O.push([Ns[Wo]+" ",ou,0]),_s-=ou}}else O.push([Ge[Hr],Za,Ja]);O.push(["",_s,0])}else{if(Mt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(O=[],Fi=Ge.length,rn=rn!==0?rn:bf,Hr=0;Hr<Fi;Hr++){Ja=Hr===0?Zs(fe):-Xl,Za=Hr===0?Xa(Q):0;var su=Ge[Hr].split(" ").length-1,Sf=su>0?(rn-Qa[Hr])/su:0;Hr<Fi-1?rl.push(R(W(Sf))):rl.push(0),O.push([Ge[Hr],Za,Ja])}}}(typeof ye.R2L=="boolean"?ye.R2L:xt)===!0&&(O=xf(O,function(In,Xn,Rr){return[In.split("").reverse().join(""),Xn,Rr]})),Be={text:O,x:Q,y:fe,options:ye,mutex:{pdfEscape:Ya,activeFontKey:Ze,fonts:Gt,activeFontSize:ze}},Rn.publish("postProcessText",Be),O=Be.text,Wr=Be.mutex.isHex||!1;var _f=Gt[Ze].encoding;_f!=="WinAnsiEncoding"&&_f!=="StandardEncoding"||(O=xf(O,function(In,Xn,Rr){return[nl(In),Xn,Rr]})),Ge=tu(O),O=[];for(var ol,Jl,Zl,lu=Array.isArray(Ge[0])?1:0,ec="",cu=function(In,Xn,Rr){var ri="";return Rr instanceof qt?(Rr=typeof ye.angle=="number"?Wa(Rr,new qt(1,0,0,1,In,Xn)):Wa(new qt(1,0,0,1,In,Xn),Rr),P===k&&(Rr=Wa(new qt(1,0,0,-1,0,0),Rr)),ri=Rr.join(" ")+` Tm
`):ri=R(In)+" "+R(Xn)+` Td
`,ri},Lr=0;Lr<Ge.length;Lr++){switch(ec="",lu){case 1:Zl=(Wr?"<":"(")+Ge[Lr][0]+(Wr?">":")"),ol=parseFloat(Ge[Lr][1]),Jl=parseFloat(Ge[Lr][2]);break;case 0:Zl=(Wr?"<":"(")+Ge[Lr]+(Wr?">":")"),ol=Xa(Q),Jl=Zs(fe)}rl!==void 0&&rl[Lr]!==void 0&&(ec=rl[Lr]+` Tw
`),Lr===0?O.push(ec+cu(ol,Jl,ni)+Zl):lu===0?O.push(ec+Zl):lu===1&&O.push(ec+cu(ol,Jl,ni)+Zl)}O=lu===0?O.join(` Tj
T* `):O.join(` Tj
`),O+=` Tj
`;var Sa=`BT
/`;return Sa+=Ze+" "+ze+` Tf
`,Sa+=R(ze*tl)+` TL
`,Sa+=Uo+`
`,Sa+=Di,Sa+=O,oe(Sa+="ET"),g[Ze]=!0,ur};var Yc=m.__private__.clip=m.clip=function(O){return oe(O==="evenodd"?"W*":"W"),this};m.clipEvenOdd=function(){return Yc("evenodd")},m.__private__.discardPath=m.discardPath=function(){return oe("n"),this};var ys=m.__private__.isValidStyle=function(O){var Q=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(O)!==-1&&(Q=!0),Q};m.__private__.setDefaultPathOperation=m.setDefaultPathOperation=function(O){return ys(O)&&(c=O),this};var df=m.__private__.getStyle=m.getStyle=function(O){var Q=c;switch(O){case"D":case"S":Q="S";break;case"F":Q="f";break;case"FD":case"DF":Q="B";break;case"f":case"f*":case"B":case"B*":Q=O}return Q},Mn=m.close=function(){return oe("h"),this};m.stroke=function(){return oe("S"),this},m.fill=function(O){return Gc("f",O),this},m.fillEvenOdd=function(O){return Gc("f*",O),this},m.fillStroke=function(O){return Gc("B",O),this},m.fillStrokeEvenOdd=function(O){return Gc("B*",O),this};var Gc=function(O,Q){lr(Q)==="object"?Fp(Q,O):oe(O)},Wl=function(O){O===null||P===k&&O===void 0||(O=df(O),oe(O))};function Hd(O,Q,fe,ye,Ae){var Be=new Fm(Q||this.boundingBox,fe||this.xStep,ye||this.yStep,this.gState,Ae||this.matrix);Be.stream=this.stream;var Ge=O+"$$"+this.cloneIndex+++"$$";return Qi(Ge,Be),Be}var Fp=function(O,Q){var fe=gn[O.key],ye=kt[fe];if(ye instanceof Eh)oe("q"),oe(Bp(Q)),ye.gState&&m.setGState(ye.gState),oe(O.matrix.toString()+" cm"),oe("/"+fe+" sh"),oe("Q");else if(ye instanceof Fm){var Ae=new qt(1,0,0,-1,0,yo());O.matrix&&(Ae=Ae.multiply(O.matrix||Fo),fe=Hd.call(ye,O.key,O.boundingBox,O.xStep,O.yStep,Ae).id),oe("q"),oe("/Pattern cs"),oe("/"+fe+" scn"),ye.gState&&m.setGState(ye.gState),oe(Q),oe("Q")}},Bp=function(O){switch(O){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},hf=m.moveTo=function(O,Q){return oe(R(W(O))+" "+R(V(Q))+" m"),this},pf=m.lineTo=function(O,Q){return oe(R(W(O))+" "+R(V(Q))+" l"),this},xa=m.curveTo=function(O,Q,fe,ye,Ae,Be){return oe([R(W(O)),R(V(Q)),R(W(fe)),R(V(ye)),R(W(Ae)),R(V(Be)),"c"].join(" ")),this};m.__private__.line=m.line=function(O,Q,fe,ye,Ae){if(isNaN(O)||isNaN(Q)||isNaN(fe)||isNaN(ye)||!ys(Ae))throw new Error("Invalid arguments passed to jsPDF.line");return P===_?this.lines([[fe-O,ye-Q]],O,Q,[1,1],Ae||"S"):this.lines([[fe-O,ye-Q]],O,Q,[1,1]).stroke()},m.__private__.lines=m.lines=function(O,Q,fe,ye,Ae,Be){var Ge,_t,Mt,Kt,rn,Cn,Pr,ni,ur,hi,Wr,Di;if(typeof O=="number"&&(Di=fe,fe=Q,Q=O,O=Di),ye=ye||[1,1],Be=Be||!1,isNaN(Q)||isNaN(fe)||!Array.isArray(O)||!Array.isArray(ye)||!ys(Ae)||typeof Be!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(hf(Q,fe),Ge=ye[0],_t=ye[1],Kt=O.length,hi=Q,Wr=fe,Mt=0;Mt<Kt;Mt++)(rn=O[Mt]).length===2?(hi=rn[0]*Ge+hi,Wr=rn[1]*_t+Wr,pf(hi,Wr)):(Cn=rn[0]*Ge+hi,Pr=rn[1]*_t+Wr,ni=rn[2]*Ge+hi,ur=rn[3]*_t+Wr,hi=rn[4]*Ge+hi,Wr=rn[5]*_t+Wr,xa(Cn,Pr,ni,ur,hi,Wr));return Be&&Mn(),Wl(Ae),this},m.path=function(O){for(var Q=0;Q<O.length;Q++){var fe=O[Q],ye=fe.c;switch(fe.op){case"m":hf(ye[0],ye[1]);break;case"l":pf(ye[0],ye[1]);break;case"c":xa.apply(this,ye);break;case"h":Mn()}}return this},m.__private__.rect=m.rect=function(O,Q,fe,ye,Ae){if(isNaN(O)||isNaN(Q)||isNaN(fe)||isNaN(ye)||!ys(Ae))throw new Error("Invalid arguments passed to jsPDF.rect");return P===_&&(ye=-ye),oe([R(W(O)),R(V(Q)),R(W(fe)),R(W(ye)),"re"].join(" ")),Wl(Ae),this},m.__private__.triangle=m.triangle=function(O,Q,fe,ye,Ae,Be,Ge){if(isNaN(O)||isNaN(Q)||isNaN(fe)||isNaN(ye)||isNaN(Ae)||isNaN(Be)||!ys(Ge))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[fe-O,ye-Q],[Ae-fe,Be-ye],[O-Ae,Q-Be]],O,Q,[1,1],Ge,!0),this},m.__private__.roundedRect=m.roundedRect=function(O,Q,fe,ye,Ae,Be,Ge){if(isNaN(O)||isNaN(Q)||isNaN(fe)||isNaN(ye)||isNaN(Ae)||isNaN(Be)||!ys(Ge))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var _t=4/3*(Math.SQRT2-1);return Ae=Math.min(Ae,.5*fe),Be=Math.min(Be,.5*ye),this.lines([[fe-2*Ae,0],[Ae*_t,0,Ae,Be-Be*_t,Ae,Be],[0,ye-2*Be],[0,Be*_t,-Ae*_t,Be,-Ae,Be],[2*Ae-fe,0],[-Ae*_t,0,-Ae,-Be*_t,-Ae,-Be],[0,2*Be-ye],[0,-Be*_t,Ae*_t,-Be,Ae,-Be]],O+Ae,Q,[1,1],Ge,!0),this},m.__private__.ellipse=m.ellipse=function(O,Q,fe,ye,Ae){if(isNaN(O)||isNaN(Q)||isNaN(fe)||isNaN(ye)||!ys(Ae))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Be=4/3*(Math.SQRT2-1)*fe,Ge=4/3*(Math.SQRT2-1)*ye;return hf(O+fe,Q),xa(O+fe,Q-Ge,O+Be,Q-ye,O,Q-ye),xa(O-Be,Q-ye,O-fe,Q-Ge,O-fe,Q),xa(O-fe,Q+Ge,O-Be,Q+ye,O,Q+ye),xa(O+Be,Q+ye,O+fe,Q+Ge,O+fe,Q),Wl(Ae),this},m.__private__.circle=m.circle=function(O,Q,fe,ye){if(isNaN(O)||isNaN(Q)||isNaN(fe)||!ys(ye))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(O,Q,fe,fe,ye)},m.setFont=function(O,Q,fe){return fe&&(Q=L(Q,fe)),Ze=Dp(O,Q,{disableWarning:!1}),this};var vs=m.__private__.getFont=m.getFont=function(){return Gt[Dp.apply(m,arguments)]};m.__private__.getFontList=m.getFontList=function(){var O,Q,fe={};for(O in Qt)if(Qt.hasOwnProperty(O))for(Q in fe[O]=[],Qt[O])Qt[O].hasOwnProperty(Q)&&fe[O].push(Q);return fe},m.addFont=function(O,Q,fe,ye,Ae){var Be=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Be.indexOf(arguments[3])!==-1?Ae=arguments[3]:arguments[3]&&Be.indexOf(arguments[3])==-1&&(fe=L(fe,ye)),cf.call(this,O,Q,fe,Ae=Ae||"Identity-H")};var ba,ho=e.lineWidth||.200025,Kc=m.__private__.getLineWidth=m.getLineWidth=function(){return ho},Vt=m.__private__.setLineWidth=m.setLineWidth=function(O){return ho=O,oe(R(W(O))+" w"),this};m.__private__.setLineDash=It.API.setLineDash=It.API.setLineDashPattern=function(O,Q){if(O=O||[],Q=Q||0,isNaN(Q)||!Array.isArray(O))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return O=O.map(function(fe){return R(W(fe))}).join(" "),Q=R(W(Q)),oe("["+O+"] "+Q+" d"),this};var xs=m.__private__.getLineHeight=m.getLineHeight=function(){return ze*ba};m.__private__.getLineHeight=m.getLineHeight=function(){return ze*ba};var xy=m.__private__.setLineHeightFactor=m.setLineHeightFactor=function(O){return typeof(O=O||1.15)=="number"&&(ba=O),this},$p=m.__private__.getLineHeightFactor=m.getLineHeightFactor=function(){return ba};xy(e.lineHeight);var Xa=m.__private__.getHorizontalCoordinate=function(O){return W(O)},Zs=m.__private__.getVerticalCoordinate=function(O){return P===k?O:$t[q].mediaBox.topRightY-$t[q].mediaBox.bottomLeftY-W(O)},qp=m.__private__.getHorizontalCoordinateString=m.getHorizontalCoordinateString=function(O){return R(Xa(O))},mf=m.__private__.getVerticalCoordinateString=m.getVerticalCoordinateString=function(O){return R(Zs(O))},Xc=e.strokeColor||"0 G";m.__private__.getStrokeColor=m.getDrawColor=function(){return ms(Xc)},m.__private__.setStrokeColor=m.setDrawColor=function(O,Q,fe,ye){return Xc=Ii({ch1:O,ch2:Q,ch3:fe,ch4:ye,pdfColorType:"draw",precision:2}),oe(Xc),this};var Yd=e.fillColor||"0 g";m.__private__.getFillColor=m.getFillColor=function(){return ms(Yd)},m.__private__.setFillColor=m.setFillColor=function(O,Q,fe,ye){return Yd=Ii({ch1:O,ch2:Q,ch3:fe,ch4:ye,pdfColorType:"fill",precision:2}),oe(Yd),this};var Uo=e.textColor||"0 g",Qc=m.__private__.getTextColor=m.getTextColor=function(){return ms(Uo)};m.__private__.setTextColor=m.setTextColor=function(O,Q,fe,ye){return Uo=Ii({ch1:O,ch2:Q,ch3:fe,ch4:ye,pdfColorType:"text",precision:3}),this};var wa=e.charSpace,gf=m.__private__.getCharSpace=m.getCharSpace=function(){return parseFloat(wa||0)};m.__private__.setCharSpace=m.setCharSpace=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return wa=O,this};var Gd=0;m.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},m.__private__.setLineCap=m.setLineCap=function(O){var Q=m.CapJoinStyles[O];if(Q===void 0)throw new Error("Line cap style of '"+O+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Gd=Q,oe(Q+" J"),this};var Kd=0;m.__private__.setLineJoin=m.setLineJoin=function(O){var Q=m.CapJoinStyles[O];if(Q===void 0)throw new Error("Line join style of '"+O+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Kd=Q,oe(Q+" j"),this},m.__private__.setLineMiterLimit=m.__private__.setMiterLimit=m.setLineMiterLimit=m.setMiterLimit=function(O){if(O=O||0,isNaN(O))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return oe(R(W(O))+" M"),this},m.GState=m2,m.setGState=function(O){(O=typeof O=="string"?Bt[Jt[O]]:yf(null,O)).equals(Hn)||(oe("/"+O.id+" gs"),Hn=O)};var yf=function(O,Q){if(!O||!Jt[O]){var fe=!1;for(var ye in Bt)if(Bt.hasOwnProperty(ye)&&Bt[ye].equals(Q)){fe=!0;break}if(fe)Q=Bt[ye];else{var Ae="GS"+(Object.keys(Bt).length+1).toString(10);Bt[Ae]=Q,Q.id=Ae}return O&&(Jt[O]=Q.id),Rn.publish("addGState",Q),Q}};m.addGState=function(O,Q){return yf(O,Q),this},m.saveGraphicsState=function(){return oe("q"),un.push({key:Ze,size:ze,color:Uo}),this},m.restoreGraphicsState=function(){oe("Q");var O=un.pop();return Ze=O.key,ze=O.size,Uo=O.color,Hn=null,this},m.setCurrentTransformationMatrix=function(O){return oe(O.toString()+" cm"),this},m.comment=function(O){return oe("#"+O),this};var po=function(O,Q){var fe=O||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return fe},set:function(Be){isNaN(Be)||(fe=parseFloat(Be))}});var ye=Q||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return ye},set:function(Be){isNaN(Be)||(ye=parseFloat(Be))}});var Ae="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Ae},set:function(Be){Ae=Be.toString()}}),this},Jc=function(O,Q,fe,ye){po.call(this,O,Q),this.type="rect";var Ae=fe||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Ae},set:function(Ge){isNaN(Ge)||(Ae=parseFloat(Ge))}});var Be=ye||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Be},set:function(Ge){isNaN(Ge)||(Be=parseFloat(Ge))}}),this},Zc=function(){this.page=an,this.currentPage=q,this.pages=Pe.slice(0),this.pagesContext=$t.slice(0),this.x=ct,this.y=Wn,this.matrix=nn,this.width=Hl(q),this.height=eu(q),this.outputDestination=Ue,this.id="",this.objectNumber=-1};Zc.prototype.restore=function(){an=this.page,q=this.currentPage,$t=this.pagesContext,Pe=this.pages,ct=this.x,Wn=this.y,nn=this.matrix,Xd(q,this.width),go(q,this.height),Ue=this.outputDestination};var mo=function(O,Q,fe,ye,Ae){lo.push(new Zc),an=q=0,Pe=[],ct=O,Wn=Q,nn=Ae,Vl([fe,ye])};for(var el in m.beginFormObject=function(O,Q,fe,ye,Ae){return mo(O,Q,fe,ye,Ae),this},m.endFormObject=function(O){return(function(Q){if(ps[Q])lo.pop().restore();else{var fe=new Zc,ye="Xo"+(Object.keys(Ri).length+1).toString(10);fe.id=ye,ps[Q]=ye,Ri[ye]=fe,Rn.publish("addFormObject",fe),lo.pop().restore()}})(O),this},m.doFormObject=function(O,Q){var fe=Ri[ps[O]];return oe("q"),oe(Q.toString()+" cm"),oe("/"+fe.id+" Do"),oe("Q"),this},m.getFormObject=function(O){var Q=Ri[ps[O]];return{x:Q.x,y:Q.y,width:Q.width,height:Q.height,matrix:Q.matrix}},m.save=function(O,Q){return O=O||"generated.pdf",(Q=Q||{}).returnPromise=Q.returnPromise||!1,Q.returnPromise===!1?(Ch(gs(Ka()),O),typeof Ch.unload=="function"&&en.setTimeout&&setTimeout(Ch.unload,911),this):new Promise(function(fe,ye){try{var Ae=Ch(gs(Ka()),O);typeof Ch.unload=="function"&&en.setTimeout&&setTimeout(Ch.unload,911),fe(Ae)}catch(Be){ye(Be.message)}})},It.API)It.API.hasOwnProperty(el)&&(el==="events"&&It.API.events.length?(function(O,Q){var fe,ye,Ae;for(Ae=Q.length-1;Ae!==-1;Ae--)fe=Q[Ae][0],ye=Q[Ae][1],O.subscribe.apply(O,[fe].concat(typeof ye=="function"?[ye]:ye))})(Rn,It.API.events):m[el]=It.API[el]);function Hl(O){return $t[O].mediaBox.topRightX-$t[O].mediaBox.bottomLeftX}function Xd(O,Q){$t[O].mediaBox.topRightX=Q+$t[O].mediaBox.bottomLeftX}function eu(O){return $t[O].mediaBox.topRightY-$t[O].mediaBox.bottomLeftY}function go(O,Q){$t[O].mediaBox.topRightY=Q+$t[O].mediaBox.bottomLeftY}var bs=m.getPageWidth=function(O){return Hl(O=O||q)/lt},Ji=m.setPageWidth=function(O,Q){Xd(O,Q*lt)},yo=m.getPageHeight=function(O){return eu(O=O||q)/lt},vf=m.setPageHeight=function(O,Q){go(O,Q*lt)};return m.internal={pdfEscape:Ya,getStyle:df,getFont:vs,getFontSize:st,getCharSpace:gf,getTextColor:Qc,getLineHeight:xs,getLineHeightFactor:$p,getLineWidth:Kc,write:Ke,getHorizontalCoordinate:Xa,getVerticalCoordinate:Zs,getCoordinateString:qp,getVerticalCoordinateString:mf,collections:{},newObject:cr,newAdditionalObject:Js,newObjectDeferred:Vr,newObjectDeferredBegin:Zr,getFilters:uo,putStream:Ha,events:Rn,scaleFactor:lt,pageSize:{getWidth:function(){return bs(q)},setWidth:function(O){Ji(q,O)},getHeight:function(){return yo(q)},setHeight:function(O){vf(q,O)}},encryptionOptions:f,encryption:di,getEncryptor:function(O){return f!==null?di.encryptor(O,0):function(Q){return Q}},output:Hc,getNumberOfPages:Ga,get pages(){return Pe},out:oe,f2:M,f3:F,getPageInfo:qo,getPageInfoByObjId:Vd,getCurrentPageInfo:Wd,getPDFVersion:y,Point:po,Rectangle:Jc,Matrix:qt,hasHotfix:fo},Object.defineProperty(m.internal.pageSize,"width",{get:function(){return bs(q)},set:function(O){Ji(q,O)},enumerable:!0,configurable:!0}),Object.defineProperty(m.internal.pageSize,"height",{get:function(){return yo(q)},set:function(O){vf(q,O)},enumerable:!0,configurable:!0}),(function(O){for(var Q=0,fe=gt.length;Q<fe;Q++){var ye=cf.call(this,O[Q][0],O[Q][1],O[Q][2],gt[Q][3],!0);h===!1&&(g[ye]=!0);var Ae=O[Q][0].split("-");Rp({id:ye,fontName:Ae[0],fontStyle:Ae[1]||""})}Rn.publish("addFonts",{fonts:Gt,dictionary:Qt})}).call(m,gt),Ze="F1",Ip(i,n),Rn.publish("initialized"),m}Pm.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},Pm.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Pm.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join("")},Pm.prototype.processOwnerPassword=function(e,t){return cE(lE(t).substr(0,5),e)},Pm.prototype.encryptor=function(e,t){var n=lE(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return cE(n,r)}},m2.prototype.equals=function(e){var t,n="id,objectNumber,equals";if(!e||lr(e)!==lr(this))return!1;var r=0;for(t in this)if(!(n.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;r++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&r--;return r===0},It.API={events:[]},It.version="4.2.0";var ci=It.API,BT=1,Lp=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},_m=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},wp=function(e){return e.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var n=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(n.length===1?"0"+n:n)})},cn=function(e){return e.toFixed(2)},Gf=function(e){return e.toFixed(5)};ci.__acroform__={};var Do=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},Uq=function(e){return e*BT},lc=function(e){var t=new $Z,n=jt.internal.getHeight(e)||0,r=jt.internal.getWidth(e)||0;return t.BBox=[0,0,Number(cn(r)),Number(cn(n))],t},Z7e=ci.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},eBe=ci.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},tBe=ci.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},xi=ci.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return tBe(e,t-1)},bi=ci.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Z7e(e,t-1)},wi=ci.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return eBe(e,t-1)},nBe=ci.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=e[0],a=e[1],o=e[2],s=e[3],l={};return l.lowerLeft_X=n(i)||0,l.lowerLeft_Y=r(a+s)||0,l.upperRight_X=n(i+o)||0,l.upperRight_Y=r(a)||0,[Number(cn(l.lowerLeft_X)),Number(cn(l.lowerLeft_Y)),Number(cn(l.upperRight_X)),Number(cn(l.upperRight_Y))]},rBe=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=e._V||e.DV,r=uE(e,n),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+cn(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var a=lc(e);return a.scope=e.scope,a.stream=t.join(`
`),a}},uE=function(e,t){var n=e.fontSize===0?e.maxFontSize:e.fontSize,r={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map(function(M){return M.split(`
`)}):i.map(function(M){return[M]});var a=n,o=jt.internal.getHeight(e)||0;o=o<0?-o:o;var s=jt.internal.getWidth(e)||0;s=s<0?-s:s;var l=function(M,F,W){if(M+1<i.length){var V=F+" "+i[M+1][0];return ab(V,e,W).width<=s-4}return!1};a++;e:for(;a>0;){t="",a--;var c,f,h=ab("3",e,a).height,g=e.multiline?o-a:(o-h)/2,m=g+=2,b=0,y=0,x=0;if(a<=0){t=`(...) Tj
`,t+="% Width of Text: "+ab(t,e,a=12).width+", FieldWidth:"+s+`
`;break}for(var w="",_=0,k=0;k<i.length;k++)if(i.hasOwnProperty(k)){var P=!1;if(i[k].length!==1&&x!==i[k].length-1){if((h+2)*(_+2)+2>o)continue e;w+=i[k][x],P=!0,y=k,k--}else{w=(w+=i[k][x]+" ").substr(w.length-1)==" "?w.substr(0,w.length-1):w;var C=parseInt(k),j=l(C,w,a),L=k>=i.length-1;if(j&&!L){w+=" ",x=0;continue}if(j||L){if(L)y=C;else if(e.multiline&&(h+2)*(_+2)+2>o)continue e}else{if(!e.multiline||(h+2)*(_+2)+2>o)continue e;y=C}}for(var R="",D=b;D<=y;D++){var H=i[D];if(e.multiline){if(D===y){R+=H[x]+" ",x=(x+1)%H.length;continue}if(D===b){R+=H[H.length-1]+" ";continue}}R+=H[0]+" "}switch(R=R.substr(R.length-1)==" "?R.substr(0,R.length-1):R,f=ab(R,e,a).width,e.textAlign){case"right":c=s-f-2;break;case"center":c=(s-f)/2;break;default:c=2}t+=cn(c)+" "+cn(m)+` Td
`,t+="("+Lp(R)+`) Tj
`,t+=-cn(c)+` 0 Td
`,m=-(a+2),f=0,b=P?y:y+1,_++,w=""}break}return r.text=t,r.fontSize=a,r},ab=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},iBe={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},aBe=function(e,t){var n={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(r){return r.type===n.type&&r.object===n.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},oBe=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(Bl.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(iBe)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");BT=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new qZ,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];a.objId=void 0,a.hasAnnotation&&aBe(a,n)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(n){(function(r,i){var a=!r;for(var o in r||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(o)){var s=r[o],l=[],c=s.Rect;if(s.Rect&&(s.Rect=nBe(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=jt.createDefaultAppearanceStream(s),lr(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(l=s.getKeyValueListForStream()),s.Rect=c,s.hasAppearanceStream&&!s.appearanceStreamContent){var f=rBe(s);l.push({key:"AP",value:"<</N "+f+">>"}),i.internal.acroformPlugin.xForms.push(f)}if(s.appearanceStreamContent){var h="";for(var g in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(g)){var m=s.appearanceStreamContent[g];if(h+="/"+g+" ",h+="<<",Object.keys(m).length>=1||Array.isArray(m)){for(var o in m)if(m.hasOwnProperty(o)){var b=m[o];typeof b=="function"&&(b=b.call(i,s)),h+="/"+o+" "+b+" ",i.internal.acroformPlugin.xForms.indexOf(b)>=0||i.internal.acroformPlugin.xForms.push(b)}}else typeof(b=m)=="function"&&(b=b.call(i,s)),h+="/"+o+" "+b,i.internal.acroformPlugin.xForms.indexOf(b)>=0||i.internal.acroformPlugin.xForms.push(b);h+=">>"}l.push({key:"AP",value:`<<
`+h+">>"})}i.internal.putStream({additionalKeyValues:l,objectId:s.objId}),i.internal.out("endobj")}a&&(function(y,x){for(var w in y)if(y.hasOwnProperty(w)){var _=w,k=y[w];x.internal.newObjectDeferredBegin(k.objId,!0),lr(k)==="object"&&typeof k.putStream=="function"&&k.putStream(),delete y[_]}})(i.internal.acroformPlugin.xForms,i)})(n,e)}),e.internal.acroformPlugin.isInitialized=!0}},BZ=ci.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(o){return o};if(Array.isArray(e)){for(var i="[",a=0;a<e.length;a++)switch(a!==0&&(i+=" "),lr(e[a])){case"boolean":case"number":case"object":i+=e[a].toString();break;case"string":e[a].substr(0,1)==="/"?i+="/"+wp(e[a].substr(1)):(t!==void 0&&n&&(r=n.internal.getEncryptor(t)),i+="("+Lp(r(e[a].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},aj=function(e,t,n){var r=function(i){return i};return t!==void 0&&n&&(r=n.internal.getEncryptor(t)),(e=e||"").toString(),"("+Lp(r(e))+")"},bc=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};bc.prototype.toString=function(){return this.objId+" 0 R"},bc.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},bc.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var n in t)if(Object.getOwnPropertyDescriptor(this,t[n]).configurable===!1){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:BZ(i,this.objId,this.scope)}):i instanceof bc?(i.scope=this.scope,e.push({key:r,value:i.objId+" 0 R"})):typeof i!="function"&&e.push({key:r,value:i}))}return e};var $Z=function(){bc.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){e=n.trim()},get:function(){return e||null}})};Do($Z,bc);var qZ=function(){bc.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var n=function(r){return r};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+Lp(n(e))+")"}},set:function(n){e=n}})};Do(qZ,bc);var Bl=function e(){bc.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute F supplied.');t=w}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!xi(t,3)},set:function(w){w?this.F=bi(t,3):this.F=wi(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute Ff supplied.');n=w}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(w){r=w!==void 0?w:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(w){r[0]=w}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(w){r[1]=w}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(w){r[2]=w}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(w){r[3]=w}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(w){switch(w){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=w;break;default:throw new Error('Invalid value "'+w+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof g2)return;a="FieldObject"+e.FieldNum++}var w=function(_){return _};return this.scope&&(w=this.scope.internal.getEncryptor(this.objId)),"("+Lp(w(a))+")"},set:function(w){a=w.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(w){a=w}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(w){o=w}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(w){s=w}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(w){l=w}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return c===void 0?50/BT:c},set:function(w){c=w}});var f="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return f},set:function(w){f=w}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof g2||this instanceof rp))return aj(h,this.objId,this.scope)},set:function(w){w=w.toString(),h=w}});var g=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(g)return this instanceof sa==0?aj(g,this.objId,this.scope):g},set:function(w){w=w.toString(),g=this instanceof sa==0?w.substr(0,1)==="("?_m(w.substr(1,w.length-2)):_m(w):w}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof sa==1?_m(g.substr(1,g.length-1)):g},set:function(w){w=w.toString(),g=this instanceof sa==1?"/"+wp(w):w}});var m=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(m)return m},set:function(w){this.V=w}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(m)return this instanceof sa==0?aj(m,this.objId,this.scope):m},set:function(w){w=w.toString(),m=this instanceof sa==0?w.substr(0,1)==="("?_m(w.substr(1,w.length-2)):_m(w):w}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof sa==1?_m(m.substr(1,m.length-1)):m},set:function(w){w=w.toString(),m=this instanceof sa==1?"/"+wp(w):w}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var b,y=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return y},set:function(w){w=!!w,y=w}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(b)return b},set:function(w){b=w}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,1)},set:function(w){w?this.Ff=bi(this.Ff,1):this.Ff=wi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,2)},set:function(w){w?this.Ff=bi(this.Ff,2):this.Ff=wi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,3)},set:function(w){w?this.Ff=bi(this.Ff,3):this.Ff=wi(this.Ff,3)}});var x=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(x!==null)return x},set:function(w){if([0,1,2].indexOf(w)===-1)throw new Error('Invalid value "'+w+'" for attribute Q supplied.');x=w}}),Object.defineProperty(this,"textAlign",{get:function(){var w;switch(x){case 0:default:w="left";break;case 1:w="center";break;case 2:w="right"}return w},configurable:!0,enumerable:!0,set:function(w){switch(w){case"right":case 2:x=2;break;case"center":case 1:x=1;break;default:x=0}}})};Do(Bl,bc);var Jm=function(){Bl.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(n){e=n}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return BZ(t,this.objId,this.scope)},set:function(n){var r,i;i=[],typeof(r=n)=="string"&&(i=(function(a,o,s){s||(s=1);for(var l,c=[];l=o.exec(a);)c.push(l[s]);return c})(r,/\((.*?)\)/g)),t=i}}),this.getOptions=function(){return t},this.setOptions=function(n){t=n,this.sort&&t.sort()},this.addOption=function(n){n=(n=n||"").toString(),t.push(n),this.sort&&t.sort()},this.removeOption=function(n,r){for(r=r||!1,n=(n=n||"").toString();t.indexOf(n)!==-1&&(t.splice(t.indexOf(n),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,18)},set:function(n){n?this.Ff=bi(this.Ff,18):this.Ff=wi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,19)},set:function(n){this.combo===!0&&(n?this.Ff=bi(this.Ff,19):this.Ff=wi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,20)},set:function(n){n?(this.Ff=bi(this.Ff,20),t.sort()):this.Ff=wi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,22)},set:function(n){n?this.Ff=bi(this.Ff,22):this.Ff=wi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,23)},set:function(n){n?this.Ff=bi(this.Ff,23):this.Ff=wi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,27)},set:function(n){n?this.Ff=bi(this.Ff,27):this.Ff=wi(this.Ff,27)}}),this.hasAppearanceStream=!1};Do(Jm,Bl);var Zm=function(){Jm.call(this),this.fontName="helvetica",this.combo=!1};Do(Zm,Jm);var eg=function(){Zm.call(this),this.combo=!0};Do(eg,Zm);var Mb=function(){eg.call(this),this.edit=!0};Do(Mb,eg);var sa=function(){Bl.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,15)},set:function(n){n?this.Ff=bi(this.Ff,15):this.Ff=wi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,16)},set:function(n){n?this.Ff=bi(this.Ff,16):this.Ff=wi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,17)},set:function(n){n?this.Ff=bi(this.Ff,17):this.Ff=wi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,26)},set:function(n){n?this.Ff=bi(this.Ff,26):this.Ff=wi(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(a){return a};if(this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,i=[];for(r in i.push("<<"),t)i.push("/"+r+" ("+Lp(n(t[r]))+")");return i.push(">>"),i.join(`
`)}},set:function(n){lr(n)==="object"&&(t=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(n){typeof n=="string"&&(t.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(n){var r=n==null?"":n.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),e="/"+wp(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(n){e="/"+wp(n)}})};Do(sa,Bl);var Lb=function(){sa.call(this),this.pushButton=!0};Do(Lb,sa);var tg=function(){sa.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};Do(tg,sa);var g2=function(){var e,t;Bl.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){e=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(i){t=i}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(s){return s};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var a,o=[];for(a in o.push("<<"),r)o.push("/"+a+" ("+Lp(i(r[a]))+")");return o.push(">>"),o.join(`
`)},set:function(i){lr(i)==="object"&&(r=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(i){typeof i=="string"&&(r.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),n="/"+wp(a)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),n="/"+wp(a)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=jt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Do(g2,Bl),tg.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},tg.prototype.createOption=function(e){var t=new g2;return t.Parent=this,t.optionName=e,this.Kids.push(t),sBe.call(this.scope,t),t};var Rb=function(){sa.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=jt.CheckBox.createAppearanceStream()};Do(Rb,sa);var rp=function(){Bl.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,13)},set:function(t){t?this.Ff=bi(this.Ff,13):this.Ff=wi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,21)},set:function(t){t?this.Ff=bi(this.Ff,21):this.Ff=wi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,23)},set:function(t){t?this.Ff=bi(this.Ff,23):this.Ff=wi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,24)},set:function(t){t?this.Ff=bi(this.Ff,24):this.Ff=wi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,25)},set:function(t){t?this.Ff=bi(this.Ff,25):this.Ff=wi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,26)},set:function(t){t?this.Ff=bi(this.Ff,26):this.Ff=wi(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Do(rp,Bl);var Ib=function(){rp.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,14)},set:function(e){e?this.Ff=bi(this.Ff,14):this.Ff=wi(this.Ff,14)}}),this.password=!0};Do(Ib,rp);var jt={CheckBox:{createAppearanceStream:function(){return{N:{On:jt.CheckBox.YesNormal},D:{On:jt.CheckBox.YesPushDown,Off:jt.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=lc(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=uE(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+cn(jt.internal.getWidth(e))+" "+cn(jt.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+cn(a.fontSize)+" Tf "+i),n.push("BT"),n.push(a.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join(`
`),t},YesNormal:function(e){var t=lc(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],a=jt.internal.getHeight(e),o=jt.internal.getWidth(e),s=uE(e,e.caption);return i.push("1 g"),i.push("0 0 "+cn(o)+" "+cn(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+cn(o-1)+" "+cn(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+cn(s.fontSize)+" Tf "+r),i.push(s.text),i.push("ET"),i.push("Q"),t.stream=i.join(`
`),t},OffPushDown:function(e){var t=lc(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+cn(jt.internal.getWidth(e))+" "+cn(jt.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:jt.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=jt.RadioButton.Circle.YesNormal,t.D[e]=jt.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=lc(e);t.scope=e.scope;var n=[],r=jt.internal.getWidth(e)<=jt.internal.getHeight(e)?jt.internal.getWidth(e)/4:jt.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=jt.internal.Bezier_C,a=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+Gf(jt.internal.getWidth(e)/2)+" "+Gf(jt.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=lc(e);t.scope=e.scope;var n=[],r=jt.internal.getWidth(e)<=jt.internal.getHeight(e)?jt.internal.getWidth(e)/4:jt.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*jt.internal.Bezier_C).toFixed(5)),o=Number((r*jt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Gf(jt.internal.getWidth(e)/2)+" "+Gf(jt.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+Gf(jt.internal.getWidth(e)/2)+" "+Gf(jt.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t},OffPushDown:function(e){var t=lc(e);t.scope=e.scope;var n=[],r=jt.internal.getWidth(e)<=jt.internal.getHeight(e)?jt.internal.getWidth(e)/4:jt.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*jt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Gf(jt.internal.getWidth(e)/2)+" "+Gf(jt.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:jt.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=jt.RadioButton.Cross.YesNormal,t.D[e]=jt.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=lc(e);t.scope=e.scope;var n=[],r=jt.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+cn(jt.internal.getWidth(e)-2)+" "+cn(jt.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(cn(r.x1.x)+" "+cn(r.x1.y)+" m"),n.push(cn(r.x2.x)+" "+cn(r.x2.y)+" l"),n.push(cn(r.x4.x)+" "+cn(r.x4.y)+" m"),n.push(cn(r.x3.x)+" "+cn(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=lc(e);t.scope=e.scope;var n=jt.internal.calculateCross(e),r=[];return r.push("0.749023 g"),r.push("0 0 "+cn(jt.internal.getWidth(e))+" "+cn(jt.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+cn(jt.internal.getWidth(e)-2)+" "+cn(jt.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(cn(n.x1.x)+" "+cn(n.x1.y)+" m"),r.push(cn(n.x2.x)+" "+cn(n.x2.y)+" l"),r.push(cn(n.x4.x)+" "+cn(n.x4.y)+" m"),r.push(cn(n.x3.x)+" "+cn(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
`),t},OffPushDown:function(e){var t=lc(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+cn(jt.internal.getWidth(e))+" "+cn(jt.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join(`
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}};jt.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=jt.internal.getWidth(e),n=jt.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},jt.internal.getWidth=function(e){var t=0;return lr(e)==="object"&&(t=Uq(e.Rect[2])),t},jt.internal.getHeight=function(e){var t=0;return lr(e)==="object"&&(t=Uq(e.Rect[3])),t};var sBe=ci.addField=function(e){if(oBe(this,e),!(e instanceof Bl))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};ci.AcroFormChoiceField=Jm,ci.AcroFormListBox=Zm,ci.AcroFormComboBox=eg,ci.AcroFormEditBox=Mb,ci.AcroFormButton=sa,ci.AcroFormPushButton=Lb,ci.AcroFormRadioButton=tg,ci.AcroFormCheckBox=Rb,ci.AcroFormTextField=rp,ci.AcroFormPasswordField=Ib,ci.AcroFormAppearance=jt,ci.AcroForm={ChoiceField:Jm,ListBox:Zm,ComboBox:eg,EditBox:Mb,Button:sa,PushButton:Lb,RadioButton:tg,CheckBox:Rb,TextField:rp,PasswordField:Ib,Appearance:jt},It.AcroForm={ChoiceField:Jm,ListBox:Zm,ComboBox:eg,EditBox:Mb,Button:sa,PushButton:Lb,RadioButton:tg,CheckBox:Rb,TextField:rp,PasswordField:Ib,Appearance:jt};It.AcroForm;function UZ(e){return e.reduce(function(t,n,r){return t[n]=r,t},{})}(function(e){var t="addImage_";e.__addimage__={};var n="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(M,F){var W,V,X,Y,Z,K=n;if((F=F||n)==="RGBA"||M.data!==void 0&&M.data instanceof Uint8ClampedArray&&"height"in M&&"width"in M)return"RGBA";if(j(M))for(Z in r)for(X=r[Z],W=0;W<X.length;W+=1){for(Y=!0,V=0;V<X[W].length;V+=1)if(X[W][V]!==void 0&&X[W][V]!==M[V]){Y=!1;break}if(Y===!0){K=Z;break}}else for(Z in r)for(X=r[Z],W=0;W<X.length;W+=1){for(Y=!0,V=0;V<X[W].length;V+=1)if(X[W][V]!==void 0&&X[W][V]!==M.charCodeAt(V)){Y=!1;break}if(Y===!0){K=Z;break}}return K===n&&F!==n&&(K=F),K},a=function M(F){for(var W=this.internal.write,V=this.internal.putStream,X=(0,this.internal.getFilters)();X.indexOf("FlateEncode")!==-1;)X.splice(X.indexOf("FlateEncode"),1);F.objectId=this.internal.newObject();var Y=[];if(Y.push({key:"Type",value:"/XObject"}),Y.push({key:"Subtype",value:"/Image"}),Y.push({key:"Width",value:F.width}),Y.push({key:"Height",value:F.height}),F.colorSpace===w.INDEXED?Y.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(F.palette.length/3-1)+" "+("sMask"in F&&F.sMask!==void 0?F.objectId+2:F.objectId+1)+" 0 R]"}):(Y.push({key:"ColorSpace",value:"/"+F.colorSpace}),F.colorSpace===w.DEVICE_CMYK&&Y.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),Y.push({key:"BitsPerComponent",value:F.bitsPerComponent}),"decodeParameters"in F&&F.decodeParameters!==void 0&&Y.push({key:"DecodeParms",value:"<<"+F.decodeParameters+">>"}),"transparency"in F&&Array.isArray(F.transparency)&&F.transparency.length>0){for(var Z="",K=0,se=F.transparency.length;K<se;K++)Z+=F.transparency[K]+" "+F.transparency[K]+" ";Y.push({key:"Mask",value:"["+Z+"]"})}F.sMask!==void 0&&Y.push({key:"SMask",value:F.objectId+1+" 0 R"});var z=F.filter!==void 0?["/"+F.filter]:void 0;if(V({data:F.data,additionalKeyValues:Y,alreadyAppliedFilters:z,objectId:F.objectId}),W("endobj"),"sMask"in F&&F.sMask!==void 0){var te,$=(te=F.sMaskBitsPerComponent)!==null&&te!==void 0?te:F.bitsPerComponent,q={width:F.width,height:F.height,colorSpace:"DeviceGray",bitsPerComponent:$,data:F.sMask};"filter"in F&&(q.decodeParameters="/Predictor ".concat(F.predictor," /Colors 1 /BitsPerComponent ").concat($," /Columns ").concat(F.width),q.filter=F.filter),M.call(this,q)}if(F.colorSpace===w.INDEXED){var re=this.internal.newObject();V({data:R(new Uint8Array(F.palette)),objectId:re}),W("endobj")}},o=function(){var M=this.internal.collections[t+"images"];for(var F in M)a.call(this,M[F])},s=function(){var M,F=this.internal.collections[t+"images"],W=this.internal.write;for(var V in F)W("/I"+(M=F[V]).index,M.objectId,"0","R")},l=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",s))},c=function(){var M=this.internal.collections[t+"images"];return l.call(this),M},f=function(){return Object.keys(this.internal.collections[t+"images"]).length},h=function(M){return typeof e["process"+M.toUpperCase()]=="function"},g=function(M){return lr(M)==="object"&&M.nodeType===1},m=function(M,F){if(M.nodeName==="IMG"&&M.hasAttribute("src")){var W=""+M.getAttribute("src");if(W.indexOf("data:image/")===0)return Tb(unescape(W).split("base64,").pop());var V=e.loadFile(W,!0);if(V!==void 0)return V}if(M.nodeName==="CANVAS"){if(M.width===0||M.height===0)throw new Error("Given canvas must have data. Canvas width: "+M.width+", height: "+M.height);var X;switch(F){case"PNG":X="image/png";break;case"WEBP":X="image/webp";break;default:X="image/jpeg"}return Tb(M.toDataURL(X,1).split("base64,").pop())}},b=function(M){var F=this.internal.collections[t+"images"];if(F){for(var W in F)if(M===F[W].alias)return F[W]}},y=function(M,F,W){return M||F||(M=-96,F=-96),M<0&&(M=-1*W.width*72/M/this.internal.scaleFactor),F<0&&(F=-1*W.height*72/F/this.internal.scaleFactor),M===0&&(M=F*W.width/W.height),F===0&&(F=M*W.height/W.width),[M,F]},x=function(M,F,W,V,X,Y){var Z=y.call(this,W,V,X),K=this.internal.getCoordinateString,se=this.internal.getVerticalCoordinateString,z=c.call(this);if(W=Z[0],V=Z[1],z[X.index]=X,Y){Y*=Math.PI/180;var te=Math.cos(Y),$=Math.sin(Y),q=function(le){return le.toFixed(4)},re=[q(te),q($),q(-1*$),q(te),0,0,"cm"]}this.internal.write("q"),Y?(this.internal.write([1,"0","0",1,K(M),se(F+V),"cm"].join(" ")),this.internal.write(re.join(" ")),this.internal.write([K(W),"0","0",K(V),"0","0","cm"].join(" "))):this.internal.write([K(W),"0","0",K(V),K(M),se(F+V),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+X.index+" Do"),this.internal.write("Q")},w=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var _=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},k=e.__addimage__.sHashCode=function(M){var F,W,V=0;if(typeof M=="string")for(W=M.length,F=0;F<W;F++)V=(V<<5)-V+M.charCodeAt(F),V|=0;else if(j(M))for(W=M.byteLength/2,F=0;F<W;F++)V=(V<<5)-V+M[F],V|=0;return V},P=e.__addimage__.validateStringAsBase64=function(M){(M=M||"").toString().trim();var F=!0;return M.length===0&&(F=!1),M.length%4!=0&&(F=!1),/^[A-Za-z0-9+/]+$/.test(M.substr(0,M.length-2))===!1&&(F=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(M.substr(-2))===!1&&(F=!1),F},C=e.__addimage__.extractImageFromDataUrl=function(M){if(M==null||!(M=M.trim()).startsWith("data:"))return null;var F=M.indexOf(",");return F<0?null:M.substring(0,F).trim().endsWith("base64")?M.substring(F+1):null};e.__addimage__.isArrayBuffer=function(M){return M instanceof ArrayBuffer};var j=e.__addimage__.isArrayBufferView=function(M){return M instanceof Int8Array||M instanceof Uint8Array||M instanceof Uint8ClampedArray||M instanceof Int16Array||M instanceof Uint16Array||M instanceof Int32Array||M instanceof Uint32Array||M instanceof Float32Array||M instanceof Float64Array},L=e.__addimage__.binaryStringToUint8Array=function(M){for(var F=M.length,W=new Uint8Array(F),V=0;V<F;V++)W[V]=M.charCodeAt(V);return W},R=e.__addimage__.arrayBufferToBinaryString=function(M){for(var F="",W=j(M)?M:new Uint8Array(M),V=0;V<W.length;V+=8192)F+=String.fromCharCode.apply(null,W.subarray(V,V+8192));return F};e.addImage=function(){var M,F,W,V,X,Y,Z,K,se;if(typeof arguments[1]=="number"?(F=n,W=arguments[1],V=arguments[2],X=arguments[3],Y=arguments[4],Z=arguments[5],K=arguments[6],se=arguments[7]):(F=arguments[1],W=arguments[2],V=arguments[3],X=arguments[4],Y=arguments[5],Z=arguments[6],K=arguments[7],se=arguments[8]),lr(M=arguments[0])==="object"&&!g(M)&&"imageData"in M){var z=M;M=z.imageData,F=z.format||F||n,W=z.x||W||0,V=z.y||V||0,X=z.w||z.width||X,Y=z.h||z.height||Y,Z=z.alias||Z,K=z.compression||K,se=z.rotation||z.angle||se}var te=this.internal.getFilters();if(K===void 0&&te.indexOf("FlateEncode")!==-1&&(K="SLOW"),isNaN(W)||isNaN(V))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var $=D.call(this,M,F,Z,K);return x.call(this,W,V,X,Y,$,se),this};var D=function(M,F,W,V){var X,Y,Z;if(typeof M=="string"&&i(M)===n){M=unescape(M);var K=H(M,!1);(K!==""||(K=e.loadFile(M,!0))!==void 0)&&(M=K)}if(g(M)&&(M=m(M,F)),F=i(M,F),!h(F))throw new Error("addImage does not support files of type '"+F+"', please ensure that a plugin for '"+F+"' support is added.");if(((Z=W)==null||Z.length===0)&&(W=(function(se){return typeof se=="string"||j(se)?k(se):j(se.data)?k(se.data):null})(M)),(X=b.call(this,W))||(M instanceof Uint8Array||F==="RGBA"||(Y=M,M=L(M)),X=this["process"+F.toUpperCase()](M,f.call(this),W,(function(se){return se&&typeof se=="string"&&(se=se.toUpperCase()),se in e.image_compression?se:_.NONE})(V),Y)),!X)throw new Error("An unknown error occurred whilst processing the image.");return X},H=e.__addimage__.convertBase64ToBinaryString=function(M,F){F=typeof F!="boolean"||F;var W,V="";if(typeof M=="string"){var X;W=(X=C(M))!==null&&X!==void 0?X:M;try{V=Tb(W)}catch(Y){if(F)throw P(W)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+Y.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return V};e.getImageProperties=function(M){var F,W,V="";if(g(M)&&(M=m(M)),typeof M=="string"&&i(M)===n&&((V=H(M,!1))===""&&(V=e.loadFile(M)||""),M=V),W=i(M),!h(W))throw new Error("addImage does not support files of type '"+W+"', please ensure that a plugin for '"+W+"' support is added.");if(M instanceof Uint8Array||(M=L(M)),!(F=this["process"+W.toUpperCase()](M)))throw new Error("An unknown error occurred whilst processing the image");return F.fileType=W,F}})(It.API),(function(e){var t=function(n){if(n!==void 0&&n!="")return!0};It.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(n){for(var r,i,a,o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,l=this.internal.getPageInfoByObjId(n.objId),c=n.pageContext.annotations,f=!1,h=0;h<c.length&&!f;h++)switch((r=c[h]).type){case"link":(t(r.options.url)||t(r.options.pageNumber))&&(f=!0);break;case"reference":case"text":case"freetext":f=!0}if(f!=0){this.internal.write("/Annots [");for(var g=0;g<c.length;g++){r=c[g];var m=this.internal.pdfEscape,b=this.internal.getEncryptor(n.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var y=this.internal.newAdditionalObject(),x=this.internal.newAdditionalObject(),w=this.internal.getEncryptor(y.objId),_=r.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+o(r.bounds.x)+" "+s(r.bounds.y+r.bounds.h)+" "+o(r.bounds.x+r.bounds.w)+" "+s(r.bounds.y)+"] ")+"/Contents ("+m(w(r.contents))+")",a+=" /Popup "+x.objId+" 0 R",a+=" /P "+l.objId+" 0 R",a+=" /T ("+m(w(_))+") >>",y.content=a;var k=y.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+o(r.bounds.x+30)+" "+s(r.bounds.y+r.bounds.h)+" "+o(r.bounds.x+r.bounds.w+30)+" "+s(r.bounds.y)+"] ")+" /Parent "+k,r.open&&(a+=" /Open true"),a+=" >>",x.content=a,this.internal.write(y.objId,"0 R",x.objId,"0 R");break;case"freetext":i="/Rect ["+o(r.bounds.x)+" "+s(r.bounds.y)+" "+o(r.bounds.x+r.bounds.w)+" "+s(r.bounds.y+r.bounds.h)+"] ";var P=r.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+m(b(r.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+P+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(r.options.name){var C=this.annotations._nameMap[r.options.name];r.options.pageNumber=C.page,r.options.top=C.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",a="",r.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+m(b(r.options.url))+") >>";else if(r.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,a+=" /FitV "+r.options.left+"]";break;default:var j=s(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),a+=" /XYZ "+r.options.left+" "+j+" "+r.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),e.createAnnotation=function(n){var r=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":r.pageContext.annotations.push(n)}},e.link=function(n,r,i,a,o){var s=this.internal.getCurrentPageInfo(),l=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:l(n),y:c(r),w:l(n+i),h:c(r+a)},options:o,type:"link"})},e.textWithLink=function(n,r,i,a){var o,s,l=this.getTextWidth(n),c=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){s=a.maxWidth;var f=this.splitTextToSize(n,s).length;o=Math.ceil(c*f)}else s=l,o=c;return this.text(n,r,i,a),i+=.2*c,a.align==="center"&&(r-=l/2),a.align==="right"&&(r-=l),this.link(r,i-c,s,o,a),l},e.getTextWidth=function(n){var r=this.internal.getFontSize();return this.getStringUnitWidth(n)*r/this.internal.scaleFactor}})(It.API),(function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var a=e.__arabicParser__.isInArabicSubstitutionA=function(y){return t[y.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(y){return typeof y=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(y)},s=e.__arabicParser__.isArabicEndLetter=function(y){return o(y)&&a(y)&&t[y.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(y){return o(y)&&i.indexOf(y.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(y){return o(y)&&a(y)&&t[y.charCodeAt(0)].length>=1};var c=e.__arabicParser__.arabicLetterHasFinalForm=function(y){return o(y)&&a(y)&&t[y.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(y){return o(y)&&a(y)&&t[y.charCodeAt(0)].length>=3};var f=e.__arabicParser__.arabicLetterHasMedialForm=function(y){return o(y)&&a(y)&&t[y.charCodeAt(0)].length==4},h=e.__arabicParser__.resolveLigatures=function(y){var x=0,w=n,_="",k=0;for(x=0;x<y.length;x+=1)w[y.charCodeAt(x)]!==void 0?(k++,typeof(w=w[y.charCodeAt(x)])=="number"&&(_+=String.fromCharCode(w),w=n,k=0),x===y.length-1&&(w=n,_+=y.charAt(x-(k-1)),x-=k-1,k=0)):(w=n,_+=y.charAt(x-k),x-=k,k=0);return _};e.__arabicParser__.isArabicDiacritic=function(y){return y!==void 0&&r[y.charCodeAt(0)]!==void 0};var g=e.__arabicParser__.getCorrectForm=function(y,x,w){return o(y)?a(y)===!1?-1:!c(y)||!o(x)&&!o(w)||!o(w)&&s(x)||s(y)&&!o(x)||s(y)&&l(x)||s(y)&&s(x)?0:f(y)&&o(x)&&!s(x)&&o(w)&&c(w)?3:s(y)||!o(w)?1:2:-1},m=function(y){var x=0,w=0,_=0,k="",P="",C="",j=(y=y||"").split("\\s+"),L=[];for(x=0;x<j.length;x+=1){for(L.push(""),w=0;w<j[x].length;w+=1)k=j[x][w],P=j[x][w-1],C=j[x][w+1],o(k)?(_=g(k,P,C),L[x]+=_!==-1?String.fromCharCode(t[k.charCodeAt(0)][_]):k):L[x]+=k;L[x]=h(L[x])}return L.join(" ")},b=e.__arabicParser__.processArabic=e.processArabic=function(){var y,x=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,w=[];if(Array.isArray(x)){var _=0;for(w=[],_=0;_<x.length;_+=1)Array.isArray(x[_])?w.push([m(x[_][0]),x[_][1],x[_][2]]):w.push([m(x[_])]);y=w}else y=m(x);return typeof arguments[0]=="string"?y:(arguments[0].text=y,arguments[0])};e.events.push(["preProcessText",b])})(It.API),It.API.autoPrint=function(e){var t;return(e=e||{}).variant=e.variant||"non-conform",e.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(e){var t=function(){var n=void 0;Object.defineProperty(this,"pdf",{get:function(){return n},set:function(s){n=s}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(s){r=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(s){i=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(s){a=s}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(s){o=s}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(n,r){var i;if((n=n||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(It.API),(function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var l=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return l},set:function(y){l=y}});var c=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return c},set:function(y){c=y}});var f=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return f},set:function(y){f=y}});var h=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return h},set:function(y){h=y}});var g=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return g},set:function(y){g=y}});var m=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return m},set:function(y){m=y}});var b=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return b},set:function(y){b=y}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(l){return r.call(this),this.internal.__cell__.headerFunction=typeof l=="function"?l:void 0,this},e.getTextDimensions=function(l,c){r.call(this);var f=(c=c||{}).fontSize||this.getFontSize(),h=c.font||this.getFont(),g=c.scaleFactor||this.internal.scaleFactor,m=0,b=0,y=0,x=this;if(!Array.isArray(l)&&typeof l!="string"){if(typeof l!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");l=String(l)}var w=c.maxWidth;w>0?typeof l=="string"?l=this.splitTextToSize(l,w):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(k,P){return k.concat(x.splitTextToSize(P,w))},[])):l=Array.isArray(l)?l:[l];for(var _=0;_<l.length;_++)m<(y=this.getStringUnitWidth(l[_],{font:h})*f)&&(m=y);return m!==0&&(b=l.length),{w:m/=g,h:Math.max((b*f*this.getLineHeightFactor()-f*(this.getLineHeightFactor()-1))/g,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var l=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(l.left,l.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var l;l=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var c=this.internal.__cell__.lastCell,f=this.internal.__cell__.padding,h=this.internal.__cell__.margins||t,g=this.internal.__cell__.tableHeaderRow,m=this.internal.__cell__.printHeaders;return c.lineNumber!==void 0&&(c.lineNumber===l.lineNumber?(l.x=(c.x||0)+(c.width||0),l.y=c.y||0):c.y+c.height+l.height+h.bottom>this.getPageHeight()?(this.cellAddPage(),l.y=h.top,m&&g&&(this.printHeaderRow(l.lineNumber,!0),l.y+=g[0].height)):l.y=c.y+c.height||l.y),l.text[0]!==void 0&&(this.rect(l.x,l.y,l.width,l.height,n===!0?"FD":void 0),l.align==="right"?this.text(l.text,l.x+l.width-f,l.y+f,{align:"right",baseline:"top"}):l.align==="center"?this.text(l.text,l.x+l.width/2,l.y+f,{align:"center",baseline:"top",maxWidth:l.width-f-f}):this.text(l.text,l.x+f,l.y+f,{align:"left",baseline:"top",maxWidth:l.width-f-f})),this.internal.__cell__.lastCell=l,this};e.table=function(l,c,f,h,g){if(r.call(this),!f)throw new Error("No data for PDF table.");var m,b,y,x,w=[],_=[],k=[],P={},C={},j=[],L=[],R=(g=g||{}).autoSize||!1,D=g.printHeaders!==!1,H=g.css&&g.css["font-size"]!==void 0?16*g.css["font-size"]:g.fontSize||12,M=g.margins||Object.assign({width:this.getPageWidth()},t),F=typeof g.padding=="number"?g.padding:3,W=g.headerBackgroundColor||"#c8c8c8",V=g.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=D,this.internal.__cell__.margins=M,this.internal.__cell__.table_font_size=H,this.internal.__cell__.padding=F,this.internal.__cell__.headerBackgroundColor=W,this.internal.__cell__.headerTextColor=V,this.setFontSize(H),h==null)_=w=Object.keys(f[0]),k=w.map(function(){return"left"});else if(Array.isArray(h)&&lr(h[0])==="object")for(w=h.map(function(z){return z.name}),_=h.map(function(z){return z.prompt||z.name||""}),k=h.map(function(z){return z.align||"left"}),m=0;m<h.length;m+=1)C[h[m].name]=.7499990551181103*h[m].width;else Array.isArray(h)&&typeof h[0]=="string"&&(_=w=h,k=w.map(function(){return"left"}));if(R||Array.isArray(h)&&typeof h[0]=="string")for(m=0;m<w.length;m+=1){for(P[x=w[m]]=f.map(function(z){return z[x]}),this.setFont(void 0,"bold"),j.push(this.getTextDimensions(_[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),b=P[x],this.setFont(void 0,"normal"),y=0;y<b.length;y+=1)j.push(this.getTextDimensions(b[y],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);C[x]=Math.max.apply(null,j)+F+F,j=[]}if(D){var X={};for(m=0;m<w.length;m+=1)X[w[m]]={},X[w[m]].text=_[m],X[w[m]].align=k[m];var Y=s.call(this,X,C);L=w.map(function(z){return new a(l,c,C[z],Y,X[z].text,void 0,X[z].align)}),this.setTableHeaderRow(L),this.printHeaderRow(1,!1)}var Z=h.reduce(function(z,te){return z[te.name]=te.align,z},{});for(m=0;m<f.length;m+=1){"rowStart"in g&&g.rowStart instanceof Function&&g.rowStart({row:m,data:f[m]},this);var K=s.call(this,f[m],C);for(y=0;y<w.length;y+=1){var se=f[m][w[y]];"cellStart"in g&&g.cellStart instanceof Function&&g.cellStart({row:m,col:y,data:se},this),o.call(this,new a(l,c,C[w[y]],K,se,m+2,Z[w[y]]))}}return this.internal.__cell__.table_x=l,this.internal.__cell__.table_y=c,this};var s=function(l,c){var f=this.internal.__cell__.padding,h=this.internal.__cell__.table_font_size,g=this.internal.scaleFactor;return Object.keys(l).map(function(m){var b=l[m];return this.splitTextToSize(b.hasOwnProperty("text")?b.text:b,c[m]-f-f)},this).map(function(m){return this.getLineHeightFactor()*m.length*h/g+f+f},this).reduce(function(m,b){return Math.max(m,b)},0)};e.setTableHeaderRow=function(l){r.call(this),this.internal.__cell__.tableHeaderRow=l},e.printHeaderRow=function(l,c){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var f;if(n=!0,typeof this.internal.__cell__.headerFunction=="function"){var h=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(h[0],h[1],h[2],h[3],void 0,-1)}this.setFont(void 0,"bold");for(var g=[],m=0;m<this.internal.__cell__.tableHeaderRow.length;m+=1){f=this.internal.__cell__.tableHeaderRow[m].clone(),c&&(f.y=this.internal.__cell__.margins.top||0,g.push(f)),f.lineNumber=l;var b=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,f),this.setTextColor(b)}g.length>0&&this.setTableHeaderRow(g),this.setFont(void 0,"normal"),n=!1}})(It.API);var zZ={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},VZ=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],fE=UZ(VZ),WZ=[100,200,300,400,500,600,700,800,900],lBe=UZ(WZ);function oj(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),n=(function(a){return zZ[a=a||"normal"]?a:"normal"})(e.style),r=(function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400})(e.weight),i=(function(a){return typeof fE[a=a||"normal"]=="number"?a:"normal"})(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(" ")}}}function zq(e,t,n,r){var i;for(i=n;i>=0&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var cBe={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Vq={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Wq(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function Hq(e){return e.trimLeft()}function uBe(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function fBe(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var Nm,ob,Yq,Gq,Kq,sj=["times"];function Xq(e,t,n,r,i){var a=4,o=Jq;switch(i){case It.API.image_compression.FAST:a=1,o=Qq;break;case It.API.image_compression.MEDIUM:a=6,o=Zq;break;case It.API.image_compression.SLOW:a=9,o=eU}e=(function(l,c,f,h){for(var g,m=l.length/c,b=new Uint8Array(l.length+m),y=[dBe,Qq,Jq,Zq,eU],x=0;x<m;x+=1){var w=x*c,_=l.subarray(w,w+c);if(h)b.set(h(_,f,g),w+x);else{for(var k=y.length,P=[],C=0;C<k;C+=1)P[C]=y[C](_,f,g);var j=pBe(P.concat());b.set(P[j],w+x)}g=_}return b})(e,t,Math.ceil(n*r/8),o);var s=iE(e,{level:a});return It.API.__addimage__.arrayBufferToBinaryString(s)}function dBe(e){var t=Array.apply([],e);return t.unshift(0),t}function Qq(e,t){var n=e.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var a=e[i-t]||0;r[i+1]=e[i]-a+256&255}return r}function Jq(e,t,n){var r=e.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var o=n&&n[a]||0;i[a+1]=e[a]-o+256&255}return i}function Zq(e,t,n){var r=e.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var o=e[a-t]||0,s=n&&n[a]||0;i[a+1]=e[a]+256-(o+s>>>1)&255}return i}function eU(e,t,n){var r=e.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var o=hBe(e[a-t]||0,n&&n[a]||0,n&&n[a-t]||0);i[a+1]=e[a]-o+256&255}return i}function hBe(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),a=Math.abs(e+t-n-n);return r<=i&&r<=a?e:i<=a?t:n}function pBe(e){var t=e.map(function(n){return n.reduce(function(r,i){return r+Math.abs(i)},0)});return t.indexOf(Math.min.apply(null,t))}function lj(e,t,n){var r=t*n,i=Math.floor(r/8),a=16-(r-8*i+n),o=(1<<n)-1;return HZ(e,i)>>a&o}function tU(e,t,n,r){var i=n*r,a=Math.floor(i/8),o=16-(i-8*a+r),s=(1<<r)-1,l=(t&s)<<o;(function(c,f,h){if(f+1<c.byteLength)c.setUint16(f,h,!1);else{var g=h>>8&255;c.setUint8(f,g)}})(e,a,HZ(e,a)&~(s<<o)&65535|l)}function HZ(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function mBe(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],a=i>>7,o=1<<1+(7&i);e[t++],e[t++];var s=null,l=null;a&&(s=t,l=o,t+=3*o);var c=!0,f=[],h=0,g=null,m=0,b=null;for(this.width=n,this.height=r;c&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,b=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((M=e[t++])>=0))throw Error("Invalid block size");if(M===0)break;t+=M}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var y=e[t++];h=e[t++]|e[t++]<<8,g=e[t++],1&y||(g=null),m=y>>2&7,t++;break;case 254:for(;;){if(!((M=e[t++])>=0))throw Error("Invalid block size");if(M===0)break;t+=M}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var x=e[t++]|e[t++]<<8,w=e[t++]|e[t++]<<8,_=e[t++]|e[t++]<<8,k=e[t++]|e[t++]<<8,P=e[t++],C=P>>6&1,j=1<<1+(7&P),L=s,R=l,D=!1;P>>7&&(D=!0,L=t,R=j,t+=3*j);var H=t;for(t++;;){var M;if(!((M=e[t++])>=0))throw Error("Invalid block size");if(M===0)break;t+=M}f.push({x,y:w,width:_,height:k,has_local_palette:D,palette_offset:L,palette_size:R,data_offset:H,data_length:t-H,transparent_index:g,interlaced:!!C,delay:h,disposal:m});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return b},this.frameInfo=function(F){if(F<0||F>=f.length)throw new Error("Frame index out of range.");return f[F]},this.decodeAndBlitFrameBGRA=function(F,W){var V=this.frameInfo(F),X=V.width*V.height;if(X>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var Y=new Uint8Array(X);nU(e,V.data_offset,Y,X);var Z=V.palette_offset,K=V.transparent_index;K===null&&(K=256);var se=V.width,z=n-se,te=se,$=4*(V.y*n+V.x),q=4*((V.y+V.height)*n+V.x),re=$,le=4*z;V.interlaced===!0&&(le+=4*n*7);for(var de=8,pe=0,ve=Y.length;pe<ve;++pe){var he=Y[pe];if(te===0&&(te=se,(re+=le)>=q&&(le=4*z+4*n*(de-1),re=$+(se+z)*(de<<1),de>>=1)),he===K)re+=4;else{var xe=e[Z+3*he],Pe=e[Z+3*he+1],Se=e[Z+3*he+2];W[re++]=Se,W[re++]=Pe,W[re++]=xe,W[re++]=255}--te}},this.decodeAndBlitFrameRGBA=function(F,W){var V=this.frameInfo(F),X=V.width*V.height;if(X>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var Y=new Uint8Array(X);nU(e,V.data_offset,Y,X);var Z=V.palette_offset,K=V.transparent_index;K===null&&(K=256);var se=V.width,z=n-se,te=se,$=4*(V.y*n+V.x),q=4*((V.y+V.height)*n+V.x),re=$,le=4*z;V.interlaced===!0&&(le+=4*n*7);for(var de=8,pe=0,ve=Y.length;pe<ve;++pe){var he=Y[pe];if(te===0&&(te=se,(re+=le)>=q&&(le=4*z+4*n*(de-1),re=$+(se+z)*(de<<1),de>>=1)),he===K)re+=4;else{var xe=e[Z+3*he],Pe=e[Z+3*he+1],Se=e[Z+3*he+2];W[re++]=xe,W[re++]=Pe,W[re++]=Se,W[re++]=255}--te}}}function nU(e,t,n,r){for(var i=e[t++],a=1<<i,o=a+1,s=o+1,l=i+1,c=(1<<l)-1,f=0,h=0,g=0,m=e[t++],b=new Int32Array(4096),y=null;;){for(;f<16&&m!==0;)h|=e[t++]<<f,f+=8,m===1?m=e[t++]:--m;if(f<l)break;var x=h&c;if(h>>=l,f-=l,x!==a){if(x===o)break;for(var w=x<s?x:y,_=0,k=w;k>a;)k=b[k]>>8,++_;var P=k;if(g+_+(w!==x?1:0)>r)return void gr.log("Warning, gif stream longer than expected.");n[g++]=P;var C=g+=_;for(w!==x&&(n[g++]=P),k=w;_--;)k=b[k],n[--C]=255&k,k>>=8;y!==null&&s<4096&&(b[s++]=y<<8|P,s>=c+1&&l<12&&(++l,c=c<<1|1)),y=x}else s=o+1,c=(1<<(l=i+1))-1,y=null}return g!==r&&gr.log("Warning, gif stream shorter than expected."),n}/**
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function cj(e){var t,n,r,i,a,o=Math.floor,s=new Array(64),l=new Array(64),c=new Array(64),f=new Array(64),h=new Array(65535),g=new Array(65535),m=new Array(64),b=new Array(64),y=[],x=0,w=7,_=new Array(64),k=new Array(64),P=new Array(64),C=new Array(256),j=new Array(2048),L=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],R=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],D=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],M=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],F=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],X=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function Y($,q){for(var re=0,le=0,de=new Array,pe=1;pe<=16;pe++){for(var ve=1;ve<=$[pe];ve++)de[q[le]]=[],de[q[le]][0]=re,de[q[le]][1]=pe,le++,re++;re*=2}return de}function Z($){for(var q=$[0],re=$[1]-1;re>=0;)q&1<<re&&(x|=1<<w),re--,--w<0&&(x==255?(K(255),K(0)):K(x),w=7,x=0)}function K($){y.push($)}function se($){K($>>8&255),K(255&$)}function z($,q,re,le,de){for(var pe,ve=de[0],he=de[240],xe=(function(ze,St){var st,xt,Ct,bn,sn,Ee,Ve,at,Ze,lt,ct=0;for(Ze=0;Ze<8;++Ze){st=ze[ct],xt=ze[ct+1],Ct=ze[ct+2],bn=ze[ct+3],sn=ze[ct+4],Ee=ze[ct+5],Ve=ze[ct+6];var Wn=st+(at=ze[ct+7]),nn=st-at,Gt=xt+Ve,Qt=xt-Ve,un=Ct+Ee,kt=Ct-Ee,gn=bn+sn,Bt=bn-sn,Jt=Wn+gn,Hn=Wn-gn,an=Gt+un,$t=Gt-un;ze[ct]=Jt+an,ze[ct+4]=Jt-an;var Rn=.707106781*($t+Hn);ze[ct+2]=Hn+Rn,ze[ct+6]=Hn-Rn;var ql=.382683433*((Jt=Bt+kt)-($t=Qt+nn)),Ri=.5411961*Jt+ql,ps=1.306562965*$t+ql,lo=.707106781*(an=kt+Qt),qt=nn+lo,Wa=nn-lo;ze[ct+5]=Wa+Ri,ze[ct+3]=Wa-Ri,ze[ct+1]=qt+ps,ze[ct+7]=qt-ps,ct+=8}for(ct=0,Ze=0;Ze<8;++Ze){st=ze[ct],xt=ze[ct+8],Ct=ze[ct+16],bn=ze[ct+24],sn=ze[ct+32],Ee=ze[ct+40],Ve=ze[ct+48];var Fo=st+(at=ze[ct+56]),Qi=st-at,co=xt+Ve,cr=xt-Ve,Vr=Ct+Ee,Zr=Ct-Ee,Js=bn+sn,Ul=bn-sn,Bo=Fo+Js,ms=Fo-Js,Ii=co+Vr,uo=co-Vr;ze[ct]=Bo+Ii,ze[ct+32]=Bo-Ii;var Ha=.707106781*(uo+ms);ze[ct+16]=ms+Ha,ze[ct+48]=ms-Ha;var qc=.382683433*((Bo=Ul+Zr)-(uo=cr+Qi)),$o=.5411961*Bo+qc,zl=1.306562965*uo+qc,Uc=.707106781*(Ii=Zr+cr),zc=Qi+Uc,lf=Qi-Uc;ze[ct+40]=lf+$o,ze[ct+24]=lf-$o,ze[ct+8]=zc+zl,ze[ct+56]=zc-zl,ct++}for(Ze=0;Ze<64;++Ze)lt=ze[Ze]*St[Ze],m[Ze]=lt>0?lt+.5|0:lt-.5|0;return m})($,q),Pe=0;Pe<64;++Pe)b[L[Pe]]=xe[Pe];var Se=b[0]-re;re=b[0],Se==0?Z(le[0]):(Z(le[g[pe=32767+Se]]),Z(h[pe]));for(var Ue=63;Ue>0&&b[Ue]==0;)Ue--;if(Ue==0)return Z(ve),re;for(var Ye,oe=1;oe<=Ue;){for(var Ke=oe;b[oe]==0&&oe<=Ue;)++oe;var ht=oe-Ke;if(ht>=16){Ye=ht>>4;for(var gt=1;gt<=Ye;++gt)Z(he);ht&=15}pe=32767+b[oe],Z(de[(ht<<4)+g[pe]]),Z(h[pe]),oe++}return Ue!=63&&Z(ve),re}function te($){$=Math.min(Math.max($,1),100),a!=$&&((function(q){for(var re=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],le=0;le<64;le++){var de=o((re[le]*q+50)/100);de=Math.min(Math.max(de,1),255),s[L[le]]=de}for(var pe=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ve=0;ve<64;ve++){var he=o((pe[ve]*q+50)/100);he=Math.min(Math.max(he,1),255),l[L[ve]]=he}for(var xe=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Pe=0,Se=0;Se<8;Se++)for(var Ue=0;Ue<8;Ue++)c[Pe]=1/(s[L[Pe]]*xe[Se]*xe[Ue]*8),f[Pe]=1/(l[L[Pe]]*xe[Se]*xe[Ue]*8),Pe++})($<50?Math.floor(5e3/$):Math.floor(200-2*$)),a=$)}this.encode=function($,q){q&&te(q),y=new Array,x=0,w=7,se(65496),se(65504),se(16),K(74),K(70),K(73),K(70),K(0),K(1),K(1),K(0),se(1),se(1),K(0),K(0),(function(){se(65499),se(132),K(0);for(var xt=0;xt<64;xt++)K(s[xt]);K(1);for(var Ct=0;Ct<64;Ct++)K(l[Ct])})(),(function(xt,Ct){se(65472),se(17),K(8),se(Ct),se(xt),K(3),K(1),K(17),K(0),K(2),K(17),K(1),K(3),K(17),K(1)})($.width,$.height),(function(){se(65476),se(418),K(0);for(var xt=0;xt<16;xt++)K(R[xt+1]);for(var Ct=0;Ct<=11;Ct++)K(D[Ct]);K(16);for(var bn=0;bn<16;bn++)K(H[bn+1]);for(var sn=0;sn<=161;sn++)K(M[sn]);K(1);for(var Ee=0;Ee<16;Ee++)K(F[Ee+1]);for(var Ve=0;Ve<=11;Ve++)K(W[Ve]);K(17);for(var at=0;at<16;at++)K(V[at+1]);for(var Ze=0;Ze<=161;Ze++)K(X[Ze])})(),se(65498),se(12),K(3),K(1),K(0),K(2),K(17),K(3),K(17),K(0),K(63),K(0);var re=0,le=0,de=0;x=0,w=7,this.encode.displayName="_encode_";for(var pe,ve,he,xe,Pe,Se,Ue,Ye,oe,Ke=$.data,ht=$.width,gt=$.height,ze=4*ht,St=0;St<gt;){for(pe=0;pe<ze;){for(Pe=ze*St+pe,Ue=-1,Ye=0,oe=0;oe<64;oe++)Se=Pe+(Ye=oe>>3)*ze+(Ue=4*(7&oe)),St+Ye>=gt&&(Se-=ze*(St+1+Ye-gt)),pe+Ue>=ze&&(Se-=pe+Ue-ze+4),ve=Ke[Se++],he=Ke[Se++],xe=Ke[Se++],_[oe]=(j[ve]+j[he+256|0]+j[xe+512|0]>>16)-128,k[oe]=(j[ve+768|0]+j[he+1024|0]+j[xe+1280|0]>>16)-128,P[oe]=(j[ve+1280|0]+j[he+1536|0]+j[xe+1792|0]>>16)-128;re=z(_,c,re,t,r),le=z(k,f,le,n,i),de=z(P,f,de,n,i),pe+=32}St+=8}if(w>=0){var st=[];st[1]=w+1,st[0]=(1<<w+1)-1,Z(st)}return se(65497),new Uint8Array(y)},e=e||50,(function(){for(var $=String.fromCharCode,q=0;q<256;q++)C[q]=$(q)})(),t=Y(R,D),n=Y(F,W),r=Y(H,M),i=Y(V,X),(function(){for(var $=1,q=2,re=1;re<=15;re++){for(var le=$;le<q;le++)g[32767+le]=re,h[32767+le]=[],h[32767+le][1]=re,h[32767+le][0]=le;for(var de=-(q-1);de<=-$;de++)g[32767+de]=re,h[32767+de]=[],h[32767+de][1]=re,h[32767+de][0]=q-1+de;$<<=1,q<<=1}})(),(function(){for(var $=0;$<256;$++)j[$]=19595*$,j[$+256|0]=38470*$,j[$+512|0]=7471*$+32768,j[$+768|0]=-11059*$,j[$+1024|0]=-21709*$,j[$+1280|0]=32768*$+8421375,j[$+1536|0]=-27439*$,j[$+1792|0]=-5329*$})(),te(e)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function vl(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function rU(e){function t(D){if(!D)throw Error("assert :P")}function n(D,H,M){for(var F=0;4>F;F++)if(D[H+F]!=M.charCodeAt(F))return!0;return!1}function r(D,H,M,F,W){for(var V=0;V<W;V++)D[H+V]=M[F+V]}function i(D,H,M,F){for(var W=0;W<F;W++)D[H+W]=M}function a(D){return new Int32Array(D)}function o(D,H){for(var M=[],F=0;F<D;F++)M.push(new H);return M}function s(D,H){var M=[];return(function F(W,V,X){for(var Y=X[V],Z=0;Z<Y&&(W.push(X.length>V+1?[]:new H),!(X.length<V+1));Z++)F(W[Z],V+1,X)})(M,0,D),M}var l=function(){var D=this;function H(S,A){for(var I=1<<A-1>>>0;S&I;)I>>>=1;return I?(S&I-1)+I:S}function M(S,A,I,U,G){t(!(U%I));do S[A+(U-=I)]=G;while(0<U)}function F(S,A,I,U,G){if(t(2328>=G),512>=G)var ee=a(512);else if((ee=a(G))==null)return 0;return(function(ne,ie,ae,ce,be,Ce){var ue,Ne,je=ie,Fe=1<<ae,Te=a(16),Ie=a(16);for(t(be!=0),t(ce!=null),t(ne!=null),t(0<ae),Ne=0;Ne<be;++Ne){if(15<ce[Ne])return 0;++Te[ce[Ne]]}if(Te[0]==be)return 0;for(Ie[1]=0,ue=1;15>ue;++ue){if(Te[ue]>1<<ue)return 0;Ie[ue+1]=Ie[ue]+Te[ue]}for(Ne=0;Ne<be;++Ne)ue=ce[Ne],0<ce[Ne]&&(Ce[Ie[ue]++]=Ne);if(Ie[15]==1)return(ce=new W).g=0,ce.value=Ce[0],M(ne,je,1,Fe,ce),Fe;var De,qe=-1,We=Fe-1,Lt=0,pt=1,on=1,Nt=1<<ae;for(Ne=0,ue=1,be=2;ue<=ae;++ue,be<<=1){if(pt+=on<<=1,0>(on-=Te[ue]))return 0;for(;0<Te[ue];--Te[ue])(ce=new W).g=ue,ce.value=Ce[Ne++],M(ne,je+Lt,be,Nt,ce),Lt=H(Lt,ue)}for(ue=ae+1,be=2;15>=ue;++ue,be<<=1){if(pt+=on<<=1,0>(on-=Te[ue]))return 0;for(;0<Te[ue];--Te[ue]){if(ce=new W,(Lt&We)!=qe){for(je+=Nt,De=1<<(qe=ue)-ae;15>qe&&!(0>=(De-=Te[qe]));)++qe,De<<=1;Fe+=Nt=1<<(De=qe-ae),ne[ie+(qe=Lt&We)].g=De+ae,ne[ie+qe].value=je-ie-qe}ce.g=ue-ae,ce.value=Ce[Ne++],M(ne,je+(Lt>>ae),be,Nt,ce),Lt=H(Lt,ue)}}return pt!=2*Ie[15]-1?0:Fe})(S,A,I,U,G,ee)}function W(){this.value=this.g=0}function V(){this.value=this.g=0}function X(){this.G=o(5,W),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(vo,V)}function Y(S,A,I,U){t(S!=null),t(A!=null),t(2147483648>U),S.Ca=254,S.I=0,S.b=-8,S.Ka=0,S.oa=A,S.pa=I,S.Jd=A,S.Yc=I+U,S.Zc=4<=U?I+U-4+1:I,ve(S)}function Z(S,A){for(var I=0;0<A--;)I|=xe(S,128)<<A;return I}function K(S,A){var I=Z(S,A);return he(S)?-I:I}function se(S,A,I,U){var G,ee=0;for(t(S!=null),t(A!=null),t(4294967288>U),S.Sb=U,S.Ra=0,S.u=0,S.h=0,4<U&&(U=4),G=0;G<U;++G)ee+=A[I+G]<<8*G;S.Ra=ee,S.bb=U,S.oa=A,S.pa=I}function z(S){for(;8<=S.u&&S.bb<S.Sb;)S.Ra>>>=8,S.Ra+=S.oa[S.pa+S.bb]<<Ql-8>>>0,++S.bb,S.u-=8;le(S)&&(S.h=1,S.u=0)}function te(S,A){if(t(0<=A),!S.h&&A<=Za){var I=re(S)&Ja[A];return S.u+=A,z(S),I}return S.h=1,S.u=0}function $(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function q(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function re(S){return S.Ra>>>(S.u&Ql-1)>>>0}function le(S){return t(S.bb<=S.Sb),S.h||S.bb==S.Sb&&S.u>Ql}function de(S,A){S.u=A,S.h=le(S)}function pe(S){S.u>=Ss&&(t(S.u>=Ss),z(S))}function ve(S){t(S!=null&&S.oa!=null),S.pa<S.Zc?(S.I=(S.oa[S.pa++]|S.I<<8)>>>0,S.b+=8):(t(S!=null&&S.oa!=null),S.pa<S.Yc?(S.b+=8,S.I=S.oa[S.pa++]|S.I<<8):S.Ka?S.b=0:(S.I<<=8,S.b+=8,S.Ka=1))}function he(S){return Z(S,1)}function xe(S,A){var I=S.Ca;0>S.b&&ve(S);var U=S.b,G=I*A>>>8,ee=(S.I>>>U>G)+0;for(ee?(I-=G,S.I-=G+1<<U>>>0):I=G+1,U=I,G=0;256<=U;)G+=8,U>>=8;return U=7^G+il[U],S.b-=U,S.Ca=(I<<U)-1,ee}function Pe(S,A,I){S[A+0]=I>>24&255,S[A+1]=I>>16&255,S[A+2]=I>>8&255,S[A+3]=255&I}function Se(S,A){return S[A+0]|S[A+1]<<8}function Ue(S,A){return Se(S,A)|S[A+2]<<16}function Ye(S,A){return Se(S,A)|Se(S,A+2)<<16}function oe(S,A){var I=1<<A;return t(S!=null),t(0<A),S.X=a(I),S.X==null?0:(S.Mb=32-A,S.Xa=A,1)}function Ke(S,A){t(S!=null),t(A!=null),t(S.Xa==A.Xa),r(A.X,0,S.X,0,1<<A.Xa)}function ht(){this.X=[],this.Xa=this.Mb=0}function gt(S,A,I,U){t(I!=null),t(U!=null);var G=I[0],ee=U[0];return G==0&&(G=(S*ee+A/2)/A),ee==0&&(ee=(A*G+S/2)/S),0>=G||0>=ee?0:(I[0]=G,U[0]=ee,1)}function ze(S,A){return S+(1<<A)-1>>>A}function St(S,A){return((4278255360&S)+(4278255360&A)>>>0&4278255360)+((16711935&S)+(16711935&A)>>>0&16711935)>>>0}function st(S,A){D[A]=function(I,U,G,ee,ne,ie,ae){var ce;for(ce=0;ce<ne;++ce){var be=D[S](ie[ae+ce-1],G,ee+ce);ie[ae+ce]=St(I[U+ce],be)}}}function xt(){this.ud=this.hd=this.jd=0}function Ct(S,A){return((4278124286&(S^A))>>>1)+(S&A)>>>0}function bn(S){return 0<=S&&256>S?S:0>S?0:255<S?255:void 0}function sn(S,A){return bn(S+(S-A+.5>>1))}function Ee(S,A,I){return Math.abs(A-I)-Math.abs(S-I)}function Ve(S,A,I,U,G,ee,ne){for(U=ee[ne-1],I=0;I<G;++I)ee[ne+I]=U=St(S[A+I],U)}function at(S,A,I,U,G){var ee;for(ee=0;ee<I;++ee){var ne=S[A+ee],ie=ne>>8&255,ae=16711935&(ae=(ae=16711935&ne)+((ie<<16)+ie));U[G+ee]=(4278255360&ne)+ae>>>0}}function Ze(S,A){A.jd=255&S,A.hd=S>>8&255,A.ud=S>>16&255}function lt(S,A,I,U,G,ee){var ne;for(ne=0;ne<U;++ne){var ie=A[I+ne],ae=ie>>>8,ce=ie,be=255&(be=(be=ie>>>16)+((S.jd<<24>>24)*(ae<<24>>24)>>>5));ce=255&(ce=(ce+=(S.hd<<24>>24)*(ae<<24>>24)>>>5)+((S.ud<<24>>24)*(be<<24>>24)>>>5)),G[ee+ne]=(4278255360&ie)+(be<<16)+ce}}function ct(S,A,I,U,G){D[A]=function(ee,ne,ie,ae,ce,be,Ce,ue,Ne){for(ae=Ce;ae<ue;++ae)for(Ce=0;Ce<Ne;++Ce)ce[be++]=G(ie[U(ee[ne++])])},D[S]=function(ee,ne,ie,ae,ce,be,Ce){var ue=8>>ee.b,Ne=ee.Ea,je=ee.K[0],Fe=ee.w;if(8>ue)for(ee=(1<<ee.b)-1,Fe=(1<<ue)-1;ne<ie;++ne){var Te,Ie=0;for(Te=0;Te<Ne;++Te)Te&ee||(Ie=U(ae[ce++])),be[Ce++]=G(je[Ie&Fe]),Ie>>=ue}else D["VP8LMapColor"+I](ae,ce,je,Fe,be,Ce,ne,ie,Ne)}}function Wn(S,A,I,U,G){for(I=A+I;A<I;){var ee=S[A++];U[G++]=ee>>16&255,U[G++]=ee>>8&255,U[G++]=255&ee}}function nn(S,A,I,U,G){for(I=A+I;A<I;){var ee=S[A++];U[G++]=ee>>16&255,U[G++]=ee>>8&255,U[G++]=255&ee,U[G++]=ee>>24&255}}function Gt(S,A,I,U,G){for(I=A+I;A<I;){var ee=(ne=S[A++])>>16&240|ne>>12&15,ne=240&ne|ne>>28&15;U[G++]=ee,U[G++]=ne}}function Qt(S,A,I,U,G){for(I=A+I;A<I;){var ee=(ne=S[A++])>>16&248|ne>>13&7,ne=ne>>5&224|ne>>3&31;U[G++]=ee,U[G++]=ne}}function un(S,A,I,U,G){for(I=A+I;A<I;){var ee=S[A++];U[G++]=255&ee,U[G++]=ee>>8&255,U[G++]=ee>>16&255}}function kt(S,A,I,U,G,ee){if(ee==0)for(I=A+I;A<I;)Pe(U,((ee=S[A++])[0]>>24|ee[1]>>8&65280|ee[2]<<8&16711680|ee[3]<<24)>>>0),G+=32;else r(U,G,S,A,I)}function gn(S,A){D[A][0]=D[S+"0"],D[A][1]=D[S+"1"],D[A][2]=D[S+"2"],D[A][3]=D[S+"3"],D[A][4]=D[S+"4"],D[A][5]=D[S+"5"],D[A][6]=D[S+"6"],D[A][7]=D[S+"7"],D[A][8]=D[S+"8"],D[A][9]=D[S+"9"],D[A][10]=D[S+"10"],D[A][11]=D[S+"11"],D[A][12]=D[S+"12"],D[A][13]=D[S+"13"],D[A][14]=D[S+"0"],D[A][15]=D[S+"0"]}function Bt(S){return S==Pf||S==du||S==ih||S==ah}function Jt(){this.eb=[],this.size=this.A=this.fb=0}function Hn(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function an(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Jt,this.f.kb=new Hn,this.sd=null}function $t(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Rn(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ql(S){return alert("todo:WebPSamplerProcessPlane"),S.T}function Ri(S,A){var I=S.T,U=A.ba.f.RGBA,G=U.eb,ee=U.fb+S.ka*U.A,ne=Na[A.ba.S],ie=S.y,ae=S.O,ce=S.f,be=S.N,Ce=S.ea,ue=S.W,Ne=A.cc,je=A.dc,Fe=A.Mc,Te=A.Nc,Ie=S.ka,De=S.ka+S.T,qe=S.U,We=qe+1>>1;for(Ie==0?ne(ie,ae,null,null,ce,be,Ce,ue,ce,be,Ce,ue,G,ee,null,null,qe):(ne(A.ec,A.fc,ie,ae,Ne,je,Fe,Te,ce,be,Ce,ue,G,ee-U.A,G,ee,qe),++I);Ie+2<De;Ie+=2)Ne=ce,je=be,Fe=Ce,Te=ue,be+=S.Rc,ue+=S.Rc,ee+=2*U.A,ne(ie,(ae+=2*S.fa)-S.fa,ie,ae,Ne,je,Fe,Te,ce,be,Ce,ue,G,ee-U.A,G,ee,qe);return ae+=S.fa,S.j+De<S.o?(r(A.ec,A.fc,ie,ae,qe),r(A.cc,A.dc,ce,be,We),r(A.Mc,A.Nc,Ce,ue,We),I--):1&De||ne(ie,ae,null,null,ce,be,Ce,ue,ce,be,Ce,ue,G,ee+U.A,null,null,qe),I}function ps(S,A,I){var U=S.F,G=[S.J];if(U!=null){var ee=S.U,ne=A.ba.S,ie=ne==rh||ne==ih;A=A.ba.f.RGBA;var ae=[0],ce=S.ka;ae[0]=S.T,S.Kb&&(ce==0?--ae[0]:(--ce,G[0]-=S.width),S.j+S.ka+S.T==S.o&&(ae[0]=S.o-S.j-ce));var be=A.eb;ce=A.fb+ce*A.A,S=th(U,G[0],S.width,ee,ae,be,ce+(ie?0:3),A.A),t(I==ae),S&&Bt(ne)&&fu(be,ce,ie,ee,ae,A.A)}return 0}function lo(S){var A=S.ma,I=A.ba.S,U=11>I,G=I==tc||I==nh||I==rh||I==nr||I==12||Bt(I);if(A.memory=null,A.Ib=null,A.Jb=null,A.Nd=null,!bf(A.Oa,S,G?11:12))return 0;if(G&&Bt(I)&&tu(),S.da)alert("todo:use_scaling");else{if(U){if(A.Ib=ql,S.Kb){if(I=S.U+1>>1,A.memory=a(S.U+2*I),A.memory==null)return 0;A.ec=A.memory,A.fc=0,A.cc=A.ec,A.dc=A.fc+S.U,A.Mc=A.cc,A.Nc=A.dc+I,A.Ib=Ri,tu()}}else alert("todo:EmitYUV");G&&(A.Jb=ps,U&&zo())}if(U&&!Bi){for(S=0;256>S;++S)ka[S]=89858*(S-128)+Yo>>ll,Aa[S]=-22014*(S-128)+Yo,Of[S]=-45773*(S-128),gu[S]=113618*(S-128)+Yo>>ll;for(S=Yn;S<Qn;++S)A=76283*(S-16)+Yo>>ll,Kp[S-Yn]=ei(A,255),D1[S-Yn]=ei(A+8>>4,15);Bi=1}return 1}function qt(S){var A=S.ma,I=S.U,U=S.T;return t(!(1&S.ka)),0>=I||0>=U?0:(I=A.Ib(S,A),A.Jb!=null&&A.Jb(S,A,I),A.Dc+=I,1)}function Wa(S){S.ma.memory=null}function Fo(S,A,I,U){return te(S,8)!=47?0:(A[0]=te(S,14)+1,I[0]=te(S,14)+1,U[0]=te(S,1),te(S,3)!=0?0:!S.h)}function Qi(S,A){if(4>S)return S+1;var I=S-2>>1;return(2+(1&S)<<I)+te(A,I)+1}function co(S,A){return 120<A?A-120:1<=(I=((I=Y5[A-1])>>4)*S+(8-(15&I)))?I:1;var I}function cr(S,A,I){var U=re(I),G=S[A+=255&U].g-8;return 0<G&&(de(I,I.u+8),U=re(I),A+=S[A].value,A+=U&(1<<G)-1),de(I,I.u+S[A].g),S[A].value}function Vr(S,A,I){return I.g+=S.g,I.value+=S.value<<A>>>0,t(8>=I.g),S.g}function Zr(S,A,I){var U=S.xc;return t((A=U==0?0:S.vc[S.md*(I>>U)+(A>>U)])<S.Wb),S.Ya[A]}function Js(S,A,I,U){var G=S.ab,ee=S.c*A,ne=S.C;A=ne+A;var ie=I,ae=U;for(U=S.Ta,I=S.Ua;0<G--;){var ce=S.gc[G],be=ne,Ce=A,ue=ie,Ne=ae,je=(ae=U,ie=I,ce.Ea);switch(t(be<Ce),t(Ce<=ce.nc),ce.hc){case 2:Hr(ue,Ne,(Ce-be)*je,ae,ie);break;case 0:var Fe=be,Te=Ce,Ie=ae,De=ie,qe=(Nt=ce).Ea;Fe==0&&(al(ue,Ne,null,null,1,Ie,De),Ve(ue,Ne+1,0,0,qe-1,Ie,De+1),Ne+=qe,De+=qe,++Fe);for(var We=1<<Nt.b,Lt=We-1,pt=ze(qe,Nt.b),on=Nt.K,Nt=Nt.w+(Fe>>Nt.b)*pt;Fe<Te;){var wn=on,Ir=Nt,ln=1;for(_s(ue,Ne,Ie,De-qe,1,Ie,De);ln<qe;){var mt=(ln&~Lt)+We;mt>qe&&(mt=qe),(0,su[wn[Ir++]>>8&15])(ue,Ne+ +ln,Ie,De+ln-qe,mt-ln,Ie,De+ln),ln=mt}Ne+=qe,De+=qe,++Fe&Lt||(Nt+=pt)}Ce!=ce.nc&&r(ae,ie-je,ae,ie+(Ce-be-1)*je,je);break;case 1:for(je=ue,Te=Ne,qe=(ue=ce.Ea)-(De=ue&~(Ie=(Ne=1<<ce.b)-1)),Fe=ze(ue,ce.b),We=ce.K,ce=ce.w+(be>>ce.b)*Fe;be<Ce;){for(Lt=We,pt=ce,on=new xt,Nt=Te+De,wn=Te+ue;Te<Nt;)Ze(Lt[pt++],on),Sf(on,je,Te,Ne,ae,ie),Te+=Ne,ie+=Ne;Te<wn&&(Ze(Lt[pt++],on),Sf(on,je,Te,qe,ae,ie),Te+=qe,ie+=qe),++be&Ie||(ce+=Fe)}break;case 3:if(ue==ae&&Ne==ie&&0<ce.b){for(Te=ae,ue=je=ie+(Ce-be)*je-(De=(Ce-be)*ze(ce.Ea,ce.b)),Ne=ae,Ie=ie,Fe=[],De=(qe=De)-1;0<=De;--De)Fe[De]=Ne[Ie+De];for(De=qe-1;0<=De;--De)Te[ue+De]=Fe[De];au(ce,be,Ce,ae,je,ae,ie)}else au(ce,be,Ce,ue,Ne,ae,ie)}ie=U,ae=I}ae!=I&&r(U,I,ie,ae,ee)}function Ul(S,A){var I=S.V,U=S.Ba+S.c*S.C,G=A-S.C;if(t(A<=S.l.o),t(16>=G),0<G){var ee=S.l,ne=S.Ta,ie=S.Ua,ae=ee.width;if(Js(S,G,I,U),G=ie=[ie],t((I=S.C)<(U=A)),t(ee.v<ee.va),U>ee.o&&(U=ee.o),I<ee.j){var ce=ee.j-I;I=ee.j,G[0]+=ce*ae}if(I>=U?I=0:(G[0]+=4*ee.v,ee.ka=I-ee.j,ee.U=ee.va-ee.v,ee.T=U-I,I=1),I){if(ie=ie[0],11>(I=S.ca).S){var be=I.f.RGBA,Ce=(U=I.S,G=ee.U,ee=ee.T,ce=be.eb,be.A),ue=ee;for(be=be.fb+S.Ma*be.A;0<ue--;){var Ne=ne,je=ie,Fe=G,Te=ce,Ie=be;switch(U){case Wp:_f(Ne,je,Fe,Te,Ie);break;case tc:ol(Ne,je,Fe,Te,Ie);break;case Pf:ol(Ne,je,Fe,Te,Ie),fu(Te,Ie,0,Fe,1,0);break;case T1:lu(Ne,je,Fe,Te,Ie);break;case nh:kt(Ne,je,Fe,Te,Ie,1);break;case du:kt(Ne,je,Fe,Te,Ie,1),fu(Te,Ie,0,Fe,1,0);break;case rh:kt(Ne,je,Fe,Te,Ie,0);break;case ih:kt(Ne,je,Fe,Te,Ie,0),fu(Te,Ie,1,Fe,1,0);break;case nr:Jl(Ne,je,Fe,Te,Ie);break;case ah:Jl(Ne,je,Fe,Te,Ie),wy(Te,Ie,Fe,1,0);break;case Hp:Zl(Ne,je,Fe,Te,Ie);break;default:t(0)}ie+=ae,be+=Ce}S.Ma+=ee}else alert("todo:EmitRescaledRowsYUVA");t(S.Ma<=I.height)}}S.C=A,t(S.C<=S.i)}function Bo(S){var A;if(0<S.ua)return 0;for(A=0;A<S.Wb;++A){var I=S.Ya[A].G,U=S.Ya[A].H;if(0<I[1][U[1]+0].g||0<I[2][U[2]+0].g||0<I[3][U[3]+0].g)return 0}return 1}function ms(S,A,I,U,G,ee){if(S.Z!=0){var ne=S.qd,ie=S.rd;for(t(Zi[S.Z]!=null);A<I;++A)Zi[S.Z](ne,ie,U,G,U,G,ee),ne=U,ie=G,G+=ee;S.qd=ne,S.rd=ie}}function Ii(S,A){var I=S.l.ma,U=I.Z==0||I.Z==1?S.l.j:S.C;if(U=S.C<U?U:S.C,t(A<=S.l.o),A>U){var G=S.l.width,ee=I.ca,ne=I.tb+G*U,ie=S.V,ae=S.Ba+S.c*U,ce=S.gc;t(S.ab==1),t(ce[0].hc==3),Wo(ce[0],U,A,ie,ae,ee,ne),ms(I,U,A,ee,ne,G)}S.C=S.Ma=A}function uo(S,A,I,U,G,ee,ne){var ie=S.$/U,ae=S.$%U,ce=S.m,be=S.s,Ce=I+S.$,ue=Ce;G=I+U*G;var Ne=I+U*ee,je=280+be.ua,Fe=S.Pb?ie:16777216,Te=0<be.ua?be.Wa:null,Ie=be.wc,De=Ce<Ne?Zr(be,ae,ie):null;t(S.C<ee),t(Ne<=G);var qe=!1;e:for(;;){for(;qe||Ce<Ne;){var We=0;if(ie>=Fe){var Lt=Ce-I;t((Fe=S).Pb),Fe.wd=Fe.m,Fe.xd=Lt,0<Fe.s.ua&&Ke(Fe.s.Wa,Fe.s.vb),Fe=ie+Gp}if(ae&Ie||(De=Zr(be,ae,ie)),t(De!=null),De.Qb&&(A[Ce]=De.qb,qe=!0),!qe)if(pe(ce),De.jc){We=ce,Lt=A;var pt=Ce,on=De.pd[re(We)&vo-1];t(De.jc),256>on.g?(de(We,We.u+on.g),Lt[pt]=on.value,We=0):(de(We,We.u+on.g-256),t(256<=on.value),We=on.value),We==0&&(qe=!0)}else We=cr(De.G[0],De.H[0],ce);if(ce.h)break;if(qe||256>We){if(!qe)if(De.nd)A[Ce]=(De.qb|We<<8)>>>0;else{if(pe(ce),qe=cr(De.G[1],De.H[1],ce),pe(ce),Lt=cr(De.G[2],De.H[2],ce),pt=cr(De.G[3],De.H[3],ce),ce.h)break;A[Ce]=(pt<<24|qe<<16|We<<8|Lt)>>>0}if(qe=!1,++Ce,++ae>=U&&(ae=0,++ie,ne!=null&&ie<=ee&&!(ie%16)&&ne(S,ie),Te!=null))for(;ue<Ce;)We=A[ue++],Te.X[(506832829*We&4294967295)>>>Te.Mb]=We}else if(280>We){if(We=Qi(We-256,ce),Lt=cr(De.G[4],De.H[4],ce),pe(ce),Lt=co(U,Lt=Qi(Lt,ce)),ce.h)break;if(Ce-I<Lt||G-Ce<We)break e;for(pt=0;pt<We;++pt)A[Ce+pt]=A[Ce+pt-Lt];for(Ce+=We,ae+=We;ae>=U;)ae-=U,++ie,ne!=null&&ie<=ee&&!(ie%16)&&ne(S,ie);if(t(Ce<=G),ae&Ie&&(De=Zr(be,ae,ie)),Te!=null)for(;ue<Ce;)We=A[ue++],Te.X[(506832829*We&4294967295)>>>Te.Mb]=We}else{if(!(We<je))break e;for(qe=We-280,t(Te!=null);ue<Ce;)We=A[ue++],Te.X[(506832829*We&4294967295)>>>Te.Mb]=We;We=Ce,t(!(qe>>>(Lt=Te).Xa)),A[We]=Lt.X[qe],qe=!0}qe||t(ce.h==le(ce))}if(S.Pb&&ce.h&&Ce<G)t(S.m.h),S.a=5,S.m=S.wd,S.$=S.xd,0<S.s.ua&&Ke(S.s.vb,S.s.Wa);else{if(ce.h)break e;ne!=null&&ne(S,ie>ee?ee:ie),S.a=0,S.$=Ce-I}return 1}return S.a=3,0}function Ha(S){t(S!=null),S.vc=null,S.yc=null,S.Ya=null;var A=S.Wa;A!=null&&(A.X=null),S.vb=null,t(S!=null)}function qc(){var S=new Kt;return S==null?null:(S.a=0,S.xb=Cf,gn("Predictor","VP8LPredictors"),gn("Predictor","VP8LPredictors_C"),gn("PredictorAdd","VP8LPredictorsAdd"),gn("PredictorAdd","VP8LPredictorsAdd_C"),Hr=at,Sf=lt,_f=Wn,ol=nn,Jl=Gt,Zl=Qt,lu=un,D.VP8LMapColor32b=Ns,D.VP8LMapColor8b=ou,S)}function $o(S,A,I,U,G){var ee=1,ne=[S],ie=[A],ae=U.m,ce=U.s,be=null,Ce=0;e:for(;;){if(I)for(;ee&&te(ae,1);){var ue=ne,Ne=ie,je=U,Fe=1,Te=je.m,Ie=je.gc[je.ab],De=te(Te,2);if(je.Oc&1<<De)ee=0;else{switch(je.Oc|=1<<De,Ie.hc=De,Ie.Ea=ue[0],Ie.nc=Ne[0],Ie.K=[null],++je.ab,t(4>=je.ab),De){case 0:case 1:Ie.b=te(Te,3)+2,Fe=$o(ze(Ie.Ea,Ie.b),ze(Ie.nc,Ie.b),0,je,Ie.K),Ie.K=Ie.K[0];break;case 3:var qe,We=te(Te,8)+1,Lt=16<We?0:4<We?1:2<We?2:3;if(ue[0]=ze(Ie.Ea,Lt),Ie.b=Lt,qe=Fe=$o(We,1,0,je,Ie.K)){var pt,on=We,Nt=Ie,wn=1<<(8>>Nt.b),Ir=a(wn);if(Ir==null)qe=0;else{var ln=Nt.K[0],mt=Nt.w;for(Ir[0]=Nt.K[0][0],pt=1;pt<1*on;++pt)Ir[pt]=St(ln[mt+pt],Ir[pt-1]);for(;pt<4*wn;++pt)Ir[pt]=0;Nt.K[0]=null,Nt.K[0]=Ir,qe=1}}Fe=qe;break;case 2:break;default:t(0)}ee=Fe}}if(ne=ne[0],ie=ie[0],ee&&te(ae,1)&&!(ee=1<=(Ce=te(ae,4))&&11>=Ce)){U.a=3;break e}var ot;if(ot=ee)t:{var Yr,Yt,vn,fr=U,_i=ne,ii=ie,jr=Ce,pi=I,Ni=fr.m,br=fr.s,_n=[null],Dn=1,wr=0,Fn=L1[jr];n:for(;;){if(pi&&te(Ni,1)){var Dr=te(Ni,3)+2,Fr=ze(_i,Dr),rr=ze(ii,Dr),ea=Fr*rr;if(!$o(Fr,rr,0,fr,_n))break n;for(_n=_n[0],br.xc=Dr,Yr=0;Yr<ea;++Yr){var Jn=_n[Yr]>>8&65535;_n[Yr]=Jn,Jn>=Dn&&(Dn=Jn+1)}}if(Ni.h)break n;for(Yt=0;5>Yt;++Yt){var ir=hu[Yt];!Yt&&0<jr&&(ir+=1<<jr),wr<ir&&(wr=ir)}var ai=o(Dn*Fn,W),$i=Dn,Pa=o($i,X);if(Pa==null)var Gr=null;else t(65536>=$i),Gr=Pa;var Kr=a(wr);if(Gr==null||Kr==null||ai==null){fr.a=1;break n}var ta=ai;for(Yr=vn=0;Yr<Dn;++Yr){var ar=Gr[Yr],na=ar.G,wo=ar.H,Go=0,ki=1,Xr=0;for(Yt=0;5>Yt;++Yt){ir=hu[Yt],na[Yt]=ta,wo[Yt]=vn,!Yt&&0<jr&&(ir+=1<<jr);i:{var ic,ul=ir,Tf=fr,Ps=Kr,B1=ta,My=vn,mr=0,Ko=Tf.m,Ly=te(Ko,1);if(i(Ps,0,0,ul),Ly){var Ry=te(Ko,1)+1,Xp=te(Ko,1),Qp=te(Ko,Xp==0?1:8);Ps[Qp]=1,Ry==2&&(Ps[Qp=te(Ko,8)]=1);var js=1}else{var Sr=a(19),oi=te(Ko,4)+4;if(19<oi){Tf.a=3;var Qr=0;break i}for(ic=0;ic<oi;++ic)Sr[H5[ic]]=te(Ko,3);var Mf=void 0,fl=void 0,Lf=Tf,J5=Sr,mi=ul,Jp=Ps,uh=0,Cs=Lf.m,Xo=8,eo=o(128,W);r:for(;F(eo,0,7,J5,19);){if(te(Cs,1)){var fh=2+2*te(Cs,3);if((Mf=2+te(Cs,fh))>mi)break r}else Mf=mi;for(fl=0;fl<mi&&Mf--;){pe(Cs);var Zp=eo[0+(127&re(Cs))];de(Cs,Cs.u+Zp.g);var ac=Zp.value;if(16>ac)Jp[fl++]=ac,ac!=0&&(Xo=ac);else{var $1=ac==16,Iy=ac-16,q1=Yp[Iy],Dy=te(Cs,oh[Iy])+q1;if(fl+Dy>mi)break r;for(var U1=$1?Xo:0;0<Dy--;)Jp[fl++]=U1}}uh=1;break r}uh||(Lf.a=3),js=uh}(js=js&&!Ko.h)&&(mr=F(B1,My,8,Ps,ul)),js&&mr!=0?Qr=mr:(Tf.a=3,Qr=0)}if(Qr==0)break n;if(ki&&M1[Yt]==1&&(ki=ta[vn].g==0),Go+=ta[vn].g,vn+=Qr,3>=Yt){var Rf,em=Kr[0];for(Rf=1;Rf<ir;++Rf)Kr[Rf]>em&&(em=Kr[Rf]);Xr+=em}}if(ar.nd=ki,ar.Qb=0,ki&&(ar.qb=(na[3][wo[3]+0].value<<24|na[1][wo[1]+0].value<<16|na[2][wo[2]+0].value)>>>0,Go==0&&256>na[0][wo[0]+0].value&&(ar.Qb=1,ar.qb+=na[0][wo[0]+0].value<<8)),ar.jc=!ar.Qb&&6>Xr,ar.jc){var dh,to=ar;for(dh=0;dh<vo;++dh){var dl=dh,Qo=to.pd[dl],vu=to.G[0][to.H[0]+dl];256<=vu.value?(Qo.g=vu.g+256,Qo.value=vu.value):(Qo.g=0,Qo.value=0,dl>>=Vr(vu,8,Qo),dl>>=Vr(to.G[1][to.H[1]+dl],16,Qo),dl>>=Vr(to.G[2][to.H[2]+dl],0,Qo),Vr(to.G[3][to.H[3]+dl],24,Qo))}}}br.vc=_n,br.Wb=Dn,br.Ya=Gr,br.yc=ai,ot=1;break t}ot=0}if(!(ee=ot)){U.a=3;break e}if(0<Ce){if(ce.ua=1<<Ce,!oe(ce.Wa,Ce)){U.a=1,ee=0;break e}}else ce.ua=0;var tm=U,nm=ne,z1=ie,rm=tm.s,im=rm.xc;if(tm.c=nm,tm.i=z1,rm.md=ze(nm,im),rm.wc=im==0?-1:(1<<im)-1,I){U.xb=As;break e}if((be=a(ne*ie))==null){U.a=1,ee=0;break e}ee=(ee=uo(U,be,0,ne,ie,ie,null))&&!ae.h;break e}return ee?(G!=null?G[0]=be:(t(be==null),t(I)),U.$=0,I||Ha(ce)):Ha(ce),ee}function zl(S,A){var I=S.c*S.i,U=I+A+16*A;return t(S.c<=A),S.V=a(U),S.V==null?(S.Ta=null,S.Ua=0,S.a=1,0):(S.Ta=S.V,S.Ua=S.Ba+I+A,1)}function Uc(S,A){var I=S.C,U=A-I,G=S.V,ee=S.Ba+S.c*I;for(t(A<=S.l.o);0<U;){var ne=16<U?16:U,ie=S.l.ma,ae=S.l.width,ce=ae*ne,be=ie.ca,Ce=ie.tb+ae*I,ue=S.Ta,Ne=S.Ua;Js(S,ne,G,ee),Sy(ue,Ne,be,Ce,ce),ms(ie,I,I+ne,be,Ce,ae),U-=ne,G+=ne*S.c,I+=ne}t(I==A),S.C=S.Ma=A}function zc(){this.ub=this.yd=this.td=this.Rb=0}function lf(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function yy(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function pr(){this.Yb=(function(){var S=[];return(function A(I,U,G){for(var ee=G[U],ne=0;ne<ee&&(I.push(G.length>U+1?[]:0),!(G.length<U+1));ne++)A(I[ne],U+1,G)})(S,0,[3,11]),S})()}function Rp(){this.jb=a(3),this.Wc=s([4,8],pr),this.Xc=s([4,17],pr)}function cf(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Ya(){this.ld=this.La=this.dd=this.tc=0}function Vl(){this.Na=this.la=0}function Ip(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function uf(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Vc(){this.uc=this.M=this.Nb=0,this.wa=Array(new Ya),this.Y=0,this.ya=Array(new uf),this.aa=0,this.l=new ff}function Ga(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Dp(){this.cb=this.a=0,this.sc="",this.m=new $,this.Od=new zc,this.Kc=new lf,this.ed=new cf,this.Qa=new yy,this.Ic=this.$c=this.Aa=0,this.D=new Vc,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,$),this.ia=0,this.pb=o(4,Ip),this.Pa=new Rp,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ga),this.Hd=0,this.rb=Array(new Vl),this.sb=0,this.wa=Array(new Ya),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new uf),this.L=this.aa=0,this.gd=s([4,2],Ya),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function ei(S,A){return 0>S?0:S>A?A:S}function ff(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function vy(){var S=new Dp;return S!=null&&(S.a=0,S.sc="OK",S.cb=0,S.Xb=0,pu||(pu=gs)),S}function ti(S,A,I){return S.a==0&&(S.a=A,S.sc=I,S.cb=0),0}function Wc(S,A,I){return 3<=I&&S[A+0]==157&&S[A+1]==1&&S[A+2]==42}function Ka(S,A){if(S==null)return 0;if(S.a=0,S.sc="OK",A==null)return ti(S,2,"null VP8Io passed to VP8GetHeaders()");var I=A.data,U=A.w,G=A.ha;if(4>G)return ti(S,7,"Truncated header.");var ee=I[U+0]|I[U+1]<<8|I[U+2]<<16,ne=S.Od;if(ne.Rb=!(1&ee),ne.td=ee>>1&7,ne.yd=ee>>4&1,ne.ub=ee>>5,3<ne.td)return ti(S,3,"Incorrect keyframe parameters.");if(!ne.yd)return ti(S,4,"Frame not displayable.");U+=3,G-=3;var ie=S.Kc;if(ne.Rb){if(7>G)return ti(S,7,"cannot parse picture header");if(!Wc(I,U,G))return ti(S,3,"Bad code word");ie.c=16383&(I[U+4]<<8|I[U+3]),ie.Td=I[U+4]>>6,ie.i=16383&(I[U+6]<<8|I[U+5]),ie.Ud=I[U+6]>>6,U+=7,G-=7,S.za=ie.c+15>>4,S.Ub=ie.i+15>>4,A.width=ie.c,A.height=ie.i,A.Da=0,A.j=0,A.v=0,A.va=A.width,A.o=A.height,A.da=0,A.ib=A.width,A.hb=A.height,A.U=A.width,A.T=A.height,i((ee=S.Pa).jb,0,255,ee.jb.length),t((ee=S.Qa)!=null),ee.Cb=0,ee.Bb=0,ee.Fb=1,i(ee.Zb,0,0,ee.Zb.length),i(ee.Lb,0,0,ee.Lb)}if(ne.ub>G)return ti(S,7,"bad partition length");Y(ee=S.m,I,U,ne.ub),U+=ne.ub,G-=ne.ub,ne.Rb&&(ie.Ld=he(ee),ie.Kd=he(ee)),ie=S.Qa;var ae,ce=S.Pa;if(t(ee!=null),t(ie!=null),ie.Cb=he(ee),ie.Cb){if(ie.Bb=he(ee),he(ee)){for(ie.Fb=he(ee),ae=0;4>ae;++ae)ie.Zb[ae]=he(ee)?K(ee,7):0;for(ae=0;4>ae;++ae)ie.Lb[ae]=he(ee)?K(ee,6):0}if(ie.Bb)for(ae=0;3>ae;++ae)ce.jb[ae]=he(ee)?Z(ee,8):255}else ie.Bb=0;if(ee.Ka)return ti(S,3,"cannot parse segment header");if((ie=S.ed).zd=he(ee),ie.Tb=Z(ee,6),ie.wb=Z(ee,3),ie.Pc=he(ee),ie.Pc&&he(ee)){for(ce=0;4>ce;++ce)he(ee)&&(ie.vd[ce]=K(ee,6));for(ce=0;4>ce;++ce)he(ee)&&(ie.od[ce]=K(ee,6))}if(S.L=ie.Tb==0?0:ie.zd?1:2,ee.Ka)return ti(S,3,"cannot parse filter header");var be=G;if(G=ae=U,U=ae+be,ie=be,S.Xb=(1<<Z(S.m,2))-1,be<3*(ce=S.Xb))I=7;else{for(ae+=3*ce,ie-=3*ce,be=0;be<ce;++be){var Ce=I[G+0]|I[G+1]<<8|I[G+2]<<16;Ce>ie&&(Ce=ie),Y(S.Jc[+be],I,ae,Ce),ae+=Ce,ie-=Ce,G+=3}Y(S.Jc[+ce],I,ae,ie),I=ae<U?0:5}if(I!=0)return ti(S,I,"cannot parse partitions");for(I=Z(ae=S.m,7),G=he(ae)?K(ae,4):0,U=he(ae)?K(ae,4):0,ie=he(ae)?K(ae,4):0,ce=he(ae)?K(ae,4):0,ae=he(ae)?K(ae,4):0,be=S.Qa,Ce=0;4>Ce;++Ce){if(be.Cb){var ue=be.Zb[Ce];be.Fb||(ue+=I)}else{if(0<Ce){S.pb[Ce]=S.pb[0];continue}ue=I}var Ne=S.pb[Ce];Ne.Sc[0]=jf[ei(ue+G,127)],Ne.Sc[1]=sh[ei(ue+0,127)],Ne.Eb[0]=2*jf[ei(ue+U,127)],Ne.Eb[1]=101581*sh[ei(ue+ie,127)]>>16,8>Ne.Eb[1]&&(Ne.Eb[1]=8),Ne.Qc[0]=jf[ei(ue+ce,117)],Ne.Qc[1]=sh[ei(ue+ae,127)],Ne.lc=ue+ae}if(!ne.Rb)return ti(S,4,"Not a key frame.");for(he(ee),ne=S.Pa,I=0;4>I;++I){for(G=0;8>G;++G)for(U=0;3>U;++U)for(ie=0;11>ie;++ie)ce=xe(ee,K5[I][G][U][ie])?Z(ee,8):I1[I][G][U][ie],ne.Wc[I][G].Yb[U][ie]=ce;for(G=0;17>G;++G)ne.Xc[I][G]=ne.Wc[I][Ey[G]]}return S.kc=he(ee),S.kc&&(S.Bd=Z(ee,8)),S.cb=1}function gs(S,A,I,U,G,ee,ne){var ie=A[G].Yb[I];for(I=0;16>G;++G){if(!xe(S,ie[I+0]))return G;for(;!xe(S,ie[I+1]);)if(ie=A[++G].Yb[0],I=0,G==16)return 16;var ae=A[G+1].Yb;if(xe(S,ie[I+2])){var ce=S,be=0;if(xe(ce,(ue=ie)[(Ce=I)+3]))if(xe(ce,ue[Ce+6])){for(ie=0,Ce=2*(be=xe(ce,ue[Ce+8]))+(ue=xe(ce,ue[Ce+9+be])),be=0,ue=jy[Ce];ue[ie];++ie)be+=be+xe(ce,ue[ie]);be+=3+(8<<Ce)}else xe(ce,ue[Ce+7])?(be=7+2*xe(ce,165),be+=xe(ce,145)):be=5+xe(ce,159);else be=xe(ce,ue[Ce+4])?3+xe(ce,ue[Ce+5]):2;ie=ae[2]}else be=1,ie=ae[1];ae=ne+Cy[G],0>(ce=S).b&&ve(ce);var Ce,ue=ce.b,Ne=(Ce=ce.Ca>>1)-(ce.I>>ue)>>31;--ce.b,ce.Ca+=Ne,ce.Ca|=1,ce.I-=(Ce+1&Ne)<<ue,ee[ae]=((be^Ne)-Ne)*U[(0<G)+0]}return 16}function Hc(S){var A=S.rb[S.sb-1];A.la=0,A.Na=0,i(S.zc,0,0,S.zc.length),S.ja=0}function fo(S,A,I,U,G){G=S[A+I+32*U]+(G>>3),S[A+I+32*U]=-256&G?0>G?0:255:G}function di(S,A,I,U,G,ee){fo(S,A,0,I,U+G),fo(S,A,1,I,U+ee),fo(S,A,2,I,U-ee),fo(S,A,3,I,U-G)}function qo(S){return(20091*S>>16)+S}function Vd(S,A,I,U){var G,ee=0,ne=a(16);for(G=0;4>G;++G){var ie=S[A+0]+S[A+8],ae=S[A+0]-S[A+8],ce=(35468*S[A+4]>>16)-qo(S[A+12]),be=qo(S[A+4])+(35468*S[A+12]>>16);ne[ee+0]=ie+be,ne[ee+1]=ae+ce,ne[ee+2]=ae-ce,ne[ee+3]=ie-be,ee+=4,A++}for(G=ee=0;4>G;++G)ie=(S=ne[ee+0]+4)+ne[ee+8],ae=S-ne[ee+8],ce=(35468*ne[ee+4]>>16)-qo(ne[ee+12]),fo(I,U,0,0,ie+(be=qo(ne[ee+4])+(35468*ne[ee+12]>>16))),fo(I,U,1,0,ae+ce),fo(I,U,2,0,ae-ce),fo(I,U,3,0,ie-be),ee++,U+=32}function Wd(S,A,I,U){var G=S[A+0]+4,ee=35468*S[A+4]>>16,ne=qo(S[A+4]),ie=35468*S[A+1]>>16;di(I,U,0,G+ne,S=qo(S[A+1]),ie),di(I,U,1,G+ee,S,ie),di(I,U,2,G-ee,S,ie),di(I,U,3,G-ne,S,ie)}function Yc(S,A,I,U,G){Vd(S,A,I,U),G&&Vd(S,A+16,I,U+4)}function ys(S,A,I,U){cu(S,A+0,I,U,1),cu(S,A+32,I,U+128,1)}function df(S,A,I,U){var G;for(S=S[A+0]+4,G=0;4>G;++G)for(A=0;4>A;++A)fo(I,U,A,G,S)}function Mn(S,A,I,U){S[A+0]&&In(S,A+0,I,U),S[A+16]&&In(S,A+16,I,U+4),S[A+32]&&In(S,A+32,I,U+128),S[A+48]&&In(S,A+48,I,U+128+4)}function Gc(S,A,I,U){var G,ee=a(16);for(G=0;4>G;++G){var ne=S[A+0+G]+S[A+12+G],ie=S[A+4+G]+S[A+8+G],ae=S[A+4+G]-S[A+8+G],ce=S[A+0+G]-S[A+12+G];ee[0+G]=ne+ie,ee[8+G]=ne-ie,ee[4+G]=ce+ae,ee[12+G]=ce-ae}for(G=0;4>G;++G)ne=(S=ee[0+4*G]+3)+ee[3+4*G],ie=ee[1+4*G]+ee[2+4*G],ae=ee[1+4*G]-ee[2+4*G],ce=S-ee[3+4*G],I[U+0]=ne+ie>>3,I[U+16]=ce+ae>>3,I[U+32]=ne-ie>>3,I[U+48]=ce-ae>>3,U+=64}function Wl(S,A,I){var U,G=A-32,ee=ua,ne=255-S[G-1];for(U=0;U<I;++U){var ie,ae=ee,ce=ne+S[A-1];for(ie=0;ie<I;++ie)S[A+ie]=ae[ce+S[G+ie]];A+=32}}function Hd(S,A){Wl(S,A,4)}function Fp(S,A){Wl(S,A,8)}function Bp(S,A){Wl(S,A,16)}function hf(S,A){var I;for(I=0;16>I;++I)r(S,A+32*I,S,A-32,16)}function pf(S,A){var I;for(I=16;0<I;--I)i(S,A,S[A-1],16),A+=32}function xa(S,A,I){var U;for(U=0;16>U;++U)i(A,I+32*U,S,16)}function vs(S,A){var I,U=16;for(I=0;16>I;++I)U+=S[A-1+32*I]+S[A+I-32];xa(U>>5,S,A)}function ba(S,A){var I,U=8;for(I=0;16>I;++I)U+=S[A-1+32*I];xa(U>>4,S,A)}function ho(S,A){var I,U=8;for(I=0;16>I;++I)U+=S[A+I-32];xa(U>>4,S,A)}function Kc(S,A){xa(128,S,A)}function Vt(S,A,I){return S+2*A+I+2>>2}function xs(S,A){var I,U=A-32;for(U=new Uint8Array([Vt(S[U-1],S[U+0],S[U+1]),Vt(S[U+0],S[U+1],S[U+2]),Vt(S[U+1],S[U+2],S[U+3]),Vt(S[U+2],S[U+3],S[U+4])]),I=0;4>I;++I)r(S,A+32*I,U,0,U.length)}function xy(S,A){var I=S[A-1],U=S[A-1+32],G=S[A-1+64],ee=S[A-1+96];Pe(S,A+0,16843009*Vt(S[A-1-32],I,U)),Pe(S,A+32,16843009*Vt(I,U,G)),Pe(S,A+64,16843009*Vt(U,G,ee)),Pe(S,A+96,16843009*Vt(G,ee,ee))}function $p(S,A){var I,U=4;for(I=0;4>I;++I)U+=S[A+I-32]+S[A-1+32*I];for(U>>=3,I=0;4>I;++I)i(S,A+32*I,U,4)}function Xa(S,A){var I=S[A-1+0],U=S[A-1+32],G=S[A-1+64],ee=S[A-1-32],ne=S[A+0-32],ie=S[A+1-32],ae=S[A+2-32],ce=S[A+3-32];S[A+0+96]=Vt(U,G,S[A-1+96]),S[A+1+96]=S[A+0+64]=Vt(I,U,G),S[A+2+96]=S[A+1+64]=S[A+0+32]=Vt(ee,I,U),S[A+3+96]=S[A+2+64]=S[A+1+32]=S[A+0+0]=Vt(ne,ee,I),S[A+3+64]=S[A+2+32]=S[A+1+0]=Vt(ie,ne,ee),S[A+3+32]=S[A+2+0]=Vt(ae,ie,ne),S[A+3+0]=Vt(ce,ae,ie)}function Zs(S,A){var I=S[A+1-32],U=S[A+2-32],G=S[A+3-32],ee=S[A+4-32],ne=S[A+5-32],ie=S[A+6-32],ae=S[A+7-32];S[A+0+0]=Vt(S[A+0-32],I,U),S[A+1+0]=S[A+0+32]=Vt(I,U,G),S[A+2+0]=S[A+1+32]=S[A+0+64]=Vt(U,G,ee),S[A+3+0]=S[A+2+32]=S[A+1+64]=S[A+0+96]=Vt(G,ee,ne),S[A+3+32]=S[A+2+64]=S[A+1+96]=Vt(ee,ne,ie),S[A+3+64]=S[A+2+96]=Vt(ne,ie,ae),S[A+3+96]=Vt(ie,ae,ae)}function qp(S,A){var I=S[A-1+0],U=S[A-1+32],G=S[A-1+64],ee=S[A-1-32],ne=S[A+0-32],ie=S[A+1-32],ae=S[A+2-32],ce=S[A+3-32];S[A+0+0]=S[A+1+64]=ee+ne+1>>1,S[A+1+0]=S[A+2+64]=ne+ie+1>>1,S[A+2+0]=S[A+3+64]=ie+ae+1>>1,S[A+3+0]=ae+ce+1>>1,S[A+0+96]=Vt(G,U,I),S[A+0+64]=Vt(U,I,ee),S[A+0+32]=S[A+1+96]=Vt(I,ee,ne),S[A+1+32]=S[A+2+96]=Vt(ee,ne,ie),S[A+2+32]=S[A+3+96]=Vt(ne,ie,ae),S[A+3+32]=Vt(ie,ae,ce)}function mf(S,A){var I=S[A+0-32],U=S[A+1-32],G=S[A+2-32],ee=S[A+3-32],ne=S[A+4-32],ie=S[A+5-32],ae=S[A+6-32],ce=S[A+7-32];S[A+0+0]=I+U+1>>1,S[A+1+0]=S[A+0+64]=U+G+1>>1,S[A+2+0]=S[A+1+64]=G+ee+1>>1,S[A+3+0]=S[A+2+64]=ee+ne+1>>1,S[A+0+32]=Vt(I,U,G),S[A+1+32]=S[A+0+96]=Vt(U,G,ee),S[A+2+32]=S[A+1+96]=Vt(G,ee,ne),S[A+3+32]=S[A+2+96]=Vt(ee,ne,ie),S[A+3+64]=Vt(ne,ie,ae),S[A+3+96]=Vt(ie,ae,ce)}function Xc(S,A){var I=S[A-1+0],U=S[A-1+32],G=S[A-1+64],ee=S[A-1+96];S[A+0+0]=I+U+1>>1,S[A+2+0]=S[A+0+32]=U+G+1>>1,S[A+2+32]=S[A+0+64]=G+ee+1>>1,S[A+1+0]=Vt(I,U,G),S[A+3+0]=S[A+1+32]=Vt(U,G,ee),S[A+3+32]=S[A+1+64]=Vt(G,ee,ee),S[A+3+64]=S[A+2+64]=S[A+0+96]=S[A+1+96]=S[A+2+96]=S[A+3+96]=ee}function Yd(S,A){var I=S[A-1+0],U=S[A-1+32],G=S[A-1+64],ee=S[A-1+96],ne=S[A-1-32],ie=S[A+0-32],ae=S[A+1-32],ce=S[A+2-32];S[A+0+0]=S[A+2+32]=I+ne+1>>1,S[A+0+32]=S[A+2+64]=U+I+1>>1,S[A+0+64]=S[A+2+96]=G+U+1>>1,S[A+0+96]=ee+G+1>>1,S[A+3+0]=Vt(ie,ae,ce),S[A+2+0]=Vt(ne,ie,ae),S[A+1+0]=S[A+3+32]=Vt(I,ne,ie),S[A+1+32]=S[A+3+64]=Vt(U,I,ne),S[A+1+64]=S[A+3+96]=Vt(G,U,I),S[A+1+96]=Vt(ee,G,U)}function Uo(S,A){var I;for(I=0;8>I;++I)r(S,A+32*I,S,A-32,8)}function Qc(S,A){var I;for(I=0;8>I;++I)i(S,A,S[A-1],8),A+=32}function wa(S,A,I){var U;for(U=0;8>U;++U)i(A,I+32*U,S,8)}function gf(S,A){var I,U=8;for(I=0;8>I;++I)U+=S[A+I-32]+S[A-1+32*I];wa(U>>4,S,A)}function Gd(S,A){var I,U=4;for(I=0;8>I;++I)U+=S[A+I-32];wa(U>>3,S,A)}function Kd(S,A){var I,U=4;for(I=0;8>I;++I)U+=S[A-1+32*I];wa(U>>3,S,A)}function yf(S,A){wa(128,S,A)}function po(S,A,I){var U=S[A-I],G=S[A+0],ee=3*(G-U)+ks[1020+S[A-2*I]-S[A+I]],ne=Af[112+(ee+4>>3)];S[A-I]=ua[255+U+Af[112+(ee+3>>3)]],S[A+0]=ua[255+G-ne]}function Jc(S,A,I,U){var G=S[A+0],ee=S[A+I];return xo[255+S[A-2*I]-S[A-I]]>U||xo[255+ee-G]>U}function Zc(S,A,I,U){return 4*xo[255+S[A-I]-S[A+0]]+xo[255+S[A-2*I]-S[A+I]]<=U}function mo(S,A,I,U,G){var ee=S[A-3*I],ne=S[A-2*I],ie=S[A-I],ae=S[A+0],ce=S[A+I],be=S[A+2*I],Ce=S[A+3*I];return 4*xo[255+ie-ae]+xo[255+ne-ce]>U?0:xo[255+S[A-4*I]-ee]<=G&&xo[255+ee-ne]<=G&&xo[255+ne-ie]<=G&&xo[255+Ce-be]<=G&&xo[255+be-ce]<=G&&xo[255+ce-ae]<=G}function el(S,A,I,U){var G=2*U+1;for(U=0;16>U;++U)Zc(S,A+U,I,G)&&po(S,A+U,I)}function Hl(S,A,I,U){var G=2*U+1;for(U=0;16>U;++U)Zc(S,A+U*I,1,G)&&po(S,A+U*I,1)}function Xd(S,A,I,U){var G;for(G=3;0<G;--G)el(S,A+=4*I,I,U)}function eu(S,A,I,U){var G;for(G=3;0<G;--G)Hl(S,A+=4,I,U)}function go(S,A,I,U,G,ee,ne,ie){for(ee=2*ee+1;0<G--;){if(mo(S,A,I,ee,ne))if(Jc(S,A,I,ie))po(S,A,I);else{var ae=S,ce=A,be=I,Ce=ae[ce-2*be],ue=ae[ce-be],Ne=ae[ce+0],je=ae[ce+be],Fe=ae[ce+2*be],Te=27*(De=ks[1020+3*(Ne-ue)+ks[1020+Ce-je]])+63>>7,Ie=18*De+63>>7,De=9*De+63>>7;ae[ce-3*be]=ua[255+ae[ce-3*be]+De],ae[ce-2*be]=ua[255+Ce+Ie],ae[ce-be]=ua[255+ue+Te],ae[ce+0]=ua[255+Ne-Te],ae[ce+be]=ua[255+je-Ie],ae[ce+2*be]=ua[255+Fe-De]}A+=U}}function bs(S,A,I,U,G,ee,ne,ie){for(ee=2*ee+1;0<G--;){if(mo(S,A,I,ee,ne))if(Jc(S,A,I,ie))po(S,A,I);else{var ae=S,ce=A,be=I,Ce=ae[ce-be],ue=ae[ce+0],Ne=ae[ce+be],je=Af[112+(4+(Fe=3*(ue-Ce))>>3)],Fe=Af[112+(Fe+3>>3)],Te=je+1>>1;ae[ce-2*be]=ua[255+ae[ce-2*be]+Te],ae[ce-be]=ua[255+Ce+Fe],ae[ce+0]=ua[255+ue-je],ae[ce+be]=ua[255+Ne-Te]}A+=U}}function Ji(S,A,I,U,G,ee){go(S,A,I,1,16,U,G,ee)}function yo(S,A,I,U,G,ee){go(S,A,1,I,16,U,G,ee)}function vf(S,A,I,U,G,ee){var ne;for(ne=3;0<ne;--ne)bs(S,A+=4*I,I,1,16,U,G,ee)}function O(S,A,I,U,G,ee){var ne;for(ne=3;0<ne;--ne)bs(S,A+=4,1,I,16,U,G,ee)}function Q(S,A,I,U,G,ee,ne,ie){go(S,A,G,1,8,ee,ne,ie),go(I,U,G,1,8,ee,ne,ie)}function fe(S,A,I,U,G,ee,ne,ie){go(S,A,1,G,8,ee,ne,ie),go(I,U,1,G,8,ee,ne,ie)}function ye(S,A,I,U,G,ee,ne,ie){bs(S,A+4*G,G,1,8,ee,ne,ie),bs(I,U+4*G,G,1,8,ee,ne,ie)}function Ae(S,A,I,U,G,ee,ne,ie){bs(S,A+4,1,G,8,ee,ne,ie),bs(I,U+4,1,G,8,ee,ne,ie)}function Be(){this.ba=new an,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Rn,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Ge(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function _t(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Mt(){this.ua=0,this.Wa=new ht,this.vb=new ht,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new X,this.yc=new W}function Kt(){this.xb=this.a=0,this.l=new ff,this.ca=new an,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new q,this.Pb=0,this.wd=new q,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Mt,this.ab=0,this.gc=o(4,_t),this.Oc=0}function rn(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ff,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Cn(S,A,I,U,G,ee,ne){for(S=S==null?0:S[A+0],A=0;A<ne;++A)G[ee+A]=S+I[U+A]&255,S=G[ee+A]}function Pr(S,A,I,U,G,ee,ne){var ie;if(S==null)Cn(null,null,I,U,G,ee,ne);else for(ie=0;ie<ne;++ie)G[ee+ie]=S[A+ie]+I[U+ie]&255}function ni(S,A,I,U,G,ee,ne){if(S==null)Cn(null,null,I,U,G,ee,ne);else{var ie,ae=S[A+0],ce=ae,be=ae;for(ie=0;ie<ne;++ie)ce=be+(ae=S[A+ie])-ce,be=I[U+ie]+(-256&ce?0>ce?0:255:ce)&255,ce=ae,G[ee+ie]=be}}function ur(S,A,I,U){var G=A.width,ee=A.o;if(t(S!=null&&A!=null),0>I||0>=U||I+U>ee)return null;if(!S.Cc){if(S.ga==null){var ne;if(S.ga=new rn,(ne=S.ga==null)||(ne=A.width*A.o,t(S.Gb.length==0),S.Gb=a(ne),S.Uc=0,S.Gb==null?ne=0:(S.mb=S.Gb,S.nb=S.Uc,S.rc=null,ne=1),ne=!ne),!ne){ne=S.ga;var ie=S.Fa,ae=S.P,ce=S.qc,be=S.mb,Ce=S.nb,ue=ae+1,Ne=ce-1,je=ne.l;if(t(ie!=null&&be!=null&&A!=null),Zi[0]=null,Zi[1]=Cn,Zi[2]=Pr,Zi[3]=ni,ne.ca=be,ne.tb=Ce,ne.c=A.width,ne.i=A.height,t(0<ne.c&&0<ne.i),1>=ce)A=0;else if(ne.$a=3&ie[ae+0],ne.Z=ie[ae+0]>>2&3,ne.Lc=ie[ae+0]>>4&3,ae=ie[ae+0]>>6&3,0>ne.$a||1<ne.$a||4<=ne.Z||1<ne.Lc||ae)A=0;else if(je.put=qt,je.ac=lo,je.bc=Wa,je.ma=ne,je.width=A.width,je.height=A.height,je.Da=A.Da,je.v=A.v,je.va=A.va,je.j=A.j,je.o=A.o,ne.$a)e:{t(ne.$a==1),A=qc();t:for(;;){if(A==null){A=0;break e}if(t(ne!=null),ne.mc=A,A.c=ne.c,A.i=ne.i,A.l=ne.l,A.l.ma=ne,A.l.width=ne.c,A.l.height=ne.i,A.a=0,se(A.m,ie,ue,Ne),!$o(ne.c,ne.i,1,A,null)||(A.ab==1&&A.gc[0].hc==3&&Bo(A.s)?(ne.ic=1,ie=A.c*A.i,A.Ta=null,A.Ua=0,A.V=a(ie),A.Ba=0,A.V==null?(A.a=1,A=0):A=1):(ne.ic=0,A=zl(A,ne.c)),!A))break t;A=1;break e}ne.mc=null,A=0}else A=Ne>=ne.c*ne.i;ne=!A}if(ne)return null;S.ga.Lc!=1?S.Ga=0:U=ee-I}t(S.ga!=null),t(I+U<=ee);e:{if(A=(ie=S.ga).c,ee=ie.l.o,ie.$a==0){if(ue=S.rc,Ne=S.Vc,je=S.Fa,ae=S.P+1+I*A,ce=S.mb,be=S.nb+I*A,t(ae<=S.P+S.qc),ie.Z!=0)for(t(Zi[ie.Z]!=null),ne=0;ne<U;++ne)Zi[ie.Z](ue,Ne,je,ae,ce,be,A),ue=ce,Ne=be,be+=A,ae+=A;else for(ne=0;ne<U;++ne)r(ce,be,je,ae,A),ue=ce,Ne=be,be+=A,ae+=A;S.rc=ue,S.Vc=Ne}else{if(t(ie.mc!=null),A=I+U,t((ne=ie.mc)!=null),t(A<=ne.i),ne.C>=A)A=1;else if(ie.ic||zo(),ie.ic){ie=ne.V,ue=ne.Ba,Ne=ne.c;var Fe=ne.i,Te=(je=1,ae=ne.$/Ne,ce=ne.$%Ne,be=ne.m,Ce=ne.s,ne.$),Ie=Ne*Fe,De=Ne*A,qe=Ce.wc,We=Te<De?Zr(Ce,ce,ae):null;t(Te<=Ie),t(A<=Fe),t(Bo(Ce));t:for(;;){for(;!be.h&&Te<De;){if(ce&qe||(We=Zr(Ce,ce,ae)),t(We!=null),pe(be),256>(Fe=cr(We.G[0],We.H[0],be)))ie[ue+Te]=Fe,++Te,++ce>=Ne&&(ce=0,++ae<=A&&!(ae%16)&&Ii(ne,ae));else{if(!(280>Fe)){je=0;break t}Fe=Qi(Fe-256,be);var Lt,pt=cr(We.G[4],We.H[4],be);if(pe(be),!(Te>=(pt=co(Ne,pt=Qi(pt,be)))&&Ie-Te>=Fe)){je=0;break t}for(Lt=0;Lt<Fe;++Lt)ie[ue+Te+Lt]=ie[ue+Te+Lt-pt];for(Te+=Fe,ce+=Fe;ce>=Ne;)ce-=Ne,++ae<=A&&!(ae%16)&&Ii(ne,ae);Te<De&&ce&qe&&(We=Zr(Ce,ce,ae))}t(be.h==le(be))}Ii(ne,ae>A?A:ae);break t}!je||be.h&&Te<Ie?(je=0,ne.a=be.h?5:3):ne.$=Te,A=je}else A=uo(ne,ne.V,ne.Ba,ne.c,ne.i,A,Uc);if(!A){U=0;break e}}I+U>=ee&&(S.Cc=1),U=1}if(!U)return null;if(S.Cc&&((U=S.ga)!=null&&(U.mc=null),S.ga=null,0<S.Ga))return alert("todo:WebPDequantizeLevels"),null}return S.nb+I*G}function hi(S,A,I,U,G,ee){for(;0<G--;){var ne,ie=S,ae=A+(I?1:0),ce=S,be=A+(I?0:3);for(ne=0;ne<U;++ne){var Ce=ce[be+4*ne];Ce!=255&&(Ce*=32897,ie[ae+4*ne+0]=ie[ae+4*ne+0]*Ce>>23,ie[ae+4*ne+1]=ie[ae+4*ne+1]*Ce>>23,ie[ae+4*ne+2]=ie[ae+4*ne+2]*Ce>>23)}A+=ee}}function Wr(S,A,I,U,G){for(;0<U--;){var ee;for(ee=0;ee<I;++ee){var ne=S[A+2*ee+0],ie=15&(ce=S[A+2*ee+1]),ae=4369*ie,ce=(240&ce|ce>>4)*ae>>16;S[A+2*ee+0]=(240&ne|ne>>4)*ae>>16&240|(15&ne|ne<<4)*ae>>16>>4&15,S[A+2*ee+1]=240&ce|ie}A+=G}}function Di(S,A,I,U,G,ee,ne,ie){var ae,ce,be=255;for(ce=0;ce<G;++ce){for(ae=0;ae<U;++ae){var Ce=S[A+ae];ee[ne+4*ae]=Ce,be&=Ce}A+=I,ne+=ie}return be!=255}function tl(S,A,I,U,G){var ee;for(ee=0;ee<G;++ee)I[U+ee]=S[A+ee]>>8}function zo(){fu=hi,wy=Wr,th=Di,Sy=tl}function nl(S,A,I){D[S]=function(U,G,ee,ne,ie,ae,ce,be,Ce,ue,Ne,je,Fe,Te,Ie,De,qe){var We,Lt=qe-1>>1,pt=ie[ae+0]|ce[be+0]<<16,on=Ce[ue+0]|Ne[je+0]<<16;t(U!=null);var Nt=3*pt+on+131074>>2;for(A(U[G+0],255&Nt,Nt>>16,Fe,Te),ee!=null&&(Nt=3*on+pt+131074>>2,A(ee[ne+0],255&Nt,Nt>>16,Ie,De)),We=1;We<=Lt;++We){var wn=ie[ae+We]|ce[be+We]<<16,Ir=Ce[ue+We]|Ne[je+We]<<16,ln=pt+wn+on+Ir+524296,mt=ln+2*(wn+on)>>3;Nt=mt+pt>>1,pt=(ln=ln+2*(pt+Ir)>>3)+wn>>1,A(U[G+2*We-1],255&Nt,Nt>>16,Fe,Te+(2*We-1)*I),A(U[G+2*We-0],255&pt,pt>>16,Fe,Te+(2*We-0)*I),ee!=null&&(Nt=ln+on>>1,pt=mt+Ir>>1,A(ee[ne+2*We-1],255&Nt,Nt>>16,Ie,De+(2*We-1)*I),A(ee[ne+2*We+0],255&pt,pt>>16,Ie,De+(2*We+0)*I)),pt=wn,on=Ir}1&qe||(Nt=3*pt+on+131074>>2,A(U[G+qe-1],255&Nt,Nt>>16,Fe,Te+(qe-1)*I),ee!=null&&(Nt=3*on+pt+131074>>2,A(ee[ne+qe-1],255&Nt,Nt>>16,Ie,De+(qe-1)*I)))}}function tu(){Na[Wp]=X5,Na[tc]=nc,Na[T1]=Q5,Na[nh]=Ef,Na[rh]=mu,Na[nr]=lh,Na[Hp]=Oy,Na[Pf]=nc,Na[du]=Ef,Na[ih]=mu,Na[ah]=lh}function xf(S){return S&-16384?0>S?0:255:S>>rc}function Yl(S,A){return xf((19077*S>>8)+(26149*A>>8)-14234)}function nu(S,A,I){return xf((19077*S>>8)-(6419*A>>8)-(13320*I>>8)+8708)}function Gl(S,A){return xf((19077*S>>8)+(33050*A>>8)-17685)}function Kl(S,A,I,U,G){U[G+0]=Yl(S,I),U[G+1]=nu(S,A,I),U[G+2]=Gl(S,A)}function Fi(S,A,I,U,G){U[G+0]=Gl(S,A),U[G+1]=nu(S,A,I),U[G+2]=Yl(S,I)}function ru(S,A,I,U,G){var ee=nu(S,A,I);A=ee<<3&224|Gl(S,A)>>3,U[G+0]=248&Yl(S,I)|ee>>5,U[G+1]=A}function iu(S,A,I,U,G){var ee=240&Gl(S,A)|15;U[G+0]=240&Yl(S,I)|nu(S,A,I)>>4,U[G+1]=ee}function Qd(S,A,I,U,G){U[G+0]=255,Kl(S,A,I,U,G+1)}function Jd(S,A,I,U,G){Fi(S,A,I,U,G),U[G+3]=255}function ca(S,A,I,U,G){Kl(S,A,I,U,G),U[G+3]=255}function Vo(S,A,I){D[S]=function(U,G,ee,ne,ie,ae,ce,be,Ce){for(var ue=be+(-2&Ce)*I;be!=ue;)A(U[G+0],ee[ne+0],ie[ae+0],ce,be),A(U[G+1],ee[ne+0],ie[ae+0],ce,be+I),G+=2,++ne,++ae,be+=2*I;1&Ce&&A(U[G+0],ee[ne+0],ie[ae+0],ce,be)}}function ws(S,A,I){return I==0?S==0?A==0?6:5:A==0?4:0:I}function Up(S,A,I,U,G){switch(S>>>30){case 3:cu(A,I,U,G,0);break;case 2:Lr(A,I,U,G);break;case 1:In(A,I,U,G)}}function Qa(S,A){var I,U,G=A.M,ee=A.Nb,ne=S.oc,ie=S.pc+40,ae=S.oc,ce=S.pc+584,be=S.oc,Ce=S.pc+600;for(I=0;16>I;++I)ne[ie+32*I-1]=129;for(I=0;8>I;++I)ae[ce+32*I-1]=129,be[Ce+32*I-1]=129;for(0<G?ne[ie-1-32]=ae[ce-1-32]=be[Ce-1-32]=129:(i(ne,ie-32-1,127,21),i(ae,ce-32-1,127,9),i(be,Ce-32-1,127,9)),U=0;U<S.za;++U){var ue=A.ya[A.aa+U];if(0<U){for(I=-1;16>I;++I)r(ne,ie+32*I-4,ne,ie+32*I+12,4);for(I=-1;8>I;++I)r(ae,ce+32*I-4,ae,ce+32*I+4,4),r(be,Ce+32*I-4,be,Ce+32*I+4,4)}var Ne=S.Gd,je=S.Hd+U,Fe=ue.ad,Te=ue.Hc;if(0<G&&(r(ne,ie-32,Ne[je].y,0,16),r(ae,ce-32,Ne[je].f,0,8),r(be,Ce-32,Ne[je].ea,0,8)),ue.Za){var Ie=ne,De=ie-32+16;for(0<G&&(U>=S.za-1?i(Ie,De,Ne[je].y[15],4):r(Ie,De,Ne[je+1].y,0,4)),I=0;4>I;I++)Ie[De+128+I]=Ie[De+256+I]=Ie[De+384+I]=Ie[De+0+I];for(I=0;16>I;++I,Te<<=2)Ie=ne,De=ie+Ty[I],bo[ue.Ob[I]](Ie,De),Up(Te,Fe,16*+I,Ie,De)}else if(Ie=ws(U,G,ue.Ob[0]),fa[Ie](ne,ie),Te!=0)for(I=0;16>I;++I,Te<<=2)Up(Te,Fe,16*+I,ne,ie+Ty[I]);for(I=ue.Gc,Ie=ws(U,G,ue.Dd),_a[Ie](ae,ce),_a[Ie](be,Ce),Te=Fe,Ie=ae,De=ce,255&(ue=0|I)&&(170&ue?Sa(Te,256,Ie,De):Xn(Te,256,Ie,De)),ue=be,Te=Ce,255&(I>>=8)&&(170&I?Sa(Fe,320,ue,Te):Xn(Fe,320,ue,Te)),G<S.Ub-1&&(r(Ne[je].y,0,ne,ie+480,16),r(Ne[je].f,0,ae,ce+224,8),r(Ne[je].ea,0,be,Ce+224,8)),I=8*ee*S.B,Ne=S.sa,je=S.ta+16*U+16*ee*S.R,Fe=S.qa,ue=S.ra+8*U+I,Te=S.Ha,Ie=S.Ia+8*U+I,I=0;16>I;++I)r(Ne,je+I*S.R,ne,ie+32*I,16);for(I=0;8>I;++I)r(Fe,ue+I*S.B,ae,ce+32*I,8),r(Te,Ie+I*S.B,be,Ce+32*I,8)}}function Xl(S,A,I,U,G,ee,ne,ie,ae){var ce=[0],be=[0],Ce=0,ue=ae!=null?ae.kd:0,Ne=ae??new Ge;if(S==null||12>I)return 7;Ne.data=S,Ne.w=A,Ne.ha=I,A=[A],I=[I],Ne.gb=[Ne.gb];e:{var je=A,Fe=I,Te=Ne.gb;if(t(S!=null),t(Fe!=null),t(Te!=null),Te[0]=0,12<=Fe[0]&&!n(S,je[0],"RIFF")){if(n(S,je[0]+8,"WEBP")){Te=3;break e}var Ie=Ye(S,je[0]+4);if(12>Ie||4294967286<Ie){Te=3;break e}if(ue&&Ie>Fe[0]-8){Te=7;break e}Te[0]=Ie,je[0]+=12,Fe[0]-=12}Te=0}if(Te!=0)return Te;for(Ie=0<Ne.gb[0],I=I[0];;){e:{var De=S;Fe=A,Te=I;var qe=ce,We=be,Lt=je=[0];if((Nt=Ce=[Ce])[0]=0,8>Te[0])Te=7;else{if(!n(De,Fe[0],"VP8X")){if(Ye(De,Fe[0]+4)!=10){Te=3;break e}if(18>Te[0]){Te=7;break e}var pt=Ye(De,Fe[0]+8),on=1+Ue(De,Fe[0]+12);if(2147483648<=on*(De=1+Ue(De,Fe[0]+15))){Te=3;break e}Lt!=null&&(Lt[0]=pt),qe!=null&&(qe[0]=on),We!=null&&(We[0]=De),Fe[0]+=18,Te[0]-=18,Nt[0]=1}Te=0}}if(Ce=Ce[0],je=je[0],Te!=0)return Te;if(Fe=!!(2&je),!Ie&&Ce)return 3;if(ee!=null&&(ee[0]=!!(16&je)),ne!=null&&(ne[0]=Fe),ie!=null&&(ie[0]=0),ne=ce[0],je=be[0],Ce&&Fe&&ae==null){Te=0;break}if(4>I){Te=7;break}if(Ie&&Ce||!Ie&&!Ce&&!n(S,A[0],"ALPH")){I=[I],Ne.na=[Ne.na],Ne.P=[Ne.P],Ne.Sa=[Ne.Sa];e:{pt=S,Te=A,Ie=I;var Nt=Ne.gb;qe=Ne.na,We=Ne.P,Lt=Ne.Sa,on=22,t(pt!=null),t(Ie!=null),De=Te[0];var wn=Ie[0];for(t(qe!=null),t(Lt!=null),qe[0]=null,We[0]=null,Lt[0]=0;;){if(Te[0]=De,Ie[0]=wn,8>wn){Te=7;break e}var Ir=Ye(pt,De+4);if(4294967286<Ir){Te=3;break e}var ln=8+Ir+1&-2;if(on+=ln,0<Nt&&on>Nt){Te=3;break e}if(!n(pt,De,"VP8 ")||!n(pt,De,"VP8L")){Te=0;break e}if(wn[0]<ln){Te=7;break e}n(pt,De,"ALPH")||(qe[0]=pt,We[0]=De+8,Lt[0]=Ir),De+=ln,wn-=ln}}if(I=I[0],Ne.na=Ne.na[0],Ne.P=Ne.P[0],Ne.Sa=Ne.Sa[0],Te!=0)break}I=[I],Ne.Ja=[Ne.Ja],Ne.xa=[Ne.xa];e:if(Nt=S,Te=A,Ie=I,qe=Ne.gb[0],We=Ne.Ja,Lt=Ne.xa,pt=Te[0],De=!n(Nt,pt,"VP8 "),on=!n(Nt,pt,"VP8L"),t(Nt!=null),t(Ie!=null),t(We!=null),t(Lt!=null),8>Ie[0])Te=7;else{if(De||on){if(Nt=Ye(Nt,pt+4),12<=qe&&Nt>qe-12){Te=3;break e}if(ue&&Nt>Ie[0]-8){Te=7;break e}We[0]=Nt,Te[0]+=8,Ie[0]-=8,Lt[0]=on}else Lt[0]=5<=Ie[0]&&Nt[pt+0]==47&&!(Nt[pt+4]>>5),We[0]=Ie[0];Te=0}if(I=I[0],Ne.Ja=Ne.Ja[0],Ne.xa=Ne.xa[0],A=A[0],Te!=0)break;if(4294967286<Ne.Ja)return 3;if(ie==null||Fe||(ie[0]=Ne.xa?2:1),ne=[ne],je=[je],Ne.xa){if(5>I){Te=7;break}ie=ne,ue=je,Fe=ee,S==null||5>I?S=0:5<=I&&S[A+0]==47&&!(S[A+4]>>5)?(Ie=[0],Nt=[0],qe=[0],se(We=new q,S,A,I),Fo(We,Ie,Nt,qe)?(ie!=null&&(ie[0]=Ie[0]),ue!=null&&(ue[0]=Nt[0]),Fe!=null&&(Fe[0]=qe[0]),S=1):S=0):S=0}else{if(10>I){Te=7;break}ie=je,S==null||10>I||!Wc(S,A+3,I-3)?S=0:(ue=S[A+0]|S[A+1]<<8|S[A+2]<<16,Fe=16383&(S[A+7]<<8|S[A+6]),S=16383&(S[A+9]<<8|S[A+8]),1&ue||3<(ue>>1&7)||!(ue>>4&1)||ue>>5>=Ne.Ja||!Fe||!S?S=0:(ne&&(ne[0]=Fe),ie&&(ie[0]=S),S=1))}if(!S||(ne=ne[0],je=je[0],Ce&&(ce[0]!=ne||be[0]!=je)))return 3;ae!=null&&(ae[0]=Ne,ae.offset=A-ae.w,t(4294967286>A-ae.w),t(ae.offset==ae.ha-I));break}return Te==0||Te==7&&Ce&&ae==null?(ee!=null&&(ee[0]|=Ne.na!=null&&0<Ne.na.length),U!=null&&(U[0]=ne),G!=null&&(G[0]=je),0):Te}function bf(S,A,I){var U=A.width,G=A.height,ee=0,ne=0,ie=U,ae=G;if(A.Da=S!=null&&0<S.Da,A.Da&&(ie=S.cd,ae=S.bd,ee=S.v,ne=S.j,11>I||(ee&=-2,ne&=-2),0>ee||0>ne||0>=ie||0>=ae||ee+ie>U||ne+ae>G))return 0;if(A.v=ee,A.j=ne,A.va=ee+ie,A.o=ne+ae,A.U=ie,A.T=ae,A.da=S!=null&&0<S.da,A.da){if(!gt(ie,ae,I=[S.ib],ee=[S.hb]))return 0;A.ib=I[0],A.hb=ee[0]}return A.ob=S!=null&&S.ob,A.Kb=S==null||!S.Sd,A.da&&(A.ob=A.ib<3*U/4&&A.hb<3*G/4,A.Kb=0),1}function wf(S){if(S==null)return 2;if(11>S.S){var A=S.f.RGBA;A.fb+=(S.height-1)*A.A,A.A=-A.A}else A=S.f.kb,S=S.height,A.O+=(S-1)*A.fa,A.fa=-A.fa,A.N+=(S-1>>1)*A.Ab,A.Ab=-A.Ab,A.W+=(S-1>>1)*A.Db,A.Db=-A.Db,A.F!=null&&(A.J+=(S-1)*A.lb,A.lb=-A.lb);return 0}function rl(S,A,I,U){if(U==null||0>=S||0>=A)return 2;if(I!=null){if(I.Da){var G=I.cd,ee=I.bd,ne=-2&I.v,ie=-2&I.j;if(0>ne||0>ie||0>=G||0>=ee||ne+G>S||ie+ee>A)return 2;S=G,A=ee}if(I.da){if(!gt(S,A,G=[I.ib],ee=[I.hb]))return 2;S=G[0],A=ee[0]}}U.width=S,U.height=A;e:{var ae=U.width,ce=U.height;if(S=U.S,0>=ae||0>=ce||!(S>=Wp&&13>S))S=2;else{if(0>=U.Rd&&U.sd==null){ne=ee=G=A=0;var be=(ie=ae*ch[S])*ce;if(11>S||(ee=(ce+1)/2*(A=(ae+1)/2),S==12&&(ne=(G=ae)*ce)),(ce=a(be+2*ee+ne))==null){S=1;break e}U.sd=ce,11>S?((ae=U.f.RGBA).eb=ce,ae.fb=0,ae.A=ie,ae.size=be):((ae=U.f.kb).y=ce,ae.O=0,ae.fa=ie,ae.Fd=be,ae.f=ce,ae.N=0+be,ae.Ab=A,ae.Cd=ee,ae.ea=ce,ae.W=0+be+ee,ae.Db=A,ae.Ed=ee,S==12&&(ae.F=ce,ae.J=0+be+2*ee),ae.Tc=ne,ae.lb=G)}if(A=1,G=U.S,ee=U.width,ne=U.height,G>=Wp&&13>G)if(11>G)S=U.f.RGBA,A&=(ie=Math.abs(S.A))*(ne-1)+ee<=S.size,A&=ie>=ee*ch[G],A&=S.eb!=null;else{S=U.f.kb,ie=(ee+1)/2,be=(ne+1)/2,ae=Math.abs(S.fa),ce=Math.abs(S.Ab);var Ce=Math.abs(S.Db),ue=Math.abs(S.lb),Ne=ue*(ne-1)+ee;A&=ae*(ne-1)+ee<=S.Fd,A&=ce*(be-1)+ie<=S.Cd,A=(A&=Ce*(be-1)+ie<=S.Ed)&ae>=ee&ce>=ie&Ce>=ie,A&=S.y!=null,A&=S.f!=null,A&=S.ea!=null,G==12&&(A&=ue>=ee,A&=Ne<=S.Tc,A&=S.F!=null)}else A=0;S=A?0:2}}return S!=0||I!=null&&I.fd&&(S=wf(U)),S}var vo=64,Ja=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Za=24,Ql=32,Ss=8,il=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];st("Predictor0","PredictorAdd0"),D.Predictor0=function(){return 4278190080},D.Predictor1=function(S){return S},D.Predictor2=function(S,A,I){return A[I+0]},D.Predictor3=function(S,A,I){return A[I+1]},D.Predictor4=function(S,A,I){return A[I-1]},D.Predictor5=function(S,A,I){return Ct(Ct(S,A[I+1]),A[I+0])},D.Predictor6=function(S,A,I){return Ct(S,A[I-1])},D.Predictor7=function(S,A,I){return Ct(S,A[I+0])},D.Predictor8=function(S,A,I){return Ct(A[I-1],A[I+0])},D.Predictor9=function(S,A,I){return Ct(A[I+0],A[I+1])},D.Predictor10=function(S,A,I){return Ct(Ct(S,A[I-1]),Ct(A[I+0],A[I+1]))},D.Predictor11=function(S,A,I){var U=A[I+0];return 0>=Ee(U>>24&255,S>>24&255,(A=A[I-1])>>24&255)+Ee(U>>16&255,S>>16&255,A>>16&255)+Ee(U>>8&255,S>>8&255,A>>8&255)+Ee(255&U,255&S,255&A)?U:S},D.Predictor12=function(S,A,I){var U=A[I+0];return(bn((S>>24&255)+(U>>24&255)-((A=A[I-1])>>24&255))<<24|bn((S>>16&255)+(U>>16&255)-(A>>16&255))<<16|bn((S>>8&255)+(U>>8&255)-(A>>8&255))<<8|bn((255&S)+(255&U)-(255&A)))>>>0},D.Predictor13=function(S,A,I){var U=A[I-1];return(sn((S=Ct(S,A[I+0]))>>24&255,U>>24&255)<<24|sn(S>>16&255,U>>16&255)<<16|sn(S>>8&255,U>>8&255)<<8|sn(255&S,255&U))>>>0};var al=D.PredictorAdd0;D.PredictorAdd1=Ve,st("Predictor2","PredictorAdd2"),st("Predictor3","PredictorAdd3"),st("Predictor4","PredictorAdd4"),st("Predictor5","PredictorAdd5"),st("Predictor6","PredictorAdd6"),st("Predictor7","PredictorAdd7"),st("Predictor8","PredictorAdd8"),st("Predictor9","PredictorAdd9"),st("Predictor10","PredictorAdd10"),st("Predictor11","PredictorAdd11"),st("Predictor12","PredictorAdd12"),st("Predictor13","PredictorAdd13");var _s=D.PredictorAdd2;ct("ColorIndexInverseTransform","MapARGB","32b",function(S){return S>>8&255},function(S){return S}),ct("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(S){return S},function(S){return S>>8&255});var Hr,au=D.ColorIndexInverseTransform,Ns=D.MapARGB,Wo=D.VP8LColorIndexInverseTransformAlpha,ou=D.MapAlpha,su=D.VP8LPredictorsAdd=[];su.length=16,(D.VP8LPredictors=[]).length=16,(D.VP8LPredictorsAdd_C=[]).length=16,(D.VP8LPredictors_C=[]).length=16;var Sf,_f,ol,Jl,Zl,lu,ec,cu,Lr,Sa,In,Xn,Rr,ri,Ho,Zd,Nf,sl,zp,kf,Vp,by,eh,uu,fu,wy,th,Sy,_y=a(511),Ny=a(2041),ky=a(225),Ay=a(767),Py=0,ks=Ny,Af=ky,ua=Ay,xo=_y,Wp=0,tc=1,T1=2,nh=3,rh=4,nr=5,Hp=6,Pf=7,du=8,ih=9,ah=10,oh=[2,3,7],Yp=[3,3,11],hu=[280,256,256,256,40],M1=[0,1,1,1,0],H5=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Y5=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],L1=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Gp=8,jf=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],sh=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],pu=null,jy=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Cy=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],R1=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],I1=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],G5=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],K5=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Ey=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],fa=[],bo=[],_a=[],As=1,Cf=2,Zi=[],Na=[];nl("UpsampleRgbLinePair",Kl,3),nl("UpsampleBgrLinePair",Fi,3),nl("UpsampleRgbaLinePair",ca,4),nl("UpsampleBgraLinePair",Jd,4),nl("UpsampleArgbLinePair",Qd,4),nl("UpsampleRgba4444LinePair",iu,2),nl("UpsampleRgb565LinePair",ru,2);var X5=D.UpsampleRgbLinePair,Q5=D.UpsampleBgrLinePair,nc=D.UpsampleRgbaLinePair,Ef=D.UpsampleBgraLinePair,mu=D.UpsampleArgbLinePair,lh=D.UpsampleRgba4444LinePair,Oy=D.UpsampleRgb565LinePair,ll=16,Yo=1<<ll-1,Yn=-227,Qn=482,rc=6,Bi=0,ka=a(256),gu=a(256),Of=a(256),Aa=a(256),Kp=a(Qn-Yn),D1=a(Qn-Yn);Vo("YuvToRgbRow",Kl,3),Vo("YuvToBgrRow",Fi,3),Vo("YuvToRgbaRow",ca,4),Vo("YuvToBgraRow",Jd,4),Vo("YuvToArgbRow",Qd,4),Vo("YuvToRgba4444Row",iu,2),Vo("YuvToRgb565Row",ru,2);var Ty=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],yu=[0,2,8],F1=[8,7,6,4,4,2,2,2,1,1,1,1],cl=1;this.WebPDecodeRGBA=function(S,A,I,U,G){var ee=tc,ne=new Be,ie=new an;ne.ba=ie,ie.S=ee,ie.width=[ie.width],ie.height=[ie.height];var ae=ie.width,ce=ie.height,be=new $t;if(be==null||S==null)var Ce=2;else t(be!=null),Ce=Xl(S,A,I,be.width,be.height,be.Pd,be.Qd,be.format,null);if(Ce!=0?ae=0:(ae!=null&&(ae[0]=be.width[0]),ce!=null&&(ce[0]=be.height[0]),ae=1),ae){ie.width=ie.width[0],ie.height=ie.height[0],U!=null&&(U[0]=ie.width),G!=null&&(G[0]=ie.height);e:{if(U=new ff,(G=new Ge).data=S,G.w=A,G.ha=I,G.kd=1,A=[0],t(G!=null),((S=Xl(G.data,G.w,G.ha,null,null,null,A,null,G))==0||S==7)&&A[0]&&(S=4),(A=S)==0){if(t(ne!=null),U.data=G.data,U.w=G.w+G.offset,U.ha=G.ha-G.offset,U.put=qt,U.ac=lo,U.bc=Wa,U.ma=ne,G.xa){if((S=qc())==null){ne=1;break e}if((function(ue,Ne){var je=[0],Fe=[0],Te=[0];t:for(;;){if(ue==null)return 0;if(Ne==null)return ue.a=2,0;if(ue.l=Ne,ue.a=0,se(ue.m,Ne.data,Ne.w,Ne.ha),!Fo(ue.m,je,Fe,Te)){ue.a=3;break t}if(ue.xb=Cf,Ne.width=je[0],Ne.height=Fe[0],!$o(je[0],Fe[0],1,ue,null))break t;return 1}return t(ue.a!=0),0})(S,U)){if(U=(A=rl(U.width,U.height,ne.Oa,ne.ba))==0){t:{U=S;n:for(;;){if(U==null){U=0;break t}if(t(U.s.yc!=null),t(U.s.Ya!=null),t(0<U.s.Wb),t((I=U.l)!=null),t((G=I.ma)!=null),U.xb!=0){if(U.ca=G.ba,U.tb=G.tb,t(U.ca!=null),!bf(G.Oa,I,nh)){U.a=2;break n}if(!zl(U,I.width)||I.da)break n;if((I.da||Bt(U.ca.S))&&zo(),11>U.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),U.ca.f.kb.F!=null&&zo()),U.Pb&&0<U.s.ua&&U.s.vb.X==null&&!oe(U.s.vb,U.s.Wa.Xa)){U.a=1;break n}U.xb=0}if(!uo(U,U.V,U.Ba,U.c,U.i,I.o,Ul))break n;G.Dc=U.Ma,U=1;break t}t(U.a!=0),U=0}U=!U}U&&(A=S.a)}else A=S.a}else{if((S=new vy)==null){ne=1;break e}if(S.Fa=G.na,S.P=G.P,S.qc=G.Sa,Ka(S,U)){if((A=rl(U.width,U.height,ne.Oa,ne.ba))==0){if(S.Aa=0,I=ne.Oa,t((G=S)!=null),I!=null){if(0<(ae=0>(ae=I.Md)?0:100<ae?255:255*ae/100)){for(ce=be=0;4>ce;++ce)12>(Ce=G.pb[ce]).lc&&(Ce.ia=ae*F1[0>Ce.lc?0:Ce.lc]>>3),be|=Ce.ia;be&&(alert("todo:VP8InitRandom"),G.ia=1)}G.Ga=I.Id,100<G.Ga?G.Ga=100:0>G.Ga&&(G.Ga=0)}(function(ue,Ne){if(ue==null)return 0;if(Ne==null)return ti(ue,2,"NULL VP8Io parameter in VP8Decode().");if(!ue.cb&&!Ka(ue,Ne))return 0;if(t(ue.cb),Ne.ac==null||Ne.ac(Ne)){Ne.ob&&(ue.L=0);var je=yu[ue.L];if(ue.L==2?(ue.yb=0,ue.zb=0):(ue.yb=Ne.v-je>>4,ue.zb=Ne.j-je>>4,0>ue.yb&&(ue.yb=0),0>ue.zb&&(ue.zb=0)),ue.Va=Ne.o+15+je>>4,ue.Hb=Ne.va+15+je>>4,ue.Hb>ue.za&&(ue.Hb=ue.za),ue.Va>ue.Ub&&(ue.Va=ue.Ub),0<ue.L){var Fe=ue.ed;for(je=0;4>je;++je){var Te;if(ue.Qa.Cb){var Ie=ue.Qa.Lb[je];ue.Qa.Fb||(Ie+=Fe.Tb)}else Ie=Fe.Tb;for(Te=0;1>=Te;++Te){var De=ue.gd[je][Te],qe=Ie;if(Fe.Pc&&(qe+=Fe.vd[0],Te&&(qe+=Fe.od[0])),0<(qe=0>qe?0:63<qe?63:qe)){var We=qe;0<Fe.wb&&(We=4<Fe.wb?We>>2:We>>1)>9-Fe.wb&&(We=9-Fe.wb),1>We&&(We=1),De.dd=We,De.tc=2*qe+We,De.ld=40<=qe?2:15<=qe?1:0}else De.tc=0;De.La=Te}}}je=0}else ti(ue,6,"Frame setup failed"),je=ue.a;if(je=je==0){if(je){ue.$c=0,0<ue.Aa||(ue.Ic=cl);t:{je=ue.Ic,Fe=4*(We=ue.za);var Lt=32*We,pt=We+1,on=0<ue.L?We*(0<ue.Aa?2:1):0,Nt=(ue.Aa==2?2:1)*We;if((De=Fe+832+(Te=3*(16*je+yu[ue.L])/2*Lt)+(Ie=ue.Fa!=null&&0<ue.Fa.length?ue.Kc.c*ue.Kc.i:0))!=De)je=0;else{if(De>ue.Vb){if(ue.Vb=0,ue.Ec=a(De),ue.Fc=0,ue.Ec==null){je=ti(ue,1,"no memory during frame initialization.");break t}ue.Vb=De}De=ue.Ec,qe=ue.Fc,ue.Ac=De,ue.Bc=qe,qe+=Fe,ue.Gd=o(Lt,Ga),ue.Hd=0,ue.rb=o(pt+1,Vl),ue.sb=1,ue.wa=on?o(on,Ya):null,ue.Y=0,ue.D.Nb=0,ue.D.wa=ue.wa,ue.D.Y=ue.Y,0<ue.Aa&&(ue.D.Y+=We),t(!0),ue.oc=De,ue.pc=qe,qe+=832,ue.ya=o(Nt,uf),ue.aa=0,ue.D.ya=ue.ya,ue.D.aa=ue.aa,ue.Aa==2&&(ue.D.aa+=We),ue.R=16*We,ue.B=8*We,We=(Lt=yu[ue.L])*ue.R,Lt=Lt/2*ue.B,ue.sa=De,ue.ta=qe+We,ue.qa=ue.sa,ue.ra=ue.ta+16*je*ue.R+Lt,ue.Ha=ue.qa,ue.Ia=ue.ra+8*je*ue.B+Lt,ue.$c=0,qe+=Te,ue.mb=Ie?De:null,ue.nb=Ie?qe:null,t(qe+Ie<=ue.Fc+ue.Vb),Hc(ue),i(ue.Ac,ue.Bc,0,Fe),je=1}}if(je){if(Ne.ka=0,Ne.y=ue.sa,Ne.O=ue.ta,Ne.f=ue.qa,Ne.N=ue.ra,Ne.ea=ue.Ha,Ne.Vd=ue.Ia,Ne.fa=ue.R,Ne.Rc=ue.B,Ne.F=null,Ne.J=0,!Py){for(je=-255;255>=je;++je)_y[255+je]=0>je?-je:je;for(je=-1020;1020>=je;++je)Ny[1020+je]=-128>je?-128:127<je?127:je;for(je=-112;112>=je;++je)ky[112+je]=-16>je?-16:15<je?15:je;for(je=-255;510>=je;++je)Ay[255+je]=0>je?0:255<je?255:je;Py=1}ec=Gc,cu=Yc,Sa=ys,In=df,Xn=Mn,Lr=Wd,Rr=Ji,ri=yo,Ho=Q,Zd=fe,Nf=vf,sl=O,zp=ye,kf=Ae,Vp=el,by=Hl,eh=Xd,uu=eu,bo[0]=$p,bo[1]=Hd,bo[2]=xs,bo[3]=xy,bo[4]=Xa,bo[5]=qp,bo[6]=Zs,bo[7]=mf,bo[8]=Yd,bo[9]=Xc,fa[0]=vs,fa[1]=Bp,fa[2]=hf,fa[3]=pf,fa[4]=ba,fa[5]=ho,fa[6]=Kc,_a[0]=gf,_a[1]=Fp,_a[2]=Uo,_a[3]=Qc,_a[4]=Kd,_a[5]=Gd,_a[6]=yf,je=1}else je=0}je&&(je=(function(wn,Ir){for(wn.M=0;wn.M<wn.Va;++wn.M){var ln,mt=wn.Jc[wn.M&wn.Xb],ot=wn.m,Yr=wn;for(ln=0;ln<Yr.za;++ln){var Yt=ot,vn=Yr,fr=vn.Ac,_i=vn.Bc+4*ln,ii=vn.zc,jr=vn.ya[vn.aa+ln];if(vn.Qa.Bb?jr.$b=xe(Yt,vn.Pa.jb[0])?2+xe(Yt,vn.Pa.jb[2]):xe(Yt,vn.Pa.jb[1]):jr.$b=0,vn.kc&&(jr.Ad=xe(Yt,vn.Bd)),jr.Za=!xe(Yt,145)+0,jr.Za){var pi=jr.Ob,Ni=0;for(vn=0;4>vn;++vn){var br,_n=ii[0+vn];for(br=0;4>br;++br){_n=G5[fr[_i+br]][_n];for(var Dn=R1[xe(Yt,_n[0])];0<Dn;)Dn=R1[2*Dn+xe(Yt,_n[Dn])];_n=-Dn,fr[_i+br]=_n}r(pi,Ni,fr,_i,4),Ni+=4,ii[0+vn]=_n}}else _n=xe(Yt,156)?xe(Yt,128)?1:3:xe(Yt,163)?2:0,jr.Ob[0]=_n,i(fr,_i,_n,4),i(ii,0,_n,4);jr.Dd=xe(Yt,142)?xe(Yt,114)?xe(Yt,183)?1:3:2:0}if(Yr.m.Ka)return ti(wn,7,"Premature end-of-partition0 encountered.");for(;wn.ja<wn.za;++wn.ja){if(Yr=mt,Yt=(ot=wn).rb[ot.sb-1],fr=ot.rb[ot.sb+ot.ja],ln=ot.ya[ot.aa+ot.ja],_i=ot.kc?ln.Ad:0)Yt.la=fr.la=0,ln.Za||(Yt.Na=fr.Na=0),ln.Hc=0,ln.Gc=0,ln.ia=0;else{var wr,Fn;if(Yt=fr,fr=Yr,_i=ot.Pa.Xc,ii=ot.ya[ot.aa+ot.ja],jr=ot.pb[ii.$b],vn=ii.ad,pi=0,Ni=ot.rb[ot.sb-1],_n=br=0,i(vn,pi,0,384),ii.Za)var Dr=0,Fr=_i[3];else{Dn=a(16);var rr=Yt.Na+Ni.Na;if(rr=pu(fr,_i[1],rr,jr.Eb,0,Dn,0),Yt.Na=Ni.Na=(0<rr)+0,1<rr)ec(Dn,0,vn,pi);else{var ea=Dn[0]+3>>3;for(Dn=0;256>Dn;Dn+=16)vn[pi+Dn]=ea}Dr=1,Fr=_i[0]}var Jn=15&Yt.la,ir=15&Ni.la;for(Dn=0;4>Dn;++Dn){var ai=1&ir;for(ea=Fn=0;4>ea;++ea)Jn=Jn>>1|(ai=(rr=pu(fr,Fr,rr=ai+(1&Jn),jr.Sc,Dr,vn,pi))>Dr)<<7,Fn=Fn<<2|(3<rr?3:1<rr?2:vn[pi+0]!=0),pi+=16;Jn>>=4,ir=ir>>1|ai<<7,br=(br<<8|Fn)>>>0}for(Fr=Jn,Dr=ir>>4,wr=0;4>wr;wr+=2){for(Fn=0,Jn=Yt.la>>4+wr,ir=Ni.la>>4+wr,Dn=0;2>Dn;++Dn){for(ai=1&ir,ea=0;2>ea;++ea)rr=ai+(1&Jn),Jn=Jn>>1|(ai=0<(rr=pu(fr,_i[2],rr,jr.Qc,0,vn,pi)))<<3,Fn=Fn<<2|(3<rr?3:1<rr?2:vn[pi+0]!=0),pi+=16;Jn>>=2,ir=ir>>1|ai<<5}_n|=Fn<<4*wr,Fr|=Jn<<4<<wr,Dr|=(240&ir)<<wr}Yt.la=Fr,Ni.la=Dr,ii.Hc=br,ii.Gc=_n,ii.ia=43690&_n?0:jr.ia,_i=!(br|_n)}if(0<ot.L&&(ot.wa[ot.Y+ot.ja]=ot.gd[ln.$b][ln.Za],ot.wa[ot.Y+ot.ja].La|=!_i),Yr.Ka)return ti(wn,7,"Premature end-of-file encountered.")}if(Hc(wn),ot=Ir,Yr=1,ln=(mt=wn).D,Yt=0<mt.L&&mt.M>=mt.zb&&mt.M<=mt.Va,mt.Aa==0)t:{if(ln.M=mt.M,ln.uc=Yt,Qa(mt,ln),Yr=1,ln=(Fn=mt.D).Nb,Yt=(_n=yu[mt.L])*mt.R,fr=_n/2*mt.B,Dn=16*ln*mt.R,ea=8*ln*mt.B,_i=mt.sa,ii=mt.ta-Yt+Dn,jr=mt.qa,vn=mt.ra-fr+ea,pi=mt.Ha,Ni=mt.Ia-fr+ea,ir=(Jn=Fn.M)==0,br=Jn>=mt.Va-1,mt.Aa==2&&Qa(mt,Fn),Fn.uc)for(ai=(rr=mt).D.M,t(rr.D.uc),Fn=rr.yb;Fn<rr.Hb;++Fn){Dr=Fn,Fr=ai;var $i=(Pa=(Xr=rr).D).Nb;wr=Xr.R;var Pa=Pa.wa[Pa.Y+Dr],Gr=Xr.sa,Kr=Xr.ta+16*$i*wr+16*Dr,ta=Pa.dd,ar=Pa.tc;if(ar!=0)if(t(3<=ar),Xr.L==1)0<Dr&&by(Gr,Kr,wr,ar+4),Pa.La&&uu(Gr,Kr,wr,ar),0<Fr&&Vp(Gr,Kr,wr,ar+4),Pa.La&&eh(Gr,Kr,wr,ar);else{var na=Xr.B,wo=Xr.qa,Go=Xr.ra+8*$i*na+8*Dr,ki=Xr.Ha,Xr=Xr.Ia+8*$i*na+8*Dr;$i=Pa.ld,0<Dr&&(ri(Gr,Kr,wr,ar+4,ta,$i),Zd(wo,Go,ki,Xr,na,ar+4,ta,$i)),Pa.La&&(sl(Gr,Kr,wr,ar,ta,$i),kf(wo,Go,ki,Xr,na,ar,ta,$i)),0<Fr&&(Rr(Gr,Kr,wr,ar+4,ta,$i),Ho(wo,Go,ki,Xr,na,ar+4,ta,$i)),Pa.La&&(Nf(Gr,Kr,wr,ar,ta,$i),zp(wo,Go,ki,Xr,na,ar,ta,$i))}}if(mt.ia&&alert("todo:DitherRow"),ot.put!=null){if(Fn=16*Jn,Jn=16*(Jn+1),ir?(ot.y=mt.sa,ot.O=mt.ta+Dn,ot.f=mt.qa,ot.N=mt.ra+ea,ot.ea=mt.Ha,ot.W=mt.Ia+ea):(Fn-=_n,ot.y=_i,ot.O=ii,ot.f=jr,ot.N=vn,ot.ea=pi,ot.W=Ni),br||(Jn-=_n),Jn>ot.o&&(Jn=ot.o),ot.F=null,ot.J=null,mt.Fa!=null&&0<mt.Fa.length&&Fn<Jn&&(ot.J=ur(mt,ot,Fn,Jn-Fn),ot.F=mt.mb,ot.F==null&&ot.F.length==0)){Yr=ti(mt,3,"Could not decode alpha data.");break t}Fn<ot.j&&(_n=ot.j-Fn,Fn=ot.j,t(!(1&_n)),ot.O+=mt.R*_n,ot.N+=mt.B*(_n>>1),ot.W+=mt.B*(_n>>1),ot.F!=null&&(ot.J+=ot.width*_n)),Fn<Jn&&(ot.O+=ot.v,ot.N+=ot.v>>1,ot.W+=ot.v>>1,ot.F!=null&&(ot.J+=ot.v),ot.ka=Fn-ot.j,ot.U=ot.va-ot.v,ot.T=Jn-Fn,Yr=ot.put(ot))}ln+1!=mt.Ic||br||(r(mt.sa,mt.ta-Yt,_i,ii+16*mt.R,Yt),r(mt.qa,mt.ra-fr,jr,vn+8*mt.B,fr),r(mt.Ha,mt.Ia-fr,pi,Ni+8*mt.B,fr))}if(!Yr)return ti(wn,6,"Output aborted.")}return 1})(ue,Ne)),Ne.bc!=null&&Ne.bc(Ne),je&=1}return je?(ue.cb=0,je):0})(S,U)||(A=S.a)}}else A=S.a}A==0&&ne.Oa!=null&&ne.Oa.fd&&(A=wf(ne.ba))}ne=A}ee=ne!=0?null:11>ee?ie.f.RGBA.eb:ie.f.kb.y}else ee=null;return ee};var ch=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(D,H){for(var M="",F=0;F<4;F++)M+=String.fromCharCode(D[H++]);return M}function f(D,H){return D[H+0]|D[H+1]<<8}function h(D,H){return(D[H+0]|D[H+1]<<8|D[H+2]<<16)>>>0}function g(D,H){return(D[H+0]|D[H+1]<<8|D[H+2]<<16|D[H+3]<<24)>>>0}new l;var m=[0],b=[0],y=[],x=new l,w=e,_=(function(D,H){var M={},F=0,W=!1,V=0,X=0;if(M.frames=[],!(function($,q){for(var re=0;re<4;re++)if($[q+re]!="RIFF".charCodeAt(re))return!0;return!1})(D,H)){for(g(D,H+=4),H+=8;H<D.length;){var Y=c(D,H),Z=g(D,H+=4);H+=4;var K=Z+(1&Z);switch(Y){case"VP8 ":case"VP8L":M.frames[F]===void 0&&(M.frames[F]={}),(te=M.frames[F]).src_off=W?X:H-8,te.src_size=V+Z+8,F++,W&&(W=!1,V=0,X=0);break;case"VP8X":(te=M.header={}).feature_flags=D[H];var se=H+4;te.canvas_width=1+h(D,se),se+=3,te.canvas_height=1+h(D,se),se+=3;break;case"ALPH":W=!0,V=K+8,X=H-8;break;case"ANIM":(te=M.header).bgcolor=g(D,H),se=H+4,te.loop_count=f(D,se),se+=2;break;case"ANMF":var z,te;(te=M.frames[F]={}).offset_x=2*h(D,H),H+=3,te.offset_y=2*h(D,H),H+=3,te.width=1+h(D,H),H+=3,te.height=1+h(D,H),H+=3,te.duration=h(D,H),H+=3,z=D[H++],te.dispose=1&z,te.blend=z>>1&1}Y!="ANMF"&&(H+=K)}return M}})(w,0);_.response=w,_.rgbaoutput=!0,_.dataurl=!1;var k=_.header?_.header:null,P=_.frames?_.frames:null;if(k){k.loop_counter=k.loop_count,m=[k.canvas_height],b=[k.canvas_width];for(var C=0;C<P.length&&P[C].blend!=0;C++);}var j=P[0],L=x.WebPDecodeRGBA(w,j.src_off,j.src_size,b,m);j.rgba=L,j.imgwidth=b[0],j.imgheight=m[0];for(var R=0;R<b[0]*m[0]*4;R++)y[R]=L[R];return this.width=b,this.height=m,this.data=y,this}/** ====================================================================
* @license
* jsPDF XMP metadata plugin
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/function gBe(){var e,t=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?n:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e.length+" >>"),this.internal.write("stream"),this.internal.write(e),this.internal.write("endstream"),this.internal.write("endobj")}function yBe(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(e){var t,n,r,i,a,o,s,l,c,f=function($){return $=$||{},this.isStrokeTransparent=$.isStrokeTransparent||!1,this.strokeOpacity=$.strokeOpacity||1,this.strokeStyle=$.strokeStyle||"#000000",this.fillStyle=$.fillStyle||"#000000",this.isFillTransparent=$.isFillTransparent||!1,this.fillOpacity=$.fillOpacity||1,this.font=$.font||"10px sans-serif",this.textBaseline=$.textBaseline||"alphabetic",this.textAlign=$.textAlign||"left",this.lineWidth=$.lineWidth||1,this.lineJoin=$.lineJoin||"miter",this.lineCap=$.lineCap||"butt",this.path=$.path||[],this.transform=$.transform!==void 0?$.transform.clone():new l,this.globalCompositeOperation=$.globalCompositeOperation||"normal",this.globalAlpha=$.globalAlpha||1,this.clip_path=$.clip_path||[],this.currentPoint=$.currentPoint||new o,this.miterLimit=$.miterLimit||10,this.lastPoint=$.lastPoint||new o,this.lineDashOffset=$.lineDashOffset||0,this.lineDash=$.lineDash||[],this.margin=$.margin||[0,0,0,0],this.prevPageLastElemOffset=$.prevPageLastElemOffset||0,this.ignoreClearRect=typeof $.ignoreClearRect!="boolean"||$.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new h(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,l=this.internal.Matrix,c=new f}]);var h=function($){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var q=$;Object.defineProperty(this,"pdf",{get:function(){return q}});var re=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return re},set:function(oe){re=!!oe}});var le=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return le},set:function(oe){le=!!oe}});var de=0;Object.defineProperty(this,"posX",{get:function(){return de},set:function(oe){isNaN(oe)||(de=oe)}});var pe=0;Object.defineProperty(this,"posY",{get:function(){return pe},set:function(oe){isNaN(oe)||(pe=oe)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(oe){var Ke;typeof oe=="number"?Ke=[oe,oe,oe,oe]:((Ke=new Array(4))[0]=oe[0],Ke[1]=oe.length>=2?oe[1]:Ke[0],Ke[2]=oe.length>=3?oe[2]:Ke[0],Ke[3]=oe.length>=4?oe[3]:Ke[1]),c.margin=Ke}});var ve=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ve},set:function(oe){ve=oe}});var he=0;Object.defineProperty(this,"lastBreak",{get:function(){return he},set:function(oe){he=oe}});var xe=[];Object.defineProperty(this,"pageBreaks",{get:function(){return xe},set:function(oe){xe=oe}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(oe){oe instanceof f&&(c=oe)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(oe){c.path=oe}});var Pe=[];Object.defineProperty(this,"ctxStack",{get:function(){return Pe},set:function(oe){Pe=oe}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(oe){var Ke;Ke=g(oe),this.ctx.fillStyle=Ke.style,this.ctx.isFillTransparent=Ke.a===0,this.ctx.fillOpacity=Ke.a,this.pdf.setFillColor(Ke.r,Ke.g,Ke.b,{a:Ke.a}),this.pdf.setTextColor(Ke.r,Ke.g,Ke.b,{a:Ke.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(oe){var Ke=g(oe);this.ctx.strokeStyle=Ke.style,this.ctx.isStrokeTransparent=Ke.a===0,this.ctx.strokeOpacity=Ke.a,Ke.a===0?this.pdf.setDrawColor(255,255,255):(Ke.a,this.pdf.setDrawColor(Ke.r,Ke.g,Ke.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(oe){["butt","round","square"].indexOf(oe)!==-1&&(this.ctx.lineCap=oe,this.pdf.setLineCap(oe))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(oe){isNaN(oe)||(this.ctx.lineWidth=oe,this.pdf.setLineWidth(oe))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(oe){["bevel","round","miter"].indexOf(oe)!==-1&&(this.ctx.lineJoin=oe,this.pdf.setLineJoin(oe))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(oe){isNaN(oe)||(this.ctx.miterLimit=oe,this.pdf.setMiterLimit(oe))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(oe){this.ctx.textBaseline=oe}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(oe){["right","end","center","left","start"].indexOf(oe)!==-1&&(this.ctx.textAlign=oe)}});var Se=null,Ue=null,Ye=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ye},set:function(oe){Se=null,Ue=null,Ye=oe}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(oe){var Ke;if(this.ctx.font=oe,(Ke=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(oe))!==null){var ht=Ke[1];Ke[2];var gt=Ke[3],ze=Ke[4];Ke[5];var St=Ke[6],st=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(ze)[2];ze=Math.floor(st==="px"?parseFloat(ze)*this.pdf.internal.scaleFactor:st==="em"?parseFloat(ze)*this.pdf.getFontSize():parseFloat(ze)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(ze);var xt=(function(ct){var Wn,nn,Gt=[],Qt=ct.trim();if(Qt==="")return sj;if(Qt in Vq)return[Vq[Qt]];for(;Qt!=="";){switch(nn=null,Wn=(Qt=Hq(Qt)).charAt(0)){case'"':case"'":nn=uBe(Qt.substring(1),Wn);break;default:nn=fBe(Qt)}if(nn===null||(Gt.push(nn[0]),(Qt=Hq(nn[1]))!==""&&Qt.charAt(0)!==","))return sj;Qt=Qt.replace(/^,/,"")}return Gt})(St);if(this.fontFaces){var Ct=(function(ct,Wn){var nn=ct.getFontList(),Gt=JSON.stringify(nn);if(Se===null||Ue!==Gt){var Qt=(function(un){var kt=[];return Object.keys(un).forEach(function(gn){un[gn].forEach(function(Bt){var Jt=null;switch(Bt){case"bold":Jt={family:gn,weight:"bold"};break;case"italic":Jt={family:gn,style:"italic"};break;case"bolditalic":Jt={family:gn,weight:"bold",style:"italic"};break;case"":case"normal":Jt={family:gn}}Jt!==null&&(Jt.ref={name:gn,style:Bt},kt.push(Jt))})}),kt})(nn);Se=(function(un){for(var kt={},gn=0;gn<un.length;++gn){var Bt=oj(un[gn]),Jt=Bt.family,Hn=Bt.stretch,an=Bt.style,$t=Bt.weight;kt[Jt]=kt[Jt]||{},kt[Jt][Hn]=kt[Jt][Hn]||{},kt[Jt][Hn][an]=kt[Jt][Hn][an]||{},kt[Jt][Hn][an][$t]=Bt}return kt})(Qt.concat(Wn)),Ue=Gt}return Se})(this.pdf,this.fontFaces),bn=xt.map(function(ct){return{family:ct,stretch:"normal",weight:gt,style:ht}}),sn=(function(ct,Wn,nn){for(var Gt=(nn=nn||{}).defaultFontFamily||"times",Qt=Object.assign({},cBe,nn.genericFontFamilies||{}),un=null,kt=null,gn=0;gn<Wn.length;++gn)if(Qt[(un=oj(Wn[gn])).family]&&(un.family=Qt[un.family]),ct.hasOwnProperty(un.family)){kt=ct[un.family];break}if(!(kt=kt||ct[Gt]))throw new Error("Could not find a font-family for the rule '"+Wq(un)+"' and default family '"+Gt+"'.");if(kt=(function(Bt,Jt){if(Jt[Bt])return Jt[Bt];var Hn=fE[Bt],an=Hn<=fE.normal?-1:1,$t=zq(Jt,VZ,Hn,an);if(!$t)throw new Error("Could not find a matching font-stretch value for "+Bt);return $t})(un.stretch,kt),kt=(function(Bt,Jt){if(Jt[Bt])return Jt[Bt];for(var Hn=zZ[Bt],an=0;an<Hn.length;++an)if(Jt[Hn[an]])return Jt[Hn[an]];throw new Error("Could not find a matching font-style for "+Bt)})(un.style,kt),!(kt=(function(Bt,Jt){if(Jt[Bt])return Jt[Bt];if(Bt===400&&Jt[500])return Jt[500];if(Bt===500&&Jt[400])return Jt[400];var Hn=lBe[Bt],an=zq(Jt,WZ,Hn,Bt<400?-1:1);if(!an)throw new Error("Could not find a matching font-weight for value "+Bt);return an})(un.weight,kt)))throw new Error("Failed to resolve a font for the rule '"+Wq(un)+"'.");return kt})(Ct,bn);this.pdf.setFont(sn.ref.name,sn.ref.style)}else{var Ee="";(gt==="bold"||parseInt(gt,10)>=700||ht==="bold")&&(Ee="bold"),ht==="italic"&&(Ee+="italic"),Ee.length===0&&(Ee="normal");for(var Ve="",at={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Ze=0;Ze<xt.length;Ze++){if(this.pdf.internal.getFont(xt[Ze],Ee,{noFallback:!0,disableWarning:!0})!==void 0){Ve=xt[Ze];break}if(Ee==="bolditalic"&&this.pdf.internal.getFont(xt[Ze],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Ve=xt[Ze],Ee="bold";else if(this.pdf.internal.getFont(xt[Ze],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Ve=xt[Ze],Ee="normal";break}}if(Ve===""){for(var lt=0;lt<xt.length;lt++)if(at[xt[lt]]){Ve=at[xt[lt]];break}}Ve=Ve===""?"Times":Ve,this.pdf.setFont(Ve,Ee)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(oe){this.ctx.globalCompositeOperation=oe}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(oe){this.ctx.globalAlpha=oe}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(oe){this.ctx.lineDashOffset=oe,te.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(oe){this.ctx.lineDash=oe,te.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(oe){this.ctx.ignoreClearRect=!!oe}})};h.prototype.setLineDash=function($){this.lineDash=$},h.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},h.prototype.fill=function(){P.call(this,"fill",!1)},h.prototype.stroke=function(){P.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function($,q){if(isNaN($)||isNaN(q))throw gr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var re=this.ctx.transform.applyToPoint(new o($,q));this.path.push({type:"mt",x:re.x,y:re.y}),this.ctx.lastPoint=new o($,q)},h.prototype.closePath=function(){var $=new o(0,0),q=0;for(q=this.path.length-1;q!==-1;q--)if(this.path[q].type==="begin"&&lr(this.path[q+1])==="object"&&typeof this.path[q+1].x=="number"){$=new o(this.path[q+1].x,this.path[q+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o($.x,$.y)},h.prototype.lineTo=function($,q){if(isNaN($)||isNaN(q))throw gr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var re=this.ctx.transform.applyToPoint(new o($,q));this.path.push({type:"lt",x:re.x,y:re.y}),this.ctx.lastPoint=new o(re.x,re.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),P.call(this,null,!0)},h.prototype.quadraticCurveTo=function($,q,re,le){if(isNaN(re)||isNaN(le)||isNaN($)||isNaN(q))throw gr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var de=this.ctx.transform.applyToPoint(new o(re,le)),pe=this.ctx.transform.applyToPoint(new o($,q));this.path.push({type:"qct",x1:pe.x,y1:pe.y,x:de.x,y:de.y}),this.ctx.lastPoint=new o(de.x,de.y)},h.prototype.bezierCurveTo=function($,q,re,le,de,pe){if(isNaN(de)||isNaN(pe)||isNaN($)||isNaN(q)||isNaN(re)||isNaN(le))throw gr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ve=this.ctx.transform.applyToPoint(new o(de,pe)),he=this.ctx.transform.applyToPoint(new o($,q)),xe=this.ctx.transform.applyToPoint(new o(re,le));this.path.push({type:"bct",x1:he.x,y1:he.y,x2:xe.x,y2:xe.y,x:ve.x,y:ve.y}),this.ctx.lastPoint=new o(ve.x,ve.y)},h.prototype.arc=function($,q,re,le,de,pe){if(isNaN($)||isNaN(q)||isNaN(re)||isNaN(le)||isNaN(de))throw gr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(pe=!!pe,!this.ctx.transform.isIdentity){var ve=this.ctx.transform.applyToPoint(new o($,q));$=ve.x,q=ve.y;var he=this.ctx.transform.applyToPoint(new o(0,re)),xe=this.ctx.transform.applyToPoint(new o(0,0));re=Math.sqrt(Math.pow(he.x-xe.x,2)+Math.pow(he.y-xe.y,2))}Math.abs(de-le)>=2*Math.PI&&(le=0,de=2*Math.PI),this.path.push({type:"arc",x:$,y:q,radius:re,startAngle:le,endAngle:de,counterclockwise:pe})},h.prototype.arcTo=function($,q,re,le,de){throw new Error("arcTo not implemented.")},h.prototype.rect=function($,q,re,le){if(isNaN($)||isNaN(q)||isNaN(re)||isNaN(le))throw gr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo($,q),this.lineTo($+re,q),this.lineTo($+re,q+le),this.lineTo($,q+le),this.lineTo($,q),this.lineTo($+re,q),this.lineTo($,q)},h.prototype.fillRect=function($,q,re,le){if(isNaN($)||isNaN(q)||isNaN(re)||isNaN(le))throw gr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.call(this)){var de={};this.lineCap!=="butt"&&(de.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(de.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect($,q,re,le),this.fill(),de.hasOwnProperty("lineCap")&&(this.lineCap=de.lineCap),de.hasOwnProperty("lineJoin")&&(this.lineJoin=de.lineJoin)}},h.prototype.strokeRect=function($,q,re,le){if(isNaN($)||isNaN(q)||isNaN(re)||isNaN(le))throw gr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");b.call(this)||(this.beginPath(),this.rect($,q,re,le),this.stroke())},h.prototype.clearRect=function($,q,re,le){if(isNaN($)||isNaN(q)||isNaN(re)||isNaN(le))throw gr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect($,q,re,le))},h.prototype.save=function($){$=typeof $!="boolean"||$;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,re=0;re<this.pdf.internal.getNumberOfPages();re++)this.pdf.setPage(re+1),this.pdf.internal.out("q");if(this.pdf.setPage(q),$){this.ctx.fontSize=this.pdf.internal.getFontSize();var le=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=le}},h.prototype.restore=function($){$=typeof $!="boolean"||$;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,re=0;re<this.pdf.internal.getNumberOfPages();re++)this.pdf.setPage(re+1),this.pdf.internal.out("Q");this.pdf.setPage(q),$&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=function($){var q,re,le,de;if($.isCanvasGradient===!0&&($=$.getColor()),!$)return{r:0,g:0,b:0,a:0,style:$};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test($))q=0,re=0,le=0,de=0;else{var pe=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec($);if(pe!==null)q=parseInt(pe[1]),re=parseInt(pe[2]),le=parseInt(pe[3]),de=1;else if((pe=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec($))!==null)q=parseInt(pe[1]),re=parseInt(pe[2]),le=parseInt(pe[3]),de=parseFloat(pe[4]);else{if(de=1,typeof $=="string"&&$.charAt(0)!=="#"){var ve=new IZ($);$=ve.ok?ve.toHex():"#000000"}$.length===4?(q=$.substring(1,2),q+=q,re=$.substring(2,3),re+=re,le=$.substring(3,4),le+=le):(q=$.substring(1,3),re=$.substring(3,5),le=$.substring(5,7)),q=parseInt(q,16),re=parseInt(re,16),le=parseInt(le,16)}}return{r:q,g:re,b:le,a:de,style:$}},m=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},b=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};h.prototype.fillText=function($,q,re,le){if(isNaN(q)||isNaN(re)||typeof $!="string")throw gr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(le=isNaN(le)?void 0:le,!m.call(this)){var de=K(this.ctx.transform.rotation),pe=this.ctx.transform.scaleX;F.call(this,{text:$,x:q,y:re,scale:pe,angle:de,align:this.textAlign,maxWidth:le})}},h.prototype.strokeText=function($,q,re,le){if(isNaN(q)||isNaN(re)||typeof $!="string")throw gr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!b.call(this)){le=isNaN(le)?void 0:le;var de=K(this.ctx.transform.rotation),pe=this.ctx.transform.scaleX;F.call(this,{text:$,x:q,y:re,scale:pe,renderingMode:"stroke",angle:de,align:this.textAlign,maxWidth:le})}},h.prototype.measureText=function($){if(typeof $!="string")throw gr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var q=this.pdf,re=this.pdf.internal.scaleFactor,le=q.internal.getFontSize(),de=q.getStringUnitWidth($)*le/q.internal.scaleFactor;return new function(pe){var ve=(pe=pe||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ve}}),this}({width:de*=Math.round(96*re/72*1e4)/1e4})},h.prototype.scale=function($,q){if(isNaN($)||isNaN(q))throw gr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var re=new l($,0,0,q,0,0);this.ctx.transform=this.ctx.transform.multiply(re)},h.prototype.rotate=function($){if(isNaN($))throw gr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var q=new l(Math.cos($),Math.sin($),-Math.sin($),Math.cos($),0,0);this.ctx.transform=this.ctx.transform.multiply(q)},h.prototype.translate=function($,q){if(isNaN($)||isNaN(q))throw gr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var re=new l(1,0,0,1,$,q);this.ctx.transform=this.ctx.transform.multiply(re)},h.prototype.transform=function($,q,re,le,de,pe){if(isNaN($)||isNaN(q)||isNaN(re)||isNaN(le)||isNaN(de)||isNaN(pe))throw gr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ve=new l($,q,re,le,de,pe);this.ctx.transform=this.ctx.transform.multiply(ve)},h.prototype.setTransform=function($,q,re,le,de,pe){$=isNaN($)?1:$,q=isNaN(q)?0:q,re=isNaN(re)?0:re,le=isNaN(le)?1:le,de=isNaN(de)?0:de,pe=isNaN(pe)?0:pe,this.ctx.transform=new l($,q,re,le,de,pe)};var y=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};h.prototype.drawImage=function($,q,re,le,de,pe,ve,he,xe){var Pe=this.pdf.getImageProperties($),Se=1,Ue=1,Ye=1,oe=1;le!==void 0&&he!==void 0&&(Ye=he/le,oe=xe/de,Se=Pe.width/le*he/le,Ue=Pe.height/de*xe/de),pe===void 0&&(pe=q,ve=re,q=0,re=0),le!==void 0&&he===void 0&&(he=le,xe=de),le===void 0&&he===void 0&&(he=Pe.width,xe=Pe.height);var Ke=this.ctx.transform.decompose(),ht=K(Ke.rotate.shx),gt=new l,ze=(gt=(gt=(gt=gt.multiply(Ke.translate)).multiply(Ke.skew)).multiply(Ke.scale)).applyToRectangle(new s(pe-q*Ye,ve-re*oe,le*Se,de*Ue));if(this.autoPaging){for(var St,st=x.call(this,ze),xt=[],Ct=0;Ct<st.length;Ct+=1)xt.indexOf(st[Ct])===-1&&xt.push(st[Ct]);k(xt);for(var bn=xt[0],sn=xt[xt.length-1],Ee=bn;Ee<sn+1;Ee++){this.pdf.setPage(Ee);var Ve=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],at=Ee===1?this.posY+this.margin[0]:this.margin[0],Ze=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],lt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ct=Ee===1?0:Ze+(Ee-2)*lt;if(this.ctx.clip_path.length!==0){var Wn=this.path;St=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(St,this.posX+this.margin[3],-ct+at+this.ctx.prevPageLastElemOffset),C.call(this,"fill",!0),this.path=Wn}var nn=JSON.parse(JSON.stringify(ze));nn=_([nn],this.posX+this.margin[3],-ct+at+this.ctx.prevPageLastElemOffset)[0];var Gt=(Ee>bn||Ee<sn)&&y.call(this);Gt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ve,lt,null).clip().discardPath()),this.pdf.addImage($,"JPEG",nn.x,nn.y,nn.w,nn.h,null,null,ht),Gt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage($,"JPEG",ze.x,ze.y,ze.w,ze.h,null,null,ht)};var x=function($,q,re){var le=[];q=q||this.pdf.internal.pageSize.width,re=re||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var de=this.posY+this.ctx.prevPageLastElemOffset;switch($.type){default:case"mt":case"lt":le.push(Math.floor(($.y+de)/re)+1);break;case"arc":le.push(Math.floor(($.y+de-$.radius)/re)+1),le.push(Math.floor(($.y+de+$.radius)/re)+1);break;case"qct":var pe=se(this.ctx.lastPoint.x,this.ctx.lastPoint.y,$.x1,$.y1,$.x,$.y);le.push(Math.floor((pe.y+de)/re)+1),le.push(Math.floor((pe.y+pe.h+de)/re)+1);break;case"bct":var ve=z(this.ctx.lastPoint.x,this.ctx.lastPoint.y,$.x1,$.y1,$.x2,$.y2,$.x,$.y);le.push(Math.floor((ve.y+de)/re)+1),le.push(Math.floor((ve.y+ve.h+de)/re)+1);break;case"rect":le.push(Math.floor(($.y+de)/re)+1),le.push(Math.floor(($.y+$.h+de)/re)+1)}for(var he=0;he<le.length;he+=1)for(;this.pdf.internal.getNumberOfPages()<le[he];)w.call(this);return le},w=function(){var $=this.fillStyle,q=this.strokeStyle,re=this.font,le=this.lineCap,de=this.lineWidth,pe=this.lineJoin;this.pdf.addPage(),this.fillStyle=$,this.strokeStyle=q,this.font=re,this.lineCap=le,this.lineWidth=de,this.lineJoin=pe},_=function($,q,re){for(var le=0;le<$.length;le++)switch($[le].type){case"bct":$[le].x2+=q,$[le].y2+=re;case"qct":$[le].x1+=q,$[le].y1+=re;default:$[le].x+=q,$[le].y+=re}return $},k=function($){return $.sort(function(q,re){return q-re})},P=function($,q){var re=this.fillStyle,le=this.strokeStyle,de=this.lineCap,pe=this.lineWidth,ve=Math.abs(pe*this.ctx.transform.scaleX),he=this.lineJoin;if(this.autoPaging){for(var xe,Pe,Se=JSON.parse(JSON.stringify(this.path)),Ue=JSON.parse(JSON.stringify(this.path)),Ye=[],oe=0;oe<Ue.length;oe++)if(Ue[oe].x!==void 0)for(var Ke=x.call(this,Ue[oe]),ht=0;ht<Ke.length;ht+=1)Ye.indexOf(Ke[ht])===-1&&Ye.push(Ke[ht]);for(var gt=0;gt<Ye.length;gt++)for(;this.pdf.internal.getNumberOfPages()<Ye[gt];)w.call(this);k(Ye);for(var ze=Ye[0],St=Ye[Ye.length-1],st=ze;st<St+1;st++){this.pdf.setPage(st),this.fillStyle=re,this.strokeStyle=le,this.lineCap=de,this.lineWidth=ve,this.lineJoin=he;var xt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ct=st===1?this.posY+this.margin[0]:this.margin[0],bn=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],sn=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ee=st===1?0:bn+(st-2)*sn;if(this.ctx.clip_path.length!==0){var Ve=this.path;xe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(xe,this.posX+this.margin[3],-Ee+Ct+this.ctx.prevPageLastElemOffset),C.call(this,$,!0),this.path=Ve}if(Pe=JSON.parse(JSON.stringify(Se)),this.path=_(Pe,this.posX+this.margin[3],-Ee+Ct+this.ctx.prevPageLastElemOffset),q===!1||st===0){var at=(st>ze||st<St)&&y.call(this);at&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],xt,sn,null).clip().discardPath()),C.call(this,$,q),at&&this.pdf.restoreGraphicsState()}this.lineWidth=pe}this.path=Se}else this.lineWidth=ve,C.call(this,$,q),this.lineWidth=pe},C=function($,q){if(($!=="stroke"||q||!b.call(this))&&($==="stroke"||q||!m.call(this))){for(var re,le,de=[],pe=this.path,ve=0;ve<pe.length;ve++){var he=pe[ve];switch(he.type){case"begin":de.push({begin:!0});break;case"close":de.push({close:!0});break;case"mt":de.push({start:he,deltas:[],abs:[]});break;case"lt":var xe=de.length;if(pe[ve-1]&&!isNaN(pe[ve-1].x)&&(re=[he.x-pe[ve-1].x,he.y-pe[ve-1].y],xe>0)){for(;xe>=0;xe--)if(de[xe-1].close!==!0&&de[xe-1].begin!==!0){de[xe-1].deltas.push(re),de[xe-1].abs.push(he);break}}break;case"bct":re=[he.x1-pe[ve-1].x,he.y1-pe[ve-1].y,he.x2-pe[ve-1].x,he.y2-pe[ve-1].y,he.x-pe[ve-1].x,he.y-pe[ve-1].y],de[de.length-1].deltas.push(re);break;case"qct":var Pe=pe[ve-1].x+2/3*(he.x1-pe[ve-1].x),Se=pe[ve-1].y+2/3*(he.y1-pe[ve-1].y),Ue=he.x+2/3*(he.x1-he.x),Ye=he.y+2/3*(he.y1-he.y),oe=he.x,Ke=he.y;re=[Pe-pe[ve-1].x,Se-pe[ve-1].y,Ue-pe[ve-1].x,Ye-pe[ve-1].y,oe-pe[ve-1].x,Ke-pe[ve-1].y],de[de.length-1].deltas.push(re);break;case"arc":de.push({deltas:[],abs:[],arc:!0}),Array.isArray(de[de.length-1].abs)&&de[de.length-1].abs.push(he)}}le=q?null:$==="stroke"?"stroke":"fill";for(var ht=!1,gt=0;gt<de.length;gt++)if(de[gt].arc)for(var ze=de[gt].abs,St=0;St<ze.length;St++){var st=ze[St];st.type==="arc"?R.call(this,st.x,st.y,st.radius,st.startAngle,st.endAngle,st.counterclockwise,void 0,q,!ht):W.call(this,st.x,st.y),ht=!0}else if(de[gt].close===!0)this.pdf.internal.out("h"),ht=!1;else if(de[gt].begin!==!0){var xt=de[gt].start.x,Ct=de[gt].start.y;V.call(this,de[gt].deltas,xt,Ct),ht=!0}le&&D.call(this,le),q&&H.call(this)}},j=function($){var q=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,re=q*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return $-re;case"top":return $+q-re;case"hanging":return $+q-2*re;case"middle":return $+q/2-re;default:return $}},L=function($){return $+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};h.prototype.createLinearGradient=function(){var $=function(){};return $.colorStops=[],$.addColorStop=function(q,re){this.colorStops.push([q,re])},$.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},$.isCanvasGradient=!0,$},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var R=function($,q,re,le,de,pe,ve,he,xe){for(var Pe=Y.call(this,re,le,de,pe),Se=0;Se<Pe.length;Se++){var Ue=Pe[Se];Se===0&&(xe?M.call(this,Ue.x1+$,Ue.y1+q):W.call(this,Ue.x1+$,Ue.y1+q)),X.call(this,$,q,Ue.x2,Ue.y2,Ue.x3,Ue.y3,Ue.x4,Ue.y4)}he?H.call(this):D.call(this,ve)},D=function($){switch($){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},H=function(){this.pdf.clip(),this.pdf.discardPath()},M=function($,q){this.pdf.internal.out(n($)+" "+r(q)+" m")},F=function($){var q;switch($.align){case"right":case"end":q="right";break;case"center":q="center";break;default:q="left"}var re,le,de,pe=this.pdf.getTextDimensions($.text),ve=j.call(this,$.y),he=L.call(this,ve)-pe.h,xe=this.ctx.transform.applyToPoint(new o($.x,ve));if(this.autoPaging){var Pe=this.ctx.transform.decompose(),Se=new l;Se=(Se=(Se=Se.multiply(Pe.translate)).multiply(Pe.skew)).multiply(Pe.scale);for(var Ue=this.ctx.transform.applyToRectangle(new s($.x,ve,pe.w,pe.h)),Ye=Se.applyToRectangle(new s($.x,he,pe.w,pe.h)),oe=x.call(this,Ye),Ke=[],ht=0;ht<oe.length;ht+=1)Ke.indexOf(oe[ht])===-1&&Ke.push(oe[ht]);k(Ke);for(var gt=Ke[0],ze=Ke[Ke.length-1],St=gt;St<ze+1;St++){this.pdf.setPage(St);var st=St===1?this.posY+this.margin[0]:this.margin[0],xt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ct=this.pdf.internal.pageSize.height-this.margin[2],bn=Ct-this.margin[0],sn=this.pdf.internal.pageSize.width-this.margin[1],Ee=sn-this.margin[3],Ve=St===1?0:xt+(St-2)*bn;if(this.ctx.clip_path.length!==0){var at=this.path;re=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(re,this.posX+this.margin[3],-1*Ve+st),C.call(this,"fill",!0),this.path=at}var Ze=_([JSON.parse(JSON.stringify(Ye))],this.posX+this.margin[3],-Ve+st+this.ctx.prevPageLastElemOffset)[0];$.scale>=.01&&(le=this.pdf.internal.getFontSize(),this.pdf.setFontSize(le*$.scale),de=this.lineWidth,this.lineWidth=de*$.scale);var lt=this.autoPaging!=="text";if(lt||Ze.y+Ze.h<=Ct){if(lt||Ze.y>=st&&Ze.x<=sn){var ct=lt?$.text:this.pdf.splitTextToSize($.text,$.maxWidth||sn-Ze.x)[0],Wn=_([JSON.parse(JSON.stringify(Ue))],this.posX+this.margin[3],-Ve+st+this.ctx.prevPageLastElemOffset)[0],nn=lt&&(St>gt||St<ze)&&y.call(this);nn&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ee,bn,null).clip().discardPath()),this.pdf.text(ct,Wn.x,Wn.y,{angle:$.angle,align:q,renderingMode:$.renderingMode}),nn&&this.pdf.restoreGraphicsState()}}else Ze.y<Ct&&(this.ctx.prevPageLastElemOffset+=Ct-Ze.y);$.scale>=.01&&(this.pdf.setFontSize(le),this.lineWidth=de)}}else $.scale>=.01&&(le=this.pdf.internal.getFontSize(),this.pdf.setFontSize(le*$.scale),de=this.lineWidth,this.lineWidth=de*$.scale),this.pdf.text($.text,xe.x+this.posX,xe.y+this.posY,{angle:$.angle,align:q,renderingMode:$.renderingMode,maxWidth:$.maxWidth}),$.scale>=.01&&(this.pdf.setFontSize(le),this.lineWidth=de)},W=function($,q,re,le){re=re||0,le=le||0,this.pdf.internal.out(n($+re)+" "+r(q+le)+" l")},V=function($,q,re){return this.pdf.lines($,q,re,null,null)},X=function($,q,re,le,de,pe,ve,he){this.pdf.internal.out([t(i(re+$)),t(a(le+q)),t(i(de+$)),t(a(pe+q)),t(i(ve+$)),t(a(he+q)),"c"].join(" "))},Y=function($,q,re,le){for(var de=2*Math.PI,pe=Math.PI/2;q>re;)q-=de;var ve=Math.abs(re-q);ve<de&&le&&(ve=de-ve);for(var he=[],xe=le?-1:1,Pe=q;ve>1e-5;){var Se=Pe+xe*Math.min(ve,pe);he.push(Z.call(this,$,Pe,Se)),ve-=Math.abs(Se-Pe),Pe=Se}return he},Z=function($,q,re){var le=(re-q)/2,de=$*Math.cos(le),pe=$*Math.sin(le),ve=de,he=-pe,xe=ve*ve+he*he,Pe=xe+ve*de+he*pe,Se=4/3*(Math.sqrt(2*xe*Pe)-Pe)/(ve*pe-he*de),Ue=ve-Se*he,Ye=he+Se*ve,oe=Ue,Ke=-Ye,ht=le+q,gt=Math.cos(ht),ze=Math.sin(ht);return{x1:$*Math.cos(q),y1:$*Math.sin(q),x2:Ue*gt-Ye*ze,y2:Ue*ze+Ye*gt,x3:oe*gt-Ke*ze,y3:oe*ze+Ke*gt,x4:$*Math.cos(re),y4:$*Math.sin(re)}},K=function($){return 180*$/Math.PI},se=function($,q,re,le,de,pe){var ve=$+.5*(re-$),he=q+.5*(le-q),xe=de+.5*(re-de),Pe=pe+.5*(le-pe),Se=Math.min($,de,ve,xe),Ue=Math.max($,de,ve,xe),Ye=Math.min(q,pe,he,Pe),oe=Math.max(q,pe,he,Pe);return new s(Se,Ye,Ue-Se,oe-Ye)},z=function($,q,re,le,de,pe,ve,he){var xe,Pe,Se,Ue,Ye,oe,Ke,ht,gt,ze,St,st,xt,Ct,bn=re-$,sn=le-q,Ee=de-re,Ve=pe-le,at=ve-de,Ze=he-pe;for(Pe=0;Pe<41;Pe++)gt=(Ke=(Se=$+(xe=Pe/40)*bn)+xe*((Ye=re+xe*Ee)-Se))+xe*(Ye+xe*(de+xe*at-Ye)-Ke),ze=(ht=(Ue=q+xe*sn)+xe*((oe=le+xe*Ve)-Ue))+xe*(oe+xe*(pe+xe*Ze-oe)-ht),Pe==0?(St=gt,st=ze,xt=gt,Ct=ze):(St=Math.min(St,gt),st=Math.min(st,ze),xt=Math.max(xt,gt),Ct=Math.max(Ct,ze));return new s(Math.round(St),Math.round(st),Math.round(xt-St),Math.round(Ct-st))},te=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var $,q,re=($=this.ctx.lineDash,q=this.ctx.lineDashOffset,JSON.stringify({lineDash:$,lineDashOffset:q}));this.prevLineDash!==re&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=re)}}})(It.API),(function(e){var t=function(o){var s,l,c,f,h,g,m,b,y,x;for(l=[],c=0,f=(o+=s="\0\0\0\0".slice(o.length%4||4)).length;f>c;c+=4)(h=(o.charCodeAt(c)<<24)+(o.charCodeAt(c+1)<<16)+(o.charCodeAt(c+2)<<8)+o.charCodeAt(c+3))!==0?(g=(h=((h=((h=((h=(h-(x=h%85))/85)-(y=h%85))/85)-(b=h%85))/85)-(m=h%85))/85)%85,l.push(g+33,m+33,b+33,y+33,x+33)):l.push(122);return(function(w,_){for(var k=_;k>0;k--)w.pop()})(l,s.length),String.fromCharCode.apply(String,l)+"~>"},n=function(o){var s,l,c,f,h,g=String,m="length",b=255,y="charCodeAt",x="slice",w="replace";for(o[x](-2),o=o[x](0,-2)[w](/\s/g,"")[w]("z","!!!!!"),c=[],f=0,h=(o+=s="uuuuu"[x](o[m]%5||5))[m];h>f;f+=5)l=52200625*(o[y](f)-33)+614125*(o[y](f+1)-33)+7225*(o[y](f+2)-33)+85*(o[y](f+3)-33)+(o[y](f+4)-33),c.push(b&l>>24,b&l>>16,b&l>>8,b&l);return(function(_,k){for(var P=k;P>0;P--)_.pop()})(c,s[m]),g.fromCharCode.apply(g,c)},r=function(o){return o.split("").map(function(s){return("0"+s.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(o){var s=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((o=o.replace(/\s/g,"")).indexOf(">")!==-1&&(o=o.substr(0,o.indexOf(">"))),o.length%2&&(o+="0"),s.test(o)===!1)return"";for(var l="",c=0;c<o.length;c+=2)l+=String.fromCharCode("0x"+(o[c]+o[c+1]));return l},a=function(o){for(var s=new Uint8Array(o.length),l=o.length;l--;)s[l]=o.charCodeAt(l);return(s=iE(s)).reduce(function(c,f){return c+String.fromCharCode(f)},"")};e.processDataByFilters=function(o,s){var l=0,c=o||"",f=[];for(typeof(s=s||[])=="string"&&(s=[s]),l=0;l<s.length;l+=1)switch(s[l]){case"ASCII85Decode":case"/ASCII85Decode":c=n(c),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":c=t(c),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":c=i(c),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":c=r(c),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":c=a(c),f.push("/FlateDecode");break;default:throw new Error('The filter: "'+s[l]+'" is not implemented')}return{data:c,reverseChain:f.reverse().join(" ")}}})(It.API),(function(e){e.loadFile=function(t,n,r){return(function(i,a,o){a=a!==!1,o=typeof o=="function"?o:function(){};var s=void 0;try{s=(function(l,c,f){var h=new XMLHttpRequest,g=0,m=function(b){var y=b.length,x=[],w=String.fromCharCode;for(g=0;g<y;g+=1)x.push(w(255&b.charCodeAt(g)));return x.join("")};if(h.open("GET",l,!c),h.overrideMimeType("text/plain; charset=x-user-defined"),c===!1&&(h.onload=function(){h.status===200?f(m(this.responseText)):f(void 0)}),h.send(null),c&&h.status===200)return m(h.responseText)})(i,a,o)}catch{}return s})(t,n,r)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile})(It.API),(function(e){function t(){return(en.html2canvas?Promise.resolve(en.html2canvas):UP(()=>import("./html2canvas.esm-QH1iLAAe.js"),[])).catch(function(s){return Promise.reject(new Error("Could not load html2canvas: "+s))}).then(function(s){return s.default?s.default:s})}function n(){return(en.DOMPurify?Promise.resolve(en.DOMPurify):UP(()=>import("./purify.es-B9ZVCkUG.js"),[])).catch(function(s){return Promise.reject(new Error("Could not load dompurify: "+s))}).then(function(s){return s.default?s.default:s})}var r=function(s){var l=lr(s);return l==="undefined"?"undefined":l==="string"||s instanceof String?"string":l==="number"||s instanceof Number?"number":l==="function"||s instanceof Function?"function":s&&s.constructor===Array?"array":s&&s.nodeType===1?"element":l==="object"?"object":"unknown"},i=function(s,l){var c=document.createElement(s);for(var f in l.className&&(c.className=l.className),l.innerHTML&&l.dompurify&&(c.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)c.style[f]=l.style[f];return c},a=function s(l,c){for(var f=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),h=l.firstChild;h;h=h.nextSibling)c!==!0&&h.nodeType===1&&h.nodeName==="SCRIPT"||f.appendChild(s(h,c));return l.nodeType===1&&(l.nodeName==="CANVAS"?(f.width=l.width,f.height=l.height,f.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(f.value=l.value),f.addEventListener("load",function(){f.scrollTop=l.scrollTop,f.scrollLeft=l.scrollLeft},!0)),f},o=function s(l){var c=Object.assign(s.convert(Promise.resolve()),JSON.parse(JSON.stringify(s.template))),f=s.convert(Promise.resolve(),c);return(f=f.setProgress(1,s,1,[s])).set(l)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(s,l){return s.__proto__=l||o.prototype,s},o.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},o.prototype.from=function(s,l){return this.then(function(){switch(l=l||(function(c){switch(r(c)){case"string":return"string";case"element":return c.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(s),l){case"string":return this.then(n).then(function(c){return this.set({src:i("div",{innerHTML:s,dompurify:c})})});case"element":return this.set({src:s});case"canvas":return this.set({canvas:s});case"img":return this.set({img:s});default:return this.error("Unknown source type.")}})},o.prototype.to=function(s){switch(s){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},o.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var s={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},l=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(s.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:s}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},o.prototype.toCanvas=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(t).then(function(l){var c=Object.assign({},this.opt.html2canvas);return delete c.onrendered,l(this.prop.container,c)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},o.prototype.toContext2d=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(t).then(function(l){var c=this.opt.jsPDF,f=this.opt.fontFaces,h=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,g=Object.assign({async:!0,allowTaint:!0,scale:h,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete g.onrendered,c.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,c.context2d.posX=this.opt.x,c.context2d.posY=this.opt.y,c.context2d.margin=this.opt.margin,c.context2d.fontFaces=f,f)for(var m=0;m<f.length;++m){var b=f[m],y=b.src.find(function(x){return x.format==="truetype"});y&&c.addFont(y.url,b.ref.name,b.ref.style)}return g.windowHeight=g.windowHeight||0,g.windowHeight=g.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):g.windowHeight,c.context2d.save(!0),l(this.prop.container,g)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},o.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var s=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=s})},o.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},o.prototype.output=function(s,l,c){return(c=c||"pdf").toLowerCase()==="img"||c.toLowerCase()==="image"?this.outputImg(s,l):this.outputPdf(s,l)},o.prototype.outputPdf=function(s,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(s,l)})},o.prototype.outputImg=function(s){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(s){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+s+'" is not supported.'}})},o.prototype.save=function(s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(s?{filename:s}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},o.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},o.prototype.set=function(s){if(r(s)!=="object")return this;var l=Object.keys(s||{}).map(function(c){if(c in o.template.prop)return function(){this.prop[c]=s[c]};switch(c){case"margin":return this.setMargin.bind(this,s.margin);case"jsPDF":return function(){return this.opt.jsPDF=s.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,s.pageSize);default:return function(){this.opt[c]=s[c]}}},this);return this.then(function(){return this.thenList(l)})},o.prototype.get=function(s,l){return this.then(function(){var c=s in o.template.prop?this.prop[s]:this.opt[s];return l?l(c):c})},o.prototype.setMargin=function(s){return this.then(function(){switch(r(s)){case"number":s=[s,s,s,s];case"array":if(s.length===2&&(s=[s[0],s[1],s[0],s[1]]),s.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=s}).then(this.setPageSize)},o.prototype.setPageSize=function(s){function l(c,f){return Math.floor(c*f/72*96)}return this.then(function(){(s=s||It.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(s.inner={width:s.width-this.opt.margin[1]-this.opt.margin[3],height:s.height-this.opt.margin[0]-this.opt.margin[2]},s.inner.px={width:l(s.inner.width,s.k),height:l(s.inner.height,s.k)},s.inner.ratio=s.inner.height/s.inner.width),this.prop.pageSize=s})},o.prototype.setProgress=function(s,l,c,f){return s!=null&&(this.progress.val=s),l!=null&&(this.progress.state=l),c!=null&&(this.progress.n=c),f!=null&&(this.progress.stack=f),this.progress.ratio=this.progress.val/this.progress.state,this},o.prototype.updateProgress=function(s,l,c,f){return this.setProgress(s?this.progress.val+s:null,l||null,c?this.progress.n+c:null,f?this.progress.stack.concat(f):null)},o.prototype.then=function(s,l){var c=this;return this.thenCore(s,l,function(f,h){return c.updateProgress(null,null,1,[f]),Promise.prototype.then.call(this,function(g){return c.updateProgress(null,f),g}).then(f,h).then(function(g){return c.updateProgress(1),g})})},o.prototype.thenCore=function(s,l,c){c=c||Promise.prototype.then;var f=this;s&&(s=s.bind(f)),l&&(l=l.bind(f));var h=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?f:o.convert(Object.assign({},f),Promise.prototype),g=c.call(h,s,l);return o.convert(g,f.__proto__)},o.prototype.thenExternal=function(s,l){return Promise.prototype.then.call(this,s,l)},o.prototype.thenList=function(s){var l=this;return s.forEach(function(c){l=l.thenCore(c)}),l},o.prototype.catch=function(s){s&&(s=s.bind(this));var l=Promise.prototype.catch.call(this,s);return o.convert(l,this)},o.prototype.catchExternal=function(s){return Promise.prototype.catch.call(this,s)},o.prototype.error=function(s){return this.then(function(){throw new Error(s)})},o.prototype.using=o.prototype.set,o.prototype.saveAs=o.prototype.save,o.prototype.export=o.prototype.output,o.prototype.run=o.prototype.then,It.getPageSize=function(s,l,c){if(lr(s)==="object"){var f=s;s=f.orientation,l=f.unit||l,c=f.format||c}l=l||"mm",c=c||"a4",s=(""+(s||"P")).toLowerCase();var h,g=(""+c).toLowerCase(),m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(l){case"pt":h=1;break;case"mm":h=72/25.4;break;case"cm":h=72/2.54;break;case"in":h=72;break;case"px":h=.75;break;case"pc":case"em":h=12;break;case"ex":h=6;break;default:throw"Invalid unit: "+l}var b,y=0,x=0;if(m.hasOwnProperty(g))y=m[g][1]/h,x=m[g][0]/h;else try{y=c[1],x=c[0]}catch{throw new Error("Invalid format: "+c)}if(s==="p"||s==="portrait")s="p",x>y&&(b=x,x=y,y=b);else{if(s!=="l"&&s!=="landscape")throw"Invalid orientation: "+s;s="l",y>x&&(b=x,x=y,y=b)}return{width:x,height:y,unit:l,k:h,orientation:s}},e.html=function(s,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map(oj):null;var c=new o(l);return l.worker?c:c.from(s).doCallback()}})(It.API),It.API.addJS=function(e){var t,n,r=(function(i){for(var a="",o=0;o<i.length;o++){var s=i[o];if(s==="("||s===")"){for(var l=0,c=o-1;c>=0&&i[c]==="\\";c--)l++;a+=l%2==0?"\\"+s:s}else a+=s}return a})(e);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&n!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},(function(e){var t;e.events.push(["postPutResources",function(){var n=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=n.outline.render().split(/\r\n/),a=0;a<i.length;a++){var o=i[a],s=r.exec(o);if(s!=null){var l=s[1];n.internal.newObjectDeferredBegin(l,!1)}n.internal.write(o)}if(this.outline.createNamedDestinations){var c=this.internal.pages.length,f=[];for(a=0;a<c;a++){var h=n.internal.newObject();f.push(h);var g=n.internal.getPageInfo(a+1);n.internal.write("<< /D["+g.objId+" 0 R /XYZ null null null]>> endobj")}var m=n.internal.newObject();for(n.internal.write("<< /Names [ "),a=0;a<f.length;a++)n.internal.write("(page_"+(a+1)+")"+f[a]+" 0 R");n.internal.write(" ] >>","endobj"),t=n.internal.newObject(),n.internal.write("<< /Dests "+m+" 0 R"),n.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var n=this;n.outline.root.children.length>0&&(n.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&n.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}},n.outline.add=function(r,i,a){var o={title:i,options:a,children:[]};return r==null&&(r=this.root),r.children.push(o),o},n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},n.outline.genIds_r=function(r){r.id=n.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},n.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},n.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<r.children.length;a++){var o=r.children[a];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(r)),a>0&&this.line("/Prev "+this.makeRef(r.children[a-1])),a<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[a+1])),o.children.length>0&&(this.line("/First "+this.makeRef(o.children[0])),this.line("/Last "+this.makeRef(o.children[o.children.length-1])));var s=this.count=this.count_r({count:0},o);if(s>0&&this.line("/Count "+s),o.options&&o.options.pageNumber){var l=n.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+l.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var c=0;c<r.children.length;c++)this.renderItems(r.children[c])},n.outline.line=function(r){this.ctx.val+=r+`\r
`},n.outline.makeRef=function(r){return r.id+" 0 R"},n.outline.makeString=function(r){return"("+n.internal.pdfEscape(r)+")"},n.outline.objStart=function(r){this.ctx.val+=`\r
`+r.id+` 0 obj\r
<<\r
`},n.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},n.outline.count_r=function(r,i){for(var a=0;a<i.children.length;a++)r.count++,this.count_r(r,i.children[a]);return r.count}}])})(It.API),(function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,r,i,a,o,s){var l,c=this.decode.DCT_DECODE,f=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=o||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,l=(function(h){for(var g,m=256*h.charCodeAt(4)+h.charCodeAt(5),b=h.length,y={width:0,height:0,numcomponents:1},x=4;x<b;x+=2){if(x+=m,t.indexOf(h.charCodeAt(x+1))!==-1){g=256*h.charCodeAt(x+5)+h.charCodeAt(x+6),y={width:256*h.charCodeAt(x+7)+h.charCodeAt(x+8),height:g,numcomponents:h.charCodeAt(x+9)};break}m=256*h.charCodeAt(x+2)+h.charCodeAt(x+3)}return y})(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),l.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}f={data:n,width:l.width,height:l.height,colorSpace:s,bitsPerComponent:8,filter:c,index:r,alias:i}}return f}})(It.API),It.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=G7e(e,{checkCrc:!0}),o=a.width,s=a.height,l=a.channels,c=a.palette,f=a.depth;i=c&&l===1?(function(R){for(var D=R.width,H=R.height,M=R.data,F=R.palette,W=R.depth,V=!1,X=[],Y=[],Z=void 0,K=!1,se=0,z=0;z<F.length;z++){var te=J9(F[z],4),$=te[0],q=te[1],re=te[2],le=te[3];X.push($,q,re),le!=null&&(le===0?(se++,Y.length<1&&Y.push(z)):le<255&&(K=!0))}if(K||se>1){V=!0,Y=void 0;var de=D*H;Z=new Uint8Array(de);for(var pe=new DataView(M.buffer),ve=0;ve<de;ve++){var he=lj(pe,ve,W),xe=J9(F[he],4)[3];Z[ve]=xe}}else se===0&&(Y=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:V?8:void 0,colorBytes:M,alphaBytes:Z,needSMask:V,palette:X,mask:Y}})(a):l===2||l===4?(function(R){for(var D=R.data,H=R.width,M=R.height,F=R.channels,W=R.depth,V=F===2?"DeviceGray":"DeviceRGB",X=F-1,Y=H*M,Z=X,K=Y*Z,se=1*Y,z=Math.ceil(K*W/8),te=Math.ceil(se*W/8),$=new Uint8Array(z),q=new Uint8Array(te),re=new DataView(D.buffer),le=new DataView($.buffer),de=new DataView(q.buffer),pe=!1,ve=0;ve<Y;ve++){for(var he=ve*F,xe=0;xe<Z;xe++)tU(le,lj(re,he+xe,W),ve*Z+xe,W);var Pe=lj(re,he+Z,W);Pe<(1<<W)-1&&(pe=!0),tU(de,Pe,1*ve,W)}return{colorSpace:V,colorsPerPixel:X,sMaskBitsPerComponent:pe?W:void 0,colorBytes:$,alphaBytes:q,needSMask:pe}})(a):(function(R){var D=R.data,H=R.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:H,colorsPerPixel:H==="DeviceGray"?1:3,colorBytes:D instanceof Uint16Array?(function(M){for(var F=M.length,W=new Uint8Array(2*F),V=new DataView(W.buffer,W.byteOffset,W.byteLength),X=0;X<F;X++)V.setUint16(2*X,M[X],!1);return W})(D):D,needSMask:!1}})(a);var h,g,m,b=i,y=b.colorSpace,x=b.colorsPerPixel,w=b.sMaskBitsPerComponent,_=b.colorBytes,k=b.alphaBytes,P=b.needSMask,C=b.palette,j=b.mask,L=null;return r!==It.API.image_compression.NONE&&typeof iE=="function"?(L=(function(R){var D;switch(R){case It.API.image_compression.FAST:D=11;break;case It.API.image_compression.MEDIUM:D=13;break;case It.API.image_compression.SLOW:D=14;break;default:D=12}return D})(r),h=this.decode.FLATE_DECODE,g="/Predictor ".concat(L," /Colors ").concat(x," /BitsPerComponent ").concat(f," /Columns ").concat(o),e=Xq(_,Math.ceil(o*x*f/8),x,f,r),P&&(m=Xq(k,Math.ceil(o*w/8),1,w,r))):(h=void 0,g=void 0,e=_,P&&(m=k)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:n,data:e,index:t,filter:h,decodeParameters:g,transparency:j,palette:C,sMask:m,predictor:L,width:o,height:s,bitsPerComponent:f,sMaskBitsPerComponent:w,colorSpace:y}}},(function(e){e.processGIF89A=function(t,n,r,i){var a=new mBe(t),o=a.width,s=a.height,l=[];a.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:o,height:s},f=new cj(100).encode(c,100);return e.processJPEG.call(this,f,n,r,i)},e.processGIF87A=e.processGIF89A})(It.API),vl.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},vl.prototype.parseBGR=function(){this.pos=this.offset;var e="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[e]()}catch(n){gr.log("bit decode error:"+n)}},vl.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var l=this.palette[a>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},vl.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*i*4,s=a>>4,l=15&a,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*i+1>=this.width)break;c=this.palette[l],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},vl.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},vl.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>5&t)/t*255|0,l=(a>>10&t)/t*255|0,c=a>>15?255:0,f=r*this.width*4+4*i;this.data[f]=l,this.data[f+1]=s,this.data[f+2]=o,this.data[f+3]=c}this.pos+=e}},vl.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,l=(o>>5&n)/n*255|0,c=(o>>11)/t*255|0,f=i*this.width*4+4*a;this.data[f]=c,this.data[f+1]=l,this.data[f+2]=s,this.data[f+3]=255}this.pos+=e}},vl.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},vl.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=o}},vl.prototype.getData=function(){return this.data},(function(e){e.processBMP=function(t,n,r,i){var a=new vl(t,!1),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new cj(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}})(It.API),rU.prototype.getData=function(){return this.data},(function(e){e.processWEBP=function(t,n,r,i){var a=new rU(t),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new cj(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}})(It.API),It.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,l=0,c=0;c<i;c+=4){var f=r[c],h=r[c+1],g=r[c+2],m=r[c+3];a[s++]=f,a[s++]=h,a[s++]=g,o[l++]=m}var b=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:b,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},It.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Nm=It.API,ob=Nm.getCharWidthsArray=function(e,t){var n,r,i=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),s=t.widths?t.widths:i.metadata.Unicode.widths,l=s.fof?s.fof:1,c=t.kerning?t.kerning:i.metadata.Unicode.kerning,f=c.fof?c.fof:1,h=t.doKerning!==!1,g=0,m=e.length,b=0,y=s[0]||l,x=[];for(n=0;n<m;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString=="function"?x.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+o*(1e3/a)||0)/1e3):(g=h&&lr(c[r])==="object"&&!isNaN(parseInt(c[r][b],10))?c[r][b]/f:0,x.push((s[r]||y)/l+g)),b=r;return x},Yq=Nm.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return Nm.processArabic&&(e=Nm.processArabic(e)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(e,n,i)/n:ob.apply(this,arguments).reduce(function(a,o){return a+o},0)},Gq=function(e,t,n,r){for(var i=[],a=0,o=e.length,s=0;a!==o&&s+t[a]<n;)s+=t[a],a++;i.push(e.slice(0,a));var l=a;for(s=0;a!==o;)s+t[a]>r&&(i.push(e.slice(l,a)),s=0,l=a),s+=t[a],a++;return l!==a&&i.push(e.slice(l,a)),i},Kq=function(e,t,n){n||(n={});var r,i,a,o,s,l,c,f=[],h=[f],g=n.textIndent||0,m=0,b=0,y=e.split(" "),x=ob.apply(this,[" ",n])[0];if(l=n.lineIndent===-1?y[0].length+2:n.lineIndent||0){var w=Array(l).join(" "),_=[];y.map(function(P){(P=P.split(/\s*\n/)).length>1?_=_.concat(P.map(function(C,j){return(j&&C.length?`
`:"")+C})):_.push(P[0])}),y=_,l=Yq.apply(this,[w,n])}for(a=0,o=y.length;a<o;a++){var k=0;if(r=y[a],l&&r[0]==`
`&&(r=r.substr(1),k=1),g+m+(b=(i=ob.apply(this,[r,n])).reduce(function(P,C){return P+C},0))>t||k){if(b>t){for(s=Gq.apply(this,[r,i,t-(g+m),t]),f.push(s.shift()),f=[s.pop()];s.length;)h.push([s.shift()]);b=i.slice(r.length-(f[0]?f[0].length:0)).reduce(function(P,C){return P+C},0)}else f=[r];h.push(f),g=b+l,m=x}else f.push(r),g+=m+b,m=x}return c=l?function(P,C){return(C?w:"")+P.join(" ")}:function(P){return P.join(" ")},h.map(c)},Nm.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var h=this.internal.getFont(f.fontName,f.fontStyle),g="Unicode";return h.metadata[g]?{widths:h.metadata[g].widths||{0:1},kerning:h.metadata[g].kerning||{}}:{font:h.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=r.length;s<l;s++)c=c.concat(Kq.apply(this,[r[s],o,a]));return c},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(g){return"0x"+parseInt(g,10).toString(16)},s=e.__fontmetrics__.compress=function(g){var m,b,y,x,w=["{"];for(var _ in g){if(m=g[_],isNaN(parseInt(_,10))?b="'"+_+"'":(_=parseInt(_,10),b=(b=o(_).slice(2)).slice(0,-1)+i[b.slice(-1)]),typeof m=="number")m<0?(y=o(m).slice(3),x="-"):(y=o(m).slice(2),x=""),y=x+y.slice(0,-1)+i[y.slice(-1)];else{if(lr(m)!=="object")throw new Error("Don't know what to do with value type "+lr(m)+".");y=s(m)}w.push(b+y)}return w.push("}"),w.join("")},l=e.__fontmetrics__.uncompress=function(g){if(typeof g!="string")throw new Error("Invalid argument passed to uncompress.");for(var m,b,y,x,w={},_=1,k=w,P=[],C="",j="",L=g.length-1,R=1;R<L;R+=1)(x=g[R])=="'"?m?(y=m.join(""),m=void 0):m=[]:m?m.push(x):x=="{"?(P.push([k,y]),k={},y=void 0):x=="}"?((b=P.pop())[0][b[1]]=k,y=void 0,k=b[0]):x=="-"?_=-1:y===void 0?r.hasOwnProperty(x)?(C+=r[x],y=parseInt(C,16)*_,_=1,C=""):C+=x:r.hasOwnProperty(x)?(j+=r[x],k[y]=parseInt(j,16)*_,_=1,y=void 0,j=""):j+=x;return w},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},h={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(g){var m=g.font,b=h.Unicode[m.postScriptName];b&&(m.metadata.Unicode={},m.metadata.Unicode.widths=b.widths,m.metadata.Unicode.kerning=b.kerning);var y=f.Unicode[m.postScriptName];y&&(m.metadata.Unicode.encoding=y,m.encoding=y.codePages[0])}])})(It.API),(function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?t(s):t(Tb(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,r)}}])})(It),It.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw gr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw gr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=i;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return(en.canvg?Promise.resolve(en.canvg):UP(()=>import("./index.es-0O_CgRKQ.js"),[])).catch(function(g){return Promise.reject(new Error("Could not load canvg: "+g))}).then(function(g){return g.default?g.default:g}).then(function(g){return g.fromString(c,e,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(g){return g.render(f)}).then(function(){h.addImage(l.toDataURL("image/jpeg",1),t,n,r,i,o,s)})},It.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},It.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,f=0,h=0;function g(b,y){var x,w=!1;for(x=0;x<b.length;x+=1)b[x]===y&&(w=!0);return w}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var m=s.length;for(h=0;h<m;h+=1)n[s[h]].value=n[s[h]].defaultValue,n[s[h]].explicitSet=!1}if(lr(e)==="object"){for(i in e)if(a=e[i],g(s,i)&&a!==void 0){if(n[i].type==="boolean"&&typeof a=="boolean")n[i].value=a;else if(n[i].type==="name"&&g(n[i].valueSet,a))n[i].value=a;else if(n[i].type==="integer"&&Number.isInteger(a))n[i].value=a;else if(n[i].type==="array"){for(c=0;c<a.length;c+=1)if(r=!0,a[c].length===1&&typeof a[c][0]=="number")l.push(String(a[c]-1));else if(a[c].length>1){for(f=0;f<a[c].length;f+=1)typeof a[c][f]!="number"&&(r=!1);r===!0&&l.push([a[c][0]-1,a[c][1]-1].join(" "))}n[i].value="["+l.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var b,y=[];for(b in n)n[b].explicitSet===!0&&(n[b].type==="name"?y.push("/"+b+" /"+n[b].value):y.push("/"+b+" "+n[b].value));y.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+y.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},It.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",yBe),this.internal.events.subscribe("postPutResources",gBe)),this},(function(e){var t=e.API,n=t.pdfEscape16=function(a,o){for(var s,l=o.metadata.Unicode.widths,c=["","0","00","000","0000"],f=[""],h=0,g=a.length;h<g;++h){if(s=o.metadata.characterToGlyph(a.charCodeAt(h)),o.metadata.glyIdsUsed.push(s),o.metadata.toUnicode[s]=a.charCodeAt(h),l.indexOf(s)==-1&&(l.push(s),l.push([parseInt(o.metadata.widthOfGlyph(s),10)])),s=="0")return f.join("");s=s.toString(16),f.push(c[4-s.length],s)}return f.join("")},r=function(a){var o,s,l,c,f,h,g;for(f=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,l=[],h=0,g=(s=Object.keys(a).sort(function(m,b){return m-b})).length;h<g;h++)o=s[h],l.length>=100&&(f+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar`,l=[]),a[o]!==void 0&&a[o]!==null&&typeof a[o].toString=="function"&&(c=("0000"+a[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),l.push("<"+o+"><"+c+">"));return l.length&&(f+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar
`),f+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push(["putFont",function(a){(function(o){var s=o.font,l=o.out,c=o.newObject,f=o.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="Identity-H"){for(var h=s.metadata.Unicode.widths,g=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),m="",b=0;b<g.length;b++)m+=String.fromCharCode(g[b]);var y=c();f({data:m,addLength1:!0,objectId:y}),l("endobj");var x=c();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:x}),l("endobj");var w=c();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+jm(s.fontName)),l("/FontFile2 "+y+" 0 R"),l("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),l("/Flags "+s.metadata.flags),l("/StemV "+s.metadata.stemV),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l(">>"),l("endobj");var _=c();l("<<"),l("/Type /Font"),l("/BaseFont /"+jm(s.fontName)),l("/FontDescriptor "+w+" 0 R"),l("/W "+e.API.PDFObject.convert(h)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+s.encoding+")"),l(">>"),l(">>"),l("endobj"),s.objectNumber=c(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+x+" 0 R"),l("/BaseFont /"+jm(s.fontName)),l("/Encoding /"+s.encoding),l("/DescendantFonts ["+_+" 0 R]"),l(">>"),l("endobj"),s.isAlreadyPutted=!0}})(a)}]),t.events.push(["putFont",function(a){(function(o){var s=o.font,l=o.out,c=o.newObject,f=o.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var h=s.metadata.rawData,g="",m=0;m<h.length;m++)g+=String.fromCharCode(h[m]);var b=c();f({data:g,addLength1:!0,objectId:b}),l("endobj");var y=c();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:y}),l("endobj");var x=c();l("<<"),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l("/StemV "+s.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+b+" 0 R"),l("/Flags 96"),l("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),l("/FontName /"+jm(s.fontName)),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l(">>"),l("endobj"),s.objectNumber=c();for(var w=0;w<s.metadata.hmtx.widths.length;w++)s.metadata.hmtx.widths[w]=parseInt(s.metadata.hmtx.widths[w]*(1e3/s.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+y+" 0 R/BaseFont/"+jm(s.fontName)+"/FontDescriptor "+x+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),l("endobj"),s.isAlreadyPutted=!0}})(a)}]);var i=function(a){var o,s=a.text||"",l=a.x,c=a.y,f=a.options||{},h=a.mutex||{},g=h.pdfEscape,m=h.activeFontKey,b=h.fonts,y=m,x="",w=0,_="",k=b[y].encoding;if(b[y].encoding!=="Identity-H")return{text:s,x:l,y:c,options:f,mutex:h};for(_=s,y=m,Array.isArray(s)&&(_=s[0]),w=0;w<_.length;w+=1)b[y].metadata.hasOwnProperty("cmap")&&(o=b[y].metadata.cmap.unicode.codeMap[_[w].charCodeAt(0)]),o||_[w].charCodeAt(0)<256&&b[y].metadata.hasOwnProperty("Unicode")?x+=_[w]:x+="";var P="";return parseInt(y.slice(1))<14||k==="WinAnsiEncoding"?P=g(x,y).split("").map(function(C){return C.charCodeAt(0).toString(16)}).join(""):k==="Identity-H"&&(P=n(x,b[y])),h.isHex=!0,{text:P,x:l,y:c,options:f,mutex:h}};t.events.push(["postProcessText",function(a){var o=a.text||"",s=[],l={text:o,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(o)){var c=0;for(c=0;c<o.length;c+=1)Array.isArray(o[c])&&o[c].length===3?s.push([i(Object.assign({},l,{text:o[c][0]})).text,o[c][1],o[c][2]]):s.push(i(Object.assign({},l,{text:o[c]})).text);a.text=s}else a.text=i(Object.assign({},l,{text:o})).text}])})(It),(function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0},e.addFileToVFS=function(n,r){return t.call(this),this.internal.vFS[n]=r,this},e.getFileFromVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}})(It.API),(function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(r){var i,a,o,s,l,c,f,h=t,g=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],m=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],b={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},y={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},x=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","â…","â†","â…","â½","â¾","â½","â‚","₎","â‚","≤","≥","≤","〈","〉","〈","ï¹™","﹚","ï¹™","ï¹›","﹜","ï¹›","ï¹","﹞","ï¹","﹤","ï¹¥","﹤"],w=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),_=!1,k=0;this.__bidiEngine__={};var P=function(M){var F=M.charCodeAt(),W=F>>8,V=y[W];return V!==void 0?h[256*V+(255&F)]:W===252||W===253?"AL":w.test(W)?"L":W===8?"R":"N"},C=function(M){for(var F,W=0;W<M.length;W++){if((F=P(M.charAt(W)))==="L")return!1;if(F==="R")return!0}return!1},j=function(M,F,W,V){var X,Y,Z,K,se=F[V];switch(se){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":_=!1;break;case"N":case"AN":break;case"EN":_&&(se="AN");break;case"AL":_=!0,se="R";break;case"WS":case"BN":se="N";break;case"CS":V<1||V+1>=F.length||(X=W[V-1])!=="EN"&&X!=="AN"||(Y=F[V+1])!=="EN"&&Y!=="AN"?se="N":_&&(Y="AN"),se=Y===X?Y:"N";break;case"ES":se=(X=V>0?W[V-1]:"B")==="EN"&&V+1<F.length&&F[V+1]==="EN"?"EN":"N";break;case"ET":if(V>0&&W[V-1]==="EN"){se="EN";break}if(_){se="N";break}for(Z=V+1,K=F.length;Z<K&&F[Z]==="ET";)Z++;se=Z<K&&F[Z]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(K=F.length,Z=V+1;Z<K&&F[Z]==="NSM";)Z++;if(Z<K){var z=M[V],te=z>=1425&&z<=2303||z===64286;if(X=F[Z],te&&(X==="R"||X==="AL")){se="R";break}}}se=V<1||(X=F[V-1])==="B"?"N":W[V-1];break;case"B":_=!1,i=!0,se=k;break;case"S":a=!0,se="N"}return se},L=function(M,F,W){var V=M.split("");return W&&R(V,W,{hiLevel:k}),V.reverse(),F&&F.reverse(),V.join("")},R=function(M,F,W){var V,X,Y,Z,K,se=-1,z=M.length,te=0,$=[],q=k?m:g,re=[];for(_=!1,i=!1,a=!1,X=0;X<z;X++)re[X]=P(M[X]);for(Y=0;Y<z;Y++){if(K=te,$[Y]=j(M,re,$,Y),V=240&(te=q[K][b[$[Y]]]),te&=15,F[Y]=Z=q[te][5],V>0)if(V===16){for(X=se;X<Y;X++)F[X]=1;se=-1}else se=-1;if(q[te][6])se===-1&&(se=Y);else if(se>-1){for(X=se;X<Y;X++)F[X]=Z;se=-1}re[Y]==="B"&&(F[Y]=0),W.hiLevel|=Z}a&&(function(le,de,pe){for(var ve=0;ve<pe;ve++)if(le[ve]==="S"){de[ve]=k;for(var he=ve-1;he>=0&&le[he]==="WS";he--)de[he]=k}})(re,F,z)},D=function(M,F,W,V,X){if(!(X.hiLevel<M)){if(M===1&&k===1&&!i)return F.reverse(),void(W&&W.reverse());for(var Y,Z,K,se,z=F.length,te=0;te<z;){if(V[te]>=M){for(K=te+1;K<z&&V[K]>=M;)K++;for(se=te,Z=K-1;se<Z;se++,Z--)Y=F[se],F[se]=F[Z],F[Z]=Y,W&&(Y=W[se],W[se]=W[Z],W[Z]=Y);te=K}te++}}},H=function(M,F,W){var V=M.split(""),X={hiLevel:k};return W||(W=[]),R(V,W,X),(function(Y,Z,K){if(K.hiLevel!==0&&f)for(var se,z=0;z<Y.length;z++)Z[z]===1&&(se=x.indexOf(Y[z]))>=0&&(Y[z]=x[se+1])})(V,W,X),D(2,V,F,W,X),D(1,V,F,W,X),V.join("")};return this.__bidiEngine__.doBidiReorder=function(M,F,W){if((function(X,Y){if(Y)for(var Z=0;Z<X.length;Z++)Y[Z]=Z;s===void 0&&(s=C(X)),c===void 0&&(c=C(X))})(M,F),o||!l||c)if(o&&l&&s^c)k=s?1:0,M=L(M,F,W);else if(!o&&l&&c)k=s?1:0,M=H(M,F,W),M=L(M,F);else if(!o||s||l||c){if(o&&!l&&s^c)M=L(M,F),s?(k=0,M=H(M,F,W)):(k=1,M=H(M,F,W),M=L(M,F));else if(o&&s&&!l&&c)k=1,M=H(M,F,W),M=L(M,F);else if(!o&&!l&&s^c){var V=f;s?(k=1,M=H(M,F,W),k=0,f=!1,M=H(M,F,W),f=V):(k=0,M=H(M,F,W),M=L(M,F),k=1,f=!1,M=H(M,F,W),f=V,M=L(M,F))}}else k=0,M=H(M,F,W);else k=s?1:0,M=H(M,F,W);return M},this.__bidiEngine__.setOptions=function(M){M&&(o=M.isInputVisual,l=M.isOutputVisual,s=M.isInputRtl,c=M.isOutputRtl,f=M.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var a=r.options||{};r.mutex,a.lang;var o=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,n.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var s=0;for(o=[],s=0;s<i.length;s+=1)Object.prototype.toString.call(i[s])==="[object Array]"?o.push([n.doBidiReorder(i[s][0]),i[s][1],i[s][2]]):o.push([n.doBidiReorder(i[s])]);r.text=o}else r.text=n.doBidiReorder(i);n.setOptions({isInputVisual:!0})}])})(It),It.API.TTFFont=(function(){function e(t){var n;if(this.rawData=t,n=this.contents=new Ed(t),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new TBe(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new vBe(this.contents),this.head=new bBe(this),this.name=new kBe(this),this.cmap=new YZ(this),this.toUnicode={},this.hhea=new wBe(this),this.maxp=new ABe(this),this.hmtx=new PBe(this),this.post=new _Be(this),this.os2=new SBe(this),this.loca=new OBe(this),this.glyf=new jBe(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var t,n,r,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,s,l,c;for(c=[],o=0,s=(l=this.bbox).length;o<s;o++)t=l[o],c.push(Math.round(t*this.scaleFactor));return c}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(n=i>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(t){var n;return((n=this.cmap.unicode)!=null?n.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*n},e.prototype.widthOfString=function(t,n,r){var i,a,o,s;for(o=0,a=0,s=(t=""+t).length;0<=s?a<s:a>s;a=0<=s?++a:--a)i=t.charCodeAt(a),o+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/n)||0;return o*(n/1e3)},e.prototype.lineHeight=function(t,n){var r;return n==null&&(n=!1),r=n?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},e})();var $l,Ed=(function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var n,r;for(r=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)r[n]=String.fromCharCode(this.readByte());return r.join("")},e.prototype.writeString=function(t){var n,r,i;for(i=[],n=0,r=t.length;0<=r?n<r:n>r;n=0<=r?++n:--n)i.push(this.writeByte(t.charCodeAt(n)));return i},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,n,r,i,a,o,s,l;return t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),l=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^n)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^a)+65536*(255^o)+256*(255^s)+(255^l)+1):72057594037927940*t+281474976710656*n+1099511627776*r+4294967296*i+16777216*a+65536*o+256*s+l},e.prototype.writeLongLong=function(t){var n,r;return n=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var n,r;for(n=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)n.push(this.readByte());return n},e.prototype.write=function(t){var n,r,i,a;for(a=[],r=0,i=t.length;r<i;r++)n=t[r],a.push(this.writeByte(n));return a},e})(),vBe=(function(){var e;function t(n){var r,i,a;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)r={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(n){var r,i,a,o,s,l,c,f,h,g,m,b,y;for(y in m=Object.keys(n).length,l=Math.log(2),h=16*Math.floor(Math.log(m)/l),o=Math.floor(h/l),f=16*m-h,(i=new Ed).writeInt(this.scalarType),i.writeShort(m),i.writeShort(h),i.writeShort(o),i.writeShort(f),a=16*m,c=i.pos+a,s=null,b=[],n)for(g=n[y],i.writeString(y),i.writeInt(e(g)),i.writeInt(c),i.writeInt(g.length),b=b.concat(g),y==="head"&&(s=c),c+=g.length;c%4;)b.push(0),c++;return i.write(b),r=2981146554-e(i.data),i.pos=s+8,i.writeUInt32(r),i.data},e=function(n){var r,i,a,o;for(n=GZ.call(n);n.length%4;)n.push(0);for(a=new Ed(n),i=0,r=0,o=n.length;r<o;r=r+=4)i+=a.readUInt32();return 4294967295&i},t})(),xBe={}.hasOwnProperty,$c=function(e,t){for(var n in t)xBe.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};$l=(function(){function e(t){var n;this.file=t,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e})();var bBe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var n;return(n=new Ed).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},e})(),iU=(function(){function e(t,n){var r,i,a,o,s,l,c,f,h,g,m,b,y,x,w,_,k;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=n+t.readInt(),h=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=t.readByte();break;case 4:for(m=t.readUInt16(),g=m/2,t.pos+=6,a=(function(){var P,C;for(C=[],l=P=0;0<=g?P<g:P>g;l=0<=g?++P:--P)C.push(t.readUInt16());return C})(),t.pos+=2,y=(function(){var P,C;for(C=[],l=P=0;0<=g?P<g:P>g;l=0<=g?++P:--P)C.push(t.readUInt16());return C})(),c=(function(){var P,C;for(C=[],l=P=0;0<=g?P<g:P>g;l=0<=g?++P:--P)C.push(t.readUInt16());return C})(),f=(function(){var P,C;for(C=[],l=P=0;0<=g?P<g:P>g;l=0<=g?++P:--P)C.push(t.readUInt16());return C})(),i=(this.length-t.pos+this.offset)/2,s=(function(){var P,C;for(C=[],l=P=0;0<=i?P<i:P>i;l=0<=i?++P:--P)C.push(t.readUInt16());return C})(),l=w=0,k=a.length;w<k;l=++w)for(x=a[l],r=_=b=y[l];b<=x?_<=x:_>=x;r=b<=x?++_:--_)f[l]===0?o=r+c[l]:(o=s[f[l]/2+(r-b)-(g-l)]||0)!==0&&(o+=c[l]),this.codeMap[r]=65535&o}t.pos=h}return e.encode=function(t,n){var r,i,a,o,s,l,c,f,h,g,m,b,y,x,w,_,k,P,C,j,L,R,D,H,M,F,W,V,X,Y,Z,K,se,z,te,$,q,re,le,de,pe,ve,he,xe,Pe,Se;switch(V=new Ed,o=Object.keys(t).sort(function(Ue,Ye){return Ue-Ye}),n){case"macroman":for(y=0,x=(function(){var Ue=[];for(b=0;b<256;++b)Ue.push(0);return Ue})(),_={0:0},a={},X=0,se=o.length;X<se;X++)_[he=t[i=o[X]]]==null&&(_[he]=++y),a[i]={old:t[i],new:_[t[i]]},x[i]=_[t[i]];return V.writeUInt16(1),V.writeUInt16(0),V.writeUInt32(12),V.writeUInt16(0),V.writeUInt16(262),V.writeUInt16(0),V.write(x),{charMap:a,subtable:V.data,maxGlyphID:y+1};case"unicode":for(F=[],h=[],k=0,_={},r={},w=c=null,Y=0,z=o.length;Y<z;Y++)_[C=t[i=o[Y]]]==null&&(_[C]=++k),r[i]={old:C,new:_[C]},s=_[C]-i,w!=null&&s===c||(w&&h.push(w),F.push(i),c=s),w=i;for(w&&h.push(w),h.push(65535),F.push(65535),H=2*(D=F.length),R=2*Math.pow(Math.log(D)/Math.LN2,2),g=Math.log(R/2)/Math.LN2,L=2*D-R,l=[],j=[],m=[],b=Z=0,te=F.length;Z<te;b=++Z){if(M=F[b],f=h[b],M===65535){l.push(0),j.push(0);break}if(M-(W=r[M].new)>=32768)for(l.push(0),j.push(2*(m.length+D-b)),i=K=M;M<=f?K<=f:K>=f;i=M<=f?++K:--K)m.push(r[i].new);else l.push(W-M),j.push(0)}for(V.writeUInt16(3),V.writeUInt16(1),V.writeUInt32(12),V.writeUInt16(4),V.writeUInt16(16+8*D+2*m.length),V.writeUInt16(0),V.writeUInt16(H),V.writeUInt16(R),V.writeUInt16(g),V.writeUInt16(L),pe=0,$=h.length;pe<$;pe++)i=h[pe],V.writeUInt16(i);for(V.writeUInt16(0),ve=0,q=F.length;ve<q;ve++)i=F[ve],V.writeUInt16(i);for(xe=0,re=l.length;xe<re;xe++)s=l[xe],V.writeUInt16(s);for(Pe=0,le=j.length;Pe<le;Pe++)P=j[Pe],V.writeUInt16(P);for(Se=0,de=m.length;Se<de;Se++)y=m[Se],V.writeUInt16(y);return{charMap:r,subtable:V.data,maxGlyphID:k+1}}},e})(),YZ=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="cmap",e.prototype.parse=function(t){var n,r,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)n=new iU(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(t,n){var r,i;return n==null&&(n="macroman"),r=iU.encode(t,n),(i=new Ed).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},e})(),wBe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e})(),SBe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var n,r;for(r=[],n=0;n<10;++n)r.push(t.readByte());return r})(),this.charRange=(function(){var n,r;for(r=[],n=0;n<4;++n)r.push(t.readInt());return r})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var n,r;for(r=[],n=0;n<2;n=++n)r.push(t.readInt());return r})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e})(),_Be=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="post",e.prototype.parse=function(t){var n,r,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(r=t.readUInt16(),this.glyphNameIndex=[],a=0;0<=r?a<r:a>r;a=0<=r?++a:--a)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)n=t.readByte(),i.push(this.names.push(t.readString(n)));return i;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var o,s,l;for(l=[],a=o=0,s=this.file.maxp.numGlyphs;0<=s?o<s:o>s;a=0<=s?++o:--o)l.push(t.readUInt32());return l}).call(this)}},e})(),NBe=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},kBe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="name",e.prototype.parse=function(t){var n,r,i,a,o,s,l,c,f,h,g;for(t.pos=this.offset,t.readShort(),n=t.readShort(),s=t.readShort(),r=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+s+t.readShort()});for(l={},a=f=0,h=r.length;f<h;a=++f)i=r[a],t.pos=i.offset,c=t.readString(i.length),o=new NBe(c,i),l[g=i.nameID]==null&&(l[g]=[]),l[i.nameID].push(o);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},e})(),ABe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e})(),PBe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="hmtx",e.prototype.parse=function(t){var n,r,i,a,o,s,l;for(t.pos=this.offset,this.metrics=[],n=0,s=this.file.hhea.numberOfMetrics;0<=s?n<s:n>s;n=0<=s?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var c,f;for(f=[],n=c=0;0<=i?c<i:c>i;n=0<=i?++c:--c)f.push(t.readInt16());return f})(),this.widths=(function(){var c,f,h,g;for(g=[],c=0,f=(h=this.metrics).length;c<f;c++)a=h[c],g.push(a.advance);return g}).call(this),r=this.widths[this.widths.length-1],l=[],n=o=0;0<=i?o<i:o>i;n=0<=i?++o:--o)l.push(this.widths.push(r));return l},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e})(),GZ=[].slice,jBe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var n,r,i,a,o,s,l,c,f,h;return t in this.cache?this.cache[t]:(a=this.file.loca,n=this.file.contents,r=a.indexOf(t),(i=a.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+r,o=(s=new Ed(n.read(i))).readShort(),c=s.readShort(),h=s.readShort(),l=s.readShort(),f=s.readShort(),this.cache[t]=o===-1?new EBe(s,c,h,l,f):new CBe(s,o,c,h,l,f),this.cache[t]))},e.prototype.encode=function(t,n,r){var i,a,o,s,l;for(o=[],a=[],s=0,l=n.length;s<l;s++)i=t[n[s]],a.push(o.length),i&&(o=o.concat(i.encode(r)));return a.push(o.length),{table:o,offsets:a}},e})(),CBe=(function(){function e(t,n,r,i,a,o){this.raw=t,this.numberOfContours=n,this.xMin=r,this.yMin=i,this.xMax=a,this.yMax=o,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e})(),EBe=(function(){function e(t,n,r,i,a){var o,s;for(this.raw=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return e.prototype.encode=function(){var t,n,r;for(n=new Ed(GZ.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)n.pos=this.glyphOffsets[t];return n.data},e})(),OBe=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return $c(e,$l),e.prototype.tag="loca",e.prototype.parse=function(t){var n,r;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=2)a.push(2*t.readUInt16());return a}).call(this):(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=4)a.push(t.readUInt32());return a}).call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,n){for(var r=new Uint32Array(this.offsets.length),i=0,a=0,o=0;o<r.length;++o)if(r[o]=i,a<n.length&&n[a]==o){++a,r[o]=i;var s=this.offsets[o],l=this.offsets[o+1]-s;l>0&&(i+=l)}for(var c=new Array(4*r.length),f=0;f<r.length;++f)c[4*f+3]=255&r[f],c[4*f+2]=(65280&r[f])>>8,c[4*f+1]=(16711680&r[f])>>16,c[4*f]=(4278190080&r[f])>>24;return c},e})(),TBe=(function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,n,r,i,a;for(n in i=this.font.cmap.tables[0].codeMap,t={},a=this.subset)r=a[n],t[n]=i[r];return t},e.prototype.glyphsFor=function(t){var n,r,i,a,o,s,l;for(i={},o=0,s=t.length;o<s;o++)i[a=t[o]]=this.font.glyf.glyphFor(a);for(a in n=[],i)(r=i[a])!=null&&r.compound&&n.push.apply(n,r.glyphIDs);if(n.length>0)for(a in l=this.glyphsFor(n))r=l[a],i[a]=r;return i},e.prototype.encode=function(t,n){var r,i,a,o,s,l,c,f,h,g,m,b,y,x,w;for(i in r=YZ.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(t),m={0:0},w=r.charMap)m[(l=w[i]).old]=l.new;for(b in g=r.maxGlyphID,o)b in m||(m[b]=g++);return f=(function(_){var k,P;for(k in P={},_)P[_[k]]=k;return P})(m),h=Object.keys(f).sort(function(_,k){return _-k}),y=(function(){var _,k,P;for(P=[],_=0,k=h.length;_<k;_++)s=h[_],P.push(f[s]);return P})(),a=this.font.glyf.encode(o,y,m),c=this.font.loca.encode(a.offsets,y),x={cmap:this.font.cmap.raw(),glyf:a.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(x["OS/2"]=this.font.os2.raw()),this.font.directory.encode(x)},e})();It.API.PDFObject=(function(){var e;function t(){}return e=function(n,r){return(Array(r+1).join("0")+n).slice(-r)},t.convert=function(n){var r,i,a,o;if(Array.isArray(n))return"["+(function(){var s,l,c;for(c=[],s=0,l=n.length;s<l;s++)r=n[s],c.push(t.convert(r));return c})().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n!=null&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(i in a=["<<"],n)o=n[i],a.push("/"+i+" "+t.convert(o));return a.push(">>"),a.join(`
`)}return""+n},t})();const MBe=e=>ut.functions.invoke("siteApi",e).then(t=>t.data);function KZ(e){return String(e).replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase()).trim()}function uj(e){if(e==null||e==="")return"—";if(typeof e=="boolean")return e?"Yes":"No";if(typeof e=="number")return e.toLocaleString();if(typeof e=="string"){if(/^\d{4}-\d{2}-\d{2}(T|$)/.test(e)){const t=Xe(e);if(t.isValid())return t.format("MMM D, YYYY HH:mm")}return e}return String(e)}function dE(e,t=0){const n=" ".repeat(t),r=t===0?"":"• ";if(e==null||e==="")return[`${n}—`];if(Array.isArray(e)){if(e.length===0)return[`${n}(none)`];const i=[];return e.forEach(a=>{a&&typeof a=="object"?(i.push(`${n}${r}`.trimEnd()),i.push(...dE(a,t+1))):i.push(`${n}${r}${uj(a)}`)}),i}if(typeof e=="object"){const i=Object.entries(e);if(i.length===0)return[`${n}(empty)`];const a=[];return i.forEach(([o,s])=>{const l=KZ(o);s&&typeof s=="object"?(a.push(`${n}${l}:`),a.push(...dE(s,t+1))):a.push(`${n}${l}: ${uj(s)}`)}),a}return[`${n}${uj(e)}`]}function aU(e){const t=new Set(["id","_status","_ok","framework","report_type","period_start","period_end","generated_at"]);return Object.entries(e).filter(([n])=>!t.has(n)).map(([n,r])=>({key:n,label:KZ(n),value:r,lines:dE(r,0)}))}function LBe({siteId:e,report:t,onClose:n}){const{toast:r}=Gs(),[i,a]=E.useState(null),[o,s]=E.useState(!0);E.useEffect(()=>{let f=!1;return(async()=>{if(s(!0),t&&(t.controls||t.content||t.sections||t.summary)){f||(a(t),s(!1));return}try{const h=await MBe({action:"get_compliance_report",site_id:e,report_id:t.id});if((h==null?void 0:h._ok)===!1)r({title:"Could not load report",description:(h==null?void 0:h.detail)||(h==null?void 0:h.message)||"Request failed",variant:"destructive"}),f||a(t);else{const{_status:g,_ok:m,...b}=h||{};f||a({...t,...b})}}catch(h){r({title:"Error",description:h.message,variant:"destructive"}),f||a(t)}finally{f||s(!1)}})(),()=>{f=!0}},[t,e,r]);const l=()=>{if(!i)return;const f=new It({unit:"pt",format:"a4"}),h=f.internal.pageSize.getWidth(),g=f.internal.pageSize.getHeight(),m=48;let b=m;const y=(_,{size:k=10,bold:P=!1,spacing:C=4}={})=>{f.setFontSize(k),f.setFont("helvetica",P?"bold":"normal");const j=f.splitTextToSize(String(_??""),h-m*2);for(const L of j)b>g-m&&(f.addPage(),b=m),f.text(L,m,b),b+=k+C};y(`${i.framework||"SOC2"} Compliance Report`,{size:18,bold:!0,spacing:6}),i.period_start&&i.period_end&&y(`Period: ${Xe(i.period_start).format("MMM D, YYYY")} – ${Xe(i.period_end).format("MMM D, YYYY")}`,{size:10}),i.generated_at&&y(`Generated: ${Xe(i.generated_at).format("MMM D, YYYY HH:mm")}`,{size:10}),b+=8;const x=aU(i);for(const _ of x){y(_.label.toUpperCase(),{size:12,bold:!0,spacing:6});for(const k of _.lines)y(k,{size:10,spacing:3});b+=8}const w=`${i.framework||"SOC2"}-${i.id||Date.now()}.pdf`;f.save(w),r({title:"PDF downloaded",description:w})},c=i?aU(i):[];return d.jsxs(dT,{onClose:n,maxWidth:"max-w-3xl",children:[d.jsxs("div",{className:"flex items-center justify-between p-5 pr-14 border-b border-border/50 flex-shrink-0",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(mg,{className:"w-4 h-4 text-primary flex-shrink-0"}),d.jsxs("h2",{className:"text-base font-bold text-foreground truncate",children:[(i==null?void 0:i.framework)||(t==null?void 0:t.framework)||"SOC2"," Report"]}),d.jsx(Oi,{className:"text-[10px] border bg-accent/20 text-accent border-accent/30",children:"complete"})]}),((i==null?void 0:i.period_start)||(t==null?void 0:t.period_start))&&d.jsxs("p",{className:"text-xs font-mono text-muted-foreground mt-1",children:[Xe((i==null?void 0:i.period_start)||(t==null?void 0:t.period_start)).format("MMM D, YYYY")," – ",Xe((i==null?void 0:i.period_end)||(t==null?void 0:t.period_end)).format("MMM D, YYYY")]})]}),d.jsx("div",{className:"flex items-center gap-2 flex-shrink-0 mr-10",children:d.jsxs(Ot,{size:"sm",onClick:l,disabled:!i||o,className:"gap-1.5 bg-primary text-primary-foreground",children:[d.jsx(Ete,{className:"w-3.5 h-3.5"}),"Download PDF"]})})]}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-5",children:o?d.jsx("div",{className:"flex justify-center py-16",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):c.length===0?d.jsx("p",{className:"text-sm text-muted-foreground text-center py-10",children:"No report content available."}):c.map(f=>d.jsxs("div",{className:"space-y-2",children:[d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-primary",children:f.label}),d.jsx("div",{className:"text-sm text-foreground/90 leading-relaxed space-y-1",children:f.lines.map((h,g)=>{const m=h.match(/^ */)[0].length;return d.jsx("p",{className:"whitespace-pre-wrap break-words",style:{paddingLeft:`${m*6}px`},children:h.trimStart()||" "},g)})})]},f.key))})]})}const oU=e=>ut.functions.invoke("siteApi",e).then(t=>t.data);function RBe({siteId:e}){const{toast:t}=Gs(),n=Li(),[r,i]=E.useState(!1),[a,o]=E.useState(""),[s,l]=E.useState(""),[c,f]=E.useState(null),{data:h,isLoading:g}=dn({queryKey:["compliance_reports",e],queryFn:()=>oU({action:"get_compliance_reports",site_id:e}),enabled:!!e,retry:!1}),m=(h==null?void 0:h._status)===403,b=Array.isArray(h==null?void 0:h.data)?h.data:Array.isArray(h==null?void 0:h.reports)?h.reports:Array.isArray(h)?h:[],y=Hi({mutationFn:()=>oU({action:"generate_report",site_id:e,report_type:"soc2",period_start:a?`${a}T00:00:00Z`:"",period_end:s?`${s}T00:00:00Z`:""}),onSuccess:x=>{if((x==null?void 0:x._ok)===!1||x!=null&&x._status&&x._status>=400){const P=(x==null?void 0:x.detail)||(x==null?void 0:x.message)||(x==null?void 0:x.error)||`Request failed (${(x==null?void 0:x._status)||"unknown"})`;t({title:"Could not generate report",description:P,variant:"destructive"});return}const{_status:w,_ok:_,...k}=x||{};n.invalidateQueries({queryKey:["compliance_reports",e]}),i(!1),o(""),l(""),t({title:"Report generated",description:"Opening the report now."}),f(k)},onError:x=>t({title:"Error",description:x.message,variant:"destructive"})});return m?d.jsx(Nd,{title:"SOC2 reports require an upgrade",description:(h==null?void 0:h.detail)||(h==null?void 0:h.message)||"Report generation is available on the Compliance and Enterprise plans."}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Generated SOC2 audit reports"}),d.jsxs(Ot,{size:"sm",onClick:()=>i(!r),className:"gap-2 bg-primary text-primary-foreground",children:[d.jsx(S2,{className:"w-3.5 h-3.5"}),"Generate Report"]})]}),r&&d.jsx(He.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"overflow-hidden",children:d.jsxs("div",{className:"bg-muted/30 border border-border/50 rounded-xl p-5 space-y-4",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:"Generate SOC2 Report"}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Period Start"}),d.jsx(qr,{type:"date",value:a,onChange:x=>o(x.target.value),className:"bg-muted/50 border-border/50"})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Period End"}),d.jsx(qr,{type:"date",value:s,onChange:x=>l(x.target.value),className:"bg-muted/50 border-border/50"})]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Ot,{size:"sm",onClick:()=>y.mutate(),disabled:!a||!s||y.isPending,className:"gap-2",children:[y.isPending?d.jsx(hn,{className:"w-3.5 h-3.5 animate-spin"}):d.jsx(mg,{className:"w-3.5 h-3.5"}),"Generate"]}),d.jsx(Ot,{size:"sm",variant:"ghost",onClick:()=>i(!1),children:"Cancel"})]})]})}),g?d.jsx("div",{className:"flex justify-center py-10",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):b.length===0?d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-10 text-center",children:[d.jsx(mg,{className:"w-8 h-8 mx-auto text-muted-foreground/30 mb-2"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No reports generated yet"})]}):d.jsx("div",{className:"space-y-2",children:b.map((x,w)=>d.jsxs(He.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:w*.04},onClick:()=>f(x),className:"w-full text-left flex items-center justify-between bg-card border border-border/50 hover:border-primary/40 hover:bg-muted/20 rounded-xl px-5 py-4 gap-4 transition-colors cursor-pointer",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsxs("p",{className:"text-sm font-medium text-foreground",children:[x.framework||"SOC2"," Report"]}),d.jsx(Oi,{className:"text-[10px] border bg-accent/20 text-accent border-accent/30",children:"complete"})]}),d.jsx("p",{className:"text-xs font-mono text-muted-foreground",children:x.period_start&&x.period_end?`${Xe(x.period_start).format("MMM D, YYYY")} – ${Xe(x.period_end).format("MMM D, YYYY")}`:Xe(x.generated_at).format("MMM D, YYYY")}),Array.isArray(x.controls_covered)&&x.controls_covered.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:x.controls_covered.map(_=>d.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-muted/50 text-muted-foreground border border-border/40",children:_},_))})]}),d.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[d.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:x.generated_at?Xe(x.generated_at).fromNow():""}),d.jsx(b2,{className:"w-4 h-4 text-muted-foreground"})]})]},x.id||w))}),d.jsx(us,{children:c&&d.jsx(LBe,{siteId:e,report:c,onClose:()=>f(null)})})]})}const sb=e=>ut.functions.invoke("siteApi",e).then(t=>t.data),fj=e=>(e==null?void 0:e._status)===403||(e==null?void 0:e._ok)===!1&&(e==null?void 0:e._status)>=400,dj=e=>(e==null?void 0:e.detail)||(e==null?void 0:e.message)||"This feature is not available on your current plan.";function sU({rows:e,columns:t}){return!e||e.length===0?d.jsx("div",{className:"text-center py-6 text-sm text-muted-foreground",children:"No entries found"}):d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full text-xs",children:[d.jsx("thead",{children:d.jsx("tr",{className:"border-b border-border/40",children:t.map(n=>d.jsx("th",{className:"text-left font-mono text-muted-foreground px-3 py-2",children:n.label},n.key))})}),d.jsx("tbody",{children:e.map((n,r)=>d.jsx("tr",{className:"border-b border-border/20 hover:bg-muted/20",children:t.map(i=>d.jsx("td",{className:"px-3 py-2 text-foreground font-mono",children:i.render?i.render(n[i.key],n):n[i.key]??"—"},i.key))},r))})]})})}const IBe=[{id:"integrity",label:"Log Integrity",icon:Oh},{id:"access",label:"Access Logs",icon:n1},{id:"admin",label:"Admin Trail",icon:Lne}];function DBe({siteId:e}){const[t,n]=E.useState("integrity"),[r,i]=E.useState(!1),a=Li(),{data:o,isLoading:s,refetch:l,isFetching:c}=dn({queryKey:["audit_integrity",e],queryFn:()=>sb({action:"verify_log_chain",site_id:e}),enabled:!!e&&t==="integrity",retry:!1}),f=async()=>{console.log("[AuditPanel] Re-verify clicked for site:",e),i(!0);try{await a.invalidateQueries({queryKey:["audit_integrity",e]});const M=await l();console.log("[AuditPanel] Re-verify result:",M==null?void 0:M.data)}catch(M){console.error("[AuditPanel] Re-verify error:",M)}finally{i(!1)}},{data:h,isLoading:g,isFetching:m,refetch:b}=dn({queryKey:["audit_access",e],queryFn:()=>sb({action:"get_access_logs",site_id:e}),enabled:!!e&&t==="access",retry:!1,staleTime:1e4,refetchInterval:3e4}),y=fj(h),x=Array.isArray(h==null?void 0:h.logs)?h.logs:Array.isArray(h==null?void 0:h.data)?h.data:Array.isArray(h)?h:[],{data:w,isLoading:_,isFetching:k,refetch:P}=dn({queryKey:["audit_admin",e],queryFn:()=>sb({action:"get_admin_trail",site_id:e}),enabled:!!e&&t==="admin",retry:!1,staleTime:1e4,refetchInterval:3e4}),[C,j]=E.useState(!1),L=async M=>{j(!0);try{await sb({action:"sync_audit"}),await M()}finally{j(!1)}},R=fj(w),D=Array.isArray(w==null?void 0:w.trail)?w.trail:Array.isArray(w==null?void 0:w.data)?w.data:Array.isArray(w)?w:[],H=fj(o);return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"flex gap-2",children:IBe.map(({id:M,label:F,icon:W})=>d.jsxs("button",{onClick:()=>n(M),className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg font-medium transition-colors ${t===M?"bg-primary/20 text-primary border border-primary/30":"text-muted-foreground hover:text-foreground hover:bg-muted/40"}`,children:[d.jsx(W,{className:"w-3.5 h-3.5"}),F]},M))}),t==="integrity"&&(s?d.jsx("div",{className:"flex justify-center py-10",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):H?d.jsx(Nd,{title:"Log integrity verification requires an upgrade",description:dj(o)}):d.jsxs(He.div,{initial:{opacity:0},animate:{opacity:1},className:"space-y-3",children:[d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-5 flex items-center gap-4",children:[o!=null&&o.valid||o!=null&&o.verified?d.jsx(ss,{className:"w-8 h-8 text-accent flex-shrink-0"}):d.jsx(xE,{className:"w-8 h-8 text-destructive flex-shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground",children:o!=null&&o.valid||o!=null&&o.verified?"Log chain verified — all entries are intact":"Log chain verification failed"}),(o==null?void 0:o.message)&&d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 break-words",children:o.message}),(o==null?void 0:o.verified_at)&&d.jsxs("p",{className:"text-xs font-mono text-muted-foreground mt-1",children:["Last verified: ",Xe(o.verified_at).format("MMM D, YYYY HH:mm")]})]}),d.jsxs("button",{type:"button",onClick:f,disabled:r||c,className:"flex-shrink-0 inline-flex items-center gap-2 text-xs font-medium px-3 py-2 rounded-md border border-primary/40 bg-primary/10 text-primary hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:[r||c?d.jsx(hn,{className:"w-3.5 h-3.5 animate-spin"}):null,r||c?"Verifying…":"Re-verify"]})]}),(o==null?void 0:o.stats)&&d.jsx("div",{className:"grid grid-cols-3 gap-3",children:Object.entries(o.stats).map(([M,F])=>d.jsxs("div",{className:"bg-card border border-border/50 rounded-lg p-3",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono uppercase",children:M.replace(/_/g," ")}),d.jsx("p",{className:"text-lg font-bold text-foreground font-mono",children:F})]},M))})]})),t==="access"&&(g?d.jsx("div",{className:"flex justify-center py-10",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):y?d.jsx(Nd,{title:"Access logs require an upgrade",description:dj(h)}):d.jsxs(He.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border/30",children:[d.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:[x.length," entries"]}),d.jsxs(Ot,{size:"sm",variant:"outline",onClick:()=>L(b),disabled:C||m,className:"gap-1.5 text-xs h-7 px-2",children:[d.jsx(ip,{className:`w-3 h-3 ${C||m?"animate-spin":""}`}),C?"Syncing…":m?"Loading…":"Refresh"]})]}),d.jsx(sU,{rows:Array.isArray(x)?x:[],columns:[{key:"timestamp",label:"Time",render:M=>M?Xe(M).format("MMM D HH:mm:ss"):"—"},{key:"source_ip",label:"IP"},{key:"method",label:"Method"},{key:"endpoint",label:"Path"},{key:"status_code",label:"Status",render:M=>{const F=M>=500?"bg-destructive/20 text-destructive border-destructive/30":M>=400?"bg-neon-orange/20 text-neon-orange border-neon-orange/30":"bg-accent/20 text-accent border-accent/30";return d.jsx(Oi,{className:`text-[10px] border ${F}`,children:M})}},{key:"user_agent",label:"Agent"}]})]})),t==="admin"&&(_?d.jsx("div",{className:"flex justify-center py-10",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):R?d.jsx(Nd,{title:"Admin trail requires an upgrade",description:dj(w)}):d.jsxs(He.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border/30",children:[d.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:[D.length," entries"]}),d.jsxs(Ot,{size:"sm",variant:"outline",onClick:()=>L(P),disabled:C||k,className:"gap-1.5 text-xs h-7 px-2",children:[d.jsx(ip,{className:`w-3 h-3 ${C||k?"animate-spin":""}`}),C?"Syncing…":k?"Loading…":"Refresh"]})]}),d.jsx(sU,{rows:Array.isArray(D)?D:[],columns:[{key:"timestamp",label:"Time",render:M=>M?Xe(M).format("MMM D HH:mm:ss"):"—"},{key:"action",label:"Action",render:M=>d.jsx(Oi,{className:"text-[10px] border bg-primary/20 text-primary border-primary/30",children:M||"—"})},{key:"resource_type",label:"Resource"},{key:"resource_id",label:"ID",render:M=>M?d.jsxs("span",{title:M,children:[String(M).slice(0,8),"…"]}):"—"},{key:"source_ip",label:"IP"},{key:"detail",label:"Detail",render:M=>{if(!M)return"—";const F=typeof M=="string"?M:JSON.stringify(M);return d.jsx("span",{className:"text-muted-foreground",title:F,children:F.length>60?F.slice(0,60)+"…":F})}}]})]}))]})}function FBe(){const{features:e,user:t}=kp()||{},[n,r]=E.useState(null),{data:i=[]}=dn({queryKey:["sites",t==null?void 0:t.email],queryFn:()=>Fc(ut.entities.Site,{created_by:t.email}),enabled:!!(t!=null&&t.email),initialData:[]});E.useEffect(()=>{!n&&i.length>0&&r(i[0].id)},[i]);const a=!e||e.compliance===!0;return e&&!a?d.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] space-y-4 text-center",children:[d.jsx("div",{className:"w-16 h-16 rounded-2xl bg-muted/50 border border-border/50 flex items-center justify-center",children:d.jsx(Vg,{className:"w-8 h-8 text-muted-foreground"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-bold text-foreground",children:"Compliance requires an upgrade"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This module is available on the Compliance and Enterprise plans."})]})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Compliance"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"SOC2 incident management, audit reports & log integrity"})]}),i.length>0&&d.jsxs("select",{value:n||"",onChange:o=>r(o.target.value),className:"bg-card border border-border/50 text-foreground text-sm rounded-lg px-3 py-2 focus:outline-none focus:ring-1 focus:ring-primary",children:[d.jsx("option",{value:"",disabled:!0,children:"Select a site…"}),i.map(o=>d.jsx("option",{value:o.id,children:o.name||o.url},o.id))]})]}),i.length===0?d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-12 text-center",children:[d.jsx(so,{className:"w-8 h-8 mx-auto text-muted-foreground/30 mb-3"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a site first to view compliance data"})]}):d.jsxs(B8e,{defaultValue:"incidents",className:"space-y-6",children:[d.jsxs(rZ,{className:"bg-card border border-border/50",children:[d.jsx(Cb,{value:"incidents",className:"text-xs data-[state=active]:bg-primary/20 data-[state=active]:text-primary",children:"Incidents"}),d.jsx(Cb,{value:"reports",className:"text-xs data-[state=active]:bg-primary/20 data-[state=active]:text-primary",children:"SOC2 Reports"}),d.jsx(Cb,{value:"audit",className:"text-xs data-[state=active]:bg-primary/20 data-[state=active]:text-primary",children:"Audit Logs"})]}),d.jsx(Eb,{value:"incidents",children:e&&e.ir_documentation===!1?d.jsx(Nd,{title:"Incident management requires an upgrade",description:"IR documentation is available on the Compliance and Enterprise plans."}):d.jsx($8e,{siteId:n})}),d.jsx(Eb,{value:"reports",children:e&&e.soc2_reports===!1?d.jsx(Nd,{title:"SOC2 reports require an upgrade",description:"Report generation is available on the Compliance and Enterprise plans."}):d.jsx(RBe,{siteId:n})}),d.jsx(Eb,{value:"audit",children:e&&e.audit_logs===!1?d.jsx(Nd,{title:"Audit logs require an upgrade",description:"Log integrity, access logs, and admin trail are available on the Compliance and Enterprise plans."}):d.jsx(DBe,{siteId:n})})]})]})}var W5="Switch",[BBe]=Rd(W5),[$Be,qBe]=BBe(W5),XZ=E.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:l="on",onCheckedChange:c,form:f,...h}=e,[g,m]=E.useState(null),b=Ar(t,k=>m(k)),y=E.useRef(!1),x=g?f||!!g.closest("form"):!0,[w,_]=cp({prop:i,defaultProp:a??!1,onChange:c,caller:W5});return d.jsxs($Be,{scope:n,checked:w,disabled:s,children:[d.jsx(An.button,{type:"button",role:"switch","aria-checked":w,"aria-required":o,"data-state":eee(w),"data-disabled":s?"":void 0,disabled:s,value:l,...h,ref:b,onClick:Nn(e.onClick,k=>{_(P=>!P),x&&(y.current=k.isPropagationStopped(),y.current||k.stopPropagation())})}),x&&d.jsx(ZZ,{control:g,bubbles:!y.current,name:r,value:l,checked:w,required:o,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});XZ.displayName=W5;var QZ="SwitchThumb",JZ=E.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=qBe(QZ,n);return d.jsx(An.span,{"data-state":eee(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});JZ.displayName=QZ;var UBe="SwitchBubbleInput",ZZ=E.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{const o=E.useRef(null),s=Ar(o,a),l=IO(n),c=TO(t);return E.useEffect(()=>{const f=o.current;if(!f)return;const h=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(h,"checked").set;if(l!==n&&m){const b=new Event("click",{bubbles:r});m.call(f,n),f.dispatchEvent(b)}},[l,n,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ZZ.displayName=UBe;function eee(e){return e?"checked":"unchecked"}var tee=XZ,zBe=JZ;const nee=E.forwardRef(({className:e,...t},n)=>d.jsx(tee,{className:Un("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:d.jsx(zBe,{className:Un("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));nee.displayName=tee.displayName;function ree({user:e,onPortal:t,onCancel:n,onResume:r,busy:i}){const a=!!(e!=null&&e.stripe_subscription_id),o=e==null?void 0:e.subscription_status,s=e==null?void 0:e.subscription_cancel_at_period_end,l=e==null?void 0:e.subscription_current_period_end;return a?d.jsx("div",{className:"bg-card border border-border/50 rounded-xl p-6",children:d.jsxs("div",{className:"flex items-start justify-between flex-wrap gap-4",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsxs("p",{className:"text-sm text-foreground font-semibold capitalize",children:[e.plan," plan"]}),d.jsx("span",{className:`text-[10px] font-mono uppercase tracking-[0.15em] px-2 py-0.5 rounded-full ${o==="active"?"bg-accent/15 text-accent":o==="past_due"?"bg-destructive/15 text-destructive":"bg-muted text-muted-foreground"}`,children:o||"unknown"})]}),l&&d.jsxs("p",{className:"text-xs text-muted-foreground",children:[s?"Cancels on ":"Renews on ",d.jsx("span",{className:"text-foreground",children:o0(new Date(l),"PPP")})]})]}),d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsxs(Ot,{variant:"outline",size:"sm",onClick:t,disabled:i,className:"text-xs gap-1.5",children:[i==="portal"?d.jsx(hn,{className:"w-3.5 h-3.5 animate-spin"}):d.jsx(t1,{className:"w-3.5 h-3.5"}),"Manage billing"]}),s?d.jsxs(Ot,{variant:"outline",size:"sm",onClick:r,disabled:i,className:"text-xs gap-1.5",children:[i==="resume"?d.jsx(hn,{className:"w-3.5 h-3.5 animate-spin"}):d.jsx(pne,{className:"w-3.5 h-3.5"}),"Resume subscription"]}):d.jsxs(Ot,{variant:"outline",size:"sm",onClick:n,disabled:i,className:"text-xs gap-1.5 text-destructive hover:text-destructive",children:[i==="cancel"?d.jsx(hn,{className:"w-3.5 h-3.5 animate-spin"}):d.jsx(xE,{className:"w-3.5 h-3.5"}),"Cancel"]})]})]})}):d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-6",children:[d.jsx("p",{className:"text-sm text-foreground font-medium mb-1",children:"No active subscription"}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["You're on the ",d.jsx("span",{className:"text-foreground",children:(e==null?void 0:e.plan)||"free"})," plan. Choose a plan below to upgrade."]})]})}function VBe({plan:e,period:t="monthly",currentPlan:n,onSelect:r,loading:i}){const a=n===e.id,o=i===e.id,s=e[t]||e.monthly;return d.jsxs("div",{className:`relative rounded-2xl p-6 flex flex-col border transition-all ${e.highlight?"bg-primary/[0.04] border-primary/40":"bg-card border-border/50"} ${a?"ring-2 ring-primary/60":""}`,children:[e.highlight&&!a&&d.jsx("span",{className:"absolute -top-2.5 right-4 text-[10px] font-mono uppercase tracking-[0.15em] bg-primary text-primary-foreground px-2 py-0.5 rounded-full",children:"Popular"}),a&&d.jsx("span",{className:"absolute -top-2.5 right-4 text-[10px] font-mono uppercase tracking-[0.15em] bg-accent text-accent-foreground px-2 py-0.5 rounded-full",children:"Current"}),d.jsxs("div",{className:"mb-5",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-3",children:e.name}),d.jsxs("div",{className:"flex items-baseline gap-1 mb-2",children:[d.jsx("span",{className:"text-3xl font-semibold text-foreground tracking-tight",children:s.price}),s.numeric>0&&d.jsx("span",{className:"text-sm text-muted-foreground",children:t==="annual"?"/yr":"/mo"})]}),t==="annual"&&s.savingsLabel&&d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-accent mb-2",children:s.savingsLabel}),d.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:e.desc})]}),d.jsx("ul",{className:"space-y-2 flex-1 mb-5",children:e.features.map(l=>d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(Od,{className:"w-3 h-3 mt-1 flex-shrink-0 text-foreground/50"}),d.jsx("span",{className:"text-xs text-muted-foreground leading-relaxed",children:l})]},l))}),d.jsx(Ot,{onClick:()=>r(e),disabled:a||o||!!i,className:`w-full text-sm font-semibold ${e.highlight?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-secondary text-foreground hover:bg-secondary/80"}`,children:o?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):a?"Current plan":e.id==="enterprise"&&e.annualContactSales&&t==="annual"?"Contact sales":n&&n!=="free"?"Switch to this plan":"Choose plan"})]})}function iee({user:e}){var l;const{toast:t}=Gs(),n=Li(),[r,i]=E.useState("monthly"),a=Hi({mutationFn:c=>ut.functions.invoke("stripeCheckout",c),onSuccess:(c,f)=>{const h=c==null?void 0:c.data;if(h!=null&&h.url){window.location.href=h.url;return}h!=null&&h.success&&(t({title:"Subscription updated",description:h.switched?"Your plan has been switched. Only one active subscription is in effect.":`Your plan has been ${f.action==="cancel"?"scheduled to cancel":"updated"}.`}),n.invalidateQueries({queryKey:["currentUser"]}),n.invalidateQueries({queryKey:["features"]}))},onError:c=>{var f,h;t({title:"Error",description:((h=(f=c.response)==null?void 0:f.data)==null?void 0:h.error)||c.message,variant:"destructive"})}}),o=a.isPending?(l=a.variables)==null?void 0:l.plan:null,s=c=>{if(!!(e!=null&&e.stripe_subscription_id))a.mutate({action:"change_plan",plan:c.id,billing_period:r});else{const h=localStorage.getItem("affiliate_ref")||void 0;a.mutate({action:"checkout",plan:c.id,billing_period:r,affiliate_code:h})}};return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-4 flex-wrap gap-3",children:[d.jsx("h4",{className:"text-sm font-semibold text-foreground",children:"Change plan"}),d.jsx(rY,{value:r,onChange:i})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:BO.map(c=>d.jsx(VBe,{plan:c,period:r,currentPlan:e==null?void 0:e.plan,onSelect:s,loading:o},c.id))})]})}const lU=[{key:"notif_dashboard_alerts",label:"Dashboard alerts",desc:"Show alerts in the dashboard",defaultOn:!0},{key:"notif_critical_attacks",label:"Critical attack alerts",desc:"Get notified for critical severity attacks",defaultOn:!0},{key:"notif_scan_completion",label:"Scan completion",desc:"Notify when a security scan completes",defaultOn:!0},{key:"notif_weekly_reports",label:"Weekly reports",desc:"Receive weekly security summary",defaultOn:!1}];function WBe(){const{toast:e}=Gs(),t=Li(),{data:n,isLoading:r}=dn({queryKey:["currentUser"],queryFn:()=>ut.auth.me()}),[i,a]=E.useState(""),[o,s]=E.useState({});E.useEffect(()=>{if(n){a(n.full_name||"");const h={};lU.forEach(({key:g,defaultOn:m})=>{h[g]=n[g]!==void 0?n[g]:m}),s(h)}},[n]);const l=Hi({mutationFn:h=>ut.auth.updateMe(h),onSuccess:()=>{t.invalidateQueries({queryKey:["currentUser"]}),e({title:"Settings saved",description:"Your preferences have been updated."})},onError:h=>e({title:"Error",description:h.message,variant:"destructive"})}),c=()=>{l.mutate({full_name:i,...o})};if(r)return d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx(hn,{className:"w-6 h-6 animate-spin text-primary"})});const f=h=>ut.functions.invoke("stripeCheckout",h).then(g=>{var m,b;if((m=g==null?void 0:g.data)!=null&&m.url){window.location.href=g.data.url;return}(b=g==null?void 0:g.data)!=null&&b.success&&(t.invalidateQueries({queryKey:["currentUser"]}),t.invalidateQueries({queryKey:["features"]}),e({title:"Subscription updated"}))}).catch(g=>{var m,b;return e({title:"Error",description:((b=(m=g.response)==null?void 0:m.data)==null?void 0:b.error)||g.message,variant:"destructive"})});return d.jsxs("div",{className:"space-y-6 max-w-6xl",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Settings"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage your account and notification preferences"})]}),d.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-card border border-border/50 rounded-xl p-6 space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[d.jsx(Ine,{className:"w-5 h-5 text-primary"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Profile"})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Full Name"}),d.jsx(qr,{value:i,onChange:h=>a(h.target.value),className:"bg-muted/50 border-border/50",placeholder:"Your name"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Email"}),d.jsx(qr,{value:(n==null?void 0:n.email)||"",disabled:!0,className:"bg-muted/50 border-border/50 opacity-60"})]})]})]}),d.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-card border border-border/50 rounded-xl p-6 space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[d.jsx(pg,{className:"w-5 h-5 text-neon-orange"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Notifications"})]}),d.jsx("div",{className:"space-y-4",children:lU.map(({key:h,label:g,desc:m})=>d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm text-foreground",children:g}),d.jsx("p",{className:"text-xs text-muted-foreground",children:m})]}),d.jsx(nee,{checked:!!o[h],onCheckedChange:b=>s(y=>({...y,[h]:b}))})]},h))})]}),d.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.25},className:"bg-card border border-border/50 rounded-xl p-6 space-y-5",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(t1,{className:"w-5 h-5 text-neon-purple"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Subscription"})]}),d.jsx(ree,{user:n,onPortal:()=>f({action:"portal"}),onCancel:()=>{confirm("Cancel your subscription? It will remain active until the end of the billing period.")&&f({action:"cancel"})},onResume:()=>f({action:"resume"})}),d.jsx(iee,{user:n})]}),d.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-card border border-border/50 rounded-xl p-6 space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[d.jsx(Ki,{className:"w-5 h-5 text-accent"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Security"})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("p",{className:"text-sm text-foreground",children:"Two-factor authentication"}),d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider bg-primary/15 text-primary px-2 py-0.5 rounded-full",children:"Coming soon"})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Add extra security to your account"})]}),d.jsx(Ot,{variant:"outline",size:"sm",className:"text-xs",disabled:!0,children:"Enable"})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("p",{className:"text-sm text-foreground",children:"API Access"}),d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider bg-primary/15 text-primary px-2 py-0.5 rounded-full",children:"Coming soon"})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Manage API keys for programmatic access"})]}),d.jsx(Ot,{variant:"outline",size:"sm",className:"text-xs",disabled:!0,children:"Manage Keys"})]})]})]}),d.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:d.jsxs(Ot,{onClick:c,disabled:l.isPending,className:"gap-2 bg-primary text-primary-foreground hover:bg-primary/90",children:[l.isPending?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(gne,{className:"w-4 h-4"}),"Save Changes"]})})]})}const HBe=e=>ut.functions.invoke("siteApi",e).then(t=>t.data),km=e=>ut.functions.invoke("protection",e).then(t=>t.data);function YBe({sites:e,selectedId:t,onChange:n}){return d.jsxs("select",{value:t||"",onChange:r=>n(r.target.value),className:"bg-secondary border border-border text-foreground text-sm rounded-lg px-3 py-2 focus:outline-none focus:ring-1 focus:ring-primary",children:[d.jsx("option",{value:"",disabled:!0,children:"Select a site…"}),e.map(r=>d.jsx("option",{value:r.id,children:r.name},r.id))]})}function GBe(){const{user:e,features:t}=kp()||{},{toast:n}=Gs(),[r,i]=E.useState(null),[a,o]=E.useState(""),[s,l]=E.useState(""),[c,f]=E.useState(""),h=!!(t!=null&&t.ip_blocking),[,g]=E.useState(0);E.useEffect(()=>{const Y=setInterval(()=>g(Z=>Z+1),3e4);return()=>clearInterval(Y)},[]);const{data:m=[]}=dn({queryKey:["sites",e==null?void 0:e.email],queryFn:()=>Fc(ut.entities.Site,{created_by:e.email}),enabled:!!(e!=null&&e.email),initialData:[]});_e.useEffect(()=>{!r&&m.length>0&&i(m[0].id)},[m]);const{data:b=[],isLoading:y}=dn({queryKey:["all-threats",e==null?void 0:e.email],queryFn:async()=>{const Y=await HBe({action:"get_all_threats"});return(Y==null?void 0:Y.threats)||[]},enabled:!!(e!=null&&e.email),refetchInterval:1e4,staleTime:5e3,retry:!1}),x=E.useMemo(()=>r?b.filter(Y=>Y.site_id===r):b,[b,r]),{blockedIpStats:w,blockedIpList:_}=E.useMemo(()=>{const Y=x.filter(se=>se.blocked),Z=new Map;Y.forEach(se=>{const z=se.attacker_ip;if(!z)return;const te=se.attack_timestamp||se.created_date,$=Z.get(z);$?($.count+=1,new Date(te)>new Date($.last_seen)&&($.last_seen=te,$.attack_type=se.attack_type,$.endpoint=se.endpoint)):Z.set(z,{ip:z,attack_type:se.attack_type,severity:se.severity,count:1,last_seen:te,endpoint:se.endpoint})});const K=Array.from(Z.values()).sort((se,z)=>new Date(z.last_seen)-new Date(se.last_seen));return{blockedIpStats:{total:Z.size,attacks:Y.length},blockedIpList:K}},[x]),k=Y=>{if(!Y)return[];const Z=Array.isArray(Y)&&Y||Y.blocklist||Y.whitelist||Y.blocked_ips||Y.items||Y.ips||Y.data||[];return Array.isArray(Z)?Z.map(K=>typeof K=="string"?{ip:K}:K).filter(K=>K&&K.ip):[]},{data:P=[],isLoading:C,isFetching:j,refetch:L}=dn({queryKey:["blocklist",r],queryFn:()=>km({action:"get_blocklist",site_id:r}),enabled:!!r,retry:!1,staleTime:0,gcTime:0,refetchInterval:15e3,select:k}),{data:R=[],isLoading:D,isFetching:H,refetch:M}=dn({queryKey:["whitelist",r],queryFn:()=>km({action:"get_whitelist",site_id:r}),enabled:!!r,retry:!1,staleTime:0,gcTime:0,select:k}),F=Hi({mutationFn:({ip:Y,reason:Z})=>km({action:"block_ip",site_id:r,ip:Y,reason:Z}),onSuccess:async()=>{o(""),l(""),n({title:"IP blocked",description:`${a} has been blocked.`}),await L()},onError:Y=>{var Z,K;return n({title:"Error blocking IP",description:((K=(Z=Y==null?void 0:Y.response)==null?void 0:Z.data)==null?void 0:K.error)||Y.message,variant:"destructive"})}}),W=Hi({mutationFn:Y=>km({action:"unblock_ip",site_id:r,ip:Y}),onSuccess:async(Y,Z)=>{n({title:"IP unblocked",description:`${Z} removed from blocklist.`}),await L()},onError:Y=>{var Z,K;return n({title:"Error unblocking IP",description:((K=(Z=Y==null?void 0:Y.response)==null?void 0:Z.data)==null?void 0:K.error)||Y.message,variant:"destructive"})}}),V=Hi({mutationFn:Y=>km({action:"add_whitelist",site_id:r,ip:Y}),onSuccess:async()=>{f(""),n({title:"IP whitelisted",description:`${c} will never be auto-blocked.`}),await M()},onError:Y=>{var Z,K;return n({title:"Error",description:((K=(Z=Y==null?void 0:Y.response)==null?void 0:Z.data)==null?void 0:K.error)||Y.message,variant:"destructive"})}}),X=Hi({mutationFn:Y=>km({action:"remove_whitelist",site_id:r,ip:Y}),onSuccess:async(Y,Z)=>{n({title:"Removed from whitelist",description:`${Z} removed.`}),await M()},onError:Y=>{var Z,K;return n({title:"Error",description:((K=(Z=Y==null?void 0:Y.response)==null?void 0:Z.data)==null?void 0:K.error)||Y.message,variant:"destructive"})}});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Protection"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage blocked & whitelisted IPs per site"})]}),d.jsx(YBe,{sites:m,selectedId:r,onChange:i})]}),!h&&d.jsxs("div",{className:"flex items-center gap-3 bg-amber-500/10 border border-amber-500/30 rounded-xl px-5 py-4",children:[d.jsx(so,{className:"w-5 h-5 text-amber-400 flex-shrink-0"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:"text-sm font-semibold text-amber-400",children:"Upgrade to Pro to enable automatic blocking"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Free plan shows attack logs only. Pro auto-blocks threats in real time."})]}),d.jsx(Ot,{size:"sm",className:"bg-amber-500 text-white hover:bg-amber-600 text-xs",children:"Upgrade"})]}),r?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[{label:"Unique IPs Blocked",value:w.total,icon:Lu,color:"text-destructive"},{label:"Active Blocks",value:C?"…":P.length,icon:Ki,color:"text-primary"},{label:"Total Attacks Blocked",value:w.attacks,icon:so,color:"text-amber-400"}].map(Y=>d.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"bg-card border border-border/50 rounded-xl p-5 flex items-center gap-4",children:[d.jsx("div",{className:`p-2.5 rounded-lg bg-muted ${Y.color}`,children:d.jsx(Y.icon,{className:"w-5 h-5"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:Y.label}),d.jsx("p",{className:`text-2xl font-bold ${Y.color}`,children:Y.value})]})]},Y.label))}),h&&d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-5",children:[d.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[d.jsx(Lu,{className:"w-4 h-4 text-destructive"})," Block an IP"]}),d.jsxs("div",{className:"flex flex-wrap gap-3",children:[d.jsx(qr,{placeholder:"IP address (e.g. 1.2.3.4)",value:a,onChange:Y=>o(Y.target.value),className:"bg-muted/50 border-border/50 max-w-xs"}),d.jsx(qr,{placeholder:"Reason (optional)",value:s,onChange:Y=>l(Y.target.value),className:"bg-muted/50 border-border/50 max-w-xs"}),d.jsxs(Ot,{onClick:()=>F.mutate({ip:a,reason:s}),disabled:!a||F.isPending,className:"bg-destructive text-white hover:bg-destructive/90 gap-2",children:[F.isPending?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(Lu,{className:"w-4 h-4"}),"Block IP"]})]})]}),d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"p-5 border-b border-border/50 flex items-center justify-between gap-3 flex-wrap",children:[d.jsxs("div",{children:[d.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[d.jsx(Lu,{className:"w-4 h-4 text-destructive"})," Currently Active Blocks"]}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"IPs actively blocked at the proxy right now (blocks may expire over time)"})]}),d.jsxs(Ot,{size:"sm",variant:"outline",onClick:()=>L(),disabled:j,className:"gap-2 text-xs",children:[d.jsx(ip,{className:`w-3.5 h-3.5 ${j?"animate-spin":""}`}),j?"Refreshing…":"Refresh"]})]}),C?d.jsx("div",{className:"flex items-center justify-center py-12",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):P.length===0?d.jsx("div",{className:"py-10 text-center text-muted-foreground text-sm",children:"No IPs currently blocked"}):d.jsx(Vv,{items:P,pageSize:10,resetKey:r,children:Y=>d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border/30 text-xs text-muted-foreground",children:[d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"IP Address"}),d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"Reason"}),d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"Type"}),d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"Expires"}),d.jsx("th",{className:"px-5 py-3 text-right font-medium",children:"Action"})]})}),d.jsx("tbody",{children:Y.map((Z,K)=>d.jsxs("tr",{className:"border-b border-border/20 hover:bg-muted/20 transition-colors",children:[d.jsx("td",{className:"px-5 py-3 font-mono text-foreground",children:Z.ip}),d.jsx("td",{className:"px-5 py-3 text-muted-foreground max-w-[200px] truncate",children:Z.reason||"—"}),d.jsx("td",{className:"px-5 py-3",children:d.jsx(Oi,{className:Z.type==="auto"?"bg-primary/20 text-primary border-primary/30 border":"bg-amber-500/20 text-amber-400 border-amber-500/30 border",children:Z.type||"manual"})}),d.jsx("td",{className:"px-5 py-3 text-muted-foreground text-xs font-mono",children:Z.permanent?"Never":Z.expires_in_seconds?`${Math.round(Z.expires_in_seconds/3600)}h ${Math.round(Z.expires_in_seconds%3600/60)}m`:Z.expires_at?new Date(Z.expires_at).toLocaleDateString():"Permanent"}),d.jsx("td",{className:"px-5 py-3 text-right",children:h&&d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:()=>W.mutate(Z.ip),disabled:W.isPending,className:"text-destructive hover:bg-destructive/10 text-xs gap-1",children:[d.jsx(Gv,{className:"w-3 h-3"})," Unblock"]})})]},Z.ip||K))})]})})})]}),d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"p-5 border-b border-border/50",children:[d.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[d.jsx(Oh,{className:"w-4 h-4 text-accent"})," Blocked Attack History"]}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"All unique attacker IPs blocked by your proxy — includes expired blocks"})]}),_.length===0?d.jsx("div",{className:"py-10 text-center text-muted-foreground text-sm",children:"No blocked attacks yet"}):d.jsx(Vv,{items:_,pageSize:15,resetKey:r,children:Y=>d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border/30 text-xs text-muted-foreground",children:[d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"IP Address"}),d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"Attack Type"}),d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"Target"}),d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"Times Blocked"}),d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"Last Seen"})]})}),d.jsx("tbody",{children:Y.map(Z=>d.jsxs("tr",{className:"border-b border-border/20 hover:bg-muted/20 transition-colors",children:[d.jsx("td",{className:"px-5 py-3 font-mono text-foreground",children:Z.ip}),d.jsx("td",{className:"px-5 py-3",children:d.jsx(Oi,{className:"bg-destructive/15 text-destructive border-destructive/30 border text-[10px]",children:(Z.attack_type||"unknown").replace(/_/g," ")})}),d.jsx("td",{className:"px-5 py-3 text-muted-foreground font-mono text-xs max-w-[180px] truncate",children:Z.endpoint||"—"}),d.jsx("td",{className:"px-5 py-3 font-mono text-foreground",children:Z.count}),d.jsx("td",{className:"px-5 py-3 text-muted-foreground text-xs",children:Z.last_seen?Xe(Z.last_seen).fromNow():"—"})]},Z.ip))})]})})})]}),h&&d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"p-5 border-b border-border/50 flex items-center justify-between gap-3 flex-wrap",children:[d.jsxs("div",{children:[d.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[d.jsx(ss,{className:"w-4 h-4 text-accent"})," Whitelisted IPs"]}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Click refresh to sync the latest whitelisted IPs"})]}),d.jsxs(Ot,{size:"sm",variant:"outline",onClick:()=>M(),disabled:H,className:"gap-2 text-xs",children:[d.jsx(ip,{className:`w-3.5 h-3.5 ${H?"animate-spin":""}`}),H?"Refreshing…":"Refresh"]})]}),d.jsxs("div",{className:"p-5 border-b border-border/30",children:[d.jsxs("div",{className:"flex gap-3",children:[d.jsx(qr,{placeholder:"IP to whitelist (e.g. your office IP)",value:c,onChange:Y=>f(Y.target.value),className:"bg-muted/50 border-border/50 max-w-xs"}),d.jsxs(Ot,{onClick:()=>V.mutate(c),disabled:!c||V.isPending,className:"bg-accent text-accent-foreground hover:bg-accent/90 gap-2",children:[V.isPending?d.jsx(hn,{className:"w-4 h-4 animate-spin"}):d.jsx(S2,{className:"w-4 h-4"}),"Add to Whitelist"]})]}),d.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Whitelisted IPs are never auto-blocked. Use this for your office or home IP."})]}),D?d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):R.length===0?d.jsx("div",{className:"py-8 text-center text-muted-foreground text-sm",children:"No IPs whitelisted"}):d.jsx(Vv,{items:R,pageSize:10,resetKey:r,children:Y=>d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border/30 text-xs text-muted-foreground",children:[d.jsx("th",{className:"px-5 py-3 text-left font-medium",children:"IP Address"}),d.jsx("th",{className:"px-5 py-3 text-right font-medium",children:"Action"})]})}),d.jsx("tbody",{children:Y.map((Z,K)=>d.jsxs("tr",{className:"border-b border-border/20 hover:bg-muted/20 transition-colors",children:[d.jsx("td",{className:"px-5 py-3 font-mono text-foreground",children:Z.ip||Z}),d.jsx("td",{className:"px-5 py-3 text-right",children:d.jsxs(Ot,{size:"sm",variant:"ghost",onClick:()=>X.mutate(Z.ip||Z),disabled:X.isPending,className:"text-destructive hover:bg-destructive/10 text-xs gap-1",children:[d.jsx(Gv,{className:"w-3 h-3"})," Remove"]})})]},Z.ip||K))})]})})})]})]}):d.jsxs("div",{className:"text-center py-20 text-muted-foreground",children:[d.jsx(Ki,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),d.jsx("p",{children:"Select a site to manage protection"})]})]})}function KBe(){var l;const{toast:e}=Gs(),t=Li(),[n,r]=bz(),{data:i,isLoading:a}=dn({queryKey:["currentUser"],queryFn:()=>ut.auth.me()});E.useEffect(()=>{const c=n.get("status");c==="success"?(e({title:"Subscription activated",description:"Welcome aboard! Your plan is now active."}),t.invalidateQueries({queryKey:["currentUser"]}),t.invalidateQueries({queryKey:["features"]}),n.delete("status"),r(n,{replace:!0})):c==="cancelled"&&(e({title:"Checkout cancelled",description:"No changes were made to your subscription."}),n.delete("status"),r(n,{replace:!0}))},[n]);const o=Hi({mutationFn:c=>ut.functions.invoke("stripeCheckout",c),onSuccess:(c,f)=>{const h=c==null?void 0:c.data;if(h!=null&&h.url){window.location.href=h.url;return}h!=null&&h.success&&(e({title:"Subscription updated",description:`Your plan has been ${f.action==="cancel"?"scheduled to cancel":"updated"}.`}),t.invalidateQueries({queryKey:["currentUser"]}),t.invalidateQueries({queryKey:["features"]}))},onError:c=>{var f,h;e({title:"Error",description:((h=(f=c.response)==null?void 0:f.data)==null?void 0:h.error)||c.message,variant:"destructive"})}}),s=o.isPending?(l=o.variables)==null?void 0:l.action:null;return a?d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx(hn,{className:"w-6 h-6 animate-spin text-primary"})}):d.jsxs("div",{className:"space-y-6 max-w-6xl",children:[d.jsxs(He.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(t1,{className:"w-5 h-5 text-primary"}),d.jsx("h1",{className:"text-2xl font-black text-foreground tracking-tight",children:"Subscription"})]}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage your plan, billing, and subscription status."})]}),d.jsx(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},children:d.jsx(ree,{user:i,onPortal:()=>o.mutate({action:"portal"}),onCancel:()=>{confirm("Cancel your subscription? It will remain active until the end of the billing period.")&&o.mutate({action:"cancel"})},onResume:()=>o.mutate({action:"resume"}),busy:s})}),d.jsx(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:d.jsx(iee,{user:i})}),d.jsx(He.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3},className:"text-xs text-muted-foreground",children:"Payments are securely processed by Stripe. You can update your payment method or cancel anytime from the billing portal."})]})}const hj=[{value:"percent",label:"Percentage off",icon:une,hint:"e.g. 20% off"},{value:"amount",label:"Fixed amount off",icon:jte,hint:"e.g. $10 off"},{value:"free_months",label:"Free months",icon:Bte,hint:"e.g. 1 month free (100% off, first N months)"},{value:"free_trial_days",label:"Free trial days",icon:w2,hint:"e.g. 14-day free trial before charging"},{value:"none",label:"No discount",icon:Lu,hint:"Only tracks referrals & pays commission"}],pj={name:"",email:"",code:"",discount_type:"percent",discount_value:10,discount_currency:"usd",discount_duration:"forever",discount_duration_months:3,commission_percent:20,referral_base_url:"",status:"active",notes:""};function XBe({open:e,onClose:t,onSubmit:n,initial:r,saving:i}){const[a,o]=E.useState(pj),[s,l]=E.useState(null);E.useEffect(()=>{if(e){if(r){const b={...pj,...r,discount_type:r.discount_type||(r.discount_percent,"percent"),discount_value:r.discount_value??r.discount_percent??10};o(b)}else o(pj);l(null)}},[e,r]);const c=(b,y)=>o(x=>({...x,[b]:y})),f=b=>{if(b.preventDefault(),!a.name||!a.code){l("Name and code are required.");return}const y=Number(a.discount_value)||0;if(a.discount_type!=="none"&&y<=0){l("Discount value must be greater than zero.");return}if(a.discount_type==="percent"&&y>100){l("Percentage cannot exceed 100.");return}if(a.discount_duration==="repeating"&&(!a.discount_duration_months||a.discount_duration_months<1)){l("Set a number of months for repeating discount.");return}const x={...a,code:String(a.code).trim().toUpperCase().replace(/\s+/g,""),discount_value:y,discount_duration_months:Number(a.discount_duration_months)||null,commission_percent:Number(a.commission_percent)||0,referral_base_url:(a.referral_base_url||"").trim().replace(/\/$/,""),discount_percent:a.discount_type==="percent"?y:0};n(x)},h=hj.find(b=>b.value===a.discount_type)||hj[0],g=a.discount_type==="percent"||a.discount_type==="amount",m={percent:"Percent off (%)",amount:"Amount off",free_months:"Number of free months",free_trial_days:"Trial days",none:null}[a.discount_type];return d.jsx(us,{children:e&&d.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-background/80 backdrop-blur-md",onClick:t,children:d.jsxs(He.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},className:"relative w-full max-w-lg bg-card border border-white/[0.08] rounded-2xl p-7 max-h-[90vh] overflow-y-auto",onClick:b=>b.stopPropagation(),children:[d.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-1.5 rounded-full hover:bg-white/[0.06]",children:d.jsx(Lc,{className:"w-4 h-4 text-muted-foreground"})}),d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-2",children:r?"Edit affiliate":"New affiliate"}),d.jsx("h3",{className:"font-display text-2xl font-semibold text-foreground mb-5",style:{letterSpacing:"-0.02em"},children:r?a.name:"Create profile"}),d.jsxs("form",{onSubmit:f,className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Name *"}),d.jsx(qr,{value:a.name,onChange:b=>c("name",b.target.value),placeholder:"Jane Doe",className:"bg-muted/40 border-border/50"})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Email"}),d.jsx(qr,{type:"email",value:a.email,onChange:b=>c("email",b.target.value),placeholder:"jane@acme.com",className:"bg-muted/40 border-border/50"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Affiliate code *"}),d.jsx(qr,{value:a.code,onChange:b=>c("code",b.target.value.toUpperCase()),placeholder:"JANE20",className:"bg-muted/40 border-border/50 font-mono uppercase"}),d.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Used in the URL: /?ref=",a.code||"CODE"]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Referral base URL"}),d.jsx(qr,{value:a.referral_base_url,onChange:b=>c("referral_base_url",b.target.value),placeholder:"https://go.shieldsync.io",className:"bg-muted/40 border-border/50 font-mono text-xs"}),d.jsx("p",{className:"text-[10px] text-muted-foreground/70",children:"Optional. Leave empty to use this app's domain. Useful when you connect a custom domain."})]}),d.jsxs("div",{className:"bg-muted/20 border border-border/40 rounded-xl p-4 space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(h.icon,{className:"w-3.5 h-3.5 text-primary"}),d.jsx(yr,{className:"text-xs font-semibold text-foreground",children:"Customer perk"})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-[11px] text-muted-foreground",children:"Type"}),d.jsxs(qm,{value:a.discount_type,onValueChange:b=>c("discount_type",b),children:[d.jsx(Jh,{className:"bg-background border-border/50",children:d.jsx(Um,{})}),d.jsx(Zh,{className:"z-[200]",children:hj.map(b=>d.jsx(Ci,{value:b.value,children:b.label},b.value))})]}),d.jsx("p",{className:"text-[10px] text-muted-foreground/70",children:h.hint})]}),a.discount_type!=="none"&&d.jsxs("div",{className:`grid ${a.discount_type==="amount"?"grid-cols-2":"grid-cols-1"} gap-3`,children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-[11px] text-muted-foreground",children:m}),d.jsx(qr,{type:"number",min:"0",step:a.discount_type==="amount"?"0.01":"1",value:a.discount_value,onChange:b=>c("discount_value",b.target.value),className:"bg-background border-border/50"})]}),a.discount_type==="amount"&&d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-[11px] text-muted-foreground",children:"Currency"}),d.jsx(qr,{value:a.discount_currency,onChange:b=>c("discount_currency",b.target.value.toLowerCase()),placeholder:"usd",className:"bg-background border-border/50 uppercase",maxLength:3})]})]}),g&&d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-[11px] text-muted-foreground",children:"Applies"}),d.jsxs(qm,{value:a.discount_duration,onValueChange:b=>c("discount_duration",b),children:[d.jsx(Jh,{className:"bg-background border-border/50",children:d.jsx(Um,{})}),d.jsxs(Zh,{className:"z-[200]",children:[d.jsx(Ci,{value:"once",children:"Once (first invoice)"}),d.jsx(Ci,{value:"repeating",children:"Repeating (N months)"}),d.jsx(Ci,{value:"forever",children:"Forever"})]})]})]}),a.discount_duration==="repeating"&&d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-[11px] text-muted-foreground",children:"Months"}),d.jsx(qr,{type:"number",min:"1",value:a.discount_duration_months,onChange:b=>c("discount_duration_months",b.target.value),className:"bg-background border-border/50"})]})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Commission %"}),d.jsx(qr,{type:"number",min:"0",max:"100",value:a.commission_percent,onChange:b=>c("commission_percent",b.target.value),className:"bg-muted/40 border-border/50"}),d.jsx("p",{className:"text-[10px] text-muted-foreground/70",children:"Paid to the affiliate on each successful referral."})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Status"}),d.jsxs(qm,{value:a.status,onValueChange:b=>c("status",b),children:[d.jsx(Jh,{className:"bg-muted/40 border-border/50",children:d.jsx(Um,{})}),d.jsxs(Zh,{className:"z-[200]",children:[d.jsx(Ci,{value:"active",children:"Active"}),d.jsx(Ci,{value:"paused",children:"Paused"}),d.jsx(Ci,{value:"disabled",children:"Disabled"})]})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(yr,{className:"text-xs text-muted-foreground",children:"Notes"}),d.jsx(F2,{value:a.notes,onChange:b=>c("notes",b.target.value),rows:2,className:"bg-muted/40 border-border/50"})]}),s&&d.jsx("p",{className:"text-xs text-destructive",children:s}),d.jsxs(Ot,{type:"submit",disabled:i,className:"w-full bg-foreground text-background hover:bg-foreground/90 rounded-full gap-2",children:[i&&d.jsx(hn,{className:"w-4 h-4 animate-spin"}),r?"Save changes":"Create affiliate"]})]})]})})})}function QBe({affiliate:e,onClose:t}){const n=!!e,{data:r=[],isLoading:i}=dn({queryKey:["affiliateReferrals",e==null?void 0:e.id],queryFn:()=>ut.entities.AffiliateReferral.filter({affiliate_id:e.id},"-signed_up_at",500),enabled:n,initialData:[]}),a=r.filter(l=>l.subscribed).length,o=r.length-a,s=l=>{if(!l)return"—";try{return o0(new Date(l),"MMM d, yyyy · HH:mm 'UTC'")}catch{return"—"}};return d.jsx(us,{children:n&&d.jsx(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 z-[90] bg-background/80 backdrop-blur-md flex items-center justify-center p-4",children:d.jsxs(He.div,{initial:{opacity:0,scale:.97},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.97},onClick:l=>l.stopPropagation(),className:"relative w-full max-w-2xl bg-card border border-white/[0.08] rounded-2xl p-7 max-h-[85vh] overflow-y-auto",children:[d.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-1.5 rounded-full hover:bg-white/[0.06]",children:d.jsx(Lc,{className:"w-4 h-4 text-muted-foreground"})}),d.jsxs("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-2",children:["Referrals · ",e.code]}),d.jsx("h3",{className:"font-display text-2xl font-semibold text-foreground mb-1",style:{letterSpacing:"-0.02em"},children:e.name}),d.jsx("p",{className:"text-xs text-muted-foreground mb-6",children:"Every signup tied to this affiliate, with exact UTC timestamps."}),d.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[d.jsx(mj,{label:"Total",value:r.length}),d.jsx(mj,{label:"Subscribed",value:a,accent:"accent"}),d.jsx(mj,{label:"Pending",value:o,accent:"orange"})]}),i?d.jsx("div",{className:"py-14 flex justify-center",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):r.length===0?d.jsxs("div",{className:"py-14 text-center",children:[d.jsx($b,{className:"w-8 h-8 text-muted-foreground/50 mx-auto mb-3"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No referrals yet."})]}):d.jsx("div",{className:"border border-border/50 rounded-xl overflow-hidden divide-y divide-border/50",children:r.map(l=>d.jsx("div",{className:"px-4 py-3 flex items-center gap-4 hover:bg-white/[0.02]",children:d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[d.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.user_email}),l.subscribed?d.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-mono uppercase tracking-wider px-2 py-0.5 rounded-full bg-accent/10 text-accent border border-accent/30",children:[d.jsx(vE,{className:"w-2.5 h-2.5"}),"Subscribed",l.plan?` · ${l.plan}`:""]}):d.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-mono uppercase tracking-wider px-2 py-0.5 rounded-full bg-neon-orange/10 text-neon-orange border border-neon-orange/30",children:[d.jsx(w2,{className:"w-2.5 h-2.5"}),"Pending"]})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-0.5 text-[11px] font-mono text-muted-foreground",children:[d.jsxs("span",{children:["Signed up:"," ",d.jsx("span",{className:"text-foreground/80",children:s(l.signed_up_at||l.created_date)})]}),d.jsxs("span",{children:["Subscribed:"," ",d.jsx("span",{className:"text-foreground/80",children:s(l.subscribed_at)})]})]})]})},l.id))}),d.jsx("p",{className:"text-[10px] text-muted-foreground/70 font-mono mt-4",children:"All timestamps are UTC. Use the subscribed date to determine payout period."})]})})})}function mj({label:e,value:t,accent:n}){const r=n==="accent"?"text-accent":n==="orange"?"text-neon-orange":"text-foreground";return d.jsxs("div",{className:"bg-muted/20 border border-border/40 rounded-xl p-3",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-[0.15em] text-muted-foreground mb-1",children:e}),d.jsx("p",{className:`text-xl font-semibold ${r}`,style:{letterSpacing:"-0.02em"},children:t})]})}const cU={active:"bg-accent/10 text-accent border-accent/30",paused:"bg-neon-orange/10 text-neon-orange border-neon-orange/30",disabled:"bg-muted text-muted-foreground border-border"};function JBe(){const e=Li(),[t,n]=E.useState(!1),[r,i]=E.useState(null),[a,o]=E.useState(null),[s,l]=E.useState(null),{data:c=[],isLoading:f}=dn({queryKey:["affiliates"],queryFn:()=>ut.entities.Affiliate.list("-created_date",200),initialData:[]}),h=Hi({mutationFn:async _=>r?ut.entities.Affiliate.update(r.id,_):ut.entities.Affiliate.create(_),onSuccess:()=>{e.invalidateQueries({queryKey:["affiliates"]}),n(!1),i(null)}}),g=Hi({mutationFn:_=>ut.entities.Affiliate.delete(_),onSuccess:()=>e.invalidateQueries({queryKey:["affiliates"]})}),m=typeof window<"u"?window.location.origin:"",b=_=>{let k=(_.referral_base_url||m).trim().replace(/\/+$/,"");return k&&!/^https?:\/\//i.test(k)&&(k=`https://${k}`),`${k}/?ref=${_.code}`},y=_=>{const k=_.discount_type||(_.discount_percent>0?"percent":"none"),P=_.discount_value??_.discount_percent??0,C=()=>k!=="percent"&&k!=="amount"?"":_.discount_duration==="once"?" · first invoice":_.discount_duration==="repeating"?` · ${_.discount_duration_months||0} mo`:" · forever";return k==="percent"&&P?`${P}% off${C()}`:k==="amount"&&P?`${P} ${(_.discount_currency||"usd").toUpperCase()} off${C()}`:k==="free_months"&&P?`${P} month${P>1?"s":""} free`:k==="free_trial_days"&&P?`${P}-day free trial`:"No discount"},x=async _=>{await navigator.clipboard.writeText(b(_)),o(_.id),setTimeout(()=>o(null),1500)},w=c.reduce((_,k)=>({signups:_.signups+(k.signups_count||0),subscribers:_.subscribers+(k.subscribers_count||0)}),{signups:0,subscribers:0});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx($b,{className:"w-4 h-4 text-primary"}),d.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Affiliate program"})]}),d.jsxs(Ot,{onClick:()=>{i(null),n(!0)},className:"bg-foreground text-background hover:bg-foreground/90 rounded-full text-xs gap-1.5 h-8",children:[d.jsx(S2,{className:"w-3.5 h-3.5"}),"New affiliate"]})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[d.jsx(gj,{label:"Affiliates",value:c.length}),d.jsx(gj,{label:"Signups",value:w.signups,accent:"primary"}),d.jsx(gj,{label:"Subscribers",value:w.subscribers,accent:"accent"})]}),d.jsx("div",{className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:f?d.jsx("div",{className:"py-14 flex justify-center",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):c.length===0?d.jsxs("div",{className:"py-14 text-center",children:[d.jsx(One,{className:"w-8 h-8 text-muted-foreground/50 mx-auto mb-3"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No affiliates yet. Create the first one."})]}):d.jsx("div",{className:"divide-y divide-border/50",children:c.map(_=>d.jsxs("div",{className:"px-6 py-4 flex items-center gap-4 hover:bg-white/[0.02] transition-colors",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[d.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:_.name}),d.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider px-2 py-0.5 rounded-full bg-primary/10 text-primary border border-primary/30",children:_.code}),d.jsx("span",{className:`text-[10px] font-mono uppercase tracking-wider px-2 py-0.5 rounded-full border ${cU[_.status]||cU.active}`,children:_.status||"active"})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground flex-wrap",children:[d.jsx("span",{className:"text-foreground/90",children:y(_)}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:[_.commission_percent||0,"% commission"]}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:[d.jsx("span",{className:"text-foreground",children:_.signups_count||0})," signups"]}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:[d.jsx("span",{className:"text-accent",children:_.subscribers_count||0})," subs"]}),_.referral_base_url&&d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"·"}),d.jsx("span",{className:"font-mono text-[10px] truncate",children:_.referral_base_url.replace(/^https?:\/\//,"")})]})]})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("button",{onClick:()=>l(_),title:"View referrals & dates",className:"p-2 rounded-full hover:bg-white/[0.06] text-muted-foreground hover:text-foreground transition-colors",children:d.jsx(Yte,{className:"w-3.5 h-3.5"})}),d.jsx("button",{onClick:()=>x(_),title:"Copy referral link",className:"p-2 rounded-full hover:bg-white/[0.06] text-muted-foreground hover:text-foreground transition-colors",children:a===_.id?d.jsx(Od,{className:"w-3.5 h-3.5 text-accent"}):d.jsx(Wte,{className:"w-3.5 h-3.5"})}),d.jsx("button",{onClick:()=>{i(_),n(!0)},title:"Edit",className:"p-2 rounded-full hover:bg-white/[0.06] text-muted-foreground hover:text-foreground transition-colors",children:d.jsx(lne,{className:"w-3.5 h-3.5"})}),d.jsx("button",{onClick:()=>{confirm(`Delete affiliate "${_.name}"? Existing referrals stay but won't be attributed anymore.`)&&g.mutate(_.id)},title:"Delete",className:"p-2 rounded-full hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-colors",children:d.jsx(Gv,{className:"w-3.5 h-3.5"})})]})]},_.id))})}),c.length>0&&d.jsxs("p",{className:"text-[11px] text-muted-foreground font-mono",children:["Default link: ",m,"/?ref=CODE — override per affiliate with a custom domain."]}),d.jsx(XBe,{open:t,onClose:()=>{n(!1),i(null)},onSubmit:_=>h.mutate(_),initial:r,saving:h.isPending}),d.jsx(QBe,{affiliate:s,onClose:()=>l(null)})]})}function gj({label:e,value:t,accent:n}){const r=n==="primary"?"text-primary":n==="accent"?"text-accent":"text-foreground";return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-4",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-[0.15em] text-muted-foreground mb-1.5",children:e}),d.jsx("p",{className:`text-2xl font-semibold ${r}`,style:{letterSpacing:"-0.02em"},children:t})]})}const uU={new:"bg-primary/10 text-primary border-primary/30",contacted:"bg-neon-orange/10 text-neon-orange border-neon-orange/30",closed:"bg-muted text-muted-foreground border-border"};function ZBe(){const[e,t]=E.useState(!0),[n,r]=E.useState(null),[i,a]=E.useState(null),[o,s]=E.useState("inquiries"),l=Li();E.useEffect(()=>{(async()=>{if(!await ut.auth.isAuthenticated()){ut.auth.redirectToLogin("/admin");return}const b=await ut.auth.me();r(b),t(!1)})()},[]);const{data:c=[],isLoading:f}=dn({queryKey:["adminContactMessages"],queryFn:()=>ut.entities.ContactMessage.list("-created_date",200),enabled:!e&&(n==null?void 0:n.role)==="admin",initialData:[]}),h=Hi({mutationFn:({id:m,status:b})=>ut.entities.ContactMessage.update(m,{status:b}),onSuccess:()=>{l.invalidateQueries({queryKey:["adminContactMessages"]}),i&&a(m=>({...m,status:m.__nextStatus||m.status}))}});if(e)return d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:d.jsx(hn,{className:"w-6 h-6 animate-spin text-primary"})});if((n==null?void 0:n.role)!=="admin")return d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-6",children:d.jsxs("div",{className:"max-w-md text-center",children:[d.jsx(Ki,{className:"w-10 h-10 text-destructive mx-auto mb-4"}),d.jsx("h1",{className:"font-display text-2xl font-semibold text-foreground mb-2",style:{letterSpacing:"-0.02em"},children:"Admin access only"}),d.jsx("p",{className:"text-sm text-muted-foreground font-light mb-6",children:"This area is restricted to administrators."}),d.jsx(va,{to:"/dashboard",children:d.jsxs(Ot,{variant:"outline",className:"rounded-full text-xs gap-2",children:[d.jsx(Db,{className:"w-3 h-3"}),"Back to dashboard"]})})]})});const g={total:c.length,new:c.filter(m=>m.status==="new").length,contacted:c.filter(m=>m.status==="contacted").length};return d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx("header",{className:"border-b border-white/[0.06] px-6 py-5",children:d.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx(va,{to:"/dashboard",className:"p-2 rounded-full hover:bg-white/[0.05] transition-colors",children:d.jsx(Db,{className:"w-4 h-4 text-muted-foreground"})}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[d.jsx(Ki,{className:"w-4 h-4 text-primary"}),d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground",children:"Admin"})]}),d.jsx("h1",{className:"font-display text-2xl font-semibold text-foreground",style:{letterSpacing:"-0.02em"},children:"Control panel"})]})]}),d.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:n.email})]})}),d.jsxs("main",{className:"max-w-7xl mx-auto p-6 space-y-6",children:[d.jsx("div",{className:"flex items-center gap-1 bg-muted/30 border border-border/50 rounded-full p-1 w-fit",children:[{id:"inquiries",label:"Sales inquiries",icon:n6},{id:"affiliates",label:"Affiliates",icon:$b}].map(m=>d.jsxs("button",{onClick:()=>s(m.id),className:`flex items-center gap-2 text-xs font-medium px-4 py-1.5 rounded-full transition-colors ${o===m.id?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,children:[d.jsx(m.icon,{className:"w-3.5 h-3.5"}),m.label]},m.id))}),o==="affiliates"?d.jsx(JBe,{}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[d.jsx(yj,{label:"Total inquiries",value:g.total}),d.jsx(yj,{label:"New",value:g.new,accent:"primary"}),d.jsx(yj,{label:"Contacted",value:g.contacted,accent:"orange"})]}),d.jsxs(He.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"bg-card border border-border/50 rounded-xl overflow-hidden",children:[d.jsxs("div",{className:"flex items-center gap-3 px-6 py-4 border-b border-border/50",children:[d.jsx(n6,{className:"w-4 h-4 text-primary"}),d.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Enterprise sales inquiries"})]}),f?d.jsx("div",{className:"py-16 flex justify-center",children:d.jsx(hn,{className:"w-5 h-5 animate-spin text-primary"})}):c.length===0?d.jsxs("div",{className:"py-16 text-center",children:[d.jsx(ene,{className:"w-8 h-8 text-muted-foreground/50 mx-auto mb-3"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No messages yet."})]}):d.jsx("div",{className:"divide-y divide-border/50",children:c.map(m=>d.jsxs("button",{onClick:()=>a(m),className:"w-full text-left px-6 py-4 hover:bg-white/[0.02] transition-colors flex items-center gap-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[d.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:m.name}),d.jsx("span",{className:`text-[10px] font-mono uppercase tracking-wider px-2 py-0.5 rounded-full border ${uU[m.status]||uU.new}`,children:m.status||"new"})]}),d.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[m.email,m.company?` · ${m.company}`:"",m.team_size?` · ${m.team_size}`:""]})]}),d.jsx("span",{className:"text-xs font-mono text-muted-foreground whitespace-nowrap",children:m.created_date?o0(new Date(m.created_date),"MMM d, HH:mm"):""})]},m.id))})]})]})]}),i&&d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-background/80 backdrop-blur-md",onClick:()=>a(null),children:d.jsxs(He.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},className:"relative w-full max-w-xl bg-card border border-white/[0.08] rounded-2xl p-7 max-h-[85vh] overflow-y-auto",onClick:m=>m.stopPropagation(),children:[d.jsx("button",{onClick:()=>a(null),className:"absolute top-4 right-4 p-1.5 rounded-full hover:bg-white/[0.06]",children:d.jsx(Lc,{className:"w-4 h-4 text-muted-foreground"})}),d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.18em] text-muted-foreground mb-2",children:i.source||"enterprise_sales"}),d.jsx("h3",{className:"font-display text-2xl font-semibold text-foreground mb-1",style:{letterSpacing:"-0.02em"},children:i.name}),d.jsxs("a",{href:`mailto:${i.email}`,className:"text-sm text-primary hover:underline inline-flex items-center gap-1.5",children:[i.email,d.jsx(PU,{className:"w-3 h-3"})]}),d.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3 text-xs",children:[d.jsx(lb,{icon:mE,label:"Company",value:i.company}),d.jsx(lb,{icon:jc,label:"Website",value:i.website}),d.jsx(lb,{icon:$b,label:"Team size",value:i.team_size}),d.jsx(lb,{icon:w2,label:"Received",value:i.created_date?o0(new Date(i.created_date),"PP p"):"—"})]}),d.jsxs("div",{className:"mt-6",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-wider text-muted-foreground mb-2",children:"Message"}),d.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-wrap bg-muted/30 border border-border/50 rounded-lg p-4",children:i.message})]}),d.jsxs("div",{className:"mt-6 flex items-center gap-2 pt-4 border-t border-border/50",children:[d.jsx("span",{className:"text-xs text-muted-foreground mr-2",children:"Mark as:"}),["new","contacted","closed"].map(m=>d.jsxs(Ot,{size:"sm",variant:i.status===m?"default":"outline",className:"text-xs rounded-full h-7 px-3 capitalize",disabled:h.isPending,onClick:()=>{a({...i,__nextStatus:m}),h.mutate({id:i.id,status:m})},children:[m==="closed"&&d.jsx(vE,{className:"w-3 h-3"}),m]},m))]})]})})]})}function yj({label:e,value:t,accent:n}){const r=n==="primary"?"text-primary":n==="orange"?"text-neon-orange":"text-foreground";return d.jsxs("div",{className:"bg-card border border-border/50 rounded-xl p-5",children:[d.jsx("p",{className:"text-xs font-mono uppercase tracking-[0.15em] text-muted-foreground mb-2",children:e}),d.jsx("p",{className:`text-3xl font-semibold ${r}`,style:{letterSpacing:"-0.02em"},children:t})]})}function lb({icon:e,label:t,value:n}){return d.jsxs("div",{className:"flex items-start gap-2.5 bg-muted/20 border border-border/40 rounded-lg p-3",children:[d.jsx(e,{className:"w-3.5 h-3.5 text-muted-foreground mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-muted-foreground",children:t}),d.jsx("p",{className:"text-sm text-foreground truncate",children:n||"—"})]})]})}function e$e(){return d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx("nav",{className:"border-b border-border/50 px-6 py-4",children:d.jsxs("div",{className:"max-w-3xl mx-auto flex items-center justify-between",children:[d.jsxs(va,{to:"/",className:"flex items-center gap-2",children:[d.jsx(Ki,{className:"w-5 h-5 text-primary"}),d.jsx("span",{className:"text-sm font-mono uppercase tracking-[0.18em] text-muted-foreground",children:"ShieldSync"})]}),d.jsxs(va,{to:"/",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors",children:[d.jsx(Db,{className:"w-3.5 h-3.5"}),"Back to home"]})]})}),d.jsxs("main",{className:"max-w-3xl mx-auto px-6 py-12",children:[d.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-foreground mb-2",style:{letterSpacing:"-0.02em"},children:"Data Processing Agreement"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-10",children:"Last updated: April 18, 2026"}),d.jsxs("div",{className:"prose-sm space-y-8 text-sm text-muted-foreground leading-relaxed",children:[d.jsx(Ao,{title:"1. Parties",children:d.jsx("p",{children:'This Data Processing Agreement ("DPA") is entered into between you, the customer ("Data Controller" or "Customer"), and ShieldSync ("Data Processor" or "We/Us"), and supplements the ShieldSync Terms of Service.'})}),d.jsx(Ao,{title:"2. Definitions",children:d.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[d.jsxs("li",{children:[d.jsx("strong",{className:"text-foreground",children:"Personal Data"})," — any information relating to an identified or identifiable natural person visiting the Customer's website."]}),d.jsxs("li",{children:[d.jsx("strong",{className:"text-foreground",children:"Processing"})," — any operation performed on Personal Data, including collection, storage, analysis, and deletion."]}),d.jsxs("li",{children:[d.jsx("strong",{className:"text-foreground",children:"Sub-processor"})," — a third party engaged by ShieldSync to process Personal Data on behalf of the Customer."]})]})}),d.jsxs(Ao,{title:"3. Scope of Processing",children:[d.jsx("p",{children:"ShieldSync processes the following data categories from web traffic routed through its proxy:"}),d.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[d.jsx("li",{children:"Visitor IP addresses"}),d.jsx("li",{children:"HTTP request metadata (URL path, method, headers, user-agent, referrer)"}),d.jsx("li",{children:"Timestamps of requests"}),d.jsx("li",{children:"Geolocation data derived from IP addresses (country, city)"})]}),d.jsxs("p",{className:"mt-2",children:[d.jsx("strong",{className:"text-foreground",children:"Purpose:"})," Data is processed solely for the purpose of detecting, preventing, and mitigating web security threats including but not limited to SQL injection, XSS, brute force attacks, DDoS, and reconnaissance scanning."]})]}),d.jsx(Ao,{title:"4. Legal Basis",children:d.jsx("p",{children:"Processing is carried out under GDPR Article 6(1)(f) — legitimate interest of the Data Controller in protecting their website and users from security threats. The Data Controller engages ShieldSync as a Data Processor under GDPR Article 28."})}),d.jsx(Ao,{title:"5. Data Retention",children:d.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[d.jsxs("li",{children:[d.jsx("strong",{className:"text-foreground",children:"Threat logs & attack data:"})," Retained for the duration specified by the Customer's plan (7–999 days depending on tier)."]}),d.jsxs("li",{children:[d.jsx("strong",{className:"text-foreground",children:"IP blocklists:"})," Retained until manually removed by the Customer or until the configured expiry."]}),d.jsxs("li",{children:[d.jsx("strong",{className:"text-foreground",children:"Scan reports:"})," Retained for the duration of the Customer's account."]}),d.jsxs("li",{children:[d.jsx("strong",{className:"text-foreground",children:"After account deletion:"})," All Customer data is permanently deleted within 30 days."]})]})}),d.jsxs(Ao,{title:"6. Security Measures",children:[d.jsx("p",{children:"ShieldSync implements appropriate technical and organizational measures including:"}),d.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[d.jsx("li",{children:"Encryption in transit (TLS 1.2+) and at rest"}),d.jsx("li",{children:"Access controls and role-based permissions"}),d.jsx("li",{children:"Regular security audits and vulnerability assessments"}),d.jsx("li",{children:"Incident response procedures"}),d.jsx("li",{children:"Data minimization — only security-relevant data is processed"})]})]}),d.jsxs(Ao,{title:"7. Sub-processors",children:[d.jsx("p",{children:"ShieldSync may engage sub-processors to assist in providing the service. Current sub-processors include:"}),d.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[d.jsx("li",{children:"Cloud infrastructure providers for hosting and data storage"}),d.jsx("li",{children:"Stripe for payment processing (does not process visitor data)"})]}),d.jsx("p",{className:"mt-2",children:"The Customer will be notified of any changes to sub-processors. The Customer may object to a new sub-processor within 30 days of notification."})]}),d.jsxs(Ao,{title:"8. Data Subject Rights",children:[d.jsx("p",{children:"ShieldSync will assist the Customer in fulfilling data subject requests including:"}),d.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[d.jsx("li",{children:"Right of access — providing copies of processed data upon request"}),d.jsx("li",{children:"Right to erasure — deleting specific IP addresses or records"}),d.jsx("li",{children:"Right to restriction of processing"})]}),d.jsxs("p",{className:"mt-2",children:["Requests should be directed to ",d.jsx("strong",{className:"text-foreground",children:"privacy@shieldsync.io"}),". We will respond within 30 days."]})]}),d.jsx(Ao,{title:"9. Data Breach Notification",children:d.jsx("p",{children:"In the event of a personal data breach, ShieldSync will notify the Customer without undue delay and no later than 72 hours after becoming aware of the breach, providing details of the nature, scope, and recommended mitigation measures."})}),d.jsx(Ao,{title:"10. International Transfers",children:d.jsx("p",{children:"If Personal Data is transferred outside the European Economic Area, ShieldSync ensures appropriate safeguards are in place, including Standard Contractual Clauses (SCCs) approved by the European Commission."})}),d.jsx(Ao,{title:"11. Audit Rights",children:d.jsx("p",{children:"The Customer has the right to audit ShieldSync's compliance with this DPA. Audits may be conducted once per year with reasonable notice. ShieldSync will provide necessary documentation and access to demonstrate compliance."})}),d.jsx(Ao,{title:"12. Termination",children:d.jsx("p",{children:"Upon termination of the service agreement, ShieldSync will delete or return all Personal Data within 30 days, unless retention is required by law. The Customer may request a copy of their data before deletion."})}),d.jsx(Ao,{title:"13. Deletion Requests",children:d.jsxs("p",{children:["Customers can request deletion of all their data at any time by contacting"," ",d.jsx("strong",{className:"text-foreground",children:"privacy@shieldsync.io"}),". Deletion will be completed within 30 days and a confirmation will be sent to the Customer's registered email."]})}),d.jsx(Ao,{title:"14. Contact",children:d.jsxs("p",{children:["For questions about this DPA or data processing practices, contact us at:"," ",d.jsx("strong",{className:"text-foreground",children:"privacy@shieldsync.io"})]})})]})]})]})}function Ao({title:e,children:t}){return d.jsxs("section",{children:[d.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:e}),t]})}const t$e=()=>d.jsxs(uae,{children:[d.jsx(La,{path:"/",element:d.jsx(Cye,{})}),d.jsx(La,{path:"/welcome",element:d.jsx(Rve,{})}),d.jsx(La,{path:"/admin",element:d.jsx(ZBe,{})}),d.jsx(La,{path:"/dpa",element:d.jsx(e$e,{})}),d.jsxs(La,{path:"/dashboard",element:d.jsx(Vbe,{}),children:[d.jsx(La,{index:!0,element:d.jsx(XMe,{})}),d.jsx(La,{path:"sites",element:d.jsx(u6e,{})}),d.jsx(La,{path:"scans",element:d.jsx(WDe,{})}),d.jsx(La,{path:"attacks",element:d.jsx(y8e,{})}),d.jsx(La,{path:"alerts",element:d.jsx(_8e,{})}),d.jsx(La,{path:"compliance",element:d.jsx(FBe,{})}),d.jsx(La,{path:"protection",element:d.jsx(GBe,{})}),d.jsx(La,{path:"subscription",element:d.jsx(KBe,{})}),d.jsx(La,{path:"settings",element:d.jsx(WBe,{})})]}),d.jsx(La,{path:"*",element:d.jsx(Tle,{})})]});function n$e(){return d.jsx(Mle,{children:d.jsxs(rie,{client:mie,children:[d.jsx(vae,{children:d.jsx(t$e,{})}),d.jsx(Tre,{})]})})}Gee.createRoot(document.getElementById("root")).render(d.jsx(n$e,{}));export{lr as _,hx as c,Kn as g};